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.
|Configuring transaction aggregation|
|Info about gas pricing|
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.
| ||Gets an account's preferred aggregator|
| ||Sets the caller's preferred aggregator to that provided|
| ||Gets the chain's default aggregator|
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.
| ||Get prices in wei when using the caller's preferred aggregator|
| ||Get prices in ArbGas when using the caller's preferred aggregator|
| ||Get the chain speed limit, pool size, and tx gas limit|
| ||Get ArbOS's estimate of the L1 basefee in wei|
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.
| ||Cancel the ticket and refund its callvalue to its beneficiary|
| ||Gets the beneficiary of the ticket|
| ||Gets the timestamp for when ticket will expire|
| ||Adds one lifetime period to the ticket's expiry||Doesn't add callvalue|
| ||Schedule an attempt to redeem the retryable, donating all of the call's gas||Happens in a future tx|
Provides system-level functionality for interacting with L1 and understanding the call stack.
| ||Gets the current L2 block number|
| ||Gets the L2 block hash, if the block is sufficiently recent|
| ||Checks if the call is top-level|
| ||Sends a transaction to L1, adding it to the outbox|
| ||Send paid eth to the destination on L1|