Skip to content

Commit

Permalink
Github Action: Update contract
Browse files Browse the repository at this point in the history
  • Loading branch information
critesjosh committed Aug 13, 2024
1 parent b7688a3 commit 238bd6f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main.nr
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
contract EasyPrivateVoting {
use dep::aztec::prelude::{
AztecAddress, FunctionSelector, NoteHeader, NoteInterface, NoteGetterOptions, PrivateContext,
Map, PublicMutable, SharedImmutable
};
use dep::aztec::prelude::{AztecAddress, FunctionSelector, PrivateContext, Map, PublicMutable, SharedImmutable};
#[aztec(storage)]
struct Storage {
admin: PublicMutable<AztecAddress>, // admin can end vote
Expand All @@ -28,7 +25,7 @@ contract EasyPrivateVoting {

let secret = context.request_nsk_app(msg_sender_npk_m_hash); // get secret key of caller of function
let nullifier = std::hash::pedersen_hash([context.msg_sender().to_field(), secret]); // derive nullifier from sender and secret
context.push_nullifier(nullifier, 0); // push nullifier
context.push_nullifier(nullifier);
EasyPrivateVoting::at(context.this_address()).add_to_tally_public(candidate).enqueue(&mut context);
}

Expand Down

0 comments on commit 238bd6f

Please sign in to comment.