Skip to content

Commit 8bd0755

Browse files
authored
chore: add some pub use and remove unused imports (#8521)
Fixes all of the "unused ..." warnings.
1 parent 00146fa commit 8bd0755

File tree

62 files changed

+102
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+102
-164
lines changed

noir-projects/aztec-nr/aztec/src/context/call_interfaces.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use dep::protocol_types::{
55

66
use crate::context::{
77
private_context::PrivateContext, public_context::PublicContext, gas::GasOpts,
8-
public_context::FunctionReturns, inputs::{PrivateContextInputs, PublicContextInputs}
8+
inputs::{PrivateContextInputs, PublicContextInputs}
99
};
1010

1111
use crate::oracle::arguments::pack_arguments;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// protocl global vars are equal to the private ones so we just re-export them here under a different name
2-
use dep::protocol_types::abis::global_variables::GlobalVariables as PublicGlobalVariables;
2+
pub use dep::protocol_types::abis::global_variables::GlobalVariables as PublicGlobalVariables;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mod private_context_inputs;
22
mod public_context_inputs;
33

4-
use crate::context::inputs::private_context_inputs::PrivateContextInputs;
5-
use crate::context::inputs::public_context_inputs::PublicContextInputs;
4+
pub use crate::context::inputs::private_context_inputs::PrivateContextInputs;
5+
pub use crate::context::inputs::public_context_inputs::PublicContextInputs;

noir-projects/aztec-nr/aztec/src/context/inputs/private_context_inputs.nr

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use dep::protocol_types::{
2-
transaction::tx_context::TxContext, abis::{call_context::CallContext, gas_settings::GasSettings},
3-
header::Header, traits::Empty
4-
};
1+
use dep::protocol_types::{transaction::tx_context::TxContext, abis::{call_context::CallContext}, header::Header, traits::Empty};
52

63
// PrivateContextInputs are expected to be provided to each private function
74
// docs:start:private-context-inputs

noir-projects/aztec-nr/aztec/src/context/private_context.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use dep::protocol_types::{
1818
max_block_number::MaxBlockNumber,
1919
validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},
2020
private_call_request::PrivateCallRequest, private_circuit_public_inputs::PrivateCircuitPublicInputs,
21-
public_call_request::PublicCallRequest, public_call_stack_item::PublicCallStackItem,
21+
public_call_request::PublicCallRequest,
2222
public_call_stack_item_compressed::PublicCallStackItemCompressed, read_request::ReadRequest,
2323
note_hash::NoteHash, nullifier::Nullifier, log_hash::{LogHash, NoteLogHash, EncryptedLogHash}
2424
},

noir-projects/aztec-nr/aztec/src/context/unconstrained_context.nr

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use dep::protocol_types::{address::AztecAddress, traits::Deserialize};
2-
use crate::oracle::{
3-
execution::{get_chain_id, get_version, get_contract_address, get_block_number},
4-
storage::{raw_storage_read, storage_read}
5-
};
2+
use crate::oracle::{execution::{get_chain_id, get_version, get_contract_address, get_block_number}, storage::storage_read};
63

74
struct UnconstrainedContext {
85
block_number: u32,

noir-projects/aztec-nr/aztec/src/encrypted_logs/encrypted_note_emission.nr

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ use crate::{
33
keys::{getters::get_current_public_keys, public_keys::{OvpkM, IvpkM}},
44
encrypted_logs::payload::compute_encrypted_note_log, oracle::logs_traits::LensForEncryptedLog
55
};
6-
use dep::protocol_types::{
7-
hash::sha256_to_field, address::AztecAddress, point::Point, abis::note_hash::NoteHash,
8-
constants::MAX_NOTE_HASHES_PER_CALL
9-
};
6+
use dep::protocol_types::{hash::sha256_to_field, address::AztecAddress, abis::note_hash::NoteHash};
107

118
unconstrained fn compute_unconstrained<Note, let N: u32, let NB: u32, let M: u32>(
129
contract_address: AztecAddress,

noir-projects/aztec-nr/aztec/src/encrypted_logs/incoming_body.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::note::note_interface::NoteInterface;
22
use crate::event::event_interface::EventInterface;
3-
use dep::protocol_types::{scalar::Scalar, point::Point};
3+
use dep::protocol_types::{scalar::Scalar};
44

55
use std::aes128::aes128_encrypt;
66
use crate::keys::{point_to_symmetric_key::point_to_symmetric_key, public_keys::IvpkM};

noir-projects/aztec-nr/aztec/src/encrypted_logs/outgoing_body.nr

+1-6
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,9 @@ impl EncryptedLogOutgoingBody {
5959

6060
mod test {
6161
use crate::{encrypted_logs::outgoing_body::EncryptedLogOutgoingBody, keys::public_keys::IvpkM};
62-
use dep::protocol_types::{
63-
address::AztecAddress, traits::Empty, constants::GENERATOR_INDEX__NOTE_NULLIFIER,
64-
scalar::Scalar, point::Point, hash::poseidon2_hash_with_separator
65-
};
62+
use dep::protocol_types::{address::AztecAddress, scalar::Scalar};
6663
use std::embedded_curve_ops::fixed_base_scalar_mul as derive_public_key;
6764

68-
use crate::context::PrivateContext;
69-
7065
#[test]
7166
fn test_encrypted_log_outgoing_body_matches_typescript() {
7267
let eph_sk = Scalar {

noir-projects/aztec-nr/aztec/src/history/public_storage.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use dep::protocol_types::{
44
};
55
use dep::protocol_types::merkle_tree::root::root_from_sibling_path;
66

7-
use crate::{context::PrivateContext, oracle::get_public_data_witness::get_public_data_witness};
7+
use crate::{oracle::get_public_data_witness::get_public_data_witness};
88

99
trait PublicStorageHistoricalRead {
1010
fn public_storage_historical_read(header: Header, storage_slot: Field, contract_address: AztecAddress) -> Field;

noir-projects/aztec-nr/aztec/src/keys/getters/mod.nr

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
use dep::protocol_types::{
2-
header::Header, abis::validation_requests::KeyValidationRequest, address::AztecAddress,
3-
constants::CANONICAL_KEY_REGISTRY_ADDRESS, point::Point, storage::map::derive_storage_slot_in_map,
4-
traits::is_empty
2+
header::Header, address::AztecAddress, constants::CANONICAL_KEY_REGISTRY_ADDRESS,
3+
storage::map::derive_storage_slot_in_map
54
};
65
use crate::{
76
context::{PrivateContext, UnconstrainedContext},
87
oracle::{keys::get_public_keys_and_partial_address, key_validation_request::get_key_validation_request},
9-
keys::{
10-
public_keys::{PublicKeys, PUBLIC_KEYS_LENGTH}, stored_keys::StoredKeys,
11-
constants::{NULLIFIER_INDEX, INCOMING_INDEX, OUTGOING_INDEX, TAGGING_INDEX}
12-
},
13-
state_vars::{
14-
shared_mutable::shared_mutable_private_getter::SharedMutablePrivateGetter,
15-
public_mutable::PublicMutable, map::Map
16-
}
8+
keys::{public_keys::{PublicKeys, PUBLIC_KEYS_LENGTH}, stored_keys::StoredKeys, constants::NULLIFIER_INDEX},
9+
state_vars::{public_mutable::PublicMutable, map::Map}
1710
};
1811

1912
mod test;

noir-projects/aztec-nr/aztec/src/keys/getters/test.nr

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::keys::getters::{get_current_public_keys, get_historical_public_keys, KEY_REGISTRY_UPDATE_BLOCKS};
22
use crate::context::PrivateContext;
3-
use dep::protocol_types::address::AztecAddress;
43

54
use crate::test::helpers::{cheatcodes, test_environment::TestEnvironment, utils::TestAccount};
65
use dep::std::test::OracleMock;

noir-projects/aztec-nr/aztec/src/keys/mod.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ mod point_to_symmetric_key;
44
mod public_keys;
55
mod stored_keys;
66

7-
use crate::keys::public_keys::{PublicKeys, PUBLIC_KEYS_LENGTH};
7+
pub use crate::keys::public_keys::{PublicKeys, PUBLIC_KEYS_LENGTH};

noir-projects/aztec-nr/aztec/src/keys/public_keys.nr

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use dep::protocol_types::{
33
hash::poseidon2_hash_with_separator, point::{Point, POINT_LENGTH},
44
traits::{Deserialize, Serialize, Empty, is_empty, Hash}
55
};
6-
use crate::keys::constants::{NULLIFIER_INDEX, INCOMING_INDEX, OUTGOING_INDEX};
76

87
global PUBLIC_KEYS_LENGTH: u32 = 12;
98

noir-projects/aztec-nr/aztec/src/lib.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod state_vars;
1313
mod prelude;
1414
mod encrypted_logs;
1515
mod unencrypted_logs;
16-
use dep::protocol_types;
16+
pub use dep::protocol_types;
1717
mod utils;
1818

1919
mod test;

noir-projects/aztec-nr/aztec/src/note/note_getter/mod.nr

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
use dep::protocol_types::{constants::{MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, GET_NOTES_ORACLE_RETURN_LENGTH}};
22
use crate::context::PrivateContext;
33
use crate::note::{
4-
constants::{GET_NOTE_ORACLE_RETURN_LENGTH, MAX_NOTES_PER_PAGE, VIEW_NOTE_ORACLE_RETURN_LENGTH},
4+
constants::{GET_NOTE_ORACLE_RETURN_LENGTH, VIEW_NOTE_ORACLE_RETURN_LENGTH},
55
note_getter_options::{NoteGetterOptions, Select, Sort, SortOrder, NoteStatus, PropertySelector},
66
note_interface::NoteInterface, note_viewer_options::NoteViewerOptions,
77
utils::compute_note_hash_for_read_request
88
};
99
use crate::oracle;
1010
use crate::utils::comparison::compare;
1111

12+
pub use crate::note::constants::MAX_NOTES_PER_PAGE;
13+
1214
mod test;
1315

1416
fn extract_property_value_from_selector<let N: u32>(

noir-projects/aztec-nr/aztec/src/note/note_header.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use dep::protocol_types::{address::AztecAddress, traits::{Empty, Eq, Serialize}};
1+
use dep::protocol_types::{address::AztecAddress, traits::{Empty, Serialize}};
22

33
global NOTE_HEADER_LENGTH: Field = 4;
44

noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use dep::protocol_types::{
2-
address::AztecAddress, contract_instance::ContractInstance, utils::arr_copy_slice,
3-
constants::CONTRACT_INSTANCE_LENGTH, utils::reader::Reader
2+
address::AztecAddress, contract_instance::ContractInstance, constants::CONTRACT_INSTANCE_LENGTH,
3+
utils::reader::Reader
44
};
55

66
#[oracle(getContractInstance)]
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
use dep::protocol_types::constants::PUBLIC_DATA_TREE_HEIGHT;
2-
31
#[oracle(getSiblingPath)]
4-
unconstrained fn get_sibling_path_oracle<let N: u32>(_block_number: u32, _tree_id: Field, _leaf_index: Field) -> [Field; N] {}
2+
unconstrained fn get_sibling_path_oracle<let N: u32>(
3+
_block_number: u32,
4+
_tree_id: Field,
5+
_leaf_index: Field
6+
) -> [Field; N] {}
57

6-
unconstrained pub fn get_sibling_path<let N: u32>(
7-
block_number: u32,
8-
tree_id: Field,
9-
leaf_index: Field
10-
) -> [Field; N] {
8+
unconstrained pub fn get_sibling_path<let N: u32>(block_number: u32, tree_id: Field, leaf_index: Field) -> [Field; N] {
119
let value: [Field; N] = get_sibling_path_oracle(block_number, tree_id, leaf_index);
1210
value
1311
}

noir-projects/aztec-nr/aztec/src/state_vars/mod.nr

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ mod shared_immutable;
88
mod shared_mutable;
99
mod storage;
1010

11-
use crate::state_vars::map::Map;
12-
use crate::state_vars::private_immutable::PrivateImmutable;
13-
use crate::state_vars::private_mutable::PrivateMutable;
14-
use crate::state_vars::public_immutable::PublicImmutable;
15-
use crate::state_vars::public_mutable::PublicMutable;
16-
use crate::state_vars::private_set::PrivateSet;
17-
use crate::state_vars::shared_immutable::SharedImmutable;
18-
use crate::state_vars::shared_mutable::SharedMutable;
19-
use crate::state_vars::storage::Storage;
11+
pub use crate::state_vars::map::Map;
12+
pub use crate::state_vars::private_immutable::PrivateImmutable;
13+
pub use crate::state_vars::private_mutable::PrivateMutable;
14+
pub use crate::state_vars::public_immutable::PublicImmutable;
15+
pub use crate::state_vars::public_mutable::PublicMutable;
16+
pub use crate::state_vars::private_set::PrivateSet;
17+
pub use crate::state_vars::shared_immutable::SharedImmutable;
18+
pub use crate::state_vars::shared_mutable::SharedMutable;
19+
pub use crate::state_vars::storage::Storage;

noir-projects/aztec-nr/aztec/src/state_vars/private_mutable.nr

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use dep::protocol_types::{
2-
address::AztecAddress, constants::GENERATOR_INDEX__INITIALIZATION_NULLIFIER,
3-
hash::poseidon2_hash_with_separator
4-
};
1+
use dep::protocol_types::{constants::GENERATOR_INDEX__INITIALIZATION_NULLIFIER, hash::poseidon2_hash_with_separator};
52

63
use crate::context::{PrivateContext, UnconstrainedContext};
74
use crate::note::{

noir-projects/aztec-nr/aztec/src/state_vars/private_mutable/test.nr

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
use dep::protocol_types::{address::AztecAddress, point::Point};
21
use crate::{
32
context::PrivateContext, state_vars::private_mutable::PrivateMutable,
43
oracle::execution::get_contract_address
54
};
6-
use crate::test::{mocks::mock_note::MockNote, helpers::{cheatcodes, test_environment::TestEnvironment}};
5+
use crate::test::{mocks::mock_note::MockNote, helpers::{test_environment::TestEnvironment}};
76
use std::test::OracleMock;
87

98
global storage_slot = 17;

noir-projects/aztec-nr/aztec/src/state_vars/public_mutable.nr

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::context::{PublicContext, UnconstrainedContext};
2-
use crate::oracle::storage::storage_read;
32
use dep::protocol_types::traits::{Deserialize, Serialize};
43
use crate::state_vars::storage::Storage;
54

noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable.nr

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ mod scheduled_delay_change;
33
mod scheduled_value_change;
44
mod shared_mutable_private_getter;
55

6-
use shared_mutable::SharedMutable;
7-
use shared_mutable_private_getter::SharedMutablePrivateGetter;
6+
pub use shared_mutable::SharedMutable;
7+
pub use shared_mutable_private_getter::SharedMutablePrivateGetter;

noir-projects/aztec-nr/aztec/src/state_vars/shared_mutable/test.nr

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use crate::{
77
test::helpers::test_environment::TestEnvironment
88
};
99

10-
use dep::protocol_types::address::AztecAddress;
1110
use dep::std::{test::OracleMock, mem::zeroed};
1211

1312
global new_value = 17;

noir-projects/aztec-nr/aztec/src/test/helpers/keys.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use dep::protocol_types::{
22
address::AztecAddress, storage::map::derive_storage_slot_in_map,
3-
constants::CANONICAL_KEY_REGISTRY_ADDRESS, point::Point
3+
constants::CANONICAL_KEY_REGISTRY_ADDRESS
44
};
55

66
use crate::{test::helpers::cheatcodes, keys::public_keys::ToPoint};

noir-projects/aztec-nr/aztec/src/test/helpers/test_environment.nr

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
use dep::protocol_types::{
22
abis::{function_selector::FunctionSelector, private_circuit_public_inputs::PrivateCircuitPublicInputs},
3-
address::{AztecAddress, PartialAddress}, storage::map::derive_storage_slot_in_map,
4-
constants::CANONICAL_KEY_REGISTRY_ADDRESS, traits::Deserialize
3+
address::AztecAddress, traits::Deserialize
54
};
65

76
use crate::context::inputs::{PublicContextInputs, PrivateContextInputs};
87
use crate::context::{packed_returns::PackedReturns, call_interfaces::CallInterface};
98

10-
use crate::context::{PrivateContext, PublicContext, UnconstrainedContext, PrivateVoidCallInterface};
11-
use crate::test::helpers::{cheatcodes, utils::{apply_side_effects_private, Deployer, TestAccount}, keys};
9+
use crate::context::{PrivateContext, PublicContext, UnconstrainedContext};
10+
use crate::test::helpers::{cheatcodes, utils::{apply_side_effects_private, Deployer}, keys};
1211
use crate::keys::constants::{NULLIFIER_INDEX, INCOMING_INDEX, OUTGOING_INDEX, TAGGING_INDEX};
13-
use crate::hash::{hash_args, hash_args_array};
12+
use crate::hash::hash_args;
1413

1514
use crate::note::{note_header::NoteHeader, note_interface::NoteInterface};
1615
use crate::oracle::{execution::{get_block_number, get_contract_address}, notes::notify_created_note};

noir-projects/aztec-nr/aztec/src/test/helpers/utils.nr

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
use dep::protocol_types::{
22
traits::{Deserialize, Serialize}, address::AztecAddress,
3-
abis::{function_selector::FunctionSelector, private_circuit_public_inputs::PrivateCircuitPublicInputs},
3+
abis::{private_circuit_public_inputs::PrivateCircuitPublicInputs},
44
contract_instance::ContractInstance
55
};
66

77
use crate::context::inputs::{PublicContextInputs, PrivateContextInputs};
88
use crate::context::call_interfaces::CallInterface;
99
use crate::test::helpers::cheatcodes;
1010
use crate::keys::public_keys::{PUBLIC_KEYS_LENGTH, PublicKeys};
11-
use crate::hash::hash_args;
1211

13-
use crate::oracle::{execution::{get_block_number, get_contract_address}, notes::notify_nullified_note};
12+
use crate::oracle::{execution::{get_block_number, get_contract_address}};
1413

1514
pub fn apply_side_effects_private(contract_address: AztecAddress, public_inputs: PrivateCircuitPublicInputs) {
1615
let mut nullifiers = &[];

noir-projects/aztec-nr/aztec/src/test/mocks/mock_note.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{
33
note::{note_header::NoteHeader, note_interface::NoteInterface, utils::compute_note_hash_for_nullify}
44
};
55

6-
use dep::protocol_types::{address::AztecAddress, constants::GENERATOR_INDEX__NOTE_NULLIFIER, point::Point, traits::Eq};
6+
use dep::protocol_types::{address::AztecAddress, constants::GENERATOR_INDEX__NOTE_NULLIFIER, point::Point};
77
use dep::std::{embedded_curve_ops::multi_scalar_mul, hash::from_field_unsafe};
88

99
global MOCK_NOTE_LENGTH = 1;

noir-projects/aztec-nr/aztec/src/test/mocks/mock_struct.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use dep::protocol_types::traits::{Eq, Serialize, Deserialize};
1+
use dep::protocol_types::traits::{Serialize, Deserialize};
22

33
struct MockStruct {
44
a: Field,

noir-projects/aztec-nr/aztec/src/unencrypted_logs/unencrypted_event_emission.nr

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
use crate::{
2-
context::{PrivateContext, PublicContext}, event::event_interface::EventInterface,
3-
encrypted_logs::payload::compute_encrypted_event_log, oracle::logs_traits::LensForEncryptedEvent
4-
};
5-
use dep::protocol_types::{address::AztecAddress, traits::Serialize};
1+
use crate::{context::PublicContext, event::event_interface::EventInterface};
2+
use dep::protocol_types::{traits::Serialize};
63

74
fn emit<Event, let NB: u32, let MB: u32, let N: u32, let M: u32>(
85
context: &mut PublicContext,

noir-projects/aztec-nr/aztec/src/utils/collapse_array.nr

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use dep::protocol_types::traits::Eq;
2-
31
// Collapses an array of Options with sparse Some values into a BoundedVec, essentially unwrapping the Options and
42
// removing the None values. For example, given:
53
// input: [some(3), none(), some(1)]
@@ -18,7 +16,7 @@ pub fn collapse_array<T, let N: u32>(input: [Option<T>; N]) -> BoundedVec<T, N>
1816
collapsed
1917
}
2018

21-
fn verify_collapse_hints<T, let N: u32>(
19+
pub(crate) fn verify_collapse_hints<T, let N: u32>(
2220
input: [Option<T>; N],
2321
collapsed: BoundedVec<T, N>,
2422
collapsed_to_input_index_mapping: BoundedVec<u32, N>

noir-projects/aztec-nr/aztec/src/utils/mod.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ mod comparison;
33
mod point;
44
mod test;
55

6-
use crate::utils::collapse_array::collapse_array;
6+
pub use crate::utils::collapse_array::collapse_array;

noir-projects/aztec-nr/compressed-string/src/compressed_string.nr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use dep::aztec::protocol_types::{utils::field::field_from_bytes, traits::{Eq, Serialize, Deserialize}};
1+
use dep::aztec::protocol_types::{utils::field::field_from_bytes, traits::{Serialize, Deserialize}};
22

33
// The general Compressed String.
44
// Compresses M bytes into N fields.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mod compressed_string;
22
mod field_compressed_string;
33

4-
use crate::compressed_string::CompressedString;
5-
use crate::field_compressed_string::FieldCompressedString;
4+
pub use crate::compressed_string::CompressedString;
5+
pub use crate::field_compressed_string::FieldCompressedString;
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
mod easy_private_uint;
22

3-
use crate::easy_private_uint::EasyPrivateUint;
3+
pub use crate::easy_private_uint::EasyPrivateUint;

noir-projects/aztec-nr/value-note/src/balance_utils.nr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
use dep::aztec::{
2-
context::UnconstrainedContext, state_vars::PrivateSet,
3-
note::{note_getter::view_notes, note_viewer_options::NoteViewerOptions}
4-
};
1+
use dep::aztec::{context::UnconstrainedContext, state_vars::PrivateSet, note::{note_viewer_options::NoteViewerOptions}};
52
use crate::value_note::ValueNote;
63

74
unconstrained pub fn get_balance(set: PrivateSet<ValueNote, UnconstrainedContext>) -> Field {
85
get_balance_with_offset(set, 0)
96
}
107

11-
unconstrained pub fn get_balance_with_offset(set: PrivateSet<ValueNote, UnconstrainedContext>, offset: u32) -> Field {
8+
unconstrained pub fn get_balance_with_offset(
9+
set: PrivateSet<ValueNote, UnconstrainedContext>,
10+
offset: u32
11+
) -> Field {
1212
let mut balance = 0;
1313
// docs:start:view_notes
1414
let mut options = NoteViewerOptions::new();

0 commit comments

Comments
 (0)