@tevm/voltaire / evm / Block
Block
Functions
handler_0x40_BLOCKHASH()
handler_0x40_BLOCKHASH(Defined in: src/evm/block/0x40_BLOCKHASH.js:17 BLOCKHASH opcode (0x40) - Get hash of recent block Per Python reference (cancun/vm/instructions/block.py:21-64):frame):EvmError|null
- Charges GAS_BLOCK_HASH (20 gas)
- Returns hash of one of the 256 most recent complete blocks
- Returns 0 if block number is out of range (too old or >= current)
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x41_COINBASE()
handler_0x41_COINBASE(Defined in: src/evm/block/0x41_COINBASE.js:11 COINBASE opcode (0x41) - Get block coinbase addressframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x42_TIMESTAMP()
handler_0x42_TIMESTAMP(Defined in: src/evm/block/0x42_TIMESTAMP.js:11 TIMESTAMP opcode (0x42) - Get block timestampframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x43_NUMBER()
handler_0x43_NUMBER(Defined in: src/evm/block/0x43_NUMBER.js:11 NUMBER opcode (0x43) - Get block numberframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x44_DIFFICULTY()
handler_0x44_DIFFICULTY(Defined in: src/evm/block/0x44_DIFFICULTY.js:14 DIFFICULTY/PREVRANDAO opcode (0x44) - Get block difficulty or prevrandao Pre-Merge: returns block difficulty Post-Merge: returns prevrandao valueframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x45_GASLIMIT()
handler_0x45_GASLIMIT(Defined in: src/evm/block/0x45_GASLIMIT.js:11 GASLIMIT opcode (0x45) - Get block gas limitframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x46_CHAINID()
handler_0x46_CHAINID(Defined in: src/evm/block/0x46_CHAINID.js:11 CHAINID opcode (0x46) - Get chain ID (EIP-1344, Istanbul+)frame):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x47_SELFBALANCE()
handler_0x47_SELFBALANCE(Defined in: src/evm/block/0x47_SELFBALANCE.js:11 SELFBALANCE opcode (0x47) - Get balance of currently executing account (EIP-1884, Istanbul+)frame):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x48_BASEFEE()
handler_0x48_BASEFEE(Defined in: src/evm/block/0x48_BASEFEE.js:11 BASEFEE opcode (0x48) - Get base fee per gas (EIP-3198, London+)frame):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x49_BLOBHASH()
handler_0x49_BLOBHASH(Defined in: src/evm/block/0x49_BLOBHASH.js:15 BLOBHASH opcode (0x49) - Get versioned blob hash (EIP-4844, Cancun+) Per Python reference (cancun/vm/gas.py:68):frame):EvmError|null
- GAS_BLOBHASH_OPCODE = 3 (same as GasFastestStep)
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
handler_0x4a_BLOBBASEFEE()
handler_0x4a_BLOBBASEFEE(Defined in: src/evm/block/0x4a_BLOBBASEFEE.js:15 BLOBBASEFEE opcode (0x4a) - Get blob base fee (EIP-7516, Cancun+) Per Python reference (cancun/vm/gas.py and BlobBaseFeeGas constant):frame):EvmError|null
- GAS_BASE = 2 (same as GasQuickStep)
- Returns blob_base_fee calculated from excess_blob_gas
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if operation fails
