[Ethereum] simulate transaction without sending to blockchain


Is there any way to simulate a transaction without sending it to the blockchain and find the exact error (or line of code), in case it fails if its mined?

Best Answer

I am a software engineer at Tenderly and our Transaction Simulator is pretty much the solution for the problem you described above and our most used feature. You can:

  • Test out bug fixes and improvements for historical transactions
  • Change the source code of a smart contract before simulation
  • Analyze each transaction using our Visual Debugger and instantly find the line your transaction reverted on

One more thing worth mentioning - you can create a Tenderly Fork and chain multiple transactions to be simulated in succession to test out complex scenarios with live on-chain data.

I hope this answer is useful and don’t hesitate to reach out to me if you have any questions. :)

Related Topic