Skip to content

Commit

Permalink
fix: update portaladdress, chainid and version
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Nov 28, 2023
1 parent 6d8557c commit e6496a9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions yarn-project/acir-simulator/src/public/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
});
Expand Down

0 comments on commit e6496a9

Please sign in to comment.