Skip to content

Commit 5b38b33

Browse files
committed
fix(authwit): update split-time consumer imports
- schnorr/simulated_schnorr account contracts and uniswap_contract still imported authwit::common::*; rename the path to authwit::utils::* to match the split. - app_subscription_contract: revert the spurious 'use public_checks::utils::privately_check_block_number' (the public_checks crate is no longer a separate crate after #23215 moved the helpers into aztec-nr) back to 'use aztec::public_checks::privately_check_block_number'.
1 parent 60a9ee0 commit 5b38b33

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

  • noir-projects
    • aztec-nr/aztec/src/authwit
    • noir-contracts/contracts
      • account
        • schnorr_account_contract/src
        • simulated_ecdsa_account_contract/src
        • simulated_schnorr_account_contract/src
      • app

noir-projects/aztec-nr/aztec/src/authwit/public.nr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{authwit::utils::{compute_inner_authwit_hash, IS_VALID_SELECTOR}, context::{gas::GasOpts, PublicContext}};
22
use crate::protocol::{abis::function_selector::FunctionSelector, address::AztecAddress, traits::ToField};
3-
use crate::standard_addresses::AUTH_REGISTRY_ADDRESS;
3+
use crate::standard_addresses::STANDARD_AUTH_REGISTRY_ADDRESS;
44

55
/// Public-flow authwit helpers.
66
///
@@ -87,7 +87,7 @@ pub unconstrained fn assert_inner_hash_valid_authwit_public(
8787
inner_hash: Field,
8888
) {
8989
let results: [Field] = context.call_public_function(
90-
AUTH_REGISTRY_ADDRESS,
90+
STANDARD_AUTH_REGISTRY_ADDRESS,
9191
comptime { FunctionSelector::from_signature("consume((Field),Field)") },
9292
[on_behalf_of.to_field(), inner_hash],
9393
GasOpts::default(),
@@ -104,7 +104,7 @@ pub unconstrained fn assert_inner_hash_valid_authwit_public(
104104
/// false if it should be revoked
105105
pub unconstrained fn set_authorized(context: PublicContext, message_hash: Field, authorize: bool) {
106106
let res = context.call_public_function(
107-
AUTH_REGISTRY_ADDRESS,
107+
STANDARD_AUTH_REGISTRY_ADDRESS,
108108
comptime { FunctionSelector::from_signature("set_authorized(Field,bool)") },
109109
[message_hash, authorize as Field],
110110
GasOpts::default(),
@@ -119,7 +119,7 @@ pub unconstrained fn set_authorized(context: PublicContext, message_hash: Field,
119119
/// @param reject True if all authwits should be rejected, false otherwise
120120
pub unconstrained fn set_reject_all(context: PublicContext, reject: bool) {
121121
let res = context.call_public_function(
122-
AUTH_REGISTRY_ADDRESS,
122+
STANDARD_AUTH_REGISTRY_ADDRESS,
123123
comptime { FunctionSelector::from_signature("set_reject_all(bool)") },
124124
[reject as Field],
125125
GasOpts::default(),

noir-projects/noir-contracts/contracts/account/schnorr_account_contract/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub contract SchnorrAccount {
99
use aztec::{
1010
authwit::{
1111
account::AccountActions,
12-
common::{compute_authwit_message_hash, compute_authwit_nullifier},
1312
entrypoint::app::AppPayload,
13+
utils::{compute_authwit_message_hash, compute_authwit_nullifier},
1414
},
1515
context::PrivateContext,
1616
hash::compute_siloed_nullifier,

noir-projects/noir-contracts/contracts/account/simulated_ecdsa_account_contract/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use aztec::macros::aztec;
88
#[aztec]
99
pub contract SimulatedEcdsaAccount {
1010
use aztec::{
11-
authwit::{account::AccountActions, common::IS_VALID_SELECTOR, entrypoint::app::AppPayload},
11+
authwit::{account::AccountActions, entrypoint::app::AppPayload, utils::IS_VALID_SELECTOR},
1212
context::PrivateContext,
1313
macros::{functions::{allow_phase_change, external, view}, storage::storage},
1414
messages::encoding::MESSAGE_CIPHERTEXT_LEN,

noir-projects/noir-contracts/contracts/account/simulated_schnorr_account_contract/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use aztec::macros::aztec;
1010
#[aztec]
1111
pub contract SimulatedSchnorrAccount {
1212
use aztec::{
13-
authwit::{account::AccountActions, common::IS_VALID_SELECTOR, entrypoint::app::AppPayload},
13+
authwit::{account::AccountActions, entrypoint::app::AppPayload, utils::IS_VALID_SELECTOR},
1414
context::PrivateContext,
1515
macros::{functions::{allow_phase_change, external, view}, storage::storage},
1616
messages::encoding::MESSAGE_CIPHERTEXT_LEN,

noir-projects/noir-contracts/contracts/app/app_subscription_contract/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub contract AppSubscription {
5252
state_vars::{Owned, PrivateMutable, PublicImmutable},
5353
utils::comparison::Comparator,
5454
};
55-
use public_checks::utils::privately_check_block_number;
55+
use aztec::public_checks::privately_check_block_number;
5656
use token::Token;
5757

5858
#[storage]

noir-projects/noir-contracts/contracts/app/uniswap_contract/src/main.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use aztec::macros::aztec;
99
pub contract Uniswap {
1010
use aztec::{
1111
authwit::{
12-
common::compute_authwit_message_hash_from_call,
1312
public::{assert_current_call_valid_authwit_public, set_authorized},
13+
utils::compute_authwit_message_hash_from_call,
1414
},
1515
macros::{functions::{external, initializer, only_self}, storage::storage},
1616
protocol::{abis::function_selector::FunctionSelector, address::{AztecAddress, EthAddress}, traits::ToField},

0 commit comments

Comments
 (0)