Virtual TestNets are live! ⚡️ Test and stage dapps on real-time production data.
Get started →

All Products

Virtual TestNets
Simulate Transactions

Simulate Transactions on TestNets

Transaction simulations are supported on Virtual TestNets. You can simulate transactions form the Dashboard UI or programmatically using RPC.

Simulate from the Dashboard

To simulate a transaction from the Dashboard, go to Virtual TestNets and click Simulate from the left-hand menu. Simulated transactions are visible only within the TestNet dashboard and won’t be visible in the Public Explorer. You can use the Simulator in the following ways:

  • Debug smart contracts errors, using Edit Source to check your bugfix.
  • Call contracts to get a sense of states without persisting transactions to the network.
  • Set up desired contract states using State Overrides, to evaluate the execution under conditions that aren’t and shouldn’t be present on the chain.
  • Build proof of concept transactions to validate testing scenarios.

Simulate via RPC

Transactions on TestNets can also be simulated using our the RPC methods tenderly_simulate and tenderly_simulateBundle.

The example code below runs a simulation that uses state overrides to mint DAI.

  • Sender address: 0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2.
  • DAI contract address: 0x6b175474e89094c44da98b954eedeac495271d0f
  • State override arguments: DAI(0x6b175474e89094c44da98b954eedeac495271d0f).wards[0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2] = 1

Explore this guide to learn more about simulating with state overrides.

# simulate DAI minting by 0xe2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2
# 0xf1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1 gets the minted DAI
# Simulated on the latest block
-H "Content-Type: application/json" \
-d \
        "balance": "0xFFFFFF"

Simulate transactions via client libraries

To simulate transactions via Ethers and Viem, check out the following example: