@aztec/end-to-end 3.0.0-canary.a9708bd → 3.0.0-devnet.3

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 (137) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +3 -2
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/client_flows_benchmark.d.ts +16 -12
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  5. package/dest/bench/client_flows/client_flows_benchmark.js +54 -58
  6. package/dest/bench/utils.d.ts +2 -11
  7. package/dest/bench/utils.d.ts.map +1 -1
  8. package/dest/bench/utils.js +10 -34
  9. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +7 -7
  10. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  11. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +42 -42
  12. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +10 -8
  13. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  14. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +31 -33
  15. package/dest/e2e_deploy_contract/deploy_test.d.ts +10 -4
  16. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  17. package/dest/e2e_deploy_contract/deploy_test.js +9 -18
  18. package/dest/e2e_epochs/epochs_test.d.ts +9 -3
  19. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  20. package/dest/e2e_epochs/epochs_test.js +19 -13
  21. package/dest/e2e_fees/bridging_race.notest.js +12 -9
  22. package/dest/e2e_fees/fees_test.d.ts +5 -5
  23. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  24. package/dest/e2e_fees/fees_test.js +26 -33
  25. package/dest/e2e_l1_publisher/write_json.d.ts +3 -1
  26. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  27. package/dest/e2e_l1_publisher/write_json.js +5 -5
  28. package/dest/e2e_multi_validator/utils.d.ts +1 -1
  29. package/dest/e2e_multi_validator/utils.d.ts.map +1 -1
  30. package/dest/e2e_multi_validator/utils.js +3 -9
  31. package/dest/e2e_nested_contract/nested_contract_test.d.ts +6 -3
  32. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  33. package/dest/e2e_nested_contract/nested_contract_test.js +7 -9
  34. package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
  35. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
  36. package/dest/e2e_p2p/inactivity_slash_test.js +135 -0
  37. package/dest/e2e_p2p/p2p_network.d.ts +22 -8
  38. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  39. package/dest/e2e_p2p/p2p_network.js +36 -15
  40. package/dest/e2e_p2p/shared.d.ts +12 -13
  41. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  42. package/dest/e2e_p2p/shared.js +54 -54
  43. package/dest/e2e_token_contract/token_contract_test.d.ts +5 -4
  44. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  45. package/dest/e2e_token_contract/token_contract_test.js +14 -17
  46. package/dest/fixtures/e2e_prover_test.d.ts +8 -6
  47. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  48. package/dest/fixtures/e2e_prover_test.js +42 -51
  49. package/dest/fixtures/get_acvm_config.d.ts +1 -1
  50. package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
  51. package/dest/fixtures/get_bb_config.d.ts +1 -1
  52. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  53. package/dest/fixtures/get_bb_config.js +2 -2
  54. package/dest/fixtures/setup_l1_contracts.d.ts +1 -1
  55. package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
  56. package/dest/fixtures/setup_l1_contracts.js +2 -2
  57. package/dest/fixtures/setup_p2p_test.d.ts +10 -9
  58. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  59. package/dest/fixtures/setup_p2p_test.js +38 -20
  60. package/dest/fixtures/snapshot_manager.d.ts +10 -7
  61. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  62. package/dest/fixtures/snapshot_manager.js +60 -47
  63. package/dest/fixtures/token_utils.d.ts +6 -4
  64. package/dest/fixtures/token_utils.d.ts.map +1 -1
  65. package/dest/fixtures/token_utils.js +11 -15
  66. package/dest/fixtures/utils.d.ts +26 -28
  67. package/dest/fixtures/utils.d.ts.map +1 -1
  68. package/dest/fixtures/utils.js +83 -109
  69. package/dest/fixtures/web3signer.d.ts +5 -0
  70. package/dest/fixtures/web3signer.d.ts.map +1 -0
  71. package/dest/fixtures/web3signer.js +53 -0
  72. package/dest/quality_of_service/alert_checker.d.ts +1 -1
  73. package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
  74. package/dest/shared/cross_chain_test_harness.d.ts +16 -10
  75. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  76. package/dest/shared/cross_chain_test_harness.js +13 -15
  77. package/dest/shared/gas_portal_test_harness.d.ts +9 -6
  78. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  79. package/dest/shared/gas_portal_test_harness.js +10 -7
  80. package/dest/shared/jest_setup.js +1 -1
  81. package/dest/shared/submit-transactions.d.ts +5 -3
  82. package/dest/shared/submit-transactions.d.ts.map +1 -1
  83. package/dest/shared/submit-transactions.js +8 -7
  84. package/dest/shared/uniswap_l1_l2.d.ts +9 -6
  85. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  86. package/dest/shared/uniswap_l1_l2.js +29 -45
  87. package/dest/simulators/lending_simulator.d.ts +2 -1
  88. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  89. package/dest/simulators/lending_simulator.js +3 -2
  90. package/dest/simulators/token_simulator.d.ts +3 -1
  91. package/dest/simulators/token_simulator.d.ts.map +1 -1
  92. package/dest/simulators/token_simulator.js +2 -2
  93. package/dest/spartan/setup_test_wallets.d.ts +19 -13
  94. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  95. package/dest/spartan/setup_test_wallets.js +108 -85
  96. package/dest/spartan/utils.d.ts +68 -3
  97. package/dest/spartan/utils.d.ts.map +1 -1
  98. package/dest/spartan/utils.js +312 -49
  99. package/package.json +39 -38
  100. package/src/bench/client_flows/benchmark.ts +6 -6
  101. package/src/bench/client_flows/client_flows_benchmark.ts +62 -82
  102. package/src/bench/client_flows/data_extractor.ts +1 -1
  103. package/src/bench/utils.ts +9 -37
  104. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +46 -63
  105. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +33 -47
  106. package/src/e2e_deploy_contract/deploy_test.ts +17 -35
  107. package/src/e2e_epochs/epochs_test.ts +22 -19
  108. package/src/e2e_fees/bridging_race.notest.ts +14 -9
  109. package/src/e2e_fees/fees_test.ts +29 -40
  110. package/src/e2e_l1_publisher/write_json.ts +8 -6
  111. package/src/e2e_multi_validator/utils.ts +4 -10
  112. package/src/e2e_nested_contract/nested_contract_test.ts +11 -10
  113. package/src/e2e_p2p/inactivity_slash_test.ts +178 -0
  114. package/src/e2e_p2p/p2p_network.ts +110 -71
  115. package/src/e2e_p2p/shared.ts +57 -56
  116. package/src/e2e_token_contract/token_contract_test.ts +17 -17
  117. package/src/fixtures/e2e_prover_test.ts +52 -88
  118. package/src/fixtures/get_acvm_config.ts +1 -1
  119. package/src/fixtures/get_bb_config.ts +3 -2
  120. package/src/fixtures/setup_l1_contracts.ts +3 -3
  121. package/src/fixtures/setup_p2p_test.ts +60 -27
  122. package/src/fixtures/snapshot_manager.ts +80 -72
  123. package/src/fixtures/token_utils.ts +13 -21
  124. package/src/fixtures/utils.ts +95 -145
  125. package/src/fixtures/web3signer.ts +63 -0
  126. package/src/guides/up_quick_start.sh +2 -10
  127. package/src/quality_of_service/alert_checker.ts +1 -1
  128. package/src/shared/cross_chain_test_harness.ts +18 -29
  129. package/src/shared/gas_portal_test_harness.ts +12 -19
  130. package/src/shared/jest_setup.ts +1 -1
  131. package/src/shared/submit-transactions.ts +12 -8
  132. package/src/shared/uniswap_l1_l2.ts +61 -67
  133. package/src/simulators/lending_simulator.ts +3 -2
  134. package/src/simulators/token_simulator.ts +5 -2
  135. package/src/spartan/DEVELOP.md +8 -3
  136. package/src/spartan/setup_test_wallets.ts +133 -126
  137. package/src/spartan/utils.ts +373 -48
@@ -1,9 +1,11 @@
1
1
  import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
2
- import { deployFundedSchnorrAccounts, generateSchnorrAccounts, getDeployedTestAccounts, getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
2
+ import { generateSchnorrAccounts, getInitialTestAccountsData } from '@aztec/accounts/testing';
3
3
  import { createArchiver } from '@aztec/archiver';
4
4
  import { AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
5
- import { BatchCall, createAztecNodeClient, createLogger, createPXEClient, makeFetch, sleep, waitForPXE } from '@aztec/aztec.js';
5
+ import { BatchCall } from '@aztec/aztec.js/contracts';
6
6
  import { publishContractClass, publishInstance } from '@aztec/aztec.js/deployment';
7
+ import { createLogger } from '@aztec/aztec.js/log';
8
+ import { createAztecNodeClient, waitForNode } from '@aztec/aztec.js/node';
7
9
  import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
8
10
  import { createBlobSinkClient } from '@aztec/blob-sink/client';
9
11
  import { createBlobSinkServer } from '@aztec/blob-sink/server';
@@ -17,19 +19,19 @@ import { Fr } from '@aztec/foundation/fields';
17
19
  import { tryRmDir } from '@aztec/foundation/fs';
18
20
  import { withLogNameSuffix } from '@aztec/foundation/log';
19
21
  import { retryUntil } from '@aztec/foundation/retry';
20
- import { TestDateProvider } from '@aztec/foundation/timer';
22
+ import { sleep } from '@aztec/foundation/sleep';
23
+ import { DateProvider, TestDateProvider } from '@aztec/foundation/timer';
21
24
  import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
22
25
  import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
23
26
  import { MockGossipSubNetwork, getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
24
- import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
27
+ import { protocolContractsHash } from '@aztec/protocol-contracts';
25
28
  import { createProverNode } from '@aztec/prover-node';
26
- import { createPXEServiceWithSimulator, getPXEServiceConfig } from '@aztec/pxe/server';
27
- import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
28
- import { FileCircuitRecorder } from '@aztec/simulator/testing';
29
+ import { getPXEConfig } from '@aztec/pxe/server';
29
30
  import { getContractClassFromArtifact, getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
30
31
  import { tryStop } from '@aztec/stdlib/interfaces/server';
31
32
  import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
32
33
  import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
34
+ import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet/server';
33
35
  import { getGenesisValues } from '@aztec/world-state/testing';
34
36
  import fs from 'fs/promises';
35
37
  import getPort from 'get-port';
@@ -44,8 +46,8 @@ import { getBBConfig } from './get_bb_config.js';
44
46
  import { isMetricsLoggingRequested, setupMetricsLogger } from './logging.js';
45
47
  export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
46
48
  export { startAnvil };
47
- const { PXE_URL = '' } = process.env;
48
- const getAztecUrl = ()=>PXE_URL;
49
+ const { AZTEC_NODE_URL = '' } = process.env;
50
+ const getAztecUrl = ()=>AZTEC_NODE_URL;
49
51
  let telemetry = undefined;
50
52
  function getTelemetryClient(partialConfig = {}) {
51
53
  if (!telemetry) {
@@ -72,7 +74,7 @@ export const getPrivateKeyFromIndex = (index)=>{
72
74
  export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, chain = foundry)=>{
73
75
  const l1Data = await deployL1Contracts(l1RpcUrls, account, chain, logger, {
74
76
  vkTreeRoot: getVKTreeRoot(),
75
- protocolContractTreeRoot,
77
+ protocolContractsHash,
76
78
  genesisArchiveRoot: args.genesisArchiveRoot ?? new Fr(GENESIS_ARCHIVE_ROOT),
77
79
  salt: args.salt,
78
80
  initialValidators: args.initialValidators,
@@ -83,33 +85,30 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
83
85
  return l1Data;
84
86
  };
85
87
  /**
86
- * Sets up Private eXecution Environment (PXE).
88
+ * Sets up Private eXecution Environment (PXE) and returns the corresponding test wallet.
87
89
  * @param aztecNode - An instance of Aztec Node.
88
- * @param opts - Partial configuration for the PXE service.
90
+ * @param opts - Partial configuration for the PXE.
89
91
  * @param logger - The logger to be used.
90
92
  * @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
91
- * @returns Private eXecution Environment (PXE), logger and teardown function.
92
- */ export async function setupPXEService(aztecNode, opts = {}, logger = getLogger(), useLogSuffix = false) {
93
- const pxeServiceConfig = {
94
- ...getPXEServiceConfig(),
93
+ * @returns A test wallet, logger and teardown function.
94
+ */ export async function setupPXEAndGetWallet(aztecNode, opts = {}, logger = getLogger(), useLogSuffix = false) {
95
+ const PXEConfig = {
96
+ ...getPXEConfig(),
95
97
  ...opts
96
98
  };
97
99
  // For tests we only want proving enabled if specifically requested
98
- pxeServiceConfig.proverEnabled = !!opts.proverEnabled;
100
+ PXEConfig.proverEnabled = !!opts.proverEnabled;
99
101
  // If no data directory provided, create a temp directory and clean up afterwards
100
- const configuredDataDirectory = pxeServiceConfig.dataDirectory;
102
+ const configuredDataDirectory = PXEConfig.dataDirectory;
101
103
  if (!configuredDataDirectory) {
102
- pxeServiceConfig.dataDirectory = path.join(tmpdir(), randomBytes(8).toString('hex'));
104
+ PXEConfig.dataDirectory = path.join(tmpdir(), randomBytes(8).toString('hex'));
103
105
  }
104
- const simulator = new WASMSimulator();
105
- const recorder = process.env.CIRCUIT_RECORD_DIR ? new FileCircuitRecorder(process.env.CIRCUIT_RECORD_DIR) : new MemoryCircuitRecorder();
106
- const simulatorWithRecorder = new SimulatorRecorderWrapper(simulator, recorder);
107
- const pxe = await createPXEServiceWithSimulator(aztecNode, simulatorWithRecorder, pxeServiceConfig, {
106
+ const teardown = configuredDataDirectory ? ()=>Promise.resolve() : ()=>tryRmDir(PXEConfig.dataDirectory);
107
+ const wallet = await TestWallet.create(aztecNode, PXEConfig, {
108
108
  useLogSuffix
109
109
  });
110
- const teardown = configuredDataDirectory ? ()=>Promise.resolve() : ()=>tryRmDir(pxeServiceConfig.dataDirectory);
111
110
  return {
112
- pxe,
111
+ wallet,
113
112
  logger,
114
113
  teardown
115
114
  };
@@ -127,44 +126,40 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
127
126
  const aztecNodeUrl = getAztecUrl();
128
127
  logger.verbose(`Creating Aztec Node client to remote host ${aztecNodeUrl}`);
129
128
  const aztecNode = createAztecNodeClient(aztecNodeUrl);
130
- logger.verbose(`Creating PXE client to remote host ${PXE_URL}`);
131
- const pxeClient = createPXEClient(PXE_URL, {}, makeFetch([
132
- 1,
133
- 2,
134
- 3
135
- ], true));
136
- await waitForPXE(pxeClient, logger);
137
- logger.verbose('JSON RPC client connected to PXE');
138
- logger.verbose(`Retrieving contract addresses from ${PXE_URL}`);
139
- const { l1ContractAddresses, rollupVersion } = await pxeClient.getNodeInfo();
129
+ await waitForNode(aztecNode, logger);
130
+ logger.verbose('JSON RPC client connected to Aztec Node');
131
+ logger.verbose(`Retrieving contract addresses from ${aztecNodeUrl}`);
132
+ const { l1ContractAddresses, rollupVersion } = await aztecNode.getNodeInfo();
140
133
  const l1Client = createExtendedL1Client(config.l1RpcUrls, account, foundry);
141
134
  const deployL1ContractsValues = {
142
135
  l1ContractAddresses,
143
136
  l1Client,
144
137
  rollupVersion
145
138
  };
146
- const ethCheatCodes = new EthCheatCodes(config.l1RpcUrls);
147
- const cheatCodes = await CheatCodes.create(config.l1RpcUrls, pxeClient);
139
+ const ethCheatCodes = new EthCheatCodes(config.l1RpcUrls, new DateProvider());
140
+ const wallet = await TestWallet.create(aztecNode);
141
+ const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNode, new DateProvider());
148
142
  const teardown = ()=>Promise.resolve();
149
- logger.verbose('Constructing available wallets from already registered accounts...');
150
- const initialFundedAccounts = await getDeployedTestAccounts(pxeClient);
151
- const wallets = await getDeployedTestAccountsWallets(pxeClient);
152
- if (wallets.length < numberOfAccounts) {
153
- throw new Error(`Required ${numberOfAccounts} accounts. Found ${wallets.length}.`);
143
+ logger.verbose('Populating wallet from already registered accounts...');
144
+ const initialFundedAccounts = await getInitialTestAccountsData();
145
+ if (initialFundedAccounts.length < numberOfAccounts) {
146
+ throw new Error(`Required ${numberOfAccounts} accounts. Found ${initialFundedAccounts.length}.`);
154
147
  // Deploy new accounts if there's a test that requires more funded accounts in the remote environment.
155
148
  }
149
+ const testAccounts = await Promise.all(initialFundedAccounts.slice(0, numberOfAccounts).map(async (account)=>{
150
+ const accountManager = await wallet.createSchnorrAccount(account.secret, account.salt, account.signingKey);
151
+ return accountManager.address;
152
+ }));
156
153
  return {
157
154
  aztecNode,
158
155
  aztecNodeAdmin: undefined,
159
156
  sequencer: undefined,
160
157
  proverNode: undefined,
161
- pxe: pxeClient,
162
158
  deployL1ContractsValues,
163
159
  config,
164
160
  initialFundedAccounts,
165
- wallets,
166
- wallet: wallets[0],
167
- accounts: wallets.slice(0, numberOfAccounts).map((w)=>w.getAddress()),
161
+ wallet,
162
+ accounts: testAccounts,
168
163
  logger,
169
164
  cheatCodes,
170
165
  ethCheatCodes,
@@ -182,9 +177,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
182
177
  * @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated.
183
178
  * @param opts - Options to pass to the node initialization and to the setup script.
184
179
  * @param pxeOpts - Options to pass to the PXE initialization.
185
- */ export async function setup(numberOfAccounts = 1, opts = {
186
- customForwarderContractAddress: EthAddress.ZERO
187
- }, pxeOpts = {}, chain = foundry) {
180
+ */ export async function setup(numberOfAccounts = 1, opts = {}, pxeOpts = {}, chain = foundry) {
188
181
  let anvil;
189
182
  try {
190
183
  opts.aztecTargetCommitteeSize ??= 0;
@@ -213,8 +206,8 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
213
206
  if (!isAnvilTestChain(chain.id)) {
214
207
  throw new Error(`No ETHEREUM_HOSTS set but non anvil chain requested`);
215
208
  }
216
- if (PXE_URL) {
217
- throw new Error(`PXE_URL provided but no ETHEREUM_HOSTS set. Refusing to run, please set both variables so tests can deploy L1 contracts to the same Anvil instance`);
209
+ if (AZTEC_NODE_URL) {
210
+ throw new Error(`AZTEC_NODE_URL provided but no ETHEREUM_HOSTS set. Refusing to run, please set both variables so tests can deploy L1 contracts to the same Anvil instance`);
218
211
  }
219
212
  const res = await startAnvil({
220
213
  l1BlockTime: opts.ethereumSlotDuration,
@@ -232,7 +225,8 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
232
225
  logger.info(`Logging metrics to ${filename}`);
233
226
  setupMetricsLogger(filename);
234
227
  }
235
- const ethCheatCodes = new EthCheatCodesWithState(config.l1RpcUrls);
228
+ const dateProvider = new TestDateProvider();
229
+ const ethCheatCodes = new EthCheatCodesWithState(config.l1RpcUrls, dateProvider);
236
230
  if (opts.stateLoad) {
237
231
  await ethCheatCodes.loadChainState(opts.stateLoad);
238
232
  }
@@ -260,7 +254,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
260
254
  ];
261
255
  }
262
256
  config.coinbase = EthAddress.fromString(publisherHdAccount.address);
263
- if (PXE_URL) {
257
+ if (AZTEC_NODE_URL) {
264
258
  // we are setting up against a remote environment, l1 contracts are assumed to already be deployed
265
259
  return await setupWithRemoteEnvironment(publisherHdAccount, config, logger, numberOfAccounts);
266
260
  }
@@ -303,6 +297,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
303
297
  if (enableAutomine) {
304
298
  await ethCheatCodes.setAutomine(false);
305
299
  await ethCheatCodes.setIntervalMining(config.ethereumSlotDuration);
300
+ dateProvider.setTime(await ethCheatCodes.timestamp() * 1000);
306
301
  }
307
302
  if (opts.l2StartTime) {
308
303
  // This should only be used in synching test or when you need to have a stable
@@ -311,9 +306,7 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
311
306
  resetBlockInterval: true
312
307
  });
313
308
  }
314
- const dateProvider = new TestDateProvider();
315
- dateProvider.setTime(await ethCheatCodes.timestamp() * 1000);
316
- const watcher = new AnvilTestWatcher(new EthCheatCodesWithState(config.l1RpcUrls), deployL1ContractsValues.l1ContractAddresses.rollupAddress, deployL1ContractsValues.l1Client, dateProvider);
309
+ const watcher = new AnvilTestWatcher(new EthCheatCodesWithState(config.l1RpcUrls, dateProvider), deployL1ContractsValues.l1ContractAddresses.rollupAddress, deployL1ContractsValues.l1Client, dateProvider);
317
310
  if (!opts.disableAnvilTestWatcher) {
318
311
  await watcher.start();
319
312
  }
@@ -326,11 +319,11 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
326
319
  l1Contracts: config.l1Contracts,
327
320
  port: blobSinkPort,
328
321
  dataDirectory: config.dataDirectory,
329
- dataStoreMapSizeKB: config.dataStoreMapSizeKB
322
+ dataStoreMapSizeKb: config.dataStoreMapSizeKb
330
323
  }, telemetry);
331
324
  await blobSink.start();
332
325
  config.blobSinkUrl = `http://localhost:${blobSinkPort}`;
333
- logger.verbose('Creating and synching an aztec node...');
326
+ logger.verbose('Creating and synching an aztec node', config);
334
327
  const acvmConfig = await getACVMConfig(logger);
335
328
  if (acvmConfig) {
336
329
  config.acvmWorkingDirectory = acvmConfig.acvmWorkingDirectory;
@@ -341,7 +334,6 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
341
334
  config.bbBinaryPath = bbConfig.bbBinaryPath;
342
335
  config.bbWorkingDirectory = bbConfig.bbWorkingDirectory;
343
336
  }
344
- config.l1PublishRetryIntervalMS = 100;
345
337
  const blobSinkClient = createBlobSinkClient(config, {
346
338
  logger: createLogger('node:blob-sink:client')
347
339
  });
@@ -407,33 +399,31 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
407
399
  proverNode = await createAndSyncProverNode(proverNodePrivateKeyHex, config, proverNodeConfig, aztecNode, prefilledPublicData);
408
400
  }
409
401
  logger.verbose('Creating a pxe...');
410
- const { pxe, teardown: pxeTeardown } = await setupPXEService(aztecNode, pxeOpts, logger);
411
- const cheatCodes = await CheatCodes.create(config.l1RpcUrls, pxe);
402
+ const { wallet, teardown: pxeTeardown } = await setupPXEAndGetWallet(aztecNode, pxeOpts, logger);
403
+ const cheatCodes = await CheatCodes.create(config.l1RpcUrls, aztecNode, dateProvider);
412
404
  if (opts.aztecTargetCommitteeSize && opts.aztecTargetCommitteeSize > 0 || opts.initialValidators && opts.initialValidators.length > 0) {
413
- // We need to advance to epoch 2 such that the committee is set up.
414
- logger.info(`Advancing to epoch 2`);
415
- await cheatCodes.rollup.advanceToEpoch(2n, {
416
- updateDateProvider: dateProvider
417
- });
405
+ // We need to advance such that the committee is set up.
406
+ await cheatCodes.rollup.advanceToEpoch(await cheatCodes.rollup.getEpoch() + BigInt(config.lagInEpochs + 1));
418
407
  await cheatCodes.rollup.setupEpoch();
419
408
  await cheatCodes.rollup.debugRollup();
420
409
  }
410
+ let accounts = [];
421
411
  // Below we continue with what we described in the long comment on line 571.
422
- let accountManagers = [];
423
412
  if (numberOfAccounts === 0) {
424
413
  logger.info('No accounts are being deployed, waiting for an empty block 1 to be mined');
425
- while(await pxe.getBlockNumber() === 0){
414
+ while(await aztecNode.getBlockNumber() === 0){
426
415
  await sleep(2000);
427
416
  }
428
417
  } else {
429
418
  logger.info(`${numberOfAccounts} accounts are being deployed. Reliably progressing past genesis by setting minTxsPerBlock to 1 and waiting for the accounts to be deployed`);
430
- accountManagers = await deployFundedSchnorrAccounts(pxe, initialFundedAccounts.slice(0, numberOfAccounts));
419
+ const accountsData = initialFundedAccounts.slice(0, numberOfAccounts);
420
+ const accountManagers = await deployFundedSchnorrAccounts(wallet, aztecNode, accountsData);
421
+ accounts = accountManagers.map((accountManager)=>accountManager.address);
431
422
  }
432
423
  // Now we restore the original minTxsPerBlock setting.
433
424
  sequencerClient.getSequencer().updateConfig({
434
425
  minTxsPerBlock: originalMinTxsPerBlock
435
426
  });
436
- const wallets = await Promise.all(accountManagers.map((account)=>account.getWallet()));
437
427
  if (initialFundedAccounts.length < numberOfAccounts) {
438
428
  // TODO: Create (numberOfAccounts - initialFundedAccounts.length) wallets without funds.
439
429
  throw new Error(`Unable to deploy ${numberOfAccounts} accounts. Only ${initialFundedAccounts.length} accounts were funded.`);
@@ -471,13 +461,11 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
471
461
  mockGossipSubNetwork,
472
462
  prefilledPublicData,
473
463
  proverNode,
474
- pxe,
475
464
  sequencer: sequencerClient,
476
465
  teardown,
477
466
  telemetryClient: telemetry,
478
- wallets,
479
- wallet: wallets[0],
480
- accounts: wallets.map((w)=>w.getAddress()),
467
+ wallet,
468
+ accounts,
481
469
  watcher
482
470
  };
483
471
  } catch (err) {
@@ -491,45 +479,28 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
491
479
  * Use this when you need to make a public call to an account contract, such as for requesting a public authwit.
492
480
  * @param sender - Wallet to send the deployment tx.
493
481
  * @param accountsToDeploy - Which accounts to publicly deploy.
494
- */ // docs:start:public_deploy_accounts
495
- export async function ensureAccountContractsPublished(sender, accountsToDeploy) {
482
+ */ export async function ensureAccountContractsPublished(wallet, accountsToDeploy) {
496
483
  // We have to check whether the accounts are already deployed. This can happen if the test runs against
497
484
  // the sandbox and the test accounts exist
498
- const accountsAndAddresses = await Promise.all(accountsToDeploy.map(async (account)=>{
499
- const address = account.getAddress();
485
+ const accountsAndAddresses = await Promise.all(accountsToDeploy.map(async (address)=>{
500
486
  return {
501
487
  address,
502
- deployed: (await sender.getContractMetadata(address)).isContractPublished
488
+ deployed: (await wallet.getContractMetadata(address)).isContractPublished
503
489
  };
504
490
  }));
505
- const instances = (await Promise.all(accountsAndAddresses.filter(({ deployed })=>!deployed).map(({ address })=>sender.getContractMetadata(address)))).map((contractMetadata)=>contractMetadata.contractInstance);
491
+ const instances = (await Promise.all(accountsAndAddresses.filter(({ deployed })=>!deployed).map(({ address })=>wallet.getContractMetadata(address)))).map((contractMetadata)=>contractMetadata.contractInstance);
506
492
  const contractClass = await getContractClassFromArtifact(SchnorrAccountContractArtifact);
507
- if (!(await sender.getContractClassMetadata(contractClass.id, true)).isContractClassPubliclyRegistered) {
508
- await (await publishContractClass(sender, SchnorrAccountContractArtifact)).send({
509
- from: accountsToDeploy[0].getAddress()
493
+ if (!(await wallet.getContractClassMetadata(contractClass.id, true)).isContractClassPubliclyRegistered) {
494
+ await (await publishContractClass(wallet, SchnorrAccountContractArtifact)).send({
495
+ from: accountsToDeploy[0]
510
496
  }).wait();
511
497
  }
512
- const requests = await Promise.all(instances.map(async (instance)=>await publishInstance(sender, instance)));
513
- const batch = new BatchCall(sender, requests);
498
+ const requests = await Promise.all(instances.map(async (instance)=>await publishInstance(wallet, instance)));
499
+ const batch = new BatchCall(wallet, requests);
514
500
  await batch.send({
515
- from: accountsToDeploy[0].getAddress()
501
+ from: accountsToDeploy[0]
516
502
  }).wait();
517
503
  }
518
- // docs:end:public_deploy_accounts
519
- /**
520
- * Sets the timestamp of the next block.
521
- * @param rpcUrl - rpc url of the blockchain instance to connect to
522
- * @param timestamp - the timestamp for the next block
523
- */ export async function setNextBlockTimestamp(rpcUrl, timestamp) {
524
- const params = `[${timestamp}]`;
525
- await fetch(rpcUrl, {
526
- body: `{"jsonrpc":"2.0", "method": "evm_setNextBlockTimestamp", "params": ${params}, "id": 1}`,
527
- method: 'POST',
528
- headers: {
529
- 'Content-Type': 'application/json'
530
- }
531
- });
532
- }
533
504
  /** Returns the job name for the current test. */ function getJobName() {
534
505
  return process.env.JOB_NAME ?? expect.getState().currentTestName?.split(' ')[0].replaceAll('/', '_') ?? 'unknown';
535
506
  }
@@ -568,7 +539,7 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
568
539
  expect(diffs).toEqual(expectedDiffs);
569
540
  }
570
541
  /**
571
- * Computes the address of the "canonical" SponosoredFPCContract. This is not a protocol contract
542
+ * Computes the address of the "canonical" SponsoredFPCContract. This is not a protocol contract
572
543
  * but by conventions its address is computed with a salt of 0.
573
544
  * @returns The address of the sponsored FPC contract
574
545
  */ export function getSponsoredFPCInstance() {
@@ -577,7 +548,7 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
577
548
  }));
578
549
  }
579
550
  /**
580
- * Computes the address of the "canonical" SponosoredFPCContract. This is not a protocol contract
551
+ * Computes the address of the "canonical" SponsoredFPCContract. This is not a protocol contract
581
552
  * but by conventions its address is computed with a salt of 0.
582
553
  * @returns The address of the sponsored FPC contract
583
554
  */ export async function getSponsoredFPCAddress() {
@@ -586,11 +557,11 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
586
557
  }
587
558
  /**
588
559
  * Deploy a sponsored FPC contract to a running instance.
589
- */ export async function setupSponsoredFPC(pxe) {
560
+ */ export async function setupSponsoredFPC(wallet) {
590
561
  const instance = await getContractInstanceFromInstantiationParams(SponsoredFPCContract.artifact, {
591
562
  salt: new Fr(SPONSORED_FPC_SALT)
592
563
  });
593
- await pxe.registerContract({
564
+ await wallet.registerContract({
594
565
  instance,
595
566
  artifact: SponsoredFPCContract.artifact
596
567
  });
@@ -599,9 +570,9 @@ export async function expectMappingDelta(initialValues, fn, inputs, expectedDiff
599
570
  }
600
571
  /**
601
572
  * Registers the SponsoredFPC in this PXE instance
602
- * @param pxe - The pxe client
603
- */ export async function registerSponsoredFPC(pxe) {
604
- await pxe.registerContract({
573
+ * @param wallet - The wallet
574
+ */ export async function registerSponsoredFPC(wallet) {
575
+ await wallet.registerContract({
605
576
  instance: await getSponsoredFPCInstance(),
606
577
  artifact: SponsoredFPCContract.artifact
607
578
  });
@@ -648,6 +619,7 @@ export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, p
648
619
  txGatheringTimeoutMs: 24_000,
649
620
  proverNodeFailedEpochStore: undefined,
650
621
  proverId: EthAddress.fromNumber(1),
622
+ proverNodeEpochProvingDelayMs: undefined,
651
623
  ...proverNodeConfig
652
624
  };
653
625
  const l1TxUtils = createDelayedL1TxUtils(aztecNodeConfig, proverNodePrivateKey, 'prover-node', proverNodeDeps.dateProvider);
@@ -662,7 +634,9 @@ export function createAndSyncProverNode(proverNodePrivateKey, aztecNodeConfig, p
662
634
  getLogger().info(`Created and synced prover node`, {
663
635
  publisherAddress: l1TxUtils.client.account.address
664
636
  });
665
- await proverNode.start();
637
+ if (!proverNodeConfig.dontStart) {
638
+ await proverNode.start();
639
+ }
666
640
  return proverNode;
667
641
  });
668
642
  }
@@ -0,0 +1,5 @@
1
+ export declare function createWeb3SignerKeystore(dir: string, ...privateKeys: string[]): Promise<void>;
2
+ export declare function refreshWeb3Signer(url: string, ...expectedAddresses: string[]): Promise<void>;
3
+ export declare function getWeb3SignerTestKeystoreDir(): string;
4
+ export declare function getWeb3SignerUrl(): string;
5
+ //# sourceMappingURL=web3signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web3signer.d.ts","sourceRoot":"","sources":["../../src/fixtures/web3signer.ts"],"names":[],"mappings":"AASA,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,MAAM,EAAE,iBAcnF;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,iBAoBlF;AAED,wBAAgB,4BAA4B,IAAI,MAAM,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAMzC"}
@@ -0,0 +1,53 @@
1
+ import { randomBytes } from '@aztec/foundation/crypto';
2
+ import { retryUntil } from '@aztec/foundation/retry';
3
+ import { sleep } from '@aztec/foundation/sleep';
4
+ import { RemoteSigner } from '@aztec/node-keystore';
5
+ import { mkdirSync } from 'node:fs';
6
+ import { writeFile } from 'node:fs/promises';
7
+ import { join } from 'node:path';
8
+ export async function createWeb3SignerKeystore(dir, ...privateKeys) {
9
+ const yaml = privateKeys.map((pk)=>`\
10
+ type: file-raw
11
+ keyType: SECP256K1
12
+ privateKey: ${pk}`).join('\n---\n');
13
+ // NOTE: nodejs stdlib can only create temp directories, not temp files!
14
+ // this write uses wx (write-exclusive) so it'll throw if the file already exists
15
+ const path = join(dir, `keystore-${randomBytes(4).toString('hex')}.yaml`);
16
+ await writeFile(path, yaml, {
17
+ flag: 'wx'
18
+ });
19
+ }
20
+ export async function refreshWeb3Signer(url, ...expectedAddresses) {
21
+ await fetch(new URL('reload', url), {
22
+ method: 'POST'
23
+ });
24
+ if (expectedAddresses.length > 0) {
25
+ await retryUntil(async ()=>{
26
+ try {
27
+ await RemoteSigner.validateAccess(url, expectedAddresses);
28
+ return true;
29
+ } catch {
30
+ return false;
31
+ }
32
+ }, 'web3signer refresh', 10, 0.5);
33
+ } else {
34
+ await sleep(1000);
35
+ }
36
+ }
37
+ export function getWeb3SignerTestKeystoreDir() {
38
+ if (process.env.WEB3_SIGNER_TEST_KEYSTORE_DIR) {
39
+ mkdirSync(process.env.WEB3_SIGNER_TEST_KEYSTORE_DIR, {
40
+ recursive: true
41
+ });
42
+ return process.env.WEB3_SIGNER_TEST_KEYSTORE_DIR;
43
+ } else {
44
+ throw new Error('Web3signer not running');
45
+ }
46
+ }
47
+ export function getWeb3SignerUrl() {
48
+ if (process.env.WEB3_SIGNER_URL) {
49
+ return process.env.WEB3_SIGNER_URL;
50
+ } else {
51
+ throw new Error('Web3signer not running');
52
+ }
53
+ }
@@ -1,4 +1,4 @@
1
- import type { Logger } from '@aztec/aztec.js';
1
+ import type { Logger } from '@aztec/aztec.js/log';
2
2
  export interface AlertConfig {
3
3
  alert: string;
4
4
  expr: string;
@@ -1 +1 @@
1
- {"version":3,"file":"alert_checker.d.ts","sourceRoot":"","sources":["../../src/quality_of_service/alert_checker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAK9C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAQD,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAKpE;;;OAGG;IACH,OAAO,CAAC,gBAAgB;YAMV,YAAY;YAqCZ,WAAW;IAqBzB;;;OAGG;IACU,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhE;;;OAGG;IACU,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxE;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IACnC,IAAI,SAAyB;CACvC"}
1
+ {"version":3,"file":"alert_checker.d.ts","sourceRoot":"","sources":["../../src/quality_of_service/alert_checker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAKlD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAQD,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAKpE;;;OAGG;IACH,OAAO,CAAC,gBAAgB;YAMV,YAAY;YAqCZ,WAAW;IAqBzB;;;OAGG;IACU,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhE;;;OAGG;IACU,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxE;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IACnC,IAAI,SAAyB;CACvC"}
@@ -1,5 +1,15 @@
1
- import { type AccountWallet, AuthWitness, type AztecAddress, type AztecNode, EthAddress, type FieldsOf, Fr, type L2AmountClaim, type L2AmountClaimWithRecipient, type Logger, type PXE, type SiblingPath, type TxReceipt, type Wallet } from '@aztec/aztec.js';
1
+ import type { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import { EthAddress } from '@aztec/aztec.js/addresses';
3
+ import { AuthWitness } from '@aztec/aztec.js/authorization';
4
+ import { type L2AmountClaim, type L2AmountClaimWithRecipient } from '@aztec/aztec.js/ethereum';
5
+ import { Fr } from '@aztec/aztec.js/fields';
6
+ import type { Logger } from '@aztec/aztec.js/log';
7
+ import type { AztecNode } from '@aztec/aztec.js/node';
8
+ import type { SiblingPath } from '@aztec/aztec.js/trees';
9
+ import type { TxReceipt } from '@aztec/aztec.js/tx';
10
+ import type { Wallet } from '@aztec/aztec.js/wallet';
2
11
  import { type ExtendedViemWalletClient, type L1ContractAddresses } from '@aztec/ethereum';
12
+ import type { FieldsOf } from '@aztec/foundation/types';
3
13
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
4
14
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
5
15
  import { type Hex } from 'viem';
@@ -52,8 +62,6 @@ export type CrossChainContext = {
52
62
  export declare class CrossChainTestHarness {
53
63
  /** Aztec node instance. */
54
64
  aztecNode: AztecNode;
55
- /** Private eXecution Environment (PXE). */
56
- pxeService: PXE;
57
65
  /** Logger. */
58
66
  logger: Logger;
59
67
  /** L2 Token contract. */
@@ -70,18 +78,16 @@ export declare class CrossChainTestHarness {
70
78
  l1Client: ExtendedViemWalletClient;
71
79
  /** Deployment addresses for all L1 contracts */
72
80
  readonly l1ContractAddresses: L1ContractAddresses;
73
- /** Wallet of the owner. */
74
- readonly ownerWallet: AccountWallet;
81
+ /** Wallet to simulate and send txs from. */
82
+ readonly wallet: Wallet;
75
83
  /** Owner of the l2 token and bridge */
76
84
  readonly ownerAddress: AztecAddress;
77
- static new(aztecNode: AztecNode, pxeService: PXE, l1Client: ExtendedViemWalletClient, wallet: AccountWallet, ownerAddress: AztecAddress, logger: Logger, underlyingERC20Address: EthAddress): Promise<CrossChainTestHarness>;
85
+ static new(aztecNode: AztecNode, l1Client: ExtendedViemWalletClient, wallet: Wallet, ownerAddress: AztecAddress, logger: Logger, underlyingERC20Address: EthAddress): Promise<CrossChainTestHarness>;
78
86
  private readonly l1TokenManager;
79
87
  private readonly l1TokenPortalManager;
80
88
  constructor(
81
89
  /** Aztec node instance. */
82
90
  aztecNode: AztecNode,
83
- /** Private eXecution Environment (PXE). */
84
- pxeService: PXE,
85
91
  /** Logger. */
86
92
  logger: Logger,
87
93
  /** L2 Token contract. */
@@ -98,8 +104,8 @@ export declare class CrossChainTestHarness {
98
104
  l1Client: ExtendedViemWalletClient,
99
105
  /** Deployment addresses for all L1 contracts */
100
106
  l1ContractAddresses: L1ContractAddresses,
101
- /** Wallet of the owner. */
102
- ownerWallet: AccountWallet,
107
+ /** Wallet to simulate and send txs from. */
108
+ wallet: Wallet,
103
109
  /** Owner of the l2 token and bridge */
104
110
  ownerAddress: AztecAddress);
105
111
  mintTokensOnL1(amount: bigint): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"cross_chain_test_harness.d.ts","sourceRoot":"","sources":["../../src/shared/cross_chain_test_harness.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,UAAU,EACV,KAAK,QAAQ,EACb,EAAE,EAGF,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAC/B,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAoB,MAAM,iBAAiB,CAAC;AAE5G,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAK7C;;;;;;;;;GASG;AACH,wBAAsB,0CAA0C,CAC9D,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,wBAAwB,EAClC,qBAAqB,EAAE,UAAU,EACjC,KAAK,EAAE,YAAY,EACnB,sBAAsB,EAAE,UAAU,GACjC,OAAO,CAAC;IACT;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;OAEG;I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