0

Novadays we can see a lot of scamcoins on bsc. Why do all approve transactions fail? smart contract link. I thought all reverts preventing transaction execution. But here we can see error messages in transaction status. So somehow they are force sending approve transaction with error message. How is this possible? All of these approves coming from pancakeswap. I thought wallets like metamask wont execute transaction because of revert trigger in smart contract

2 Answers 2

0

There is no message in transaction status. It is Etherescan-specific only. Etherescan will show revert string if the contract was compiled with revert strings using solc option --revert-strings, this string will be returned by the contract upon failure, as return value.

After Byzantium fork, the Status field was introduced and it returns 0 if transaction failed and 1 if transaction succeeded. There is no strings in status, only 2-value integer.

https://eips.ethereum.org/EIPS/eip-658

0

The error messages you see in transaction statuses may be not actual error messages from the smart contract. They are error messages generated by the wallet or the user interface displaying the transaction status. These messages can vary depending on the wallet or the blockchain explorer used to view the transaction details. They often provide a high-level explanation of why the transaction failed, but they are not directly coming from the smart contract itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.