@tevm/voltaire / evm / System
System
Functions
call()
call(Defined in: src/evm/system/0xf1_CALL.js:32 CALL opcode (0xf1) - Message call into an account Stack: [gas, address, value, inOffset, inLength, outOffset, outLength] => [success] Gas: Complex (base + memory + cold access + value transfer + new account)frame,host?):EvmError|null
Architecture Note
This is a low-level opcode handler. For full nested execution, the host must provide acall method. Full EVM implementations are in:
- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
Parameters
frame
BrandedFrame
Frame instance
host?
BrandedHost
Host interface (optional)
Returns
EvmError | null
Error if any
callcode()
callcode(Defined in: src/evm/system/0xf2_CALLCODE.js:34 CALLCODE opcode (0xf2) - Message call into this account with another account’s code Stack: [gas, address, value, inOffset, inLength, outOffset, outLength] => [success] Gas: Similar to CALL but executes code in current contextframe,host?):EvmError|null
Architecture Note
This is a low-level opcode handler. For full nested execution, the host must provide acall method. Full EVM implementations are in:
- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
Parameters
frame
BrandedFrame
Frame instance
host?
BrandedHost
Host interface (optional)
Returns
EvmError | null
Error if any
create()
create(Defined in: src/evm/system/0xf0_CREATE.js:21 CREATE opcode (0xf0) - Create a new contract Stack: [value, offset, length] => [address] Gas: 32000 + memory expansion + init code hash costframe,host?):EvmError|null
Architecture Note
This is a low-level opcode handler. For full nested execution, the host must provide acreate method. Full EVM implementations are in:
- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
Parameters
frame
BrandedFrame
Frame instance
host?
BrandedHost
Host interface (optional)
Returns
EvmError | null
Error if any
create2()
create2(Defined in: src/evm/system/0xf5_CREATE2.js:23 CREATE2 opcode (0xf5) - Create a new contract with deterministic address Stack: [value, offset, length, salt] => [address] Gas: 32000 + memory expansion + init code hash cost + keccak256 cost Address: keccak256(0xff ++ sender ++ salt ++ keccak256(initCode)) Note: Introduced in EIP-1014 (Constantinople)frame,host?):EvmError|null
Architecture Note
This is a low-level opcode handler. For full nested execution, the host must provide acreate method. Full EVM implementations are in:
- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
Parameters
frame
BrandedFrame
Frame instance
host?
BrandedHost
Host interface (optional)
Returns
EvmError | null
Error if any
delegatecall()
delegatecall(Defined in: src/evm/system/0xf4_DELEGATECALL.js:22 DELEGATECALL opcode (0xf4) - Message call with another account’s code, preserving msg.sender and msg.value Stack: [gas, address, inOffset, inLength, outOffset, outLength] => [success] Gas: Similar to CALL but no value parameter (preserves current msg.value) Note: Introduced in EIP-7 (Homestead)frame,host?):EvmError|null
Architecture Note
This is a low-level opcode handler. For full nested execution, the host must provide acall method. Full EVM implementations are in:
- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
Parameters
frame
BrandedFrame
Frame instance
host?
BrandedHost
Host interface (optional)
Returns
EvmError | null
Error if any
selfdestruct()
selfdestruct(Defined in: src/evm/system/0xff_SELFDESTRUCT.js:14 SELFDESTRUCT opcode (0xff) - Halt execution and register account for deletion Stack: [beneficiary] => [] Gas: 5000 + cold account access (EIP-2929) + new account (if needed) Note: Behavior changed significantly in EIP-6780 (Cancun) Pre-Cancun: Marks account for deletion, transfers balance to beneficiary Post-Cancun: Only deletes if account was created in same transaction, always transfers balanceframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if any
staticcall()
staticcall(Defined in: src/evm/system/0xfa_STATICCALL.js:32 STATICCALL opcode (0xfa) - Static message call (no state modifications allowed) Stack: [gas, address, inOffset, inLength, outOffset, outLength] => [success] Gas: Similar to CALL but no value parameter Note: Introduced in EIP-214 (Byzantium) Note: Sets isStatic flag, preventing any state modifications in called contextframe,host?):EvmError|null
Architecture Note
This is a low-level opcode handler. For full nested execution, the host must provide acall method. Full EVM implementations are in:
- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
Parameters
frame
BrandedFrame
Frame instance
host?
BrandedHost
Host interface (optional)
Returns
EvmError | null
Error if any
