Polygon API Documentation
bor_getSnapshotAtHash RPC Method
The bor_getSnapshotAtHash
retrieves the state snapshot at a given block.
Returns
The bor_getSnapshotAtHash
returns the state snapshot including hashes and signer public keys. See a result example further 👇
Parameters
block hash
- string - The hash of the hash.
🔌 To use bor_getSnapshotAtHash
you must be connected to a blockchain node.
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 '{"id": "1", "jsonrpc":"2.0","method":"bor_getSnapshotAtHash","params": ["0x65d37fa0dde0bd41ce13b6ba1d564e3be8fca8dba0274afb23f3088926a04194"]}'
Body
{"jsonrpc":"2.0",
"id":"1",
"result": {"recents":
{"38189004":"0x794e44d1334a56fea7f4df12633b88820d0c5888",
"38189012":"0x794e44d1334a56fea7f4df12633b88820d0c5888",
"38188995":"0x794e44d1334a56fea7f4df12633b88820d0c5888",
"38188996":"0x794e44d1334a56fea7f4df12633b88820d0c5888",
.......
"47999987":"0x46a3a41bd932244dd08186e4c19f1a7e48cbcdf4"},
"validatorSet":
{"proposer":{"accum":-23,"ID":0,"signer":"0x7c7379531b2aee82e4ca06d4175d13b9cbeafd49","power":2},
"validators":[{"ID":0,"accum":-9,"signer":"0x0208652a93baf5f1962849efcf5795eac7439a5e","power":1},
{"ID":0,"accum":-9,"signer":"0x048cfedf907c4c9ddd11ff882380906e78e84bbe","power":1},
{"ID":0,"accum":1,"signer":"0x09385a960a2e0b6b4516d341534da92cb2a50085","power":2},
{"accum":4,"ID":0,"signer":"0x127685d6dd6683085da4b6a041efcef1681e5c9c","power":4},
{"accum":26,"ID":0,"signer":"0x1efecb61a2f80aa34d3b9218b564a64d05946290","power":2},
{"ID":0,"accum":-16,"signer":"0x26c80cc193b27d73d2c40943acec77f4da2c5bd8","power":2},
{"ID":0,"accum":16,"signer":"0x40314efbc35bc0db441969bce451bf0167efded1","power":1},
{"accum":-22,"ID":0,"signer":"0x46a3a41bd932244dd08186e4c19f1a7e48cbcdf4","power":1},
{"accum":26,"ID":0,"signer":"0x67b94473d81d0cd00849d563c94d0432ac988b49","power":5},
.....
{"ID":0,"accum":16,"signer":"0xf0245f6251bef9447a08766b9da2b07b28ad80b0","power":1}]},
"hash":"0x65d37fa0dde0bd41ce13b6ba1d564e3be8fca8dba0274afb23f3088926a04194","number":48000000}}
💡 Confusing?
Ask our experienced blockchain developers in Telegram
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