@aztec/end-to-end 3.0.0-nightly.20250924 → 3.0.0-nightly.20250925
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 +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +4 -7
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts +1 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.d.ts +1 -1
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.d.ts +1 -1
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.d.ts +2 -8
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +15 -21
- package/dest/e2e_token_contract/token_contract_test.d.ts +1 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.d.ts +0 -7
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.d.ts +1 -1
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +4 -6
- package/dest/fixtures/utils.d.ts +1 -1
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +16 -28
- package/dest/shared/submit-transactions.d.ts +1 -1
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.d.ts +3 -3
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +17 -19
- package/package.json +37 -37
- package/src/bench/client_flows/client_flows_benchmark.ts +3 -6
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +1 -1
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +1 -1
- package/src/e2e_deploy_contract/deploy_test.ts +1 -1
- package/src/e2e_fees/bridging_race.notest.ts +1 -1
- package/src/e2e_fees/fees_test.ts +1 -1
- package/src/e2e_p2p/p2p_network.ts +1 -1
- package/src/e2e_p2p/shared.ts +19 -17
- package/src/e2e_token_contract/token_contract_test.ts +1 -1
- package/src/fixtures/e2e_prover_test.ts +1 -1
- package/src/fixtures/setup_p2p_test.ts +0 -8
- package/src/fixtures/snapshot_manager.ts +4 -6
- package/src/fixtures/utils.ts +17 -30
- package/src/shared/submit-transactions.ts +1 -1
- package/src/shared/uniswap_l1_l2.ts +1 -1
- package/src/spartan/setup_test_wallets.ts +17 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateSchnorrAccounts
|
|
1
|
+
import { generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
2
2
|
import {
|
|
3
3
|
type AztecAddress,
|
|
4
4
|
type AztecNode,
|
|
@@ -9,15 +9,14 @@ import {
|
|
|
9
9
|
SponsoredFeePaymentMethod,
|
|
10
10
|
type Wallet,
|
|
11
11
|
createAztecNodeClient,
|
|
12
|
-
createCompatibleClient,
|
|
13
12
|
retryUntil,
|
|
14
13
|
} from '@aztec/aztec.js';
|
|
15
14
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
16
15
|
import type { Logger } from '@aztec/foundation/log';
|
|
17
16
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
18
|
-
import { createPXEService } from '@aztec/pxe/server';
|
|
19
17
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
20
|
-
import {
|
|
18
|
+
import { registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet';
|
|
19
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
21
20
|
|
|
22
21
|
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
23
22
|
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
@@ -39,39 +38,33 @@ const TOKEN_SYMBOL = 'USD';
|
|
|
39
38
|
const TOKEN_DECIMALS = 18n;
|
|
40
39
|
|
|
41
40
|
export async function setupTestAccountsWithTokens(
|
|
42
|
-
pxeUrl: string,
|
|
43
41
|
nodeUrl: string,
|
|
44
42
|
mintAmount: bigint,
|
|
45
43
|
logger: Logger,
|
|
46
44
|
): Promise<TestAccounts> {
|
|
47
45
|
const ACCOUNT_COUNT = 1; // TODO fix this to allow for 16 wallets again
|
|
48
46
|
|
|
49
|
-
const pxe = await createCompatibleClient(pxeUrl, logger);
|
|
50
47
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
51
|
-
const wallet =
|
|
48
|
+
const wallet = await TestWallet.create(aztecNode);
|
|
52
49
|
|
|
53
|
-
const [recipientAccount, ...accounts] = (await
|
|
50
|
+
const [recipientAccount, ...accounts] = (await registerInitialSandboxAccountsInWallet(wallet)).slice(
|
|
51
|
+
0,
|
|
52
|
+
ACCOUNT_COUNT + 1,
|
|
53
|
+
);
|
|
54
54
|
|
|
55
55
|
const tokenAdmin = accounts[0];
|
|
56
|
-
const tokenAddress = await deployTokenAndMint(
|
|
57
|
-
wallet,
|
|
58
|
-
accounts.map(acc => acc.address),
|
|
59
|
-
tokenAdmin.address,
|
|
60
|
-
mintAmount,
|
|
61
|
-
undefined,
|
|
62
|
-
logger,
|
|
63
|
-
);
|
|
56
|
+
const tokenAddress = await deployTokenAndMint(wallet, accounts, tokenAdmin, mintAmount, undefined, logger);
|
|
64
57
|
const tokenContract = await TokenContract.at(tokenAddress, wallet);
|
|
65
58
|
|
|
66
59
|
return {
|
|
67
60
|
aztecNode,
|
|
68
|
-
accounts
|
|
61
|
+
accounts,
|
|
69
62
|
wallet,
|
|
70
|
-
tokenAdminAddress: tokenAdmin
|
|
63
|
+
tokenAdminAddress: tokenAdmin,
|
|
71
64
|
tokenName: TOKEN_NAME,
|
|
72
65
|
tokenAddress,
|
|
73
66
|
tokenContract,
|
|
74
|
-
recipientAddress: recipientAccount
|
|
67
|
+
recipientAddress: recipientAccount,
|
|
75
68
|
};
|
|
76
69
|
}
|
|
77
70
|
|
|
@@ -121,7 +114,6 @@ export async function deploySponsoredTestAccounts(
|
|
|
121
114
|
}
|
|
122
115
|
|
|
123
116
|
export async function deployTestAccountsWithTokens(
|
|
124
|
-
pxeUrl: string,
|
|
125
117
|
nodeUrl: string,
|
|
126
118
|
l1RpcUrls: string[],
|
|
127
119
|
mnemonicOrPrivateKey: string,
|
|
@@ -129,9 +121,8 @@ export async function deployTestAccountsWithTokens(
|
|
|
129
121
|
logger: Logger,
|
|
130
122
|
numberOfFundedWallets = 1,
|
|
131
123
|
): Promise<TestAccounts> {
|
|
132
|
-
const pxe = await createCompatibleClient(pxeUrl, logger);
|
|
133
124
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
134
|
-
const wallet =
|
|
125
|
+
const wallet = await TestWallet.create(aztecNode);
|
|
135
126
|
|
|
136
127
|
const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
|
|
137
128
|
const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt);
|
|
@@ -294,20 +285,20 @@ export async function createWalletAndAztecNodeClient(
|
|
|
294
285
|
): Promise<{ wallet: TestWallet; aztecNode: AztecNode; cleanup: () => Promise<void> }> {
|
|
295
286
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
296
287
|
const [bbConfig, acvmConfig] = await Promise.all([getBBConfig(logger), getACVMConfig(logger)]);
|
|
297
|
-
const
|
|
288
|
+
const pxeConfig = {
|
|
298
289
|
dataDirectory: undefined,
|
|
299
290
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
300
291
|
...bbConfig,
|
|
301
292
|
...acvmConfig,
|
|
302
293
|
proverEnabled,
|
|
303
|
-
}
|
|
304
|
-
const wallet =
|
|
294
|
+
};
|
|
295
|
+
const wallet = await TestWallet.create(aztecNode, pxeConfig);
|
|
305
296
|
|
|
306
297
|
return {
|
|
307
298
|
wallet,
|
|
308
299
|
aztecNode,
|
|
309
300
|
async cleanup() {
|
|
310
|
-
await
|
|
301
|
+
await wallet.stop();
|
|
311
302
|
await bbConfig?.cleanup();
|
|
312
303
|
await acvmConfig?.cleanup();
|
|
313
304
|
},
|