@aztec/end-to-end 0.0.1-commit.d1f2d6c → 0.0.1-commit.d431d1c

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 (122) hide show
  1. package/dest/bench/client_flows/client_flows_benchmark.d.ts +1 -1
  2. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
  3. package/dest/bench/client_flows/client_flows_benchmark.js +13 -28
  4. package/dest/bench/utils.d.ts +4 -5
  5. package/dest/bench/utils.d.ts.map +1 -1
  6. package/dest/bench/utils.js +7 -9
  7. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +1 -1
  8. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  9. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +8 -7
  10. package/dest/e2e_epochs/epochs_test.d.ts +1 -1
  11. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  12. package/dest/e2e_epochs/epochs_test.js +0 -3
  13. package/dest/e2e_fees/bridging_race.notest.js +1 -1
  14. package/dest/e2e_fees/fees_test.d.ts +1 -1
  15. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  16. package/dest/e2e_fees/fees_test.js +6 -6
  17. package/dest/e2e_l1_publisher/write_json.d.ts +3 -3
  18. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
  19. package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
  20. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  21. package/dest/e2e_nested_contract/nested_contract_test.js +2 -2
  22. package/dest/e2e_p2p/p2p_network.d.ts +1 -1
  23. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  24. package/dest/e2e_p2p/p2p_network.js +1 -4
  25. package/dest/e2e_p2p/shared.d.ts +6 -6
  26. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  27. package/dest/e2e_p2p/shared.js +14 -7
  28. package/dest/e2e_token_contract/token_contract_test.d.ts +1 -1
  29. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  30. package/dest/e2e_token_contract/token_contract_test.js +3 -3
  31. package/dest/fixtures/e2e_prover_test.d.ts +1 -1
  32. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
  33. package/dest/fixtures/e2e_prover_test.js +4 -7
  34. package/dest/fixtures/setup.d.ts +1 -1
  35. package/dest/fixtures/setup.d.ts.map +1 -1
  36. package/dest/fixtures/setup.js +5 -5
  37. package/dest/fixtures/token_utils.d.ts +1 -1
  38. package/dest/fixtures/token_utils.d.ts.map +1 -1
  39. package/dest/fixtures/token_utils.js +4 -7
  40. package/dest/shared/cross_chain_test_harness.d.ts +4 -3
  41. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  42. package/dest/shared/cross_chain_test_harness.js +11 -11
  43. package/dest/shared/gas_portal_test_harness.js +1 -1
  44. package/dest/shared/submit-transactions.d.ts +3 -3
  45. package/dest/shared/submit-transactions.d.ts.map +1 -1
  46. package/dest/shared/submit-transactions.js +11 -9
  47. package/dest/shared/uniswap_l1_l2.d.ts +1 -1
  48. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  49. package/dest/shared/uniswap_l1_l2.js +12 -12
  50. package/dest/simulators/lending_simulator.js +2 -2
  51. package/dest/spartan/setup_test_wallets.d.ts +1 -1
  52. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  53. package/dest/spartan/setup_test_wallets.js +34 -61
  54. package/dest/spartan/tx_metrics.d.ts +2 -4
  55. package/dest/spartan/tx_metrics.d.ts.map +1 -1
  56. package/dest/spartan/tx_metrics.js +4 -28
  57. package/dest/spartan/utils.d.ts +260 -2
  58. package/dest/spartan/utils.d.ts.map +1 -1
  59. package/dest/spartan/utils.js +942 -1
  60. package/package.json +39 -39
  61. package/src/bench/client_flows/client_flows_benchmark.ts +24 -11
  62. package/src/bench/utils.ts +7 -9
  63. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +12 -9
  64. package/src/e2e_epochs/epochs_test.ts +24 -29
  65. package/src/e2e_fees/bridging_race.notest.ts +4 -1
  66. package/src/e2e_fees/fees_test.ts +14 -10
  67. package/src/e2e_l1_publisher/write_json.ts +2 -2
  68. package/src/e2e_nested_contract/nested_contract_test.ts +4 -2
  69. package/src/e2e_p2p/p2p_network.ts +9 -14
  70. package/src/e2e_p2p/shared.ts +20 -10
  71. package/src/e2e_token_contract/token_contract_test.ts +5 -3
  72. package/src/fixtures/e2e_prover_test.ts +8 -3
  73. package/src/fixtures/setup.ts +12 -8
  74. package/src/fixtures/token_utils.ts +5 -6
  75. package/src/shared/cross_chain_test_harness.ts +27 -13
  76. package/src/shared/gas_portal_test_harness.ts +1 -1
  77. package/src/shared/submit-transactions.ts +15 -9
  78. package/src/shared/uniswap_l1_l2.ts +19 -12
  79. package/src/simulators/lending_simulator.ts +2 -2
  80. package/src/spartan/setup_test_wallets.ts +24 -72
  81. package/src/spartan/tx_metrics.ts +7 -26
  82. package/src/spartan/utils.ts +1246 -1
  83. package/dest/spartan/utils/bot.d.ts +0 -27
  84. package/dest/spartan/utils/bot.d.ts.map +0 -1
  85. package/dest/spartan/utils/bot.js +0 -141
  86. package/dest/spartan/utils/chaos.d.ts +0 -79
  87. package/dest/spartan/utils/chaos.d.ts.map +0 -1
  88. package/dest/spartan/utils/chaos.js +0 -142
  89. package/dest/spartan/utils/clients.d.ts +0 -39
  90. package/dest/spartan/utils/clients.d.ts.map +0 -1
  91. package/dest/spartan/utils/clients.js +0 -90
  92. package/dest/spartan/utils/config.d.ts +0 -36
  93. package/dest/spartan/utils/config.d.ts.map +0 -1
  94. package/dest/spartan/utils/config.js +0 -20
  95. package/dest/spartan/utils/health.d.ts +0 -63
  96. package/dest/spartan/utils/health.d.ts.map +0 -1
  97. package/dest/spartan/utils/health.js +0 -202
  98. package/dest/spartan/utils/helm.d.ts +0 -15
  99. package/dest/spartan/utils/helm.d.ts.map +0 -1
  100. package/dest/spartan/utils/helm.js +0 -47
  101. package/dest/spartan/utils/index.d.ts +0 -9
  102. package/dest/spartan/utils/index.d.ts.map +0 -1
  103. package/dest/spartan/utils/index.js +0 -18
  104. package/dest/spartan/utils/k8s.d.ts +0 -98
  105. package/dest/spartan/utils/k8s.d.ts.map +0 -1
  106. package/dest/spartan/utils/k8s.js +0 -257
  107. package/dest/spartan/utils/nodes.d.ts +0 -31
  108. package/dest/spartan/utils/nodes.d.ts.map +0 -1
  109. package/dest/spartan/utils/nodes.js +0 -290
  110. package/dest/spartan/utils/scripts.d.ts +0 -16
  111. package/dest/spartan/utils/scripts.d.ts.map +0 -1
  112. package/dest/spartan/utils/scripts.js +0 -66
  113. package/src/spartan/utils/bot.ts +0 -185
  114. package/src/spartan/utils/chaos.ts +0 -253
  115. package/src/spartan/utils/clients.ts +0 -100
  116. package/src/spartan/utils/config.ts +0 -26
  117. package/src/spartan/utils/health.ts +0 -255
  118. package/src/spartan/utils/helm.ts +0 -84
  119. package/src/spartan/utils/index.ts +0 -62
  120. package/src/spartan/utils/k8s.ts +0 -375
  121. package/src/spartan/utils/nodes.ts +0 -323
  122. package/src/spartan/utils/scripts.ts +0 -63
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.0.1-commit.d1f2d6c",
3
+ "version": "0.0.1-commit.d431d1c",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -25,44 +25,44 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "0.0.1-commit.d1f2d6c",
29
- "@aztec/archiver": "0.0.1-commit.d1f2d6c",
30
- "@aztec/aztec": "0.0.1-commit.d1f2d6c",
31
- "@aztec/aztec-node": "0.0.1-commit.d1f2d6c",
32
- "@aztec/aztec.js": "0.0.1-commit.d1f2d6c",
33
- "@aztec/bb-prover": "0.0.1-commit.d1f2d6c",
34
- "@aztec/bb.js": "0.0.1-commit.d1f2d6c",
35
- "@aztec/blob-client": "0.0.1-commit.d1f2d6c",
36
- "@aztec/blob-lib": "0.0.1-commit.d1f2d6c",
37
- "@aztec/bot": "0.0.1-commit.d1f2d6c",
38
- "@aztec/cli": "0.0.1-commit.d1f2d6c",
39
- "@aztec/constants": "0.0.1-commit.d1f2d6c",
40
- "@aztec/entrypoints": "0.0.1-commit.d1f2d6c",
41
- "@aztec/epoch-cache": "0.0.1-commit.d1f2d6c",
42
- "@aztec/ethereum": "0.0.1-commit.d1f2d6c",
43
- "@aztec/foundation": "0.0.1-commit.d1f2d6c",
44
- "@aztec/kv-store": "0.0.1-commit.d1f2d6c",
45
- "@aztec/l1-artifacts": "0.0.1-commit.d1f2d6c",
46
- "@aztec/merkle-tree": "0.0.1-commit.d1f2d6c",
47
- "@aztec/node-keystore": "0.0.1-commit.d1f2d6c",
48
- "@aztec/noir-contracts.js": "0.0.1-commit.d1f2d6c",
49
- "@aztec/noir-noirc_abi": "0.0.1-commit.d1f2d6c",
50
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.d1f2d6c",
51
- "@aztec/noir-test-contracts.js": "0.0.1-commit.d1f2d6c",
52
- "@aztec/p2p": "0.0.1-commit.d1f2d6c",
53
- "@aztec/protocol-contracts": "0.0.1-commit.d1f2d6c",
54
- "@aztec/prover-client": "0.0.1-commit.d1f2d6c",
55
- "@aztec/prover-node": "0.0.1-commit.d1f2d6c",
56
- "@aztec/pxe": "0.0.1-commit.d1f2d6c",
57
- "@aztec/sequencer-client": "0.0.1-commit.d1f2d6c",
58
- "@aztec/simulator": "0.0.1-commit.d1f2d6c",
59
- "@aztec/slasher": "0.0.1-commit.d1f2d6c",
60
- "@aztec/stdlib": "0.0.1-commit.d1f2d6c",
61
- "@aztec/telemetry-client": "0.0.1-commit.d1f2d6c",
62
- "@aztec/test-wallet": "0.0.1-commit.d1f2d6c",
63
- "@aztec/validator-client": "0.0.1-commit.d1f2d6c",
64
- "@aztec/validator-ha-signer": "0.0.1-commit.d1f2d6c",
65
- "@aztec/world-state": "0.0.1-commit.d1f2d6c",
28
+ "@aztec/accounts": "0.0.1-commit.d431d1c",
29
+ "@aztec/archiver": "0.0.1-commit.d431d1c",
30
+ "@aztec/aztec": "0.0.1-commit.d431d1c",
31
+ "@aztec/aztec-node": "0.0.1-commit.d431d1c",
32
+ "@aztec/aztec.js": "0.0.1-commit.d431d1c",
33
+ "@aztec/bb-prover": "0.0.1-commit.d431d1c",
34
+ "@aztec/bb.js": "0.0.1-commit.d431d1c",
35
+ "@aztec/blob-client": "0.0.1-commit.d431d1c",
36
+ "@aztec/blob-lib": "0.0.1-commit.d431d1c",
37
+ "@aztec/bot": "0.0.1-commit.d431d1c",
38
+ "@aztec/cli": "0.0.1-commit.d431d1c",
39
+ "@aztec/constants": "0.0.1-commit.d431d1c",
40
+ "@aztec/entrypoints": "0.0.1-commit.d431d1c",
41
+ "@aztec/epoch-cache": "0.0.1-commit.d431d1c",
42
+ "@aztec/ethereum": "0.0.1-commit.d431d1c",
43
+ "@aztec/foundation": "0.0.1-commit.d431d1c",
44
+ "@aztec/kv-store": "0.0.1-commit.d431d1c",
45
+ "@aztec/l1-artifacts": "0.0.1-commit.d431d1c",
46
+ "@aztec/merkle-tree": "0.0.1-commit.d431d1c",
47
+ "@aztec/node-keystore": "0.0.1-commit.d431d1c",
48
+ "@aztec/noir-contracts.js": "0.0.1-commit.d431d1c",
49
+ "@aztec/noir-noirc_abi": "0.0.1-commit.d431d1c",
50
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.d431d1c",
51
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.d431d1c",
52
+ "@aztec/p2p": "0.0.1-commit.d431d1c",
53
+ "@aztec/protocol-contracts": "0.0.1-commit.d431d1c",
54
+ "@aztec/prover-client": "0.0.1-commit.d431d1c",
55
+ "@aztec/prover-node": "0.0.1-commit.d431d1c",
56
+ "@aztec/pxe": "0.0.1-commit.d431d1c",
57
+ "@aztec/sequencer-client": "0.0.1-commit.d431d1c",
58
+ "@aztec/simulator": "0.0.1-commit.d431d1c",
59
+ "@aztec/slasher": "0.0.1-commit.d431d1c",
60
+ "@aztec/stdlib": "0.0.1-commit.d431d1c",
61
+ "@aztec/telemetry-client": "0.0.1-commit.d431d1c",
62
+ "@aztec/test-wallet": "0.0.1-commit.d431d1c",
63
+ "@aztec/validator-client": "0.0.1-commit.d431d1c",
64
+ "@aztec/validator-ha-signer": "0.0.1-commit.d431d1c",
65
+ "@aztec/world-state": "0.0.1-commit.d431d1c",
66
66
  "@iarna/toml": "^2.2.5",
67
67
  "@jest/globals": "^30.0.0",
68
68
  "@noble/curves": "=1.0.0",
@@ -156,7 +156,8 @@ export class ClientFlowsBenchmark {
156
156
  const { claimSecret: secret, messageLeafIndex: index } = claim;
157
157
  await this.feeJuiceContract.methods
158
158
  .claim(address, claim.claimAmount, secret, index)
159
- .send({ from: this.adminAddress });
159
+ .send({ from: this.adminAddress })
160
+ .wait();
160
161
  }
161
162
 
162
163
  /** Admin mints bananaCoin tokens privately to the target address and redeems them. */
@@ -251,7 +252,9 @@ export class ClientFlowsBenchmark {
251
252
  'BC',
252
253
  'BC',
253
254
  18n,
254
- ).send({ from: this.adminAddress, wait: { returnReceipt: true } });
255
+ )
256
+ .send({ from: this.adminAddress })
257
+ .wait();
255
258
  this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
256
259
  this.bananaCoin = bananaCoin;
257
260
  this.bananaCoinInstance = bananaCoinInstance;
@@ -265,7 +268,9 @@ export class ClientFlowsBenchmark {
265
268
  'CBC',
266
269
  'CBC',
267
270
  18n,
268
- ).send({ from: this.adminAddress, wait: { returnReceipt: true } });
271
+ )
272
+ .send({ from: this.adminAddress })
273
+ .wait();
269
274
  this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
270
275
  this.candyBarCoin = candyBarCoin;
271
276
  this.candyBarCoinInstance = candyBarCoinInstance;
@@ -281,7 +286,9 @@ export class ClientFlowsBenchmark {
281
286
  this.adminWallet,
282
287
  bananaCoin.address,
283
288
  this.adminAddress,
284
- ).send({ from: this.adminAddress, wait: { returnReceipt: true } });
289
+ )
290
+ .send({ from: this.adminAddress })
291
+ .wait();
285
292
 
286
293
  this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
287
294
 
@@ -329,10 +336,12 @@ export class ClientFlowsBenchmark {
329
336
  const benchysAddress = benchysAccountManager.address;
330
337
  const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(benchysAddress);
331
338
  const behchysDeployMethod = await benchysAccountManager.getDeployMethod();
332
- await behchysDeployMethod.send({
333
- from: AztecAddress.ZERO,
334
- fee: { paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim) },
335
- });
339
+ await behchysDeployMethod
340
+ .send({
341
+ from: AztecAddress.ZERO,
342
+ fee: { paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim) },
343
+ })
344
+ .wait();
336
345
  // Register benchy on the user's Wallet, where we're going to be interacting from
337
346
  const accountManager = await this.userWallet.createAccount({
338
347
  secret: benchysAccount.getSecretKey(),
@@ -350,15 +359,19 @@ export class ClientFlowsBenchmark {
350
359
  'LPT',
351
360
  'LPT',
352
361
  18n,
353
- ).send({ from: this.adminAddress, wait: { returnReceipt: true } });
362
+ )
363
+ .send({ from: this.adminAddress })
364
+ .wait();
354
365
  const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
355
366
  this.adminWallet,
356
367
  this.bananaCoin.address,
357
368
  this.candyBarCoin.address,
358
369
  liquidityToken.address,
359
- ).send({ from: this.adminAddress, wait: { returnReceipt: true } });
370
+ )
371
+ .send({ from: this.adminAddress })
372
+ .wait();
360
373
  this.logger.info(`AMM deployed at ${amm.address}`);
361
- await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress });
374
+ await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress }).wait();
362
375
  this.liquidityToken = liquidityToken;
363
376
  this.liquidityTokenInstance = liquidityTokenInstance;
364
377
  this.amm = amm;
@@ -1,10 +1,8 @@
1
1
  import type { AztecNodeService } from '@aztec/aztec-node';
2
2
  import { AztecAddress } from '@aztec/aztec.js/addresses';
3
- import { BatchCall, NO_WAIT, type WaitOpts } from '@aztec/aztec.js/contracts';
4
- import { waitForTx } from '@aztec/aztec.js/node';
3
+ import { BatchCall, type SentTx, type WaitOpts } from '@aztec/aztec.js/contracts';
5
4
  import { mean, stdDev, times } from '@aztec/foundation/collection';
6
5
  import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
7
- import type { TxHash } from '@aztec/stdlib/tx';
8
6
  import type { MetricDefinition } from '@aztec/telemetry-client';
9
7
  import type { BenchmarkDataPoint, BenchmarkMetricsType, BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
10
8
 
@@ -25,7 +23,7 @@ export async function benchmarkSetup(
25
23
  ) {
26
24
  const context = await setup(1, { ...opts, telemetryConfig: { benchmark: true } });
27
25
  const defaultAccountAddress = context.accounts[0];
28
- const contract = await BenchmarkingContract.deploy(context.wallet).send({ from: defaultAccountAddress });
26
+ const contract = await BenchmarkingContract.deploy(context.wallet).send({ from: defaultAccountAddress }).deployed();
29
27
  context.logger.info(`Deployed benchmarking contract at ${contract.address}`);
30
28
  const sequencer = (context.aztecNode as AztecNodeService).getSequencer()!;
31
29
  const telemetry = context.telemetryClient! as BenchmarkTelemetryClient;
@@ -144,18 +142,18 @@ export async function sendTxs(
144
142
  context: EndToEndContext,
145
143
  contract: BenchmarkingContract,
146
144
  heavyPublicCompute: boolean = false,
147
- ): Promise<TxHash[]> {
145
+ ): Promise<SentTx[]> {
148
146
  const calls = await Promise.all(times(txCount, index => makeCall(index, context, contract, heavyPublicCompute)));
149
147
  context.logger.info(`Creating ${txCount} txs`);
150
148
  const [from] = context.accounts;
151
149
  context.logger.info(`Sending ${txCount} txs`);
152
- return Promise.all(calls.map(call => call.send({ from, wait: NO_WAIT })));
150
+ return calls.map(call => call.send({ from }));
153
151
  }
154
152
 
155
- export async function waitTxs(txs: TxHash[], context: EndToEndContext, txWaitOpts?: WaitOpts) {
153
+ export async function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitOpts?: WaitOpts) {
156
154
  context.logger.info(`Awaiting ${txs.length} txs to be mined`);
157
- await Promise.all(txs.map(txHash => waitForTx(context.aztecNode, txHash, txWaitOpts)));
158
- context.logger.info(`${txs.length} txs have been mined`);
155
+ await Promise.all(txs.map(tx => tx.wait(txWaitOpts)));
156
+ context.logger.info(`All ${txs.length} txs have been mined`);
159
157
  }
160
158
 
161
159
  function randomBytesAsBigInts(length: number): bigint[] {
@@ -105,13 +105,13 @@ export class BlacklistTokenContractTest {
105
105
  await publicDeployAccounts(this.wallet, [this.adminAddress, this.otherAddress, this.blacklistedAddress]);
106
106
 
107
107
  this.logger.verbose(`Deploying TokenContract...`);
108
- this.asset = await TokenBlacklistContract.deploy(this.wallet, this.adminAddress).send({
109
- from: this.adminAddress,
110
- });
108
+ this.asset = await TokenBlacklistContract.deploy(this.wallet, this.adminAddress)
109
+ .send({ from: this.adminAddress })
110
+ .deployed();
111
111
  this.logger.verbose(`Token deployed to ${this.asset.address}`);
112
112
 
113
113
  this.logger.verbose(`Deploying bad account...`);
114
- this.badAccount = await InvalidAccountContract.deploy(this.wallet).send({ from: this.adminAddress });
114
+ this.badAccount = await InvalidAccountContract.deploy(this.wallet).send({ from: this.adminAddress }).deployed();
115
115
  this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
116
116
 
117
117
  await this.crossTimestampOfChange();
@@ -171,12 +171,14 @@ export class BlacklistTokenContractTest {
171
171
  const adminMinterRole = new Role().withAdmin().withMinter();
172
172
  await this.asset.methods
173
173
  .update_roles(this.adminAddress, adminMinterRole.toNoirStruct())
174
- .send({ from: this.adminAddress });
174
+ .send({ from: this.adminAddress })
175
+ .wait();
175
176
 
176
177
  const blacklistRole = new Role().withBlacklisted();
177
178
  await this.asset.methods
178
179
  .update_roles(this.blacklistedAddress, blacklistRole.toNoirStruct())
179
- .send({ from: this.adminAddress });
180
+ .send({ from: this.adminAddress })
181
+ .wait();
180
182
 
181
183
  await this.crossTimestampOfChange();
182
184
 
@@ -185,15 +187,16 @@ export class BlacklistTokenContractTest {
185
187
  );
186
188
 
187
189
  this.logger.verbose(`Minting ${amount} publicly...`);
188
- await asset.methods.mint_public(this.adminAddress, amount).send({ from: this.adminAddress });
190
+ await asset.methods.mint_public(this.adminAddress, amount).send({ from: this.adminAddress }).wait();
189
191
 
190
192
  this.logger.verbose(`Minting ${amount} privately...`);
191
193
  const secret = Fr.random();
192
194
  const secretHash = await computeSecretHash(secret);
193
- const receipt = await asset.methods.mint_private(amount, secretHash).send({ from: this.adminAddress });
195
+ const receipt = await asset.methods.mint_private(amount, secretHash).send({ from: this.adminAddress }).wait();
194
196
 
195
197
  await this.addPendingShieldNoteToPXE(asset, this.adminAddress, amount, secretHash, receipt.txHash);
196
- await asset.methods.redeem_shield(this.adminAddress, amount, secret).send({ from: this.adminAddress });
198
+ const txClaim = asset.methods.redeem_shield(this.adminAddress, amount, secret).send({ from: this.adminAddress });
199
+ await txClaim.wait();
197
200
  this.logger.verbose(`Minting complete.`);
198
201
 
199
202
  tokenSim.mintPublic(this.adminAddress, amount);
@@ -121,35 +121,30 @@ export class EpochsTestContext {
121
121
 
122
122
  // Set up system without any account nor protocol contracts
123
123
  // and with faster block times and shorter epochs.
124
- const context = await setup(
125
- opts.numberOfAccounts ?? 0,
126
- {
127
- automineL1Setup: true,
128
- checkIntervalMs: 50,
129
- archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
130
- worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
131
- aztecEpochDuration,
132
- aztecSlotDuration,
133
- ethereumSlotDuration,
134
- aztecProofSubmissionEpochs,
135
- aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
136
- minTxsPerBlock: 0,
137
- realProofs: false,
138
- startProverNode: true,
139
- proverTestDelayMs: opts.proverTestDelayMs ?? 0,
140
- // We use numeric incremental prover ids for simplicity, but we can switch to
141
- // using the prover's eth address if the proverId is used for something in the rollup contract
142
- // Use numeric EthAddress for deterministic prover id
143
- proverId: EthAddress.fromNumber(1),
144
- worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
145
- exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
146
- slasherFlavor: 'none',
147
- l1PublishingTime,
148
- ...opts,
149
- },
150
- // Use checkpointed chain tip for PXE to avoid issues with blocks being dropped due to pruned anchor blocks.
151
- { syncChainTip: 'checkpointed' },
152
- );
124
+ const context = await setup(opts.numberOfAccounts ?? 0, {
125
+ automineL1Setup: true,
126
+ checkIntervalMs: 50,
127
+ archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
128
+ worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
129
+ aztecEpochDuration,
130
+ aztecSlotDuration,
131
+ ethereumSlotDuration,
132
+ aztecProofSubmissionEpochs,
133
+ aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
134
+ minTxsPerBlock: 0,
135
+ realProofs: false,
136
+ startProverNode: true,
137
+ proverTestDelayMs: opts.proverTestDelayMs ?? 0,
138
+ // We use numeric incremental prover ids for simplicity, but we can switch to
139
+ // using the prover's eth address if the proverId is used for something in the rollup contract
140
+ // Use numeric EthAddress for deterministic prover id
141
+ proverId: EthAddress.fromNumber(1),
142
+ worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
143
+ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
144
+ slasherFlavor: 'none',
145
+ l1PublishingTime,
146
+ ...opts,
147
+ });
153
148
 
154
149
  this.context = context;
155
150
  this.proverNodes = context.proverNode ? [context.proverNode] : [];
@@ -67,7 +67,10 @@ describe('e2e_fees bridging_race', () => {
67
67
  // Yes, we need to REFACTOR it at some point
68
68
  const claim = await t.feeJuiceBridgeTestHarness.prepareTokensOnL1(bobsAddress);
69
69
  const { claimSecret: secret, messageLeafIndex: index } = claim;
70
- await t.feeJuiceContract.methods.claim(bobsAddress, claim.claimAmount, secret, index).send({ from: bobsAddress });
70
+ await t.feeJuiceContract.methods
71
+ .claim(bobsAddress, claim.claimAmount, secret, index)
72
+ .send({ from: bobsAddress })
73
+ .wait();
71
74
  const [balance] = await t.getGasBalanceFn(bobsAddress);
72
75
  expect(balance).toEqual(claim.claimAmount);
73
76
  });
@@ -152,7 +152,10 @@ export class FeesTest {
152
152
  async mintAndBridgeFeeJuice(minter: AztecAddress, recipient: AztecAddress) {
153
153
  const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(recipient);
154
154
  const { claimSecret: secret, messageLeafIndex: index } = claim;
155
- await this.feeJuiceContract.methods.claim(recipient, claim.claimAmount, secret, index).send({ from: minter });
155
+ await this.feeJuiceContract.methods
156
+ .claim(recipient, claim.claimAmount, secret, index)
157
+ .send({ from: minter })
158
+ .wait();
156
159
  }
157
160
 
158
161
  /** Alice mints bananaCoin tokens privately to the target address and redeems them. */
@@ -232,9 +235,9 @@ export class FeesTest {
232
235
  async applyDeployBananaToken() {
233
236
  this.logger.info('Applying deploy banana token setup');
234
237
 
235
- const bananaCoin = await BananaCoin.deploy(this.wallet, this.aliceAddress, 'BC', 'BC', 18n).send({
236
- from: this.aliceAddress,
237
- });
238
+ const bananaCoin = await BananaCoin.deploy(this.wallet, this.aliceAddress, 'BC', 'BC', 18n)
239
+ .send({ from: this.aliceAddress })
240
+ .deployed();
238
241
  this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
239
242
 
240
243
  this.bananaCoin = bananaCoin;
@@ -259,9 +262,9 @@ export class FeesTest {
259
262
  expect((await this.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
260
263
 
261
264
  const bananaCoin = this.bananaCoin;
262
- const bananaFPC = await FPCContract.deploy(this.wallet, bananaCoin.address, this.fpcAdmin).send({
263
- from: this.aliceAddress,
264
- });
265
+ const bananaFPC = await FPCContract.deploy(this.wallet, bananaCoin.address, this.fpcAdmin)
266
+ .send({ from: this.aliceAddress })
267
+ .deployed();
265
268
 
266
269
  this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
267
270
 
@@ -303,10 +306,10 @@ export class FeesTest {
303
306
  await this.rollupContract.getManaTarget(),
304
307
  ) + (await this.rollupContract.getProvingCostPerMana());
305
308
 
306
- const price = await this.rollupContract.getEthPerFeeAsset();
309
+ const price = await this.rollupContract.getFeeAssetPerEth();
307
310
 
308
311
  const mana = block!.header.totalManaUsed.toBigInt();
309
- return mulDiv(mana * proverCost, 10n ** 12n, price);
312
+ return mulDiv(mana * proverCost, price, 10n ** 9n);
310
313
  };
311
314
  }
312
315
 
@@ -328,7 +331,8 @@ export class FeesTest {
328
331
  await this.mintPrivateBananas(this.ALICE_INITIAL_BANANAS, this.aliceAddress);
329
332
  await this.bananaCoin.methods
330
333
  .mint_to_public(this.aliceAddress, this.ALICE_INITIAL_BANANAS)
331
- .send({ from: this.aliceAddress });
334
+ .send({ from: this.aliceAddress })
335
+ .wait();
332
336
  }
333
337
 
334
338
  public async applyFundAliceWithPrivateBananas() {
@@ -2,7 +2,7 @@ import { AztecAddress } from '@aztec/aztec.js/addresses';
2
2
  import { Fr } from '@aztec/aztec.js/fields';
3
3
  import { BatchedBlob, Blob, getEthBlobEvaluationInputs, getPrefixedEthBlobCommitments } from '@aztec/blob-lib';
4
4
  import { EthAddress } from '@aztec/foundation/eth-address';
5
- import { L2Block } from '@aztec/stdlib/block';
5
+ import { L2BlockNew } from '@aztec/stdlib/block';
6
6
  import { CheckpointHeader } from '@aztec/stdlib/rollup';
7
7
 
8
8
  import { writeFile } from 'fs/promises';
@@ -15,7 +15,7 @@ const AZTEC_GENERATE_TEST_DATA = !!process.env.AZTEC_GENERATE_TEST_DATA;
15
15
  */
16
16
  export async function writeJson(
17
17
  fileName: string,
18
- block: L2Block,
18
+ block: L2BlockNew,
19
19
  l1ToL2Content: Fr[],
20
20
  blobs: Blob[],
21
21
  batchedBlob: BatchedBlob,
@@ -65,8 +65,10 @@ export class NestedContractTest {
65
65
 
66
66
  async applyManual() {
67
67
  this.logger.info('Deploying parent and child contracts');
68
- const parentContract = await ParentContract.deploy(this.wallet).send({ from: this.defaultAccountAddress });
69
- const childContract = await ChildContract.deploy(this.wallet).send({ from: this.defaultAccountAddress });
68
+ const parentContract = await ParentContract.deploy(this.wallet)
69
+ .send({ from: this.defaultAccountAddress })
70
+ .deployed();
71
+ const childContract = await ChildContract.deploy(this.wallet).send({ from: this.defaultAccountAddress }).deployed();
70
72
  this.parentContract = parentContract;
71
73
  this.childContract = childContract;
72
74
  }
@@ -321,7 +321,7 @@ export class P2PNetworkTest {
321
321
  throw new Error('Call setupAccount before deploying spam contract');
322
322
  }
323
323
 
324
- const spamContract = await SpamContract.deploy(this.wallet).send({ from: this.defaultAccountAddress! });
324
+ const spamContract = await SpamContract.deploy(this.wallet).send({ from: this.defaultAccountAddress! }).deployed();
325
325
  this.spamContract = spamContract;
326
326
  }
327
327
 
@@ -351,19 +351,14 @@ export class P2PNetworkTest {
351
351
 
352
352
  async setup() {
353
353
  this.logger.info('Setting up subsystems from fresh');
354
- this.context = await setup(
355
- 0,
356
- {
357
- ...this.setupOptions,
358
- fundSponsoredFPC: true,
359
- skipAccountDeployment: true,
360
- slasherFlavor: this.setupOptions.slasherFlavor ?? this.deployL1ContractsArgs.slasherFlavor ?? 'none',
361
- aztecTargetCommitteeSize: 0,
362
- l1ContractsArgs: this.deployL1ContractsArgs,
363
- },
364
- // Use checkpointed chain tip for PXE to avoid issues with blocks being dropped due to pruned anchor blocks.
365
- { syncChainTip: 'checkpointed' },
366
- );
354
+ this.context = await setup(0, {
355
+ ...this.setupOptions,
356
+ fundSponsoredFPC: true,
357
+ skipAccountDeployment: true,
358
+ slasherFlavor: this.setupOptions.slasherFlavor ?? this.deployL1ContractsArgs.slasherFlavor ?? 'none',
359
+ aztecTargetCommitteeSize: 0,
360
+ l1ContractsArgs: this.deployL1ContractsArgs,
361
+ });
367
362
  this.ctx = this.context;
368
363
 
369
364
  const sponsoredFPCAddress = await getSponsoredFPCAddress();
@@ -1,10 +1,10 @@
1
1
  import type { InitialAccountData } from '@aztec/accounts/testing';
2
2
  import type { AztecNodeService } from '@aztec/aztec-node';
3
3
  import { AztecAddress } from '@aztec/aztec.js/addresses';
4
- import { NO_WAIT, getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
4
+ import { type SentTx, getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
5
5
  import { Fr } from '@aztec/aztec.js/fields';
6
6
  import type { Logger } from '@aztec/aztec.js/log';
7
- import { TxHash } from '@aztec/aztec.js/tx';
7
+ import { Tx, TxStatus } from '@aztec/aztec.js/tx';
8
8
  import type { RollupCheatCodes } from '@aztec/aztec/testing';
9
9
  import type {
10
10
  EmpireSlashingProposerContract,
@@ -22,7 +22,7 @@ import { getPXEConfig, getPXEConfig as getRpcConfig } from '@aztec/pxe/server';
22
22
  import { getRoundForOffense } from '@aztec/slasher';
23
23
  import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
24
24
  import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
25
- import { type ProvenTx, TestWallet, proveInteraction } from '@aztec/test-wallet/server';
25
+ import { TestWallet, proveInteraction } from '@aztec/test-wallet/server';
26
26
 
27
27
  import { submitTxsTo } from '../shared/submit-transactions.js';
28
28
 
@@ -34,15 +34,24 @@ export const submitComplexTxsTo = async (
34
34
  numTxs: number,
35
35
  opts: { callPublic?: boolean } = {},
36
36
  ) => {
37
- const txs: TxHash[] = [];
37
+ const txs: SentTx[] = [];
38
38
 
39
39
  const seed = 1234n;
40
40
  const spamCount = 15;
41
41
  for (let i = 0; i < numTxs; i++) {
42
- const method = spamContract.methods.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic);
43
- const txHash = await method.send({ from, wait: NO_WAIT });
42
+ const tx = spamContract.methods.spam(seed + BigInt(i * spamCount), spamCount, !!opts.callPublic).send({ from });
43
+ const txHash = await tx.getTxHash();
44
+
44
45
  logger.info(`Tx sent with hash ${txHash.toString()}`);
45
- txs.push(txHash);
46
+ const receipt = await tx.getReceipt();
47
+ expect(receipt).toEqual(
48
+ expect.objectContaining({
49
+ status: TxStatus.PENDING,
50
+ error: '',
51
+ }),
52
+ );
53
+ logger.info(`Receipt received for ${txHash.toString()}`);
54
+ txs.push(tx);
46
55
  }
47
56
  return txs;
48
57
  };
@@ -53,7 +62,7 @@ export const submitTransactions = async (
53
62
  node: AztecNodeService,
54
63
  numTxs: number,
55
64
  fundedAccount: InitialAccountData,
56
- ): Promise<TxHash[]> => {
65
+ ): Promise<SentTx[]> => {
57
66
  const rpcConfig = getRpcConfig();
58
67
  rpcConfig.proverEnabled = false;
59
68
  const wallet = await TestWallet.create(node, { ...getPXEConfig(), proverEnabled: false }, { useLogSuffix: true });
@@ -66,7 +75,7 @@ export async function prepareTransactions(
66
75
  node: AztecNodeService,
67
76
  numTxs: number,
68
77
  fundedAccount: InitialAccountData,
69
- ): Promise<ProvenTx[]> {
78
+ ): Promise<Tx[]> {
70
79
  const rpcConfig = getRpcConfig();
71
80
  rpcConfig.proverEnabled = false;
72
81
 
@@ -83,7 +92,8 @@ export async function prepareTransactions(
83
92
  const tx = await proveInteraction(wallet, contract.methods.emit_nullifier(Fr.random()), {
84
93
  from: fundedAccountManager.address,
85
94
  });
86
- logger.info(`Tx prepared with hash ${tx.getTxHash()}`);
95
+ const txHash = tx.getTxHash();
96
+ logger.info(`Tx prepared with hash ${txHash}`);
87
97
  return tx;
88
98
  });
89
99
  }
@@ -85,11 +85,13 @@ export class TokenContractTest {
85
85
  TokenContractTest.TOKEN_NAME,
86
86
  TokenContractTest.TOKEN_SYMBOL,
87
87
  TokenContractTest.TOKEN_DECIMALS,
88
- ).send({ from: this.adminAddress });
88
+ )
89
+ .send({ from: this.adminAddress })
90
+ .deployed();
89
91
  this.logger.verbose(`Token deployed to ${this.asset.address}`);
90
92
 
91
93
  this.logger.verbose(`Deploying bad account...`);
92
- this.badAccount = await InvalidAccountContract.deploy(this.wallet).send({ from: this.adminAddress });
94
+ this.badAccount = await InvalidAccountContract.deploy(this.wallet).send({ from: this.adminAddress }).deployed();
93
95
  this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
94
96
 
95
97
  this.tokenSim = new TokenSimulator(this.asset, this.wallet, this.adminAddress, this.logger, [
@@ -128,7 +130,7 @@ export class TokenContractTest {
128
130
  const amount = 10000n;
129
131
 
130
132
  this.logger.verbose(`Minting ${amount} publicly...`);
131
- await asset.methods.mint_to_public(adminAddress, amount).send({ from: adminAddress });
133
+ await asset.methods.mint_to_public(adminAddress, amount).send({ from: adminAddress }).wait();
132
134
  tokenSim.mintPublic(adminAddress, amount);
133
135
 
134
136
  const publicBalance = await asset.methods.balance_of_public(adminAddress).simulate({ from: adminAddress });
@@ -114,7 +114,9 @@ export class FullProverTest {
114
114
  FullProverTest.TOKEN_NAME,
115
115
  FullProverTest.TOKEN_SYMBOL,
116
116
  FullProverTest.TOKEN_DECIMALS,
117
- ).send({ from: this.accounts[0], wait: { returnReceipt: true } });
117
+ )
118
+ .send({ from: this.accounts[0] })
119
+ .wait();
118
120
  this.logger.verbose(`Token deployed to ${asset.address}`);
119
121
 
120
122
  this.fakeProofsAsset = asset;
@@ -306,10 +308,13 @@ export class FullProverTest {
306
308
  const publicAmount = 10000n;
307
309
 
308
310
  this.logger.verbose(`Minting ${privateAmount + publicAmount} publicly...`);
309
- await asset.methods.mint_to_public(accounts[0], privateAmount + publicAmount).send({ from: accounts[0] });
311
+ await asset.methods
312
+ .mint_to_public(accounts[0], privateAmount + publicAmount)
313
+ .send({ from: accounts[0] })
314
+ .wait();
310
315
 
311
316
  this.logger.verbose(`Transferring ${privateAmount} to private...`);
312
- await asset.methods.transfer_to_private(accounts[0], privateAmount).send({ from: accounts[0] });
317
+ await asset.methods.transfer_to_private(accounts[0], privateAmount).send({ from: accounts[0] }).wait();
313
318
 
314
319
  this.logger.info(`Minting complete`);
315
320