eth_getProof(Alpha) - Scroll

Returns the account and storage values of the specified account including the Merkle-proof. This call can be used to verify that the data you are pulling from is not tampered with.

Parameters

  • DATA, 20 Bytes - Address of the account.
  • ARRAY, 32 Bytes - Array of storage-keys which should be proofed and included. See eth_getStorageAt
  • QUANTITY|TAG - Integer block number, or the string "latest" or "earliest", see the default block parameter

Returns

Object - A account object:

  • balance: QUANTITY - The balance of the account. See eth_getBalance
  • codeHash: DATA, 32 Bytes - Hash of the code of the account. For a simple Account without code it will return "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
  • nonce: QUANTITY - Nonce of the account. See eth_getTransactionCount``
  • storageHash: DATA, 32 Bytes - SHA3 of the StorageRoot. All storage will deliver a MerkleProof starting with this rootHash.
  • accountProof: ARRAY - Array of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.
  • storageProof: ARRAY - Array of storage-entries as requested. Each entry is a object with these properties:
    • key: QUANTITY - the requested storage key
    • value: QUANTITY - the storage value
    • proof: ARRAY - Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path.

Example

Request

curl --location --request POST 'https://scroll-alpha.unifra.io/v1/your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc":"2.0",
    "method":"eth_getProof",
    "params":["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"],"latest"],
    "id":1
}'

Result

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "address": "0x7f0d15c7faae65896648c8273b6d7e43f58fa842",
        "accountProof": [
            "0x0017655780ec76f68869242f6722b9081e37439ae84049876086c714da712038eb23548a7f3fa1bfe0f4f10a49380a048ba60f615ab0014768e227a72493750a11",
            "0x000e5de7e87a68d2a4b898b3ec0979dd89e16caddde4a18e87555aa2aa733b24501c736136fbf3aaf35f09dd6501afefc2786b2cef514533fb005401d3fc506d2e",
            "0x0008d0ecea20a0b8d7e79078d8fa77535835b77c437e4e0293735207f340e42cb6133efdcbc2da00300cfee58811150a3988d8d1423e1472d4ef3ceca6c356edd4",
            "0x0000000000000000000000000000000000000000000000000000000000000000002f9990be94bcb7bb9b04d3f2215789c7227094090d812b042b8118b23b795aed",
            "0x00094805538fb89f2a2b6dff402a60a4e3331e2bef144a469399f8ff67e8bb6c7304fc94e8930d44ca03ea09c767f304405d748df700acfb8ada44115f27b2d175",
            "0x0126f531eca46d2be0c8edc0b728ee4597303386c8e814a2b57e258e24cf942bfc04040000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000f78f6dd7a111b81ec0216fbb710e4db71e693c404fdd089e10ad9495835423c1b86fea9ea1a94c1ef664433f3b3dd3a3953cd3aeee7e3e56489a1a64c61406820cbc4965a800018172275afcc3378bd4f0e953673000000000000000000000000",
            "0x5448495320495320534f4d45204d4147494320425954455320464f5220534d54206d3172525867503278704449"
        ],
        "balance": "0x0",
        "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
        "nonce": "0x0",
        "storageHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "storageProof": [
            {
                "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                "value": "0x0",
                "proof": []
            }
        ]
    }
}

🚧

The below parameter inputs do not work, please reference the section above instead.

Language
Click Try It! to start a request and see the response here!