-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
008d474
commit f435c39
Showing
2 changed files
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 6 additions & 11 deletions
17
noir-projects/noir-contracts/contracts/easy_private_voting_contract/src/test/utils.nr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
use dep::aztec::{ | ||
note::{note_getter::{MAX_NOTES_PER_PAGE, view_notes}, note_viewer_options::NoteViewerOptions}, | ||
prelude::AztecAddress, | ||
protocol_types::storage::map::derive_storage_slot_in_map, | ||
test::helpers::test_environment::TestEnvironment, | ||
}; | ||
use dep::aztec::{prelude::AztecAddress, test::helpers::test_environment::TestEnvironment}; | ||
|
||
use crate::EasyPrivateVoting; | ||
|
||
pub fn setup() -> (&mut TestEnvironment, AztecAddress, AztecAddress) { | ||
let mut env = TestEnvironment::new(); | ||
let mut env = unsafe { TestEnvironment::new() }; | ||
|
||
let admin = env.create_account(); | ||
let admin = unsafe { env.create_account() }; | ||
|
||
let initializer_call_interface = EasyPrivateVoting::interface().constructor(admin); | ||
let voting_contract = env.deploy_self("EasyPrivateVoting").with_public_void_initializer( | ||
initializer_call_interface, | ||
); | ||
let voting_contract = unsafe { | ||
env.deploy_self("EasyPrivateVoting").with_public_void_initializer(initializer_call_interface) | ||
}; | ||
// std::println(voting_contract); | ||
(&mut env, voting_contract.to_address(), admin) | ||
} |