diff --git a/src/main.nr b/src/main.nr index 1498049..1d026be 100644 --- a/src/main.nr +++ b/src/main.nr @@ -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, // admin can end vote @@ -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); }