Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateableEips ¶
func ActivateableEips() []string
ActivateableEips returns the list of EIPs that can be activated
func ConvertChainConfig ¶
func ConvertChainConfig(cfg *luxparams.ChainConfig) *params.ChainConfig
ConvertChainConfig converts luxfi chainConfig to ethereum chainConfig
Types ¶
type BlockContext ¶
type BlockContext = vm.BlockContext
BlockContext provides the EVM with auxiliary information. Once provided it shouldn't be modified.
type EVM ¶
EVM is the Ethereum Virtual Machine base object and provides the necessary tools to run a contract on the given state with the provided context. It should be noted that any error generated through any of the calls should be considered a revert-state-and-consume-all-gas operation, no checks on specific errors should ever be performed. The interpreter makes sure that any errors generated are to be considered faulty code.
The EVM should never be reused and is not thread safe.
func NewEVM ¶
func NewEVM(blockCtx BlockContext, statedb StateDB, chainConfig *params.ChainConfig, config Config) *EVM
NewEVM creates a new EVM instance.
func NewEVMWithStateDB ¶
func NewEVMWithStateDB(blockCtx BlockContext, txCtx TxContext, statedb *state.StateDB, chainConfig *luxparams.ChainConfig, config Config) *EVM
NewEVMWithStateDB creates a new EVM with luxfi chainConfig and statedb
type EVMLogger ¶
type EVMLogger interface {
// Transaction level
CaptureTxStart(gasLimit uint64)
CaptureTxEnd(restGas uint64)
// Top call frame
CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int)
CaptureEnd(output []byte, gasUsed uint64, err error)
// Rest of call frames
CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int)
CaptureExit(output []byte, gasUsed uint64, err error)
// Opcode level
CaptureState(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error)
CaptureFault(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error)
}
EVMLogger is used to collect execution traces from an EVM transaction execution. CaptureState is called for each step of the VM with the current VM state. Note that reference types are actual VM data structures; make copies if you need to retain them beyond the current call.
type ScopeContext ¶
type ScopeContext = vm.ScopeContext
ScopeContext contains the things that are per-call, such as stack and memory, but not transients like pc and gas