@aztec/end-to-end 0.77.0-testnet-ignition.28 → 0.77.0-testnet-ignition.29

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 (73) hide show
  1. package/dest/bench/utils.d.ts +70 -0
  2. package/dest/bench/utils.d.ts.map +1 -0
  3. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +46 -0
  4. package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -0
  5. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +47 -0
  6. package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -0
  7. package/dest/e2e_deploy_contract/deploy_test.d.ts +28 -0
  8. package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -0
  9. package/dest/e2e_epochs/epochs_test.d.ts +51 -0
  10. package/dest/e2e_epochs/epochs_test.d.ts.map +1 -0
  11. package/dest/e2e_fees/fees_test.d.ts +73 -0
  12. package/dest/e2e_fees/fees_test.d.ts.map +1 -0
  13. package/dest/e2e_nested_contract/nested_contract_test.d.ts +26 -0
  14. package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -0
  15. package/dest/e2e_p2p/p2p_network.d.ts +61 -0
  16. package/dest/e2e_p2p/p2p_network.d.ts.map +1 -0
  17. package/dest/e2e_p2p/shared.d.ts +10 -0
  18. package/dest/e2e_p2p/shared.d.ts.map +1 -0
  19. package/dest/e2e_prover/e2e_prover_test.d.ts +56 -0
  20. package/dest/e2e_prover/e2e_prover_test.d.ts.map +1 -0
  21. package/dest/e2e_token_contract/token_contract_test.d.ts +29 -0
  22. package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -0
  23. package/dest/fixtures/fixtures.d.ts +17 -0
  24. package/dest/fixtures/fixtures.d.ts.map +1 -0
  25. package/dest/fixtures/get_acvm_config.d.ts +8 -0
  26. package/dest/fixtures/get_acvm_config.d.ts.map +1 -0
  27. package/dest/fixtures/get_bb_config.d.ts +6 -0
  28. package/dest/fixtures/get_bb_config.d.ts.map +1 -0
  29. package/dest/fixtures/index.d.ts +6 -0
  30. package/dest/fixtures/index.d.ts.map +1 -0
  31. package/dest/fixtures/l1_to_l2_messaging.d.ts +13 -0
  32. package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -0
  33. package/dest/fixtures/logging.d.ts +8 -0
  34. package/dest/fixtures/logging.d.ts.map +1 -0
  35. package/dest/fixtures/setup_l1_contracts.d.ts +6 -0
  36. package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -0
  37. package/dest/fixtures/setup_p2p_test.d.ts +22 -0
  38. package/dest/fixtures/setup_p2p_test.d.ts.map +1 -0
  39. package/dest/fixtures/snapshot_manager.d.ts +87 -0
  40. package/dest/fixtures/snapshot_manager.d.ts.map +1 -0
  41. package/dest/fixtures/token_utils.d.ts +6 -0
  42. package/dest/fixtures/token_utils.d.ts.map +1 -0
  43. package/dest/fixtures/utils.d.ts +155 -0
  44. package/dest/fixtures/utils.d.ts.map +1 -0
  45. package/dest/fixtures/with_telemetry_utils.d.ts +3 -0
  46. package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -0
  47. package/dest/index.d.ts +2 -0
  48. package/dest/index.d.ts.map +1 -0
  49. package/dest/quality_of_service/alert_checker.d.ts +41 -0
  50. package/dest/quality_of_service/alert_checker.d.ts.map +1 -0
  51. package/dest/shared/cross_chain_test_harness.d.ts +124 -0
  52. package/dest/shared/cross_chain_test_harness.d.ts.map +1 -0
  53. package/dest/shared/gas_portal_test_harness.d.ts +80 -0
  54. package/dest/shared/gas_portal_test_harness.d.ts.map +1 -0
  55. package/dest/shared/index.d.ts +2 -0
  56. package/dest/shared/index.d.ts.map +1 -0
  57. package/dest/shared/jest_setup.d.ts +2 -0
  58. package/dest/shared/jest_setup.d.ts.map +1 -0
  59. package/dest/shared/submit-transactions.d.ts +4 -0
  60. package/dest/shared/submit-transactions.d.ts.map +1 -0
  61. package/dest/shared/uniswap_l1_l2.d.ts +25 -0
  62. package/dest/shared/uniswap_l1_l2.d.ts.map +1 -0
  63. package/dest/simulators/index.d.ts +3 -0
  64. package/dest/simulators/index.d.ts.map +1 -0
  65. package/dest/simulators/lending_simulator.d.ts +69 -0
  66. package/dest/simulators/lending_simulator.d.ts.map +1 -0
  67. package/dest/simulators/token_simulator.d.ts +29 -0
  68. package/dest/simulators/token_simulator.d.ts.map +1 -0
  69. package/dest/spartan/setup_test_wallets.d.ts +20 -0
  70. package/dest/spartan/setup_test_wallets.d.ts.map +1 -0
  71. package/dest/spartan/utils.d.ts +415 -0
  72. package/dest/spartan/utils.d.ts.map +1 -0
  73. package/package.json +31 -31
@@ -0,0 +1,13 @@
1
+ import type { L1ContractAddresses, ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
2
+ import { Fr } from '@aztec/foundation/fields';
3
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
+ export declare function sendL1ToL2Message(message: {
5
+ recipient: AztecAddress;
6
+ content: Fr;
7
+ secretHash: Fr;
8
+ }, ctx: {
9
+ walletClient: ViemWalletClient;
10
+ publicClient: ViemPublicClient;
11
+ l1ContractAddresses: Pick<L1ContractAddresses, 'inboxAddress'>;
12
+ }): Promise<Fr[]>;
13
+ //# sourceMappingURL=l1_to_l2_messaging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"l1_to_l2_messaging.d.ts","sourceRoot":"","sources":["../../src/fixtures/l1_to_l2_messaging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC/F,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,YAAY,EAAE,gBAAgB,CAAC;IAC/B,YAAY,EAAE,gBAAgB,CAAC;IAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;CAChE,iBAmCF"}
@@ -0,0 +1,8 @@
1
+ /** Returns whether metrics logging should be enabled by default, checking env vars CI and BENCHMARK. */
2
+ export declare function isMetricsLoggingRequested(): boolean;
3
+ /**
4
+ * Configures an NDJSON logger to output entries to a local file that have an `eventName` associated.
5
+ * Idempotent and automatically called by `setup` if CI or BENCHMARK env vars are set.
6
+ */
7
+ export declare function setupMetricsLogger(filename: string): void;
8
+ //# sourceMappingURL=logging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../../src/fixtures/logging.ts"],"names":[],"mappings":"AAKA,wGAAwG;AACxG,wBAAgB,yBAAyB,YAExC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,QAOlD"}
@@ -0,0 +1,6 @@
1
+ import { type Logger } from '@aztec/aztec.js';
2
+ import type { DeployL1ContractsArgs, L1ContractsConfig } from '@aztec/ethereum';
3
+ import type { HDAccount, PrivateKeyAccount } from 'viem';
4
+ export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
5
+ export declare const setupL1Contracts: (l1RpcUrl: string, account: HDAccount | PrivateKeyAccount, logger: Logger, args: Pick<DeployL1ContractsArgs, 'genesisArchiveRoot' | 'genesisBlockHash' | 'initialValidators'> & L1ContractsConfig) => Promise<import("@aztec/aztec.js").DeployL1ContractsReturnType>;
6
+ //# sourceMappingURL=setup_l1_contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup_l1_contracts.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_l1_contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAqB,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIhF,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzD,OAAO,EAAE,0CAA0C,EAAE,MAAM,uCAAuC,CAAC;AAEnG,eAAO,MAAM,gBAAgB,aACjB,MAAM,WACP,SAAS,GAAG,iBAAiB,UAC9B,MAAM,QACR,KAAK,qBAAqB,EAAE,oBAAoB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC,GAChG,iBAAiB,mEAWpB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /**
3
+ * Test fixtures and utilities to set up and run a test using multiple validators
4
+ */
5
+ import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
6
+ import type { SentTx } from '@aztec/aztec.js';
7
+ import type { DateProvider } from '@aztec/foundation/timer';
8
+ import type { PXEService } from '@aztec/pxe';
9
+ import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
10
+ import { AsyncLocalStorage } from 'node:async_hooks';
11
+ export declare const PROPOSER_PRIVATE_KEYS_START_INDEX = 1;
12
+ export declare const ATTESTER_PRIVATE_KEYS_START_INDEX = 1001;
13
+ export interface NodeContext {
14
+ node: AztecNodeService;
15
+ pxeService: PXEService;
16
+ txs: SentTx[];
17
+ }
18
+ export declare function generatePrivateKeys(startIndex: number, numberOfKeys: number): `0x${string}`[];
19
+ export declare function createNodes(config: AztecNodeConfig, dateProvider: DateProvider, bootstrapNodeEnr: string, numNodes: number, bootNodePort: number, prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number): Promise<AztecNodeService[]>;
20
+ export declare function createNode(config: AztecNodeConfig, dateProvider: DateProvider, tcpPort: number, bootstrapNode: string | undefined, accountIndex: number, prefilledPublicData?: PublicDataTreeLeaf[], dataDirectory?: string, metricsPort?: number, loggerIdStorage?: AsyncLocalStorage<string>): Promise<AztecNodeService>;
21
+ export declare function createValidatorConfig(config: AztecNodeConfig, bootstrapNodeEnr?: string, port?: number, accountIndex?: number, dataDirectory?: string): Promise<AztecNodeConfig>;
22
+ //# sourceMappingURL=setup_p2p_test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup_p2p_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/setup_p2p_test.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQrD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,MAAM,EAAE,EAAE,CAO7F;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,EAC1C,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA4B7B;AAGD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,YAAY,EAAE,MAAM,EACpB,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,EAC1C,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,6BAQ5C;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,eAAe,EACvB,gBAAgB,CAAC,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,MAAM,EACb,YAAY,GAAE,MAAU,EACxB,aAAa,CAAC,EAAE,MAAM,4BA6BvB"}
@@ -0,0 +1,87 @@
1
+ import { type InitialAccountData } from '@aztec/accounts/testing';
2
+ import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
3
+ import { AnvilTestWatcher, type AztecAddress, CheatCodes, type CompleteAddress, type DeployL1ContractsReturnType, type Logger, type PXE, type Wallet } from '@aztec/aztec.js';
4
+ import { type BlobSinkServer } from '@aztec/blob-sink/server';
5
+ import { type DeployL1ContractsArgs } from '@aztec/ethereum';
6
+ import { TestDateProvider } from '@aztec/foundation/timer';
7
+ import type { ProverNode } from '@aztec/prover-node';
8
+ import { type PXEService } from '@aztec/pxe';
9
+ import type { Anvil } from '@viem/anvil';
10
+ import { type SetupOptions } from './utils.js';
11
+ export type SubsystemsContext = {
12
+ anvil: Anvil;
13
+ acvmConfig: any;
14
+ bbConfig: any;
15
+ aztecNode: AztecNodeService;
16
+ aztecNodeConfig: AztecNodeConfig;
17
+ pxe: PXEService;
18
+ deployL1ContractsValues: DeployL1ContractsReturnType;
19
+ proverNode?: ProverNode;
20
+ watcher: AnvilTestWatcher;
21
+ cheatCodes: CheatCodes;
22
+ dateProvider: TestDateProvider;
23
+ blobSink: BlobSinkServer;
24
+ initialFundedAccounts: InitialAccountData[];
25
+ directoryToCleanup?: string;
26
+ };
27
+ export declare function createSnapshotManager(testName: string, dataPath?: string, config?: Partial<SetupOptions>, deployL1ContractsArgs?: Partial<DeployL1ContractsArgs>): SnapshotManager | MockSnapshotManager;
28
+ export interface ISnapshotManager {
29
+ snapshot<T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>): Promise<void>;
30
+ setup(): Promise<SubsystemsContext>;
31
+ teardown(): Promise<void>;
32
+ }
33
+ /** Snapshot manager that does not perform snapshotting, it just applies transition and restoration functions as it receives them. */
34
+ declare class MockSnapshotManager implements ISnapshotManager {
35
+ private config;
36
+ private deployL1ContractsArgs;
37
+ private context?;
38
+ private logger;
39
+ constructor(testName: string, config?: Partial<AztecNodeConfig>, deployL1ContractsArgs?: Partial<DeployL1ContractsArgs>);
40
+ snapshot<T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>): Promise<void>;
41
+ setup(): Promise<SubsystemsContext>;
42
+ teardown(): Promise<void>;
43
+ }
44
+ /**
45
+ * Snapshot engine for local e2e tests. Read more:
46
+ * https://github.com/AztecProtocol/aztec-packages/pull/5526
47
+ */
48
+ declare class SnapshotManager implements ISnapshotManager {
49
+ private dataPath;
50
+ private config;
51
+ private deployL1ContractsArgs;
52
+ private snapshotStack;
53
+ private context?;
54
+ private livePath;
55
+ private logger;
56
+ constructor(testName: string, dataPath: string, config?: Partial<SetupOptions>, deployL1ContractsArgs?: Partial<DeployL1ContractsArgs>);
57
+ snapshot<T>(name: string, apply: (context: SubsystemsContext) => Promise<T>, restore?: (snapshotData: T, context: SubsystemsContext) => Promise<void>): Promise<void>;
58
+ /**
59
+ * Creates and returns the subsystem context based on the current snapshot stack.
60
+ * If the subsystem context already exists, just return it.
61
+ * If you want to be sure to get a clean snapshot, be sure to call teardown() before calling setup().
62
+ */
63
+ setup(): Promise<SubsystemsContext>;
64
+ /**
65
+ * Destroys the current subsystem context.
66
+ */
67
+ teardown(): Promise<void>;
68
+ }
69
+ /**
70
+ * Snapshot 'apply' helper function to add accounts.
71
+ * The 'restore' function is not provided, as it must be a closure within the test context to capture the results.
72
+ */
73
+ export declare const deployAccounts: (numberOfAccounts: number, logger: Logger, waitUntilProven?: boolean) => ({ pxe, initialFundedAccounts }: {
74
+ pxe: PXE;
75
+ initialFundedAccounts: InitialAccountData[];
76
+ }) => Promise<{
77
+ deployedAccounts: InitialAccountData[];
78
+ }>;
79
+ /**
80
+ * Registers the contract class used for test accounts and publicly deploys the instances requested.
81
+ * Use this when you need to make a public call to an account contract, such as for requesting a public authwit.
82
+ * @param sender - Wallet to send the deployment tx.
83
+ * @param accountsToDeploy - Which accounts to publicly deploy.
84
+ */
85
+ export declare function publicDeployAccounts(sender: Wallet, accountsToDeploy: (CompleteAddress | AztecAddress)[], waitUntilProven?: boolean): Promise<void>;
86
+ export {};
87
+ //# sourceMappingURL=snapshot_manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot_manager.d.ts","sourceRoot":"","sources":["../../src/fixtures/snapshot_manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAwD,MAAM,yBAAyB,CAAC;AACxH,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,KAAK,YAAY,EAGjB,UAAU,EACV,KAAK,eAAe,EAEpB,KAAK,2BAA2B,EAEhC,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,KAAK,qBAAqB,EAA6D,MAAM,iBAAiB,CAAC;AAMxH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;A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AA2B;IA4CnG;;;;OAIG;IACU,KAAK;IA0BlB;;OAEG;IACU,QAAQ;CAKtB;AAmUD;;;GAGG;AACH,eAAO,MAAM,cAAc,qBACN,MAAM,UAAU,MAAM,iEACF;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,qBAAqB,EAAE,kBAAkB,EAAE,CAAA;CAAE;;EAU/F,CAAC;AAEJ;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,CAAC,eAAe,GAAG,YAAY,CAAC,EAAE,EACpD,eAAe,UAAQ,iBAoBxB"}
@@ -0,0 +1,6 @@
1
+ import type { AztecAddress, Logger, Wallet } from '@aztec/aztec.js';
2
+ import { TokenContract } from '@aztec/noir-contracts.js/Token';
3
+ export declare function deployToken(adminWallet: Wallet, initialAdminBalance: bigint, logger: Logger): Promise<TokenContract>;
4
+ export declare function mintTokensToPrivate(token: TokenContract, minterWallet: Wallet, recipient: AztecAddress, amount: bigint): Promise<void>;
5
+ export declare function expectTokenBalance(wallet: Wallet, token: TokenContract, owner: AztecAddress, expectedBalance: bigint, logger: Logger): Promise<void>;
6
+ //# sourceMappingURL=token_utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token_utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/token_utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,0BAcjG;AAED,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,MAAM,iBAKf;AAGD,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,iBAOf"}
@@ -0,0 +1,155 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /// <reference types="node" resolution-mode="require"/>
3
+ import { type InitialAccountData } from '@aztec/accounts/testing';
4
+ import { type AztecNodeConfig } from '@aztec/aztec-node';
5
+ import { type AccountWalletWithSecretKey, AnvilTestWatcher, type AztecAddress, type AztecNode, CheatCodes, type ContractMethod, type DeployL1ContractsReturnType, type Logger, type PXE, type Wallet } from '@aztec/aztec.js';
6
+ import type { BBNativePrivateKernelProver } from '@aztec/bb-prover';
7
+ import { type BlobSinkServer } from '@aztec/blob-sink/server';
8
+ import { type DeployL1ContractsArgs, ForwarderContract } from '@aztec/ethereum';
9
+ import { startAnvil } from '@aztec/ethereum/test';
10
+ import { EthAddress } from '@aztec/foundation/eth-address';
11
+ import { Fr } from '@aztec/foundation/fields';
12
+ import { TestDateProvider } from '@aztec/foundation/timer';
13
+ import { type ProverNode } from '@aztec/prover-node';
14
+ import { type PXEService, type PXEServiceConfig } from '@aztec/pxe';
15
+ import type { SequencerClient } from '@aztec/sequencer-client';
16
+ import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
17
+ import { type TelemetryClient, type TelemetryClientConfig } from '@aztec/telemetry-client';
18
+ import { type Chain, type HDAccount, type Hex, type PrivateKeyAccount } from 'viem';
19
+ export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js';
20
+ export { startAnvil };
21
+ export declare const getPrivateKeyFromIndex: (index: number) => Buffer | null;
22
+ export declare const setupL1Contracts: (l1RpcUrls: string[], account: HDAccount | PrivateKeyAccount, logger: Logger, args?: Partial<DeployL1ContractsArgs>, chain?: Chain) => Promise<DeployL1ContractsReturnType>;
23
+ /**
24
+ * Sets up Private eXecution Environment (PXE).
25
+ * @param aztecNode - An instance of Aztec Node.
26
+ * @param opts - Partial configuration for the PXE service.
27
+ * @param firstPrivKey - The private key of the first account to be created.
28
+ * @param logger - The logger to be used.
29
+ * @param useLogSuffix - Whether to add a randomly generated suffix to the PXE debug logs.
30
+ * @param proofCreator - An optional proof creator to use
31
+ * @returns Private eXecution Environment (PXE), accounts, wallets and logger.
32
+ */
33
+ export declare function setupPXEService(aztecNode: AztecNode, opts?: Partial<PXEServiceConfig>, logger?: Logger, useLogSuffix?: boolean, proofCreator?: BBNativePrivateKernelProver): Promise<{
34
+ /**
35
+ * The PXE instance.
36
+ */
37
+ pxe: PXEService;
38
+ /**
39
+ * Logger instance named as the current test.
40
+ */
41
+ logger: Logger;
42
+ /**
43
+ * Teardown function
44
+ */
45
+ teardown: () => Promise<void>;
46
+ }>;
47
+ /** Options for the e2e tests setup */
48
+ export type SetupOptions = {
49
+ /** State load */
50
+ stateLoad?: string;
51
+ /** Whether to enable metrics collection, if undefined, metrics collection is disabled */
52
+ metricsPort?: number | undefined;
53
+ /** Previously deployed contracts on L1 */
54
+ deployL1ContractsValues?: DeployL1ContractsReturnType;
55
+ /** Whether to skip deployment of protocol contracts (auth registry, etc) */
56
+ skipProtocolContracts?: boolean;
57
+ /** Initial fee juice for default accounts */
58
+ initialAccountFeeJuice?: Fr;
59
+ /** Number of initial accounts funded with fee juice */
60
+ numberOfInitialFundedAccounts?: number;
61
+ /** Data of the initial funded accounts */
62
+ initialFundedAccounts?: InitialAccountData[];
63
+ /** Salt to use in L1 contract deployment */
64
+ salt?: number;
65
+ /** An initial set of validators */
66
+ initialValidators?: EthAddress[];
67
+ /** Anvil Start time */
68
+ l1StartTime?: number;
69
+ /** The anvil time where we should at the earliest be seeing L2 blocks */
70
+ l2StartTime?: number;
71
+ /** Whether to start a prover node */
72
+ startProverNode?: boolean;
73
+ /** Whether to fund the rewardDistributor */
74
+ fundRewardDistributor?: boolean;
75
+ /** Manual config for the telemetry client */
76
+ telemetryConfig?: Partial<TelemetryClientConfig> & {
77
+ benchmark?: boolean;
78
+ };
79
+ /** Public data that will be inserted in the tree in genesis */
80
+ genesisPublicData?: PublicDataTreeLeaf[];
81
+ } & Partial<AztecNodeConfig>;
82
+ /** Context for an end-to-end test as returned by the `setup` function */
83
+ export type EndToEndContext = {
84
+ /** The Aztec Node service or client a connected to it. */
85
+ aztecNode: AztecNode;
86
+ /** The prover node service (only set if startProverNode is true) */
87
+ proverNode: ProverNode | undefined;
88
+ /** A client to the sequencer service (undefined if connected to remote environment) */
89
+ sequencer: SequencerClient | undefined;
90
+ /** The Private eXecution Environment (PXE). */
91
+ pxe: PXE;
92
+ /** Return values from deployL1Contracts function. */
93
+ deployL1ContractsValues: DeployL1ContractsReturnType;
94
+ /** The Aztec Node configuration. */
95
+ config: AztecNodeConfig;
96
+ /** The data for the initial funded accounts. */
97
+ initialFundedAccounts: InitialAccountData[];
98
+ /** The first wallet to be used. */
99
+ wallet: AccountWalletWithSecretKey;
100
+ /** The wallets to be used. */
101
+ wallets: AccountWalletWithSecretKey[];
102
+ /** Logger instance named as the current test. */
103
+ logger: Logger;
104
+ /** The cheat codes. */
105
+ cheatCodes: CheatCodes;
106
+ /** The anvil test watcher (undefined if connected to remote environment) */
107
+ watcher: AnvilTestWatcher | undefined;
108
+ /** Allows tweaking current system time, used by the epoch cache only (undefined if connected to remote environment) */
109
+ dateProvider: TestDateProvider | undefined;
110
+ /** The blob sink (undefined if connected to remote environment) */
111
+ blobSink: BlobSinkServer | undefined;
112
+ /** Telemetry client */
113
+ telemetryClient: TelemetryClient | undefined;
114
+ /** Function to stop the started services. */
115
+ teardown: () => Promise<void>;
116
+ };
117
+ /**
118
+ * Sets up the environment for the end-to-end tests.
119
+ * @param numberOfAccounts - The number of new accounts to be created once the PXE is initiated.
120
+ * @param opts - Options to pass to the node initialization and to the setup script.
121
+ * @param pxeOpts - Options to pass to the PXE initialization.
122
+ */
123
+ export declare function setup(numberOfAccounts?: number, opts?: SetupOptions, pxeOpts?: Partial<PXEServiceConfig>, chain?: Chain): Promise<EndToEndContext>;
124
+ /**
125
+ * Registers the contract class used for test accounts and publicly deploys the instances requested.
126
+ * Use this when you need to make a public call to an account contract, such as for requesting a public authwit.
127
+ * @param sender - Wallet to send the deployment tx.
128
+ * @param accountsToDeploy - Which accounts to publicly deploy.
129
+ */
130
+ export declare function ensureAccountsPubliclyDeployed(sender: Wallet, accountsToDeploy: Wallet[]): Promise<void>;
131
+ /**
132
+ * Sets the timestamp of the next block.
133
+ * @param rpcUrl - rpc url of the blockchain instance to connect to
134
+ * @param timestamp - the timestamp for the next block
135
+ */
136
+ export declare function setNextBlockTimestamp(rpcUrl: string, timestamp: number): Promise<void>;
137
+ /**
138
+ * Returns a logger instance for the current test.
139
+ * @returns a logger instance for the current test.
140
+ */
141
+ export declare function getLogger(): Logger;
142
+ export type BalancesFn = ReturnType<typeof getBalancesFn>;
143
+ export declare function getBalancesFn(symbol: string, method: ContractMethod, logger: any): (...addresses: (AztecAddress | {
144
+ address: AztecAddress;
145
+ })[]) => Promise<bigint[]>;
146
+ export declare function expectMapping<K, V>(fn: (...k: K[]) => Promise<V[]>, inputs: K[], expectedOutputs: V[]): Promise<void>;
147
+ export declare function expectMappingDelta<K, V extends number | bigint>(initialValues: V[], fn: (...k: K[]) => Promise<V[]>, inputs: K[], expectedDiffs: V[]): Promise<void>;
148
+ /**
149
+ * Deploy the protocol contracts to a running instance.
150
+ */
151
+ export declare function setupCanonicalFeeJuice(pxe: PXE): Promise<void>;
152
+ export declare function waitForProvenChain(node: AztecNode, targetBlock?: number, timeoutSec?: number, intervalSec?: number): Promise<void>;
153
+ export declare function createAndSyncProverNode(proverNodePrivateKey: `0x${string}`, aztecNodeConfig: AztecNodeConfig, aztecNode: AztecNode, dataDirectory: string, prefilledPublicData?: PublicDataTreeLeaf[]): Promise<ProverNode>;
154
+ export declare function createForwarderContract(aztecNodeConfig: AztecNodeConfig, privateKey: `0x${string}`, rollupAddress: Hex): Promise<ForwarderContract>;
155
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 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AAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC/B,MAAM,EAAE,CAAC,EAAE,EACX,aAAa,EAAE,CAAC,EAAE,GACjB,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,GAAG,iBAgBpD;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,SAAK,EAAE,WAAW,SAAI,iBAS/G;AAED,wBAAsB,uBAAuB,CAC3C,oBAAoB,EAAE,KAAK,MAAM,EAAE,EACnC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,MAAM,EACrB,mBAAmB,GAAE,kBAAkB,EAAO,uBA+C/C;AAWD,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,aAAa,EAAE,GAAG,8BAWnB"}
@@ -0,0 +1,3 @@
1
+ import { type TelemetryClient } from '@aztec/telemetry-client';
2
+ export declare function getEndToEndTestTelemetryClient(metricsPort?: number): TelemetryClient;
3
+ //# sourceMappingURL=with_telemetry_utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with_telemetry_utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/with_telemetry_utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAGjC,wBAAgB,8BAA8B,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,CAMpF"}
@@ -0,0 +1,2 @@
1
+ export * from './shared/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { Logger } from '@aztec/aztec.js';
2
+ export interface AlertConfig {
3
+ alert: string;
4
+ expr: string;
5
+ start?: number;
6
+ end?: number;
7
+ step?: number;
8
+ for: string;
9
+ labels: Record<string, string>;
10
+ annotations: Record<string, string>;
11
+ }
12
+ export interface AlertCheckerConfig {
13
+ grafanaEndpoint: string;
14
+ grafanaCredentials: string;
15
+ }
16
+ export declare class AlertChecker {
17
+ private config;
18
+ private logger;
19
+ constructor(logger: Logger, config?: Partial<AlertCheckerConfig>);
20
+ /**
21
+ * Load the alerts config from a file path.
22
+ * @param filePath - The absolute path to the alerts file.
23
+ */
24
+ private loadAlertsConfig;
25
+ private queryGrafana;
26
+ private checkAlerts;
27
+ /**
28
+ * Run the alert check based on the alerts defined in an array.
29
+ * @param alerts - The alerts to check.
30
+ */
31
+ runAlertCheck(alerts: AlertConfig[]): Promise<void>;
32
+ /**
33
+ * Run the alert check based on the alerts defined in a yaml file.
34
+ * @param filePath - The absolute path to the alerts file.
35
+ */
36
+ runAlertCheckFromFilePath(filePath: string): Promise<void>;
37
+ }
38
+ export declare class AlertTriggeredError extends Error {
39
+ name: string;
40
+ }
41
+ //# sourceMappingURL=alert_checker.d.ts.map
@@ -0,0 +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,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAQD,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM,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"}
@@ -0,0 +1,124 @@
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';
3
+ import { TokenContract } from '@aztec/noir-contracts.js/Token';
4
+ import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
5
+ import { type Hex } from 'viem';
6
+ /**
7
+ * Deploy L1 token and portal, initialize portal, deploy a non native l2 token contract, its L2 bridge contract and attach is to the portal.
8
+ * @param wallet - the wallet instance
9
+ * @param walletClient - A viem WalletClient.
10
+ * @param publicClient - A viem PublicClient.
11
+ * @param rollupRegistryAddress - address of rollup registry to pass to initialize the token portal
12
+ * @param owner - owner of the L2 contract
13
+ * @param underlyingERC20Address - address of the underlying ERC20 contract to use (if none supplied, it deploys one)
14
+ * @returns l2 contract instance, bridge contract instance, token portal instance, token portal address and the underlying ERC20 instance
15
+ */
16
+ export declare function deployAndInitializeTokenAndBridgeContracts(wallet: Wallet, walletClient: ViemWalletClient, publicClient: ViemPublicClient, rollupRegistryAddress: EthAddress, owner: AztecAddress, underlyingERC20Address: EthAddress): Promise<{
17
+ /**
18
+ * The L2 token contract instance.
19
+ */
20
+ token: TokenContract;
21
+ /**
22
+ * The L2 bridge contract instance.
23
+ */
24
+ bridge: TokenBridgeContract;
25
+ /**
26
+ * The token portal contract address.
27
+ */
28
+ tokenPortalAddress: EthAddress;
29
+ /**
30
+ * The token portal contract instance
31
+ */
32
+ tokenPortal: any;
33
+ /**
34
+ * The underlying ERC20 contract instance.
35
+ */
36
+ underlyingERC20: any;
37
+ }>;
38
+ /**
39
+ * A Class for testing cross chain interactions, contains common interactions
40
+ * shared between cross chain tests.
41
+ */
42
+ export declare class CrossChainTestHarness {
43
+ /** Aztec node instance. */
44
+ aztecNode: AztecNode;
45
+ /** Private eXecution Environment (PXE). */
46
+ pxeService: PXE;
47
+ /** Logger. */
48
+ logger: Logger;
49
+ /** L2 Token contract. */
50
+ l2Token: TokenContract;
51
+ /** L2 Token bridge contract. */
52
+ l2Bridge: TokenBridgeContract;
53
+ /** Eth account to interact with. */
54
+ ethAccount: EthAddress;
55
+ /** Portal address. */
56
+ tokenPortalAddress: EthAddress;
57
+ /** Underlying token for portal tests. */
58
+ underlyingERC20Address: EthAddress;
59
+ /** Viem Public client instance. */
60
+ publicClient: ViemPublicClient;
61
+ /** Viem Wallet Client instance. */
62
+ walletClient: ViemWalletClient;
63
+ /** Deployment addresses for all L1 contracts */
64
+ 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>;
68
+ private readonly l1TokenManager;
69
+ private readonly l1TokenPortalManager;
70
+ readonly ownerAddress: AztecAddress;
71
+ constructor(
72
+ /** Aztec node instance. */
73
+ aztecNode: AztecNode,
74
+ /** Private eXecution Environment (PXE). */
75
+ pxeService: PXE,
76
+ /** Logger. */
77
+ logger: Logger,
78
+ /** L2 Token contract. */
79
+ l2Token: TokenContract,
80
+ /** L2 Token bridge contract. */
81
+ l2Bridge: TokenBridgeContract,
82
+ /** Eth account to interact with. */
83
+ ethAccount: EthAddress,
84
+ /** Portal address. */
85
+ tokenPortalAddress: EthAddress,
86
+ /** Underlying token for portal tests. */
87
+ underlyingERC20Address: EthAddress,
88
+ /** Viem Public client instance. */
89
+ publicClient: ViemPublicClient,
90
+ /** Viem Wallet Client instance. */
91
+ walletClient: ViemWalletClient,
92
+ /** Deployment addresses for all L1 contracts */
93
+ l1ContractAddresses: L1ContractAddresses,
94
+ /** Wallet of the owner. */
95
+ ownerWallet: AccountWallet);
96
+ mintTokensOnL1(amount: bigint): Promise<void>;
97
+ getL1BalanceOf(address: EthAddress): Promise<bigint>;
98
+ sendTokensToPortalPublic(bridgeAmount: bigint, mint?: boolean): Promise<L2AmountClaim>;
99
+ sendTokensToPortalPrivate(bridgeAmount: bigint, mint?: boolean): Promise<L2AmountClaimWithRecipient>;
100
+ mintTokensPublicOnL2(amount: bigint): Promise<void>;
101
+ mintTokensPrivateOnL2(amount: bigint): Promise<void>;
102
+ sendL2PublicTransfer(transferAmount: bigint, receiverAddress: AztecAddress): Promise<void>;
103
+ consumeMessageOnAztecAndMintPrivately(claim: Pick<L2AmountClaimWithRecipient, 'claimAmount' | 'claimSecret' | 'messageLeafIndex' | 'recipient'>): Promise<void>;
104
+ 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>>;
107
+ getL2PrivateBalanceOf(owner: AztecAddress): Promise<any>;
108
+ expectPrivateBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
109
+ getL2PublicBalanceOf(owner: AztecAddress): Promise<any>;
110
+ expectPublicBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
111
+ getL2ToL1MessageLeaf(withdrawAmount: bigint, callerOnL1?: EthAddress): Fr;
112
+ withdrawFundsFromBridgeOnL1(amount: bigint, blockNumber: number | bigint, messageIndex: bigint, siblingPath: SiblingPath<number>): Promise<void>;
113
+ transferToPrivateOnL2(shieldAmount: bigint): Promise<void>;
114
+ transferToPublicOnL2(amount: bigint, nonce?: Fr): Promise<void>;
115
+ /**
116
+ * Makes message available for consumption.
117
+ * @dev Does that by performing 2 unrelated transactions on L2 to progress the rollup by 2 blocks and then waits for
118
+ * message to be processed by archiver. We need to progress by 2 because there is a 1 block lag between when
119
+ * the message is sent to Inbox and when the subtree containing the message is included in the block and then when
120
+ * it's included it becomes available for consumption in the next block because the l1 to l2 message tree.
121
+ */
122
+ makeMessageConsumable(msgHash: Fr | Hex): Promise<void>;
123
+ }
124
+ //# sourceMappingURL=cross_chain_test_harness.d.ts.map
@@ -0,0 +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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4BAA4B,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,GAAE,EAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IASvG,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,GAAE,EAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAStG,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;IAK1E,oBAAoB,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,GAAE,UAA4B,GAAG,EAAE;IAS1F,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;IAK1C,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,KAAU;IAK1D;;;;;;OAMG;IACG,qBAAqB,CAAC,OAAO,EAAE,EAAE,GAAG,GAAG;CAQ9C"}
@@ -0,0 +1,80 @@
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';
3
+ import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
4
+ export interface IGasBridgingTestHarness {
5
+ getL1FeeJuiceBalance(address: EthAddress): Promise<bigint>;
6
+ prepareTokensOnL1(bridgeAmount: bigint, owner: AztecAddress): Promise<L2AmountClaim>;
7
+ bridgeFromL1ToL2(bridgeAmount: bigint, owner: AztecAddress): Promise<void>;
8
+ feeJuice: FeeJuiceContract;
9
+ l1FeeJuiceAddress: EthAddress;
10
+ }
11
+ export interface FeeJuicePortalTestingHarnessFactoryConfig {
12
+ aztecNode: AztecNode;
13
+ pxeService: PXE;
14
+ publicClient: ViemPublicClient;
15
+ walletClient: ViemWalletClient;
16
+ wallet: Wallet;
17
+ logger: Logger;
18
+ mockL1?: boolean;
19
+ }
20
+ export declare class FeeJuicePortalTestingHarnessFactory {
21
+ private config;
22
+ private constructor();
23
+ private createReal;
24
+ static create(config: FeeJuicePortalTestingHarnessFactoryConfig): Promise<GasBridgingTestHarness>;
25
+ }
26
+ /**
27
+ * A Class for testing cross chain interactions, contains common interactions
28
+ * shared between cross chain tests.
29
+ */
30
+ export declare class GasBridgingTestHarness implements IGasBridgingTestHarness {
31
+ /** Aztec node */
32
+ aztecNode: AztecNode;
33
+ /** Private eXecution Environment (PXE). */
34
+ pxeService: PXE;
35
+ /** Logger. */
36
+ logger: Logger;
37
+ /** L2 Token/Bridge contract. */
38
+ feeJuice: FeeJuiceContract;
39
+ /** Eth account to interact with. */
40
+ ethAccount: EthAddress;
41
+ /** Portal address. */
42
+ feeJuicePortalAddress: EthAddress;
43
+ /** Underlying token for portal tests. */
44
+ l1FeeJuiceAddress: EthAddress;
45
+ /** Viem Public client instance. */
46
+ publicClient: ViemPublicClient;
47
+ /** Viem Wallet Client instance. */
48
+ walletClient: ViemWalletClient;
49
+ readonly l1TokenManager: L1TokenManager;
50
+ readonly feeJuicePortalManager: L1FeeJuicePortalManager;
51
+ constructor(
52
+ /** Aztec node */
53
+ aztecNode: AztecNode,
54
+ /** Private eXecution Environment (PXE). */
55
+ pxeService: PXE,
56
+ /** Logger. */
57
+ logger: Logger,
58
+ /** L2 Token/Bridge contract. */
59
+ feeJuice: FeeJuiceContract,
60
+ /** Eth account to interact with. */
61
+ ethAccount: EthAddress,
62
+ /** Portal address. */
63
+ feeJuicePortalAddress: EthAddress,
64
+ /** Underlying token for portal tests. */
65
+ 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>;
71
+ getL1FeeJuiceBalance(address: EthAddress): Promise<bigint>;
72
+ sendTokensToPortalPublic(bridgeAmount: bigint, l2Address: AztecAddress, mint?: boolean): Promise<L2AmountClaim>;
73
+ consumeMessageOnAztecAndClaimPrivately(owner: AztecAddress, claim: L2AmountClaim): Promise<void>;
74
+ getL2PublicBalanceOf(owner: AztecAddress): Promise<any>;
75
+ expectPublicBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
76
+ prepareTokensOnL1(bridgeAmount: bigint, owner: AztecAddress): Promise<L2AmountClaim>;
77
+ bridgeFromL1ToL2(bridgeAmount: bigint, owner: AztecAddress): Promise<void>;
78
+ private advanceL2Block;
79
+ }
80
+ //# sourceMappingURL=gas_portal_test_harness.d.ts.map
@@ -0,0 +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,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGrE,MAAM,WAAW,uBAAuB;IACtC,oBAAoB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,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