@aztec/end-to-end 0.86.0-nightly.20250512 → 0.86.0-nightly.20250514

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.
@@ -1,9 +1,10 @@
1
1
  import type { AztecNodeConfig } from '@aztec/aztec-node';
2
2
  import { type AccountWallet, AztecAddress, type AztecNode, type CompleteAddress, EthAddress, type Logger, type PXE } from '@aztec/aztec.js';
3
3
  import { CheatCodes } from '@aztec/aztec.js/testing';
4
- import { type ExtendedViemWalletClient } from '@aztec/ethereum';
4
+ import { type DeployL1ContractsReturnType, type ExtendedViemWalletClient } from '@aztec/ethereum';
5
5
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
6
6
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
7
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
7
8
  import { type SubsystemsContext } from '../fixtures/snapshot_manager.js';
8
9
  import { CrossChainTestHarness } from '../shared/cross_chain_test_harness.js';
9
10
  export declare class CrossChainMessagingTest {
@@ -14,6 +15,7 @@ export declare class CrossChainMessagingTest {
14
15
  aztecNode: AztecNode;
15
16
  pxe: PXE;
16
17
  aztecNodeConfig: AztecNodeConfig;
18
+ aztecNodeAdmin: AztecNodeAdmin;
17
19
  l1Client: ExtendedViemWalletClient | undefined;
18
20
  user1Wallet: AccountWallet;
19
21
  user2Wallet: AccountWallet;
@@ -24,7 +26,8 @@ export declare class CrossChainMessagingTest {
24
26
  l2Bridge: TokenBridgeContract;
25
27
  inbox: any;
26
28
  outbox: any;
27
- cheatcodes: CheatCodes;
29
+ cheatCodes: CheatCodes;
30
+ deployL1ContractsValues: DeployL1ContractsReturnType;
28
31
  constructor(testName: string);
29
32
  assumeProven(): Promise<void>;
30
33
  setup(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],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CAAC,OAAO,EAAE,iBAAiB,KAAK,QAAQ,CAAC,CAAC,YACxC,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,QAAQ,IAAI,CAAC,KACtE,QAAQ,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAIR,kBAAkB;CA6FzB"}
1
+ {"version":3,"file":"cross_chain_messaging_test.d.ts","sourceRoot":"","sources":["../../src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACL,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EAET,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAG9B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAI9E,qBAAa,uBAAuB;IAClC,OAAO,CAAC,eAAe,CAAmB;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,aAAa,EAAE,CAAM;IAC9B,QAAQ,EAAE,eAAe,EAAE,CAAM;IACjC,SAAS,EAAG,SAAS,CAAC;IACtB,GAAG,EAAG,GAAG,CAAC;IACV,eAAe,EAAG,eAAe,CAAC;IAClC,cAAc,EAAG,cAAc,CAAC;IAEhC,QAAQ,EAAG,wBAAwB,GAAG,SAAS,CAAC;IAEhD,WAAW,EAAG,aAAa,CAAC;IAC5B,WAAW,EAAG,aAAa,CAAC;IAC5B,qBAAqB,EAAG,qBAAqB,CAAC;IAC9C,UAAU,EAAG,UAAU,CAAC;IACxB,YAAY,EAAG,YAAY,CAAC;IAC5B,OAAO,EAAG,aAAa,CAAC;IACxB,QAAQ,EAAG,mBAAmB,CAAC;IAE/B,KAAK,EAAG,GAAG,CAAC;IACZ,MAAM,EAAG,GAAG,CAAC;IACb,UAAU,EAAG,UAAU,CAAC;IAExB,uBAAuB,EAAG,2BAA2B,CAAC;gBAE1C,QAAQ,EAAE,MAAM;IAKtB,YAAY;IAIZ,KAAK;IAUX,QAAQ,YACA,MAAM,SACL,CAAC,OAAO,EAAE,iBAAiB,KAAK,QAAQ,CAAC,CAAC,YACxC,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,QAAQ,IAAI,CAAC,KACtE,QAAQ,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAIR,kBAAkB;CA6FzB"}
@@ -18,6 +18,7 @@ export class CrossChainMessagingTest {
18
18
  aztecNode;
19
19
  pxe;
20
20
  aztecNodeConfig;
21
+ aztecNodeAdmin;
21
22
  l1Client;
22
23
  user1Wallet;
23
24
  user2Wallet;
@@ -28,20 +29,23 @@ export class CrossChainMessagingTest {
28
29
  l2Bridge;
29
30
  inbox;
30
31
  outbox;
31
- cheatcodes;
32
+ cheatCodes;
33
+ deployL1ContractsValues;
32
34
  constructor(testName){
33
35
  this.logger = createLogger(`e2e:e2e_cross_chain_messaging:${testName}`);
34
36
  this.snapshotManager = createSnapshotManager(`e2e_cross_chain_messaging/${testName}`, dataPath);
35
37
  }
36
38
  async assumeProven() {
37
- await this.cheatcodes.rollup.markAsProven();
39
+ await this.cheatCodes.rollup.markAsProven();
38
40
  }
39
41
  async setup() {
40
- const { aztecNode, pxe, aztecNodeConfig } = await this.snapshotManager.setup();
42
+ const { aztecNode, pxe, aztecNodeConfig, deployL1ContractsValues } = await this.snapshotManager.setup();
41
43
  this.aztecNode = aztecNode;
42
44
  this.pxe = pxe;
43
45
  this.aztecNodeConfig = aztecNodeConfig;
44
- this.cheatcodes = await CheatCodes.create(this.aztecNodeConfig.l1RpcUrls, this.pxe);
46
+ this.cheatCodes = await CheatCodes.create(this.aztecNodeConfig.l1RpcUrls, this.pxe);
47
+ this.deployL1ContractsValues = deployL1ContractsValues;
48
+ this.aztecNodeAdmin = aztecNode;
45
49
  }
46
50
  snapshot = (name, apply, restore = ()=>Promise.resolve())=>this.snapshotManager.snapshot(name, apply, restore);
47
51
  async teardown() {
@@ -1 +1 @@
1
- {"version":3,"file":"p2p_network.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/p2p_network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAQlE,OAAO,EAAE,YAAY,EAA0B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAa9D,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,iCAAiC,CAAC;AAOzC,eAAO,MAAM,mBAAmB,QAA0C,CAAC;AAE3E,eAAO,MAAM,2BAA2B;;;CAGvC,CAAC;AAEF,qBAAa,cAAc;IA0BhB,gBAAgB,EAAE,MAAM;IACxB,YAAY,EAAE,MAAM;IAC3B,OAAO,CAAC,aAAa;IAGrB,OAAO,CAAC,WAAW,CAAC;IA9Bt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AAC,oBAAQ;WAqCjB,MAAM,CAAC,EAClB,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,WAAW,EACX,aAAa,GACd,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;KAC1C;IAcD,IAAI,aAAa,uBAKhB;IAEK,gBAAgB;IActB,aAAa;;;;;;;;;IA0BP,kBAAkB;IAiElB,YAAY;IAYZ,kBAAkB;IAoBlB,iBAAiB;IAgBjB,WAAW;;;;YAIH,YAAY;IAQpB,KAAK;IAaL,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE;IAanC,QAAQ;CAKf"}
@@ -1,5 +1,5 @@
1
1
  import { getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr';
2
- import { L1TxUtils, RollupContract, getExpectedAddress, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
2
+ import { L1TxUtils, RollupContract, deployL1Contract, getExpectedAddress, getL1ContractsConfigEnvVars, l1Artifacts } from '@aztec/ethereum';
3
3
  import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
4
4
  import { createLogger } from '@aztec/foundation/log';
5
5
  import { ForwarderAbi, ForwarderBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
@@ -139,14 +139,19 @@ export class P2PNetworkTest {
139
139
  abi: TestERC20Abi,
140
140
  client: deployL1ContractsValues.l1Client
141
141
  });
142
+ const { address: multiAdderAddress } = await deployL1Contract(deployL1ContractsValues.l1Client, l1Artifacts.multiAdder.contractAbi, l1Artifacts.multiAdder.contractBytecode, [
143
+ rollup.address,
144
+ deployL1ContractsValues.l1Client.account.address
145
+ ]);
146
+ const multiAdder = getContract({
147
+ address: multiAdderAddress.toString(),
148
+ abi: l1Artifacts.multiAdder.contractAbi,
149
+ client: deployL1ContractsValues.l1Client
150
+ });
142
151
  const stakeNeeded = l1ContractsConfig.minimumStake * BigInt(this.numberOfNodes);
143
152
  await Promise.all([
144
153
  await stakingAsset.write.mint([
145
- deployL1ContractsValues.l1Client.account.address,
146
- stakeNeeded
147
- ], {}),
148
- await stakingAsset.write.approve([
149
- deployL1ContractsValues.l1ContractAddresses.rollupAddress.toString(),
154
+ multiAdder.address,
150
155
  stakeNeeded
151
156
  ], {})
152
157
  ].map((txHash)=>deployL1ContractsValues.l1Client.waitForTransactionReceipt({
@@ -155,7 +160,7 @@ export class P2PNetworkTest {
155
160
  const { validators } = this.getValidators();
156
161
  this.validators = validators;
157
162
  await deployL1ContractsValues.l1Client.waitForTransactionReceipt({
158
- hash: await rollup.write.cheat__InitialiseValidatorSet([
163
+ hash: await multiAdder.write.addValidators([
159
164
  this.validators
160
165
  ])
161
166
  });
@@ -8,5 +8,9 @@ export declare function sendL1ToL2Message(message: {
8
8
  }, ctx: {
9
9
  l1Client: ExtendedViemWalletClient;
10
10
  l1ContractAddresses: Pick<L1ContractAddresses, 'inboxAddress' | 'rollupAddress'>;
11
- }): Promise<Fr[]>;
11
+ }): Promise<{
12
+ msgHash: Fr;
13
+ globalLeafIndex: Fr;
14
+ txReceipt: import("viem").TransactionReceipt;
15
+ }>;
12
16
  //# sourceMappingURL=l1_to_l2_messaging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"l1_to_l2_messaging.d.ts","sourceRoot":"","sources":["../../src/fixtures/l1_to_l2_messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE;IAAE,SAAS,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;IAAC,UAAU,EAAE,EAAE,CAAA;CAAE,EACjE,GAAG,EAAE;IACH,QAAQ,EAAE,wBAAwB,CAAC;IACnC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC;CAClF,iBAoCF"}
1
+ {"version":3,"file":"l1_to_l2_messaging.d.ts","sourceRoot":"","sources":["../../src/fixtures/l1_to_l2_messaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAKhE,wBAAsB,iBAAiB,CACrC,OAAO,EAAE;IAAE,SAAS,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;IAAC,UAAU,EAAE,EAAE,CAAA;CAAE,EACjE,GAAG,EAAE;IACH,QAAQ,EAAE,wBAAwB,CAAC;IACnC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,cAAc,GAAG,eAAe,CAAC,CAAC;CAClF;;;;GAoCF"}
@@ -35,8 +35,9 @@ export async function sendL1ToL2Message(message, ctx) {
35
35
  });
36
36
  const receivedMsgHash = topics.args.hash;
37
37
  const receivedGlobalLeafIndex = topics.args.index;
38
- return [
39
- Fr.fromHexString(receivedMsgHash),
40
- new Fr(receivedGlobalLeafIndex)
41
- ];
38
+ return {
39
+ msgHash: Fr.fromHexString(receivedMsgHash),
40
+ globalLeafIndex: new Fr(receivedGlobalLeafIndex),
41
+ txReceipt
42
+ };
42
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.86.0-nightly.20250512",
3
+ "version": "0.86.0-nightly.20250514",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -25,39 +25,39 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "0.86.0-nightly.20250512",
29
- "@aztec/archiver": "0.86.0-nightly.20250512",
30
- "@aztec/aztec": "0.86.0-nightly.20250512",
31
- "@aztec/aztec-node": "0.86.0-nightly.20250512",
32
- "@aztec/aztec.js": "0.86.0-nightly.20250512",
33
- "@aztec/bb-prover": "0.86.0-nightly.20250512",
34
- "@aztec/blob-lib": "0.86.0-nightly.20250512",
35
- "@aztec/blob-sink": "0.86.0-nightly.20250512",
36
- "@aztec/bot": "0.86.0-nightly.20250512",
37
- "@aztec/cli": "0.86.0-nightly.20250512",
38
- "@aztec/constants": "0.86.0-nightly.20250512",
39
- "@aztec/entrypoints": "0.86.0-nightly.20250512",
40
- "@aztec/epoch-cache": "0.86.0-nightly.20250512",
41
- "@aztec/ethereum": "0.86.0-nightly.20250512",
42
- "@aztec/foundation": "0.86.0-nightly.20250512",
43
- "@aztec/kv-store": "0.86.0-nightly.20250512",
44
- "@aztec/l1-artifacts": "0.86.0-nightly.20250512",
45
- "@aztec/merkle-tree": "0.86.0-nightly.20250512",
46
- "@aztec/noir-contracts.js": "0.86.0-nightly.20250512",
47
- "@aztec/noir-noirc_abi": "0.86.0-nightly.20250512",
48
- "@aztec/noir-protocol-circuits-types": "0.86.0-nightly.20250512",
49
- "@aztec/noir-test-contracts.js": "0.86.0-nightly.20250512",
50
- "@aztec/p2p": "0.86.0-nightly.20250512",
51
- "@aztec/protocol-contracts": "0.86.0-nightly.20250512",
52
- "@aztec/prover-client": "0.86.0-nightly.20250512",
53
- "@aztec/prover-node": "0.86.0-nightly.20250512",
54
- "@aztec/pxe": "0.86.0-nightly.20250512",
55
- "@aztec/sequencer-client": "0.86.0-nightly.20250512",
56
- "@aztec/simulator": "0.86.0-nightly.20250512",
57
- "@aztec/stdlib": "0.86.0-nightly.20250512",
58
- "@aztec/telemetry-client": "0.86.0-nightly.20250512",
59
- "@aztec/validator-client": "0.86.0-nightly.20250512",
60
- "@aztec/world-state": "0.86.0-nightly.20250512",
28
+ "@aztec/accounts": "0.86.0-nightly.20250514",
29
+ "@aztec/archiver": "0.86.0-nightly.20250514",
30
+ "@aztec/aztec": "0.86.0-nightly.20250514",
31
+ "@aztec/aztec-node": "0.86.0-nightly.20250514",
32
+ "@aztec/aztec.js": "0.86.0-nightly.20250514",
33
+ "@aztec/bb-prover": "0.86.0-nightly.20250514",
34
+ "@aztec/blob-lib": "0.86.0-nightly.20250514",
35
+ "@aztec/blob-sink": "0.86.0-nightly.20250514",
36
+ "@aztec/bot": "0.86.0-nightly.20250514",
37
+ "@aztec/cli": "0.86.0-nightly.20250514",
38
+ "@aztec/constants": "0.86.0-nightly.20250514",
39
+ "@aztec/entrypoints": "0.86.0-nightly.20250514",
40
+ "@aztec/epoch-cache": "0.86.0-nightly.20250514",
41
+ "@aztec/ethereum": "0.86.0-nightly.20250514",
42
+ "@aztec/foundation": "0.86.0-nightly.20250514",
43
+ "@aztec/kv-store": "0.86.0-nightly.20250514",
44
+ "@aztec/l1-artifacts": "0.86.0-nightly.20250514",
45
+ "@aztec/merkle-tree": "0.86.0-nightly.20250514",
46
+ "@aztec/noir-contracts.js": "0.86.0-nightly.20250514",
47
+ "@aztec/noir-noirc_abi": "0.86.0-nightly.20250514",
48
+ "@aztec/noir-protocol-circuits-types": "0.86.0-nightly.20250514",
49
+ "@aztec/noir-test-contracts.js": "0.86.0-nightly.20250514",
50
+ "@aztec/p2p": "0.86.0-nightly.20250514",
51
+ "@aztec/protocol-contracts": "0.86.0-nightly.20250514",
52
+ "@aztec/prover-client": "0.86.0-nightly.20250514",
53
+ "@aztec/prover-node": "0.86.0-nightly.20250514",
54
+ "@aztec/pxe": "0.86.0-nightly.20250514",
55
+ "@aztec/sequencer-client": "0.86.0-nightly.20250514",
56
+ "@aztec/simulator": "0.86.0-nightly.20250514",
57
+ "@aztec/stdlib": "0.86.0-nightly.20250514",
58
+ "@aztec/telemetry-client": "0.86.0-nightly.20250514",
59
+ "@aztec/validator-client": "0.86.0-nightly.20250514",
60
+ "@aztec/world-state": "0.86.0-nightly.20250514",
61
61
  "@iarna/toml": "^2.2.5",
62
62
  "@jest/globals": "^29.5.0",
63
63
  "@noble/curves": "^1.0.0",
@@ -11,10 +11,16 @@ import {
11
11
  createLogger,
12
12
  } from '@aztec/aztec.js';
13
13
  import { CheatCodes } from '@aztec/aztec.js/testing';
14
- import { type ExtendedViemWalletClient, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
14
+ import {
15
+ type DeployL1ContractsReturnType,
16
+ type ExtendedViemWalletClient,
17
+ createExtendedL1Client,
18
+ deployL1Contract,
19
+ } from '@aztec/ethereum';
15
20
  import { InboxAbi, OutboxAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts';
16
21
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
17
22
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
23
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
18
24
 
19
25
  import { getContract } from 'viem';
20
26
 
@@ -38,6 +44,7 @@ export class CrossChainMessagingTest {
38
44
  aztecNode!: AztecNode;
39
45
  pxe!: PXE;
40
46
  aztecNodeConfig!: AztecNodeConfig;
47
+ aztecNodeAdmin!: AztecNodeAdmin;
41
48
 
42
49
  l1Client!: ExtendedViemWalletClient | undefined;
43
50
 
@@ -51,7 +58,9 @@ export class CrossChainMessagingTest {
51
58
 
52
59
  inbox!: any; // GetContractReturnType<typeof InboxAbi> | undefined;
53
60
  outbox!: any; // GetContractReturnType<typeof OutboxAbi> | undefined;
54
- cheatcodes!: CheatCodes;
61
+ cheatCodes!: CheatCodes;
62
+
63
+ deployL1ContractsValues!: DeployL1ContractsReturnType;
55
64
 
56
65
  constructor(testName: string) {
57
66
  this.logger = createLogger(`e2e:e2e_cross_chain_messaging:${testName}`);
@@ -59,15 +68,17 @@ export class CrossChainMessagingTest {
59
68
  }
60
69
 
61
70
  async assumeProven() {
62
- await this.cheatcodes.rollup.markAsProven();
71
+ await this.cheatCodes.rollup.markAsProven();
63
72
  }
64
73
 
65
74
  async setup() {
66
- const { aztecNode, pxe, aztecNodeConfig } = await this.snapshotManager.setup();
75
+ const { aztecNode, pxe, aztecNodeConfig, deployL1ContractsValues } = await this.snapshotManager.setup();
67
76
  this.aztecNode = aztecNode;
68
77
  this.pxe = pxe;
69
78
  this.aztecNodeConfig = aztecNodeConfig;
70
- this.cheatcodes = await CheatCodes.create(this.aztecNodeConfig.l1RpcUrls, this.pxe);
79
+ this.cheatCodes = await CheatCodes.create(this.aztecNodeConfig.l1RpcUrls, this.pxe);
80
+ this.deployL1ContractsValues = deployL1ContractsValues;
81
+ this.aztecNodeAdmin = aztecNode;
71
82
  }
72
83
 
73
84
  snapshot = <T>(
@@ -6,8 +6,10 @@ import {
6
6
  type ExtendedViemWalletClient,
7
7
  L1TxUtils,
8
8
  RollupContract,
9
+ deployL1Contract,
9
10
  getExpectedAddress,
10
11
  getL1ContractsConfigEnvVars,
12
+ l1Artifacts,
11
13
  } from '@aztec/ethereum';
12
14
  import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test';
13
15
  import { type Logger, createLogger } from '@aztec/foundation/log';
@@ -207,21 +209,31 @@ export class P2PNetworkTest {
207
209
  client: deployL1ContractsValues.l1Client,
208
210
  });
209
211
 
212
+ const { address: multiAdderAddress } = await deployL1Contract(
213
+ deployL1ContractsValues.l1Client,
214
+ l1Artifacts.multiAdder.contractAbi,
215
+ l1Artifacts.multiAdder.contractBytecode,
216
+ [rollup.address, deployL1ContractsValues.l1Client.account.address],
217
+ );
218
+
219
+ const multiAdder = getContract({
220
+ address: multiAdderAddress.toString(),
221
+ abi: l1Artifacts.multiAdder.contractAbi,
222
+ client: deployL1ContractsValues.l1Client,
223
+ });
224
+
210
225
  const stakeNeeded = l1ContractsConfig.minimumStake * BigInt(this.numberOfNodes);
211
226
  await Promise.all(
212
- [
213
- await stakingAsset.write.mint([deployL1ContractsValues.l1Client.account.address, stakeNeeded], {} as any),
214
- await stakingAsset.write.approve(
215
- [deployL1ContractsValues.l1ContractAddresses.rollupAddress.toString(), stakeNeeded],
216
- {} as any,
217
- ),
218
- ].map(txHash => deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash: txHash })),
227
+ [await stakingAsset.write.mint([multiAdder.address, stakeNeeded], {} as any)].map(txHash =>
228
+ deployL1ContractsValues.l1Client.waitForTransactionReceipt({ hash: txHash }),
229
+ ),
219
230
  );
220
231
 
221
232
  const { validators } = this.getValidators();
222
233
  this.validators = validators;
234
+
223
235
  await deployL1ContractsValues.l1Client.waitForTransactionReceipt({
224
- hash: await rollup.write.cheat__InitialiseValidatorSet([this.validators]),
236
+ hash: await multiAdder.write.addValidators([this.validators]),
225
237
  });
226
238
 
227
239
  const slotsInEpoch = await rollup.read.getEpochDuration();
@@ -46,5 +46,5 @@ export async function sendL1ToL2Message(
46
46
  const receivedMsgHash = topics.args.hash;
47
47
  const receivedGlobalLeafIndex = topics.args.index;
48
48
 
49
- return [Fr.fromHexString(receivedMsgHash), new Fr(receivedGlobalLeafIndex)];
49
+ return { msgHash: Fr.fromHexString(receivedMsgHash), globalLeafIndex: new Fr(receivedGlobalLeafIndex), txReceipt };
50
50
  }