Skip to main content

ArbSys

ArbSys#

Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064. Exposes a variety of system-level functionality. ArbSys provides systems functionality useful to some Arbitrum contracts. Any contract running on an Arbitrum Chain can call the chain's ArbSys.

Functions#

arbOSVersion() โ†’ uint256 (external)

Get internal version number identifying an ArbOS build

arbChainID() โ†’ uint256 (external)
arbBlockNumber() โ†’ uint256 (external)

Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0)

withdrawEth(address destination) โ†’ uint256 (external)

Send given amount of Eth to dest from sender. This is a convenience function, which is equivalent to calling sendTxToL1 with empty calldataForL1.

Parameters:#

  • destination: recipient address on L1
sendTxToL1(address destination, bytes calldataForL1) โ†’ uint256 (external)

Send a transaction to L1

Parameters:#

  • destination: recipient address on L1
  • calldataForL1: (optional) calldata for L1 contract call
getTransactionCount(address account) โ†’ uint256 (external)

get the number of transactions issued by the given external account or the account sequence number of the given contract

Parameters:#

  • account: target account
getStorageAt(address account, uint256 index) โ†’ uint256 (external)

get the value of target L2 storage slot This function is only callable from address 0 to prevent contracts from being able to call it

Parameters:#

  • account: target account
  • index: target index of storage slot
isTopLevelCall() โ†’ bool (external)

check if current call is coming from l1

Events#

EthWithdrawal(address destAddr, uint256 amount)
L2ToL1Transaction(address caller, address destination, uint256 uniqueId, uint256 batchNumber, uint256 indexInBatch, uint256 arbBlockNum, uint256 ethBlockNum, uint256 timestamp, uint256 callvalue, bytes data)