Transaction Simulation
Overview
Section titled “Overview”Transaction simulation runs your call against the current chain state without submitting it. Use it to estimate gas, validate arguments, and preview failures before you sign and send a real transaction.
Simulation is especially important for sealed (private mempool) flows: you should simulate locally before sealing because validators can’t inspect sealed payloads.
CLI: Quick Simulation
Section titled “CLI: Quick Simulation”Simple call
Section titled “Simple call”# Simulate only (default)ashen call 0xCONTRACT transfer '["0xTO", 100]' --key $ASHEN_PRIVATE_KEYDetailed call (explicit contract + IDL)
Section titled “Detailed call (explicit contract + IDL)”ashen contract call \ --contract 0x1234... \ --method transfer \ --args '["0xTO", 100]' \ --idl ./token.idl \ --key $ASHEN_PRIVATE_KEYSubmit only after a successful simulation
Section titled “Submit only after a successful simulation”ashen contract call ... --waitForce submit even if simulation fails
Section titled “Force submit even if simulation fails”ashen contract call ... --force --waitRPC: Simulation Endpoints
Section titled “RPC: Simulation Endpoints”For programmatic use, the RPC provides dedicated simulation methods:
tx_simulate— simulate execution and estimate gastx_simulate_access— simulation + storage access listtx_simulate_trace— simulation with execution tracetx_simulate_pipeline— multi‑step pipeline (txs + view calls)tx_build_simulate— build + simulate in one call
See /reference/rpc-api/ for full request/response types.
Access Lists
Section titled “Access Lists”Access lists are hints for the VM to prefetch state and reduce cold storage
penalties. To generate a list automatically, use tx_simulate_access and attach
it to subsequent transactions.
Traces and Debugging
Section titled “Traces and Debugging”If you need deeper visibility, use tx_simulate_trace and inspect the execution
trace. This is useful for:
- pinpointing a failing opcode
- confirming storage keys touched
- evaluating gas hotspots
- Simulate with the same origin you’ll use in production.
- Use fresh state: simulations are only valid for the current head.
- Simulate before sealing: sealed txs can’t be inspected in the mempool.
Related
Section titled “Related”/guides/using-the-cli/for call command details/reference/rpc-api/for simulation endpoints/concepts/private-mempool/for sealed transaction behavior