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

Simplify and use AbiDecoder function selector helpers #1639

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

iamacook
Copy link
Member

Summary

We were generating AbiDecoder['helpers'] by decoding function data and returning true/false according to what it decodes. A more efficient method is comparing the beginning of the data against the function selector.

This adjusts the logic of AbiDecoder['helpers'] to instead compare the beginning of the function data against the relevant selector.

Changes

  • Optimise AbiDecoder['helpers'] generation
  • Remove SetPreSignatureDecoder['isSetPreSignature'] and replace all usage with this.helpers.isSetPreSignature

@iamacook iamacook self-assigned this Jun 11, 2024
@iamacook iamacook requested a review from a team as a code owner June 11, 2024 10:07
@coveralls
Copy link

coveralls commented Jun 11, 2024

Pull Request Test Coverage Report for Build 9463628425

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 92.668%

Files with Coverage Reduction New Missed Lines %
src/routes/transactions/entities/tests/human-description.builder.ts 1 80.0%
Totals Coverage Status
Change from base Build 9460927247: -0.04%
Covered Lines: 7154
Relevant Lines: 7419

💛 - Coveralls

@iamacook iamacook enabled auto-merge (squash) June 11, 2024 12:14
@iamacook iamacook merged commit cb6d459 into main Jun 14, 2024
16 checks passed
@iamacook iamacook deleted the simplify-function-selection branch June 14, 2024 09:32
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