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

removed storage of vote data #355

Merged
merged 1 commit into from
Sep 29, 2022
Merged

removed storage of vote data #355

merged 1 commit into from
Sep 29, 2022

Conversation

Orland0x
Copy link
Contributor

@Orland0x Orland0x commented Sep 28, 2022

closes #353

Copy link
Contributor

@pscott pscott left a comment

Choose a reason for hiding this comment

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

nice & simple

voter_address: Address, proposal_id: felt
) -> (vote: Vote) {
return Voting.get_vote_info(voter_address, proposal_id);
func has_voted{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr: felt}(
Copy link
Member

Choose a reason for hiding this comment

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

Why we have has_voted function twice? Couldnt we reuse the same function?

Copy link
Contributor

Choose a reason for hiding this comment

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

One is external, the other is not. This is to follow OZ's pattern :)

Basically the logic is in a lib file with its namespace: and when you want to write external functions it's mostly wrappers around this lib. It's done to avoid namespace / storage clashing ;)

@Orland0x Orland0x merged commit 175fde3 into develop Sep 29, 2022
@Orland0x Orland0x deleted the remove_vote_data branch September 29, 2022 10:56
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.

Remove VP and choice storage for each voter
3 participants