ZK proof generator for smart contract state verification on EVM-compatible blockchains.
ProofSmith fetches on-chain contract state at a specific block and generates a cryptographically verifiable proof bundle. The bundle includes:
- State hash — SHA-256 commitment over balance, nonce, code, and storage
- Merkle tree — built from storage slot proofs for selective verification
- Storage proofs — EIP-1186
eth_getProofresponses for requested slots - State transition verification — compare two proof bundles to verify legitimate transitions
cargo build --releaseproofsmith \
--contract 0xContractAddress \
--rpc https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY \
--block 18000000 \
--output proof.json \
--slots 0x0,0x1,0x2| Flag | Description |
|---|---|
--contract |
Contract address to generate proof for |
--rpc |
Ethereum JSON-RPC endpoint URL |
--block |
Block number to snapshot state at |
--output |
Output path for the JSON proof bundle |
--slots |
Comma-separated storage slot indices (default: 0x0–0x3) |
The proof bundle is a JSON file containing:
{
"contract": "0x...",
"block_number": 18000000,
"block_hash": "0x...",
"state_hash": "0x...",
"code_hash": "0x...",
"balance": "1000000000000000000",
"nonce": 42,
"storage_proofs": [...],
"merkle_root": "0x..."
}cargo testMIT