From e6496a99f2ca2963906fb31cd4c3a5ef42eba755 Mon Sep 17 00:00:00 2001 From: LHerskind Date: Tue, 28 Nov 2023 23:27:40 +0000 Subject: [PATCH] fix: update portaladdress, chainid and version --- yarn-project/acir-simulator/src/public/index.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/yarn-project/acir-simulator/src/public/index.test.ts b/yarn-project/acir-simulator/src/public/index.test.ts index 74abeab2e0b..4d985f476af 100644 --- a/yarn-project/acir-simulator/src/public/index.test.ts +++ b/yarn-project/acir-simulator/src/public/index.test.ts @@ -386,7 +386,7 @@ describe('ACIR public execution simulator', () => { const callContext = CallContext.from({ msgSender: AztecAddress.random(), storageContractAddress: contractAddress, - portalContractAddress: EthAddress.random(), + portalContractAddress: preimage.sender.sender, functionSelector: FunctionSelector.empty(), isContractDeployment: false, isDelegateCall: false, @@ -406,7 +406,14 @@ describe('ACIR public execution simulator', () => { }); const execution: PublicExecution = { contractAddress, functionData, args, callContext }; - const result = await executor.simulate(execution, GlobalVariables.empty()); + + const gv = new GlobalVariables( + new Fr(preimage.sender.chainId), + new Fr(preimage.recipient.version), + Fr.ZERO, + Fr.ZERO, + ); + const result = await executor.simulate(execution, gv); expect(result.newNullifiers.length).toEqual(1); });