eth_getStorageAt
Get the value from a storage position at a given address on Avalanche C-Chain.
Parameters
DATA
, 20 Bytes - address of the storageQUANTITY
- integer of the position in the storageQUANTITY|TAG
- integer block number, or the string "latest", "earliest" or "pending"
{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": [
"0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86",
"0x0",
"latest"
],
"id": 1
}
Returns
DATA
- The value at this storage position.
Implementation Example
- cURL
- JavaScript
curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": [
"0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86",
"0x0",
"latest"
],
"id": 1
}'
const response = await fetch('https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_getStorageAt',
params: [
'0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86',
'0x0',
'latest'
],
id: 1
})
});
const data = await response.json();
console.log(data.result);
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
Note: Storage slots are 32 bytes (256 bits) each and are returned as hex-encoded strings.
Need help? Contact our support team or check the Avalanche documentation.