Skip to content

Commit

Permalink
chore: exterminate eip-1271 survivor
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Sep 4, 2023
1 parent f01511f commit 685a5ca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions yarn-project/acir-simulator/src/client/db_oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ export interface DBOracle extends CommitmentsDB {
getCompleteAddress(address: AztecAddress): Promise<CompleteAddress>;

/**
* 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<Fr[]>;

Expand Down
8 changes: 3 additions & 5 deletions yarn-project/end-to-end/src/e2e_account_contracts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/end-to-end/src/e2e_lending_contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 685a5ca

Please sign in to comment.