Skip to main content

Module arbitrum

Module arbitrum 

Source
Expand description

Minimal Arbitrum system contract compatibility helpers.

Re-exportsยง

use std::borrow::Cow; ๐Ÿ”’
use alloy_chains::Chain; ๐Ÿ”’
use alloy_evm::precompiles::DynPrecompile; ๐Ÿ”’
use alloy_evm::precompiles::PrecompileInput; ๐Ÿ”’
use alloy_primitives::Address; ๐Ÿ”’
use alloy_primitives::Bytes; ๐Ÿ”’
use alloy_primitives::U256; ๐Ÿ”’
use alloy_primitives::hex; ๐Ÿ”’
use alloy_primitives::hex; ๐Ÿ”’
use revm::precompile::PrecompileHalt; ๐Ÿ”’
use revm::precompile::PrecompileId; ๐Ÿ”’
use revm::precompile::PrecompileOutput; ๐Ÿ”’
use revm::precompile::PrecompileResult; ๐Ÿ”’

Constantsยง

ARB_BLOCK_NUMBER_GAS_COST
Gas Nitro charges inside ArbSys.arbBlockNumber(): opening the ArbOS state reads its version from storage (800, the EIP-2200 SLOAD cost), and copying the 32-byte result costs 3.
ARB_BLOCK_NUMBER_SELECTOR
ArbSys.arbBlockNumber() selector.
ARB_SYS_ADDRESS
ArbSys system contract address.

Staticsยง

PRECOMPILE_ID_ARB_SYS
ID for the ArbSys precompile.

Functionsยง

arb_block_number_call
Returns the gas cost and ABI-encoded result for ArbSys.arbBlockNumber().
arb_block_number_output
Returns the ABI-encoded result for ArbSys.arbBlockNumber().
arb_sys_precompile
Returns an ArbSys precompile for the provided L2 block number.
arb_sys_precompile_call ๐Ÿ”’
is_arbitrum_chain
Returns whether chain_id is an Arbitrum chain.