Environment
ADDRESS
Original EVM instruction.
This value is fetched with a native EraVM instruction: context.this
.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
BALANCE
Original EVM instruction.
System Contract
This information is requested a System Contract called L2BaseToken.
On how the System Contract is called, see this section.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
The request to the System Contract is done via the SystemRequest runtime function.
ORIGIN
Original EVM instruction.
System Contract
This information is requested a System Contract called SystemContext.
On how the System Contract is called, see this section.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
The request to the System Contract is done via the SystemRequest runtime function.
CALLER
Original EVM instruction.
This value is fetched with a native EraVM instruction: context.caller
.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
CALLVALUE
Original EVM instruction.
This value is fetched with a native EraVM instruction: context.get_context_u128
.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
CALLDATALOAD
Original EVM instruction.
Calldata is accessed with a generic memory access instruction, but the memory chunk itself is a reference to the calling contract's heap. A fat pointer to the parent contract is passed via ABI using registers.
Then, the pointer is saved to a global stack variable accessible from anywhere in the contract.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM Assembly
CALLDATASIZE
Original EVM instruction.
Calldata size is stored in the fat pointer passed from the parent contract (see CALLDATALOAD).
The size value can be extracted with bitwise operations as illustrated below.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM Assembly
CALLDATACOPY
Original EVM instruction.
Unlike on EVM, on EraVM it is a simple loop over CALLDATALOAD).
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM Assembly
CODECOPY
Original EVM instruction.
See the EraVM docs.
CODESIZE
Original EVM instruction.
See the EraVM docs.
GASPRICE
Original EVM instruction.
System Contract
This information is requested a System Contract called SystemContext.
On how the System Contract is called, see this section.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
The request to the System Contract is done via the SystemRequest runtime function.
EXTCODESIZE
Original EVM instruction.
System Contract
This information is requested a System Contract called AccountCodeStorage.
On how the System Contract is called, see this section.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
The request to the System Contract is done via the SystemRequest runtime function.
EXTCODECOPY
Original EVM instruction.
Not supported. Triggers a compile-time error.
RETURNDATASIZE
Original EVM instruction.
Return data size is read from the fat pointer returned from the child contract.
The size value can be extracted with bitwise operations as illustrated below.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM Assembly
RETURNDATACOPY
Original EVM instruction.
Unlike on EVM, on EraVM it is a simple loop over memory operations on 256-bit values.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM Assembly
EXTCODEHASH
Original EVM instruction.
System Contract
This information is requested a System Contract called AccountCodeStorage.
On how the System Contract is called, see this section.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
The request to the System Contract is done via the SystemRequest runtime function.
Last updated