If a transaction is marked "failed" on TRONSCAN, the funds to be transferred will not be deducted but will remain in the sender's wallet address. However, the transaction fee will still be charged as the irreversible transaction has been recorded on the blockchain. A "failed" transaction may be caused by the following reasons:
- Out of Energy
If a transaction fails because it is "out of Energy", the reason may be as follows:
- The Fee_limit of the contract is too low, and the Energy consumed by the transaction exceeds the limit
- The sender does not have enough Energy in the account address
- Transaction Revert
If a transaction fails because of "transaction revert", the transaction is not executed. Transaction reversion is typically caused by an error in the contract's code. Please contact the deployer of the contract for further assistance.
- Timeout for Contract Execution
If a transaction fails because of "timeout for contract execution", it is likely that the execution time exceeded 80ms or the SR node performance fluctuated due to an overly complex contract. To avoid this, here are some recommendations for contract developers:
- The functionality of a smart contract should be as simple as possible. Try to avoid long loops in the contract
- Timeout will result in a full Fee_limit penalty. Setting a low Fee_limit can cut the losses
- Invalid Transaction
If a transaction fails because it is "invalid", it is likely that an error has occurred in the contract execution. Please contact the deployer of the contract for further assistance.