diff --git a/yarn-project/acir-simulator/src/client/db_oracle.ts b/yarn-project/acir-simulator/src/client/db_oracle.ts index 75cfc9dd79d..b77eff0e0da 100644 --- a/yarn-project/acir-simulator/src/client/db_oracle.ts +++ b/yarn-project/acir-simulator/src/client/db_oracle.ts @@ -89,9 +89,9 @@ export interface DBOracle extends CommitmentsDB { getCompleteAddress(address: AztecAddress): Promise; /** - * Retrieve the eip-1271 witness for a given message hash. + * Retrieve the auth witness for a given message hash. * @param message_hash - The message hash. - * @returns A Promise that resolves to an array of field elements representing the eip-1271 witness. + * @returns A Promise that resolves to an array of field elements representing the auth witness. */ getAuthWitness(message_hash: Fr): Promise; diff --git a/yarn-project/end-to-end/src/e2e_account_contracts.test.ts b/yarn-project/end-to-end/src/e2e_account_contracts.test.ts index 66ec2a08715..e0e179cae19 100644 --- a/yarn-project/end-to-end/src/e2e_account_contracts.test.ts +++ b/yarn-project/end-to-end/src/e2e_account_contracts.test.ts @@ -35,16 +35,14 @@ function itShouldBehaveLikeAnAccountContract( let encryptionPrivateKey: PrivateKey; beforeEach(async () => { - context = await setup(); + context = await setup(0); encryptionPrivateKey = PrivateKey.random(); - const { account: a, wallet: w } = await walletSetup( + ({ account, wallet } = await walletSetup( context.aztecRpcServer, encryptionPrivateKey, getAccountContract(encryptionPrivateKey), - ); - account = a; - wallet = w; + )); child = await ChildContract.deploy(wallet).send().deployed(); }, 60_000); diff --git a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts index 6be903cef13..5b3160bc655 100644 --- a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts @@ -80,7 +80,7 @@ describe('e2e_lending_contract', () => { }; beforeEach(async () => { - ({ aztecNode, aztecRpcServer, logger, cheatCodes: cc } = await setup()); + ({ aztecNode, aztecRpcServer, logger, cheatCodes: cc } = await setup(0)); const privateKey = PrivateKey.random(); const account = new Account(aztecRpcServer, privateKey, new AuthWitnessAccountContract(privateKey)); @@ -286,7 +286,7 @@ describe('e2e_lending_contract', () => { it('Full lending run-through', async () => { // Gotta use the actual auth witness account here and not the standard wallet. - const recipientFull = accounts[1]; + const recipientFull = accounts[0]; const recipient = recipientFull.address; const { lendingContract, priceFeedContract, collateralAsset, stableCoin } = await deployContracts(recipient); diff --git a/yarn-project/noir-contracts/src/contracts/native_token_contract/src/main.nr b/yarn-project/noir-contracts/src/contracts/native_token_contract/src/main.nr index 95ba5fd2721..508c1d12ffa 100644 --- a/yarn-project/noir-contracts/src/contracts/native_token_contract/src/main.nr +++ b/yarn-project/noir-contracts/src/contracts/native_token_contract/src/main.nr @@ -334,6 +334,7 @@ contract NativeToken { )[0]; let _callStackItem0 = context.call_private_function(from, 0x29d25ca9, [message_field]); + // Ensure that we retrieved the magic number (selector of is_valid function), otherwise revert. assert(_callStackItem0[0] == 0x29d25ca9); }