Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: prevent zero address for author/voter #492
Changes from 3 commits
5d43dc2
f81216e
ec78c93
869f831
01be3cc
0011186
0c193f0
3b03169
2e817ea
af25e96
95e010c
38c0c10
21e8f87
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 ofuser_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
, andvote
. 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