After API request has finished, you can access the data on-chain using Satellite contract.
headerField(uint256 chainId, uint256 blockNumber, BlockHeaderField field) returns (bytes32)
headerFieldSafe(uint256 chainId, uint256 blockNumber, BlockHeaderField field) returns (bool, bytes32)
BlockHeaderField
is an enum with following values:
PARENT_HASH
(0)OMMERS_HASH
(1)BENEFICIARY
(2)STATE_ROOT
(3)TRANSACTIONS_ROOT
(4)RECEIPTS_ROOT
(5)DIFFICULTY
(7)GAS_LIMIT
(9)GAS_USED
(10)TIMESTAMP
(11)EXTRA_DATA
(12)MIX_HASH
(13)NONCE
(14)LOGS_BLOOM
(6) is currently not supported. NUMBER
(8) is not stored and cannot be accessed, because all block data is accessed via its number, so there is no need to store or access it.
accountField(uint256 chainId, uint256 blockNumber, address account, AccountField field) returns (bytes32)
accountFieldSafe(uint256 chainId, uint256 blockNumber, address account, AccountField field) returns (bool, bytes32)
AccountField
is an enum with following values:
NONCE
(0)BALANCE
(1)STORAGE_ROOT
(2)CODE_HASH
(3)APE_FLAGS
(4)APE_FIXED
(5)APE_SHARES
(6)APE_DEBT
(7)APE_DELEGATE
(8)timestamp(uint256 chainId, uint256 timestamp) returns (uint256)
timestampSafe(uint256 chainId, uint256 timestamp) returns (bool, uint256)
storageSlotSafe(uint256 chainId, uint256 blockNumber, address account, bytes32 slot) returns (bool, bytes32)
storageSlot(uint256 chainId, uint256 blockNumber, address account, bytes32 slot) returns (bytes32)
Safe
suffix return (bool, bytes32)
tuple, where first value is true
if the data was found and false
otherwise. Functions that do not end with Safe
suffix return bytes32
value and revert if the data was not found.
getApechainSharePriceSafe(uint256 chainId, uint256 blockNumber) returns (bool, uint256)
getApechainSharePrice(uint256 chainId, uint256 blockNumber) returns (uint256)