ethereumjs-monorepo

@ethereumjs/vm


@ethereumjs/vm / runTx

Function: runTx()

runTx(vm, opts): Promise<RunTxResult>

Defined in: vm/src/runTx.ts:479

Executes a single transaction against the VM state and returns the receipt.

Options are documented on RunTxOpts. Emits beforeTx / afterTx on the VM.

Parameters

vm

VM

opts

RunTxOpts

Returns

Promise<RunTxResult>

Throws

If balance, nonce, or hardfork validation fails, or execution reverts