Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[evm] bug: Handle the case of ERC20.transfer returning success=false no error on the call #2080

Closed
Unique-Divine opened this issue Oct 15, 2024 · 0 comments · Fixed by #2090
Labels
S-triage Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5

Comments

@Unique-Divine
Copy link
Member

Unique-Divine commented Oct 15, 2024

EIP20 spec - transfer

From @berndartmueller:

Here, the funtoken precompile does not check the ERC20.transfer(..) return bool value that might be false if the transfer errored without reverting the EVM call.

Some tokens (e.g., ZRX or BAT) return false in case of an error instead of reverting. And, according to the ERC-20 standard (https://eips.ethereum.org/EIPS/eip-20), the caller MUST handle the return value appropriately.

It is recommended to check the return value and return an error if the value is false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-triage Status: This issue is waiting on initial triage. More Info: https://tinyurl.com/25uty9w5
Projects
Archived in project
1 participant