From 1e9ba84c80a08b8c0a38c7184d897582e73c9daa Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 12 Jan 2024 13:59:30 +0000 Subject: [PATCH] feat: reexport `protocol_types` from `aztec-nr` (#3926) This PR rexports `protocol_types` from `aztec-nr` so that users of `aztec-nr` don't need to have a direct dependency on `protocol_types` Closes https://github.com/AztecProtocol/aztec-packages/issues/3590 --- boxes/blank-react/src/contracts/Nargo.toml | 1 - boxes/blank-react/src/contracts/src/main.nr | 4 ++-- boxes/blank/src/contracts/Nargo.toml | 1 - boxes/blank/src/contracts/src/main.nr | 6 +++--- boxes/token/src/contracts/Nargo.toml | 1 - boxes/token/src/contracts/src/main.nr | 10 +++++----- boxes/token/src/contracts/src/types/balance_set.nr | 8 ++++---- .../token/src/contracts/src/types/balances_map.nr | 2 +- boxes/token/src/contracts/src/types/token_note.nr | 12 ++++++------ docs/docs/dev_docs/contracts/setup.md | 1 - .../getting_started/aztecnr-getting-started.md | 1 - docs/docs/dev_docs/tutorials/token_portal/setup.md | 1 - docs/docs/dev_docs/tutorials/uniswap/setup.md | 1 - .../tutorials/writing_dapp/contract_deployment.md | 1 - .../tutorials/writing_private_voting_contract.md | 1 - .../dev_docs/tutorials/writing_token_contract.md | 1 - docs/docs/misc/migration_notes.md | 10 ++++++++++ noir/aztec_macros/src/lib.rs | 6 ++---- noir/tooling/nargo_fmt/tests/expected/contract.nr | 2 +- noir/tooling/nargo_fmt/tests/input/contract.nr | 2 +- yarn-project/aztec-nr/address-note/Nargo.toml | 1 - .../aztec-nr/address-note/src/address_note.nr | 2 +- yarn-project/aztec-nr/authwit/Nargo.toml | 1 - yarn-project/aztec-nr/authwit/src/auth.nr | 10 +++++++--- yarn-project/aztec-nr/authwit/src/entrypoint.nr | 2 +- yarn-project/aztec-nr/aztec/src/lib.nr | 1 + yarn-project/aztec-nr/compressed-string/Nargo.toml | 1 - .../compressed-string/src/compressed_string.nr | 2 +- .../aztec-nr/easy-private-state/Nargo.toml | 1 - .../easy-private-state/src/easy_private_state.nr | 2 +- yarn-project/aztec-nr/value-note/Nargo.toml | 1 - yarn-project/aztec-nr/value-note/src/filter.nr | 2 +- yarn-project/aztec-nr/value-note/src/utils.nr | 2 +- yarn-project/aztec-nr/value-note/src/value_note.nr | 2 +- .../contracts/benchmarking_contract/Nargo.toml | 1 - .../contracts/benchmarking_contract/src/main.nr | 9 ++++----- .../contracts/card_game_contract/Nargo.toml | 2 +- .../contracts/card_game_contract/src/cards.nr | 14 +++++++------- .../contracts/card_game_contract/src/game.nr | 2 +- .../contracts/card_game_contract/src/main.nr | 2 +- .../contracts/child_contract/Nargo.toml | 2 +- .../contracts/child_contract/src/main.nr | 2 +- .../contracts/counter_contract/Nargo.toml | 1 - .../contracts/counter_contract/src/main.nr | 2 +- .../contracts/docs_example_contract/Nargo.toml | 1 - .../contracts/docs_example_contract/src/actions.nr | 2 +- .../contracts/docs_example_contract/src/main.nr | 2 +- .../contracts/docs_example_contract/src/options.nr | 2 +- .../docs_example_contract/src/types/card_note.nr | 2 +- .../src/types/profile_note.nr | 2 +- .../docs_example_contract/src/types/queen.nr | 4 ++-- .../docs_example_contract/src/types/rules_note.nr | 2 +- .../easy_private_token_contract/Nargo.toml | 1 - .../easy_private_token_contract/src/main.nr | 2 +- .../easy_private_voting_contract/Nargo.toml | 1 - .../easy_private_voting_contract/src/main.nr | 8 ++++---- .../contracts/ecdsa_account_contract/Nargo.toml | 1 - .../src/ecdsa_public_key_note.nr | 2 +- .../contracts/ecdsa_account_contract/src/main.nr | 2 +- .../contracts/escrow_contract/Nargo.toml | 1 - .../contracts/escrow_contract/src/main.nr | 2 +- .../contracts/import_test_contract/Nargo.toml | 1 - .../contracts/import_test_contract/src/main.nr | 2 +- .../contracts/inclusion_proofs_contract/Nargo.toml | 1 - .../inclusion_proofs_contract/src/main.nr | 2 +- .../contracts/lending_contract/Nargo.toml | 1 - .../contracts/lending_contract/src/asset.nr | 2 +- .../contracts/lending_contract/src/interfaces.nr | 2 +- .../contracts/lending_contract/src/main.nr | 2 +- .../contracts/parent_contract/Nargo.toml | 2 +- .../contracts/parent_contract/src/main.nr | 2 +- .../pending_commitments_contract/Nargo.toml | 2 +- .../pending_commitments_contract/src/main.nr | 2 +- .../contracts/price_feed_contract/Nargo.toml | 2 +- .../contracts/price_feed_contract/src/main.nr | 2 +- .../contracts/reader_contract/Nargo.toml | 3 +-- .../contracts/reader_contract/src/main.nr | 2 +- .../contracts/schnorr_account_contract/Nargo.toml | 2 +- .../contracts/schnorr_account_contract/src/main.nr | 2 +- .../src/public_key_note.nr | 2 +- .../schnorr_single_key_account_contract/Nargo.toml | 1 - .../src/auth_oracle.nr | 2 +- .../src/util.nr | 2 +- .../contracts/slow_tree_contract/Nargo.toml | 1 - .../contracts/slow_tree_contract/src/main.nr | 2 +- .../contracts/stateful_test_contract/Nargo.toml | 1 - .../contracts/stateful_test_contract/src/main.nr | 2 +- .../contracts/test_contract/Nargo.toml | 1 - .../contracts/test_contract/src/interface.nr | 2 +- .../contracts/test_contract/src/main.nr | 4 ++-- .../contracts/token_blacklist_contract/Nargo.toml | 1 - .../token_blacklist_contract/src/interfaces.nr | 2 +- .../contracts/token_blacklist_contract/src/main.nr | 2 +- .../src/types/balance_set.nr | 4 ++-- .../src/types/balances_map.nr | 2 +- .../src/types/token_note.nr | 4 ++-- .../contracts/token_bridge_contract/Nargo.toml | 1 - .../contracts/token_bridge_contract/src/main.nr | 2 +- .../token_bridge_contract/src/token_interface.nr | 2 +- .../contracts/token_contract/Nargo.toml | 1 - .../contracts/token_contract/src/main.nr | 2 +- .../token_contract/src/types/balance_set.nr | 2 +- .../token_contract/src/types/balances_map.nr | 2 +- .../token_contract/src/types/token_note.nr | 2 +- .../token_portal_content_hash_lib/Nargo.toml | 1 - .../token_portal_content_hash_lib/src/lib.nr | 2 +- .../contracts/uniswap_contract/Nargo.toml | 2 +- .../contracts/uniswap_contract/src/interfaces.nr | 2 +- .../contracts/uniswap_contract/src/main.nr | 2 +- .../contracts/uniswap_contract/src/util.nr | 4 ++-- 110 files changed, 125 insertions(+), 147 deletions(-) diff --git a/boxes/blank-react/src/contracts/Nargo.toml b/boxes/blank-react/src/contracts/Nargo.toml index 2463e4d641c..66986b634b5 100644 --- a/boxes/blank-react/src/contracts/Nargo.toml +++ b/boxes/blank-react/src/contracts/Nargo.toml @@ -6,4 +6,3 @@ type = "contract" [dependencies] aztec = { path = "../../../../yarn-project/aztec-nr/aztec" } -protocol_types = { path = "../../../../yarn-project/noir-protocol-circuits/src/crates/types" } diff --git a/boxes/blank-react/src/contracts/src/main.nr b/boxes/blank-react/src/contracts/src/main.nr index 847af9b59d4..84750a2da70 100644 --- a/boxes/blank-react/src/contracts/src/main.nr +++ b/boxes/blank-react/src/contracts/src/main.nr @@ -4,9 +4,9 @@ contract Blank { oracle::{ get_public_key::get_public_key, }, + protocol_types::address::AztecAddress }; - use dep::protocol_types::address::AztecAddress; - + #[aztec(private)] fn constructor() {} diff --git a/boxes/blank/src/contracts/Nargo.toml b/boxes/blank/src/contracts/Nargo.toml index be5cb64ca69..66986b634b5 100644 --- a/boxes/blank/src/contracts/Nargo.toml +++ b/boxes/blank/src/contracts/Nargo.toml @@ -6,4 +6,3 @@ type = "contract" [dependencies] aztec = { path = "../../../../yarn-project/aztec-nr/aztec" } -protocol_types = { path = "../../../../yarn-project/noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/boxes/blank/src/contracts/src/main.nr b/boxes/blank/src/contracts/src/main.nr index f99ec1512ee..28647415a6b 100644 --- a/boxes/blank/src/contracts/src/main.nr +++ b/boxes/blank/src/contracts/src/main.nr @@ -3,10 +3,10 @@ contract Blank { abi, oracle::{ get_public_key::get_public_key, - } + }, + protocol_types::address::AztecAddress }; - use dep::protocol_types::address::AztecAddress; - + #[aztec(private)] fn constructor() {} diff --git a/boxes/token/src/contracts/Nargo.toml b/boxes/token/src/contracts/Nargo.toml index 4e1f32fe55c..f5e1cc74cf6 100644 --- a/boxes/token/src/contracts/Nargo.toml +++ b/boxes/token/src/contracts/Nargo.toml @@ -9,4 +9,3 @@ value_note = { path = "../../../../yarn-project/aztec-nr/value-note"} safe_math = { path = "../../../../yarn-project/aztec-nr/safe-math" } authwit = { path = "../../../../yarn-project/aztec-nr/authwit" } aztec = { path = "../../../../yarn-project/aztec-nr/aztec" } -protocol_types = { path = "../../../../yarn-project/noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/boxes/token/src/contracts/src/main.nr b/boxes/token/src/contracts/src/main.nr index e8ee1a18dbf..da7b7cb74ca 100644 --- a/boxes/token/src/contracts/src/main.nr +++ b/boxes/token/src/contracts/src/main.nr @@ -29,12 +29,12 @@ contract Token { bool_serialization::{BoolSerializationMethods, BOOL_SERIALIZED_LEN}, address_serialization::{AddressSerializationMethods, AZTEC_ADDRESS_SERIALIZED_LEN}, }, + protocol_types::{ + abis::function_selector::FunctionSelector, + address::AztecAddress, + } }; - use dep::protocol_types::{ - abis::function_selector::FunctionSelector, - address::AztecAddress, - }; - + // docs:start:import_authwit use dep::authwit::{ auth::{ diff --git a/boxes/token/src/contracts/src/types/balance_set.nr b/boxes/token/src/contracts/src/types/balance_set.nr index 66aade5b9dd..f81c33db5d4 100644 --- a/boxes/token/src/contracts/src/types/balance_set.nr +++ b/boxes/token/src/contracts/src/types/balance_set.nr @@ -1,13 +1,13 @@ use dep::std::option::Option; use dep::safe_math::SafeU120; -use dep::protocol_types::{ - constants::MAX_READ_REQUESTS_PER_CALL, - address::AztecAddress, -}; use dep::aztec::{ context::Context, state_vars::set::Set, }; +use dep::aztec::protocol_types::{ + constants::MAX_READ_REQUESTS_PER_CALL, + address::AztecAddress, +}; use dep::aztec::note::{ note_getter::view_notes, note_getter_options::{NoteGetterOptions, SortOrder}, diff --git a/boxes/token/src/contracts/src/types/balances_map.nr b/boxes/token/src/contracts/src/types/balances_map.nr index 111d3ec50ed..9d6f92c0ac0 100644 --- a/boxes/token/src/contracts/src/types/balances_map.nr +++ b/boxes/token/src/contracts/src/types/balances_map.nr @@ -2,7 +2,7 @@ use dep::aztec::context::{PrivateContext, PublicContext, Context}; use dep::std::option::Option; use crate::types::balance_set::BalanceSet; use dep::aztec::hash::pedersen_hash; -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use crate::types::token_note::{TokenNote, TOKEN_NOTE_LEN, TokenNoteMethods}; use dep::aztec::state_vars::{map::Map, set::Set}; diff --git a/boxes/token/src/contracts/src/types/token_note.nr b/boxes/token/src/contracts/src/types/token_note.nr index b55ebdd76b7..9b30cbc4f4b 100644 --- a/boxes/token/src/contracts/src/types/token_note.nr +++ b/boxes/token/src/contracts/src/types/token_note.nr @@ -1,10 +1,10 @@ -use dep::protocol_types::{ - address::AztecAddress, - constants::{ - MAX_READ_REQUESTS_PER_CALL - }, -}; use dep::aztec::{ + protocol_types::{ + address::AztecAddress, + constants::{ + MAX_READ_REQUESTS_PER_CALL + }, + } note::{ note_header::NoteHeader, note_interface::NoteInterface, diff --git a/docs/docs/dev_docs/contracts/setup.md b/docs/docs/dev_docs/contracts/setup.md index ed97c3ae705..1779e4deb3d 100644 --- a/docs/docs/dev_docs/contracts/setup.md +++ b/docs/docs/dev_docs/contracts/setup.md @@ -71,7 +71,6 @@ type = "contract" [dependencies] # Framework import aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} # Utility dependencies value_note = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/value-note"} diff --git a/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md b/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md index a0e4b2f6f47..fe1b59cd6c8 100644 --- a/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md +++ b/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md @@ -53,7 +53,6 @@ compiler_version = ">=0.18.0" aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } value_note = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/value-note"} easy_private_state = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/easy-private-state"} -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` ## Define the functions diff --git a/docs/docs/dev_docs/tutorials/token_portal/setup.md b/docs/docs/dev_docs/tutorials/token_portal/setup.md index 0cbb5b16329..2c1e4472f48 100644 --- a/docs/docs/dev_docs/tutorials/token_portal/setup.md +++ b/docs/docs/dev_docs/tutorials/token_portal/setup.md @@ -63,7 +63,6 @@ type = "contract" [dependencies] aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } token_portal_content_hash_lib = { git="https://github.com/AztecProtocol/aztec-packages/", tag="aztec-packages-v0.16.9", directory="yarn-project/noir-contracts/contracts/token_portal_content_hash_lib" } -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` We will also be writing some helper functions that should exist elsewhere so we don't overcomplicated our contract. In `src` create two more files - one called `util.nr` and one called `token_interface` - so your dir structure should now look like this: diff --git a/docs/docs/dev_docs/tutorials/uniswap/setup.md b/docs/docs/dev_docs/tutorials/uniswap/setup.md index 13e7a1fae66..6a918d224b5 100644 --- a/docs/docs/dev_docs/tutorials/uniswap/setup.md +++ b/docs/docs/dev_docs/tutorials/uniswap/setup.md @@ -50,7 +50,6 @@ Inside `uniswap/Nargo.toml` paste this in `[dependencies]`: [dependencies] aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } authwit = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/authwit"} -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` ## L2 contracts diff --git a/docs/docs/dev_docs/tutorials/writing_dapp/contract_deployment.md b/docs/docs/dev_docs/tutorials/writing_dapp/contract_deployment.md index 18345d70135..d15d12279be 100644 --- a/docs/docs/dev_docs/tutorials/writing_dapp/contract_deployment.md +++ b/docs/docs/dev_docs/tutorials/writing_dapp/contract_deployment.md @@ -22,7 +22,6 @@ Then, open the `contracts/token/Nargo.toml` configuration file, and add the `azt aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } authwit = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/authwit"} safe_math = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/safe-math"} -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` Last, copy-paste the code from the `Token` contract into `contracts/token/main.nr`: diff --git a/docs/docs/dev_docs/tutorials/writing_private_voting_contract.md b/docs/docs/dev_docs/tutorials/writing_private_voting_contract.md index e28815fc6bd..4683798346e 100644 --- a/docs/docs/dev_docs/tutorials/writing_private_voting_contract.md +++ b/docs/docs/dev_docs/tutorials/writing_private_voting_contract.md @@ -50,7 +50,6 @@ compiler_version = ">=0.18.0" [dependencies] aztec = { git="https://github.com/AztecProtocol/aztec-packages", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` ## Initiate the contract and define imports diff --git a/docs/docs/dev_docs/tutorials/writing_token_contract.md b/docs/docs/dev_docs/tutorials/writing_token_contract.md index 345ed20a799..e3380713e8e 100644 --- a/docs/docs/dev_docs/tutorials/writing_token_contract.md +++ b/docs/docs/dev_docs/tutorials/writing_token_contract.md @@ -61,7 +61,6 @@ type = "contract" aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } safe_math = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/safe-math"} authwit={ git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/authwit"} -protocol_types = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/noir-protocol-circuits/src/crates/types"} ``` ## Contract Interface diff --git a/docs/docs/misc/migration_notes.md b/docs/docs/misc/migration_notes.md index 17f0785e50b..6f98eac2388 100644 --- a/docs/docs/misc/migration_notes.md +++ b/docs/docs/misc/migration_notes.md @@ -6,6 +6,16 @@ keywords: [sandbox, cli, aztec, notes, migration, updating, upgrading] Aztec is in full-speed development. Literally every version breaks compatibility with the previous ones. This page attempts to target errors and difficulties you might encounter when upgrading, and how to resolve them. +## 0.18.0 + +### [Aztec.nr] Remove `protocol_types` from Nargo.toml + +The `protocol_types` package is now being reexported from `aztec`. It can be accessed through `dep::aztec::protocol_types`. + +```toml +aztec = { git="https://github.com/AztecProtocol/aztec-packages/", tag="#include_aztec_version", directory="yarn-project/aztec-nr/aztec" } +``` + ## 0.17.0 ### [js] New `@aztec/accounts` package diff --git a/noir/aztec_macros/src/lib.rs b/noir/aztec_macros/src/lib.rs index 8026673b680..5ac48a8e8e4 100644 --- a/noir/aztec_macros/src/lib.rs +++ b/noir/aztec_macros/src/lib.rs @@ -483,12 +483,11 @@ const SIGNATURE_PLACEHOLDER: &str = "SIGNATURE_PLACEHOLDER"; /// Generates the impl for an event selector /// -/// TODO(https://github.com/AztecProtocol/aztec-packages/issues/3590): Make this point to aztec-nr once the issue is fixed. /// Inserts the following code: /// ```noir /// impl SomeStruct { /// fn selector() -> FunctionSelector { -/// protocol_types::abis::function_selector::FunctionSelector::from_signature("SIGNATURE_PLACEHOLDER") +/// aztec::protocol_types::abis::function_selector::FunctionSelector::from_signature("SIGNATURE_PLACEHOLDER") /// } /// } /// ``` @@ -499,9 +498,8 @@ const SIGNATURE_PLACEHOLDER: &str = "SIGNATURE_PLACEHOLDER"; fn generate_selector_impl(structure: &NoirStruct) -> TypeImpl { let struct_type = make_type(UnresolvedTypeData::Named(path(structure.name.clone()), vec![])); - // TODO(https://github.com/AztecProtocol/aztec-packages/issues/3590): Make this point to aztec-nr once the issue is fixed. let selector_path = - chained_path!("protocol_types", "abis", "function_selector", "FunctionSelector"); + chained_path!("aztec", "protocol_types", "abis", "function_selector", "FunctionSelector"); let mut from_signature_path = selector_path.clone(); from_signature_path.segments.push(ident("from_signature")); diff --git a/noir/tooling/nargo_fmt/tests/expected/contract.nr b/noir/tooling/nargo_fmt/tests/expected/contract.nr index cd53add10a0..8e6000a8d78 100644 --- a/noir/tooling/nargo_fmt/tests/expected/contract.nr +++ b/noir/tooling/nargo_fmt/tests/expected/contract.nr @@ -3,7 +3,7 @@ // Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. // Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. contract Benchmarking { - use dep::protocol_types::abis::function_selector::FunctionSelector; + use dep::aztec::protocol_types::abis::function_selector::FunctionSelector; use dep::value_note::{ utils::{increment, decrement}, diff --git a/noir/tooling/nargo_fmt/tests/input/contract.nr b/noir/tooling/nargo_fmt/tests/input/contract.nr index 7aa688fef68..2e3f4d7c8c4 100644 --- a/noir/tooling/nargo_fmt/tests/input/contract.nr +++ b/noir/tooling/nargo_fmt/tests/input/contract.nr @@ -3,7 +3,7 @@ // Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. // Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. contract Benchmarking { - use dep::protocol_types::abis::function_selector::FunctionSelector; + use dep::aztec::protocol_types::abis::function_selector::FunctionSelector; use dep::value_note::{ utils::{increment, decrement}, diff --git a/yarn-project/aztec-nr/address-note/Nargo.toml b/yarn-project/aztec-nr/address-note/Nargo.toml index a9de5de99d6..6e1ee8bfbc0 100644 --- a/yarn-project/aztec-nr/address-note/Nargo.toml +++ b/yarn-project/aztec-nr/address-note/Nargo.toml @@ -6,4 +6,3 @@ type = "lib" [dependencies] aztec = { path = "../aztec" } -protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" } diff --git a/yarn-project/aztec-nr/address-note/src/address_note.nr b/yarn-project/aztec-nr/address-note/src/address_note.nr index 314a862c727..dc5e0fa47d6 100644 --- a/yarn-project/aztec-nr/address-note/src/address_note.nr +++ b/yarn-project/aztec-nr/address-note/src/address_note.nr @@ -1,8 +1,8 @@ // docs:start:encrypted_import use dep::aztec::log::emit_encrypted_log; // docs:end:encrypted_import -use dep::protocol_types::address::AztecAddress; use dep::aztec::{ + protocol_types::address::AztecAddress, note::{ note_header::NoteHeader, note_interface::NoteInterface, diff --git a/yarn-project/aztec-nr/authwit/Nargo.toml b/yarn-project/aztec-nr/authwit/Nargo.toml index e2259943251..a6f248859f1 100644 --- a/yarn-project/aztec-nr/authwit/Nargo.toml +++ b/yarn-project/aztec-nr/authwit/Nargo.toml @@ -6,4 +6,3 @@ type = "lib" [dependencies] aztec = { path = "../aztec" } -protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/aztec-nr/authwit/src/auth.nr b/yarn-project/aztec-nr/authwit/src/auth.nr index 5279aa53d2f..d9dababda41 100644 --- a/yarn-project/aztec-nr/authwit/src/auth.nr +++ b/yarn-project/aztec-nr/authwit/src/auth.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, constants::{ @@ -22,7 +22,11 @@ global IS_VALID_PUBLIC_SELECTOR = 0xf3661153; // docs:start:assert_valid_authwit // Assert that `on_behalf_of` have authorized `message_hash` with a valid authentication witness -pub fn assert_valid_authwit(context: &mut PrivateContext, on_behalf_of: AztecAddress, message_hash: Field) { +pub fn assert_valid_authwit( + context: &mut PrivateContext, + on_behalf_of: AztecAddress, + message_hash: Field +) { let is_valid_selector = FunctionSelector::from_field(IS_VALID_SELECTOR); let result = context.call_private_function(on_behalf_of, is_valid_selector, [message_hash])[0]; context.push_new_nullifier(message_hash, 0); @@ -82,4 +86,4 @@ pub fn compute_authwit_message_hash( GENERATOR_INDEX__SIGNATURE_PAYLOAD ) } -// docs:end:compute_authwit_message_hash \ No newline at end of file +// docs:end:compute_authwit_message_hash diff --git a/yarn-project/aztec-nr/authwit/src/entrypoint.nr b/yarn-project/aztec-nr/authwit/src/entrypoint.nr index 5f22a8e79b0..82c3f5f6e2f 100644 --- a/yarn-project/aztec-nr/authwit/src/entrypoint.nr +++ b/yarn-project/aztec-nr/authwit/src/entrypoint.nr @@ -1,7 +1,7 @@ use dep::aztec::abi; use dep::aztec::types::vec::BoundedVec; use dep::aztec::context::PrivateContext; -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ abis::{ call_stack_item::{ PrivateCallStackItem, diff --git a/yarn-project/aztec-nr/aztec/src/lib.nr b/yarn-project/aztec-nr/aztec/src/lib.nr index 46f548d4305..39c5b6c290e 100644 --- a/yarn-project/aztec-nr/aztec/src/lib.nr +++ b/yarn-project/aztec-nr/aztec/src/lib.nr @@ -9,3 +9,4 @@ mod oracle; mod state_vars; mod types; mod utils; +use dep::protocol_types; diff --git a/yarn-project/aztec-nr/compressed-string/Nargo.toml b/yarn-project/aztec-nr/compressed-string/Nargo.toml index 431e8d34395..238766acf66 100644 --- a/yarn-project/aztec-nr/compressed-string/Nargo.toml +++ b/yarn-project/aztec-nr/compressed-string/Nargo.toml @@ -6,4 +6,3 @@ type = "lib" [dependencies] aztec = {path = "../aztec"} -protocol_types = {path = "../../noir-protocol-circuits/src/crates/types"} diff --git a/yarn-project/aztec-nr/compressed-string/src/compressed_string.nr b/yarn-project/aztec-nr/compressed-string/src/compressed_string.nr index b81d86648eb..0cf51b8edb2 100644 --- a/yarn-project/aztec-nr/compressed-string/src/compressed_string.nr +++ b/yarn-project/aztec-nr/compressed-string/src/compressed_string.nr @@ -1,5 +1,5 @@ use dep::aztec::types::type_serialization::TypeSerializationInterface; -use dep::protocol_types::utils::field::field_from_bytes; +use dep::aztec::protocol_types::utils::field::field_from_bytes; use dep::std; // A Fixedsize Compressed String. diff --git a/yarn-project/aztec-nr/easy-private-state/Nargo.toml b/yarn-project/aztec-nr/easy-private-state/Nargo.toml index 55ac93c3376..31c96165af5 100644 --- a/yarn-project/aztec-nr/easy-private-state/Nargo.toml +++ b/yarn-project/aztec-nr/easy-private-state/Nargo.toml @@ -7,4 +7,3 @@ type = "lib" [dependencies] aztec = { path = "../aztec" } value_note = { path = "../value-note" } -protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" } diff --git a/yarn-project/aztec-nr/easy-private-state/src/easy_private_state.nr b/yarn-project/aztec-nr/easy-private-state/src/easy_private_state.nr index 504686d1374..29feeeb26b0 100644 --- a/yarn-project/aztec-nr/easy-private-state/src/easy_private_state.nr +++ b/yarn-project/aztec-nr/easy-private-state/src/easy_private_state.nr @@ -1,5 +1,5 @@ -use dep::protocol_types::address::AztecAddress; use dep::aztec::{ + protocol_types::address::AztecAddress, context::Context, note::note_getter_options::NoteGetterOptions, state_vars::set::Set, diff --git a/yarn-project/aztec-nr/value-note/Nargo.toml b/yarn-project/aztec-nr/value-note/Nargo.toml index 7f87db94351..01f5ee19619 100644 --- a/yarn-project/aztec-nr/value-note/Nargo.toml +++ b/yarn-project/aztec-nr/value-note/Nargo.toml @@ -6,4 +6,3 @@ type = "lib" [dependencies] aztec = { path = "../aztec" } -protocol_types = { path = "../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/aztec-nr/value-note/src/filter.nr b/yarn-project/aztec-nr/value-note/src/filter.nr index 46d3d4ecb2f..56dd89a5ca9 100644 --- a/yarn-project/aztec-nr/value-note/src/filter.nr +++ b/yarn-project/aztec-nr/value-note/src/filter.nr @@ -1,5 +1,5 @@ use dep::std::option::Option; -use dep::protocol_types::constants::MAX_READ_REQUESTS_PER_CALL; +use dep::aztec::protocol_types::constants::MAX_READ_REQUESTS_PER_CALL; use crate::value_note::ValueNote; pub fn filter_notes_min_sum( diff --git a/yarn-project/aztec-nr/value-note/src/utils.nr b/yarn-project/aztec-nr/value-note/src/utils.nr index 76fcfd217b4..277e0b114c3 100644 --- a/yarn-project/aztec-nr/value-note/src/utils.nr +++ b/yarn-project/aztec-nr/value-note/src/utils.nr @@ -7,7 +7,7 @@ use crate::{ filter::filter_notes_min_sum, value_note::{ValueNote, VALUE_NOTE_LEN}, }; -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; // Sort the note values (0th field) in descending order. // Pick the fewest notes whose sum is equal to or greater than `amount`. diff --git a/yarn-project/aztec-nr/value-note/src/value_note.nr b/yarn-project/aztec-nr/value-note/src/value_note.nr index 7e7e2db39d8..d02037e4998 100644 --- a/yarn-project/aztec-nr/value-note/src/value_note.nr +++ b/yarn-project/aztec-nr/value-note/src/value_note.nr @@ -1,5 +1,5 @@ -use dep::protocol_types::address::AztecAddress; use dep::aztec::{ + protocol_types::address::AztecAddress, note::{ note_header::NoteHeader, note_interface::NoteInterface, diff --git a/yarn-project/noir-contracts/contracts/benchmarking_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/benchmarking_contract/Nargo.toml index c7c751b7c6e..1e56d7285e8 100644 --- a/yarn-project/noir-contracts/contracts/benchmarking_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/benchmarking_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/benchmarking_contract/src/main.nr b/yarn-project/noir-contracts/contracts/benchmarking_contract/src/main.nr index 2ff63e20bba..2daab6e3ed6 100644 --- a/yarn-project/noir-contracts/contracts/benchmarking_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/benchmarking_contract/src/main.nr @@ -11,6 +11,10 @@ contract Benchmarking { }; use dep::aztec::{ + protocol_types::{ + abis::function_selector::FunctionSelector, + address::AztecAddress, + }, context::{Context}, note::{utils as note_utils, note_getter_options::NoteGetterOptions, note_header::NoteHeader}, log::emit_unencrypted_log, @@ -18,11 +22,6 @@ contract Benchmarking { types::type_serialization::field_serialization::{FieldSerializationMethods, FIELD_SERIALIZED_LEN}, }; - use dep::protocol_types::{ - abis::function_selector::FunctionSelector, - address::AztecAddress, - }; - struct Storage { notes: Map>, balances: Map>, diff --git a/yarn-project/noir-contracts/contracts/card_game_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/card_game_contract/Nargo.toml index af822821e2f..c425ae39426 100644 --- a/yarn-project/noir-contracts/contracts/card_game_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/card_game_contract/Nargo.toml @@ -7,4 +7,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/card_game_contract/src/cards.nr b/yarn-project/noir-contracts/contracts/card_game_contract/src/cards.nr index 255834dbeb6..6672ad559bc 100644 --- a/yarn-project/noir-contracts/contracts/card_game_contract/src/cards.nr +++ b/yarn-project/noir-contracts/contracts/card_game_contract/src/cards.nr @@ -1,11 +1,11 @@ -use dep::protocol_types::{ - address::AztecAddress, - constants::{ - MAX_NOTES_PER_PAGE, - MAX_READ_REQUESTS_PER_CALL, - }, -}; use dep::aztec::{ + protocol_types::{ + address::AztecAddress, + constants::{ + MAX_NOTES_PER_PAGE, + MAX_READ_REQUESTS_PER_CALL, + }, + }, context::{PrivateContext, PublicContext, Context}, note::{ note_getter_options::NoteGetterOptions, diff --git a/yarn-project/noir-contracts/contracts/card_game_contract/src/game.nr b/yarn-project/noir-contracts/contracts/card_game_contract/src/game.nr index a6b61fa7db4..63b50bcf783 100644 --- a/yarn-project/noir-contracts/contracts/card_game_contract/src/game.nr +++ b/yarn-project/noir-contracts/contracts/card_game_contract/src/game.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::types::type_serialization::TypeSerializationInterface; use crate::cards::Card; diff --git a/yarn-project/noir-contracts/contracts/card_game_contract/src/main.nr b/yarn-project/noir-contracts/contracts/card_game_contract/src/main.nr index 35271a8a13b..f0f85b6e0cd 100644 --- a/yarn-project/noir-contracts/contracts/card_game_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/card_game_contract/src/main.nr @@ -2,7 +2,7 @@ mod cards; mod game; contract CardGame { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, constants::MAX_NOTES_PER_PAGE, diff --git a/yarn-project/noir-contracts/contracts/child_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/child_contract/Nargo.toml index 007e868a485..c3cd8225777 100644 --- a/yarn-project/noir-contracts/contracts/child_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/child_contract/Nargo.toml @@ -6,4 +6,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/child_contract/src/main.nr b/yarn-project/noir-contracts/contracts/child_contract/src/main.nr index 92203904a12..49caabe92cf 100644 --- a/yarn-project/noir-contracts/contracts/child_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/child_contract/src/main.nr @@ -9,7 +9,7 @@ contract Child { state_vars::public_state::PublicState, types::type_serialization::field_serialization::{FieldSerializationMethods, FIELD_SERIALIZED_LEN}, }; - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/counter_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/counter_contract/Nargo.toml index b0e31e855ad..abaa2f0011b 100644 --- a/yarn-project/noir-contracts/contracts/counter_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/counter_contract/Nargo.toml @@ -8,4 +8,3 @@ type = "contract" aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note" } easy_private_state = { path = "../../../aztec-nr/easy-private-state"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/counter_contract/src/main.nr b/yarn-project/noir-contracts/contracts/counter_contract/src/main.nr index 4b4f4bfd8ca..07558511816 100644 --- a/yarn-project/noir-contracts/contracts/counter_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/counter_contract/src/main.nr @@ -1,6 +1,6 @@ contract Counter { // docs:start:imports - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::{ context::{PrivateContext, Context}, note::{ diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/docs_example_contract/Nargo.toml index f6f38543c43..665ac0a98f0 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/Nargo.toml @@ -6,4 +6,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/actions.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/actions.nr index 9feed4b03cb..9c9423f31ea 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/actions.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/actions.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::AztecAddress, constants::{MAX_NOTES_PER_PAGE, MAX_READ_REQUESTS_PER_CALL}, }; diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/main.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/main.nr index 4a8ba985a5c..8870c297267 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/main.nr @@ -4,7 +4,7 @@ mod options; mod types; contract DocsExample { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ address::AztecAddress, abis::function_selector::FunctionSelector, }; diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/options.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/options.nr index c389ed1a7f1..8fb26e6e7d7 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/options.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/options.nr @@ -1,5 +1,5 @@ use crate::types::card_note::{CardNote, CARD_NOTE_LEN}; -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::AztecAddress, constants::MAX_READ_REQUESTS_PER_CALL, }; diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/card_note.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/card_note.nr index 03ecfa5545f..97da78e6519 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/card_note.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/card_note.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::{ note::{ note_header::NoteHeader, diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/profile_note.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/profile_note.nr index 9d4eea39b09..201c796c805 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/profile_note.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/profile_note.nr @@ -1,6 +1,6 @@ -use dep::protocol_types::address::AztecAddress; use dep::std::option::Option; use dep::aztec::{ + protocol_types::address::AztecAddress, note::{ note_header::NoteHeader, note_interface::NoteInterface, diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/queen.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/queen.nr index 645d39f8924..acd4ed0f7ca 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/queen.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/queen.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::types::type_serialization::TypeSerializationInterface; // docs:start:state_vars-CustomStruct @@ -23,4 +23,4 @@ global QueenSerializationMethods = TypeSerializationInterface { deserialize, serialize, }; -// docs:end:state_vars-PublicStateCustomStruct \ No newline at end of file +// docs:end:state_vars-PublicStateCustomStruct diff --git a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/rules_note.nr b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/rules_note.nr index aae5dba13fe..d3abaecb5d1 100644 --- a/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/rules_note.nr +++ b/yarn-project/noir-contracts/contracts/docs_example_contract/src/types/rules_note.nr @@ -1,6 +1,6 @@ -use dep::protocol_types::address::AztecAddress; use dep::std::option::Option; use dep::aztec::{ + protocol_types::address::AztecAddress, note::{ note_header::NoteHeader, note_interface::NoteInterface, diff --git a/yarn-project/noir-contracts/contracts/easy_private_token_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/easy_private_token_contract/Nargo.toml index 6e0cb1a8064..cac909c9303 100644 --- a/yarn-project/noir-contracts/contracts/easy_private_token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/easy_private_token_contract/Nargo.toml @@ -8,4 +8,3 @@ type = "contract" aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note"} easy_private_state = { path = "../../../aztec-nr/easy-private-state"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/easy_private_token_contract/src/main.nr b/yarn-project/noir-contracts/contracts/easy_private_token_contract/src/main.nr index c8e4e7590ce..2a342aa3e88 100644 --- a/yarn-project/noir-contracts/contracts/easy_private_token_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/easy_private_token_contract/src/main.nr @@ -1,6 +1,6 @@ // docs:start:easy_private_token_contract contract EasyPrivateToken { - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use dep::std::option::Option; use dep::aztec::{ context::{PrivateContext, PublicContext, Context}, diff --git a/yarn-project/noir-contracts/contracts/easy_private_voting_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/easy_private_voting_contract/Nargo.toml index eb6543e6be7..80449c6b588 100644 --- a/yarn-project/noir-contracts/contracts/easy_private_voting_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/easy_private_voting_contract/Nargo.toml @@ -6,4 +6,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/easy_private_voting_contract/src/main.nr b/yarn-project/noir-contracts/contracts/easy_private_voting_contract/src/main.nr index 561068535c2..54db9e4017a 100644 --- a/yarn-project/noir-contracts/contracts/easy_private_voting_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/easy_private_voting_contract/src/main.nr @@ -1,10 +1,10 @@ contract EasyPrivateVoting { // docs:start:imports - use dep::protocol_types::{ - abis::function_selector::FunctionSelector, - address::AztecAddress, - }; use dep::aztec::{ + protocol_types::{ + abis::function_selector::FunctionSelector, + address::AztecAddress, + }, context::{PrivateContext, Context}, oracle::get_secret_key::get_secret_key, // used to compute nullifier state_vars::{ map::Map, public_state::PublicState,}, diff --git a/yarn-project/noir-contracts/contracts/ecdsa_account_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/ecdsa_account_contract/Nargo.toml index 0893f3d6b56..7efb28657cc 100644 --- a/yarn-project/noir-contracts/contracts/ecdsa_account_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/ecdsa_account_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } authwit = { path = "../../../aztec-nr/authwit" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr b/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr index da1c72d8f6f..c0aea096b20 100644 --- a/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr +++ b/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/ecdsa_public_key_note.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::{ note::{ note_header::NoteHeader, diff --git a/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/main.nr b/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/main.nr index aeadc761dc3..a12e0c02600 100644 --- a/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/ecdsa_account_contract/src/main.nr @@ -3,7 +3,7 @@ mod ecdsa_public_key_note; // Account contract that uses ECDSA signatures for authentication on the same curve as Ethereum. // The signing key is stored in an immutable private note and should be different from the signing key. contract EcdsaAccount { - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use dep::std; use dep::std::option::Option; use dep::aztec::{ diff --git a/yarn-project/noir-contracts/contracts/escrow_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/escrow_contract/Nargo.toml index f3b1251bff9..eb586ad28b0 100644 --- a/yarn-project/noir-contracts/contracts/escrow_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/escrow_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } address_note = { path = "../../../aztec-nr/address-note"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/escrow_contract/src/main.nr b/yarn-project/noir-contracts/contracts/escrow_contract/src/main.nr index 5fa92bd1fb4..cf7500c7fa6 100644 --- a/yarn-project/noir-contracts/contracts/escrow_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/escrow_contract/src/main.nr @@ -2,7 +2,7 @@ contract Escrow { use dep::std::option::Option; - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/import_test_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/import_test_contract/Nargo.toml index 4de350b8f20..1f0ecfad841 100644 --- a/yarn-project/noir-contracts/contracts/import_test_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/import_test_contract/Nargo.toml @@ -6,4 +6,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/import_test_contract/src/main.nr b/yarn-project/noir-contracts/contracts/import_test_contract/src/main.nr index d13468f75a5..82ac8a1bd2e 100644 --- a/yarn-project/noir-contracts/contracts/import_test_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/import_test_contract/src/main.nr @@ -3,7 +3,7 @@ mod test_contract_interface; // Contract that uses the autogenerated interface of the Test contract for calling its functions. // Used for testing calling into other contracts via autogenerated interfaces. contract ImportTest { - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use crate::test_contract_interface::{ TestPrivateContextInterface, TestPublicContextInterface, diff --git a/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/Nargo.toml index 470903576ca..1c72286c335 100644 --- a/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/src/main.nr b/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/src/main.nr index b31e402acd5..f0882caff1b 100644 --- a/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/inclusion_proofs_contract/src/main.nr @@ -1,6 +1,6 @@ // A demonstration of inclusion and non-inclusion proofs. contract InclusionProofs { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::{ AztecAddress, diff --git a/yarn-project/noir-contracts/contracts/lending_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/lending_contract/Nargo.toml index 6cd91f3fdbc..dba6d562715 100644 --- a/yarn-project/noir-contracts/contracts/lending_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/lending_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } safe_math = { path = "../../../aztec-nr/safe-math" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/lending_contract/src/asset.nr b/yarn-project/noir-contracts/contracts/lending_contract/src/asset.nr index 5a33ff26332..b71696a3a5f 100644 --- a/yarn-project/noir-contracts/contracts/lending_contract/src/asset.nr +++ b/yarn-project/noir-contracts/contracts/lending_contract/src/asset.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::types::type_serialization::TypeSerializationInterface; // Struct to be used to represent "totals". Generally, there should be one per asset. diff --git a/yarn-project/noir-contracts/contracts/lending_contract/src/interfaces.nr b/yarn-project/noir-contracts/contracts/lending_contract/src/interfaces.nr index 3f48bed4156..22af86c6457 100644 --- a/yarn-project/noir-contracts/contracts/lending_contract/src/interfaces.nr +++ b/yarn-project/noir-contracts/contracts/lending_contract/src/interfaces.nr @@ -4,7 +4,7 @@ use dep::aztec::context::{ }; use crate::asset::Asset; -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, constants::RETURN_VALUES_LENGTH, diff --git a/yarn-project/noir-contracts/contracts/lending_contract/src/main.nr b/yarn-project/noir-contracts/contracts/lending_contract/src/main.nr index 636585900ad..1c80bf6e4a2 100644 --- a/yarn-project/noir-contracts/contracts/lending_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/lending_contract/src/main.nr @@ -11,7 +11,7 @@ mod interfaces; // - A way to repay all debt at once // - Liquidations contract Lending { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/parent_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/parent_contract/Nargo.toml index d76d2eb3471..52fa9b5f455 100644 --- a/yarn-project/noir-contracts/contracts/parent_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/parent_contract/Nargo.toml @@ -6,4 +6,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/parent_contract/src/main.nr b/yarn-project/noir-contracts/contracts/parent_contract/src/main.nr index 785aac2e03b..7992b1b83e8 100644 --- a/yarn-project/noir-contracts/contracts/parent_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/parent_contract/src/main.nr @@ -1,6 +1,6 @@ // A contract used along with `Child` contract to test nested calls. contract Parent { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ address::AztecAddress, abis::function_selector::FunctionSelector, }; diff --git a/yarn-project/noir-contracts/contracts/pending_commitments_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/pending_commitments_contract/Nargo.toml index 61f8d0dc7fa..9b6cde29243 100644 --- a/yarn-project/noir-contracts/contracts/pending_commitments_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/pending_commitments_contract/Nargo.toml @@ -7,4 +7,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/pending_commitments_contract/src/main.nr b/yarn-project/noir-contracts/contracts/pending_commitments_contract/src/main.nr index 3fec0052803..6792fcef1cf 100644 --- a/yarn-project/noir-contracts/contracts/pending_commitments_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/pending_commitments_contract/src/main.nr @@ -20,7 +20,7 @@ contract PendingCommitments { }, state_vars::{map::Map, set::Set}, }; - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ address::AztecAddress, abis::function_selector::FunctionSelector, }; diff --git a/yarn-project/noir-contracts/contracts/price_feed_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/price_feed_contract/Nargo.toml index 95b4055a8ea..8d8c331fc1c 100644 --- a/yarn-project/noir-contracts/contracts/price_feed_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/price_feed_contract/Nargo.toml @@ -6,4 +6,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/price_feed_contract/src/main.nr b/yarn-project/noir-contracts/contracts/price_feed_contract/src/main.nr index ccb6633f999..4e301359438 100644 --- a/yarn-project/noir-contracts/contracts/price_feed_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/price_feed_contract/src/main.nr @@ -9,7 +9,7 @@ contract PriceFeed { public_state::PublicState, }, }; - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use crate::asset::{ASSET_SERIALIZED_LEN, Asset, AssetSerializationMethods}; // Storage structure, containing all storage, and specifying what slots they use. diff --git a/yarn-project/noir-contracts/contracts/reader_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/reader_contract/Nargo.toml index 5dcaa989be8..e6ed3649012 100644 --- a/yarn-project/noir-contracts/contracts/reader_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/reader_contract/Nargo.toml @@ -6,5 +6,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } -compressed_string = {path = "../../../aztec-nr/compressed-string"} \ No newline at end of file +compressed_string = {path = "../../../aztec-nr/compressed-string"} diff --git a/yarn-project/noir-contracts/contracts/reader_contract/src/main.nr b/yarn-project/noir-contracts/contracts/reader_contract/src/main.nr index cd98eab82b1..931a5e25501 100644 --- a/yarn-project/noir-contracts/contracts/reader_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/reader_contract/src/main.nr @@ -1,5 +1,5 @@ contract Reader { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ address::AztecAddress, abis::function_selector::FunctionSelector, }; diff --git a/yarn-project/noir-contracts/contracts/schnorr_account_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/schnorr_account_contract/Nargo.toml index 91c398753ef..d1830a40e99 100644 --- a/yarn-project/noir-contracts/contracts/schnorr_account_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/schnorr_account_contract/Nargo.toml @@ -7,4 +7,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } authwit = { path = "../../../aztec-nr/authwit" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/main.nr b/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/main.nr index 5777b63bc7d..77203a70388 100644 --- a/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/main.nr @@ -6,7 +6,7 @@ contract SchnorrAccount { use dep::std; use dep::std::option::Option; - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::{ context::{PrivateContext, Context}, diff --git a/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/public_key_note.nr b/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/public_key_note.nr index 86bf2dbf10d..3d3eb1ecfa1 100644 --- a/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/public_key_note.nr +++ b/yarn-project/noir-contracts/contracts/schnorr_account_contract/src/public_key_note.nr @@ -12,7 +12,7 @@ use dep::aztec::{ log::emit_encrypted_log, context::PrivateContext, }; -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; global PUBLIC_KEY_NOTE_LEN: Field = 3; diff --git a/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/Nargo.toml index c8864dad5f5..704cfa5bd86 100644 --- a/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } authwit = { path = "../../../aztec-nr/authwit" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/auth_oracle.nr b/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/auth_oracle.nr index 35aff5d7cca..1d43cb0816a 100644 --- a/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/auth_oracle.nr +++ b/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/auth_oracle.nr @@ -1,5 +1,5 @@ use dep::authwit::auth_witness; -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::PartialAddress, grumpkin_point::GrumpkinPoint, }; diff --git a/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/util.nr b/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/util.nr index 963b721f71d..89b328dcabe 100644 --- a/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/util.nr +++ b/yarn-project/noir-contracts/contracts/schnorr_single_key_account_contract/src/util.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::std::{schnorr::verify_signature}; use crate::auth_oracle::{AuthWitness}; diff --git a/yarn-project/noir-contracts/contracts/slow_tree_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/slow_tree_contract/Nargo.toml index dc4118019ed..6d8ba138a34 100644 --- a/yarn-project/noir-contracts/contracts/slow_tree_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/slow_tree_contract/Nargo.toml @@ -8,4 +8,3 @@ type = "contract" aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note"} slow_updates_tree = { path = "../../../aztec-nr/slow-updates-tree"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/slow_tree_contract/src/main.nr b/yarn-project/noir-contracts/contracts/slow_tree_contract/src/main.nr index 3ae10094a71..b08f2800b78 100644 --- a/yarn-project/noir-contracts/contracts/slow_tree_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/slow_tree_contract/src/main.nr @@ -6,7 +6,7 @@ mod types; // https://github.com/AztecProtocol/aztec-packages/issues/1291 // This is made as a separate contract for one thing mainly. Making it simpler to use. contract SlowTree { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/stateful_test_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/stateful_test_contract/Nargo.toml index 1a46f682f62..008324701b0 100644 --- a/yarn-project/noir-contracts/contracts/stateful_test_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/stateful_test_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } value_note = { path = "../../../aztec-nr/value-note"} -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/stateful_test_contract/src/main.nr b/yarn-project/noir-contracts/contracts/stateful_test_contract/src/main.nr index ad8afd37c97..9f02dc97bb5 100644 --- a/yarn-project/noir-contracts/contracts/stateful_test_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/stateful_test_contract/src/main.nr @@ -1,6 +1,6 @@ // A contract used for testing a random hodgepodge of small features from simulator and end-to-end tests. contract StatefulTest { - use dep::protocol_types::address::AztecAddress; + use dep::aztec::protocol_types::address::AztecAddress; use dep::std::option::Option; use dep::value_note::{ balance_utils, diff --git a/yarn-project/noir-contracts/contracts/test_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/test_contract/Nargo.toml index 48eea69c7d7..80a59556c0a 100644 --- a/yarn-project/noir-contracts/contracts/test_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/test_contract/Nargo.toml @@ -8,4 +8,3 @@ type = "contract" aztec = { path = "../../../aztec-nr/aztec" } field_note = { path = "../../../aztec-nr/field-note" } token_portal_content_hash_lib = { path = "../token_portal_content_hash_lib" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/test_contract/src/interface.nr b/yarn-project/noir-contracts/contracts/test_contract/src/interface.nr index cf1657905c2..0a42157be18 100644 --- a/yarn-project/noir-contracts/contracts/test_contract/src/interface.nr +++ b/yarn-project/noir-contracts/contracts/test_contract/src/interface.nr @@ -2,7 +2,7 @@ use dep::std; use dep::aztec::context::{ PrivateContext, PublicContext }; -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::AztecAddress, abis::function_selector::FunctionSelector, constants::RETURN_VALUES_LENGTH, diff --git a/yarn-project/noir-contracts/contracts/test_contract/src/main.nr b/yarn-project/noir-contracts/contracts/test_contract/src/main.nr index 90b2b6b3d2a..aac608c1bd8 100644 --- a/yarn-project/noir-contracts/contracts/test_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/test_contract/src/main.nr @@ -1,7 +1,7 @@ // A contract used for testing a random hodgepodge of small features from simulator and end-to-end tests. contract Test { use dep::std::option::Option; - use dep::protocol_types::address::{ + use dep::aztec::protocol_types::address::{ AztecAddress, EthAddress, }; @@ -9,7 +9,7 @@ contract Test { // It doesn't add the import because in the future we will re-export all the types via aztec-nr and aztec-nr is // already auto-imported by the macros. // TODO(https://github.com/AztecProtocol/aztec-packages/issues/3590): Remove this once the issue is fixed. - use dep::protocol_types; + use dep::aztec::protocol_types; // docs:start:unencrypted_import use dep::aztec::log::emit_unencrypted_log; // docs:end:unencrypted_import diff --git a/yarn-project/noir-contracts/contracts/token_blacklist_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/token_blacklist_contract/Nargo.toml index 7b157482941..a742335f1ef 100644 --- a/yarn-project/noir-contracts/contracts/token_blacklist_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/token_blacklist_contract/Nargo.toml @@ -9,4 +9,3 @@ aztec = { path = "../../../aztec-nr/aztec" } safe_math = { path = "../../../aztec-nr/safe-math" } field_note = { path = "../../../aztec-nr/field-note" } authwit = { path = "../../../aztec-nr/authwit" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/interfaces.nr b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/interfaces.nr index 0ff60371f71..713bf20a4a5 100644 --- a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/interfaces.nr +++ b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/interfaces.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/main.nr b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/main.nr index 529299a8a0f..0845c0ec0da 100644 --- a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/main.nr @@ -17,7 +17,7 @@ contract TokenBlacklist { use dep::std::option::Option; use dep::safe_math::SafeU120; - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balance_set.nr b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balance_set.nr index 10d4228b0e5..f0ecb079729 100644 --- a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balance_set.nr +++ b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balance_set.nr @@ -1,7 +1,7 @@ use dep::std::option::Option; use dep::safe_math::SafeU120; -use dep::protocol_types::constants::MAX_READ_REQUESTS_PER_CALL; -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::constants::MAX_READ_REQUESTS_PER_CALL; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::{ context::Context, state_vars::set::Set, diff --git a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balances_map.nr b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balances_map.nr index 946be841221..ed3c8c3fd93 100644 --- a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balances_map.nr +++ b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/balances_map.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::context::{PrivateContext, PublicContext, Context}; use dep::std::option::Option; use crate::types::balance_set::BalanceSet; diff --git a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/token_note.nr b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/token_note.nr index 88c086c4be3..8a227536191 100644 --- a/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/token_note.nr +++ b/yarn-project/noir-contracts/contracts/token_blacklist_contract/src/types/token_note.nr @@ -1,5 +1,5 @@ -use dep::protocol_types::constants::MAX_READ_REQUESTS_PER_CALL; -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::constants::MAX_READ_REQUESTS_PER_CALL; +use dep::aztec::protocol_types::address::AztecAddress; use dep::aztec::{ note::{ note_header::NoteHeader, diff --git a/yarn-project/noir-contracts/contracts/token_bridge_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/token_bridge_contract/Nargo.toml index 3e3658c42b6..c01d8689f81 100644 --- a/yarn-project/noir-contracts/contracts/token_bridge_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/token_bridge_contract/Nargo.toml @@ -7,4 +7,3 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } token_portal_content_hash_lib = { path = "../token_portal_content_hash_lib" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/token_bridge_contract/src/main.nr b/yarn-project/noir-contracts/contracts/token_bridge_contract/src/main.nr index 2fc7382cad3..ebf6c279a95 100644 --- a/yarn-project/noir-contracts/contracts/token_bridge_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/token_bridge_contract/src/main.nr @@ -7,7 +7,7 @@ mod token_interface; // Bridge has to be set as a minter on the token before it can be used contract TokenBridge { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::{ AztecAddress, diff --git a/yarn-project/noir-contracts/contracts/token_bridge_contract/src/token_interface.nr b/yarn-project/noir-contracts/contracts/token_bridge_contract/src/token_interface.nr index 721016bc305..130083d4b1d 100644 --- a/yarn-project/noir-contracts/contracts/token_bridge_contract/src/token_interface.nr +++ b/yarn-project/noir-contracts/contracts/token_bridge_contract/src/token_interface.nr @@ -1,5 +1,5 @@ // docs:start:token_bridge_token_interface -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::{ AztecAddress, diff --git a/yarn-project/noir-contracts/contracts/token_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/token_contract/Nargo.toml index 45bee129e85..322c8c882ca 100644 --- a/yarn-project/noir-contracts/contracts/token_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/token_contract/Nargo.toml @@ -9,4 +9,3 @@ aztec = { path = "../../../aztec-nr/aztec" } safe_math = { path = "../../../aztec-nr/safe-math" } compressed_string = {path = "../../../aztec-nr/compressed-string"} authwit = { path = "../../../aztec-nr/authwit" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/token_contract/src/main.nr b/yarn-project/noir-contracts/contracts/token_contract/src/main.nr index fbc21f54b08..6aa5c0f88d3 100644 --- a/yarn-project/noir-contracts/contracts/token_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/token_contract/src/main.nr @@ -32,7 +32,7 @@ contract Token { u8_serialization::{U8SerializationMethods, U8_SERIALIZED_LEN}, }, }; - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/token_contract/src/types/balance_set.nr b/yarn-project/noir-contracts/contracts/token_contract/src/types/balance_set.nr index d9273f97682..80b6a2ceedd 100644 --- a/yarn-project/noir-contracts/contracts/token_contract/src/types/balance_set.nr +++ b/yarn-project/noir-contracts/contracts/token_contract/src/types/balance_set.nr @@ -1,6 +1,6 @@ use dep::std::option::Option; use dep::safe_math::SafeU120; -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ constants::MAX_READ_REQUESTS_PER_CALL, address::AztecAddress, }; diff --git a/yarn-project/noir-contracts/contracts/token_contract/src/types/balances_map.nr b/yarn-project/noir-contracts/contracts/token_contract/src/types/balances_map.nr index 04a595e9a8f..c8a43f11d55 100644 --- a/yarn-project/noir-contracts/contracts/token_contract/src/types/balances_map.nr +++ b/yarn-project/noir-contracts/contracts/token_contract/src/types/balances_map.nr @@ -2,7 +2,7 @@ use dep::aztec::context::{PrivateContext, PublicContext, Context}; use dep::std::option::Option; use crate::types::balance_set::BalanceSet; use dep::aztec::hash::pedersen_hash; -use dep::protocol_types::address::AztecAddress; +use dep::aztec::protocol_types::address::AztecAddress; struct BalancesMap { context: Context, diff --git a/yarn-project/noir-contracts/contracts/token_contract/src/types/token_note.nr b/yarn-project/noir-contracts/contracts/token_contract/src/types/token_note.nr index b55ebdd76b7..d2d9ef68f1f 100644 --- a/yarn-project/noir-contracts/contracts/token_contract/src/types/token_note.nr +++ b/yarn-project/noir-contracts/contracts/token_contract/src/types/token_note.nr @@ -1,4 +1,4 @@ -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::AztecAddress, constants::{ MAX_READ_REQUESTS_PER_CALL diff --git a/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/Nargo.toml b/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/Nargo.toml index 951be3ceac2..9dcea17f79f 100644 --- a/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/Nargo.toml @@ -6,4 +6,3 @@ type = "lib" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } \ No newline at end of file diff --git a/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/src/lib.nr b/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/src/lib.nr index e76dd8b5ad8..2106b0a585d 100644 --- a/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/src/lib.nr +++ b/yarn-project/noir-contracts/contracts/token_portal_content_hash_lib/src/lib.nr @@ -1,5 +1,5 @@ // docs:start:mint_public_content_hash_nr -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::{ AztecAddress, EthAddress, diff --git a/yarn-project/noir-contracts/contracts/uniswap_contract/Nargo.toml b/yarn-project/noir-contracts/contracts/uniswap_contract/Nargo.toml index b711a082a7f..a35fa2c903d 100644 --- a/yarn-project/noir-contracts/contracts/uniswap_contract/Nargo.toml +++ b/yarn-project/noir-contracts/contracts/uniswap_contract/Nargo.toml @@ -7,4 +7,4 @@ type = "contract" [dependencies] aztec = { path = "../../../aztec-nr/aztec" } authwit = { path = "../../../aztec-nr/authwit" } -protocol_types = { path = "../../../noir-protocol-circuits/src/crates/types" } + diff --git a/yarn-project/noir-contracts/contracts/uniswap_contract/src/interfaces.nr b/yarn-project/noir-contracts/contracts/uniswap_contract/src/interfaces.nr index f59cc94284a..1d9c2985eb9 100644 --- a/yarn-project/noir-contracts/contracts/uniswap_contract/src/interfaces.nr +++ b/yarn-project/noir-contracts/contracts/uniswap_contract/src/interfaces.nr @@ -1,5 +1,5 @@ // docs:start:interfaces -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::{ AztecAddress, diff --git a/yarn-project/noir-contracts/contracts/uniswap_contract/src/main.nr b/yarn-project/noir-contracts/contracts/uniswap_contract/src/main.nr index 68cec00fcb4..35a4d520af1 100644 --- a/yarn-project/noir-contracts/contracts/uniswap_contract/src/main.nr +++ b/yarn-project/noir-contracts/contracts/uniswap_contract/src/main.nr @@ -6,7 +6,7 @@ mod util; // Has two separate flows for private and public respectively // Uses the token bridge contract, which tells which input token we need to talk to and handles the exit funds to L1 contract Uniswap { - use dep::protocol_types::{ + use dep::aztec::protocol_types::{ abis::function_selector::FunctionSelector, address::{ AztecAddress, diff --git a/yarn-project/noir-contracts/contracts/uniswap_contract/src/util.nr b/yarn-project/noir-contracts/contracts/uniswap_contract/src/util.nr index 7e19a7173ae..d4e7399fad7 100644 --- a/yarn-project/noir-contracts/contracts/uniswap_contract/src/util.nr +++ b/yarn-project/noir-contracts/contracts/uniswap_contract/src/util.nr @@ -1,5 +1,5 @@ // docs:start:uniswap_public_content_hash -use dep::protocol_types::{ +use dep::aztec::protocol_types::{ address::{ AztecAddress, EthAddress, @@ -107,4 +107,4 @@ pub fn compute_swap_private_content_hash( let content_hash = sha256_to_field(hash_bytes); content_hash } -// docs:end:compute_swap_private_content_hash \ No newline at end of file +// docs:end:compute_swap_private_content_hash