Debug Transactions
It is exceptionally rare that correctly configured transactions will fail, but some transactions can be difficult to configure depending on the complexity of the smart contract function.
Common causes for failed transactions include:
- Not enough slippage
- Incorrectly inputting the source chain and token versus the destination chain and token
- Exactly matching smart contract function arguments to their signature
To minimize errors and assist with debugging, Decent offers:
- A no-code transaction builder that automatically fetches the smart contract signatures for verified contracts and returns code snippets for Decent transactions: the Developer Playground.
- Decent scans the transaction logs on the source and destination chain to return the reason a transaction reverts. This will typically provide an immediate answer as to the error which dramatically reduces time spent debugging.
- For example, in this transaction, we can see that this transaction reverted because the NFT only accepted mint requests from whitelisted contracts. Particularly cross-chain, identifying the reason smart contracts revert can be like finding a needle in a haystack, so we encourage you to make use of this feature within Decent Scan.