0

It seems like Etherscan can detect failed token transfer even though the transaction itself is successful and the gas isn't used completely.

Like in this transfer of Huobi Tokens

enter image description here

Is there a way to detect token transfer failures via RPC on a full non-archive Geth node? eth_getToken and eth_getTokenReceipt seems to produce nothing useful in that regard.

0

Etherscan knows the transaction input begin with 0xa9059cbb (which is the signature of calling ERC20 transfer function). They also know the target address is an ERC20 token. So the assume the user wanted to make a token transfer.

For an ERC20 token transfer to be successful it should generate an Transfer event (Transfer event have topic id 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef).

If you examine the transaction's receipt and no Transfer event is generated then you know the transfer has failed or it is from a non-compliant ERC20 contract.

  • Great explanation, thank you! – moskovski Sep 13 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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