-
Notifications
You must be signed in to change notification settings - Fork 3
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/allow registry to be zero address #152
Conversation
…ix/allow_registry_to_be_zeroAddr
address(bootstrapper) == address(0) || | ||
address(registry) == address(0) || | ||
factoryOwner == address(0)), | ||
!(implementation == address(0) || k1Validator == address(0) || address(bootstrapper) == address(0)), |
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 this is skipped too?
factoryOwner == address(0)
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.
Weird, it was not removed on my local version
@@ -50,6 +50,29 @@ contract TestK1ValidatorFactory_Deployments is NexusTest_Base { | |||
assertTrue(isContract(address(factory)), "Factory should be a contract"); | |||
} | |||
|
|||
/// @notice Tests that the constructor can take a zero address for the registry. | |||
function test_ConstructorInitializesWithRegistryAddressZero() public { |
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.
we would also have 7484 tests somewhere with some mock registry.
we can set it to zero and see if everything is going fine.
cases I mentioned on slack thread once.
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.
Not sure which tests you mean
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.
pasting here @VGabriel45
we should have test cases for this with and without registry
not just mock registry but attesters and attestations being revoked and stuff
once it’s allowed zero everywhere it should function well when its set to 0
and set to non zero and tests i mentioned before
then set back to zero
cc @Aboudjem
🤖 Slither Analysis Report 🔎Slither report
# Slither report
_This comment was automatically generated by the GitHub Actions workflow._
THIS CHECKLIST IS NOT COMPLETE. Use
constable-statesImpact: Optimization
|
Changes to gas cost
🧾 Summary (5% most significant diffs)
Full diff report 👇
|
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.
looks good to go. check comment about test cases. If done in different branch for coverage improvement then I can merge this
No description provided.