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

fix: remove redundant check on the v value #279

Closed
wants to merge 2 commits into from

Conversation

ahramy
Copy link
Contributor

@ahramy ahramy commented Sep 20, 2024

AXE-4803

  • Remove Unnecessary v value check in ERC20Permit#permit()
  • The ERC20Permit contract implements an unnecessary check for the signature recovery ID (v) before calling the ecrecover function. This check is redundant as ecrecover inherently validates these values.
  • The ecrecover function and the subsequent check for a valid recovered address are sufficient to ensure the signature's validity.
  • Addressing it will optimize gas usage and simplify the contract code. This change aligns with best practices in Ethereum smart contract development, emphasizing efficiency and clarity in code implementation.

References:

@ahramy ahramy requested a review from a team as a code owner September 20, 2024 06:16
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.51%. Comparing base (be24c94) to head (130fcd0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #279      +/-   ##
==========================================
- Coverage   98.51%   98.51%   -0.01%     
==========================================
  Files          19       19              
  Lines         608      607       -1     
  Branches      125      124       -1     
==========================================
- Hits          599      598       -1     
  Misses          5        5              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahramy ahramy closed this Sep 24, 2024
@ahramy
Copy link
Contributor Author

ahramy commented Sep 24, 2024

Had discussion, and agreed that we don't want to change the InterchainToken bytecode, hence closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants