Skip to content

Commit 7a44921

Browse files
committed
Github Action: Update contract
1 parent c5eedc9 commit 7a44921

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/main.nr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
mod test;
2+
mod test;
23
use dep::aztec::macros::aztec;
34

45
#[aztec]

src/test/first.nr

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
use crate::test::utils;
2-
3-
use dep::aztec::test::{helpers::{cheatcodes, test_environment::TestEnvironment}};
2+
use dep::aztec::oracle::{execution::get_block_number, storage::storage_read};
43
use dep::aztec::protocol_types::storage::map::derive_storage_slot_in_map;
5-
use dep::aztec::note::note_getter::{MAX_NOTES_PER_PAGE, view_notes};
6-
use dep::aztec::note::note_viewer_options::NoteViewerOptions;
7-
use dep::aztec::hash::compute_secret_hash;
8-
9-
use dep::aztec::{oracle::{execution::{get_block_number, get_contract_address}, storage::storage_read}};
104

115
use crate::EasyPrivateVoting;
126

@@ -82,7 +76,7 @@ unconstrained fn test_cast_vote_with_separate_accounts() {
8276
let bob = env.create_account();
8377

8478
let candidate = 101;
85-
79+
8680
env.impersonate(alice);
8781
env.advance_block_by(1);
8882
EasyPrivateVoting::at(voting_contract_address).cast_vote(candidate).call(&mut env.private());
@@ -106,7 +100,7 @@ unconstrained fn test_fail_vote_twice() {
106100
let alice = env.create_account();
107101

108102
let candidate = 101;
109-
103+
110104
env.impersonate(alice);
111105
env.advance_block_by(1);
112106
EasyPrivateVoting::at(voting_contract_address).cast_vote(candidate).call(&mut env.private());

src/test/mod.nr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mod first;
2+
mod utils;

src/test/utils.nr

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use dep::aztec::{
2-
prelude::AztecAddress, test::helpers::{test_environment::TestEnvironment},
2+
note::{note_getter::{MAX_NOTES_PER_PAGE, view_notes}, note_viewer_options::NoteViewerOptions},
3+
prelude::AztecAddress,
34
protocol_types::storage::map::derive_storage_slot_in_map,
4-
note::{note_getter::{MAX_NOTES_PER_PAGE, view_notes}, note_viewer_options::NoteViewerOptions}
5+
test::helpers::test_environment::TestEnvironment,
56
};
67

78
use crate::EasyPrivateVoting;
@@ -12,7 +13,9 @@ pub fn setup() -> (&mut TestEnvironment, AztecAddress, AztecAddress) {
1213
let admin = env.create_account();
1314

1415
let initializer_call_interface = EasyPrivateVoting::interface().constructor(admin);
15-
let voting_contract = env.deploy_self("EasyPrivateVoting").with_public_void_initializer(initializer_call_interface);
16+
let voting_contract = env.deploy_self("EasyPrivateVoting").with_public_void_initializer(
17+
initializer_call_interface,
18+
);
1619
// std::println(voting_contract);
1720
(&mut env, voting_contract.to_address(), admin)
1821
}

0 commit comments

Comments
 (0)