Skip to main content

Overview

ArbOS provides L2-specific precompiles with methods smart contracts can call the same way they can solidity functions. This reference details those we expect users to most frequently use. For an exhaustive reference including those we don't expect most users to ever call, please refer to the Full Precompiles documentation.

From the perspective of user applications, precompiles live as contracts at the following addresses. Click on any to jump to their section.

PrecompileAddress  Purpose
ArbAggregator0x6dConfiguring transaction aggregation
ArbGasInfo0x6cInfo about gas pricing
ArbRetryableTx  0x6eManaging retryables
ArbSys0x64System-level functionality

ArbAggregator

Provides aggregators and their users methods for configuring how they participate in L1 aggregation. Arbitrum One's default aggregator is the Sequencer, which a user will prefer unless SetPreferredAggregator is invoked to change it.

Methods
getPreferredAggregator(account)Gets an account's preferred aggregator
setPreferredAggregator(aggregator)Sets the caller's preferred aggregator to that provided
getDefaultAggregator()Gets the chain's default aggregator

ArbGasInfo

Provides insight into the cost of using the chain. These methods have been adjusted to account for Nitro's heavy use of calldata compression. Of note to end-users, we no longer make a distinction between non-zero and zero-valued calldata bytes.

Methods
getPricesInWei()Get prices in wei when using the caller's preferred aggregator
getPricesInArbGas()Get prices in ArbGas when using the caller's preferred aggregator
getGasAccountingParams()Get the chain speed limit, pool size, and transaction gas limit
getL1BaseFeeEstimate()Get ArbOS's estimate of the L1 basefee in wei

ArbRetryableTx

Provides methods for managing retryables. The model has been adjusted for Nitro, most notably in terms of how retry transactions are scheduled. For more information on retryables, please see the retryable documentation.

MethodsNitro changes
cancel(ticket)Cancel the ticket and refund its callvalue to its beneficiary
getBeneficiary(ticket)  Gets the beneficiary of the ticket
getTimeout(ticket)Gets the timestamp for when ticket will expire
keepAlive(ticket)Adds one lifetime period to the ticket's expiryDoesn't add callvalue
redeem(ticket)Schedule an attempt to redeem the retryable, donating all of the call's gas  Happens in a future transaction

ArbSys

Provides system-level functionality for interacting with L1 and understanding the call stack.

Methods
arbBlockNumber()Gets the current L2 block number
arbBlockHash()Gets the L2 block hash, if the block is sufficiently recent
isTopLevelCall()Checks if the call is top-level
sendTxToL1(destination, calldataForL1)Sends a transaction to L1, adding it to the outbox
withdrawEth(destination)Send paid eth to the destination on L1