🟪 Polygon
eth_getProof

eth_getProof RPC Method

The eth_getProof is used to retrieve the account and storage values with a Merkle proof for a specific account at a specific block. The Merkle proof contains a set of intermediate hashes that can be used to verify that a specific account exists on the Ethereum blockchain at a specific block, and that the account has a specific state (i.e., a specific balance or nonce value).

Parameters

  • address - String - The address of the account to retrieve the Merkle proof for.

  • storageKeys - Array [Strings] - An array of storage keys to retrieve the values for. Each storage key should be a string that represents the position of the storage value within the account's storage trie.

  • blockNumber - Block number as hexadecimal or Tag (String) "latest", "earliest""pending".

Returns

  • address - String - The address of the account that the proof is for.

  • accountProof - Array - An array of rlp-serialized MerkleTree-Nodes which starts with the stateRoot-Node and follows the path of the SHA3 address as key.

  • balance - The current balance of the account in wei.

  • codeHash - 32 Bytes - A hash of the code of the account.

  • nonce - Nonce value of the account.

  • storageProof - Array of storage-entries. Each entry has these properties:

    • key - The requested storage key
    • value - The storage value.
    • proof - Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path.

Request

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

Example

💡 Confusing?

Ask our experienced blockchain developers in Telegram

  • 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":"eth_getProof","params": ["0xdAC17F958D2ee523a2206206994597C13D831ec7",["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000001"], "latest"],"id":1}'

Body

{
   "jsonrpc": "2.0",
   "id": 1,
   "result":  {
        "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
        "accountProof": [
            
"0xf90211a0ed6a0e7d249fda3ed529938af225d820526cd463ef9b5c860eb5cbed03aa19e8a006312914894f2018433e3cc378faeb897ce8664037051c71fcae0aa8c8be7933a090ab78e634e8af494cdea3b47ede17278dc4f3d3b26a476632ead89e384d1b65a0385de683440a2e313a2f2d7dcfc06717b6b626e70afecd2d329b3de9effa904aa096e938f104e35e2757ea0c11a0028b742d30fd2157eef6cfe44c9496c81a86cea040bf16c57f874a5c2393ed545c6f17a49db3a29dc2509251f2ef9e994e98c7f1a0bb4f2dc89acc47f1de4034840b1fd143116a0f98813d8b9df3572129923b07e6a091dbb2cd0d116d0c693b5268a12178d87a2d6dc230343e21bf14fac7d14ffe1ea06517f6f06e00bbba9343bbf35b0e95fb4ca11f1f7d17f906cfce7cd9b27be7e3a05cf447a12bd147d23dc100cdca652384b2c2a70c9cb69a3d8a8769d7f82077c2a038b6df684e43976d20fc4bca1e0ee64d67cc4f28a3e8e51e77a08e51b8034e88a0b0a2127a5bdf0cd7b21d7b0f55498cdb283a91641991e8f79ed1464af3586ef4a0c50e041af2b5063829a9b49e6f8440413f7fd61f8f85d46847ba474e237ea082a0b6608448062e1b4526259de427fd2518dc35e745df48862ebaeeef9c51e608e0a0b2821d74dfa56591ce8a8648e1e38ad4a825fa4bd42fd0ba9535585e6fb1088da0ea7217fe691b0c158a7163c975be76eb96f5fcaceb44fb5660aa792468a5ab1680",
            
"0xf90211a0c82406a7e9d0600af97c55c7e6a4515cfbb6b639c177cac0a417f65642f46077a02ac43dd73b0204f39480adea43ac794ab7bd2d9f473e96ecb0f9136dd81a19e9a0fbc4143b606de07dddf2185fa7553427e254562b5b1ccce9d57a6030f1466dcca0e50dde4c2b6553d2959e4fafac2783163f852ee1a1e85167d204900db84a7321a0eb19fe036396c9c9898d32d320e5673a408043cf3d9ed513d9318c0f75f353e3a025dbc553577191204f90c2c7465881832c920bbf9ec3bae73064c9dbc72bae7da0c7834f077adbdd928f2ebb7674a97dc253bc436a564befda5d69f603586d71d2a029105b431a4243cd7c709754c1ede2c8c262efc852b62a09176c3955a00d7af6a06e233b83b16103672f02a22fe334fa06f98fbb35c9e91101e6a3ac46a902cfe0a00d3fabbcbb65c526ad843401ec5160237d9914ee44cb58cb9234093e5be9944ca028438071f0ea37a15f4275dc9eef1fa40593255c4fc827bfa7909fd503d642dca0d151e74e3af367322aa448fcca1e3ad4a6385a6f70d7662845333d3659dbbac5a06fd4be66bdfe0f30d8abe97935e6bfc825bb93445801a2a987c305d2ca0d17caa0c72a1d7d8c0685f9a48b2e1a59a0fbe992b69b474d40314bee9182b11f7c8f72a04a7829fdc6a5c4e97404a08f00ef300e227254c09a8f24f70099f5b89ae72e0ca0f7a4dd156f3648d97cf8c1be8a59f72ae5586bd6a412673a3f5d3efbbe2e251280",
            
"0xf90211a0eefb58e1d22af453763a4ebd44ad7f15188d461d5d06edc6238a66d06359cac7a0371175f5f24f74b62c3b441940338c53f83621ae935a130389383ba2939ba359a08cb2830822e7fd78fd698da54d827dfba34b9e87a3ee5f38ceef4825a71fee6ba00d1b4946e5aa78a50d5bbecb93c33ee359d63c484b699a7e8467a0fc98673d66a0f4cb1808cc270f1b0dc4de1b6f87bff5ff0d2aeda8c353cc35bdef54d3c59cbfa09ccf336b84b89bac4385a3fcc6c8f994ce62d9e1bc66bffec79bf569cf63ae6fa0b0d15e425713611f022225975a4d3fcde4226c84033196322664c80da18c76c7a0919b23e3f8d44105c8afde2e82e645bd17676dea64dfd65b2cd1046a882c59a1a0733fed7094ccfd33ee02413e8f7abb38cbc819f3aed97aa0d4592420d051bc97a0e6b083925e463286a159af58c0c6752700445112ed45a68d123085abd550a799a01117ab1cd58216f2e873b5a5b530ef1f9e8f8f6ca39e1a61235da770a87c2b89a054e3627093aad42830f9fcea18531f98eeeb1b120924b8257ef49d30ad4cb138a0a7910f19d8e09bd5e0c05445ee562b3ab150d7ac2fa1607db901cb7d92e125eba0d14ec3ec5687e86b82e843b077ce5637b9b8c3c99a0fe500c595c80a8607e7c9a05981899a565463c56f7354190fedf5974c40520432eccb626c52d9934703e43ca09f610191a3caa0c002b6dd603fd3127238288e0d17a50ba0efaa44e3eb366fb180",
            
"0xf90211a0f74ae0aec786499e9ed74ebfd1201d18047fcfecf8ea9444a844c386bd1c755ca0628420712369834205a8c9aa72d4d21ff29895d232353a9ccd06b8a90e4e9de5a0a33a2ac95fb04730108266d1fddce8e12af35987f7bab792a9819efe4b90aea4a0fbcceaa6ee60bf636342e198d1e9468ce7ed797a5e0e2175b5e2067e9d6286d1a0d23b528d64d9ad8ca4850286de80c100ea05c6b1ffaf5406760cb92b2c7b9fc6a02b5d8b44d8255d8ff0bfdc67d49afcd4c1f3a18a9a914dc0a8c5645052a20616a095ea0461791e77e04b1b8ce54b4667f7af600ecad5c3ee5c4a368c28527f0790a04db095cf64ac9a862a08b528b0fa256f7bc319f44e1c97ca6d4a19ca0099ce63a054a352e85a65c3a527fc2de8e645372c1e859e043c3498575b26342ba1330a06a0a36c337c6813e0116e363f2c05aaef6b42020ee5fd41ce4bc6c755dd24bd6b02a00b2771cc605f86719b5b58402ba0900d3eb0d138da21a2dc774efddd6ed78efea0e653474de4b98e1e6c374cbb94d1a5d6fa305852344b4218a719bff74e5adfaca0ef8e8a9995eaaae8d092cdd116e19cd216055a1da11b78cb8b10ff9e6d1dadf2a09de9e25044a579d058d1855660f627874f3a4e924051cd3f10d038a587b99bd8a0fc30d7fd65e5b475f53d7d92a8507291ff780eb986c353c3736c26ff0e167c33a0fb93a20eae66899ab6179b111c8dd3bd49e64eb6d3f63aae09fc5f4101a0ce1880",
            
"0xf90211a092514ec643f2f88209b32ff18eeb00c908da2e94813735b927c06dc2a81da7efa0e2a1cbffa5d7be70f975f0c33ae06c540d7270076f58694a2052fac5a1e4ad38a03e79471a1f50f080458f41ace255c1c33407443f0b86bec5f4da057ded3bef4ea0a81b74151025c8a2e20aec5fbff7f53e0c63ab7c005a12efb4b32621a27ebc34a01db8683910e46e56e8afeb9fe2b7c35382e5a0914d7b0dd8f0e8cb9981ba7435a08e1ab26e7fb36592ff8f948a56205acfbc465dba3962dc3f1d0a360eee775ae0a0ee478e420d83f413e8568dacfd5d83f83a5dd7c45f494b504828e5dc962f0e3ea05541f0fb06a9529fc7635e6d71a7d340e18e24fc01bb3c6ab34da11d9f62a2aca0731decd628e74476bc4418e39b629e0f66fbec2a62c7725ffd7d864ff53a0a94a041223ce8926d5da897a6e7823addfde3146effc6670f378d392fc7ba021ef254a01e64297f304380363cd788c96dca51a3b419e83c7d1f7d436eee02355c3bbb63a0980433b1f90bd1978d08c66f09aa3291027c900609341098449ebcd670940a91a0267509432c5a4b29d9ae9cd6ea225b85f3350d4983d0d2a3b52d977380532f70a055eb52c802fbc0af9006d47768478d27332b57299e3fa62f6dc1219b47384658a0fc8efc4484dcf0a54f0574de9aaade0dcff6ec3599edb9f82efb26b6566dcaeaa0d41b761eec1073e3d3f85329876db7a931a4db21bb665847e7a300839bf4c92180",
            
"0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a07f57b3747ebb4e7f9de0cbadd1283e158f8dd4c8221505383958083e4e633a5fa095ab154709b0f15f47c6c612f901c881b5d52c49a7b195d109847c803d6e05eda070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280",
            
"0xf90191a0f0c5b800b542001597f2b7a8e106ac0e2849d2cc1df1727ac35c4ea3965f1c9180a08537f2e248702a6ae2a57e9110a5740f5772c876389739ac90debd6a0692713ea00b3a26a05b5494fb3ff6f0b3897688a5581066b20b07ebab9252d169d928717fa0a9a54d84976d134d6dba06a65064c7f3a964a75947d452db6f6bb4b6c47b43aaa01e2a1ed3d1572b872bbf09ee44d2ed737da31f01de3c0f4b4e1f046740066461a076f251d160b9a02eb0b5c1d83b61c9cdd4f37361705e79a45529bf49801fb824a0774a01a624cb14a50d17f2fe4b7ae6af8a67bbb029177ccc3dd729a734484d3ea0763f104ea759b298cd4bd67c101898908d23987d67e9b125fa3817b16792d08ba0c8d71dd13d2806e2865a5c2cfa447f626471bf0b66182a8fd07230434e1cad2680a0e9864fdfaf3693b2602f56cd938ccd494b8634b1f91800ef02203a3609ca4c21a0c69d174ad6b6e58b0bd05914352839ec60915cd066dd2bee2a48016139687f21a0513dd5514fd6bad56871711441d38de2821cc6913cb192416b0385f025650731808080",
            "0xf8669d3802a763f7db875346d03fbf86f137de55814b191c069e721f47474733b846f8440101a0637a858867dbc95ce1a0bc3cb3161f0a6dfe4f286930f1e3e7456f671c4d36b4a0b44fb4e949d0f78f87f79ee46428f23a2a5713ce6fc6e0beb3dda78c2ac1ea55"
        ],
        "balance": "0x1",
        "codeHash": "0xb44fb4e949d0f78f87f79ee46428f23a2a5713ce6fc6e0beb3dda78c2ac1ea55",
        "nonce": "0x1",
        "storageHash": "0x637a858867dbc95ce1a0bc3cb3161f0a6dfe4f286930f1e3e7456f671c4d36b4",
        ......
}

Need RPC API keys?

Get 12.5M archival requests for free today.

JSON-RPC Polygon API Documentation by CHAINNODES is based on Erigon node client. Contact us if you are interested in specific methods that are only available on geth, besu, Nethermind or reth