address
— the address of the smart contract to query
quantity
— the index of the storage position to retrieve the data from
quantity or tag
— the integer of a block encoded as hexadecimal or the string with:
latest
— the most recent block in the blockchain and the current state of the blockchain at the most recent block. A chain reorganization is to be expected.safe
— the block that received justification from the beacon chain. Although this block could be involved in a chain reorganization, it would necessitate either a coordinated attack by the majority of validators or an instance of severe propagation latency.finalized
— the block accepted as canonical by more than 2/3 of the validators. A chain reorganization is extremely unlikely, and it would require at least 1/3 of the staked amount to be burned.earliest
— the earliest available or genesis block.pending
— the pending state and transactions block. The current state of transactions that have been broadcast to the network but have not yet been included in a block.data
— the data stored in the storage slot. Returned as a hexadecimal string.
eth_getStorageAt
code examples0
from the CAKE Token on the BNB mainnet. In this case, this is the address owning the smart contract.
This method can retrieve the different storage values in time by querying different blocks in the past. Note that to query a state in the past, you need an archive node.
HEX String
starting with 0x
to identify the block if you want to use a hex integer block number as a parameter.14000000
will be 0xD59F80
. Use the Chainstack EVM Knife to make those conversions.eth_getStorageAt
is analyzing how the value stored at a specific storage slot of a smart contract changes over time. For example, a developer may want to track the change in a specific variable of a smart contract, such as the total supply of a token, and perform some analysis on it.The value stored at the specified position.
The response is of type object
.