id | sidebar_label | title | custom_edit_url |
---|---|---|---|
Differences_Overview |
Overview |
Overview of Differences with Ethereum |
Arbitrum rollups aim to mantain compatibility with Ethereum. Smart contracts are compatible on the bytecode level, but there are certain aspects of the system that work differently to the EVM.
Some of the opcodes have slightly different behaviours, as seen in Solidity Support.
Concepts such as Time in Arbitrum and Gas play out differently in Layer 2.
Other differences are cool Special Features we squeezed in.
Every transaction submitted to Arbitrum will burn a nonce, except if the transaction is formatted incorrectly or does not have the expected nonce.
Arbitrum does not support the blake2f and ripemd160 precompiles (yet!)
Ether can be depositted using two methods: retryable transactions or L2 funded by L1 transactions. For end users these behave similarly, but have subtle differences.
When depositing funds it is possible to send ether into a contract address without executing its fallback function - a scenario similar to when contracts self destruct, sending funds to a contract address.
The API for Arbitrum aims to be a superset of the eth spec. When interacting with it you can expect all the usual fields, as well as some extra ones used to surface information unique to Arbitrum Rollups.
Transaction receipts contain the following extra fields
The Layer 1 block number for the transaction, as specified in Time in Arbitrum.
An object summarizing fee charges for the current transaction. It includes the units used, price paid, and price per unit.
The arbgas charges will vary depending on how a user interacts with Arbitrum, but the following table can be used as a general reference:
Key | Cost source | Meaning |
---|---|---|
l1Transaction | Fixed cost of inclusion to Layer 1 inbox | There is a fixed cost of including your transaction into the Layer 1 inbox contract. This is amortised by batching transactions together. |
l1Calldata | Layer 1 transaction calldata | The calldata included in each Layer 1 transaction has a cost associated to it. Aggregators are reimbursed for their costs. |
l2Storage | Layer 2 storage | Users are charged whenever a storage slot is written to with a non-zero value. |
l2Computation | Layer 2 computation | Users are charged per unit of computation used (measured in arbgas). |
For more in-depth explanations head over to the Gas docs page, or the Inside Arbitrum section on arbgas.
This includes the data from a smart contract return or the revert reason if you hit an EVM revert statement.
Return Code | Meaning |
---|---|
0 | Transaction success |
1 | EVM revert |
2 | Arbitrum is too congested to process your transaction |
3 | Not enough balance to pay for maxGas at gasPrice (for retryables: not enough to cover base submission cost) |
4 | Not enough balance for execution (for retryables: not enough to cover callvalue + base submission cost) |
5 | Wrong nonce used in transaction |
6 | Transaction was not formatted correctly |
7 | Cannot deploy to specified address ( ** defensive code that should never be triggered ** ) |
8 | Exceeded transaction gas limit |
9 | Amount of ArbGas provided for the tx is less than the amount required to cover L1 costs (the base tx charge plus L1 calldata charge) |
10 | Transaction is below the minimum required arbgas |
11 | Transaction set an arbgas price that was too low |
12 | Insufficient gas for retryable auto-redeem |
13 | Sender not permitted |
255 | Unknown failure |