ethereumjs-monorepo

@ethereumjs/evm / EVMOpts

Interface: EVMOpts

Options for instantiating a EVM.

Table of contents

Properties

Properties

allowUnlimitedContractSize

Optional allowUnlimitedContractSize: boolean

Allows unlimited contract sizes while debugging. By setting this to true, the check for contract size limit of 24KB (see EIP-170) is bypassed.

Default: false [ONLY set to true during debugging]

Defined in

types.ts:223


allowUnlimitedInitCodeSize

Optional allowUnlimitedInitCodeSize: boolean

Allows unlimited contract code-size init while debugging. This (partially) disables EIP-3860. Gas cost for initcode size analysis will still be charged. Use with caution.

Defined in

types.ts:229


blockchain

Optional blockchain: Blockchain

Defined in

types.ts:269


common

Optional common: Common

Use a Common instance for EVM instantiation.

Supported EIPs

Annotations:

Defined in

types.ts:215


customOpcodes

Optional customOpcodes: CustomOpcode[]

Override or add custom opcodes to the EVM instruction set These custom opcodes are EIP-agnostic and are always statically added To delete an opcode, add an entry of format {opcode: number}. This will delete that opcode from the EVM. If this opcode is then used in the EVM, the INVALID opcode would instead be used. To add an opcode, add an entry of the following format: { // The opcode number which will invoke the custom opcode logic opcode: number // The name of the opcode (as seen in the step event) opcodeName: string // The base fee of the opcode baseFee: number // If the opcode charges dynamic gas, add this here. To charge the gas, use the i methods of the BN, to update the charged gas gasFunction?: function(runState: RunState, gas: BN, common: Common) // The logic of the opcode which holds the logic of changing the current state logicFunction: function(runState: RunState) } Note: gasFunction and logicFunction can both be async or synchronous functions

Defined in

types.ts:251


customPrecompiles

Optional customPrecompiles: CustomPrecompile[]

Defined in

types.ts:259


profiler

Optional profiler: EVMProfilerOpts

Defined in

types.ts:274


stateManager

Optional stateManager: EVMStateManagerInterface

Defined in

types.ts:264