Explore all of the system contracts that Abstract implements.
AccountCodeStorage
contract is responsible for storing the code hashes of accounts for retrieval
whenever the VM accesses an address
.
The address is looked up in the AccountCodeStorage
contract, if the associated value is non-zero (i.e. the address has code stored), this code hash
is used by the VM for the account.
Contract Address: 0x0000000000000000000000000000000000008002
0x000000000000000000000000000000000000800c
upgrade
, which executes an upgrade of the L2
by delegating calls to another contract.
Contract Address: 0x000000000000000000000000000000000000800f
0x000000000000000000000000000000000000800e
MAX_NUMBER_OF_BLOBS
, CREATE2_PREFIX
, etc.0x0000000000000000000000000000000000008006
create2
and create2Account
, which both
call a third function, _relayCall
that relays the calldata to the
ContractDeployer contract.
You do not need to use this system contract directly, instead use ContractDeployer.
Contract Address: 0x0000000000000000000000000000000000010000
DefaultAccount
contract is used when the sender of a transaction is looked up and
no code is found for the address; indicating that the address of the sender is an EOA as opposed to
a smart contract wallet.
0
address. In addition, the
bootloader also needs to be
callable so that users can transfer ETH to it.
For these contracts, the EmptyContract code is inserted upon .
It is essentially a noop code, which does nothing and returns success=1
.
Contract Address: 0x0000000000000000000000000000000000000000
emit
keyword can be used.
Contract Address: 0x000000000000000000000000000000000000800d
0x0000000000000000000000000000000000008005
KnownCodesStorage
contract to see if the
code hash of a smart contract is known before deploying it. If it is not known,
the contract will not be deployed and revert with an error The code hash is not known
.
Why am I getting "the code hash is not known" error?
0x0000000000000000000000000000000000008004
0x0000000000000000000000000000000000008008
msg.value
behavior of Ethereum.
This is because the L2 does not have a set “native” token unlike Ethereum,
so functions such as transferFromTo
, balanceOf
, mint
, withdraw
, etc. are
implemented in this contract as if it were an ERC-20.
Contract Address: 0x000000000000000000000000000000000000800a
transferFromTo
function to
simulate the msg.value
behavior of Ethereum.
Contract Address: 0x0000000000000000000000000000000000008009
NonceHolder
to ensure
that the provided nonce for the transaction has not already been used by the sender.
During the transaction validation,
it also enforces that the nonce is set as used before the transaction execution begins.
See more details in the nonces section.
Contract Address: 0x0000000000000000000000000000000000008003
0x0000000000000000000000000000000000008011
chainId
, gasPrice
, baseFee
, as well as system functions
such as setL2Block
and setNewBatch
are stored in this contract.
Contract Address: 0x000000000000000000000000000000000000800b