Closed
Conversation
Contributor
🚨🚨🚨 HOTFIX DETECTED 🚨🚨🚨It looks like you are trying to merge a hotfix PR into If you are trying to merge a hotfix PR, please complete the following essential steps:
If you do not complete these steps, your hotfix may be inadvertently removed in the future when branches are promoted to |
ales-otf
approved these changes
Jan 27, 2025
open-junius
reviewed
Jan 30, 2025
| let amount: U256 = handle.context().apparent_value; | ||
| let method = get_slice(txdata, 0, 4)?; | ||
| if get_method_id("transfer(bytes32)") != method { | ||
| return Ok(PrecompileOutput { |
Contributor
There was a problem hiding this comment.
it is better to return Err if the method not found in the contract.
open-junius
reviewed
Jan 30, 2025
| let address_bytes_dst: &[u8] = get_slice(txdata, 4, 36)?; | ||
| let account_id_src = bytes_to_account_id(&ADDRESS_BYTES_SRC)?; | ||
| let account_id_dst = bytes_to_account_id(address_bytes_dst)?; | ||
| if amount_sub.is_zero() { |
Contributor
There was a problem hiding this comment.
the same as last comment. return Err if the parameter is invalid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Cherry-picked evm gas estimation fix from #1184