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

add Choice enum #44

Merged
merged 3 commits into from
Mar 2, 2022
Merged

add Choice enum #44

merged 3 commits into from
Mar 2, 2022

Conversation

ShahakShama
Copy link
Collaborator

No description provided.

@@ -0,0 +1,4 @@
namespace Choice:
const YES = 0
Copy link
Member

Choose a reason for hiding this comment

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

If we can use 0, I suggest we simply use the same format from OpenZeppelin Governor which is:

Against = 0
For = 1
Abstain = 2

See:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/governance/extensions/GovernorCountingSimple.sol#L18-L20

@Orland0x
Copy link
Contributor

Orland0x commented Mar 1, 2022

I was under the impression that we couldn't use 0 for one of the choices as it was the default value. Is this not an issue here?

@ShahakShama
Copy link
Collaborator Author

I initially thought this won't be a problem because we don't have a storage var for choice only, but it's better this way anyway just to be safe :)

@Orland0x Orland0x merged commit 8f760da into develop Mar 2, 2022
@Orland0x Orland0x deleted the shahak/choice branch May 9, 2022 13:39
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.

None yet

3 participants