@aztec/end-to-end 2.1.0-rc.9 → 3.0.0-devnet.2
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/benchmark.d.ts +3 -2
- package/dest/bench/client_flows/benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.d.ts +16 -12
- package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -1
- package/dest/bench/client_flows/client_flows_benchmark.js +54 -58
- package/dest/bench/utils.d.ts +2 -11
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +10 -34
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +7 -7
- 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 +42 -42
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +10 -8
- 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 +31 -33
- package/dest/e2e_deploy_contract/deploy_test.d.ts +10 -4
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
- package/dest/e2e_deploy_contract/deploy_test.js +9 -18
- package/dest/e2e_epochs/epochs_test.d.ts +3 -1
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +10 -9
- package/dest/e2e_fees/bridging_race.notest.js +12 -9
- package/dest/e2e_fees/fees_test.d.ts +5 -5
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +23 -31
- package/dest/e2e_l1_publisher/write_json.d.ts +3 -1
- package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -1
- package/dest/e2e_l1_publisher/write_json.js +5 -5
- package/dest/e2e_multi_validator/utils.d.ts +1 -1
- package/dest/e2e_multi_validator/utils.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +6 -3
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
- package/dest/e2e_nested_contract/nested_contract_test.js +7 -9
- package/dest/e2e_p2p/inactivity_slash_test.d.ts +2 -2
- package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -1
- package/dest/e2e_p2p/inactivity_slash_test.js +5 -2
- package/dest/e2e_p2p/p2p_network.d.ts +16 -4
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +32 -10
- package/dest/e2e_p2p/shared.d.ts +11 -13
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +49 -45
- package/dest/e2e_token_contract/token_contract_test.d.ts +5 -4
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
- package/dest/e2e_token_contract/token_contract_test.js +14 -17
- package/dest/fixtures/e2e_prover_test.d.ts +8 -6
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +40 -50
- package/dest/fixtures/get_acvm_config.d.ts +1 -1
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.d.ts +1 -1
- package/dest/fixtures/get_bb_config.d.ts.map +1 -1
- package/dest/fixtures/get_bb_config.js +2 -2
- package/dest/fixtures/setup_l1_contracts.d.ts +1 -1
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
- package/dest/fixtures/setup_l1_contracts.js +2 -2
- 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 +10 -7
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
- package/dest/fixtures/snapshot_manager.js +44 -34
- package/dest/fixtures/token_utils.d.ts +6 -4
- package/dest/fixtures/token_utils.d.ts.map +1 -1
- package/dest/fixtures/token_utils.js +11 -15
- package/dest/fixtures/utils.d.ts +23 -27
- package/dest/fixtures/utils.d.ts.map +1 -1
- package/dest/fixtures/utils.js +76 -101
- package/dest/fixtures/web3signer.d.ts +1 -1
- package/dest/fixtures/web3signer.d.ts.map +1 -1
- package/dest/fixtures/web3signer.js +16 -5
- package/dest/quality_of_service/alert_checker.d.ts +1 -1
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.d.ts +16 -10
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
- package/dest/shared/cross_chain_test_harness.js +13 -15
- package/dest/shared/gas_portal_test_harness.d.ts +9 -6
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
- package/dest/shared/gas_portal_test_harness.js +10 -7
- package/dest/shared/jest_setup.js +1 -1
- package/dest/shared/submit-transactions.d.ts +5 -3
- package/dest/shared/submit-transactions.d.ts.map +1 -1
- package/dest/shared/submit-transactions.js +8 -7
- package/dest/shared/uniswap_l1_l2.d.ts +9 -6
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +29 -45
- package/dest/simulators/lending_simulator.d.ts +2 -1
- package/dest/simulators/lending_simulator.d.ts.map +1 -1
- package/dest/simulators/lending_simulator.js +3 -2
- package/dest/simulators/token_simulator.d.ts +3 -1
- package/dest/simulators/token_simulator.d.ts.map +1 -1
- package/dest/simulators/token_simulator.js +2 -2
- package/dest/spartan/setup_test_wallets.d.ts +19 -13
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +108 -85
- package/dest/spartan/utils.d.ts +44 -0
- package/dest/spartan/utils.d.ts.map +1 -1
- package/dest/spartan/utils.js +212 -20
- package/package.json +38 -37
- package/src/bench/client_flows/benchmark.ts +6 -6
- package/src/bench/client_flows/client_flows_benchmark.ts +62 -82
- package/src/bench/client_flows/data_extractor.ts +1 -1
- package/src/bench/utils.ts +9 -37
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +46 -63
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +33 -47
- package/src/e2e_deploy_contract/deploy_test.ts +17 -35
- package/src/e2e_epochs/epochs_test.ts +12 -14
- package/src/e2e_fees/bridging_race.notest.ts +14 -9
- package/src/e2e_fees/fees_test.ts +26 -38
- package/src/e2e_l1_publisher/write_json.ts +8 -6
- package/src/e2e_multi_validator/utils.ts +1 -1
- package/src/e2e_nested_contract/nested_contract_test.ts +11 -10
- package/src/e2e_p2p/inactivity_slash_test.ts +7 -3
- package/src/e2e_p2p/p2p_network.ts +105 -67
- package/src/e2e_p2p/shared.ts +50 -55
- package/src/e2e_token_contract/token_contract_test.ts +17 -17
- package/src/fixtures/e2e_prover_test.ts +51 -88
- package/src/fixtures/get_acvm_config.ts +1 -1
- package/src/fixtures/get_bb_config.ts +3 -2
- package/src/fixtures/setup_l1_contracts.ts +3 -3
- package/src/fixtures/setup_p2p_test.ts +0 -8
- package/src/fixtures/snapshot_manager.ts +61 -61
- package/src/fixtures/token_utils.ts +13 -21
- package/src/fixtures/utils.ts +87 -138
- package/src/fixtures/web3signer.ts +22 -5
- package/src/guides/up_quick_start.sh +2 -10
- package/src/quality_of_service/alert_checker.ts +1 -1
- package/src/shared/cross_chain_test_harness.ts +18 -29
- package/src/shared/gas_portal_test_harness.ts +12 -19
- package/src/shared/jest_setup.ts +1 -1
- package/src/shared/submit-transactions.ts +12 -8
- package/src/shared/uniswap_l1_l2.ts +61 -67
- package/src/simulators/lending_simulator.ts +3 -2
- package/src/simulators/token_simulator.ts +5 -2
- package/src/spartan/DEVELOP.md +8 -3
- package/src/spartan/setup_test_wallets.ts +133 -126
- package/src/spartan/utils.ts +268 -18
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { getSchnorrWallet } from '@aztec/accounts/schnorr';
|
|
2
1
|
import type { AztecNodeConfig } from '@aztec/aztec-node';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type AztecNode,
|
|
7
|
-
type CompleteAddress,
|
|
8
|
-
EthAddress,
|
|
9
|
-
type Logger,
|
|
10
|
-
type PXE,
|
|
11
|
-
createLogger,
|
|
12
|
-
} from '@aztec/aztec.js';
|
|
2
|
+
import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
+
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
4
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
13
5
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
14
6
|
import {
|
|
7
|
+
type DeployL1ContractsArgs,
|
|
15
8
|
type DeployL1ContractsReturnType,
|
|
16
9
|
type ExtendedViemWalletClient,
|
|
17
10
|
createExtendedL1Client,
|
|
@@ -21,6 +14,7 @@ import { InboxAbi, OutboxAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-
|
|
|
21
14
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
22
15
|
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
23
16
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
17
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
24
18
|
|
|
25
19
|
import { getContract } from 'viem';
|
|
26
20
|
|
|
@@ -32,6 +26,7 @@ import {
|
|
|
32
26
|
deployAccounts,
|
|
33
27
|
publicDeployAccounts,
|
|
34
28
|
} from '../fixtures/snapshot_manager.js';
|
|
29
|
+
import type { SetupOptions } from '../fixtures/utils.js';
|
|
35
30
|
import { CrossChainTestHarness } from '../shared/cross_chain_test_harness.js';
|
|
36
31
|
|
|
37
32
|
const { E2E_DATA_PATH: dataPath } = process.env;
|
|
@@ -39,21 +34,19 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
39
34
|
export class CrossChainMessagingTest {
|
|
40
35
|
private snapshotManager: ISnapshotManager;
|
|
41
36
|
logger: Logger;
|
|
42
|
-
accounts: CompleteAddress[] = [];
|
|
43
37
|
aztecNode!: AztecNode;
|
|
44
|
-
pxe!: PXE;
|
|
45
38
|
aztecNodeConfig!: AztecNodeConfig;
|
|
46
39
|
aztecNodeAdmin!: AztecNodeAdmin;
|
|
40
|
+
ctx!: SubsystemsContext;
|
|
47
41
|
|
|
48
42
|
l1Client!: ExtendedViemWalletClient | undefined;
|
|
49
43
|
|
|
50
|
-
|
|
44
|
+
wallet!: TestWallet;
|
|
45
|
+
ownerAddress!: AztecAddress;
|
|
51
46
|
user1Address!: AztecAddress;
|
|
52
|
-
user2Wallet!: AccountWallet;
|
|
53
47
|
user2Address!: AztecAddress;
|
|
54
48
|
crossChainTestHarness!: CrossChainTestHarness;
|
|
55
49
|
ethAccount!: EthAddress;
|
|
56
|
-
ownerAddress!: AztecAddress;
|
|
57
50
|
l2Token!: TokenContract;
|
|
58
51
|
l2Bridge!: TokenBridgeContract;
|
|
59
52
|
|
|
@@ -63,9 +56,12 @@ export class CrossChainMessagingTest {
|
|
|
63
56
|
|
|
64
57
|
deployL1ContractsValues!: DeployL1ContractsReturnType;
|
|
65
58
|
|
|
66
|
-
constructor(testName: string) {
|
|
59
|
+
constructor(testName: string, opts: SetupOptions = {}, deployL1ContractsArgs: Partial<DeployL1ContractsArgs> = {}) {
|
|
67
60
|
this.logger = createLogger(`e2e:e2e_cross_chain_messaging:${testName}`);
|
|
68
|
-
this.snapshotManager = createSnapshotManager(`e2e_cross_chain_messaging/${testName}`, dataPath
|
|
61
|
+
this.snapshotManager = createSnapshotManager(`e2e_cross_chain_messaging/${testName}`, dataPath, opts, {
|
|
62
|
+
initialValidators: [],
|
|
63
|
+
...deployL1ContractsArgs,
|
|
64
|
+
});
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
async assumeProven() {
|
|
@@ -73,13 +69,13 @@ export class CrossChainMessagingTest {
|
|
|
73
69
|
}
|
|
74
70
|
|
|
75
71
|
async setup() {
|
|
76
|
-
|
|
77
|
-
this.aztecNode = aztecNode;
|
|
78
|
-
this.
|
|
79
|
-
this.aztecNodeConfig = aztecNodeConfig;
|
|
80
|
-
this.cheatCodes =
|
|
81
|
-
this.deployL1ContractsValues = deployL1ContractsValues;
|
|
82
|
-
this.aztecNodeAdmin = aztecNode;
|
|
72
|
+
this.ctx = await this.snapshotManager.setup();
|
|
73
|
+
this.aztecNode = this.ctx.aztecNode;
|
|
74
|
+
this.wallet = this.ctx.wallet;
|
|
75
|
+
this.aztecNodeConfig = this.ctx.aztecNodeConfig;
|
|
76
|
+
this.cheatCodes = this.ctx.cheatCodes;
|
|
77
|
+
this.deployL1ContractsValues = this.ctx.deployL1ContractsValues;
|
|
78
|
+
this.aztecNodeAdmin = this.ctx.aztecNode;
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
snapshot = <T>(
|
|
@@ -93,25 +89,18 @@ export class CrossChainMessagingTest {
|
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
async applyBaseSnapshots() {
|
|
96
|
-
// Note that we are using the same `
|
|
92
|
+
// Note that we are using the same `wallet`, `aztecNodeConfig` and `aztecNode` across all snapshots.
|
|
97
93
|
// This is to not have issues with different networks.
|
|
98
94
|
|
|
99
95
|
await this.snapshotManager.snapshot(
|
|
100
96
|
'3_accounts',
|
|
101
97
|
deployAccounts(3, this.logger),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.
|
|
105
|
-
wallets.forEach((w, i) => this.logger.verbose(`Wallet ${i} address: ${w.getAddress()}`));
|
|
106
|
-
|
|
107
|
-
this.user1Wallet = wallets[0];
|
|
108
|
-
this.user1Address = this.user1Wallet.getAddress();
|
|
109
|
-
this.user2Wallet = wallets[1];
|
|
110
|
-
this.user2Address = this.user2Wallet.getAddress();
|
|
111
|
-
|
|
112
|
-
this.pxe = pxe;
|
|
98
|
+
({ deployedAccounts }, { wallet, aztecNodeConfig, aztecNode }) => {
|
|
99
|
+
[this.ownerAddress, this.user1Address, this.user2Address] = deployedAccounts.map(a => a.address);
|
|
100
|
+
this.wallet = wallet;
|
|
113
101
|
this.aztecNode = aztecNode;
|
|
114
102
|
this.aztecNodeConfig = aztecNodeConfig;
|
|
103
|
+
return Promise.resolve();
|
|
115
104
|
},
|
|
116
105
|
);
|
|
117
106
|
|
|
@@ -121,7 +110,7 @@ export class CrossChainMessagingTest {
|
|
|
121
110
|
// Create the token contract state.
|
|
122
111
|
// Move this account thing to addAccounts above?
|
|
123
112
|
this.logger.verbose(`Public deploy accounts...`);
|
|
124
|
-
await publicDeployAccounts(this.
|
|
113
|
+
await publicDeployAccounts(this.wallet, [this.ownerAddress, this.user1Address, this.user2Address]);
|
|
125
114
|
|
|
126
115
|
this.l1Client = createExtendedL1Client(this.aztecNodeConfig.l1RpcUrls, MNEMONIC);
|
|
127
116
|
|
|
@@ -134,10 +123,9 @@ export class CrossChainMessagingTest {
|
|
|
134
123
|
this.logger.verbose(`Setting up cross chain harness...`);
|
|
135
124
|
this.crossChainTestHarness = await CrossChainTestHarness.new(
|
|
136
125
|
this.aztecNode,
|
|
137
|
-
this.pxe,
|
|
138
126
|
this.l1Client,
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
127
|
+
this.wallet,
|
|
128
|
+
this.ownerAddress,
|
|
141
129
|
this.logger,
|
|
142
130
|
underlyingERC20Address,
|
|
143
131
|
);
|
|
@@ -147,12 +135,11 @@ export class CrossChainMessagingTest {
|
|
|
147
135
|
return this.crossChainTestHarness.toCrossChainContext();
|
|
148
136
|
},
|
|
149
137
|
async crossChainContext => {
|
|
150
|
-
this.l2Token = await TokenContract.at(crossChainContext.l2Token, this.
|
|
151
|
-
this.l2Bridge = await TokenBridgeContract.at(crossChainContext.l2Bridge, this.
|
|
138
|
+
this.l2Token = await TokenContract.at(crossChainContext.l2Token, this.wallet);
|
|
139
|
+
this.l2Bridge = await TokenBridgeContract.at(crossChainContext.l2Bridge, this.wallet);
|
|
152
140
|
|
|
153
141
|
// There is an issue with the reviver so we are getting strings sometimes. Working around it here.
|
|
154
142
|
this.ethAccount = EthAddress.fromString(crossChainContext.ethAccount.toString());
|
|
155
|
-
this.ownerAddress = AztecAddress.fromString(crossChainContext.ownerAddress.toString());
|
|
156
143
|
const tokenPortalAddress = EthAddress.fromString(crossChainContext.tokenPortal.toString());
|
|
157
144
|
|
|
158
145
|
const l1Client = createExtendedL1Client(this.aztecNodeConfig.l1RpcUrls, MNEMONIC);
|
|
@@ -170,7 +157,6 @@ export class CrossChainMessagingTest {
|
|
|
170
157
|
|
|
171
158
|
this.crossChainTestHarness = new CrossChainTestHarness(
|
|
172
159
|
this.aztecNode,
|
|
173
|
-
this.pxe,
|
|
174
160
|
this.logger,
|
|
175
161
|
this.l2Token,
|
|
176
162
|
this.l2Bridge,
|
|
@@ -179,8 +165,8 @@ export class CrossChainMessagingTest {
|
|
|
179
165
|
crossChainContext.underlying,
|
|
180
166
|
l1Client,
|
|
181
167
|
this.aztecNodeConfig.l1Contracts,
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
168
|
+
this.wallet,
|
|
169
|
+
this.ownerAddress,
|
|
184
170
|
);
|
|
185
171
|
|
|
186
172
|
this.l1Client = l1Client;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type Logger,
|
|
10
|
-
type PXE,
|
|
11
|
-
type PublicKeys,
|
|
12
|
-
type Wallet,
|
|
13
|
-
createLogger,
|
|
14
|
-
getContractInstanceFromInstantiationParams,
|
|
15
|
-
} from '@aztec/aztec.js';
|
|
1
|
+
import type { ContractArtifact } from '@aztec/aztec.js/abi';
|
|
2
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
+
import { type ContractBase, getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
|
|
4
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
5
|
+
import type { PublicKeys } from '@aztec/aztec.js/keys';
|
|
6
|
+
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
7
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
8
|
+
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
16
9
|
import type { StatefulTestContract } from '@aztec/noir-test-contracts.js/StatefulTest';
|
|
17
10
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
11
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
18
12
|
|
|
19
13
|
import { type ISnapshotManager, createSnapshotManager, deployAccounts } from '../fixtures/snapshot_manager.js';
|
|
20
14
|
|
|
@@ -23,8 +17,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
23
17
|
export class DeployTest {
|
|
24
18
|
private snapshotManager: ISnapshotManager;
|
|
25
19
|
public logger: Logger;
|
|
26
|
-
public
|
|
27
|
-
public wallet!: AccountWallet;
|
|
20
|
+
public wallet!: TestWallet;
|
|
28
21
|
public defaultAccountAddress!: AztecAddress;
|
|
29
22
|
public aztecNode!: AztecNode;
|
|
30
23
|
public aztecNodeAdmin!: AztecNodeAdmin;
|
|
@@ -37,7 +30,7 @@ export class DeployTest {
|
|
|
37
30
|
async setup() {
|
|
38
31
|
await this.applyInitialAccountSnapshot();
|
|
39
32
|
const context = await this.snapshotManager.setup();
|
|
40
|
-
({
|
|
33
|
+
({ aztecNode: this.aztecNode, wallet: this.wallet } = context);
|
|
41
34
|
this.aztecNodeAdmin = context.aztecNode;
|
|
42
35
|
return this;
|
|
43
36
|
}
|
|
@@ -47,16 +40,10 @@ export class DeployTest {
|
|
|
47
40
|
}
|
|
48
41
|
|
|
49
42
|
private async applyInitialAccountSnapshot() {
|
|
50
|
-
await this.snapshotManager.snapshot(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const wallets = await Promise.all(deployedAccounts.map(a => getSchnorrWallet(pxe, a.address, a.signingKey)));
|
|
55
|
-
wallets.forEach((w, i) => this.logger.verbose(`Wallet ${i} address: ${w.getAddress()}`));
|
|
56
|
-
this.wallet = wallets[0];
|
|
57
|
-
this.defaultAccountAddress = this.wallet.getAddress();
|
|
58
|
-
},
|
|
59
|
-
);
|
|
43
|
+
await this.snapshotManager.snapshot('initial_account', deployAccounts(1, this.logger), ({ deployedAccounts }) => {
|
|
44
|
+
this.defaultAccountAddress = deployedAccounts[0].address;
|
|
45
|
+
return Promise.resolve();
|
|
46
|
+
});
|
|
60
47
|
}
|
|
61
48
|
|
|
62
49
|
async registerContract<T extends ContractBase>(
|
|
@@ -74,18 +61,13 @@ export class DeployTest {
|
|
|
74
61
|
const instance = await getContractInstanceFromInstantiationParams(contractArtifact.artifact, {
|
|
75
62
|
constructorArgs: initArgs ?? [],
|
|
76
63
|
constructorArtifact: constructorName,
|
|
77
|
-
salt,
|
|
64
|
+
salt: salt ?? Fr.random(),
|
|
78
65
|
publicKeys,
|
|
79
66
|
deployer,
|
|
80
67
|
});
|
|
81
|
-
await wallet.registerContract(
|
|
68
|
+
await wallet.registerContract(instance, contractArtifact.artifact);
|
|
82
69
|
return contractArtifact.at(instance.address, wallet);
|
|
83
70
|
}
|
|
84
|
-
|
|
85
|
-
async registerRandomAccount(): Promise<AztecAddress> {
|
|
86
|
-
const completeAddress = await this.pxe.registerAccount(Fr.random(), Fr.random());
|
|
87
|
-
return completeAddress.address;
|
|
88
|
-
}
|
|
89
71
|
}
|
|
90
72
|
|
|
91
73
|
export type StatefulContractCtorArgs = Parameters<StatefulTestContract['methods']['constructor']>;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
getTimestampRangeForEpoch,
|
|
9
|
-
retryUntil,
|
|
10
|
-
sleep,
|
|
11
|
-
} from '@aztec/aztec.js';
|
|
2
|
+
import { getTimestampRangeForEpoch } from '@aztec/aztec.js/block';
|
|
3
|
+
import { getContractInstanceFromInstantiationParams } from '@aztec/aztec.js/contracts';
|
|
4
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
5
|
+
import type { Logger } from '@aztec/aztec.js/log';
|
|
6
|
+
import { MerkleTreeId } from '@aztec/aztec.js/trees';
|
|
7
|
+
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
12
8
|
import { EpochCache } from '@aztec/epoch-cache';
|
|
13
9
|
import { DefaultL1ContractsConfig, type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/ethereum';
|
|
14
10
|
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
@@ -16,6 +12,8 @@ import { ChainMonitor, DelayedTxUtils, type Delayer, waitUntilL1Timestamp, withD
|
|
|
16
12
|
import { SecretValue } from '@aztec/foundation/config';
|
|
17
13
|
import { randomBytes } from '@aztec/foundation/crypto';
|
|
18
14
|
import { withLogNameSuffix } from '@aztec/foundation/log';
|
|
15
|
+
import { retryUntil } from '@aztec/foundation/retry';
|
|
16
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
19
17
|
import { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
20
18
|
import { getMockPubSubP2PServiceFactory } from '@aztec/p2p/test-helpers';
|
|
21
19
|
import { ProverNode, type ProverNodeConfig, ProverNodePublisher } from '@aztec/prover-node';
|
|
@@ -188,14 +186,14 @@ export class EpochsTestContext {
|
|
|
188
186
|
this.logger.warn('Creating and syncing a simulated prover node...');
|
|
189
187
|
const proverNodePrivateKey = this.getNextPrivateKey();
|
|
190
188
|
const suffix = (this.proverNodes.length + 1).toString();
|
|
191
|
-
const proverId = EthAddress.fromNumber(parseInt(suffix, 10));
|
|
192
189
|
const proverNode = await withLogNameSuffix(suffix, () =>
|
|
193
190
|
createAndSyncProverNode(
|
|
194
191
|
proverNodePrivateKey,
|
|
195
|
-
{ ...this.context.config
|
|
192
|
+
{ ...this.context.config },
|
|
196
193
|
{
|
|
197
194
|
dataDirectory: join(this.context.config.dataDirectory!, randomBytes(8).toString('hex')),
|
|
198
|
-
proverId,
|
|
195
|
+
proverId: EthAddress.fromNumber(parseInt(suffix, 10)),
|
|
196
|
+
dontStart: opts.dontStart,
|
|
199
197
|
...opts,
|
|
200
198
|
},
|
|
201
199
|
this.context.aztecNode,
|
|
@@ -354,7 +352,7 @@ export class EpochsTestContext {
|
|
|
354
352
|
publicKeys: undefined,
|
|
355
353
|
deployer: undefined,
|
|
356
354
|
});
|
|
357
|
-
await wallet.registerContract(
|
|
355
|
+
await wallet.registerContract(instance, SpamContract.artifact);
|
|
358
356
|
return SpamContract.at(instance.address, wallet);
|
|
359
357
|
}
|
|
360
358
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Fr
|
|
1
|
+
import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
2
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
+
import type { Logger } from '@aztec/aztec.js/log';
|
|
3
4
|
import { Fq } from '@aztec/foundation/fields';
|
|
5
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
4
6
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
+
import type { TestWallet } from '@aztec/test-wallet/server';
|
|
5
8
|
|
|
6
9
|
import { jest } from '@jest/globals';
|
|
7
10
|
import type { Hex } from 'viem';
|
|
@@ -27,7 +30,7 @@ describe('e2e_fees bridging_race', () => {
|
|
|
27
30
|
await t.applyPublicDeployAccountsSnapshot();
|
|
28
31
|
await t.applySetupFeeJuiceSnapshot();
|
|
29
32
|
|
|
30
|
-
({
|
|
33
|
+
({ wallet, logger } = await t.setup());
|
|
31
34
|
});
|
|
32
35
|
|
|
33
36
|
afterAll(async () => {
|
|
@@ -35,17 +38,19 @@ describe('e2e_fees bridging_race', () => {
|
|
|
35
38
|
});
|
|
36
39
|
|
|
37
40
|
let logger: Logger;
|
|
38
|
-
let pxe: PXE;
|
|
39
41
|
let bobsAddress: AztecAddress;
|
|
42
|
+
let wallet: TestWallet;
|
|
40
43
|
|
|
41
44
|
beforeEach(async () => {
|
|
42
45
|
const bobsSecretKey = Fr.random();
|
|
43
46
|
const bobsPrivateSigningKey = Fq.random();
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const bobsSalt = Fr.random();
|
|
48
|
+
const bobsAccountManager = await wallet.createAccount({
|
|
49
|
+
secret: bobsSecretKey,
|
|
50
|
+
salt: bobsSalt,
|
|
51
|
+
contract: new SchnorrAccountContract(bobsPrivateSigningKey),
|
|
52
|
+
});
|
|
53
|
+
bobsAddress = bobsAccountManager.address;
|
|
49
54
|
});
|
|
50
55
|
|
|
51
56
|
it('Alice bridges funds to Bob', async () => {
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type AztecAddress,
|
|
5
|
-
type AztecNode,
|
|
6
|
-
type Logger,
|
|
7
|
-
type PXE,
|
|
8
|
-
createLogger,
|
|
9
|
-
sleep,
|
|
10
|
-
} from '@aztec/aztec.js';
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
3
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
11
4
|
import { CheatCodes } from '@aztec/aztec/testing';
|
|
12
5
|
import { type DeployL1ContractsArgs, RollupContract, createExtendedL1Client } from '@aztec/ethereum';
|
|
13
6
|
import { ChainMonitor } from '@aztec/ethereum/test';
|
|
14
7
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
8
|
+
import { sleep } from '@aztec/foundation/sleep';
|
|
15
9
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
16
10
|
import { AppSubscriptionContract } from '@aztec/noir-contracts.js/AppSubscription';
|
|
17
11
|
import { FPCContract } from '@aztec/noir-contracts.js/FPC';
|
|
@@ -22,6 +16,7 @@ import { CounterContract } from '@aztec/noir-test-contracts.js/Counter';
|
|
|
22
16
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
23
17
|
import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice';
|
|
24
18
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
19
|
+
import { TestWallet } from '@aztec/test-wallet/server';
|
|
25
20
|
|
|
26
21
|
import { getContract } from 'viem';
|
|
27
22
|
|
|
@@ -56,17 +51,14 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
56
51
|
*/
|
|
57
52
|
export class FeesTest {
|
|
58
53
|
private snapshotManager: ISnapshotManager;
|
|
59
|
-
private wallets: AccountWallet[] = [];
|
|
60
54
|
private accounts: AztecAddress[] = [];
|
|
61
55
|
|
|
62
56
|
public logger: Logger;
|
|
63
|
-
public pxe!: PXE;
|
|
64
57
|
public aztecNode!: AztecNode;
|
|
65
58
|
public cheatCodes!: CheatCodes;
|
|
66
59
|
|
|
67
|
-
public
|
|
60
|
+
public wallet!: TestWallet;
|
|
68
61
|
public aliceAddress!: AztecAddress;
|
|
69
|
-
public bobWallet!: AccountWallet;
|
|
70
62
|
public bobAddress!: AztecAddress;
|
|
71
63
|
public sequencerAddress!: AztecAddress;
|
|
72
64
|
public coinbase!: EthAddress;
|
|
@@ -173,7 +165,7 @@ export class FeesTest {
|
|
|
173
165
|
.balance_of_private(address)
|
|
174
166
|
.simulate({ from: this.aliceAddress });
|
|
175
167
|
|
|
176
|
-
await mintTokensToPrivate(this.bananaCoin, this.aliceAddress,
|
|
168
|
+
await mintTokensToPrivate(this.bananaCoin, this.aliceAddress, address, amount);
|
|
177
169
|
|
|
178
170
|
const balanceAfter = await this.bananaCoin.methods
|
|
179
171
|
.balance_of_private(address)
|
|
@@ -192,30 +184,27 @@ export class FeesTest {
|
|
|
192
184
|
await this.snapshotManager.snapshot(
|
|
193
185
|
'initial_accounts',
|
|
194
186
|
deployAccounts(this.numberOfAccounts, this.logger),
|
|
195
|
-
async ({ deployedAccounts }, {
|
|
196
|
-
this.
|
|
197
|
-
|
|
187
|
+
async ({ deployedAccounts }, { wallet, aztecNode, cheatCodes }) => {
|
|
188
|
+
this.wallet = wallet;
|
|
198
189
|
this.aztecNode = aztecNode;
|
|
199
190
|
this.gasSettings = GasSettings.default({ maxFeesPerGas: (await this.aztecNode.getCurrentBaseFees()).mul(2) });
|
|
200
|
-
this.cheatCodes =
|
|
201
|
-
this.
|
|
202
|
-
this.
|
|
203
|
-
this.
|
|
204
|
-
[this.aliceWallet, this.bobWallet] = this.wallets.slice(0, 2);
|
|
205
|
-
[this.aliceAddress, this.bobAddress, this.sequencerAddress] = this.accounts;
|
|
191
|
+
this.cheatCodes = cheatCodes;
|
|
192
|
+
this.accounts = deployedAccounts.map(a => a.address);
|
|
193
|
+
this.accounts.forEach((a, i) => this.logger.verbose(`Account ${i} address: ${a}`));
|
|
194
|
+
[this.aliceAddress, this.bobAddress, this.sequencerAddress] = this.accounts.slice(0, 3);
|
|
206
195
|
|
|
207
196
|
// We set Alice as the FPC admin to avoid the need for deployment of another account.
|
|
208
197
|
this.fpcAdmin = this.aliceAddress;
|
|
209
198
|
|
|
210
199
|
const canonicalFeeJuice = await getCanonicalFeeJuice();
|
|
211
|
-
this.feeJuiceContract = await FeeJuiceContract.at(canonicalFeeJuice.address, this.
|
|
200
|
+
this.feeJuiceContract = await FeeJuiceContract.at(canonicalFeeJuice.address, this.wallet);
|
|
212
201
|
},
|
|
213
202
|
);
|
|
214
203
|
}
|
|
215
204
|
|
|
216
205
|
async applyPublicDeployAccountsSnapshot() {
|
|
217
206
|
await this.snapshotManager.snapshot('public_deploy_accounts', () =>
|
|
218
|
-
ensureAccountContractsPublished(this.
|
|
207
|
+
ensureAccountContractsPublished(this.wallet, this.accounts),
|
|
219
208
|
);
|
|
220
209
|
}
|
|
221
210
|
|
|
@@ -226,7 +215,7 @@ export class FeesTest {
|
|
|
226
215
|
async (_data, context) => {
|
|
227
216
|
this.context = context;
|
|
228
217
|
|
|
229
|
-
this.feeJuiceContract = await FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.
|
|
218
|
+
this.feeJuiceContract = await FeeJuiceContract.at(ProtocolContractAddress.FeeJuice, this.wallet);
|
|
230
219
|
|
|
231
220
|
this.getGasBalanceFn = getBalancesFn(
|
|
232
221
|
'⛽',
|
|
@@ -238,9 +227,8 @@ export class FeesTest {
|
|
|
238
227
|
this.feeJuiceBridgeTestHarness = await FeeJuicePortalTestingHarnessFactory.create({
|
|
239
228
|
aztecNode: context.aztecNode,
|
|
240
229
|
aztecNodeAdmin: context.aztecNode,
|
|
241
|
-
pxeService: context.pxe,
|
|
242
230
|
l1Client: context.deployL1ContractsValues.l1Client,
|
|
243
|
-
wallet: this.
|
|
231
|
+
wallet: this.wallet,
|
|
244
232
|
logger: this.logger,
|
|
245
233
|
});
|
|
246
234
|
},
|
|
@@ -251,14 +239,14 @@ export class FeesTest {
|
|
|
251
239
|
await this.snapshotManager.snapshot(
|
|
252
240
|
'deploy_banana_token',
|
|
253
241
|
async () => {
|
|
254
|
-
const bananaCoin = await BananaCoin.deploy(this.
|
|
242
|
+
const bananaCoin = await BananaCoin.deploy(this.wallet, this.aliceAddress, 'BC', 'BC', 18n)
|
|
255
243
|
.send({ from: this.aliceAddress })
|
|
256
244
|
.deployed();
|
|
257
245
|
this.logger.info(`BananaCoin deployed at ${bananaCoin.address}`);
|
|
258
246
|
return { bananaCoinAddress: bananaCoin.address };
|
|
259
247
|
},
|
|
260
248
|
async ({ bananaCoinAddress }) => {
|
|
261
|
-
this.bananaCoin = await BananaCoin.at(bananaCoinAddress, this.
|
|
249
|
+
this.bananaCoin = await BananaCoin.at(bananaCoinAddress, this.wallet);
|
|
262
250
|
const logger = this.logger;
|
|
263
251
|
this.getBananaPublicBalanceFn = getBalancesFn(
|
|
264
252
|
'🍌.public',
|
|
@@ -281,10 +269,10 @@ export class FeesTest {
|
|
|
281
269
|
'fpc_setup',
|
|
282
270
|
async context => {
|
|
283
271
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
284
|
-
expect((await context.
|
|
272
|
+
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
285
273
|
|
|
286
274
|
const bananaCoin = this.bananaCoin;
|
|
287
|
-
const bananaFPC = await FPCContract.deploy(this.
|
|
275
|
+
const bananaFPC = await FPCContract.deploy(this.wallet, bananaCoin.address, this.fpcAdmin)
|
|
288
276
|
.send({ from: this.aliceAddress })
|
|
289
277
|
.deployed();
|
|
290
278
|
|
|
@@ -300,7 +288,7 @@ export class FeesTest {
|
|
|
300
288
|
};
|
|
301
289
|
},
|
|
302
290
|
async (data, context) => {
|
|
303
|
-
const bananaFPC = await FPCContract.at(data.bananaFPCAddress, this.
|
|
291
|
+
const bananaFPC = await FPCContract.at(data.bananaFPCAddress, this.wallet);
|
|
304
292
|
this.bananaFPC = bananaFPC;
|
|
305
293
|
|
|
306
294
|
this.getCoinbaseBalance = async () => {
|
|
@@ -318,7 +306,7 @@ export class FeesTest {
|
|
|
318
306
|
};
|
|
319
307
|
|
|
320
308
|
this.getProverFee = async (blockNumber: number) => {
|
|
321
|
-
const block = await this.
|
|
309
|
+
const block = await this.aztecNode.getBlock(blockNumber);
|
|
322
310
|
|
|
323
311
|
// @todo @lherskind As we deal with #13601
|
|
324
312
|
// Right now the value is from `FeeLib.sol`
|
|
@@ -349,9 +337,9 @@ export class FeesTest {
|
|
|
349
337
|
'sponsored_fpc_setup',
|
|
350
338
|
async context => {
|
|
351
339
|
const feeJuiceContract = this.feeJuiceBridgeTestHarness.feeJuice;
|
|
352
|
-
expect((await context.
|
|
340
|
+
expect((await context.wallet.getContractMetadata(feeJuiceContract.address)).isContractPublished).toBe(true);
|
|
353
341
|
|
|
354
|
-
const sponsoredFPC = await setupSponsoredFPC(
|
|
342
|
+
const sponsoredFPC = await setupSponsoredFPC(this.wallet);
|
|
355
343
|
this.logger.info(`SponsoredFPC at ${sponsoredFPC.address}`);
|
|
356
344
|
|
|
357
345
|
return {
|
|
@@ -359,7 +347,7 @@ export class FeesTest {
|
|
|
359
347
|
};
|
|
360
348
|
},
|
|
361
349
|
async data => {
|
|
362
|
-
this.sponsoredFPC = await SponsoredFPCContract.at(data.sponsoredFPCAddress, this.
|
|
350
|
+
this.sponsoredFPC = await SponsoredFPCContract.at(data.sponsoredFPCAddress, this.wallet);
|
|
363
351
|
},
|
|
364
352
|
);
|
|
365
353
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { AztecAddress
|
|
2
|
-
import {
|
|
1
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import type { L2Block } from '@aztec/aztec.js/block';
|
|
3
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
+
import { BatchedBlob, Blob, getPrefixedEthBlobCommitments } from '@aztec/blob-lib';
|
|
3
5
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
6
|
|
|
5
7
|
import { writeFile } from 'fs/promises';
|
|
@@ -32,18 +34,18 @@ export async function writeJson(
|
|
|
32
34
|
|
|
33
35
|
const jsonObject = {
|
|
34
36
|
populate: {
|
|
35
|
-
l1ToL2Content: l1ToL2Content.map(asHex),
|
|
37
|
+
l1ToL2Content: l1ToL2Content.map(value => asHex(value)),
|
|
36
38
|
recipient: asHex(recipientAddress.toField()),
|
|
37
39
|
sender: deployerAddress,
|
|
38
40
|
},
|
|
39
41
|
messages: {
|
|
40
|
-
l2ToL1Messages: block.body.txEffects.flatMap(txEffect => txEffect.l2ToL1Msgs).map(asHex),
|
|
42
|
+
l2ToL1Messages: block.body.txEffects.flatMap(txEffect => txEffect.l2ToL1Msgs).map(value => asHex(value)),
|
|
41
43
|
},
|
|
42
44
|
block: {
|
|
43
45
|
// The json formatting in forge is a bit brittle, so we convert Fr to a number in the few values below.
|
|
44
46
|
// This should not be a problem for testing as long as the values are not larger than u32.
|
|
45
47
|
archive: asHex(block.archive.root),
|
|
46
|
-
blobCommitments:
|
|
48
|
+
blobCommitments: getPrefixedEthBlobCommitments(blobs),
|
|
47
49
|
batchedBlobInputs: batchedBlob.getEthBlobEvaluationInputs(),
|
|
48
50
|
blockNumber: block.number,
|
|
49
51
|
body: `0x${block.body.toBuffer().toString('hex')}`,
|
|
@@ -64,7 +66,7 @@ export async function writeJson(
|
|
|
64
66
|
},
|
|
65
67
|
totalManaUsed: block.header.totalManaUsed.toNumber(),
|
|
66
68
|
},
|
|
67
|
-
headerHash: asHex(block.
|
|
69
|
+
headerHash: asHex(block.getCheckpointHeader().hash()),
|
|
68
70
|
numTxs: block.body.txEffects.length,
|
|
69
71
|
},
|
|
70
72
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import { getAddressFromPrivateKey } from '@aztec/ethereum';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
4
|
import type { EthPrivateKey } from '@aztec/node-keystore';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type
|
|
1
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { type Logger, createLogger } from '@aztec/aztec.js/log';
|
|
3
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
4
|
+
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
3
5
|
import { ChildContract } from '@aztec/noir-test-contracts.js/Child';
|
|
4
6
|
import { ParentContract } from '@aztec/noir-test-contracts.js/Parent';
|
|
5
7
|
|
|
@@ -16,9 +18,9 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
16
18
|
export class NestedContractTest {
|
|
17
19
|
private snapshotManager: ISnapshotManager;
|
|
18
20
|
logger: Logger;
|
|
19
|
-
wallet!:
|
|
21
|
+
wallet!: Wallet;
|
|
20
22
|
defaultAccountAddress!: AztecAddress;
|
|
21
|
-
|
|
23
|
+
aztecNode!: AztecNode;
|
|
22
24
|
|
|
23
25
|
parentContract!: ParentContract;
|
|
24
26
|
childContract!: ChildContract;
|
|
@@ -40,12 +42,11 @@ export class NestedContractTest {
|
|
|
40
42
|
await this.snapshotManager.snapshot(
|
|
41
43
|
'accounts',
|
|
42
44
|
deployAccounts(this.numberOfAccounts, this.logger),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.pxe = pxe;
|
|
45
|
+
({ deployedAccounts }, { wallet, aztecNode }) => {
|
|
46
|
+
this.wallet = wallet;
|
|
47
|
+
[{ address: this.defaultAccountAddress }] = deployedAccounts;
|
|
48
|
+
this.aztecNode = aztecNode;
|
|
49
|
+
return Promise.resolve();
|
|
49
50
|
},
|
|
50
51
|
);
|
|
51
52
|
|