-
Notifications
You must be signed in to change notification settings - Fork 4
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
Various Improvements and Refactors to Test Suite #7
Conversation
return (address(0), RecoverError.InvalidSignatureS, s); | ||
} | ||
chainId1 = bound(chainId1, 1, 2 ** 64 - 1); | ||
chainId2 = bound(chainId2, 1, 2 ** 64 - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we wanna use 2 ** 64 - 1
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the highest supported chainId so there's no reason not to fuzz across the whole range.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see how this greatly simplifies the test suite, and I learned a couple tricks along the way. Curious about a number that you chose, otherwise looks good to me. Thank you!
* Test internal variable initialization in registry constructor tests * Improvements to domain separator test * Improvements to the RegisteryKeys tests * Naming improvements to registerKeysOnBehalf tests * Update test imports and remove duplicated import * Refactor signature test helpers for test simplicity * Simplify mock contract for ERC1271 signatures * Remove redundant test and add missing ones for register on behalf * Minor cleanup to increment nonce test * Update the EIP712Domain separator to match the spec * Simplify Announcer test names * Use `vm.expectRevert("")` instead of `vm.expectRevert()`
Coverage after merging tweaks into erc-6538-use-address-only will be
Coverage Report
|
Hey @garyghayrat, rather than cause too much churn on your PR, I did some cleanup and refactoring to your PR in my own branch. You can review it, leave feedback, and once you're ok with my changes, we can merge it in to your branch. Then we can ask Matt & Tony for final sign off on your PR before merging it into main and getting community input in advance of the audit. Thanks for bearing with me in this process!
Also note, the only non-test change was to update the DOMAIN_SEPARATOR to correctly confirm to the spec. The name of the param should always be
verifyingContract
.resolves #6