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

refactor: bytes signature library #30

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Conversation

fedealconada
Copy link
Contributor

Refactors BytesSignature.sol. WDYT @rrecuero ?

@fedealconada fedealconada requested a review from rrecuero January 5, 2024 20:50
Copy link

github-actions bot commented Jan 5, 2024

Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary

solc-version

Impact: Informational
Confidence: High

  • ID-0
    solc-0.8.23 is not recommended for deployment

@fedealconada fedealconada force-pushed the refactor-bytes-signature branch from b64d1fa to 9a3d469 Compare January 5, 2024 20:53
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (cdcbb51) 73.72% compared to head (e34c898) 75.87%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   73.72%   75.87%   +2.15%     
==========================================
  Files          10        9       -1     
  Lines         411      398      -13     
  Branches      113      112       -1     
==========================================
- Hits          303      302       -1     
+ Misses         48       38      -10     
+ Partials       60       58       -2     
Files Coverage Δ
src/wallet/KintoWallet.sol 72.56% <50.00%> (+0.39%) ⬆️

... and 1 file with indirect coverage changes

bytes[] memory extracted = ByteSignature.extractSignatures(fullSignature, 2);
assertEq(extracted[0], signature1, "The first signature does not match the original signature.");
assertEq(extracted[1], signature2, "The second signature does not match the original signature.");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add another test with 3 just in case? It should work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've added a fuzz test so we test any amount of signatures

@rrecuero
Copy link
Contributor

rrecuero commented Jan 7, 2024

It is much better generalized this way. I started with one or two and added three and never changed it. 🙏

Copy link
Contributor

@rrecuero rrecuero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small thing to add one more test with 3 sigs

@fedealconada fedealconada force-pushed the refactor-bytes-signature branch from 2faaff6 to 01c11fe Compare January 8, 2024 12:13
@fedealconada fedealconada force-pushed the refactor-bytes-signature branch from 01c11fe to 7048cec Compare January 8, 2024 12:14
@fedealconada fedealconada force-pushed the refactor-bytes-signature branch from 7048cec to e34c898 Compare January 8, 2024 12:54
@fedealconada fedealconada merged commit 87dd6e7 into main Jan 8, 2024
8 of 9 checks passed
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.

2 participants