verification
use it
# add to stunt.yaml
services:
eth-jsonrpc:
adapter: embedded:eth-jsonrpc-style
# then
$ stunt upThe embedded: source extracts this adapter from the binary — no git clone, fully offline.
how to mock the Ethereum JSON-RPC API locally
Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Ethereum JSON-RPC. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Ethereum JSON-RPC 1.0 surface — the data is fake, the behavior is real.
backing stores
transactionsreceiptslogsblocks
api surface (1)
generated from the adapter manifest — exactly what boots, nothing more
1 routes
POST/
SDK-verified behaviors (5)
- ✓ethclient.ChainID + BlockNumber
- ✓BalanceAt decodes seeded hex-quantity wei
- ✓CodeAt returns empty (no EVM execution)
- ✓HeaderByNumber returns the genesis header
- ✓PendingNonceAt for an untouched account
Not implemented (5)
- No EVM execution — eth_getCode always 0x, contracts never run
- No eth_getStorageAt, eth_getTransactionByBlock*, or uncle methods
- No debug/trace namespaces (debug_traceTransaction, trace_transaction)
- No eth_maxPriorityFeePerGas or eth_blobBaseFee methods
- No WebSocket subscriptions (eth_subscribe); HTTP POST / only
Differs from the real API (4)
- eth_estimateGas fixed at 0x5208 (21000); eth_gasPrice fixed at 1 Gwei
- Tx hashes derive from a pseudo-keccak, not real keccak256
- Mining delay fixed at 3s; blockNumber advances one block per sent tx
- eth_sendRawTransaction accepts simulator-only {simulate_fail: true} for a revert
want more of the Ethereum JSON-RPC surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.