🟪 Polygon
debug_storageRangeAt

debug_storageRangeAt

debug_storageRangeAt JSON-RPC Method returns the contract storage for the specified range on Polygon blockchain.

Parameters

  • block hash - Block hash.

  • txIndex - Integer of the transaction index position.

  • address - 20 Bytes- Address of the contract.

  • limit - The number of storage slots to return.

  • startKey - Storage key to start from. It's the starting point for the range of storage slots to return .

Need RPC API keys?

Get 12.5M archival requests for free today.

Returns

  • Storage - An object with hash values, and for each of them the key and value it represents.

    • hash - The hash value.

      • key - The storage slot key.

      • value - The storage slot value.


  • nextkey - The hash of next key if further storage in range. Otherwise, not included.

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your CHAINNODES.ORG Dashboard
  • You can use a different supported network by replacing polygon-mainnet
curl https://polygon-mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0xe9793319714333112d41473d33bc06556b6d32d347517b782eb1cdaec296a20b",5,"0xdAC17F958D2ee523a2206206994597C13D831ec7","0x00000000000000000000000000000000",2],"id":1}'

Body

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "storage": {
            "0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563": {
                "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
                "value": "0x000000000000000000000000c6cde7c39eb2f0f0095f41570af89efc2c1ea828"
            },
            "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6": {
                "key": "0x0000000000000000000000000000000000000000000000000000000000000001",
                "value": "0x000000000000000000000000000000000000000000000000007d5a864f06b2d5"
            }
        },
        "nextKey": "0x0000000000000000000000000000000000000000000000000000000000000007"
    }

💡 Confusing?

Ask our experienced blockchain developers in Telegram