IntroductionEVM RelayerCosmos GMPSolidity UtilitiesSandbox
InterchainTokenServiceInterchainTokenFactoryTokenManagerAxelarGateway AxelarGasServiceAxelarExecutableAxelarJS SDK
Onboard your IBC chainBug Bounty
Crosschain Message FlowaxlUSDCSecurity OverviewInterchain Transaction DurationEVM Contract Governance

Debugging your smart contract

The transaction at the destination contract can be reverted because some line in the function contains invalid logic. In this case, the next steps are to identify and fix the problem, and redeploy the smart contract.

Here are some tools that may help you to investigate and address misbehavior in the destination contract.


Tenderly is a powerful debugging tool for simulating smart contracts. It can be used for debugging the verified smart contract with a breakpoint. Tenderly also has other useful features for smart contract development, such as forking, transaction monitoring, etc. See their full documentation here.

Note that your contract must be verified at the block explorer or Tenderly (you can follow the guide here). Also, the networks it supports are limited. Here is a list of all the networks Tenderly supports.

Now, let’s take a look at an example that will walk you through how you can use Tenderly to debug a failed transaction.

  1. Consider this failed transaction. If you click the Execute button to manually execute it from the wallet, Axelarscan will show a message indicating the transaction failed because there’s something wrong with the destination contract’s executeWithToken function.


  1. After logging in to the Tenderly Dashboard, select the Contracts menu from the sidebar, then click the Add Contracts button.


  1. Enter the destination-contract address by copying it from Axelarscan and click Import Contracts.


  1. Select the Simulation menu and click the New Simulation button.


  1. Fill the transaction info as shown below.


  1. You can customize transaction parameters if you want (optional). In this case, the default parameters are fine. If everything okays, then click the Simulate Transaction button.


  1. Scroll down to the bottom, you will see the last execution line in the smart contract code. Click the View In Debugger button to see more details.


  1. At this step, you can see the code that is causing an issue. The problem is that this contract passed amount instead of sentAmount into the transfer function, so it has insufficient funds to call a transfer function. That’s the reason why this transaction was reverted.


Edit this page