eth_getproof - Worldchain

Example code for the eth_getProof JSON-RPC method. Complete guide on how to use eth_getProof JSON-RPC in GetBlock Web3 documentation.

Returns the account and storage values of the specified account including the Merkle-proof on the World Chain network.

Parameters

Parameter
Type
Description

address

string

Address of the account

storageKeys

array

Array of storage keys to prove

blockNumber

string

Block number in hex, or "latest", "earliest", "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getProof",
    "params": ["0x1234567890123456789012345678901234567890", ["0x0"], "latest"],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "address": "0x1234567890123456789012345678901234567890",
        "accountProof": ["0x..."],
        "balance": "0x0",
        "codeHash": "0x...",
        "nonce": "0x0",
        "storageHash": "0x...",
        "storageProof": [...]
    }
}

Response Parameters

Field
Type
Description

address

string

Address of the account

accountProof

array

Array of RLP-serialized Merkle-Patricia proof nodes

balance

string

Balance of the account

storageProof

array

Array of storage proof objects

Use Case

The eth_getProof method on World Chain is typically used for:

  • State verification

  • Light client support

  • Cross-chain bridges

  • Proof generation

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

Web3 Integration

Last updated

Was this helpful?