From 885fc56f6130a03d0ec4d6ede2c6e13d783372c5 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Mon, 30 Mar 2026 22:56:52 +0000 Subject: [PATCH] fix: register account in history note TXE tests after ALL_SCOPES removal --- noir-projects/aztec-nr/aztec/src/history/test.nr | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/noir-projects/aztec-nr/aztec/src/history/test.nr b/noir-projects/aztec-nr/aztec/src/history/test.nr index f8e4b8ea327e..f39e75656f92 100644 --- a/noir-projects/aztec-nr/aztec/src/history/test.nr +++ b/noir-projects/aztec-nr/aztec/src/history/test.nr @@ -6,22 +6,24 @@ use crate::{ }, test::{helpers::test_environment::TestEnvironment, mocks::mock_note::MockNote}, }; -use crate::protocol::{address::AztecAddress, traits::FromField}; pub(crate) global NOTE_STORAGE_SLOT: Field = 420; pub(crate) global NOTE_CREATED_AT: u32 = 2; pub(crate) global NOTE_NULLIFIED_AT: u32 = 3; -pub(crate) global NOTE_OWNER: AztecAddress = AztecAddress::from_field(50); pub(crate) unconstrained fn create_note() -> (TestEnvironment, HintedNote) { - let env = TestEnvironment::new(); + let mut env = TestEnvironment::new(); + + // Create a light account so the owner is registered in the keystore and included in the + // allowed scopes list, which is required for note operations. + let note_owner = env.create_light_account(); let note_message = env.private_context(|context| { let mock_note = MockNote::new(69); lifecycle_create_note( context, - NOTE_OWNER, + note_owner, NOTE_STORAGE_SLOT, mock_note.build_note(), ) @@ -32,7 +34,8 @@ pub(crate) unconstrained fn create_note() -> (TestEnvironment, HintedNote