@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EAGd,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAI9B,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EAGd,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAI9B,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAkB5D,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,QAAQ,EAAE,wBAAwB,CAAC;IACnC,kBAAkB;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,0BAA0B;IAC1B,cAAc,EAAE,YAAY,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,EACzC,SAAS,MAAM,OAAO,CAAC,IAAI,CAAC,EAC5B,gCAAkC,SAi+BnC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AztecAddress, type AztecNode, type FeePaymentMethod } from '@aztec/aztec.js';
|
|
2
2
|
import type { Logger } from '@aztec/foundation/log';
|
|
3
3
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
4
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
4
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
5
5
|
export interface TestAccounts {
|
|
6
6
|
aztecNode: AztecNode;
|
|
7
7
|
wallet: TestWallet;
|
|
@@ -12,9 +12,9 @@ export interface TestAccounts {
|
|
|
12
12
|
recipientAddress: AztecAddress;
|
|
13
13
|
tokenAddress: AztecAddress;
|
|
14
14
|
}
|
|
15
|
-
export declare function setupTestAccountsWithTokens(
|
|
15
|
+
export declare function setupTestAccountsWithTokens(nodeUrl: string, mintAmount: bigint, logger: Logger): Promise<TestAccounts>;
|
|
16
16
|
export declare function deploySponsoredTestAccounts(wallet: TestWallet, aztecNode: AztecNode, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number): Promise<TestAccounts>;
|
|
17
|
-
export declare function deployTestAccountsWithTokens(
|
|
17
|
+
export declare function deployTestAccountsWithTokens(nodeUrl: string, l1RpcUrls: string[], mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number): Promise<TestAccounts>;
|
|
18
18
|
export declare function performTransfers({ testAccounts, rounds, transferAmount, logger, feePaymentMethod, }: {
|
|
19
19
|
testAccounts: TestAccounts;
|
|
20
20
|
rounds: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,gBAAgB,EAOtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAMvD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,YAAY,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,YAAY,CAAC;IAC/B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,YAAY,CAAC,CAyBvB;AAED,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,qBAAqB,SAAI,GACxB,OAAO,CAAC,YAAY,CAAC,CAqCvB;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EAAE,EACnB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,qBAAqB,SAAI,GACxB,OAAO,CAAC,YAAY,CAAC,CAgDvB;AA+ED,wBAAsB,gBAAgB,CAAC,EACrC,YAAY,EACZ,MAAM,EACN,cAAc,EACd,MAAM,EACN,gBAAgB,GACjB,EAAE;IACD,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,iBAiBA;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAqBrF"}
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import { generateSchnorrAccounts
|
|
2
|
-
import { FeeJuicePaymentMethodWithClaim, Fr, L1FeeJuicePortalManager, SponsoredFeePaymentMethod, createAztecNodeClient,
|
|
1
|
+
import { generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
2
|
+
import { FeeJuicePaymentMethodWithClaim, Fr, L1FeeJuicePortalManager, SponsoredFeePaymentMethod, createAztecNodeClient, retryUntil } from '@aztec/aztec.js';
|
|
3
3
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
4
4
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
5
|
-
import {
|
|
6
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
5
|
+
import { registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet';
|
|
6
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
7
7
|
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
8
8
|
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
9
9
|
import { getSponsoredFPCAddress, registerSponsoredFPC } from '../fixtures/utils.js';
|
|
10
10
|
const TOKEN_NAME = 'USDC';
|
|
11
11
|
const TOKEN_SYMBOL = 'USD';
|
|
12
12
|
const TOKEN_DECIMALS = 18n;
|
|
13
|
-
export async function setupTestAccountsWithTokens(
|
|
13
|
+
export async function setupTestAccountsWithTokens(nodeUrl, mintAmount, logger) {
|
|
14
14
|
const ACCOUNT_COUNT = 1; // TODO fix this to allow for 16 wallets again
|
|
15
|
-
const pxe = await createCompatibleClient(pxeUrl, logger);
|
|
16
15
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
17
|
-
const wallet =
|
|
18
|
-
const [recipientAccount, ...accounts] = (await
|
|
16
|
+
const wallet = await TestWallet.create(aztecNode);
|
|
17
|
+
const [recipientAccount, ...accounts] = (await registerInitialSandboxAccountsInWallet(wallet)).slice(0, ACCOUNT_COUNT + 1);
|
|
19
18
|
const tokenAdmin = accounts[0];
|
|
20
|
-
const tokenAddress = await deployTokenAndMint(wallet, accounts
|
|
19
|
+
const tokenAddress = await deployTokenAndMint(wallet, accounts, tokenAdmin, mintAmount, undefined, logger);
|
|
21
20
|
const tokenContract = await TokenContract.at(tokenAddress, wallet);
|
|
22
21
|
return {
|
|
23
22
|
aztecNode,
|
|
24
|
-
accounts
|
|
23
|
+
accounts,
|
|
25
24
|
wallet,
|
|
26
|
-
tokenAdminAddress: tokenAdmin
|
|
25
|
+
tokenAdminAddress: tokenAdmin,
|
|
27
26
|
tokenName: TOKEN_NAME,
|
|
28
27
|
tokenAddress,
|
|
29
28
|
tokenContract,
|
|
30
|
-
recipientAddress: recipientAccount
|
|
29
|
+
recipientAddress: recipientAccount
|
|
31
30
|
};
|
|
32
31
|
}
|
|
33
32
|
export async function deploySponsoredTestAccounts(wallet, aztecNode, mintAmount, logger, numberOfFundedWallets = 1) {
|
|
@@ -67,10 +66,9 @@ export async function deploySponsoredTestAccounts(wallet, aztecNode, mintAmount,
|
|
|
67
66
|
recipientAddress: recipientAccount.getAddress()
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
|
-
export async function deployTestAccountsWithTokens(
|
|
71
|
-
const pxe = await createCompatibleClient(pxeUrl, logger);
|
|
69
|
+
export async function deployTestAccountsWithTokens(nodeUrl, l1RpcUrls, mnemonicOrPrivateKey, mintAmount, logger, numberOfFundedWallets = 1) {
|
|
72
70
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
73
|
-
const wallet =
|
|
71
|
+
const wallet = await TestWallet.create(aztecNode);
|
|
74
72
|
const [recipient, ...funded] = await generateSchnorrAccounts(numberOfFundedWallets + 1);
|
|
75
73
|
const recipientAccount = await wallet.createSchnorrAccount(recipient.secret, recipient.salt);
|
|
76
74
|
const fundedAccounts = await Promise.all(funded.map((a)=>wallet.createSchnorrAccount(a.secret, a.salt)));
|
|
@@ -178,19 +176,19 @@ export async function createWalletAndAztecNodeClient(nodeUrl, proverEnabled, log
|
|
|
178
176
|
getBBConfig(logger),
|
|
179
177
|
getACVMConfig(logger)
|
|
180
178
|
]);
|
|
181
|
-
const
|
|
179
|
+
const pxeConfig = {
|
|
182
180
|
dataDirectory: undefined,
|
|
183
181
|
dataStoreMapSizeKB: 1024 * 1024,
|
|
184
182
|
...bbConfig,
|
|
185
183
|
...acvmConfig,
|
|
186
184
|
proverEnabled
|
|
187
|
-
}
|
|
188
|
-
const wallet =
|
|
185
|
+
};
|
|
186
|
+
const wallet = await TestWallet.create(aztecNode, pxeConfig);
|
|
189
187
|
return {
|
|
190
188
|
wallet,
|
|
191
189
|
aztecNode,
|
|
192
190
|
async cleanup () {
|
|
193
|
-
await
|
|
191
|
+
await wallet.stop();
|
|
194
192
|
await bbConfig?.cleanup();
|
|
195
193
|
await acvmConfig?.cleanup();
|
|
196
194
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20250925",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,42 +25,42 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
29
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
30
|
-
"@aztec/aztec": "3.0.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "3.0.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "3.0.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "3.0.0-nightly.
|
|
36
|
-
"@aztec/bot": "3.0.0-nightly.
|
|
37
|
-
"@aztec/cli": "3.0.0-nightly.
|
|
38
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "3.0.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
42
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "3.0.0-nightly.
|
|
46
|
-
"@aztec/node-keystore": "3.0.0-nightly.
|
|
47
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
48
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
49
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
50
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
51
|
-
"@aztec/p2p": "3.0.0-nightly.
|
|
52
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
53
|
-
"@aztec/prover-client": "3.0.0-nightly.
|
|
54
|
-
"@aztec/prover-node": "3.0.0-nightly.
|
|
55
|
-
"@aztec/pxe": "3.0.0-nightly.
|
|
56
|
-
"@aztec/sequencer-client": "3.0.0-nightly.
|
|
57
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
58
|
-
"@aztec/slasher": "3.0.0-nightly.
|
|
59
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
60
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
61
|
-
"@aztec/test-wallet": "3.0.0-nightly.
|
|
62
|
-
"@aztec/validator-client": "3.0.0-nightly.
|
|
63
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
28
|
+
"@aztec/accounts": "3.0.0-nightly.20250925",
|
|
29
|
+
"@aztec/archiver": "3.0.0-nightly.20250925",
|
|
30
|
+
"@aztec/aztec": "3.0.0-nightly.20250925",
|
|
31
|
+
"@aztec/aztec-node": "3.0.0-nightly.20250925",
|
|
32
|
+
"@aztec/aztec.js": "3.0.0-nightly.20250925",
|
|
33
|
+
"@aztec/bb-prover": "3.0.0-nightly.20250925",
|
|
34
|
+
"@aztec/blob-lib": "3.0.0-nightly.20250925",
|
|
35
|
+
"@aztec/blob-sink": "3.0.0-nightly.20250925",
|
|
36
|
+
"@aztec/bot": "3.0.0-nightly.20250925",
|
|
37
|
+
"@aztec/cli": "3.0.0-nightly.20250925",
|
|
38
|
+
"@aztec/constants": "3.0.0-nightly.20250925",
|
|
39
|
+
"@aztec/entrypoints": "3.0.0-nightly.20250925",
|
|
40
|
+
"@aztec/epoch-cache": "3.0.0-nightly.20250925",
|
|
41
|
+
"@aztec/ethereum": "3.0.0-nightly.20250925",
|
|
42
|
+
"@aztec/foundation": "3.0.0-nightly.20250925",
|
|
43
|
+
"@aztec/kv-store": "3.0.0-nightly.20250925",
|
|
44
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20250925",
|
|
45
|
+
"@aztec/merkle-tree": "3.0.0-nightly.20250925",
|
|
46
|
+
"@aztec/node-keystore": "3.0.0-nightly.20250925",
|
|
47
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20250925",
|
|
48
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20250925",
|
|
49
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20250925",
|
|
50
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20250925",
|
|
51
|
+
"@aztec/p2p": "3.0.0-nightly.20250925",
|
|
52
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20250925",
|
|
53
|
+
"@aztec/prover-client": "3.0.0-nightly.20250925",
|
|
54
|
+
"@aztec/prover-node": "3.0.0-nightly.20250925",
|
|
55
|
+
"@aztec/pxe": "3.0.0-nightly.20250925",
|
|
56
|
+
"@aztec/sequencer-client": "3.0.0-nightly.20250925",
|
|
57
|
+
"@aztec/simulator": "3.0.0-nightly.20250925",
|
|
58
|
+
"@aztec/slasher": "3.0.0-nightly.20250925",
|
|
59
|
+
"@aztec/stdlib": "3.0.0-nightly.20250925",
|
|
60
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20250925",
|
|
61
|
+
"@aztec/test-wallet": "3.0.0-nightly.20250925",
|
|
62
|
+
"@aztec/validator-client": "3.0.0-nightly.20250925",
|
|
63
|
+
"@aztec/world-state": "3.0.0-nightly.20250925",
|
|
64
64
|
"@iarna/toml": "^2.2.5",
|
|
65
65
|
"@jest/globals": "^30.0.0",
|
|
66
66
|
"@noble/curves": "=1.0.0",
|
|
@@ -26,9 +26,9 @@ import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
|
26
26
|
import { TokenContract as BananaCoin, TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
27
27
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
28
28
|
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
29
|
-
import { type PXEServiceConfig,
|
|
29
|
+
import { type PXEServiceConfig, getPXEServiceConfig } from '@aztec/pxe/server';
|
|
30
30
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
31
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
31
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
32
32
|
|
|
33
33
|
import { MNEMONIC } from '../../fixtures/fixtures.js';
|
|
34
34
|
import {
|
|
@@ -215,19 +215,16 @@ export class ClientFlowsBenchmark {
|
|
|
215
215
|
this.coinbase = EthAddress.random();
|
|
216
216
|
|
|
217
217
|
const userPXEConfig = getPXEServiceConfig();
|
|
218
|
-
const l1Contracts = await aztecNode.getL1ContractAddresses();
|
|
219
218
|
const userPXEConfigWithContracts = {
|
|
220
219
|
...userPXEConfig,
|
|
221
220
|
proverEnabled: this.realProofs,
|
|
222
|
-
l1Contracts,
|
|
223
221
|
} as PXEServiceConfig;
|
|
224
222
|
|
|
225
|
-
this.
|
|
223
|
+
this.userWallet = await TestWallet.create(this.aztecNode, userPXEConfigWithContracts, {
|
|
226
224
|
loggers: {
|
|
227
225
|
prover: this.proxyLogger.createLogger('pxe:bb:wasm:bundle:proxied'),
|
|
228
226
|
},
|
|
229
227
|
});
|
|
230
|
-
this.userWallet = new TestWallet(this.userPXE, this.aztecNode);
|
|
231
228
|
},
|
|
232
229
|
);
|
|
233
230
|
}
|
|
@@ -12,7 +12,7 @@ import type { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
|
12
12
|
import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist';
|
|
13
13
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
14
14
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
15
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
15
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
16
16
|
|
|
17
17
|
import { jest } from '@jest/globals';
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ import { InboxAbi, OutboxAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-
|
|
|
12
12
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
13
13
|
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
14
14
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
15
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
15
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
16
16
|
|
|
17
17
|
import { getContract } from 'viem';
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '@aztec/aztec.js';
|
|
13
13
|
import type { StatefulTestContract } from '@aztec/noir-test-contracts.js/StatefulTest';
|
|
14
14
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
15
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
15
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
16
16
|
|
|
17
17
|
import { type ISnapshotManager, createSnapshotManager, deployAccounts } from '../fixtures/snapshot_manager.js';
|
|
18
18
|
|
|
@@ -2,7 +2,7 @@ import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
|
2
2
|
import { Fr, type Logger, sleep } from '@aztec/aztec.js';
|
|
3
3
|
import { Fq } from '@aztec/foundation/fields';
|
|
4
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
5
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
6
6
|
|
|
7
7
|
import { jest } from '@jest/globals';
|
|
8
8
|
import type { Hex } from 'viem';
|
|
@@ -14,7 +14,7 @@ import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
|
|
|
14
14
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
15
15
|
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
16
16
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
17
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
17
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
18
18
|
|
|
19
19
|
import { getContract } from 'viem';
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
|
25
25
|
import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
|
|
26
26
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
27
27
|
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
|
|
28
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
28
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
29
29
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
30
30
|
|
|
31
31
|
import getPort from 'get-port';
|
package/src/e2e_p2p/shared.ts
CHANGED
|
@@ -16,13 +16,12 @@ import { timesAsync, unique } from '@aztec/foundation/collection';
|
|
|
16
16
|
import { pluralize } from '@aztec/foundation/string';
|
|
17
17
|
import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
18
18
|
import { TestContract, TestContractArtifact } from '@aztec/noir-test-contracts.js/Test';
|
|
19
|
-
import {
|
|
19
|
+
import { getPXEServiceConfig, getPXEServiceConfig as getRpcConfig } from '@aztec/pxe/server';
|
|
20
20
|
import { getRoundForOffense } from '@aztec/slasher';
|
|
21
21
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
22
|
import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
|
|
23
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
23
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
24
24
|
|
|
25
|
-
import type { NodeContext } from '../fixtures/setup_p2p_test.js';
|
|
26
25
|
import { submitTxsTo } from '../shared/submit-transactions.js';
|
|
27
26
|
|
|
28
27
|
// submits a set of transactions to the provided Private eXecution Environment (PXE)
|
|
@@ -55,33 +54,38 @@ export const submitComplexTxsTo = async (
|
|
|
55
54
|
return txs;
|
|
56
55
|
};
|
|
57
56
|
|
|
58
|
-
// creates
|
|
59
|
-
export const
|
|
57
|
+
// creates a wallet and submit a given number of transactions through it.
|
|
58
|
+
export const submitTransactions = async (
|
|
60
59
|
logger: Logger,
|
|
61
60
|
node: AztecNodeService,
|
|
62
61
|
numTxs: number,
|
|
63
62
|
fundedAccount: InitialAccountData,
|
|
64
|
-
): Promise<
|
|
63
|
+
): Promise<SentTx[]> => {
|
|
65
64
|
const rpcConfig = getRpcConfig();
|
|
66
65
|
rpcConfig.proverEnabled = false;
|
|
67
|
-
const
|
|
68
|
-
|
|
66
|
+
const wallet = await TestWallet.create(
|
|
67
|
+
node,
|
|
68
|
+
{ ...getPXEServiceConfig(), proverEnabled: false },
|
|
69
|
+
{ useLogSuffix: true },
|
|
70
|
+
);
|
|
69
71
|
const fundedAccountManager = await wallet.createSchnorrAccount(fundedAccount.secret, fundedAccount.salt);
|
|
70
|
-
|
|
71
|
-
return { txs, pxeService, node };
|
|
72
|
+
return submitTxsTo(wallet, fundedAccountManager.getAddress(), numTxs, logger);
|
|
72
73
|
};
|
|
73
74
|
|
|
74
|
-
export async function
|
|
75
|
+
export async function prepareTransactions(
|
|
75
76
|
logger: Logger,
|
|
76
77
|
node: AztecNodeService,
|
|
77
78
|
numTxs: number,
|
|
78
79
|
fundedAccount: InitialAccountData,
|
|
79
|
-
): Promise<
|
|
80
|
+
): Promise<ProvenTx[]> {
|
|
80
81
|
const rpcConfig = getRpcConfig();
|
|
81
82
|
rpcConfig.proverEnabled = false;
|
|
82
|
-
const pxe = await createPXEService(node, rpcConfig, { useLogSuffix: true });
|
|
83
83
|
|
|
84
|
-
const wallet =
|
|
84
|
+
const wallet = await TestWallet.create(
|
|
85
|
+
node,
|
|
86
|
+
{ ...getPXEServiceConfig(), proverEnabled: false },
|
|
87
|
+
{ useLogSuffix: true },
|
|
88
|
+
);
|
|
85
89
|
const fundedAccountManager = await wallet.createSchnorrAccount(fundedAccount.secret, fundedAccount.salt);
|
|
86
90
|
|
|
87
91
|
const testContractInstance = await getContractInstanceFromInstantiationParams(TestContractArtifact, {
|
|
@@ -90,14 +94,12 @@ export async function createPXEServiceAndPrepareTransactions(
|
|
|
90
94
|
await wallet.registerContract(testContractInstance, TestContractArtifact);
|
|
91
95
|
const contract = await TestContract.at(testContractInstance.address, wallet);
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
return timesAsync(numTxs, async () => {
|
|
94
98
|
const tx = await contract.methods.emit_nullifier(Fr.random()).prove({ from: fundedAccountManager.getAddress() });
|
|
95
99
|
const txHash = tx.getTxHash();
|
|
96
100
|
logger.info(`Tx prepared with hash ${txHash}`);
|
|
97
101
|
return tx;
|
|
98
102
|
});
|
|
99
|
-
|
|
100
|
-
return { txs, pxeService: pxe, node };
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
export function awaitProposalExecution(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AztecAddress, type AztecNode, type Logger, createLogger } from '@aztec/aztec.js';
|
|
2
2
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
3
3
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
4
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
4
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
5
5
|
|
|
6
6
|
import { jest } from '@jest/globals';
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
|
17
17
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
18
18
|
import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec/prover-node';
|
|
19
19
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
20
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
20
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
21
21
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
22
22
|
|
|
23
23
|
import { type Hex, getContract } from 'viem';
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* Test fixtures and utilities to set up and run a test using multiple validators
|
|
3
3
|
*/
|
|
4
4
|
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
5
|
-
import type { SentTx } from '@aztec/aztec.js';
|
|
6
5
|
import { SecretValue } from '@aztec/foundation/config';
|
|
7
6
|
import { addLogNameHandler, removeLogNameHandler } from '@aztec/foundation/log';
|
|
8
7
|
import { bufferToHex } from '@aztec/foundation/string';
|
|
9
8
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
10
9
|
import type { ProverNodeConfig, ProverNodeDeps } from '@aztec/prover-node';
|
|
11
|
-
import type { PXEService } from '@aztec/pxe/server';
|
|
12
10
|
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
13
11
|
|
|
14
12
|
import getPort from 'get-port';
|
|
@@ -23,12 +21,6 @@ import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';
|
|
|
23
21
|
// to avoid running validators with the same key
|
|
24
22
|
export const ATTESTER_PRIVATE_KEYS_START_INDEX = 3;
|
|
25
23
|
|
|
26
|
-
export interface NodeContext {
|
|
27
|
-
node: AztecNodeService;
|
|
28
|
-
pxeService: PXEService;
|
|
29
|
-
txs: SentTx[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
24
|
export function generatePrivateKeys(startIndex: number, numberOfKeys: number): `0x${string}`[] {
|
|
33
25
|
const privateKeys: `0x${string}`[] = [];
|
|
34
26
|
// Do not start from 0 as it is used during setup
|
|
@@ -31,11 +31,11 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
31
31
|
import { resolver, reviver } from '@aztec/foundation/serialize';
|
|
32
32
|
import { TestDateProvider } from '@aztec/foundation/timer';
|
|
33
33
|
import type { ProverNode } from '@aztec/prover-node';
|
|
34
|
-
import {
|
|
34
|
+
import { getPXEServiceConfig } from '@aztec/pxe/server';
|
|
35
35
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
36
36
|
import { tryStop } from '@aztec/stdlib/interfaces/server';
|
|
37
37
|
import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
38
|
-
import { TestWallet } from '@aztec/test-wallet';
|
|
38
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
39
39
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
40
40
|
|
|
41
41
|
import type { Anvil } from '@viem/anvil';
|
|
@@ -446,8 +446,7 @@ async function setupFromFresh(
|
|
|
446
446
|
pxeConfig.dataDirectory = statePath ?? path.join(directoryToCleanup, randomBytes(8).toString('hex'));
|
|
447
447
|
// Only enable proving if specifically requested.
|
|
448
448
|
pxeConfig.proverEnabled = !!opts.realProofs;
|
|
449
|
-
const
|
|
450
|
-
const wallet = new TestWallet(pxe, aztecNode);
|
|
449
|
+
const wallet = await TestWallet.create(aztecNode, pxeConfig);
|
|
451
450
|
const cheatCodes = await CheatCodes.create(aztecNodeConfig.l1RpcUrls, wallet, aztecNode, dateProvider);
|
|
452
451
|
|
|
453
452
|
if (statePath) {
|
|
@@ -575,8 +574,7 @@ async function setupFromState(statePath: string, logger: Logger): Promise<Subsys
|
|
|
575
574
|
logger.verbose('Creating pxe...');
|
|
576
575
|
const pxeConfig = getPXEServiceConfig();
|
|
577
576
|
pxeConfig.dataDirectory = statePath;
|
|
578
|
-
const
|
|
579
|
-
const wallet = new TestWallet(pxe, aztecNode);
|
|
577
|
+
const wallet = await TestWallet.create(aztecNode, pxeConfig);
|
|
580
578
|
const cheatCodes = await CheatCodes.create(aztecNodeConfig.l1RpcUrls, wallet, aztecNode, dateProvider);
|
|
581
579
|
|
|
582
580
|
return {
|
package/src/fixtures/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr';
|
|
2
|
-
import { type InitialAccountData, generateSchnorrAccounts,
|
|
2
|
+
import { type InitialAccountData, generateSchnorrAccounts, getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
3
3
|
import { type Archiver, createArchiver } from '@aztec/archiver';
|
|
4
4
|
import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node';
|
|
5
5
|
import {
|
|
@@ -11,10 +11,8 @@ import {
|
|
|
11
11
|
type Wallet,
|
|
12
12
|
createAztecNodeClient,
|
|
13
13
|
createLogger,
|
|
14
|
-
createPXEClient,
|
|
15
|
-
makeFetch,
|
|
16
14
|
sleep,
|
|
17
|
-
|
|
15
|
+
waitForNode,
|
|
18
16
|
} from '@aztec/aztec.js';
|
|
19
17
|
import { publishContractClass, publishInstance } from '@aztec/aztec.js/deployment';
|
|
20
18
|
import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec/testing';
|
|
@@ -56,11 +54,9 @@ import type { P2PClientDeps } from '@aztec/p2p';
|
|
|
56
54
|
import { MockGossipSubNetwork, getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
57
55
|
import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
|
|
58
56
|
import { type ProverNode, type ProverNodeConfig, type ProverNodeDeps, createProverNode } from '@aztec/prover-node';
|
|
59
|
-
import { type PXEServiceConfig,
|
|
57
|
+
import { type PXEServiceConfig, getPXEServiceConfig } from '@aztec/pxe/server';
|
|
60
58
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
61
59
|
import type { TestSequencerClient } from '@aztec/sequencer-client/test';
|
|
62
|
-
import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
|
|
63
|
-
import { FileCircuitRecorder } from '@aztec/simulator/testing';
|
|
64
60
|
import {
|
|
65
61
|
type ContractInstanceWithAddress,
|
|
66
62
|
getContractClassFromArtifact,
|
|
@@ -77,7 +73,7 @@ import {
|
|
|
77
73
|
initTelemetryClient,
|
|
78
74
|
} from '@aztec/telemetry-client';
|
|
79
75
|
import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench';
|
|
80
|
-
import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet';
|
|
76
|
+
import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet/server';
|
|
81
77
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
82
78
|
|
|
83
79
|
import type { Anvil } from '@viem/anvil';
|
|
@@ -97,8 +93,8 @@ import { isMetricsLoggingRequested, setupMetricsLogger } from './logging.js';
|
|
|
97
93
|
export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
|
|
98
94
|
export { startAnvil };
|
|
99
95
|
|
|
100
|
-
const {
|
|
101
|
-
const getAztecUrl = () =>
|
|
96
|
+
const { AZTEC_NODE_URL = '' } = process.env;
|
|
97
|
+
const getAztecUrl = () => AZTEC_NODE_URL;
|
|
102
98
|
|
|
103
99
|
let telemetry: TelemetryClient | undefined = undefined;
|
|
104
100
|
function getTelemetryClient(partialConfig: Partial<TelemetryClientConfig> & { benchmark?: boolean } = {}) {
|
|
@@ -178,18 +174,11 @@ export async function setupPXEServiceAndGetWallet(
|
|
|
178
174
|
pxeServiceConfig.dataDirectory = path.join(tmpdir(), randomBytes(8).toString('hex'));
|
|
179
175
|
}
|
|
180
176
|
|
|
181
|
-
const simulator = new WASMSimulator();
|
|
182
|
-
const recorder = process.env.CIRCUIT_RECORD_DIR
|
|
183
|
-
? new FileCircuitRecorder(process.env.CIRCUIT_RECORD_DIR)
|
|
184
|
-
: new MemoryCircuitRecorder();
|
|
185
|
-
const simulatorWithRecorder = new SimulatorRecorderWrapper(simulator, recorder);
|
|
186
|
-
const pxe = await createPXEServiceWithSimulator(aztecNode, simulatorWithRecorder, pxeServiceConfig, {
|
|
187
|
-
useLogSuffix,
|
|
188
|
-
});
|
|
189
|
-
|
|
190
177
|
const teardown = configuredDataDirectory ? () => Promise.resolve() : () => tryRmDir(pxeServiceConfig.dataDirectory!);
|
|
191
178
|
|
|
192
|
-
const wallet =
|
|
179
|
+
const wallet = await TestWallet.create(aztecNode, pxeServiceConfig, {
|
|
180
|
+
useLogSuffix,
|
|
181
|
+
});
|
|
193
182
|
|
|
194
183
|
return {
|
|
195
184
|
wallet,
|
|
@@ -217,11 +206,9 @@ async function setupWithRemoteEnvironment(
|
|
|
217
206
|
const aztecNodeUrl = getAztecUrl();
|
|
218
207
|
logger.verbose(`Creating Aztec Node client to remote host ${aztecNodeUrl}`);
|
|
219
208
|
const aztecNode = createAztecNodeClient(aztecNodeUrl);
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
logger.verbose('JSON RPC client connected to PXE');
|
|
224
|
-
logger.verbose(`Retrieving contract addresses from ${PXE_URL}`);
|
|
209
|
+
await waitForNode(aztecNode, logger);
|
|
210
|
+
logger.verbose('JSON RPC client connected to Aztec Node');
|
|
211
|
+
logger.verbose(`Retrieving contract addresses from ${aztecNodeUrl}`);
|
|
225
212
|
const { l1ContractAddresses, rollupVersion } = await aztecNode.getNodeInfo();
|
|
226
213
|
|
|
227
214
|
const l1Client = createExtendedL1Client(config.l1RpcUrls, account, foundry);
|
|
@@ -232,12 +219,12 @@ async function setupWithRemoteEnvironment(
|
|
|
232
219
|
rollupVersion,
|
|
233
220
|
};
|
|
234
221
|
const ethCheatCodes = new EthCheatCodes(config.l1RpcUrls, new DateProvider());
|
|
235
|
-
const wallet =
|
|
222
|
+
const wallet = await TestWallet.create(aztecNode);
|
|
236
223
|
const cheatCodes = await CheatCodes.create(config.l1RpcUrls, wallet, aztecNode, new DateProvider());
|
|
237
224
|
const teardown = () => Promise.resolve();
|
|
238
225
|
|
|
239
226
|
logger.verbose('Populating wallet from already registered accounts...');
|
|
240
|
-
const initialFundedAccounts = await
|
|
227
|
+
const initialFundedAccounts = await getInitialTestAccountsData();
|
|
241
228
|
|
|
242
229
|
if (initialFundedAccounts.length < numberOfAccounts) {
|
|
243
230
|
throw new Error(`Required ${numberOfAccounts} accounts. Found ${initialFundedAccounts.length}.`);
|
|
@@ -404,9 +391,9 @@ export async function setup(
|
|
|
404
391
|
if (!isAnvilTestChain(chain.id)) {
|
|
405
392
|
throw new Error(`No ETHEREUM_HOSTS set but non anvil chain requested`);
|
|
406
393
|
}
|
|
407
|
-
if (
|
|
394
|
+
if (AZTEC_NODE_URL) {
|
|
408
395
|
throw new Error(
|
|
409
|
-
`
|
|
396
|
+
`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`,
|
|
410
397
|
);
|
|
411
398
|
}
|
|
412
399
|
|
|
@@ -459,7 +446,7 @@ export async function setup(
|
|
|
459
446
|
|
|
460
447
|
config.coinbase = EthAddress.fromString(publisherHdAccount.address);
|
|
461
448
|
|
|
462
|
-
if (
|
|
449
|
+
if (AZTEC_NODE_URL) {
|
|
463
450
|
// we are setting up against a remote environment, l1 contracts are assumed to already be deployed
|
|
464
451
|
return await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts);
|
|
465
452
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AztecAddress, Fr, GrumpkinScalar, type Logger, type SentTx, TxStatus } from '@aztec/aztec.js';
|
|
2
2
|
import { times } from '@aztec/foundation/collection';
|
|
3
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
3
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
4
4
|
|
|
5
5
|
// submits a set of transactions to the provided Wallet
|
|
6
6
|
export const submitTxsTo = async (
|
|
@@ -20,7 +20,7 @@ import { InboxAbi, UniswapPortalAbi, UniswapPortalBytecode } from '@aztec/l1-art
|
|
|
20
20
|
import { UniswapContract } from '@aztec/noir-contracts.js/Uniswap';
|
|
21
21
|
import { computeL2ToL1MessageHash } from '@aztec/stdlib/hash';
|
|
22
22
|
import { computeL2ToL1MembershipWitness } from '@aztec/stdlib/messaging';
|
|
23
|
-
import type { TestWallet } from '@aztec/test-wallet';
|
|
23
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
24
24
|
|
|
25
25
|
import { jest } from '@jest/globals';
|
|
26
26
|
import { type GetContractReturnType, getContract, parseEther, toFunctionSelector } from 'viem';
|