Skip to content

Sovereign-Labs/storage-proof-verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

storage-proof-verifier

The tiny library verifies an ext_getStorageProof response against the reported Nomt state_root, checks that the opened key matches the requested (contract_address, slot) pair, and decodes the verified value as U256.

Library API

use alloy_primitives::{Address, U256};
use eth_proofs_minimal::{verify_storage_proof, GetProofResponse};

fn verify(
    address: Address,
    slot: U256,
    response: GetProofResponse,
) -> Result<U256, eth_proofs_minimal::ProofVerificationError> {
    verify_storage_proof(address, slot, response)
}

CLI Usage

The binary keeps the existing fetch-and-print behavior and is enabled by the default cli feature.

cargo run -- \
  --rpc-url http://localhost:12346/rpc \
  --contract-address 0x1234567890123456789012345678901234567890 \
  --slot 0

If you only want the library, disable default features:

cargo check --no-default-features --lib

Direct dependencies always used by the library:

  • sov-state
  • bcs
  • sha2
  • alloy-primitives
  • serde
  • thiserror

Binary-only direct dependencies behind the cli feature:

  • clap
  • jsonrpsee
  • tokio

About

A verifier for sov-evm storage proofs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages