vm

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2023 License: LGPL-3.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnexpectedTx = errors.New("unexpected tx type")
)

Functions

This section is empty.

Types

type VM

type VM interface {
	Run(tx *types.Transaction, from *common.Address, gasLimit int64, commitToEnv bool) *types.TxReceipt
	Read(contractAddr common.Address, method string, args ...[]byte) ([]byte, error)
	IsWasm(tx *types.Transaction) bool
	ContractAddr(tx *types.Transaction, from *common.Address) common.Address
}

func NewVmImpl

func NewVmImpl(appState *appstate.AppState, blockHeaderProvider wasm.BlockHeaderProvider, head *types.Header, statsCollector collector.StatsCollector, cfg *config.Config) VM

type VmCreator added in v0.25.0

type VmCreator = func(appState *appstate.AppState, blockHeaderProvider wasm.BlockHeaderProvider, block *types.Header, statsCollector collector.StatsCollector, cfg *config.Config) VM

type VmImpl

type VmImpl struct {
	// contains filtered or unexported fields
}

func (*VmImpl) ContractAddr added in v1.0.0

func (vm *VmImpl) ContractAddr(tx *types.Transaction, from *common.Address) common.Address

func (*VmImpl) IsWasm added in v1.0.0

func (vm *VmImpl) IsWasm(tx *types.Transaction) bool

func (*VmImpl) Read

func (vm *VmImpl) Read(contractAddr common.Address, method string, args ...[]byte) ([]byte, error)

func (*VmImpl) Run

func (vm *VmImpl) Run(tx *types.Transaction, from *common.Address, gasLimit int64, commitToState bool) *types.TxReceipt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL