Skip to main content
EVM

eth_getProof

Summary: Get Merkle proof

This request returns the account information, storage values, and Merkle proof for a given account (and, optionally, storage values for given storage keys), supporting data verification.

Parameters

address string
required

A string identifier for the contract or EOA address (20 bytes).

Pattern: ^0x[0-9a-fA-F]{40}$


storageKeys array
required

Storage keys may be specified to retrieve the storage proofs for particular slots in a smart contract's storage. If not required, pass empty array.

string

32 Hex-encoded bytes.

Pattern: ^0x[0-9a-f]{0,64}$


block anyOf
required

Block number, block hash, or string tag.

Block number string

Block number in hexadecimal.

Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$

Block tag enum

See the default block parameter.

  • earliest: The lowest numbered block the client has available.
  • latest: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
  • pending: A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool.

Enum:
"earliest"
"latest"
"pending"
Block hash string

32 byte hex value.

Pattern: ^0x[0-9a-f]{64}$

Returns

Account proof object returned for the given account.
eth_getProofResponse object
required

Account proof.

address string

The account address for which the Merkle proof is retrieved. This is an echo of the address passed in the request.

Pattern: ^0x[0-9a-fA-F]{40}$

accountProof array

An array of RLP-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the address as key.

string

Hex-encoded bytes.

Pattern: ^0x[0-9a-f]*$

balance string

Hexadecimal of the balance in wei.

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$

codeHash string

The 32-byte hash of the account's code. For EOAs, this will be the hash of an empty string. For contract accounts, it represents the hash of the deployed contract code.

Pattern: ^0x[0-9a-f]{64}$

nonce string

Account nonce; counter for the number of transactions sent from the account.

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$

storageHash string

32-byte SHA3 hash of the storage root. All storage will deliver a Merkle proof starting with this root hash.

Pattern: ^0x[0-9a-f]{64}$

storageProof array

An array of requested storage-entries.

object
required

key string

The requested storage key.

Pattern: ^0x[0-9a-f]{0,64}$

value string

The storage value.

Pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$

proof array

An array of RLP-serialized MerkleTree-Nodes, starting with the storageHash node and following the path of the key.

string

Hex-encoded bytes.

Pattern: ^0x[0-9a-f]*$

Customize request
Parameter
Value
string
[ "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" ]
array
latest
anyOf
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getProof",
"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"],"latest"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"result": {
"accountProof": [
"0xf90211a0d2055f3da7451f06ac53b35d3729fc8192382d0915736424665a83c6741df4ea...",
"0xf90211a08240dd659347a41078eed3c036d4ee577051cde7ce63942d755d9d8e795cfcc...",
"0xf90211a0229a27809010e39babd9e7ffe7a95d92309ed0996c8c1c6954b5d439d817e82...",
"0xf90211a0d99442fec74394991d81a27b2433979f4650aee6e21d3166a3d1a06e16cc7f7...",
"0xf90211a08f7ed368618eab7a47c550034fef18c54ad2b5ffc9fe7b1d5955a45d2f51e91...",
"0xf89180808080808080a05f1b4688b8385116ef65b021e0193fa11244005696c25de336f...",
"0xf86d9e20b884b45d46839a7e66ba35c504168d404ae8e87a72077873d13b7403b8b84cf..."
],
"address": "0x7f0d15c7faae65896648c8273b6d7e43f58fa842",
"balance": "0x0",
"codeHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0",
"storageHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"storageProof": [
{
"key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"proof": [],
"value": "0x0"
}
]
}
}
}