40 of 40 mainnet replays matchSee the check

Transaction simulator for QIE

Shadowfork's own EVM runs on QIE mainnet state and answers debug_traceCall and eth_simulateV1, which QIE nodes refuse. Change one RPC URL.

Every call of a transaction you have not sent

Pick a call, and Shadowfork forks QIE at the latest block, runs it in its own EVM and returns the call tree, each token that moved and the gas QIE will bill.

Read how simulation works

What the endpoint adds to QIE RPC. Every other call goes straight to QIE.

Traces unsigned transactions

debug_traceCall returns the geth call tree, with logs per frame and a true state diff.

TStrace.ts TSclient.ts 1 change
const qie = createPublicClient({
  transport: http("localhost:8545"),
})
const tree = await qie.request({
  method: "debug_traceCall",
  params: [tx, "latest"],
})
Changed: the RPC URL. Nothing else.

Simulates a block of transactions

eth_simulateV1 chains calls and blocks, with balance and code overrides.

Simulated block 12,268,473
3 calls
  • Deposit 5 QIE into WQIE44,910 gas · 1 log
  • Transfer 2 WQIE51,209 gas · 1 log
  • Read the WQIE balancereturns 3 WQIE

Bills gas the way QIE does

QIE charges at least half the gas limit; the reply names a cheaper limit.

Gas QIE bills for this swaplimit 128,672
102,937was 250,000 at a 500,000 limit

Flags stale price reads

Every oracle read inside a call is listed with the price's age at that block.

  • QIE/USD read 28.7 hours oldThe calling contract accepted it
  • BTC/USD read 9 minutes oldWithin its usual 40 minute cycle
  • ETH/USD read 11 minutes oldWithin its usual 32 minute cycle

Checked against the QIE node, call by call

Shadowfork re-executes recent mainnet transactions on its own and compares every call frame with debug_traceTransaction: type, target, input, output, error, value and gas.

Read the verification method

40

of 40 mainnet transactions re-executed identically

89

call frames compared field by field

25

engine tests on recorded mainnet responses

135

of 150 recent transactions billed the half-limit floor

How QIE differs from the EVM tools expect

  • EVM rulesParis and PUSH0 only
  • Gas billedAt least half the gas limit
  • Tracer configA JSON string; withLog and diffMode ignored
  • Sender prestateReported before fees, nonce one low
  • eth_getLogs10,000 blocks a call
Read the QIE rules

Upgrade tests on real history

Point Shadowfork at a deployed contract and your new build. Each recent transaction runs twice from the same state, and any change in result, events or storage is listed.

A QUSDC build with a changed transferFrom broke a real QIEDEX swap.

Gas-limit failures are listed apart from behaviour changes.

EIP-1967 proxies are tested by swapping the implementation.

Read how regression works
QUSDC / v2 against 25 transactions
  • TRtransfer0x73407c…e117b2Identical52k
  • SWswapExactTokensForTokens0xe53a38…7d5862Now reverts0
  • APapprove0x337ca1…6bc19bQueued46k
  • RBrepayBorrow0xdcb516…04a85aQueued133k
  • BOborrow0x1eeb84…e57e2fQueued335k
  • SEswapExactETHForTokens0xce3f17…ee1da4Queued103k

Shadowfork in your workflow, in 3 steps

1

Run the simulator locally

No keys: it reads QIE's public archive nodes and fails over across five of them.

my-dappzsh
~/code/my-dapp$npx shadowfork verify
3 of 3 txs
0xee6ee0b2 swap7 framesmatch
0xf4e11f3f factory4 framesmatch
0x29d1f555 oracle2 framesmatch
3 of 3 identicalto the QIE node
~/code/my-dapp$
2

Point your tools at the simulator

Hardhat, Foundry, viem or a wallet: change the RPC URL to localhost:8545.

JShardhat.config.js
require("hardhat-shadowfork")
module.exports = {
  shadowfork: { rpc: "localhost:8545" },
}
3

Gate the upgrade in CI with the simulator

shadowfork regress exits with code 1 when a real transaction would behave differently.

YMLqie-gate.yml
- uses: shadowfork-qie@main
  with:
    regress-address: "0x3f43…5da5"
    regress-artifact: QUSDC.json

Questions

What developers ask before they point a wallet or a test suite at it.

HardhatHardhatshadowfork:preflight and shadowfork:regress tasks
Ethersethers and viemAny JSON-RPC client, by URL
MetaMaskMetaMaskAs a custom network RPC for chain 1990
GitHub ActionsGitHub ActionsPreflight, scan and regression as a CI gate

Does it send my transactions?

No. Simulation and tracing run in a local EVM. Calls Shadowfork does not answer itself are passed to QIE unchanged.

How do I know it matches QIE?

Run npx shadowfork verify. It replays recent mainnet transactions and diffs every call frame against the node.

Which transactions can it not simulate?

Ones that depend on Cosmos-side state such as staking and IBC, which the EVM cannot see. A cold call takes 2 to 5 seconds.

Can I host Shadowfork myself?

Yes. It is one Node process, MIT licensed, with a Dockerfile in the repository.