eth_getProof - Mantle

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

This method returns the account and storage values of the specified account including the Merkle proof. This is useful for verifying state without trusting the RPC provider.

Parameters

Parameter
Type
Description

address

string

The address of the account

storageKeys

array

Array of storage keys to prove

blockNumber

string

Block number (hex) or tag

Request

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

Response

Response Parameters

Field
Type
Description

address

string

The address of the account

accountProof

array

Array of RLP-serialized Merkle proof nodes

balance

string

Account balance in wei (hex)

codeHash

string

Hash of the account code

nonce

string

Account nonce (hex)

storageHash

string

Storage root hash

storageProof

array

Array of storage proofs

Use Case

The eth_getProof method is essential for:

  • Light client verification

  • Trustless state validation

  • Cross-chain bridges

  • State proof verification

  • Decentralized applications requiring proof

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

-32602

Invalid params

Invalid address or storage keys

Web3 Integration

Last updated

Was this helpful?