Evm
Extends
EVM
Constructors
new Evm()
protectednew Evm(opts,bn128):Evm
Creates new EVM object
Parameters
• opts: EVMOpts
The EVM options
• bn128: bn128
Initialized bn128 WASM object for precompile usage (internal)
Returns
Inherited from
EthereumEVM.constructor
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:78
Properties
_block?
protectedoptional_block:Block
Inherited from
EthereumEVM._block
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:27
_bls?
protectedreadonlyoptional_bls:EVMBLSInterface
Inherited from
EthereumEVM._bls
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:47
_customOpcodes?
protectedreadonlyoptional_customOpcodes:CustomOpcode[]
Inherited from
EthereumEVM._customOpcodes
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:37
_customPrecompiles
protected_customPrecompiles:CustomPrecompile[]
Overrides
EthereumEVM._customPrecompiles
Defined in
packages/evm/src/EvmType.ts:14
_dynamicGasHandlers
protected_dynamicGasHandlers:Map<number,AsyncDynamicGasHandler|SyncDynamicGasHandler>
Inherited from
EthereumEVM._dynamicGasHandlers
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:40
_emit()
protectedreadonly_emit: (topic,data) =>Promise<void>
Parameters
• topic: string
• data: any
Returns
Promise<void>
Inherited from
EthereumEVM._emit
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:57
_handlers
protected_handlers:Map<number,OpHandler>
Inherited from
EthereumEVM._handlers
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:39
_opcodeMap
protected_opcodeMap:OpcodeMap
Inherited from
EthereumEVM._opcodeMap
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:41
_opcodes
protected_opcodes:OpcodeList
Inherited from
EthereumEVM._opcodes
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:34
_optsCached
protectedreadonly_optsCached:EVMOpts
Inherited from
EthereumEVM._optsCached
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:43
_precompiles
protected_precompiles:Map<string,PrecompileFunc>
Inherited from
EthereumEVM._precompiles
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:42
_tx?
protectedoptional_tx:object
gasPrice
gasPrice:
bigint
origin
origin:
EthjsAddress
Inherited from
EthereumEVM._tx
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:23
allowUnlimitedContractSize
readonlyallowUnlimitedContractSize:boolean
Inherited from
EthereumEVM.allowUnlimitedContractSize
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:35
allowUnlimitedInitCodeSize
readonlyallowUnlimitedInitCodeSize:boolean
Inherited from
EthereumEVM.allowUnlimitedInitCodeSize
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:36
blockchain
blockchain:
Blockchain
Inherited from
EthereumEVM.blockchain
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:31
common
readonlycommon:Common
Inherited from
EthereumEVM.common
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:28
events
readonlyevents:AsyncEventEmitter<EVMEvents>
Inherited from
EthereumEVM.events
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:29
journal
journal:
Journal
Inherited from
EthereumEVM.journal
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:32
performanceLogger
protectedperformanceLogger:EVMPerformanceLogger
Inherited from
EthereumEVM.performanceLogger
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:44
stateManager
stateManager:
StateManager
Overrides
EthereumEVM.stateManager
Defined in
packages/evm/src/EvmType.ts:13
transientStorage
readonlytransientStorage:TransientStorage
Inherited from
EthereumEVM.transientStorage
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:33
supportedHardforks
protectedstaticsupportedHardforks:Hardfork[]
Inherited from
EthereumEVM.supportedHardforks
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:22
Accessors
opcodes
getopcodes():OpcodeList
Returns
OpcodeList
Inherited from
EthereumEVM.opcodes
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:46
precompiles
getprecompiles():Map<string,PrecompileFunc>
Returns
Map<string, PrecompileFunc>
Inherited from
EthereumEVM.precompiles
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:45
Methods
_addToBalance()
protected_addToBalance(toAccount,message):Promise<void>
Parameters
• toAccount: EthjsAccount
• message: MessageWithTo
Returns
Promise<void>
Inherited from
EthereumEVM._addToBalance
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:113
_executeCall()
protected_executeCall(message):Promise<EvmResult>
Parameters
• message: MessageWithTo
Returns
Promise<EvmResult>
Inherited from
EthereumEVM._executeCall
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:84
_executeCreate()
protected_executeCreate(message):Promise<EvmResult>
Parameters
• message: EthjsMessage
Returns
Promise<EvmResult>
Inherited from
EthereumEVM._executeCreate
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:85
_generateAddress()
protected_generateAddress(message):Promise<EthjsAddress>
Parameters
• message: EthjsMessage
Returns
Promise<EthjsAddress>
Inherited from
EthereumEVM._generateAddress
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:111
_loadCode()
protected_loadCode(message):Promise<void>
Parameters
• message: EthjsMessage
Returns
Promise<void>
Inherited from
EthereumEVM._loadCode
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:110
_reduceSenderBalance()
protected_reduceSenderBalance(account,message):Promise<void>
Parameters
• account: EthjsAccount
• message: EthjsMessage
Returns
Promise<void>
Inherited from
EthereumEVM._reduceSenderBalance
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:112
addCustomPrecompile()
addCustomPrecompile(
precompile):void
Parameters
• precompile: CustomPrecompile
Returns
void
Defined in
packages/evm/src/EvmType.ts:16
clearPerformanceLogs()
clearPerformanceLogs():
void
Returns
void
Inherited from
EthereumEVM.clearPerformanceLogs
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:132
getActiveOpcodes()
getActiveOpcodes():
OpcodeList
Returns a list with the currently activated opcodes available for EVM execution
Returns
OpcodeList
Inherited from
EthereumEVM.getActiveOpcodes
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:83
getPerformanceLogs()
getPerformanceLogs():
object
Returns
object
opcodes
opcodes:
EVMPerformanceLogOutput[]
precompiles
precompiles:
EVMPerformanceLogOutput[]
Inherited from
EthereumEVM.getPerformanceLogs
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:128
getPrecompile()
getPrecompile(
address):undefined|PrecompileFunc
Returns code for precompile at the given address, or undefined if no such precompile exists.
Parameters
• address: EthjsAddress
Returns
undefined | PrecompileFunc
Inherited from
EthereumEVM.getPrecompile
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:105
removeCustomPrecompile()
removeCustomPrecompile(
precompile):void
Parameters
• precompile: CustomPrecompile
Returns
void
Defined in
packages/evm/src/EvmType.ts:17
runCall()
runCall(
opts):Promise<EvmResult>
Executes an EVM message, determining whether it’s a call or create
based on the to address. It checkpoints the state and reverts changes
if an exception happens during the message execution.
Parameters
• opts: EvmRunCallOpts
Returns
Promise<EvmResult>
Inherited from
EthereumEVM.runCall
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:95
runCode()
runCode(
opts):Promise<ExecResult>
Bound to the global VM and therefore shouldn’t be used directly from the evm class
Parameters
• opts: EVMRunCodeOpts
Returns
Promise<ExecResult>
Inherited from
EthereumEVM.runCode
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:100
runInterpreter()
protectedrunInterpreter(message,opts?):Promise<ExecResult>
Starts the actual bytecode processing for a CALL or CREATE
Parameters
• message: EthjsMessage
• opts?: InterpreterOpts
Returns
Promise<ExecResult>
Inherited from
EthereumEVM.runInterpreter
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:89
runPrecompile()
protectedrunPrecompile(code,data,gasLimit):ExecResult|Promise<ExecResult>
Executes a precompiled contract with given data and gas limit.
Parameters
• code: PrecompileFunc
• data: Uint8Array
• gasLimit: bigint
Returns
ExecResult | Promise<ExecResult>
Inherited from
EthereumEVM.runPrecompile
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:109
shallowCopy()
shallowCopy():
EVM
This method copies the EVM, current HF and EIP settings and returns a new EVM instance.
Note: this is only a shallow copy and both EVM instances will point to the same underlying state DB.
Returns
EVM
EVM
Inherited from
EthereumEVM.shallowCopy
Defined in
node_modules/.pnpm/@ethereumjs+evm@3.1.1/node_modules/@ethereumjs/evm/dist/esm/evm.d.ts:127
create()
staticcreate(options?):Promise<Evm>
Use this async static constructor for the initialization of an EVM object
Parameters
• options?: EVMOpts
Returns
Promise<Evm>
A new EVM
Overrides
EthereumEVM.create