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-2200SLOADcost), 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_idis an Arbitrum chain.