Skip to main content

Usage

dokrypt replay tx <tx-hash> [flags]
dokrypt replay block <block-number> [flags]
dokrypt replay trace <tx-hash> [flags]

Subcommands

replay tx

Fetch a transaction from a live network, fork the chain at that block, and re-execute it locally. Shows transaction details, gas comparison, revert reasons, and optional execution trace.
dokrypt replay tx 0xabc123... --network arbitrum
dokrypt replay tx 0xabc123... --network mainnet --verbose
FlagDefaultDescription
--networkmainnetSource network to fetch tx from
--chainTarget local chain
--blockCustom fork block (default: one block before tx)
--verbosefalseShow full execution trace
Output includes:
  • Transaction details (from, to, value, gas, method selector)
  • Transaction status (success/reverted)
  • Event count
  • Gas comparison (original vs replayed)
  • Revert reason (if applicable)

replay block

List all transactions in a specific block from a live network.
dokrypt replay block 200000000 --network arbitrum
dokrypt replay block 19000000 --network mainnet --limit 20
FlagDefaultDescription
--networkmainnetSource network
--chainTarget local chain
--limit50Max transactions to display

replay trace

Get a detailed execution trace of a transaction showing all internal calls.
dokrypt replay trace 0xabc123... --network arbitrum
FlagDefaultDescription
--networkmainnetSource network
--chainTarget local chain for tracing
The trace shows nested call hierarchy with:
  • Call type (CALL, DELEGATECALL, STATICCALL, CREATE)
  • From/to addresses
  • Method selectors
  • ETH value transferred
  • Gas used per call
  • Revert reasons for failed calls

Supported Networks

All networks from dokrypt fork are supported:
NetworkRPC
mainnet / ethereumeth.llamarpc.com
arbitrumarb1.arbitrum.io/rpc
polygonpolygon-rpc.com
optimismmainnet.optimism.io
basemainnet.base.org
sepoliarpc.sepolia.org
bscbsc-dataseed.binance.org
avalancheapi.avax.network
You can also pass a custom RPC URL directly.

Examples

Debug a reverted transaction on Arbitrum:
dokrypt replay tx 0xfailed... --network arbitrum --verbose
Inspect a block on Ethereum:
dokrypt replay block 19500000 --network mainnet
Trace internal calls of a DeFi transaction:
dokrypt replay trace 0xswap... --network arbitrum