Expand description
Arbitrum precompile contracts.
Implements the system contracts at addresses 0x64+ that provide
on-chain access to ArbOS state, gas pricing, retryable tickets,
Stylus WASM management, and node interface queries.
Re-exports§
pub use storage_slot::ARBOS_STATE_ADDRESS;
Modules§
Structs§
- ArbSys
Merkle State - State changes from an ArbSys call for post-execution application.
Constants§
- ARBADDRESSTABLE_
ADDRESS - ArbAddressTable precompile address (0x66).
- ARBAGGREGATOR_
ADDRESS - ArbAggregator precompile address (0x6d).
- ARBBLS_
ADDRESS - ArbBLS precompile address (0x67).
- ARBDEBUG_
ADDRESS - ArbDebug precompile address (0xff).
- ARBFILTEREDTXMANAGER_
ADDRESS - ArbFilteredTransactionsManager precompile address (0x74).
- ARBFUNCTIONTABLE_
ADDRESS - ArbFunctionTable precompile address (0x68).
- ARBGASINFO_
ADDRESS - ArbGasInfo precompile address (0x6c).
- ARBINFO_
ADDRESS - ArbInfo precompile address (0x65).
- ARBNATIVETOKENMANAGER_
ADDRESS - ArbNativeTokenManager precompile address (0x73).
- ARBOSACTS_
ADDRESS - ArbosActs precompile address (0xa4b05).
- ARBOWNERPUBLIC_
ADDRESS - ArbOwnerPublic precompile address (0x6b).
- ARBOWNER_
ADDRESS - ArbOwner precompile address (0x70).
- ARBRETRYABLETX_
ADDRESS - ArbRetryableTx precompile address (0x6e).
- ARBSTATISTICS_
ADDRESS - ArbStatistics precompile address (0x6f).
- ARBSYS_
ADDRESS - ArbSys precompile address (0x64).
- ARBWASMCACHE_
ADDRESS - ArbWasmCache precompile address (0x72).
- ARBWASM_
ADDRESS - ArbWasm precompile address (0x71).
- NODE_
INTERFACE_ ADDRESS - NodeInterface virtual contract address (0xc8).
Functions§
- create_
arbaddresstable_ precompile - create_
arbaggregator_ precompile - create_
arbbls_ precompile - create_
arbdebug_ precompile - create_
arbfilteredtxmanager_ precompile - create_
arbfunctiontable_ precompile - create_
arbgasinfo_ precompile - create_
arbinfo_ precompile - create_
arbnativetokenmanager_ precompile - create_
arbosacts_ precompile - create_
arbowner_ precompile - create_
arbownerpublic_ precompile - create_
arbretryabletx_ precompile - create_
arbstatistics_ precompile - create_
arbsys_ precompile - create_
arbwasm_ precompile - create_
arbwasmcache_ precompile - create_
nodeinterface_ precompile - get_
arbos_ version - Get the current ArbOS version.
- get_
block_ timestamp - Get the current block timestamp.
- get_
cached_ l1_ block_ number - Get the cached L1 block number for a given L2 block.
- get_
current_ gas_ backlog - Get the current gas backlog value.
- get_
current_ l2_ block - Get the current L2 block number.
- get_
current_ tx_ poster_ fee - Get the current tx poster fee.
- get_
current_ tx_ sender - Get the current tx sender.
- get_
evm_ depth - Get the current EVM call depth.
- get_
l1_ block_ number_ for_ evm - Get the L1 block number for the NUMBER opcode.
- get_
l2_ block_ hash - Get an L2 block hash from the arbBlockHash cache.
- get_
poster_ balance_ correction - Get the poster balance correction.
- get_
tx_ is_ aliased - Check whether the current transaction uses address aliasing.
- redeem_
scheduled_ topic - RedeemScheduled event topic0. keccak256(“RedeemScheduled(bytes32,bytes32,uint64,uint64,address,uint256,uint256)”)
- register_
arb_ precompiles - Register all Arbitrum precompiles into a [
PrecompilesMap]. - set_
arbos_ version - Set the current ArbOS version for precompile version gating.
- set_
block_ timestamp - Set the current block timestamp for precompile queries.
- set_
cached_ l1_ block_ number - Set the cached L1 block number for a given L2 block.
- set_
current_ gas_ backlog - Set the current gas backlog value for the Redeem precompile.
- set_
current_ l2_ block - Set the current L2 block number for precompile use. In Arbitrum, block_env.number holds the L1 block number (for the NUMBER opcode), so precompiles that need the L2 block number read it from here.
- set_
current_ tx_ poster_ fee - Set the current tx poster fee for ArbGasInfo.getCurrentTxL1GasFees.
- set_
current_ tx_ sender - Set the current tx sender for BALANCE correction.
- set_
evm_ depth - Set the EVM call depth to a specific value. Called by the precompile provider which reads the depth from revm’s journal.
- set_
l1_ block_ number_ for_ evm - Set the L1 block number for the NUMBER opcode.
- set_
l2_ block_ hash - Set an L2 block hash in the arbBlockHash cache.
- set_
poster_ balance_ correction - Set the poster balance correction for BALANCE opcode adjustment.
- set_
tx_ is_ aliased - Mark the current transaction as an aliased L1→L2 type.
- store_
arbsys_ state - Store ArbSys state changes for post-execution application.
- take_
arbsys_ state - Take the stored ArbSys state (clears it).
- ticket_
created_ topic - Backlog update cost: read + write. Write cost depends on whether the new value is zero (StorageClearCost=5000) or non-zero (StorageWriteCost=20000). This is computed dynamically in handle_redeem based on current backlog.