@aztec/end-to-end 0.0.0-test.1 → 0.0.1-fake-c83136db25

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.
Files changed (166) hide show
  1. package/dest/bench/client_flows/benchmark.d.ts +61 -0
  2. package/dest/bench/client_flows/benchmark.d.ts.map +1 -0
  3. package/dest/bench/client_flows/benchmark.js +261 -0
  4. package/dest/bench/client_flows/client_flows_benchmark.d.ts +73 -0
  5. package/dest/bench/client_flows/client_flows_benchmark.d.ts.map +1 -0
  6. package/dest/bench/client_flows/client_flows_benchmark.js +311 -0
  7. package/dest/bench/client_flows/config.d.ts +14 -0
  8. package/dest/bench/client_flows/config.d.ts.map +1 -0
  9. package/dest/bench/client_flows/config.js +106 -0
  10. package/dest/bench/client_flows/data_extractor.d.ts +2 -0
  11. package/dest/bench/client_flows/data_extractor.d.ts.map +1 -0
  12. package/dest/bench/client_flows/data_extractor.js +99 -0
  13. package/dest/bench/utils.d.ts +10 -36
  14. package/dest/bench/utils.d.ts.map +1 -1
  15. package/dest/bench/utils.js +26 -66
  16. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +20 -12
  17. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
  18. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +85 -57
  19. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +18 -24
  20. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -1
  21. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +48 -69
  22. package/dest/e2e_deploy_contract/deploy_test.d.ts +14 -6
  23. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -1
  24. package/dest/e2e_deploy_contract/deploy_test.js +13 -19
  25. package/dest/e2e_epochs/epochs_test.d.ts +58 -17
  26. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
  27. package/dest/e2e_epochs/epochs_test.js +224 -43
  28. package/dest/e2e_fees/bridging_race.notest.d.ts +2 -0
  29. package/dest/e2e_fees/bridging_race.notest.d.ts.map +1 -0
  30. package/dest/e2e_fees/bridging_race.notest.js +63 -0
  31. package/dest/e2e_fees/fees_test.d.ts +20 -9
  32. package/dest/e2e_fees/fees_test.d.ts.map +1 -1
  33. package/dest/e2e_fees/fees_test.js +98 -107
  34. package/dest/e2e_l1_publisher/write_json.d.ts +10 -0
  35. package/dest/e2e_l1_publisher/write_json.d.ts.map +1 -0
  36. package/dest/e2e_l1_publisher/write_json.js +57 -0
  37. package/dest/e2e_multi_validator/utils.d.ts +12 -0
  38. package/dest/e2e_multi_validator/utils.d.ts.map +1 -0
  39. package/dest/e2e_multi_validator/utils.js +214 -0
  40. package/dest/e2e_nested_contract/nested_contract_test.d.ts +9 -6
  41. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -1
  42. package/dest/e2e_nested_contract/nested_contract_test.js +22 -19
  43. package/dest/e2e_p2p/inactivity_slash_test.d.ts +31 -0
  44. package/dest/e2e_p2p/inactivity_slash_test.d.ts.map +1 -0
  45. package/dest/e2e_p2p/inactivity_slash_test.js +135 -0
  46. package/dest/e2e_p2p/p2p_network.d.ts +69 -22
  47. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
  48. package/dest/e2e_p2p/p2p_network.js +180 -129
  49. package/dest/e2e_p2p/shared.d.ts +41 -5
  50. package/dest/e2e_p2p/shared.d.ts.map +1 -1
  51. package/dest/e2e_p2p/shared.js +163 -19
  52. package/dest/e2e_token_contract/token_contract_test.d.ts +11 -5
  53. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -1
  54. package/dest/e2e_token_contract/token_contract_test.js +50 -26
  55. package/dest/{e2e_prover → fixtures}/e2e_prover_test.d.ts +14 -9
  56. package/dest/fixtures/e2e_prover_test.d.ts.map +1 -0
  57. package/dest/{e2e_prover → fixtures}/e2e_prover_test.js +95 -100
  58. package/dest/fixtures/fixtures.d.ts +5 -6
  59. package/dest/fixtures/fixtures.d.ts.map +1 -1
  60. package/dest/fixtures/fixtures.js +4 -3
  61. package/dest/fixtures/get_acvm_config.d.ts +1 -1
  62. package/dest/fixtures/get_acvm_config.d.ts.map +1 -1
  63. package/dest/fixtures/get_acvm_config.js +2 -14
  64. package/dest/fixtures/get_bb_config.d.ts +1 -1
  65. package/dest/fixtures/get_bb_config.d.ts.map +1 -1
  66. package/dest/fixtures/get_bb_config.js +10 -17
  67. package/dest/fixtures/l1_to_l2_messaging.d.ts +8 -5
  68. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -1
  69. package/dest/fixtures/l1_to_l2_messaging.js +44 -18
  70. package/dest/fixtures/setup_l1_contracts.d.ts +3 -3
  71. package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -1
  72. package/dest/fixtures/setup_l1_contracts.js +4 -4
  73. package/dest/fixtures/setup_p2p_test.d.ts +14 -13
  74. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
  75. package/dest/fixtures/setup_p2p_test.js +73 -21
  76. package/dest/fixtures/snapshot_manager.d.ts +15 -7
  77. package/dest/fixtures/snapshot_manager.d.ts.map +1 -1
  78. package/dest/fixtures/snapshot_manager.js +147 -121
  79. package/dest/fixtures/token_utils.d.ts +6 -3
  80. package/dest/fixtures/token_utils.d.ts.map +1 -1
  81. package/dest/fixtures/token_utils.js +23 -10
  82. package/dest/fixtures/utils.d.ts +76 -37
  83. package/dest/fixtures/utils.d.ts.map +1 -1
  84. package/dest/fixtures/utils.js +464 -368
  85. package/dest/fixtures/web3signer.d.ts +5 -0
  86. package/dest/fixtures/web3signer.d.ts.map +1 -0
  87. package/dest/fixtures/web3signer.js +53 -0
  88. package/dest/quality_of_service/alert_checker.d.ts +1 -1
  89. package/dest/quality_of_service/alert_checker.d.ts.map +1 -1
  90. package/dest/shared/cross_chain_test_harness.d.ts +41 -25
  91. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -1
  92. package/dest/shared/cross_chain_test_harness.js +104 -50
  93. package/dest/shared/gas_portal_test_harness.d.ts +32 -24
  94. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -1
  95. package/dest/shared/gas_portal_test_harness.js +50 -29
  96. package/dest/shared/jest_setup.js +1 -1
  97. package/dest/shared/submit-transactions.d.ts +5 -3
  98. package/dest/shared/submit-transactions.d.ts.map +1 -1
  99. package/dest/shared/submit-transactions.js +8 -7
  100. package/dest/shared/uniswap_l1_l2.d.ts +13 -11
  101. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
  102. package/dest/shared/uniswap_l1_l2.js +138 -108
  103. package/dest/simulators/lending_simulator.d.ts +6 -6
  104. package/dest/simulators/lending_simulator.d.ts.map +1 -1
  105. package/dest/simulators/lending_simulator.js +13 -16
  106. package/dest/simulators/token_simulator.d.ts +5 -2
  107. package/dest/simulators/token_simulator.d.ts.map +1 -1
  108. package/dest/simulators/token_simulator.js +16 -13
  109. package/dest/spartan/setup_test_wallets.d.ts +23 -10
  110. package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
  111. package/dest/spartan/setup_test_wallets.js +167 -58
  112. package/dest/spartan/utils.d.ts +100 -303
  113. package/dest/spartan/utils.d.ts.map +1 -1
  114. package/dest/spartan/utils.js +407 -130
  115. package/package.json +61 -56
  116. package/src/bench/client_flows/benchmark.ts +341 -0
  117. package/src/bench/client_flows/client_flows_benchmark.ts +402 -0
  118. package/src/bench/client_flows/config.ts +61 -0
  119. package/src/bench/client_flows/data_extractor.ts +111 -0
  120. package/src/bench/utils.ts +22 -76
  121. package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +80 -77
  122. package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +63 -105
  123. package/src/e2e_deploy_contract/deploy_test.ts +23 -38
  124. package/src/e2e_epochs/epochs_test.ts +274 -54
  125. package/src/e2e_fees/bridging_race.notest.ts +80 -0
  126. package/src/e2e_fees/fees_test.ts +137 -136
  127. package/src/e2e_l1_publisher/write_json.ts +76 -0
  128. package/src/e2e_multi_validator/utils.ts +258 -0
  129. package/src/e2e_nested_contract/nested_contract_test.ts +27 -18
  130. package/src/e2e_p2p/inactivity_slash_test.ts +178 -0
  131. package/src/e2e_p2p/p2p_network.ts +272 -166
  132. package/src/e2e_p2p/shared.ts +244 -29
  133. package/src/e2e_token_contract/token_contract_test.ts +43 -39
  134. package/src/fixtures/dumps/epoch_proof_result.json +1 -1
  135. package/src/{e2e_prover → fixtures}/e2e_prover_test.ts +101 -145
  136. package/src/fixtures/fixtures.ts +4 -3
  137. package/src/fixtures/get_acvm_config.ts +3 -11
  138. package/src/fixtures/get_bb_config.ts +18 -13
  139. package/src/fixtures/l1_to_l2_messaging.ts +53 -23
  140. package/src/fixtures/setup_l1_contracts.ts +6 -7
  141. package/src/fixtures/setup_p2p_test.ts +112 -38
  142. package/src/fixtures/snapshot_manager.ts +187 -139
  143. package/src/fixtures/token_utils.ts +29 -12
  144. package/src/fixtures/utils.ts +552 -425
  145. package/src/fixtures/web3signer.ts +63 -0
  146. package/src/guides/up_quick_start.sh +6 -14
  147. package/src/quality_of_service/alert_checker.ts +1 -1
  148. package/src/shared/cross_chain_test_harness.ts +108 -79
  149. package/src/shared/gas_portal_test_harness.ts +58 -49
  150. package/src/shared/jest_setup.ts +1 -1
  151. package/src/shared/submit-transactions.ts +12 -8
  152. package/src/shared/uniswap_l1_l2.ts +173 -176
  153. package/src/simulators/lending_simulator.ts +12 -15
  154. package/src/simulators/token_simulator.ts +21 -13
  155. package/src/spartan/DEVELOP.md +121 -0
  156. package/src/spartan/setup_test_wallets.ts +215 -93
  157. package/src/spartan/utils.ts +458 -130
  158. package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
  159. package/dest/sample-dapp/connect.js +0 -12
  160. package/dest/sample-dapp/contracts.js +0 -10
  161. package/dest/sample-dapp/deploy.js +0 -35
  162. package/dest/sample-dapp/index.js +0 -98
  163. package/src/sample-dapp/connect.mjs +0 -16
  164. package/src/sample-dapp/contracts.mjs +0 -14
  165. package/src/sample-dapp/deploy.mjs +0 -40
  166. package/src/sample-dapp/index.mjs +0 -128
@@ -0,0 +1,5 @@
1
+ export declare function createWeb3SignerKeystore(dir: string, ...privateKeys: string[]): Promise<void>;
2
+ export declare function refreshWeb3Signer(url: string, ...expectedAddresses: string[]): Promise<void>;
3
+ export declare function getWeb3SignerTestKeystoreDir(): string;
4
+ export declare function getWeb3SignerUrl(): string;
5
+ //# sourceMappingURL=web3signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web3signer.d.ts","sourceRoot":"","sources":["../../src/fixtures/web3signer.ts"],"names":[],"mappings":"AASA,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,MAAM,EAAE,iBAcnF;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,iBAoBlF;AAED,wBAAgB,4BAA4B,IAAI,MAAM,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAMzC"}
@@ -0,0 +1,53 @@
1
+ import { randomBytes } from '@aztec/foundation/crypto';
2
+ import { retryUntil } from '@aztec/foundation/retry';
3
+ import { sleep } from '@aztec/foundation/sleep';
4
+ import { RemoteSigner } from '@aztec/node-keystore';
5
+ import { mkdirSync } from 'node:fs';
6
+ import { writeFile } from 'node:fs/promises';
7
+ import { join } from 'node:path';
8
+ export async function createWeb3SignerKeystore(dir, ...privateKeys) {
9
+ const yaml = privateKeys.map((pk)=>`\
10
+ type: file-raw
11
+ keyType: SECP256K1
12
+ privateKey: ${pk}`).join('\n---\n');
13
+ // NOTE: nodejs stdlib can only create temp directories, not temp files!
14
+ // this write uses wx (write-exclusive) so it'll throw if the file already exists
15
+ const path = join(dir, `keystore-${randomBytes(4).toString('hex')}.yaml`);
16
+ await writeFile(path, yaml, {
17
+ flag: 'wx'
18
+ });
19
+ }
20
+ export async function refreshWeb3Signer(url, ...expectedAddresses) {
21
+ await fetch(new URL('reload', url), {
22
+ method: 'POST'
23
+ });
24
+ if (expectedAddresses.length > 0) {
25
+ await retryUntil(async ()=>{
26
+ try {
27
+ await RemoteSigner.validateAccess(url, expectedAddresses);
28
+ return true;
29
+ } catch {
30
+ return false;
31
+ }
32
+ }, 'web3signer refresh', 10, 0.5);
33
+ } else {
34
+ await sleep(1000);
35
+ }
36
+ }
37
+ export function getWeb3SignerTestKeystoreDir() {
38
+ if (process.env.WEB3_SIGNER_TEST_KEYSTORE_DIR) {
39
+ mkdirSync(process.env.WEB3_SIGNER_TEST_KEYSTORE_DIR, {
40
+ recursive: true
41
+ });
42
+ return process.env.WEB3_SIGNER_TEST_KEYSTORE_DIR;
43
+ } else {
44
+ throw new Error('Web3signer not running');
45
+ }
46
+ }
47
+ export function getWeb3SignerUrl() {
48
+ if (process.env.WEB3_SIGNER_URL) {
49
+ return process.env.WEB3_SIGNER_URL;
50
+ } else {
51
+ throw new Error('Web3signer not running');
52
+ }
53
+ }
@@ -1,4 +1,4 @@
1
- import type { Logger } from '@aztec/aztec.js';
1
+ import type { Logger } from '@aztec/aztec.js/log';
2
2
  export interface AlertConfig {
3
3
  alert: string;
4
4
  expr: string;
@@ -1 +1 @@
1
- {"version":3,"file":"alert_checker.d.ts","sourceRoot":"","sources":["../../src/quality_of_service/alert_checker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAK9C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,MA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M,EAAE,MAAM,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAKpE;;;OAGG;IACH,OAAO,CAAC,gBAAgB;YAMV,YAAY;YAqCZ,WAAW;IAqBzB;;;OAGG;IACU,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhE;;;OAGG;IACU,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxE;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IACnC,IAAI,SAAyB;CACvC"}
@@ -1,5 +1,15 @@
1
- import { type AccountWallet, type AztecAddress, type AztecNode, EthAddress, type FieldsOf, Fr, type L2AmountClaim, type L2AmountClaimWithRecipient, type Logger, type PXE, type SiblingPath, type TxReceipt, type Wallet } from '@aztec/aztec.js';
2
- import type { L1ContractAddresses, ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
1
+ import type { AztecAddress } from '@aztec/aztec.js/addresses';
2
+ import { EthAddress } from '@aztec/aztec.js/addresses';
3
+ import { AuthWitness } from '@aztec/aztec.js/authorization';
4
+ import { type L2AmountClaim, type L2AmountClaimWithRecipient } from '@aztec/aztec.js/ethereum';
5
+ import { Fr } from '@aztec/aztec.js/fields';
6
+ import type { Logger } from '@aztec/aztec.js/log';
7
+ import type { AztecNode } from '@aztec/aztec.js/node';
8
+ import type { SiblingPath } from '@aztec/aztec.js/trees';
9
+ import type { TxReceipt } from '@aztec/aztec.js/tx';
10
+ import type { Wallet } from '@aztec/aztec.js/wallet';
11
+ import { type ExtendedViemWalletClient, type L1ContractAddresses } from '@aztec/ethereum';
12
+ import type { FieldsOf } from '@aztec/foundation/types';
3
13
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
4
14
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
5
15
  import { type Hex } from 'viem';
@@ -13,7 +23,7 @@ import { type Hex } from 'viem';
13
23
  * @param underlyingERC20Address - address of the underlying ERC20 contract to use (if none supplied, it deploys one)
14
24
  * @returns l2 contract instance, bridge contract instance, token portal instance, token portal address and the underlying ERC20 instance
15
25
  */
16
- export declare function deployAndInitializeTokenAndBridgeContracts(wallet: Wallet, walletClient: ViemWalletClient, publicClient: ViemPublicClient, rollupRegistryAddress: EthAddress, owner: AztecAddress, underlyingERC20Address: EthAddress): Promise<{
26
+ export declare function deployAndInitializeTokenAndBridgeContracts(wallet: Wallet, l1Client: ExtendedViemWalletClient, rollupRegistryAddress: EthAddress, owner: AztecAddress, underlyingERC20Address: EthAddress): Promise<{
17
27
  /**
18
28
  * The L2 token contract instance.
19
29
  */
@@ -35,6 +45,16 @@ export declare function deployAndInitializeTokenAndBridgeContracts(wallet: Walle
35
45
  */
36
46
  underlyingERC20: any;
37
47
  }>;
48
+ export type CrossChainContext = {
49
+ l2Token: AztecAddress;
50
+ l2Bridge: AztecAddress;
51
+ tokenPortal: EthAddress;
52
+ underlying: EthAddress;
53
+ ethAccount: EthAddress;
54
+ ownerAddress: AztecAddress;
55
+ inbox: EthAddress;
56
+ outbox: EthAddress;
57
+ };
38
58
  /**
39
59
  * A Class for testing cross chain interactions, contains common interactions
40
60
  * shared between cross chain tests.
@@ -42,8 +62,6 @@ export declare function deployAndInitializeTokenAndBridgeContracts(wallet: Walle
42
62
  export declare class CrossChainTestHarness {
43
63
  /** Aztec node instance. */
44
64
  aztecNode: AztecNode;
45
- /** Private eXecution Environment (PXE). */
46
- pxeService: PXE;
47
65
  /** Logger. */
48
66
  logger: Logger;
49
67
  /** L2 Token contract. */
@@ -56,23 +74,20 @@ export declare class CrossChainTestHarness {
56
74
  tokenPortalAddress: EthAddress;
57
75
  /** Underlying token for portal tests. */
58
76
  underlyingERC20Address: EthAddress;
59
- /** Viem Public client instance. */
60
- publicClient: ViemPublicClient;
61
- /** Viem Wallet Client instance. */
62
- walletClient: ViemWalletClient;
77
+ /** Viem Extended client instance. */
78
+ l1Client: ExtendedViemWalletClient;
63
79
  /** Deployment addresses for all L1 contracts */
64
80
  readonly l1ContractAddresses: L1ContractAddresses;
65
- /** Wallet of the owner. */
66
- readonly ownerWallet: AccountWallet;
67
- static new(aztecNode: AztecNode, pxeService: PXE, publicClient: ViemPublicClient, walletClient: ViemWalletClient, wallet: AccountWallet, logger: Logger, underlyingERC20Address: EthAddress): Promise<CrossChainTestHarness>;
81
+ /** Wallet to simulate and send txs from. */
82
+ readonly wallet: Wallet;
83
+ /** Owner of the l2 token and bridge */
84
+ readonly ownerAddress: AztecAddress;
85
+ static new(aztecNode: AztecNode, l1Client: ExtendedViemWalletClient, wallet: Wallet, ownerAddress: AztecAddress, logger: Logger, underlyingERC20Address: EthAddress): Promise<CrossChainTestHarness>;
68
86
  private readonly l1TokenManager;
69
87
  private readonly l1TokenPortalManager;
70
- readonly ownerAddress: AztecAddress;
71
88
  constructor(
72
89
  /** Aztec node instance. */
73
90
  aztecNode: AztecNode,
74
- /** Private eXecution Environment (PXE). */
75
- pxeService: PXE,
76
91
  /** Logger. */
77
92
  logger: Logger,
78
93
  /** L2 Token contract. */
@@ -85,14 +100,14 @@ export declare class CrossChainTestHarness {
85
100
  tokenPortalAddress: EthAddress,
86
101
  /** Underlying token for portal tests. */
87
102
  underlyingERC20Address: EthAddress,
88
- /** Viem Public client instance. */
89
- publicClient: ViemPublicClient,
90
- /** Viem Wallet Client instance. */
91
- walletClient: ViemWalletClient,
103
+ /** Viem Extended client instance. */
104
+ l1Client: ExtendedViemWalletClient,
92
105
  /** Deployment addresses for all L1 contracts */
93
106
  l1ContractAddresses: L1ContractAddresses,
94
- /** Wallet of the owner. */
95
- ownerWallet: AccountWallet);
107
+ /** Wallet to simulate and send txs from. */
108
+ wallet: Wallet,
109
+ /** Owner of the l2 token and bridge */
110
+ ownerAddress: AztecAddress);
96
111
  mintTokensOnL1(amount: bigint): Promise<void>;
97
112
  getL1BalanceOf(address: EthAddress): Promise<bigint>;
98
113
  sendTokensToPortalPublic(bridgeAmount: bigint, mint?: boolean): Promise<L2AmountClaim>;
@@ -102,16 +117,16 @@ export declare class CrossChainTestHarness {
102
117
  sendL2PublicTransfer(transferAmount: bigint, receiverAddress: AztecAddress): Promise<void>;
103
118
  consumeMessageOnAztecAndMintPrivately(claim: Pick<L2AmountClaimWithRecipient, 'claimAmount' | 'claimSecret' | 'messageLeafIndex' | 'recipient'>): Promise<void>;
104
119
  consumeMessageOnAztecAndMintPublicly(claim: Pick<L2AmountClaim, 'claimAmount' | 'claimSecret' | 'messageLeafIndex'>): Promise<void>;
105
- withdrawPrivateFromAztecToL1(withdrawAmount: bigint, nonce?: Fr): Promise<FieldsOf<TxReceipt>>;
106
- withdrawPublicFromAztecToL1(withdrawAmount: bigint, nonce?: Fr): Promise<FieldsOf<TxReceipt>>;
120
+ withdrawPrivateFromAztecToL1(withdrawAmount: bigint, authwitNonce: Fr | undefined, authWitness: AuthWitness): Promise<FieldsOf<TxReceipt>>;
121
+ withdrawPublicFromAztecToL1(withdrawAmount: bigint, authwitNonce?: Fr): Promise<FieldsOf<TxReceipt>>;
107
122
  getL2PrivateBalanceOf(owner: AztecAddress): Promise<any>;
108
123
  expectPrivateBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
109
124
  getL2PublicBalanceOf(owner: AztecAddress): Promise<any>;
110
125
  expectPublicBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
111
- getL2ToL1MessageLeaf(withdrawAmount: bigint, callerOnL1?: EthAddress): Fr;
126
+ getL2ToL1MessageLeaf(withdrawAmount: bigint, callerOnL1?: EthAddress): Promise<Fr>;
112
127
  withdrawFundsFromBridgeOnL1(amount: bigint, blockNumber: number | bigint, messageIndex: bigint, siblingPath: SiblingPath<number>): Promise<void>;
113
128
  transferToPrivateOnL2(shieldAmount: bigint): Promise<void>;
114
- transferToPublicOnL2(amount: bigint, nonce?: Fr): Promise<void>;
129
+ transferToPublicOnL2(amount: bigint, authwitNonce?: Fr): Promise<void>;
115
130
  /**
116
131
  * Makes message available for consumption.
117
132
  * @dev Does that by performing 2 unrelated transactions on L2 to progress the rollup by 2 blocks and then waits for
@@ -120,5 +135,6 @@ export declare class CrossChainTestHarness {
120
135
  * it's included it becomes available for consumption in the next block because the l1 to l2 message tree.
121
136
  */
122
137
  makeMessageConsumable(msgHash: Fr | Hex): Promise<void>;
138
+ toCrossChainContext(): CrossChainContext;
123
139
  }
124
140
  //# sourceMappingURL=cross_chain_test_harness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cross_chain_test_harness.d.ts","sourceRoot":"","sources":["../../src/shared/cross_chain_test_harness.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,UAAU,EACV,KAAK,QAAQ,EACb,EAAE,EAGF,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAC/B,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAK7C;;;;;;;;;GASG;AACH,wBAAsB,0CAA0C,CAC9D,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,qBAAqB,EAAE,UAAU,EACjC,KAAK,EAAE,YAAY,EACnB,sBAAsB,EAAE,UAAU,GACjC,OAAO,CAAC;IACT;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;OAEG;IACH,kBAAkB,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACH,W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AoC,CACxC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAU1E,4BAA4B,CAChC,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,EAAE,YAAU,EAC1B,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IASzB,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,GAAE,EAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAS7G,qBAAqB,CAAC,KAAK,EAAE,YAAY;IAIzC,wBAAwB,CAAC,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM;IAMrE,oBAAoB,CAAC,KAAK,EAAE,YAAY;IAIxC,uBAAuB,CAAC,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM;IAKpE,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,GAAE,UAA4B,GAAG,OAAO,CAAC,EAAE,CAAC;IASzG,2BAA2B,CACzB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;IAW5B,qBAAqB,CAAC,YAAY,EAAE,MAAM;IAQ1C,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,KAAU;IAQjE;;;;;;OAMG;IACG,qBAAqB,CAAC,OAAO,EAAE,EAAE,GAAG,GAAG;IAS7C,mBAAmB,IAAI,iBAAiB;CAYzC"}
@@ -1,11 +1,13 @@
1
- // docs:start:cross_chain_test_harness
2
- import { EthAddress, Fr, L1TokenPortalManager, deployL1Contract, retryUntil } from '@aztec/aztec.js';
1
+ import { EthAddress } from '@aztec/aztec.js/addresses';
2
+ import { L1TokenPortalManager } from '@aztec/aztec.js/ethereum';
3
+ import { Fr } from '@aztec/aztec.js/fields';
4
+ import { deployL1Contract } from '@aztec/ethereum';
5
+ import { retryUntil } from '@aztec/foundation/retry';
3
6
  import { TestERC20Abi, TokenPortalAbi, TokenPortalBytecode } from '@aztec/l1-artifacts';
4
7
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
5
8
  import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
6
9
  import { getContract } from 'viem';
7
10
  import { mintTokensToPrivate } from '../fixtures/token_utils.js';
8
- // docs:start:deployAndInitializeTokenAndBridgeContracts
9
11
  /**
10
12
  * Deploy L1 token and portal, initialize portal, deploy a non native l2 token contract, its L2 bridge contract and attach is to the portal.
11
13
  * @param wallet - the wallet instance
@@ -15,27 +17,39 @@ import { mintTokensToPrivate } from '../fixtures/token_utils.js';
15
17
  * @param owner - owner of the L2 contract
16
18
  * @param underlyingERC20Address - address of the underlying ERC20 contract to use (if none supplied, it deploys one)
17
19
  * @returns l2 contract instance, bridge contract instance, token portal instance, token portal address and the underlying ERC20 instance
18
- */ export async function deployAndInitializeTokenAndBridgeContracts(wallet, walletClient, publicClient, rollupRegistryAddress, owner, underlyingERC20Address) {
20
+ */ export async function deployAndInitializeTokenAndBridgeContracts(wallet, l1Client, rollupRegistryAddress, owner, underlyingERC20Address) {
19
21
  // deploy the token portal
20
- const { address: tokenPortalAddress } = await deployL1Contract(walletClient, publicClient, TokenPortalAbi, TokenPortalBytecode);
22
+ const { address: tokenPortalAddress } = await deployL1Contract(l1Client, TokenPortalAbi, TokenPortalBytecode);
21
23
  const tokenPortal = getContract({
22
24
  address: tokenPortalAddress.toString(),
23
25
  abi: TokenPortalAbi,
24
- client: walletClient
26
+ client: l1Client
25
27
  });
26
28
  // deploy l2 token
27
- const token = await TokenContract.deploy(wallet, owner, 'TokenName', 'TokenSymbol', 18).send().deployed();
29
+ const token = await TokenContract.deploy(wallet, owner, 'TokenName', 'TokenSymbol', 18).send({
30
+ from: owner
31
+ }).deployed();
28
32
  // deploy l2 token bridge and attach to the portal
29
- const bridge = await TokenBridgeContract.deploy(wallet, token.address, tokenPortalAddress).send().deployed();
30
- if (await token.methods.get_admin().simulate() !== owner.toBigInt()) {
33
+ const bridge = await TokenBridgeContract.deploy(wallet, token.address, tokenPortalAddress).send({
34
+ from: owner
35
+ }).deployed();
36
+ if (await token.methods.get_admin().simulate({
37
+ from: owner
38
+ }) !== owner.toBigInt()) {
31
39
  throw new Error(`Token admin is not ${owner}`);
32
40
  }
33
- if (!(await bridge.methods.get_config().simulate()).token.equals(token.address)) {
41
+ if (!(await bridge.methods.get_config().simulate({
42
+ from: owner
43
+ })).token.equals(token.address)) {
34
44
  throw new Error(`Bridge token is not ${token.address}`);
35
45
  }
36
46
  // make the bridge a minter on the token:
37
- await token.methods.set_minter(bridge.address, true).send().wait();
38
- if (await token.methods.is_minter(bridge.address).simulate() === 1n) {
47
+ await token.methods.set_minter(bridge.address, true).send({
48
+ from: owner
49
+ }).wait();
50
+ if (await token.methods.is_minter(bridge.address).simulate({
51
+ from: owner
52
+ }) === 1n) {
39
53
  throw new Error(`Bridge is not a minter`);
40
54
  }
41
55
  // initialize portal
@@ -47,7 +61,7 @@ import { mintTokensToPrivate } from '../fixtures/token_utils.js';
47
61
  const underlyingERC20 = getContract({
48
62
  address: underlyingERC20Address.toString(),
49
63
  abi: TestERC20Abi,
50
- client: walletClient
64
+ client: l1Client
51
65
  });
52
66
  return {
53
67
  token,
@@ -57,55 +71,62 @@ import { mintTokensToPrivate } from '../fixtures/token_utils.js';
57
71
  underlyingERC20
58
72
  };
59
73
  }
60
- // docs:end:deployAndInitializeTokenAndBridgeContracts
61
74
  /**
62
75
  * A Class for testing cross chain interactions, contains common interactions
63
76
  * shared between cross chain tests.
64
77
  */ export class CrossChainTestHarness {
65
78
  aztecNode;
66
- pxeService;
67
79
  logger;
68
80
  l2Token;
69
81
  l2Bridge;
70
82
  ethAccount;
71
83
  tokenPortalAddress;
72
84
  underlyingERC20Address;
73
- publicClient;
74
- walletClient;
85
+ l1Client;
75
86
  l1ContractAddresses;
76
- ownerWallet;
77
- static async new(aztecNode, pxeService, publicClient, walletClient, wallet, logger, underlyingERC20Address) {
78
- const ethAccount = EthAddress.fromString((await walletClient.getAddresses())[0]);
79
- const l1ContractAddresses = (await pxeService.getNodeInfo()).l1ContractAddresses;
87
+ wallet;
88
+ ownerAddress;
89
+ static async new(aztecNode, l1Client, wallet, ownerAddress, logger, underlyingERC20Address) {
90
+ const ethAccount = EthAddress.fromString((await l1Client.getAddresses())[0]);
91
+ const l1ContractAddresses = (await aztecNode.getNodeInfo()).l1ContractAddresses;
80
92
  // Deploy and initialize all required contracts
81
93
  logger.info('Deploying and initializing token, portal and its bridge...');
82
- const { token, bridge, tokenPortalAddress, underlyingERC20 } = await deployAndInitializeTokenAndBridgeContracts(wallet, walletClient, publicClient, l1ContractAddresses.registryAddress, wallet.getAddress(), underlyingERC20Address);
94
+ const { token, bridge, tokenPortalAddress, underlyingERC20 } = await deployAndInitializeTokenAndBridgeContracts(wallet, l1Client, l1ContractAddresses.registryAddress, ownerAddress, underlyingERC20Address);
83
95
  logger.info('Deployed and initialized token, portal and its bridge.');
84
- return new CrossChainTestHarness(aztecNode, pxeService, logger, token, bridge, ethAccount, tokenPortalAddress, underlyingERC20.address, publicClient, walletClient, l1ContractAddresses, wallet);
96
+ return new CrossChainTestHarness(aztecNode, logger, token, bridge, ethAccount, tokenPortalAddress, underlyingERC20.address, l1Client, l1ContractAddresses, wallet, ownerAddress);
85
97
  }
86
98
  l1TokenManager;
87
99
  l1TokenPortalManager;
88
- ownerAddress;
89
- constructor(/** Aztec node instance. */ aztecNode, /** Private eXecution Environment (PXE). */ pxeService, /** Logger. */ logger, /** L2 Token contract. */ l2Token, /** L2 Token bridge contract. */ l2Bridge, /** Eth account to interact with. */ ethAccount, /** Portal address. */ tokenPortalAddress, /** Underlying token for portal tests. */ underlyingERC20Address, /** Viem Public client instance. */ publicClient, /** Viem Wallet Client instance. */ walletClient, /** Deployment addresses for all L1 contracts */ l1ContractAddresses, /** Wallet of the owner. */ ownerWallet){
100
+ constructor(/** Aztec node instance. */ aztecNode, /** Logger. */ logger, /** L2 Token contract. */ l2Token, /** L2 Token bridge contract. */ l2Bridge, /** Eth account to interact with. */ ethAccount, /** Portal address. */ tokenPortalAddress, /** Underlying token for portal tests. */ underlyingERC20Address, /** Viem Extended client instance. */ l1Client, /** Deployment addresses for all L1 contracts */ l1ContractAddresses, /** Wallet to simulate and send txs from. */ wallet, /** Owner of the l2 token and bridge */ ownerAddress){
90
101
  this.aztecNode = aztecNode;
91
- this.pxeService = pxeService;
92
102
  this.logger = logger;
93
103
  this.l2Token = l2Token;
94
104
  this.l2Bridge = l2Bridge;
95
105
  this.ethAccount = ethAccount;
96
106
  this.tokenPortalAddress = tokenPortalAddress;
97
107
  this.underlyingERC20Address = underlyingERC20Address;
98
- this.publicClient = publicClient;
99
- this.walletClient = walletClient;
108
+ this.l1Client = l1Client;
100
109
  this.l1ContractAddresses = l1ContractAddresses;
101
- this.ownerWallet = ownerWallet;
102
- this.l1TokenPortalManager = new L1TokenPortalManager(this.tokenPortalAddress, this.underlyingERC20Address, this.l1ContractAddresses.outboxAddress, this.publicClient, this.walletClient, this.logger);
110
+ this.wallet = wallet;
111
+ this.ownerAddress = ownerAddress;
112
+ this.l1TokenPortalManager = new L1TokenPortalManager(this.tokenPortalAddress, this.underlyingERC20Address, this.l1ContractAddresses.feeAssetHandlerAddress, this.l1ContractAddresses.outboxAddress, this.l1Client, this.logger);
103
113
  this.l1TokenManager = this.l1TokenPortalManager.getTokenManager();
104
- this.ownerAddress = this.ownerWallet.getAddress();
105
114
  }
106
115
  async mintTokensOnL1(amount) {
107
- await this.l1TokenManager.mint(amount, this.ethAccount.toString());
108
- expect(await this.l1TokenManager.getL1TokenBalance(this.ethAccount.toString())).toEqual(amount);
116
+ const contract = getContract({
117
+ abi: TestERC20Abi,
118
+ address: this.l1TokenManager.tokenAddress.toString(),
119
+ client: this.l1Client
120
+ });
121
+ const balanceBefore = await this.l1TokenManager.getL1TokenBalance(this.ethAccount.toString());
122
+ const hash = await contract.write.mint([
123
+ this.ethAccount.toString(),
124
+ amount
125
+ ]);
126
+ await this.l1Client.waitForTransactionReceipt({
127
+ hash
128
+ });
129
+ expect(await this.l1TokenManager.getL1TokenBalance(this.ethAccount.toString())).toEqual(balanceBefore + amount);
109
130
  }
110
131
  getL1BalanceOf(address) {
111
132
  return this.l1TokenManager.getL1TokenBalance(address.toString());
@@ -118,31 +139,46 @@ import { mintTokensToPrivate } from '../fixtures/token_utils.js';
118
139
  }
119
140
  async mintTokensPublicOnL2(amount) {
120
141
  this.logger.info('Minting tokens on L2 publicly');
121
- await this.l2Token.methods.mint_to_public(this.ownerAddress, amount).send().wait();
142
+ await this.l2Token.methods.mint_to_public(this.ownerAddress, amount).send({
143
+ from: this.ownerAddress
144
+ }).wait();
122
145
  }
123
146
  async mintTokensPrivateOnL2(amount) {
124
- await mintTokensToPrivate(this.l2Token, this.ownerWallet, this.ownerAddress, amount);
147
+ await mintTokensToPrivate(this.l2Token, this.ownerAddress, this.ownerAddress, amount);
125
148
  }
126
149
  async sendL2PublicTransfer(transferAmount, receiverAddress) {
127
150
  // send a transfer tx to force through rollup with the message included
128
- await this.l2Token.methods.transfer_in_public(this.ownerAddress, receiverAddress, transferAmount, 0).send().wait();
151
+ await this.l2Token.methods.transfer_in_public(this.ownerAddress, receiverAddress, transferAmount, 0).send({
152
+ from: this.ownerAddress
153
+ }).wait();
129
154
  }
130
155
  async consumeMessageOnAztecAndMintPrivately(claim) {
131
156
  this.logger.info('Consuming messages on L2 privately');
132
157
  const { recipient, claimAmount, claimSecret: secretForL2MessageConsumption, messageLeafIndex } = claim;
133
- await this.l2Bridge.methods.claim_private(recipient, claimAmount, secretForL2MessageConsumption, messageLeafIndex).send().wait();
158
+ await this.l2Bridge.methods.claim_private(recipient, claimAmount, secretForL2MessageConsumption, messageLeafIndex).send({
159
+ from: this.ownerAddress
160
+ }).wait();
134
161
  }
135
162
  async consumeMessageOnAztecAndMintPublicly(claim) {
136
163
  this.logger.info('Consuming messages on L2 Publicly');
137
164
  const { claimAmount, claimSecret, messageLeafIndex } = claim;
138
- await this.l2Bridge.methods.claim_public(this.ownerAddress, claimAmount, claimSecret, messageLeafIndex).send().wait();
139
- }
140
- async withdrawPrivateFromAztecToL1(withdrawAmount, nonce = Fr.ZERO) {
141
- const withdrawReceipt = await this.l2Bridge.methods.exit_to_l1_private(this.l2Token.address, this.ethAccount, withdrawAmount, EthAddress.ZERO, nonce).send().wait();
165
+ await this.l2Bridge.methods.claim_public(this.ownerAddress, claimAmount, claimSecret, messageLeafIndex).send({
166
+ from: this.ownerAddress
167
+ }).wait();
168
+ }
169
+ async withdrawPrivateFromAztecToL1(withdrawAmount, authwitNonce = Fr.ZERO, authWitness) {
170
+ const withdrawReceipt = await this.l2Bridge.methods.exit_to_l1_private(this.l2Token.address, this.ethAccount, withdrawAmount, EthAddress.ZERO, authwitNonce).send({
171
+ authWitnesses: [
172
+ authWitness
173
+ ],
174
+ from: this.ownerAddress
175
+ }).wait();
142
176
  return withdrawReceipt;
143
177
  }
144
- async withdrawPublicFromAztecToL1(withdrawAmount, nonce = Fr.ZERO) {
145
- const withdrawReceipt = await this.l2Bridge.methods.exit_to_l1_public(this.ethAccount, withdrawAmount, EthAddress.ZERO, nonce).send().wait();
178
+ async withdrawPublicFromAztecToL1(withdrawAmount, authwitNonce = Fr.ZERO) {
179
+ const withdrawReceipt = await this.l2Bridge.methods.exit_to_l1_public(this.ethAccount, withdrawAmount, EthAddress.ZERO, authwitNonce).send({
180
+ from: this.ownerAddress
181
+ }).wait();
146
182
  return withdrawReceipt;
147
183
  }
148
184
  async getL2PrivateBalanceOf(owner) {
@@ -156,25 +192,31 @@ import { mintTokensToPrivate } from '../fixtures/token_utils.js';
156
192
  expect(balance).toBe(expectedBalance);
157
193
  }
158
194
  async getL2PublicBalanceOf(owner) {
159
- return await this.l2Token.methods.balance_of_public(owner).simulate();
195
+ return await this.l2Token.methods.balance_of_public(owner).simulate({
196
+ from: this.ownerAddress
197
+ });
160
198
  }
161
199
  async expectPublicBalanceOnL2(owner, expectedBalance) {
162
200
  const balance = await this.getL2PublicBalanceOf(owner);
163
201
  expect(balance).toBe(expectedBalance);
164
202
  }
165
- getL2ToL1MessageLeaf(withdrawAmount, callerOnL1 = EthAddress.ZERO) {
166
- return this.l1TokenPortalManager.getL2ToL1MessageLeaf(withdrawAmount, this.ethAccount, this.l2Bridge.address, callerOnL1);
203
+ async getL2ToL1MessageLeaf(withdrawAmount, callerOnL1 = EthAddress.ZERO) {
204
+ return await this.l1TokenPortalManager.getL2ToL1MessageLeaf(withdrawAmount, this.ethAccount, this.l2Bridge.address, callerOnL1);
167
205
  }
168
206
  withdrawFundsFromBridgeOnL1(amount, blockNumber, messageIndex, siblingPath) {
169
207
  return this.l1TokenPortalManager.withdrawFunds(amount, this.ethAccount, BigInt(blockNumber), messageIndex, siblingPath);
170
208
  }
171
209
  async transferToPrivateOnL2(shieldAmount) {
172
210
  this.logger.info('Transferring to private on L2');
173
- await this.l2Token.methods.transfer_to_private(this.ownerAddress, shieldAmount).send().wait();
211
+ await this.l2Token.methods.transfer_to_private(this.ownerAddress, shieldAmount).send({
212
+ from: this.ownerAddress
213
+ }).wait();
174
214
  }
175
- async transferToPublicOnL2(amount, nonce = Fr.ZERO) {
215
+ async transferToPublicOnL2(amount, authwitNonce = Fr.ZERO) {
176
216
  this.logger.info('Transferring tokens to public');
177
- await this.l2Token.methods.transfer_to_public(this.ownerAddress, this.ownerAddress, amount, nonce).send().wait();
217
+ await this.l2Token.methods.transfer_to_public(this.ownerAddress, this.ownerAddress, amount, authwitNonce).send({
218
+ from: this.ownerAddress
219
+ }).wait();
178
220
  }
179
221
  /**
180
222
  * Makes message available for consumption.
@@ -189,4 +231,16 @@ import { mintTokensToPrivate } from '../fixtures/token_utils.js';
189
231
  await this.mintTokensPublicOnL2(0n);
190
232
  await this.mintTokensPublicOnL2(0n);
191
233
  }
192
- } // docs:end:cross_chain_test_harness
234
+ toCrossChainContext() {
235
+ return {
236
+ l2Token: this.l2Token.address,
237
+ l2Bridge: this.l2Bridge.address,
238
+ tokenPortal: this.tokenPortalAddress,
239
+ underlying: this.underlyingERC20Address,
240
+ ethAccount: this.ethAccount,
241
+ ownerAddress: this.ownerAddress,
242
+ inbox: this.l1ContractAddresses.inboxAddress,
243
+ outbox: this.l1ContractAddresses.outboxAddress
244
+ };
245
+ }
246
+ }
@@ -1,18 +1,22 @@
1
- import { type AztecAddress, type AztecNode, EthAddress, L1FeeJuicePortalManager, type L1TokenManager, type L2AmountClaim, type Logger, type PXE, type Wallet } from '@aztec/aztec.js';
2
- import type { ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
1
+ import { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
2
+ import { L1FeeJuicePortalManager, type L1TokenManager, type L2AmountClaim } from '@aztec/aztec.js/ethereum';
3
+ import type { Logger } from '@aztec/aztec.js/log';
4
+ import type { AztecNode } from '@aztec/aztec.js/node';
5
+ import type { Wallet } from '@aztec/aztec.js/wallet';
6
+ import type { ExtendedViemWalletClient } from '@aztec/ethereum';
3
7
  import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
8
+ import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
4
9
  export interface IGasBridgingTestHarness {
5
10
  getL1FeeJuiceBalance(address: EthAddress): Promise<bigint>;
6
- prepareTokensOnL1(bridgeAmount: bigint, owner: AztecAddress): Promise<L2AmountClaim>;
7
- bridgeFromL1ToL2(bridgeAmount: bigint, owner: AztecAddress): Promise<void>;
11
+ prepareTokensOnL1(owner: AztecAddress): Promise<L2AmountClaim>;
12
+ bridgeFromL1ToL2(owner: AztecAddress, claimer: AztecAddress): Promise<void>;
8
13
  feeJuice: FeeJuiceContract;
9
14
  l1FeeJuiceAddress: EthAddress;
10
15
  }
11
16
  export interface FeeJuicePortalTestingHarnessFactoryConfig {
12
17
  aztecNode: AztecNode;
13
- pxeService: PXE;
14
- publicClient: ViemPublicClient;
15
- walletClient: ViemWalletClient;
18
+ aztecNodeAdmin?: AztecNodeAdmin;
19
+ l1Client: ExtendedViemWalletClient;
16
20
  wallet: Wallet;
17
21
  logger: Logger;
18
22
  mockL1?: boolean;
@@ -30,8 +34,10 @@ export declare class FeeJuicePortalTestingHarnessFactory {
30
34
  export declare class GasBridgingTestHarness implements IGasBridgingTestHarness {
31
35
  /** Aztec node */
32
36
  aztecNode: AztecNode;
33
- /** Private eXecution Environment (PXE). */
34
- pxeService: PXE;
37
+ /** Aztec node admin interface */
38
+ aztecNodeAdmin: AztecNodeAdmin | undefined;
39
+ /** Wallet. */
40
+ wallet: Wallet;
35
41
  /** Logger. */
36
42
  logger: Logger;
37
43
  /** L2 Token/Bridge contract. */
@@ -42,17 +48,19 @@ export declare class GasBridgingTestHarness implements IGasBridgingTestHarness {
42
48
  feeJuicePortalAddress: EthAddress;
43
49
  /** Underlying token for portal tests. */
44
50
  l1FeeJuiceAddress: EthAddress;
45
- /** Viem Public client instance. */
46
- publicClient: ViemPublicClient;
47
- /** Viem Wallet Client instance. */
48
- walletClient: ViemWalletClient;
51
+ /** Fee asset handler address. */
52
+ feeAssetHandlerAddress: EthAddress;
53
+ /** Viem Extended client instance. */
54
+ l1Client: ExtendedViemWalletClient;
49
55
  readonly l1TokenManager: L1TokenManager;
50
56
  readonly feeJuicePortalManager: L1FeeJuicePortalManager;
51
57
  constructor(
52
58
  /** Aztec node */
53
59
  aztecNode: AztecNode,
54
- /** Private eXecution Environment (PXE). */
55
- pxeService: PXE,
60
+ /** Aztec node admin interface */
61
+ aztecNodeAdmin: AztecNodeAdmin | undefined,
62
+ /** Wallet. */
63
+ wallet: Wallet,
56
64
  /** Logger. */
57
65
  logger: Logger,
58
66
  /** L2 Token/Bridge contract. */
@@ -63,18 +71,18 @@ export declare class GasBridgingTestHarness implements IGasBridgingTestHarness {
63
71
  feeJuicePortalAddress: EthAddress,
64
72
  /** Underlying token for portal tests. */
65
73
  l1FeeJuiceAddress: EthAddress,
66
- /** Viem Public client instance. */
67
- publicClient: ViemPublicClient,
68
- /** Viem Wallet Client instance. */
69
- walletClient: ViemWalletClient);
70
- mintTokensOnL1(amount: bigint, to?: EthAddress): Promise<void>;
74
+ /** Fee asset handler address. */
75
+ feeAssetHandlerAddress: EthAddress,
76
+ /** Viem Extended client instance. */
77
+ l1Client: ExtendedViemWalletClient);
78
+ mintTokensOnL1(to?: EthAddress): Promise<void>;
71
79
  getL1FeeJuiceBalance(address: EthAddress): Promise<bigint>;
72
- sendTokensToPortalPublic(bridgeAmount: bigint, l2Address: AztecAddress, mint?: boolean): Promise<L2AmountClaim>;
73
- consumeMessageOnAztecAndClaimPrivately(owner: AztecAddress, claim: L2AmountClaim): Promise<void>;
80
+ sendTokensToPortalPublic(bridgeAmount: bigint, l2Address: AztecAddress): Promise<L2AmountClaim>;
81
+ consumeMessageOnAztecAndClaimPrivately(owner: AztecAddress, claimer: AztecAddress, claim: L2AmountClaim): Promise<void>;
74
82
  getL2PublicBalanceOf(owner: AztecAddress): Promise<any>;
75
83
  expectPublicBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
76
- prepareTokensOnL1(bridgeAmount: bigint, owner: AztecAddress): Promise<L2AmountClaim>;
77
- bridgeFromL1ToL2(bridgeAmount: bigint, owner: AztecAddress): Promise<void>;
84
+ prepareTokensOnL1(owner: AztecAddress): Promise<L2AmountClaim>;
85
+ bridgeFromL1ToL2(owner: AztecAddress, claimer: AztecAddress): Promise<void>;
78
86
  private advanceL2Block;
79
87
  }
80
88
  //# sourceMappingURL=gas_portal_test_harness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gas_portal_test_harness.d.ts","sourceRoot":"","sources":["../../src/shared/gas_portal_test_harness.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,UAAU,EAEV,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,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