Repository navigation
First release of evm-state-diff on crates.io. API documentation is on docs.rs.
evm-state-diff shows exactly what an Ethereum transaction, block or range of blocks changed in state: balances, nonces, code and storage slots. It reads geth's prestateTracer in diff mode and turns its compact encoding into explicit before → after values.
cargo install evm-state-diff
evm-state-diff tx <hash> --rpc $ETH_RPC_URLPrebuilt binaries for Linux, macOS and Windows are attached below, each with a SHA-256 checksum.
Highlights
- Commands:
tx,block,rangeandfile(or stdin). - Net diffs: diffs for a block or a range of blocks, where intermediate writes that cancel out disappear.
- Filters: by account, change kind (
balance,nonce,code,storage), storage slot and minimum balance delta. - Output: text, JSON, NDJSON or CSV, with exact decimal wei and full 32-byte words.
- Hosted providers: retries on 429/5xx and connection errors, and
-Hheaders for API keys. - Library features:
default-features = falsekeeps dependencies toserde,serde_jsonandthiserror;rpcadds the client andcliadds the binary.
Verified against
- A live
geth --devnode: every reported change is checked againsteth_getBalance,eth_getTransactionCount,eth_getCodeandeth_getStorageAtbefore and after each transaction, block and range. - Property tests that replay random state transitions through geth's diff encoding.
- Golden outputs from recorded traces.
Full changes: CHANGELOG.md