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

All Products

Easily Debug Failed Transactions

Easily Debug Failed Transactions

Migrate to Virtual TestNets

Virtual TestNets are publicly available!
For new projects, we recommend starting with TestNets.
For automatic migration of Forks to TestNets, .

By default, transactions executed via API don’t persist on Tenderly and aren’t visible in the Dashboard. When executing simulations, you probably want to examine them in greater detail.

When running a transaction simulation, you can provide the save_if_fails flag. So, if a failure takes place, the simulation data will be persisted in the Tenderly Dashboard.

If you need to save the simulation of a successfully executed transaction, you can set the save flag (false by default).

Additionally, the response you receive contains the simulation ID (, so you can generate a link directly to Tenderly Debugger. This helps you speed up the time needed to understand and fix a bug or any other issue that is present in the smart contract.

const body = {
  "network_id": "1",
  "from": senderAddr,
  "to": contract.address,
  "gas": 21204,
  "gas_price": "0",
  "value": 0,
  "save_if_fails": true
const opts = {
  headers: {
    'content-type': 'application/JSON',
    'X-Access-Key': TENDERLY_ACCESS_KEY,
const resp = await, body, opts);
if (simulation.status == "failed") {
  const link = `${TENDERLY_PROJECT_SLUG}/simulator/${}`
  // trigger sentry, log error, make the test fail if in test