@aztec/end-to-end 0.0.1-commit.f295ac2 → 0.0.1-commit.f8ca9b2f3
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.
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +2 -2
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +29 -14
- package/dest/bench/client_flows/config.d.ts +2 -2
- package/dest/bench/client_flows/config.d.ts.map +1 -1
- package/dest/bench/client_flows/config.js +18 -0
- package/dest/bench/utils.d.ts +5 -4
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +9 -7
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +2 -2
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +7 -8
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +2 -2
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +3 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts +2 -2
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +7 -1
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +38 -10
- package/dest/e2e_fees/bridging_race.notest.js +1 -1
- package/dest/e2e_fees/fees_test.d.ts +2 -2
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +6 -6
- package/dest/e2e_l1_publisher/write_json.d.ts +4 -3
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +1 -7
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +2 -2
- package/dest/e2e_p2p/p2p_network.d.ts +2 -2
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +6 -2
- package/dest/e2e_p2p/reqresp/utils.d.ts +22 -0
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -0
- package/dest/e2e_p2p/reqresp/utils.js +153 -0
- package/dest/e2e_p2p/shared.d.ts +6 -6
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +14 -17
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts +2 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.d.ts.map +1 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fetcher.js +184 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts +18 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.d.ts.map +1 -0
- package/dest/e2e_storage_proof/fixtures/storage_proof_fixture.js +120 -0
- package/dest/e2e_token_contract/token_contract_test.d.ts +2 -2
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +3 -3
- package/dest/fixtures/e2e_prover_test.d.ts +2 -2
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +8 -5
- package/dest/fixtures/ha_setup.d.ts +71 -0
- package/dest/fixtures/ha_setup.d.ts.map +1 -0
- package/dest/fixtures/ha_setup.js +114 -0
- package/dest/fixtures/index.d.ts +2 -1
- package/dest/fixtures/index.d.ts.map +1 -1
- package/dest/fixtures/index.js +1 -0
- package/dest/fixtures/setup.d.ts +18 -16
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +40 -93
- package/dest/fixtures/setup_p2p_test.d.ts +12 -8
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +29 -21
- package/dest/fixtures/token_utils.d.ts +1 -1
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +7 -4
- package/dest/shared/cross_chain_test_harness.d.ts +3 -4
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +11 -11
- package/dest/shared/gas_portal_test_harness.js +1 -1
- package/dest/shared/submit-transactions.d.ts +4 -4
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +9 -11
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +20 -18
- package/dest/simulators/lending_simulator.js +2 -2
- package/dest/spartan/setup_test_wallets.d.ts +2 -2
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +64 -35
- package/dest/spartan/tx_metrics.d.ts +48 -2
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +309 -5
- package/dest/spartan/utils/bot.d.ts +27 -0
- package/dest/spartan/utils/bot.d.ts.map +1 -0
- package/dest/spartan/utils/bot.js +141 -0
- package/dest/spartan/utils/chaos.d.ts +79 -0
- package/dest/spartan/utils/chaos.d.ts.map +1 -0
- package/dest/spartan/utils/chaos.js +142 -0
- package/dest/spartan/utils/clients.d.ts +39 -0
- package/dest/spartan/utils/clients.d.ts.map +1 -0
- package/dest/spartan/utils/clients.js +90 -0
- package/dest/spartan/utils/config.d.ts +39 -0
- package/dest/spartan/utils/config.d.ts.map +1 -0
- package/dest/spartan/utils/config.js +21 -0
- package/dest/spartan/utils/health.d.ts +63 -0
- package/dest/spartan/utils/health.d.ts.map +1 -0
- package/dest/spartan/utils/health.js +202 -0
- package/dest/spartan/utils/helm.d.ts +15 -0
- package/dest/spartan/utils/helm.d.ts.map +1 -0
- package/dest/spartan/utils/helm.js +47 -0
- package/dest/spartan/utils/index.d.ts +9 -0
- package/dest/spartan/utils/index.d.ts.map +1 -0
- package/dest/spartan/utils/index.js +18 -0
- package/dest/spartan/utils/k8s.d.ts +126 -0
- package/dest/spartan/utils/k8s.d.ts.map +1 -0
- package/dest/spartan/utils/k8s.js +375 -0
- package/dest/spartan/utils/nodes.d.ts +41 -0
- package/dest/spartan/utils/nodes.d.ts.map +1 -0
- package/dest/spartan/utils/nodes.js +461 -0
- package/dest/spartan/utils/scripts.d.ts +30 -0
- package/dest/spartan/utils/scripts.d.ts.map +1 -0
- package/dest/spartan/utils/scripts.js +81 -0
- package/dest/spartan/utils.d.ts +2 -260
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +1 -942
- package/dest/test-wallet/test_wallet.d.ts +82 -0
- package/dest/test-wallet/test_wallet.d.ts.map +1 -0
- package/dest/test-wallet/test_wallet.js +213 -0
- package/dest/test-wallet/utils.d.ts +41 -0
- package/dest/test-wallet/utils.d.ts.map +1 -0
- package/dest/test-wallet/utils.js +71 -0
- package/package.json +43 -39
- package/src/bench/client_flows/client_flows_benchmark.ts +17 -30
- package/src/bench/client_flows/config.ts +9 -1
- package/src/bench/utils.ts +10 -8
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +11 -14
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +7 -8
- package/src/e2e_deploy_contract/deploy_test.ts +3 -3
- package/src/e2e_epochs/epochs_test.ts +71 -35
- package/src/e2e_fees/bridging_race.notest.ts +2 -5
- package/src/e2e_fees/fees_test.ts +17 -21
- package/src/e2e_l1_publisher/write_json.ts +3 -8
- package/src/e2e_nested_contract/nested_contract_test.ts +3 -5
- package/src/e2e_p2p/inactivity_slash_test.ts +4 -4
- package/src/e2e_p2p/p2p_network.ts +20 -14
- package/src/e2e_p2p/reqresp/utils.ts +207 -0
- package/src/e2e_p2p/shared.ts +22 -22
- package/src/e2e_storage_proof/fixtures/storage_proof.json +915 -0
- package/src/e2e_storage_proof/fixtures/storage_proof_fetcher.ts +190 -0
- package/src/e2e_storage_proof/fixtures/storage_proof_fixture.ts +173 -0
- package/src/e2e_token_contract/token_contract_test.ts +5 -7
- package/src/fixtures/dumps/epoch_proof_result.json +1 -1
- package/src/fixtures/e2e_prover_test.ts +8 -13
- package/src/fixtures/ha_setup.ts +184 -0
- package/src/fixtures/index.ts +1 -0
- package/src/fixtures/setup.ts +49 -126
- package/src/fixtures/setup_p2p_test.ts +31 -27
- package/src/fixtures/token_utils.ts +6 -5
- package/src/shared/cross_chain_test_harness.ts +13 -27
- package/src/shared/gas_portal_test_harness.ts +1 -1
- package/src/shared/submit-transactions.ts +11 -16
- package/src/shared/uniswap_l1_l2.ts +21 -30
- package/src/simulators/lending_simulator.ts +2 -2
- package/src/spartan/setup_test_wallets.ts +75 -25
- package/src/spartan/tx_metrics.ts +231 -8
- package/src/spartan/utils/bot.ts +185 -0
- package/src/spartan/utils/chaos.ts +253 -0
- package/src/spartan/utils/clients.ts +100 -0
- package/src/spartan/utils/config.ts +27 -0
- package/src/spartan/utils/health.ts +255 -0
- package/src/spartan/utils/helm.ts +84 -0
- package/src/spartan/utils/index.ts +64 -0
- package/src/spartan/utils/k8s.ts +527 -0
- package/src/spartan/utils/nodes.ts +538 -0
- package/src/spartan/utils/scripts.ts +99 -0
- package/src/spartan/utils.ts +1 -1246
- package/src/test-wallet/test_wallet.ts +296 -0
- package/src/test-wallet/utils.ts +112 -0
|
@@ -26,7 +26,6 @@ import { type PXEConfig, getPXEConfig } from '@aztec/pxe/server';
|
|
|
26
26
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
27
27
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
28
28
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
29
|
-
import { TestWallet } from '@aztec/test-wallet/server';
|
|
30
29
|
|
|
31
30
|
import { MNEMONIC } from '../../fixtures/fixtures.js';
|
|
32
31
|
import { type EndToEndContext, type SetupOptions, deployAccounts, setup, teardown } from '../../fixtures/setup.js';
|
|
@@ -37,6 +36,7 @@ import {
|
|
|
37
36
|
FeeJuicePortalTestingHarnessFactory,
|
|
38
37
|
type GasBridgingTestHarness,
|
|
39
38
|
} from '../../shared/gas_portal_test_harness.js';
|
|
39
|
+
import { TestWallet } from '../../test-wallet/test_wallet.js';
|
|
40
40
|
import { ProxyLogger } from './benchmark.js';
|
|
41
41
|
import { type ClientFlowsConfig, FULL_FLOWS_CONFIG, KEY_FLOWS_CONFIG } from './config.js';
|
|
42
42
|
|
|
@@ -138,10 +138,10 @@ export class ClientFlowsBenchmark {
|
|
|
138
138
|
});
|
|
139
139
|
await this.applyBaseSetup();
|
|
140
140
|
|
|
141
|
-
await this.context.aztecNodeService
|
|
141
|
+
await this.context.aztecNodeService.setConfig({ feeRecipient: this.sequencerAddress, coinbase: this.coinbase });
|
|
142
142
|
|
|
143
143
|
const rollupContract = RollupContract.getFromConfig(this.context.config);
|
|
144
|
-
this.chainMonitor = new ChainMonitor(rollupContract, this.context.dateProvider
|
|
144
|
+
this.chainMonitor = new ChainMonitor(rollupContract, this.context.dateProvider, this.logger, 200).start();
|
|
145
145
|
|
|
146
146
|
return this;
|
|
147
147
|
}
|
|
@@ -156,8 +156,7 @@ 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 })
|
|
160
|
-
.wait();
|
|
159
|
+
.send({ from: this.adminAddress });
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
/** Admin mints bananaCoin tokens privately to the target address and redeems them. */
|
|
@@ -208,7 +207,7 @@ export class ClientFlowsBenchmark {
|
|
|
208
207
|
const [{ address: adminAddress }, { address: sequencerAddress }] = deployedAccounts;
|
|
209
208
|
|
|
210
209
|
this.adminWallet = this.context.wallet;
|
|
211
|
-
this.aztecNode = this.context.aztecNodeService
|
|
210
|
+
this.aztecNode = this.context.aztecNodeService;
|
|
212
211
|
this.cheatCodes = this.context.cheatCodes;
|
|
213
212
|
|
|
214
213
|
this.adminAddress = adminAddress;
|
|
@@ -236,8 +235,8 @@ export class ClientFlowsBenchmark {
|
|
|
236
235
|
this.feeJuiceContract = FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.adminWallet);
|
|
237
236
|
|
|
238
237
|
this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
|
|
239
|
-
aztecNode: this.context.aztecNodeService
|
|
240
|
-
aztecNodeAdmin: this.context.aztecNodeService
|
|
238
|
+
aztecNode: this.context.aztecNodeService,
|
|
239
|
+
aztecNodeAdmin: this.context.aztecNodeService,
|
|
241
240
|
l1Client: this.context.deployL1ContractsValues.l1Client,
|
|
242
241
|
wallet: this.adminWallet,
|
|
243
242
|
logger: this.logger,
|
|
@@ -252,9 +251,7 @@ export class ClientFlowsBenchmark {
|
|
|
252
251
|
'BC',
|
|
253
252
|
'BC',
|
|
254
253
|
18n,
|
|
255
|
-
)
|
|
256
|
-
.send({ from: this.adminAddress })
|
|
257
|
-
.wait();
|
|
254
|
+
).send({ from: this.adminAddress, wait: { returnReceipt: true } });
|
|
258
255
|
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
259
256
|
this.bananaCoin = bananaCoin;
|
|
260
257
|
this.bananaCoinInstance = bananaCoinInstance;
|
|
@@ -268,9 +265,7 @@ export class ClientFlowsBenchmark {
|
|
|
268
265
|
'CBC',
|
|
269
266
|
'CBC',
|
|
270
267
|
18n,
|
|
271
|
-
)
|
|
272
|
-
.send({ from: this.adminAddress })
|
|
273
|
-
.wait();
|
|
268
|
+
).send({ from: this.adminAddress, wait: { returnReceipt: true } });
|
|
274
269
|
this.logger.info(`CandyBarCoin deployed at ${candyBarCoin.address}`);
|
|
275
270
|
this.candyBarCoin = candyBarCoin;
|
|
276
271
|
this.candyBarCoinInstance = candyBarCoinInstance;
|
|
@@ -286,9 +281,7 @@ export class ClientFlowsBenchmark {
|
|
|
286
281
|
this.adminWallet,
|
|
287
282
|
bananaCoin.address,
|
|
288
283
|
this.adminAddress,
|
|
289
|
-
)
|
|
290
|
-
.send({ from: this.adminAddress })
|
|
291
|
-
.wait();
|
|
284
|
+
).send({ from: this.adminAddress, wait: { returnReceipt: true } });
|
|
292
285
|
|
|
293
286
|
this.logger.info(`BananaPay deployed at ${bananaFPC.address}`);
|
|
294
287
|
|
|
@@ -336,12 +329,10 @@ export class ClientFlowsBenchmark {
|
|
|
336
329
|
const benchysAddress = benchysAccountManager.address;
|
|
337
330
|
const claim = await this.feeJuiceBridgeTestHarness.prepareTokensOnL1(benchysAddress);
|
|
338
331
|
const behchysDeployMethod = await benchysAccountManager.getDeployMethod();
|
|
339
|
-
await behchysDeployMethod
|
|
340
|
-
.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
})
|
|
344
|
-
.wait();
|
|
332
|
+
await behchysDeployMethod.send({
|
|
333
|
+
from: AztecAddress.ZERO,
|
|
334
|
+
fee: { paymentMethod: new FeeJuicePaymentMethodWithClaim(benchysAddress, claim) },
|
|
335
|
+
});
|
|
345
336
|
// Register benchy on the user's Wallet, where we're going to be interacting from
|
|
346
337
|
const accountManager = await this.userWallet.createAccount({
|
|
347
338
|
secret: benchysAccount.getSecretKey(),
|
|
@@ -359,19 +350,15 @@ export class ClientFlowsBenchmark {
|
|
|
359
350
|
'LPT',
|
|
360
351
|
'LPT',
|
|
361
352
|
18n,
|
|
362
|
-
)
|
|
363
|
-
.send({ from: this.adminAddress })
|
|
364
|
-
.wait();
|
|
353
|
+
).send({ from: this.adminAddress, wait: { returnReceipt: true } });
|
|
365
354
|
const { contract: amm, instance: ammInstance } = await AMMContract.deploy(
|
|
366
355
|
this.adminWallet,
|
|
367
356
|
this.bananaCoin.address,
|
|
368
357
|
this.candyBarCoin.address,
|
|
369
358
|
liquidityToken.address,
|
|
370
|
-
)
|
|
371
|
-
.send({ from: this.adminAddress })
|
|
372
|
-
.wait();
|
|
359
|
+
).send({ from: this.adminAddress, wait: { returnReceipt: true } });
|
|
373
360
|
this.logger.info(`AMM deployed at ${amm.address}`);
|
|
374
|
-
await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress })
|
|
361
|
+
await liquidityToken.methods.set_minter(amm.address, true).send({ from: this.adminAddress });
|
|
375
362
|
this.liquidityToken = liquidityToken;
|
|
376
363
|
this.liquidityTokenInstance = liquidityTokenInstance;
|
|
377
364
|
this.amm = amm;
|
|
@@ -6,7 +6,7 @@ export type ClientFlowConfig = {
|
|
|
6
6
|
recursions?: number[];
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm';
|
|
9
|
+
type ClientFlows = 'accountDeployments' | 'deployments' | 'transfers' | 'bridging' | 'amm' | 'storageProof';
|
|
10
10
|
|
|
11
11
|
export type ClientFlowsConfig = {
|
|
12
12
|
[key in ClientFlows]: ClientFlowConfig;
|
|
@@ -34,6 +34,10 @@ export const KEY_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
|
34
34
|
feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
|
|
35
35
|
recursions: [0, 1],
|
|
36
36
|
},
|
|
37
|
+
storageProof: {
|
|
38
|
+
accounts: ['ecdsar1'],
|
|
39
|
+
feePaymentMethods: ['sponsored_fpc'],
|
|
40
|
+
},
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
export const FULL_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
@@ -58,4 +62,8 @@ export const FULL_FLOWS_CONFIG: ClientFlowsConfig = {
|
|
|
58
62
|
feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
|
|
59
63
|
recursions: [0, 1, 2],
|
|
60
64
|
},
|
|
65
|
+
storageProof: {
|
|
66
|
+
accounts: ['ecdsar1', 'schnorr'],
|
|
67
|
+
feePaymentMethods: ['sponsored_fpc', 'private_fpc'],
|
|
68
|
+
},
|
|
61
69
|
};
|
package/src/bench/utils.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { AztecNodeService } from '@aztec/aztec-node';
|
|
2
2
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
-
import { BatchCall,
|
|
3
|
+
import { BatchCall, NO_WAIT, type WaitOpts } from '@aztec/aztec.js/contracts';
|
|
4
|
+
import { waitForTx } from '@aztec/aztec.js/node';
|
|
4
5
|
import { mean, stdDev, times } from '@aztec/foundation/collection';
|
|
5
6
|
import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
|
|
7
|
+
import type { TxHash } from '@aztec/stdlib/tx';
|
|
6
8
|
import type { MetricDefinition } from '@aztec/telemetry-client';
|
|
7
9
|
import type { BenchmarkDataPoint, BenchmarkMetricsType, BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
8
10
|
|
|
@@ -23,10 +25,10 @@ export async function benchmarkSetup(
|
|
|
23
25
|
) {
|
|
24
26
|
const context = await setup(1, { ...opts, telemetryConfig: { benchmark: true } });
|
|
25
27
|
const defaultAccountAddress = context.accounts[0];
|
|
26
|
-
const contract = await BenchmarkingContract.deploy(context.wallet).send({ from: defaultAccountAddress })
|
|
28
|
+
const contract = await BenchmarkingContract.deploy(context.wallet).send({ from: defaultAccountAddress });
|
|
27
29
|
context.logger.info(`Deployed benchmarking contract at ${contract.address}`);
|
|
28
30
|
const sequencer = (context.aztecNode as AztecNodeService).getSequencer()!;
|
|
29
|
-
const telemetry = context.telemetryClient
|
|
31
|
+
const telemetry = context.telemetryClient as BenchmarkTelemetryClient;
|
|
30
32
|
context.logger.warn(`Cleared benchmark data points from setup`);
|
|
31
33
|
telemetry.clear();
|
|
32
34
|
const origTeardown = context.teardown.bind(context);
|
|
@@ -142,18 +144,18 @@ export async function sendTxs(
|
|
|
142
144
|
context: EndToEndContext,
|
|
143
145
|
contract: BenchmarkingContract,
|
|
144
146
|
heavyPublicCompute: boolean = false,
|
|
145
|
-
): Promise<
|
|
147
|
+
): Promise<TxHash[]> {
|
|
146
148
|
const calls = await Promise.all(times(txCount, index => makeCall(index, context, contract, heavyPublicCompute)));
|
|
147
149
|
context.logger.info(`Creating ${txCount} txs`);
|
|
148
150
|
const [from] = context.accounts;
|
|
149
151
|
context.logger.info(`Sending ${txCount} txs`);
|
|
150
|
-
return calls.map(call => call.send({ from }));
|
|
152
|
+
return Promise.all(calls.map(call => call.send({ from, wait: NO_WAIT })));
|
|
151
153
|
}
|
|
152
154
|
|
|
153
|
-
export async function waitTxs(txs:
|
|
155
|
+
export async function waitTxs(txs: TxHash[], context: EndToEndContext, txWaitOpts?: WaitOpts) {
|
|
154
156
|
context.logger.info(`Awaiting ${txs.length} txs to be mined`);
|
|
155
|
-
await Promise.all(txs.map(
|
|
156
|
-
context.logger.info(
|
|
157
|
+
await Promise.all(txs.map(txHash => waitForTx(context.aztecNode, txHash, txWaitOpts)));
|
|
158
|
+
context.logger.info(`${txs.length} txs have been mined`);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
function randomBytesAsBigInts(length: number): bigint[] {
|
|
@@ -9,12 +9,12 @@ import type { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
|
9
9
|
import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
|
|
10
10
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
11
11
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
12
|
-
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
13
12
|
|
|
14
13
|
import { jest } from '@jest/globals';
|
|
15
14
|
|
|
16
15
|
import { type EndToEndContext, deployAccounts, publicDeployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
17
16
|
import { TokenSimulator } from '../simulators/token_simulator.js';
|
|
17
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
18
18
|
|
|
19
19
|
export class Role {
|
|
20
20
|
private isAdmin = false;
|
|
@@ -92,7 +92,7 @@ export class BlacklistTokenContractTest {
|
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
this.cheatCodes = this.context.cheatCodes;
|
|
95
|
-
this.aztecNode = this.context.aztecNodeService
|
|
95
|
+
this.aztecNode = this.context.aztecNodeService;
|
|
96
96
|
this.sequencer = this.context.sequencer!;
|
|
97
97
|
this.wallet = this.context.wallet;
|
|
98
98
|
this.adminAddress = deployedAccounts[0].address;
|
|
@@ -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)
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
this.asset = await TokenBlacklistContract.deploy(this.wallet, this.adminAddress).send({
|
|
109
|
+
from: this.adminAddress,
|
|
110
|
+
});
|
|
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 });
|
|
115
115
|
this.logger.verbose(`Deployed to ${this.badAccount.address}.`);
|
|
116
116
|
|
|
117
117
|
await this.crossTimestampOfChange();
|
|
@@ -171,14 +171,12 @@ 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 })
|
|
175
|
-
.wait();
|
|
174
|
+
.send({ from: this.adminAddress });
|
|
176
175
|
|
|
177
176
|
const blacklistRole = new Role().withBlacklisted();
|
|
178
177
|
await this.asset.methods
|
|
179
178
|
.update_roles(this.blacklistedAddress, blacklistRole.toNoirStruct())
|
|
180
|
-
.send({ from: this.adminAddress })
|
|
181
|
-
.wait();
|
|
179
|
+
.send({ from: this.adminAddress });
|
|
182
180
|
|
|
183
181
|
await this.crossTimestampOfChange();
|
|
184
182
|
|
|
@@ -187,16 +185,15 @@ export class BlacklistTokenContractTest {
|
|
|
187
185
|
);
|
|
188
186
|
|
|
189
187
|
this.logger.verbose(`Minting ${amount} publicly...`);
|
|
190
|
-
await asset.methods.mint_public(this.adminAddress, amount).send({ from: this.adminAddress })
|
|
188
|
+
await asset.methods.mint_public(this.adminAddress, amount).send({ from: this.adminAddress });
|
|
191
189
|
|
|
192
190
|
this.logger.verbose(`Minting ${amount} privately...`);
|
|
193
191
|
const secret = Fr.random();
|
|
194
192
|
const secretHash = await computeSecretHash(secret);
|
|
195
|
-
const receipt = await asset.methods.mint_private(amount, secretHash).send({ from: this.adminAddress })
|
|
193
|
+
const receipt = await asset.methods.mint_private(amount, secretHash).send({ from: this.adminAddress });
|
|
196
194
|
|
|
197
195
|
await this.addPendingShieldNoteToPXE(asset, this.adminAddress, amount, secretHash, receipt.txHash);
|
|
198
|
-
|
|
199
|
-
await txClaim.wait();
|
|
196
|
+
await asset.methods.redeem_shield(this.adminAddress, amount, secret).send({ from: this.adminAddress });
|
|
200
197
|
this.logger.verbose(`Minting complete.`);
|
|
201
198
|
|
|
202
199
|
tokenSim.mintPublic(this.adminAddress, amount);
|
|
@@ -13,13 +13,12 @@ import type {
|
|
|
13
13
|
} from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
14
14
|
import { deployL1Contract } from '@aztec/ethereum/deploy-l1-contract';
|
|
15
15
|
import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
16
|
-
import {
|
|
16
|
+
import { EpochNumber } from '@aztec/foundation/branded-types';
|
|
17
17
|
import { sleep } from '@aztec/foundation/sleep';
|
|
18
18
|
import { TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
|
|
19
19
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
20
20
|
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
21
21
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
|
-
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
23
22
|
|
|
24
23
|
import { MNEMONIC } from '../fixtures/fixtures.js';
|
|
25
24
|
import {
|
|
@@ -31,6 +30,7 @@ import {
|
|
|
31
30
|
teardown,
|
|
32
31
|
} from '../fixtures/setup.js';
|
|
33
32
|
import { CrossChainTestHarness } from '../shared/cross_chain_test_harness.js';
|
|
33
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
34
34
|
|
|
35
35
|
export class CrossChainMessagingTest {
|
|
36
36
|
private requireEpochProven: boolean;
|
|
@@ -86,9 +86,8 @@ export class CrossChainMessagingTest {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
async advanceToEpochProven(l2TxReceipt: TxReceipt): Promise<EpochNumber> {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
);
|
|
89
|
+
const block = await this.aztecNode.getBlock(l2TxReceipt.blockNumber!);
|
|
90
|
+
const epoch = await this.rollup.getEpochNumberForCheckpoint(block!.checkpointNumber);
|
|
92
91
|
// Warp to the next epoch.
|
|
93
92
|
await this.cheatCodes.rollup.advanceToEpoch(EpochNumber(epoch + 1));
|
|
94
93
|
// Wait for the tx to be proven.
|
|
@@ -110,16 +109,16 @@ export class CrossChainMessagingTest {
|
|
|
110
109
|
|
|
111
110
|
async applyBaseSetup() {
|
|
112
111
|
// Set up base context fields
|
|
113
|
-
this.aztecNode = this.context.aztecNodeService
|
|
112
|
+
this.aztecNode = this.context.aztecNodeService;
|
|
114
113
|
this.wallet = this.context.wallet;
|
|
115
114
|
this.aztecNodeConfig = this.context.config;
|
|
116
115
|
this.cheatCodes = this.context.cheatCodes;
|
|
117
116
|
this.deployL1ContractsValues = this.context.deployL1ContractsValues;
|
|
118
|
-
this.aztecNodeAdmin = this.context.aztecNodeService
|
|
117
|
+
this.aztecNodeAdmin = this.context.aztecNodeService;
|
|
119
118
|
|
|
120
119
|
if (this.requireEpochProven) {
|
|
121
120
|
// Turn off the watcher to prevent it from keep marking blocks as proven.
|
|
122
|
-
this.context.watcher
|
|
121
|
+
this.context.watcher.setIsMarkingAsProven(false);
|
|
123
122
|
}
|
|
124
123
|
|
|
125
124
|
// Deploy 3 accounts
|
|
@@ -8,9 +8,9 @@ import type { AztecNode } from '@aztec/aztec.js/node';
|
|
|
8
8
|
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
9
9
|
import type { StatefulTestContract } from '@aztec/noir-test-contracts.js/StatefulTest';
|
|
10
10
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
11
|
-
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
12
11
|
|
|
13
12
|
import { type EndToEndContext, deployAccounts, setup, teardown } from '../fixtures/setup.js';
|
|
13
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
14
14
|
|
|
15
15
|
export class DeployTest {
|
|
16
16
|
public context!: EndToEndContext;
|
|
@@ -30,9 +30,9 @@ export class DeployTest {
|
|
|
30
30
|
fundSponsoredFPC: true,
|
|
31
31
|
skipAccountDeployment: true,
|
|
32
32
|
});
|
|
33
|
-
this.aztecNode = this.context.aztecNodeService
|
|
33
|
+
this.aztecNode = this.context.aztecNodeService;
|
|
34
34
|
this.wallet = this.context.wallet;
|
|
35
|
-
this.aztecNodeAdmin = this.context.aztecNodeService
|
|
35
|
+
this.aztecNodeAdmin = this.context.aztecNodeService;
|
|
36
36
|
await this.applyInitialAccount();
|
|
37
37
|
return this;
|
|
38
38
|
}
|
|
@@ -14,13 +14,15 @@ import type { ExtendedViemWalletClient } from '@aztec/ethereum/types';
|
|
|
14
14
|
import { BlockNumber, CheckpointNumber, EpochNumber } from '@aztec/foundation/branded-types';
|
|
15
15
|
import { SecretValue } from '@aztec/foundation/config';
|
|
16
16
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
17
|
-
import {
|
|
17
|
+
import { withLoggerBindings } from '@aztec/foundation/log/server';
|
|
18
18
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
19
19
|
import { sleep } from '@aztec/foundation/sleep';
|
|
20
20
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
21
|
+
import { TestContract } from '@aztec/noir-test-contracts.js/Test';
|
|
21
22
|
import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
22
23
|
import { ProverNode, type ProverNodeConfig, ProverNodePublisher } from '@aztec/prover-node';
|
|
23
24
|
import type { TestProverNode } from '@aztec/prover-node/test';
|
|
25
|
+
import type { PXEConfig } from '@aztec/pxe/config';
|
|
24
26
|
import {
|
|
25
27
|
type SequencerClient,
|
|
26
28
|
type SequencerEvents,
|
|
@@ -49,7 +51,11 @@ export const WORLD_STATE_BLOCK_CHECK_INTERVAL = 50;
|
|
|
49
51
|
export const ARCHIVER_POLL_INTERVAL = 50;
|
|
50
52
|
export const DEFAULT_L1_BLOCK_TIME = process.env.CI ? 12 : 8;
|
|
51
53
|
|
|
52
|
-
export type EpochsTestOpts = Partial<SetupOptions> & {
|
|
54
|
+
export type EpochsTestOpts = Partial<SetupOptions> & {
|
|
55
|
+
numberOfAccounts?: number;
|
|
56
|
+
pxeOpts?: Partial<PXEConfig>;
|
|
57
|
+
aztecSlotDurationInL1Slots?: number;
|
|
58
|
+
};
|
|
53
59
|
|
|
54
60
|
export type TrackedSequencerEvent = {
|
|
55
61
|
[K in keyof SequencerEvents]: Parameters<SequencerEvents[K]>[0] & {
|
|
@@ -94,7 +100,7 @@ export class EpochsTestContext {
|
|
|
94
100
|
? parseInt(process.env.L1_BLOCK_TIME)
|
|
95
101
|
: DEFAULT_L1_BLOCK_TIME;
|
|
96
102
|
const ethereumSlotDuration = opts.ethereumSlotDuration ?? envEthereumSlotDuration;
|
|
97
|
-
const aztecSlotDuration = opts.aztecSlotDuration ??
|
|
103
|
+
const aztecSlotDuration = opts.aztecSlotDuration ?? (opts.aztecSlotDurationInL1Slots ?? 2) * ethereumSlotDuration;
|
|
98
104
|
const aztecEpochDuration = opts.aztecEpochDuration ?? 6;
|
|
99
105
|
const aztecProofSubmissionEpochs = opts.aztecProofSubmissionEpochs ?? 1;
|
|
100
106
|
const l1PublishingTime = opts.l1PublishingTime ?? 1;
|
|
@@ -121,30 +127,36 @@ export class EpochsTestContext {
|
|
|
121
127
|
|
|
122
128
|
// Set up system without any account nor protocol contracts
|
|
123
129
|
// and with faster block times and shorter epochs.
|
|
124
|
-
const context = await setup(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
130
|
+
const context = await setup(
|
|
131
|
+
opts.numberOfAccounts ?? 0,
|
|
132
|
+
{
|
|
133
|
+
automineL1Setup: true,
|
|
134
|
+
checkIntervalMs: 50,
|
|
135
|
+
archiverPollingIntervalMS: ARCHIVER_POLL_INTERVAL,
|
|
136
|
+
worldStateBlockCheckIntervalMS: WORLD_STATE_BLOCK_CHECK_INTERVAL,
|
|
137
|
+
aztecEpochDuration,
|
|
138
|
+
aztecSlotDuration,
|
|
139
|
+
ethereumSlotDuration,
|
|
140
|
+
aztecProofSubmissionEpochs,
|
|
141
|
+
aztecTargetCommitteeSize: opts.initialValidators?.length ?? 0,
|
|
142
|
+
minTxsPerBlock: 0,
|
|
143
|
+
realProofs: false,
|
|
144
|
+
startProverNode: true,
|
|
145
|
+
proverTestDelayMs: opts.proverTestDelayMs ?? 0,
|
|
146
|
+
// We use numeric incremental prover ids for simplicity, but we can switch to
|
|
147
|
+
// using the prover's eth address if the proverId is used for something in the rollup contract
|
|
148
|
+
// Use numeric EthAddress for deterministic prover id
|
|
149
|
+
proverId: EthAddress.fromNumber(1),
|
|
150
|
+
worldStateBlockHistory: WORLD_STATE_BLOCK_HISTORY,
|
|
151
|
+
exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
|
|
152
|
+
slasherFlavor: 'none',
|
|
153
|
+
l1PublishingTime,
|
|
154
|
+
...opts,
|
|
155
|
+
},
|
|
156
|
+
// Use checkpointed chain tip for PXE by default to avoid issues with blocks being dropped due to pruned anchor blocks.
|
|
157
|
+
// Can be overridden via opts.pxeOpts.
|
|
158
|
+
{ syncChainTip: 'checkpointed', ...opts.pxeOpts },
|
|
159
|
+
);
|
|
148
160
|
|
|
149
161
|
this.context = context;
|
|
150
162
|
this.proverNodes = context.proverNode ? [context.proverNode] : [];
|
|
@@ -182,6 +194,7 @@ export class EpochsTestContext {
|
|
|
182
194
|
l1GenesisTime: await this.rollup.getL1GenesisTime(),
|
|
183
195
|
ethereumSlotDuration,
|
|
184
196
|
proofSubmissionEpochs: Number(await this.rollup.getProofSubmissionEpochs()),
|
|
197
|
+
targetCommitteeSize: await this.rollup.getTargetCommitteeSize(),
|
|
185
198
|
};
|
|
186
199
|
|
|
187
200
|
this.logger.info(
|
|
@@ -199,20 +212,29 @@ export class EpochsTestContext {
|
|
|
199
212
|
public async createProverNode(opts: { dontStart?: boolean } & Partial<ProverNodeConfig> = {}) {
|
|
200
213
|
this.logger.warn('Creating and syncing a simulated prover node...');
|
|
201
214
|
const proverNodePrivateKey = this.getNextPrivateKey();
|
|
202
|
-
const
|
|
203
|
-
const
|
|
215
|
+
const proverIndex = this.proverNodes.length + 1;
|
|
216
|
+
const { mockGossipSubNetwork } = this.context;
|
|
217
|
+
const proverNode = await withLoggerBindings({ actor: `prover-${proverIndex}` }, () =>
|
|
204
218
|
createAndSyncProverNode(
|
|
205
219
|
proverNodePrivateKey,
|
|
206
|
-
{
|
|
220
|
+
{
|
|
221
|
+
...this.context.config,
|
|
222
|
+
p2pEnabled: this.context.config.p2pEnabled || mockGossipSubNetwork !== undefined,
|
|
223
|
+
},
|
|
207
224
|
{
|
|
208
225
|
dataDirectory: join(this.context.config.dataDirectory!, randomBytes(8).toString('hex')),
|
|
209
|
-
proverId: EthAddress.fromNumber(
|
|
226
|
+
proverId: EthAddress.fromNumber(proverIndex),
|
|
210
227
|
dontStart: opts.dontStart,
|
|
211
228
|
...opts,
|
|
212
229
|
},
|
|
213
230
|
this.context.aztecNode,
|
|
214
231
|
this.context.prefilledPublicData ?? [],
|
|
215
|
-
{
|
|
232
|
+
{
|
|
233
|
+
dateProvider: this.context.dateProvider,
|
|
234
|
+
p2pClientDeps: mockGossipSubNetwork
|
|
235
|
+
? { p2pServiceFactory: getMockPubSubP2PServiceFactory(mockGossipSubNetwork) }
|
|
236
|
+
: undefined,
|
|
237
|
+
},
|
|
216
238
|
),
|
|
217
239
|
);
|
|
218
240
|
this.proverNodes.push(proverNode);
|
|
@@ -235,12 +257,13 @@ export class EpochsTestContext {
|
|
|
235
257
|
private async createNode(
|
|
236
258
|
opts: Partial<AztecNodeConfig> & { txDelayerMaxInclusionTimeIntoSlot?: number; dontStartSequencer?: boolean } = {},
|
|
237
259
|
) {
|
|
238
|
-
const
|
|
260
|
+
const nodeIndex = this.nodes.length + 1;
|
|
261
|
+
const actorPrefix = opts.disableValidator ? 'node' : 'validator';
|
|
239
262
|
const { mockGossipSubNetwork } = this.context;
|
|
240
263
|
const resolvedConfig = { ...this.context.config, ...opts };
|
|
241
264
|
const p2pEnabled = resolvedConfig.p2pEnabled || mockGossipSubNetwork !== undefined;
|
|
242
265
|
const p2pIp = resolvedConfig.p2pIp ?? (p2pEnabled ? '127.0.0.1' : undefined);
|
|
243
|
-
const node = await
|
|
266
|
+
const node = await withLoggerBindings({ actor: `${actorPrefix}-${nodeIndex}` }, () =>
|
|
244
267
|
AztecNodeService.createAndSync(
|
|
245
268
|
{
|
|
246
269
|
...resolvedConfig,
|
|
@@ -370,6 +393,19 @@ export class EpochsTestContext {
|
|
|
370
393
|
return SpamContract.at(instance.address, wallet);
|
|
371
394
|
}
|
|
372
395
|
|
|
396
|
+
/** Registers the TestContract on the given wallet. */
|
|
397
|
+
public async registerTestContract(wallet: Wallet, salt = Fr.ZERO) {
|
|
398
|
+
const instance = await getContractInstanceFromInstantiationParams(TestContract.artifact, {
|
|
399
|
+
constructorArgs: [],
|
|
400
|
+
constructorArtifact: undefined,
|
|
401
|
+
salt,
|
|
402
|
+
publicKeys: undefined,
|
|
403
|
+
deployer: undefined,
|
|
404
|
+
});
|
|
405
|
+
await wallet.registerContract(instance, TestContract.artifact);
|
|
406
|
+
return TestContract.at(instance.address, wallet);
|
|
407
|
+
}
|
|
408
|
+
|
|
373
409
|
/** Creates an L1 client using a fresh account with funds from anvil, with a tx delayer already set up. */
|
|
374
410
|
public async createL1Client() {
|
|
375
411
|
const { client, delayer } = withDelayer(
|
|
@@ -378,7 +414,7 @@ export class EpochsTestContext {
|
|
|
378
414
|
privateKeyToAccount(this.getNextPrivateKey()),
|
|
379
415
|
this.l1Client.chain,
|
|
380
416
|
),
|
|
381
|
-
this.context.dateProvider
|
|
417
|
+
this.context.dateProvider,
|
|
382
418
|
{ ethereumSlotDuration: this.L1_BLOCK_TIME_IN_S },
|
|
383
419
|
);
|
|
384
420
|
expect(await client.getBalance({ address: client.account.address })).toBeGreaterThan(0n);
|
|
@@ -4,11 +4,11 @@ import type { Logger } from '@aztec/aztec.js/log';
|
|
|
4
4
|
import { Fq } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import { sleep } from '@aztec/foundation/sleep';
|
|
6
6
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
8
7
|
|
|
9
8
|
import { jest } from '@jest/globals';
|
|
10
9
|
import type { Hex } from 'viem';
|
|
11
10
|
|
|
11
|
+
import type { TestWallet } from '../test-wallet/test_wallet.js';
|
|
12
12
|
import { FeesTest } from './fees_test.js';
|
|
13
13
|
|
|
14
14
|
jest.setTimeout(300_000);
|
|
@@ -67,10 +67,7 @@ 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
|
|
71
|
-
.claim(bobsAddress, claim.claimAmount, secret, index)
|
|
72
|
-
.send({ from: bobsAddress })
|
|
73
|
-
.wait();
|
|
70
|
+
await t.feeJuiceContract.methods.claim(bobsAddress, claim.claimAmount, secret, index).send({ from: bobsAddress });
|
|
74
71
|
const [balance] = await t.getGasBalanceFn(bobsAddress);
|
|
75
72
|
expect(balance).toEqual(claim.claimAmount);
|
|
76
73
|
});
|