@aztec/end-to-end 0.0.0-test.1 → 0.0.1-commit.b655e406

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.
Files changed (166) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +61 -0
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
  3. package/dest/bench/client_flows/benchmark.js +261 -0
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +73 -0
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
  6. package/dest/bench/client_flows/client_flows_benchmark.js +311 -0
  7. package/dest/bench/client_flows/config.d.ts +14 -0
  8. package/dest/bench/client_flows/config.d.ts.map +1 -0
  9. package/dest/bench/client_flows/config.js +106 -0
  10. package/dest/bench/client_flows/data_extractor.d.ts +2 -0
  11. package/dest/bench/client_flows/data_extractor.d.ts.map +1 -0
  12. package/dest/bench/client_flows/data_extractor.js +99 -0
  13. package/dest/bench/utils.d.ts +10 -36
  14. package/dest/bench/utils.d.ts.map +1 -1
  15. package/dest/bench/utils.js +26 -66
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +20 -12
  17. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  18. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +85 -57
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +18 -24
  20. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  21. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +48 -69
  22. package/dest/e2e_deploy_contract/deploy_test.d.ts +14 -6
  23. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  24. package/dest/e2e_deploy_contract/deploy_test.js +13 -19
  25. package/dest/e2e_epochs/epochs_test.d.ts +58 -17
  26. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  27. package/dest/e2e_epochs/epochs_test.js +224 -43
  28. package/dest/e2e_fees/bridging_race.notest.d.ts +2 -0
  29. package/dest/e2e_fees/bridging_race.notest.d.ts.map +1 -0
  30. package/dest/e2e_fees/bridging_race.notest.js +63 -0
  31. package/dest/e2e_fees/fees_test.d.ts +20 -9
  32. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  33. package/dest/e2e_fees/fees_test.js +98 -107
  34. package/dest/e2e_l1_publisher/write_json.d.ts +10 -0
  35. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
  36. package/dest/e2e_l1_publisher/write_json.js +57 -0
  37. package/dest/e2e_multi_validator/utils.d.ts +12 -0
  38. package/dest/e2e_multi_validator/utils.d.ts.map +1 -0
  39. package/dest/e2e_multi_validator/utils.js +214 -0
  40. package/dest/e2e_nested_contract/nested_contract_test.d.ts +9 -6
  41. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  42. package/dest/e2e_nested_contract/nested_contract_test.js +22 -19
  43. package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
  44. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
  45. package/dest/e2e_p2p/inactivity_slash_test.js +135 -0
  46. package/dest/e2e_p2p/p2p_network.d.ts +69 -22
  47. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  48. package/dest/e2e_p2p/p2p_network.js +180 -129
  49. package/dest/e2e_p2p/shared.d.ts +41 -5
  50. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  51. package/dest/e2e_p2p/shared.js +163 -19
  52. package/dest/e2e_token_contract/token_contract_test.d.ts +11 -5
  53. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  54. package/dest/e2e_token_contract/token_contract_test.js +50 -26
  55. package/dest/{e2e_prover → fixtures}/e2e_prover_test.d.ts +14 -9
  56. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
  57. package/dest/{e2e_prover → fixtures}/e2e_prover_test.js +95 -100
  58. package/dest/fixtures/fixtures.d.ts +5 -6
  59. package/dest/fixtures/fixtures.d.ts.map +1 -1
  60. package/dest/fixtures/fixtures.js +4 -3
  61. package/dest/fixtures/get_acvm_config.d.ts +1 -1
  62. package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
  63. package/dest/fixtures/get_acvm_config.js +2 -14
  64. package/dest/fixtures/get_bb_config.d.ts +1 -1
  65. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  66. package/dest/fixtures/get_bb_config.js +10 -17
  67. package/dest/fixtures/l1_to_l2_messaging.d.ts +8 -5
  68. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  69. package/dest/fixtures/l1_to_l2_messaging.js +44 -18
  70. package/dest/fixtures/setup_l1_contracts.d.ts +3 -3
  71. package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
  72. package/dest/fixtures/setup_l1_contracts.js +4 -4
  73. package/dest/fixtures/setup_p2p_test.d.ts +14 -13
  74. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  75. package/dest/fixtures/setup_p2p_test.js +73 -21
  76. package/dest/fixtures/snapshot_manager.d.ts +15 -7
  77. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  78. package/dest/fixtures/snapshot_manager.js +147 -121
  79. package/dest/fixtures/token_utils.d.ts +6 -3
  80. package/dest/fixtures/token_utils.d.ts.map +1 -1
  81. package/dest/fixtures/token_utils.js +23 -10
  82. package/dest/fixtures/utils.d.ts +76 -37
  83. package/dest/fixtures/utils.d.ts.map +1 -1
  84. package/dest/fixtures/utils.js +464 -368
  85. package/dest/fixtures/web3signer.d.ts +5 -0
  86. package/dest/fixtures/web3signer.d.ts.map +1 -0
  87. package/dest/fixtures/web3signer.js +53 -0
  88. package/dest/quality_of_service/alert_checker.d.ts +1 -1
  89. package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
  90. package/dest/shared/cross_chain_test_harness.d.ts +41 -25
  91. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  92. package/dest/shared/cross_chain_test_harness.js +104 -50
  93. package/dest/shared/gas_portal_test_harness.d.ts +32 -24
  94. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  95. package/dest/shared/gas_portal_test_harness.js +50 -29
  96. package/dest/shared/jest_setup.js +1 -1
  97. package/dest/shared/submit-transactions.d.ts +5 -3
  98. package/dest/shared/submit-transactions.d.ts.map +1 -1
  99. package/dest/shared/submit-transactions.js +8 -7
  100. package/dest/shared/uniswap_l1_l2.d.ts +13 -11
  101. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  102. package/dest/shared/uniswap_l1_l2.js +138 -108
  103. package/dest/simulators/lending_simulator.d.ts +6 -6
  104. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  105. package/dest/simulators/lending_simulator.js +13 -16
  106. package/dest/simulators/token_simulator.d.ts +5 -2
  107. package/dest/simulators/token_simulator.d.ts.map +1 -1
  108. package/dest/simulators/token_simulator.js +16 -13
  109. package/dest/spartan/setup_test_wallets.d.ts +23 -10
  110. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  111. package/dest/spartan/setup_test_wallets.js +167 -58
  112. package/dest/spartan/utils.d.ts +106 -303
  113. package/dest/spartan/utils.d.ts.map +1 -1
  114. package/dest/spartan/utils.js +434 -130
  115. package/package.json +61 -56
  116. package/src/bench/client_flows/benchmark.ts +341 -0
  117. package/src/bench/client_flows/client_flows_benchmark.ts +402 -0
  118. package/src/bench/client_flows/config.ts +61 -0
  119. package/src/bench/client_flows/data_extractor.ts +111 -0
  120. package/src/bench/utils.ts +22 -76
  121. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +80 -77
  122. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +63 -105
  123. package/src/e2e_deploy_contract/deploy_test.ts +23 -38
  124. package/src/e2e_epochs/epochs_test.ts +274 -54
  125. package/src/e2e_fees/bridging_race.notest.ts +80 -0
  126. package/src/e2e_fees/fees_test.ts +137 -136
  127. package/src/e2e_l1_publisher/write_json.ts +76 -0
  128. package/src/e2e_multi_validator/utils.ts +258 -0
  129. package/src/e2e_nested_contract/nested_contract_test.ts +27 -18
  130. package/src/e2e_p2p/inactivity_slash_test.ts +178 -0
  131. package/src/e2e_p2p/p2p_network.ts +272 -166
  132. package/src/e2e_p2p/shared.ts +244 -29
  133. package/src/e2e_token_contract/token_contract_test.ts +43 -39
  134. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  135. package/src/{e2e_prover → fixtures}/e2e_prover_test.ts +101 -145
  136. package/src/fixtures/fixtures.ts +4 -3
  137. package/src/fixtures/get_acvm_config.ts +3 -11
  138. package/src/fixtures/get_bb_config.ts +18 -13
  139. package/src/fixtures/l1_to_l2_messaging.ts +53 -23
  140. package/src/fixtures/setup_l1_contracts.ts +6 -7
  141. package/src/fixtures/setup_p2p_test.ts +112 -38
  142. package/src/fixtures/snapshot_manager.ts +187 -139
  143. package/src/fixtures/token_utils.ts +29 -12
  144. package/src/fixtures/utils.ts +552 -425
  145. package/src/fixtures/web3signer.ts +63 -0
  146. package/src/guides/up_quick_start.sh +6 -14
  147. package/src/quality_of_service/alert_checker.ts +1 -1
  148. package/src/shared/cross_chain_test_harness.ts +108 -79
  149. package/src/shared/gas_portal_test_harness.ts +58 -49
  150. package/src/shared/jest_setup.ts +1 -1
  151. package/src/shared/submit-transactions.ts +12 -8
  152. package/src/shared/uniswap_l1_l2.ts +173 -176
  153. package/src/simulators/lending_simulator.ts +12 -15
  154. package/src/simulators/token_simulator.ts +21 -13
  155. package/src/spartan/DEVELOP.md +121 -0
  156. package/src/spartan/setup_test_wallets.ts +215 -93
  157. package/src/spartan/utils.ts +490 -130
  158. package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
  159. package/dest/sample-dapp/connect.js +0 -12
  160. package/dest/sample-dapp/contracts.js +0 -10
  161. package/dest/sample-dapp/deploy.js +0 -35
  162. package/dest/sample-dapp/index.js +0 -98
  163. package/src/sample-dapp/connect.mjs +0 -16
  164. package/src/sample-dapp/contracts.mjs +0 -14
  165. package/src/sample-dapp/deploy.mjs +0 -40
  166. package/src/sample-dapp/index.mjs +0 -128
@@ -1,4 +1,7 @@
1
- import { EthAddress, Fr, L1FeeJuicePortalManager, retryUntil } from '@aztec/aztec.js';
1
+ import { EthAddress } from '@aztec/aztec.js/addresses';
2
+ import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
3
+ import { Fr } from '@aztec/aztec.js/fields';
4
+ import { retryUntil } from '@aztec/foundation/retry';
2
5
  import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
3
6
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
4
7
  export class FeeJuicePortalTestingHarnessFactory {
@@ -7,16 +10,16 @@ export class FeeJuicePortalTestingHarnessFactory {
7
10
  this.config = config;
8
11
  }
9
12
  async createReal() {
10
- const { aztecNode, pxeService, publicClient, walletClient, wallet, logger } = this.config;
11
- const ethAccount = EthAddress.fromString((await walletClient.getAddresses())[0]);
12
- const l1ContractAddresses = (await pxeService.getNodeInfo()).l1ContractAddresses;
13
+ const { aztecNode, aztecNodeAdmin, l1Client, wallet, logger } = this.config;
14
+ const ethAccount = EthAddress.fromString((await l1Client.getAddresses())[0]);
15
+ const l1ContractAddresses = (await aztecNode.getNodeInfo()).l1ContractAddresses;
13
16
  const feeJuiceAddress = l1ContractAddresses.feeJuiceAddress;
14
17
  const feeJuicePortalAddress = l1ContractAddresses.feeJuicePortalAddress;
15
18
  if (feeJuiceAddress.isZero() || feeJuicePortalAddress.isZero()) {
16
19
  throw new Error('Fee Juice portal not deployed on L1');
17
20
  }
18
21
  const gasL2 = await FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, wallet);
19
- return new GasBridgingTestHarness(aztecNode, pxeService, logger, gasL2, ethAccount, feeJuicePortalAddress, feeJuiceAddress, publicClient, walletClient);
22
+ return new GasBridgingTestHarness(aztecNode, aztecNodeAdmin, wallet, logger, gasL2, ethAccount, feeJuicePortalAddress, feeJuiceAddress, l1ContractAddresses.feeAssetHandlerAddress, l1Client);
20
23
  }
21
24
  static create(config) {
22
25
  const factory = new FeeJuicePortalTestingHarnessFactory(config);
@@ -28,54 +31,62 @@ export class FeeJuicePortalTestingHarnessFactory {
28
31
  * shared between cross chain tests.
29
32
  */ export class GasBridgingTestHarness {
30
33
  aztecNode;
31
- pxeService;
34
+ aztecNodeAdmin;
35
+ wallet;
32
36
  logger;
33
37
  feeJuice;
34
38
  ethAccount;
35
39
  feeJuicePortalAddress;
36
40
  l1FeeJuiceAddress;
37
- publicClient;
38
- walletClient;
41
+ feeAssetHandlerAddress;
42
+ l1Client;
39
43
  l1TokenManager;
40
44
  feeJuicePortalManager;
41
- constructor(/** Aztec node */ aztecNode, /** Private eXecution Environment (PXE). */ pxeService, /** Logger. */ logger, /** L2 Token/Bridge contract. */ feeJuice, /** Eth account to interact with. */ ethAccount, /** Portal address. */ feeJuicePortalAddress, /** Underlying token for portal tests. */ l1FeeJuiceAddress, /** Viem Public client instance. */ publicClient, /** Viem Wallet Client instance. */ walletClient){
45
+ constructor(/** Aztec node */ aztecNode, /** Aztec node admin interface */ aztecNodeAdmin, /** Wallet. */ wallet, /** Logger. */ logger, /** L2 Token/Bridge contract. */ feeJuice, /** Eth account to interact with. */ ethAccount, /** Portal address. */ feeJuicePortalAddress, /** Underlying token for portal tests. */ l1FeeJuiceAddress, /** Fee asset handler address. */ feeAssetHandlerAddress, /** Viem Extended client instance. */ l1Client){
42
46
  this.aztecNode = aztecNode;
43
- this.pxeService = pxeService;
47
+ this.aztecNodeAdmin = aztecNodeAdmin;
48
+ this.wallet = wallet;
44
49
  this.logger = logger;
45
50
  this.feeJuice = feeJuice;
46
51
  this.ethAccount = ethAccount;
47
52
  this.feeJuicePortalAddress = feeJuicePortalAddress;
48
53
  this.l1FeeJuiceAddress = l1FeeJuiceAddress;
49
- this.publicClient = publicClient;
50
- this.walletClient = walletClient;
51
- this.feeJuicePortalManager = new L1FeeJuicePortalManager(this.feeJuicePortalAddress, this.l1FeeJuiceAddress, this.publicClient, this.walletClient, this.logger);
54
+ this.feeAssetHandlerAddress = feeAssetHandlerAddress;
55
+ this.l1Client = l1Client;
56
+ this.feeJuicePortalManager = new L1FeeJuicePortalManager(this.feeJuicePortalAddress, this.l1FeeJuiceAddress, this.feeAssetHandlerAddress, this.l1Client, this.logger);
52
57
  this.l1TokenManager = this.feeJuicePortalManager.getTokenManager();
53
58
  }
54
- async mintTokensOnL1(amount, to = this.ethAccount) {
55
- const balanceBefore = await this.l1TokenManager.getL1TokenBalance(to.toString());
56
- await this.l1TokenManager.mint(amount, to.toString());
57
- expect(await this.l1TokenManager.getL1TokenBalance(to.toString())).toEqual(balanceBefore + amount);
59
+ async mintTokensOnL1(to = this.ethAccount) {
60
+ // const balanceBefore = await this.l1TokenManager.getL1TokenBalance(to.toString());
61
+ await this.l1TokenManager.mint(to.toString());
62
+ // expect(await this.l1TokenManager.getL1TokenBalance(to.toString())).toEqual(balanceBefore + amount);
58
63
  }
59
64
  async getL1FeeJuiceBalance(address) {
60
65
  return await this.l1TokenManager.getL1TokenBalance(address.toString());
61
66
  }
62
- sendTokensToPortalPublic(bridgeAmount, l2Address, mint = false) {
63
- return this.feeJuicePortalManager.bridgeTokensPublic(l2Address, bridgeAmount, mint);
67
+ sendTokensToPortalPublic(bridgeAmount, l2Address) {
68
+ return this.feeJuicePortalManager.bridgeTokensPublic(l2Address, bridgeAmount, false);
64
69
  }
65
- async consumeMessageOnAztecAndClaimPrivately(owner, claim) {
70
+ async consumeMessageOnAztecAndClaimPrivately(owner, claimer, claim) {
66
71
  this.logger.info('Consuming messages on L2 Privately');
67
72
  const { claimAmount, claimSecret, messageLeafIndex } = claim;
68
- await this.feeJuice.methods.claim(owner, claimAmount, claimSecret, messageLeafIndex).send().wait();
73
+ await this.feeJuice.methods.claim(owner, claimAmount, claimSecret, messageLeafIndex).send({
74
+ from: claimer
75
+ }).wait();
69
76
  }
70
77
  async getL2PublicBalanceOf(owner) {
71
- return await this.feeJuice.methods.balance_of_public(owner).simulate();
78
+ return await this.feeJuice.methods.balance_of_public(owner).simulate({
79
+ from: owner
80
+ });
72
81
  }
73
82
  async expectPublicBalanceOnL2(owner, expectedBalance) {
74
83
  const balance = await this.getL2PublicBalanceOf(owner);
75
84
  expect(balance).toBe(expectedBalance);
76
85
  }
77
- async prepareTokensOnL1(bridgeAmount, owner) {
78
- const claim = await this.sendTokensToPortalPublic(bridgeAmount, owner, true);
86
+ async prepareTokensOnL1(owner) {
87
+ const bridgeAmount = await this.l1TokenManager.getMintAmount();
88
+ await this.mintTokensOnL1();
89
+ const claim = await this.sendTokensToPortalPublic(bridgeAmount, owner);
79
90
  const isSynced = async ()=>await this.aztecNode.isL1ToL2MessageSynced(Fr.fromHexString(claim.messageHash));
80
91
  await retryUntil(isSynced, `message ${claim.messageHash} sync`, 24, 1);
81
92
  // Progress by 2 L2 blocks so that the l1ToL2Message added above will be available to use on L2.
@@ -83,16 +94,26 @@ export class FeeJuicePortalTestingHarnessFactory {
83
94
  await this.advanceL2Block();
84
95
  return claim;
85
96
  }
86
- async bridgeFromL1ToL2(bridgeAmount, owner) {
97
+ async bridgeFromL1ToL2(owner, claimer) {
87
98
  // Prepare the tokens on the L1 side
88
- const claim = await this.prepareTokensOnL1(bridgeAmount, owner);
99
+ const claim = await this.prepareTokensOnL1(owner);
89
100
  // Consume L1 -> L2 message and claim tokens privately on L2
90
- await this.consumeMessageOnAztecAndClaimPrivately(owner, claim);
91
- await this.expectPublicBalanceOnL2(owner, bridgeAmount);
101
+ await this.consumeMessageOnAztecAndClaimPrivately(owner, claimer, claim);
92
102
  }
93
103
  async advanceL2Block() {
94
104
  const initialBlockNumber = await this.aztecNode.getBlockNumber();
95
- await this.aztecNode.flushTxs();
105
+ let minTxsPerBlock = undefined;
106
+ if (this.aztecNodeAdmin) {
107
+ ({ minTxsPerBlock } = await this.aztecNodeAdmin.getConfig());
108
+ await this.aztecNodeAdmin.setConfig({
109
+ minTxsPerBlock: 0
110
+ }); // Set to 0 to ensure we can advance the block
111
+ }
96
112
  await retryUntil(async ()=>await this.aztecNode.getBlockNumber() >= initialBlockNumber + 1);
113
+ if (this.aztecNodeAdmin && minTxsPerBlock !== undefined) {
114
+ await this.aztecNodeAdmin.setConfig({
115
+ minTxsPerBlock
116
+ });
117
+ }
97
118
  }
98
119
  } // docs:end:cross_chain_test_harness
@@ -1,4 +1,4 @@
1
- import { createLogger } from '@aztec/aztec.js';
1
+ import { createLogger } from '@aztec/aztec.js/log';
2
2
  import { beforeEach, expect } from '@jest/globals';
3
3
  import { basename } from 'path';
4
4
  beforeEach(()=>{
@@ -1,4 +1,6 @@
1
- import { type Logger, type SentTx, type Wallet } from '@aztec/aztec.js';
2
- import type { PXEService } from '@aztec/pxe/server';
3
- export declare const submitTxsTo: (pxe: PXEService, numTxs: number, wallet: Wallet, logger: Logger) => Promise<SentTx[]>;
1
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import type { SentTx } from '@aztec/aztec.js/contracts';
3
+ import type { Logger } from '@aztec/aztec.js/log';
4
+ import type { TestWallet } from '@aztec/test-wallet/server';
5
+ export declare const submitTxsTo: (wallet: TestWallet, submitter: AztecAddress, numTxs: number, logger: Logger) => Promise<SentTx[]>;
4
6
  //# sourceMappingURL=submit-transactions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit-transactions.d.ts","sourceRoot":"","sources":["../../src/shared/submit-transactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,MAAM,EAAY,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,WAAW,QACjB,UAAU,UACP,MAAM,UACN,MAAM,UACN,MAAM,KACb,QAAQ,MAAM,EAAE,CAqBlB,CAAC"}
1
+ {"version":3,"file":"submit-transactions.d.ts","sourceRoot":"","sources":["../../src/shared/submit-transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,eAAO,MAAM,WAAW,GACtB,QAAQ,UAAU,EAClB,WAAW,YAAY,EACvB,QAAQ,MAAM,EACd,QAAQ,MAAM,KACb,OAAO,CAAC,MAAM,EAAE,CAsBlB,CAAC"}
@@ -1,13 +1,14 @@
1
- import { getSchnorrAccount } from '@aztec/accounts/schnorr';
2
- import { Fr, GrumpkinScalar, TxStatus } from '@aztec/aztec.js';
1
+ import { Fr, GrumpkinScalar } from '@aztec/aztec.js/fields';
2
+ import { TxStatus } from '@aztec/aztec.js/tx';
3
3
  import { times } from '@aztec/foundation/collection';
4
- // submits a set of transactions to the provided Private eXecution Environment (PXE)
5
- export const submitTxsTo = async (pxe, numTxs, wallet, logger)=>{
4
+ // submits a set of transactions to the provided Wallet
5
+ export const submitTxsTo = async (wallet, submitter, numTxs, logger)=>{
6
6
  const txs = [];
7
7
  await Promise.all(times(numTxs, async ()=>{
8
- const accountManager = await getSchnorrAccount(pxe, Fr.random(), GrumpkinScalar.random(), Fr.random());
9
- const tx = accountManager.deploy({
10
- deployWallet: wallet
8
+ const accountManager = await wallet.createSchnorrAccount(Fr.random(), Fr.random(), GrumpkinScalar.random());
9
+ const deployMethod = await accountManager.getDeployMethod();
10
+ const tx = deployMethod.send({
11
+ from: submitter
11
12
  });
12
13
  const txHash = await tx.getTxHash();
13
14
  logger.info(`Tx sent with hash ${txHash}`);
@@ -1,21 +1,23 @@
1
- import { type AccountWallet, type AztecNode, type CheatCodes, type Logger, type PXE } from '@aztec/aztec.js';
2
- import { type DeployL1ContractsReturnType, type ViemPublicClient, type ViemWalletClient } from '@aztec/ethereum';
1
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import type { Logger } from '@aztec/aztec.js/log';
3
+ import type { AztecNode } from '@aztec/aztec.js/node';
4
+ import { CheatCodes } from '@aztec/aztec/testing';
5
+ import { type DeployL1ContractsReturnType, type ExtendedViemWalletClient } from '@aztec/ethereum';
6
+ import type { TestWallet } from '@aztec/test-wallet/server';
3
7
  /** Objects to be returned by the uniswap setup function */
4
8
  export type UniswapSetupContext = {
5
9
  /** Aztec Node instance */
6
10
  aztecNode: AztecNode;
7
- /** The Private eXecution Environment (PXE). */
8
- pxe: PXE;
9
11
  /** Logger instance named as the current test. */
10
12
  logger: Logger;
11
- /** Viem Public client instance. */
12
- publicClient: ViemPublicClient;
13
- /** Viem Wallet Client instance. */
14
- walletClient: ViemWalletClient;
15
- /** The owner wallet. */
16
- ownerWallet: AccountWallet;
13
+ /** The L1 wallet client, extended with public actions. */
14
+ l1Client: ExtendedViemWalletClient;
15
+ /** The wallet. */
16
+ wallet: TestWallet;
17
+ /** The owner address. */
18
+ ownerAddress: AztecAddress;
17
19
  /** The sponsor wallet. */
18
- sponsorWallet: AccountWallet;
20
+ sponsorAddress: AztecAddress;
19
21
  /** */
20
22
  deployL1ContractsValues: DeployL1ContractsReturnType;
21
23
  /** Cheat codes instance. */
@@ -1 +1 @@
1
- {"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,UAAU,EAGf,KAAK,MAAM,EACX,KAAK,GAAG,EAGT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAGtB,MAAM,iBAAiB,CAAC;AAqBzB,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,+CAA+C;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,mCAAmC;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,wBAAwB;IACxB,WAAW,EAAE,aAAa,CAAC;IAC3B,0BAA0B;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,oBAAoB,UACxB,MAAM,QAAQ,mBAAmB,CAAC,WAChC,MAAM,QAAQ,IAAI,CAAC,2CA89B7B,CAAC"}
1
+ {"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,2BAA2B,CAAC;AAIrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAI9B,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAiB5D,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,EAAE,wBAAwB,CAAC;IACnC,kBAAkB;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,0BAA0B;IAC1B,cAAc,EAAE,YAAY,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,EACzC,SAAS,MAAM,OAAO,CAAC,IAAI,CAAC,EAC5B,gCAAkC,SAg+BnC,CAAC"}