-
Notifications
You must be signed in to change notification settings - Fork 71
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
feat: prevent zero address for author/voter #492
Conversation
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.
sorry I forgot to click "submit review" yesterday :(
|
||
// Create Proposal | ||
authenticator.authenticate(space.contract_address, PROPOSE_SELECTOR, propose_calldata); | ||
} |
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.
Erm I know you wrote a lot of the code but I would suggest to do these tests:
write a test module that only does a unit test on is_zero
(could actually be inside of user_address.cairo
tbh but doesn't have to).
In this unit test we try starknet, ethereum, and custom).
And then we actually test the three entrypoints (to get full code coverage and regression test), on cancel
, propose
, update_proposal
, and vote
. This time we don't care about whether they're starknet or ethereum, we just check to see if the code is 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.
yep got the unit tests and all entry points tested. sorry was being a bit lazy
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.
nice, perfect
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.
utACK, added some false positive tests
closes #488