@aztec/end-to-end 0.0.1-commit.b1c78909e → 0.0.1-commit.b33fc05d0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  import { type EndToEndContext } from '../fixtures/utils.js';
2
2
  export declare const uniswapL1L2TestSuite: (setup: () => Promise<EndToEndContext>, cleanup: () => Promise<void>, expectedForkBlockNumber?: number) => void;
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pc3dhcF9sMV9sMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NoYXJlZC91bmlzd2FwX2wxX2wyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVCQSxPQUFPLEVBQUUsS0FBSyxlQUFlLEVBQW1DLE1BQU0sc0JBQXNCLENBQUM7QUFhN0YsZUFBTyxNQUFNLG9CQUFvQixpSEFrK0JoQyxDQUFDIn0=
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5pc3dhcF9sMV9sMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NoYXJlZC91bmlzd2FwX2wxX2wyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXVCQSxPQUFPLEVBQUUsS0FBSyxlQUFlLEVBQW1DLE1BQU0sc0JBQXNCLENBQUM7QUFhN0YsZUFBTyxNQUFNLG9CQUFvQixpSEF1K0JoQyxDQUFDIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,KAAK,eAAe,EAAmC,MAAM,sBAAsB,CAAC;AAa7F,eAAO,MAAM,oBAAoB,iHAk+BhC,CAAC"}
1
+ {"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,KAAK,eAAe,EAAmC,MAAM,sBAAsB,CAAC;AAa7F,eAAO,MAAM,oBAAoB,iHAu+BhC,CAAC"}
@@ -166,8 +166,8 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
166
166
  // ensure that uniswap contract didn't eat the funds.
167
167
  await wethCrossChainHarness.expectPublicBalanceOnL2(uniswapL2Contract.address, 0n);
168
168
  // Since the outbox is only consumable when the epoch is proven, we need to advance to the next epoch.
169
- const block = await aztecNode.getBlock(l2UniswapInteractionReceipt.blockNumber);
170
- const epoch = await rollup.getEpochNumberForCheckpoint(block.checkpointNumber);
169
+ const swapResult = await computeL2ToL1MembershipWitness(aztecNode, swapPrivateLeaf, l2UniswapInteractionReceipt.txHash);
170
+ const { epochNumber: epoch } = swapResult;
171
171
  await cheatCodes.rollup.advanceToEpoch(EpochNumber(epoch + 1));
172
172
  await waitForProven(aztecNode, l2UniswapInteractionReceipt, {
173
173
  provenTimeout: 300
@@ -175,8 +175,7 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
175
175
  // 5. Consume L2 to L1 message by calling uniswapPortal.swap_private()
176
176
  logger.info('Execute withdraw and swap on the uniswapPortal!');
177
177
  const daiL1BalanceOfPortalBeforeSwap = await daiCrossChainHarness.getL1BalanceOf(daiCrossChainHarness.tokenPortalAddress);
178
- const swapResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, swapPrivateLeaf);
179
- const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, withdrawLeaf);
178
+ const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, withdrawLeaf, l2UniswapInteractionReceipt.txHash);
180
179
  const swapPrivateL2MessageIndex = swapResult.leafIndex;
181
180
  const swapPrivateSiblingPath = swapResult.siblingPath;
182
181
  const withdrawL2MessageIndex = withdrawResult.leafIndex;
@@ -574,10 +573,9 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
574
573
  rollupVersion: new Fr(version),
575
574
  chainId: new Fr(l1Client.chain.id)
576
575
  });
577
- const block = await aztecNode.getBlock(withdrawReceipt.blockNumber);
578
- const epoch = await rollup.getEpochNumberForCheckpoint(block.checkpointNumber);
579
- const swapResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, swapPrivateLeaf);
580
- const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, withdrawLeaf);
576
+ const swapResult = await computeL2ToL1MembershipWitness(aztecNode, swapPrivateLeaf, withdrawReceipt.txHash);
577
+ const { epochNumber: epoch } = swapResult;
578
+ const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, withdrawLeaf, withdrawReceipt.txHash);
581
579
  const swapPrivateL2MessageIndex = swapResult.leafIndex;
582
580
  const swapPrivateSiblingPath = swapResult.siblingPath;
583
581
  const withdrawL2MessageIndex = withdrawResult.leafIndex;
@@ -665,10 +663,9 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
665
663
  rollupVersion: new Fr(version),
666
664
  chainId: new Fr(l1Client.chain.id)
667
665
  });
668
- const block = await aztecNode.getBlock(withdrawReceipt.blockNumber);
669
- const epoch = await rollup.getEpochNumberForCheckpoint(block.checkpointNumber);
670
- const swapResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, swapPublicLeaf);
671
- const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, withdrawLeaf);
666
+ const swapResult = await computeL2ToL1MembershipWitness(aztecNode, swapPublicLeaf, withdrawReceipt.txHash);
667
+ const { epochNumber: epoch } = swapResult;
668
+ const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, withdrawLeaf, withdrawReceipt.txHash);
672
669
  const swapPublicL2MessageIndex = swapResult.leafIndex;
673
670
  const swapPublicSiblingPath = swapResult.siblingPath;
674
671
  const withdrawL2MessageIndex = withdrawResult.leafIndex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.0.1-commit.b1c78909e",
3
+ "version": "0.0.1-commit.b33fc05d0",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -26,45 +26,45 @@
26
26
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
27
27
  },
28
28
  "dependencies": {
29
- "@aztec/accounts": "0.0.1-commit.b1c78909e",
30
- "@aztec/archiver": "0.0.1-commit.b1c78909e",
31
- "@aztec/aztec": "0.0.1-commit.b1c78909e",
32
- "@aztec/aztec-node": "0.0.1-commit.b1c78909e",
33
- "@aztec/aztec.js": "0.0.1-commit.b1c78909e",
34
- "@aztec/bb-prover": "0.0.1-commit.b1c78909e",
35
- "@aztec/bb.js": "0.0.1-commit.b1c78909e",
36
- "@aztec/blob-client": "0.0.1-commit.b1c78909e",
37
- "@aztec/blob-lib": "0.0.1-commit.b1c78909e",
38
- "@aztec/bot": "0.0.1-commit.b1c78909e",
39
- "@aztec/cli": "0.0.1-commit.b1c78909e",
40
- "@aztec/constants": "0.0.1-commit.b1c78909e",
41
- "@aztec/entrypoints": "0.0.1-commit.b1c78909e",
42
- "@aztec/epoch-cache": "0.0.1-commit.b1c78909e",
43
- "@aztec/ethereum": "0.0.1-commit.b1c78909e",
44
- "@aztec/foundation": "0.0.1-commit.b1c78909e",
45
- "@aztec/kv-store": "0.0.1-commit.b1c78909e",
46
- "@aztec/l1-artifacts": "0.0.1-commit.b1c78909e",
47
- "@aztec/merkle-tree": "0.0.1-commit.b1c78909e",
48
- "@aztec/node-keystore": "0.0.1-commit.b1c78909e",
49
- "@aztec/noir-contracts.js": "0.0.1-commit.b1c78909e",
50
- "@aztec/noir-noirc_abi": "0.0.1-commit.b1c78909e",
51
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.b1c78909e",
52
- "@aztec/noir-test-contracts.js": "0.0.1-commit.b1c78909e",
53
- "@aztec/p2p": "0.0.1-commit.b1c78909e",
54
- "@aztec/protocol-contracts": "0.0.1-commit.b1c78909e",
55
- "@aztec/prover-client": "0.0.1-commit.b1c78909e",
56
- "@aztec/prover-node": "0.0.1-commit.b1c78909e",
57
- "@aztec/pxe": "0.0.1-commit.b1c78909e",
58
- "@aztec/sequencer-client": "0.0.1-commit.b1c78909e",
59
- "@aztec/simulator": "0.0.1-commit.b1c78909e",
60
- "@aztec/slasher": "0.0.1-commit.b1c78909e",
61
- "@aztec/stdlib": "0.0.1-commit.b1c78909e",
62
- "@aztec/telemetry-client": "0.0.1-commit.b1c78909e",
63
- "@aztec/validator-client": "0.0.1-commit.b1c78909e",
64
- "@aztec/validator-ha-signer": "0.0.1-commit.b1c78909e",
65
- "@aztec/wallet-sdk": "0.0.1-commit.b1c78909e",
66
- "@aztec/wallets": "0.0.1-commit.b1c78909e",
67
- "@aztec/world-state": "0.0.1-commit.b1c78909e",
29
+ "@aztec/accounts": "0.0.1-commit.b33fc05d0",
30
+ "@aztec/archiver": "0.0.1-commit.b33fc05d0",
31
+ "@aztec/aztec": "0.0.1-commit.b33fc05d0",
32
+ "@aztec/aztec-node": "0.0.1-commit.b33fc05d0",
33
+ "@aztec/aztec.js": "0.0.1-commit.b33fc05d0",
34
+ "@aztec/bb-prover": "0.0.1-commit.b33fc05d0",
35
+ "@aztec/bb.js": "0.0.1-commit.b33fc05d0",
36
+ "@aztec/blob-client": "0.0.1-commit.b33fc05d0",
37
+ "@aztec/blob-lib": "0.0.1-commit.b33fc05d0",
38
+ "@aztec/bot": "0.0.1-commit.b33fc05d0",
39
+ "@aztec/cli": "0.0.1-commit.b33fc05d0",
40
+ "@aztec/constants": "0.0.1-commit.b33fc05d0",
41
+ "@aztec/entrypoints": "0.0.1-commit.b33fc05d0",
42
+ "@aztec/epoch-cache": "0.0.1-commit.b33fc05d0",
43
+ "@aztec/ethereum": "0.0.1-commit.b33fc05d0",
44
+ "@aztec/foundation": "0.0.1-commit.b33fc05d0",
45
+ "@aztec/kv-store": "0.0.1-commit.b33fc05d0",
46
+ "@aztec/l1-artifacts": "0.0.1-commit.b33fc05d0",
47
+ "@aztec/merkle-tree": "0.0.1-commit.b33fc05d0",
48
+ "@aztec/node-keystore": "0.0.1-commit.b33fc05d0",
49
+ "@aztec/noir-contracts.js": "0.0.1-commit.b33fc05d0",
50
+ "@aztec/noir-noirc_abi": "0.0.1-commit.b33fc05d0",
51
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.b33fc05d0",
52
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.b33fc05d0",
53
+ "@aztec/p2p": "0.0.1-commit.b33fc05d0",
54
+ "@aztec/protocol-contracts": "0.0.1-commit.b33fc05d0",
55
+ "@aztec/prover-client": "0.0.1-commit.b33fc05d0",
56
+ "@aztec/prover-node": "0.0.1-commit.b33fc05d0",
57
+ "@aztec/pxe": "0.0.1-commit.b33fc05d0",
58
+ "@aztec/sequencer-client": "0.0.1-commit.b33fc05d0",
59
+ "@aztec/simulator": "0.0.1-commit.b33fc05d0",
60
+ "@aztec/slasher": "0.0.1-commit.b33fc05d0",
61
+ "@aztec/stdlib": "0.0.1-commit.b33fc05d0",
62
+ "@aztec/telemetry-client": "0.0.1-commit.b33fc05d0",
63
+ "@aztec/validator-client": "0.0.1-commit.b33fc05d0",
64
+ "@aztec/validator-ha-signer": "0.0.1-commit.b33fc05d0",
65
+ "@aztec/wallet-sdk": "0.0.1-commit.b33fc05d0",
66
+ "@aztec/wallets": "0.0.1-commit.b33fc05d0",
67
+ "@aztec/world-state": "0.0.1-commit.b33fc05d0",
68
68
  "@iarna/toml": "^2.2.5",
69
69
  "@jest/globals": "^30.0.0",
70
70
  "@noble/curves": "=1.0.0",
@@ -252,8 +252,12 @@ export const uniswapL1L2TestSuite = (
252
252
  await wethCrossChainHarness.expectPublicBalanceOnL2(uniswapL2Contract.address, 0n);
253
253
 
254
254
  // Since the outbox is only consumable when the epoch is proven, we need to advance to the next epoch.
255
- const block = await aztecNode.getBlock(l2UniswapInteractionReceipt.blockNumber!);
256
- const epoch = await rollup.getEpochNumberForCheckpoint(block!.checkpointNumber);
255
+ const swapResult = (await computeL2ToL1MembershipWitness(
256
+ aztecNode,
257
+ swapPrivateLeaf,
258
+ l2UniswapInteractionReceipt.txHash,
259
+ ))!;
260
+ const { epochNumber: epoch } = swapResult;
257
261
  await cheatCodes.rollup.advanceToEpoch(EpochNumber(epoch + 1));
258
262
  await waitForProven(aztecNode, l2UniswapInteractionReceipt, { provenTimeout: 300 });
259
263
 
@@ -262,14 +266,17 @@ export const uniswapL1L2TestSuite = (
262
266
  const daiL1BalanceOfPortalBeforeSwap = await daiCrossChainHarness.getL1BalanceOf(
263
267
  daiCrossChainHarness.tokenPortalAddress,
264
268
  );
265
- const swapResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, swapPrivateLeaf);
266
- const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, withdrawLeaf);
269
+ const withdrawResult = (await computeL2ToL1MembershipWitness(
270
+ aztecNode,
271
+ withdrawLeaf,
272
+ l2UniswapInteractionReceipt.txHash,
273
+ ))!;
267
274
 
268
- const swapPrivateL2MessageIndex = swapResult!.leafIndex;
269
- const swapPrivateSiblingPath = swapResult!.siblingPath;
275
+ const swapPrivateL2MessageIndex = swapResult.leafIndex;
276
+ const swapPrivateSiblingPath = swapResult.siblingPath;
270
277
 
271
- const withdrawL2MessageIndex = withdrawResult!.leafIndex;
272
- const withdrawSiblingPath = withdrawResult!.siblingPath;
278
+ const withdrawL2MessageIndex = withdrawResult.leafIndex;
279
+ const withdrawSiblingPath = withdrawResult.siblingPath;
273
280
 
274
281
  const withdrawMessageMetadata = {
275
282
  _epoch: BigInt(epoch),
@@ -840,16 +847,15 @@ export const uniswapL1L2TestSuite = (
840
847
  chainId: new Fr(l1Client.chain.id),
841
848
  });
842
849
 
843
- const block = await aztecNode.getBlock(withdrawReceipt.blockNumber!);
844
- const epoch = await rollup.getEpochNumberForCheckpoint(block!.checkpointNumber);
845
- const swapResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, swapPrivateLeaf);
846
- const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, withdrawLeaf);
850
+ const swapResult = (await computeL2ToL1MembershipWitness(aztecNode, swapPrivateLeaf, withdrawReceipt.txHash))!;
851
+ const { epochNumber: epoch } = swapResult;
852
+ const withdrawResult = (await computeL2ToL1MembershipWitness(aztecNode, withdrawLeaf, withdrawReceipt.txHash))!;
847
853
 
848
- const swapPrivateL2MessageIndex = swapResult!.leafIndex;
849
- const swapPrivateSiblingPath = swapResult!.siblingPath;
854
+ const swapPrivateL2MessageIndex = swapResult.leafIndex;
855
+ const swapPrivateSiblingPath = swapResult.siblingPath;
850
856
 
851
- const withdrawL2MessageIndex = withdrawResult!.leafIndex;
852
- const withdrawSiblingPath = withdrawResult!.siblingPath;
857
+ const withdrawL2MessageIndex = withdrawResult.leafIndex;
858
+ const withdrawSiblingPath = withdrawResult.siblingPath;
853
859
 
854
860
  const withdrawMessageMetadata = {
855
861
  _epoch: BigInt(epoch),
@@ -973,16 +979,15 @@ export const uniswapL1L2TestSuite = (
973
979
  chainId: new Fr(l1Client.chain.id),
974
980
  });
975
981
 
976
- const block = await aztecNode.getBlock(withdrawReceipt.blockNumber!);
977
- const epoch = await rollup.getEpochNumberForCheckpoint(block!.checkpointNumber);
978
- const swapResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, swapPublicLeaf);
979
- const withdrawResult = await computeL2ToL1MembershipWitness(aztecNode, epoch, withdrawLeaf);
982
+ const swapResult = (await computeL2ToL1MembershipWitness(aztecNode, swapPublicLeaf, withdrawReceipt.txHash))!;
983
+ const { epochNumber: epoch } = swapResult;
984
+ const withdrawResult = (await computeL2ToL1MembershipWitness(aztecNode, withdrawLeaf, withdrawReceipt.txHash))!;
980
985
 
981
- const swapPublicL2MessageIndex = swapResult!.leafIndex;
982
- const swapPublicSiblingPath = swapResult!.siblingPath;
986
+ const swapPublicL2MessageIndex = swapResult.leafIndex;
987
+ const swapPublicSiblingPath = swapResult.siblingPath;
983
988
 
984
- const withdrawL2MessageIndex = withdrawResult!.leafIndex;
985
- const withdrawSiblingPath = withdrawResult!.siblingPath;
989
+ const withdrawL2MessageIndex = withdrawResult.leafIndex;
990
+ const withdrawSiblingPath = withdrawResult.siblingPath;
986
991
 
987
992
  const withdrawMessageMetadata = {
988
993
  _epoch: BigInt(epoch),