Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ jobs:
noir-format:
needs: [setup, changes]
runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86
if: ${{ needs.changes.outputs.noir == 'true' }}
if: ${{ needs.changes.outputs.noir == 'true' || needs.changes.outputs.noir-projects == 'true' }}
steps:
- uses: actions/checkout@v4
with: { ref: "${{ env.GIT_COMMIT }}" }
Expand Down
6 changes: 3 additions & 3 deletions noir-projects/aztec-nr/authwit/src/cheatcodes.nr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use dep::aztec::{
hash::hash_args
};

use crate::auth::{compute_inner_authwit_hash, compute_outer_authwit_hash, set_authorized};
use crate::auth::{compute_inner_authwit_hash, compute_authwit_message_hash, set_authorized};

pub fn add_private_authwit_from_call_interface<C, M, T, P, Env>(
on_behalf_of: AztecAddress,
Expand All @@ -18,7 +18,7 @@ pub fn add_private_authwit_from_call_interface<C, M, T, P, Env>(
let args_hash = hash_args(call_interface.get_args());
let selector = call_interface.get_selector();
let inner_hash = compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]);
let message_hash = compute_outer_authwit_hash(target, chain_id, version, inner_hash);
let message_hash = compute_authwit_message_hash(target, chain_id, version, inner_hash);
cheatcodes::add_authwit(on_behalf_of, message_hash);
}

Expand All @@ -36,7 +36,7 @@ pub fn add_public_authwit_from_call_interface<C, M, T, P, Env>(
let args_hash = hash_args(call_interface.get_args());
let selector = call_interface.get_selector();
let inner_hash = compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]);
let message_hash = compute_outer_authwit_hash(target, chain_id, version, inner_hash);
let message_hash = compute_authwit_message_hash(target, chain_id, version, inner_hash);
let mut inputs = cheatcodes::get_public_context_inputs();
let mut context = PublicContext::new(inputs);
set_authorized(&mut context, message_hash, true);
Expand Down