@aztec/end-to-end 0.77.0-testnet-ignition.27 → 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.
- package/dest/bench/utils.d.ts +70 -0
- package/dest/bench/utils.d.ts.map +1 -0
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +46 -0
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -0
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +47 -0
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +1 -0
- package/dest/e2e_deploy_contract/deploy_test.d.ts +28 -0
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +1 -0
- package/dest/e2e_epochs/epochs_test.d.ts +51 -0
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -0
- package/dest/e2e_fees/fees_test.d.ts +73 -0
- package/dest/e2e_fees/fees_test.d.ts.map +1 -0
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +26 -0
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +1 -0
- package/dest/e2e_p2p/p2p_network.d.ts +61 -0
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -0
- package/dest/e2e_p2p/shared.d.ts +10 -0
- package/dest/e2e_p2p/shared.d.ts.map +1 -0
- package/dest/e2e_prover/e2e_prover_test.d.ts +56 -0
- package/dest/e2e_prover/e2e_prover_test.d.ts.map +1 -0
- package/dest/e2e_token_contract/token_contract_test.d.ts +29 -0
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +1 -0
- package/dest/fixtures/fixtures.d.ts +17 -0
- package/dest/fixtures/fixtures.d.ts.map +1 -0
- package/dest/fixtures/get_acvm_config.d.ts +8 -0
- package/dest/fixtures/get_acvm_config.d.ts.map +1 -0
- package/dest/fixtures/get_bb_config.d.ts +6 -0
- package/dest/fixtures/get_bb_config.d.ts.map +1 -0
- package/dest/fixtures/index.d.ts +6 -0
- package/dest/fixtures/index.d.ts.map +1 -0
- package/dest/fixtures/l1_to_l2_messaging.d.ts +13 -0
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +1 -0
- package/dest/fixtures/logging.d.ts +8 -0
- package/dest/fixtures/logging.d.ts.map +1 -0
- package/dest/fixtures/setup_l1_contracts.d.ts +6 -0
- package/dest/fixtures/setup_l1_contracts.d.ts.map +1 -0
- package/dest/fixtures/setup_p2p_test.d.ts +22 -0
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -0
- package/dest/fixtures/snapshot_manager.d.ts +87 -0
- package/dest/fixtures/snapshot_manager.d.ts.map +1 -0
- package/dest/fixtures/token_utils.d.ts +6 -0
- package/dest/fixtures/token_utils.d.ts.map +1 -0
- package/dest/fixtures/utils.d.ts +155 -0
- package/dest/fixtures/utils.d.ts.map +1 -0
- package/dest/fixtures/with_telemetry_utils.d.ts +3 -0
- package/dest/fixtures/with_telemetry_utils.d.ts.map +1 -0
- package/dest/index.d.ts +2 -0
- package/dest/index.d.ts.map +1 -0
- package/dest/quality_of_service/alert_checker.d.ts +41 -0
- package/dest/quality_of_service/alert_checker.d.ts.map +1 -0
- package/dest/shared/cross_chain_test_harness.d.ts +124 -0
- package/dest/shared/cross_chain_test_harness.d.ts.map +1 -0
- package/dest/shared/gas_portal_test_harness.d.ts +80 -0
- package/dest/shared/gas_portal_test_harness.d.ts.map +1 -0
- package/dest/shared/index.d.ts +2 -0
- package/dest/shared/index.d.ts.map +1 -0
- package/dest/shared/jest_setup.d.ts +2 -0
- package/dest/shared/jest_setup.d.ts.map +1 -0
- package/dest/shared/submit-transactions.d.ts +4 -0
- package/dest/shared/submit-transactions.d.ts.map +1 -0
- package/dest/shared/uniswap_l1_l2.d.ts +25 -0
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -0
- package/dest/simulators/index.d.ts +3 -0
- package/dest/simulators/index.d.ts.map +1 -0
- package/dest/simulators/lending_simulator.d.ts +69 -0
- package/dest/simulators/lending_simulator.d.ts.map +1 -0
- package/dest/simulators/token_simulator.d.ts +29 -0
- package/dest/simulators/token_simulator.d.ts.map +1 -0
- package/dest/spartan/setup_test_wallets.d.ts +20 -0
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -0
- package/dest/spartan/utils.d.ts +415 -0
- package/dest/spartan/utils.d.ts.map +1 -0
- package/package.json +31 -31
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest_setup.d.ts","sourceRoot":"","sources":["../../src/shared/jest_setup.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Logger, type SentTx, type Wallet } from '@aztec/aztec.js';
|
|
2
|
+
import type { PXEService } from '@aztec/pxe';
|
|
3
|
+
export declare const submitTxsTo: (pxe: PXEService, numTxs: number, wallet: Wallet, logger: Logger) => Promise<SentTx[]>;
|
|
4
|
+
//# sourceMappingURL=submit-transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-transactions.d.ts","sourceRoot":"","sources":["../../src/shared/submit-transactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,MAAM,EAAY,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,eAAO,MAAM,WAAW,QACjB,UAAU,UACP,MAAM,UACN,MAAM,UACN,MAAM,KACb,QAAQ,MAAM,EAAE,CAqBlB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type AccountWallet, type AztecNode, type CheatCodes, type Logger, type PXE } from '@aztec/aztec.js';
|
|
2
|
+
import { type DeployL1ContractsReturnType, type ViemPublicClient, type ViemWalletClient } from '@aztec/ethereum';
|
|
3
|
+
/** Objects to be returned by the uniswap setup function */
|
|
4
|
+
export type UniswapSetupContext = {
|
|
5
|
+
/** Aztec Node instance */
|
|
6
|
+
aztecNode: AztecNode;
|
|
7
|
+
/** The Private eXecution Environment (PXE). */
|
|
8
|
+
pxe: PXE;
|
|
9
|
+
/** Logger instance named as the current test. */
|
|
10
|
+
logger: Logger;
|
|
11
|
+
/** Viem Public client instance. */
|
|
12
|
+
publicClient: ViemPublicClient;
|
|
13
|
+
/** Viem Wallet Client instance. */
|
|
14
|
+
walletClient: ViemWalletClient;
|
|
15
|
+
/** The owner wallet. */
|
|
16
|
+
ownerWallet: AccountWallet;
|
|
17
|
+
/** The sponsor wallet. */
|
|
18
|
+
sponsorWallet: AccountWallet;
|
|
19
|
+
/** */
|
|
20
|
+
deployL1ContractsValues: DeployL1ContractsReturnType;
|
|
21
|
+
/** Cheat codes instance. */
|
|
22
|
+
cheatCodes: CheatCodes;
|
|
23
|
+
};
|
|
24
|
+
export declare const uniswapL1L2TestSuite: (setup: () => Promise<UniswapSetupContext>, cleanup: () => Promise<void>, expectedForkBlockNumber?: number) => void;
|
|
25
|
+
//# sourceMappingURL=uniswap_l1_l2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,UAAU,EAGf,KAAK,MAAM,EACX,KAAK,GAAG,EAGT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAGtB,MAAM,iBAAiB,CAAC;AAqBzB,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,+CAA+C;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,mCAAmC;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,wBAAwB;IACxB,WAAW,EAAE,aAAa,CAAC;IAC3B,0BAA0B;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,oBAAoB,UACxB,MAAM,QAAQ,mBAAmB,CAAC,WAChC,MAAM,QAAQ,IAAI,CAAC,2CA89B7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulators/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { AztecAddress, type CheatCodes, Fr } from '@aztec/aztec.js';
|
|
2
|
+
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
3
|
+
import type { RollupAbi } from '@aztec/l1-artifacts';
|
|
4
|
+
import type { LendingContract } from '@aztec/noir-contracts.js/Lending';
|
|
5
|
+
import type { Account, GetContractReturnType, HttpTransport, WalletClient } from 'viem';
|
|
6
|
+
import type * as chains from 'viem/chains';
|
|
7
|
+
import type { TokenSimulator } from './token_simulator.js';
|
|
8
|
+
/**
|
|
9
|
+
* Contains utilities to compute the "key" for private holdings in the public state.
|
|
10
|
+
*/
|
|
11
|
+
export declare class LendingAccount {
|
|
12
|
+
/** The address that owns this account */
|
|
13
|
+
readonly address: AztecAddress;
|
|
14
|
+
/** The secret used for private deposits */
|
|
15
|
+
readonly secret: Fr;
|
|
16
|
+
constructor(address: AztecAddress, secret: Fr);
|
|
17
|
+
/**
|
|
18
|
+
* Computes the key for the private holdings of this account.
|
|
19
|
+
* @returns Key in public space
|
|
20
|
+
*/
|
|
21
|
+
key(): Promise<Fr>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Helper class that emulates the logic of the lending contract. Used to have a "twin" to check values against.
|
|
25
|
+
*/
|
|
26
|
+
export declare class LendingSimulator {
|
|
27
|
+
private cc;
|
|
28
|
+
private account;
|
|
29
|
+
private rate;
|
|
30
|
+
private ethereumSlotDuration;
|
|
31
|
+
/** the rollup contract */
|
|
32
|
+
rollup: GetContractReturnType<typeof RollupAbi, WalletClient<HttpTransport, chains.Chain, Account>>;
|
|
33
|
+
/** the lending contract */
|
|
34
|
+
lendingContract: LendingContract;
|
|
35
|
+
/** the collateral asset used in the lending contract */
|
|
36
|
+
collateralAsset: TokenSimulator;
|
|
37
|
+
/** the stable-coin borrowed in the lending contract */
|
|
38
|
+
stableCoin: TokenSimulator;
|
|
39
|
+
/** interest rate accumulator */
|
|
40
|
+
accumulator: bigint;
|
|
41
|
+
/** the timestamp of the simulator*/
|
|
42
|
+
time: number;
|
|
43
|
+
private collateral;
|
|
44
|
+
private staticDebt;
|
|
45
|
+
private borrowed;
|
|
46
|
+
private mintedOutside;
|
|
47
|
+
constructor(cc: CheatCodes, account: LendingAccount, rate: bigint, ethereumSlotDuration: number,
|
|
48
|
+
/** the rollup contract */
|
|
49
|
+
rollup: GetContractReturnType<typeof RollupAbi, WalletClient<HttpTransport, chains.Chain, Account>>,
|
|
50
|
+
/** the lending contract */
|
|
51
|
+
lendingContract: LendingContract,
|
|
52
|
+
/** the collateral asset used in the lending contract */
|
|
53
|
+
collateralAsset: TokenSimulator,
|
|
54
|
+
/** the stable-coin borrowed in the lending contract */
|
|
55
|
+
stableCoin: TokenSimulator);
|
|
56
|
+
prepare(): Promise<void>;
|
|
57
|
+
progressSlots(diff: number, dateProvider?: TestDateProvider): Promise<void>;
|
|
58
|
+
depositPrivate(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
59
|
+
depositPublic(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
60
|
+
private deposit;
|
|
61
|
+
withdraw(owner: Fr, recipient: AztecAddress, amount: bigint): void;
|
|
62
|
+
borrow(owner: Fr, recipient: AztecAddress, amount: bigint): void;
|
|
63
|
+
repayPrivate(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
64
|
+
repayPublic(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
65
|
+
private repay;
|
|
66
|
+
mintStableCoinOutsideLoan(recipient: AztecAddress, amount: bigint, priv?: boolean): void;
|
|
67
|
+
check(): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=lending_simulator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lending_simulator.d.ts","sourceRoot":"","sources":["../../src/simulators/lending_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACxF,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;GAEG;AACH,qBAAa,cAAc;IACzB,yCAAyC;IACzC,SAAgB,OAAO,EAAE,YAAY,CAAC;IACtC,2CAA2C;IAC3C,SAAgB,MAAM,EAAE,EAAE,CAAC;gBAEf,OAAO,EAAE,YAAY,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AE,EAAE,MAAM,EAAE,MAAM;IAKhE,OAAO,CAAC,OAAO;IAKf,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAM3D,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IASzD,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAK/D,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAK9D,OAAO,CAAC,KAAK;IAQb,yBAAyB,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,UAAQ;IASzE,KAAK;CA0BZ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type AztecAddress, type Logger, type Wallet } from '@aztec/aztec.js';
|
|
2
|
+
import type { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
3
|
+
export declare class TokenSimulator {
|
|
4
|
+
protected token: TokenContract;
|
|
5
|
+
protected defaultWallet: Wallet;
|
|
6
|
+
protected logger: Logger;
|
|
7
|
+
protected accounts: AztecAddress[];
|
|
8
|
+
private balancesPrivate;
|
|
9
|
+
private balancePublic;
|
|
10
|
+
totalSupply: bigint;
|
|
11
|
+
private lookupProvider;
|
|
12
|
+
constructor(token: TokenContract, defaultWallet: Wallet, logger: Logger, accounts: AztecAddress[]);
|
|
13
|
+
addAccount(account: AztecAddress): void;
|
|
14
|
+
setLookupProvider(account: AztecAddress, wallet: Wallet): void;
|
|
15
|
+
mintPrivate(to: AztecAddress, amount: bigint): void;
|
|
16
|
+
mintPublic(to: AztecAddress, amount: bigint): void;
|
|
17
|
+
transferPublic(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
18
|
+
transferPrivate(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
19
|
+
transferToPrivate(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
20
|
+
transferToPublic(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
21
|
+
burnPrivate(from: AztecAddress, amount: bigint): void;
|
|
22
|
+
burnPublic(from: AztecAddress, amount: bigint): void;
|
|
23
|
+
balanceOfPublic(address: AztecAddress): bigint;
|
|
24
|
+
balanceOfPrivate(address: AztecAddress): bigint;
|
|
25
|
+
checkPublic(): Promise<void>;
|
|
26
|
+
checkPrivate(): Promise<void>;
|
|
27
|
+
check(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=token_simulator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token_simulator.d.ts","sourceRoot":"","sources":["../../src/simulators/token_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAa,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAIpE,qBAAa,cAAc;IAQvB,SAAS,CAAC,KAAK,EAAE,aAAa;IAC9B,SAAS,CAAC,aAAa,EAAE,MAAM;IAC/B,SAAS,CAAC,MAAM,EAAE,MAAM;IACxB,SAAS,CAAC,QAAQ,EAAE,YAAY,EAAE;IAVpC,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,aAAa,CAAkC;IAChD,WAAW,EAAE,MAAM,CAAM;IAEhC,OAAO,CAAC,cAAc,CAAkC;gBAG5C,KAAK,EAAE,aAAa,EACpB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,EAAE;IAG7B,UAAU,CAAC,OAAO,EAAE,YAAY;IAIhC,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAIvD,WAAW,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAK5C,UAAU,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAM3C,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IASnE,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IASpE,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAQtE,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAQrE,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAQ9C,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAQ7C,eAAe,CAAC,OAAO,EAAE,YAAY;IAIrC,gBAAgB,CAAC,OAAO,EAAE,YAAY;IAIvC,WAAW;IAkBX,YAAY;IAmCL,KAAK;CAInB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AccountWalletWithSecretKey, type AztecAddress, type PXE } from '@aztec/aztec.js';
|
|
2
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
3
|
+
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
4
|
+
export interface TestWallets {
|
|
5
|
+
pxe: PXE;
|
|
6
|
+
wallets: AccountWalletWithSecretKey[];
|
|
7
|
+
tokenAdminWallet: TokenContract;
|
|
8
|
+
tokenName: string;
|
|
9
|
+
recipientWallet: AccountWalletWithSecretKey;
|
|
10
|
+
tokenAddress: AztecAddress;
|
|
11
|
+
}
|
|
12
|
+
export declare function setupTestWalletsWithTokens(pxeUrl: string, mintAmount: bigint, logger: Logger): Promise<TestWallets>;
|
|
13
|
+
export declare function deployTestWalletWithTokens(pxeUrl: string, nodeUrl: string, l1RpcUrl: string, mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number, initialFeeJuice?: bigint): Promise<TestWallets>;
|
|
14
|
+
export declare function performTransfers({ testWallets, rounds, transferAmount, logger, }: {
|
|
15
|
+
testWallets: TestWallets;
|
|
16
|
+
rounds: number;
|
|
17
|
+
transferAmount: bigint;
|
|
18
|
+
logger: Logger;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=setup_test_wallets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EAKjB,KAAK,GAAG,EAIT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,gBAAgB,EAAE,aAAa,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,0BAA0B,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC,CAYtB;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,qBAAqB,SAAI,EACzB,eAAe,SAAa,GAC3B,OAAO,CAAC,WAAW,CAAC,CAsCtB;AA2DD,wBAAsB,gBAAgB,CAAC,EACrC,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,GACP,EAAE;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,iBAkBA"}
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { RollupCheatCodes } from '@aztec/aztec.js/ethereum';
|
|
3
|
+
import type { Logger } from '@aztec/foundation/log';
|
|
4
|
+
import type { SequencerConfig } from '@aztec/sequencer-client';
|
|
5
|
+
import { ChildProcess } from 'child_process';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { type AlertConfig } from '../quality_of_service/alert_checker.js';
|
|
8
|
+
declare const k8sLocalConfigSchema: z.ZodObject<{
|
|
9
|
+
ETHEREUM_SLOT_DURATION: z.ZodNumber;
|
|
10
|
+
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
11
|
+
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
12
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
13
|
+
INSTANCE_NAME: z.ZodString;
|
|
14
|
+
NAMESPACE: z.ZodString;
|
|
15
|
+
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
CONTAINER_SEQUENCER_PORT: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
CONTAINER_PROVER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
CONTAINER_PXE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
CONTAINER_ETHEREUM_PORT: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
CONTAINER_METRICS_PORT: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
GRAFANA_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
22
|
+
METRICS_API_PATH: z.ZodDefault<z.ZodString>;
|
|
23
|
+
SPARTAN_DIR: z.ZodString;
|
|
24
|
+
ETHEREUM_HOSTS: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
25
|
+
L1_ACCOUNT_MNEMONIC: z.ZodDefault<z.ZodString>;
|
|
26
|
+
SEPOLIA_RUN: z.ZodDefault<z.ZodString>;
|
|
27
|
+
K8S: z.ZodLiteral<"local">;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
30
|
+
AZTEC_SLOT_DURATION: number;
|
|
31
|
+
AZTEC_EPOCH_DURATION: number;
|
|
32
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
33
|
+
INSTANCE_NAME: string;
|
|
34
|
+
NAMESPACE: string;
|
|
35
|
+
CONTAINER_NODE_PORT: number;
|
|
36
|
+
CONTAINER_SEQUENCER_PORT: number;
|
|
37
|
+
CONTAINER_PROVER_NODE_PORT: number;
|
|
38
|
+
CONTAINER_PXE_PORT: number;
|
|
39
|
+
CONTAINER_ETHEREUM_PORT: number;
|
|
40
|
+
CONTAINER_METRICS_PORT: number;
|
|
41
|
+
METRICS_API_PATH: string;
|
|
42
|
+
SPARTAN_DIR: string;
|
|
43
|
+
L1_ACCOUNT_MNEMONIC: string;
|
|
44
|
+
SEPOLIA_RUN: string;
|
|
45
|
+
K8S: "local";
|
|
46
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
47
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
50
|
+
AZTEC_SLOT_DURATION: number;
|
|
51
|
+
AZTEC_EPOCH_DURATION: number;
|
|
52
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
53
|
+
INSTANCE_NAME: string;
|
|
54
|
+
NAMESPACE: string;
|
|
55
|
+
SPARTAN_DIR: string;
|
|
56
|
+
K8S: "local";
|
|
57
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
58
|
+
CONTAINER_NODE_PORT?: number | undefined;
|
|
59
|
+
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
60
|
+
CONTAINER_PROVER_NODE_PORT?: number | undefined;
|
|
61
|
+
CONTAINER_PXE_PORT?: number | undefined;
|
|
62
|
+
CONTAINER_ETHEREUM_PORT?: number | undefined;
|
|
63
|
+
CONTAINER_METRICS_PORT?: number | undefined;
|
|
64
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
65
|
+
METRICS_API_PATH?: string | undefined;
|
|
66
|
+
L1_ACCOUNT_MNEMONIC?: string | undefined;
|
|
67
|
+
SEPOLIA_RUN?: string | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
declare const k8sGCloudConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
70
|
+
ETHEREUM_SLOT_DURATION: z.ZodNumber;
|
|
71
|
+
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
72
|
+
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
73
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
74
|
+
INSTANCE_NAME: z.ZodString;
|
|
75
|
+
NAMESPACE: z.ZodString;
|
|
76
|
+
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
77
|
+
CONTAINER_SEQUENCER_PORT: z.ZodDefault<z.ZodNumber>;
|
|
78
|
+
CONTAINER_PROVER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
79
|
+
CONTAINER_PXE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
80
|
+
CONTAINER_ETHEREUM_PORT: z.ZodDefault<z.ZodNumber>;
|
|
81
|
+
CONTAINER_METRICS_PORT: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
GRAFANA_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
83
|
+
METRICS_API_PATH: z.ZodDefault<z.ZodString>;
|
|
84
|
+
SPARTAN_DIR: z.ZodString;
|
|
85
|
+
ETHEREUM_HOSTS: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
86
|
+
L1_ACCOUNT_MNEMONIC: z.ZodDefault<z.ZodString>;
|
|
87
|
+
SEPOLIA_RUN: z.ZodDefault<z.ZodString>;
|
|
88
|
+
K8S: z.ZodLiteral<"local">;
|
|
89
|
+
}, {
|
|
90
|
+
K8S: z.ZodLiteral<"gcloud">;
|
|
91
|
+
CLUSTER_NAME: z.ZodString;
|
|
92
|
+
REGION: z.ZodString;
|
|
93
|
+
}>, "strip", z.ZodTypeAny, {
|
|
94
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
95
|
+
AZTEC_SLOT_DURATION: number;
|
|
96
|
+
AZTEC_EPOCH_DURATION: number;
|
|
97
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
98
|
+
INSTANCE_NAME: string;
|
|
99
|
+
NAMESPACE: string;
|
|
100
|
+
CONTAINER_NODE_PORT: number;
|
|
101
|
+
CONTAINER_SEQUENCER_PORT: number;
|
|
102
|
+
CONTAINER_PROVER_NODE_PORT: number;
|
|
103
|
+
CONTAINER_PXE_PORT: number;
|
|
104
|
+
CONTAINER_ETHEREUM_PORT: number;
|
|
105
|
+
CONTAINER_METRICS_PORT: number;
|
|
106
|
+
METRICS_API_PATH: string;
|
|
107
|
+
SPARTAN_DIR: string;
|
|
108
|
+
L1_ACCOUNT_MNEMONIC: string;
|
|
109
|
+
SEPOLIA_RUN: string;
|
|
110
|
+
K8S: "gcloud";
|
|
111
|
+
CLUSTER_NAME: string;
|
|
112
|
+
REGION: string;
|
|
113
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
114
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
117
|
+
AZTEC_SLOT_DURATION: number;
|
|
118
|
+
AZTEC_EPOCH_DURATION: number;
|
|
119
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
120
|
+
INSTANCE_NAME: string;
|
|
121
|
+
NAMESPACE: string;
|
|
122
|
+
SPARTAN_DIR: string;
|
|
123
|
+
K8S: "gcloud";
|
|
124
|
+
CLUSTER_NAME: string;
|
|
125
|
+
REGION: string;
|
|
126
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
127
|
+
CONTAINER_NODE_PORT?: number | undefined;
|
|
128
|
+
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
129
|
+
CONTAINER_PROVER_NODE_PORT?: number | undefined;
|
|
130
|
+
CONTAINER_PXE_PORT?: number | undefined;
|
|
131
|
+
CONTAINER_ETHEREUM_PORT?: number | undefined;
|
|
132
|
+
CONTAINER_METRICS_PORT?: number | undefined;
|
|
133
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
134
|
+
METRICS_API_PATH?: string | undefined;
|
|
135
|
+
L1_ACCOUNT_MNEMONIC?: string | undefined;
|
|
136
|
+
SEPOLIA_RUN?: string | undefined;
|
|
137
|
+
}>;
|
|
138
|
+
declare const directConfigSchema: z.ZodObject<{
|
|
139
|
+
PXE_URL: z.ZodString;
|
|
140
|
+
NODE_URL: z.ZodString;
|
|
141
|
+
ETHEREUM_HOSTS: z.ZodEffects<z.ZodString, string, string>;
|
|
142
|
+
K8S: z.ZodLiteral<"false">;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
PXE_URL: string;
|
|
145
|
+
ETHEREUM_HOSTS: string;
|
|
146
|
+
K8S: "false";
|
|
147
|
+
NODE_URL: string;
|
|
148
|
+
}, {
|
|
149
|
+
PXE_URL: string;
|
|
150
|
+
ETHEREUM_HOSTS: string;
|
|
151
|
+
K8S: "false";
|
|
152
|
+
NODE_URL: string;
|
|
153
|
+
}>;
|
|
154
|
+
declare const envSchema: z.ZodDiscriminatedUnion<"K8S", [z.ZodObject<{
|
|
155
|
+
ETHEREUM_SLOT_DURATION: z.ZodNumber;
|
|
156
|
+
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
157
|
+
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
158
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
159
|
+
INSTANCE_NAME: z.ZodString;
|
|
160
|
+
NAMESPACE: z.ZodString;
|
|
161
|
+
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
162
|
+
CONTAINER_SEQUENCER_PORT: z.ZodDefault<z.ZodNumber>;
|
|
163
|
+
CONTAINER_PROVER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
164
|
+
CONTAINER_PXE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
165
|
+
CONTAINER_ETHEREUM_PORT: z.ZodDefault<z.ZodNumber>;
|
|
166
|
+
CONTAINER_METRICS_PORT: z.ZodDefault<z.ZodNumber>;
|
|
167
|
+
GRAFANA_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
168
|
+
METRICS_API_PATH: z.ZodDefault<z.ZodString>;
|
|
169
|
+
SPARTAN_DIR: z.ZodString;
|
|
170
|
+
ETHEREUM_HOSTS: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
171
|
+
L1_ACCOUNT_MNEMONIC: z.ZodDefault<z.ZodString>;
|
|
172
|
+
SEPOLIA_RUN: z.ZodDefault<z.ZodString>;
|
|
173
|
+
K8S: z.ZodLiteral<"local">;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
176
|
+
AZTEC_SLOT_DURATION: number;
|
|
177
|
+
AZTEC_EPOCH_DURATION: number;
|
|
178
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
179
|
+
INSTANCE_NAME: string;
|
|
180
|
+
NAMESPACE: string;
|
|
181
|
+
CONTAINER_NODE_PORT: number;
|
|
182
|
+
CONTAINER_SEQUENCER_PORT: number;
|
|
183
|
+
CONTAINER_PROVER_NODE_PORT: number;
|
|
184
|
+
CONTAINER_PXE_PORT: number;
|
|
185
|
+
CONTAINER_ETHEREUM_PORT: number;
|
|
186
|
+
CONTAINER_METRICS_PORT: number;
|
|
187
|
+
METRICS_API_PATH: string;
|
|
188
|
+
SPARTAN_DIR: string;
|
|
189
|
+
L1_ACCOUNT_MNEMONIC: string;
|
|
190
|
+
SEPOLIA_RUN: string;
|
|
191
|
+
K8S: "local";
|
|
192
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
193
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
194
|
+
}, {
|
|
195
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
196
|
+
AZTEC_SLOT_DURATION: number;
|
|
197
|
+
AZTEC_EPOCH_DURATION: number;
|
|
198
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
199
|
+
INSTANCE_NAME: string;
|
|
200
|
+
NAMESPACE: string;
|
|
201
|
+
SPARTAN_DIR: string;
|
|
202
|
+
K8S: "local";
|
|
203
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
204
|
+
CONTAINER_NODE_PORT?: number | undefined;
|
|
205
|
+
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
206
|
+
CONTAINER_PROVER_NODE_PORT?: number | undefined;
|
|
207
|
+
CONTAINER_PXE_PORT?: number | undefined;
|
|
208
|
+
CONTAINER_ETHEREUM_PORT?: number | undefined;
|
|
209
|
+
CONTAINER_METRICS_PORT?: number | undefined;
|
|
210
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
211
|
+
METRICS_API_PATH?: string | undefined;
|
|
212
|
+
L1_ACCOUNT_MNEMONIC?: string | undefined;
|
|
213
|
+
SEPOLIA_RUN?: string | undefined;
|
|
214
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
215
|
+
ETHEREUM_SLOT_DURATION: z.ZodNumber;
|
|
216
|
+
AZTEC_SLOT_DURATION: z.ZodNumber;
|
|
217
|
+
AZTEC_EPOCH_DURATION: z.ZodNumber;
|
|
218
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: z.ZodNumber;
|
|
219
|
+
INSTANCE_NAME: z.ZodString;
|
|
220
|
+
NAMESPACE: z.ZodString;
|
|
221
|
+
CONTAINER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
222
|
+
CONTAINER_SEQUENCER_PORT: z.ZodDefault<z.ZodNumber>;
|
|
223
|
+
CONTAINER_PROVER_NODE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
224
|
+
CONTAINER_PXE_PORT: z.ZodDefault<z.ZodNumber>;
|
|
225
|
+
CONTAINER_ETHEREUM_PORT: z.ZodDefault<z.ZodNumber>;
|
|
226
|
+
CONTAINER_METRICS_PORT: z.ZodDefault<z.ZodNumber>;
|
|
227
|
+
GRAFANA_PASSWORD: z.ZodOptional<z.ZodString>;
|
|
228
|
+
METRICS_API_PATH: z.ZodDefault<z.ZodString>;
|
|
229
|
+
SPARTAN_DIR: z.ZodString;
|
|
230
|
+
ETHEREUM_HOSTS: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
231
|
+
L1_ACCOUNT_MNEMONIC: z.ZodDefault<z.ZodString>;
|
|
232
|
+
SEPOLIA_RUN: z.ZodDefault<z.ZodString>;
|
|
233
|
+
K8S: z.ZodLiteral<"local">;
|
|
234
|
+
}, {
|
|
235
|
+
K8S: z.ZodLiteral<"gcloud">;
|
|
236
|
+
CLUSTER_NAME: z.ZodString;
|
|
237
|
+
REGION: z.ZodString;
|
|
238
|
+
}>, "strip", z.ZodTypeAny, {
|
|
239
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
240
|
+
AZTEC_SLOT_DURATION: number;
|
|
241
|
+
AZTEC_EPOCH_DURATION: number;
|
|
242
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
243
|
+
INSTANCE_NAME: string;
|
|
244
|
+
NAMESPACE: string;
|
|
245
|
+
CONTAINER_NODE_PORT: number;
|
|
246
|
+
CONTAINER_SEQUENCER_PORT: number;
|
|
247
|
+
CONTAINER_PROVER_NODE_PORT: number;
|
|
248
|
+
CONTAINER_PXE_PORT: number;
|
|
249
|
+
CONTAINER_ETHEREUM_PORT: number;
|
|
250
|
+
CONTAINER_METRICS_PORT: number;
|
|
251
|
+
METRICS_API_PATH: string;
|
|
252
|
+
SPARTAN_DIR: string;
|
|
253
|
+
L1_ACCOUNT_MNEMONIC: string;
|
|
254
|
+
SEPOLIA_RUN: string;
|
|
255
|
+
K8S: "gcloud";
|
|
256
|
+
CLUSTER_NAME: string;
|
|
257
|
+
REGION: string;
|
|
258
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
259
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
ETHEREUM_SLOT_DURATION: number;
|
|
262
|
+
AZTEC_SLOT_DURATION: number;
|
|
263
|
+
AZTEC_EPOCH_DURATION: number;
|
|
264
|
+
AZTEC_PROOF_SUBMISSION_WINDOW: number;
|
|
265
|
+
INSTANCE_NAME: string;
|
|
266
|
+
NAMESPACE: string;
|
|
267
|
+
SPARTAN_DIR: string;
|
|
268
|
+
K8S: "gcloud";
|
|
269
|
+
CLUSTER_NAME: string;
|
|
270
|
+
REGION: string;
|
|
271
|
+
ETHEREUM_HOSTS?: string | undefined;
|
|
272
|
+
CONTAINER_NODE_PORT?: number | undefined;
|
|
273
|
+
CONTAINER_SEQUENCER_PORT?: number | undefined;
|
|
274
|
+
CONTAINER_PROVER_NODE_PORT?: number | undefined;
|
|
275
|
+
CONTAINER_PXE_PORT?: number | undefined;
|
|
276
|
+
CONTAINER_ETHEREUM_PORT?: number | undefined;
|
|
277
|
+
CONTAINER_METRICS_PORT?: number | undefined;
|
|
278
|
+
GRAFANA_PASSWORD?: string | undefined;
|
|
279
|
+
METRICS_API_PATH?: string | undefined;
|
|
280
|
+
L1_ACCOUNT_MNEMONIC?: string | undefined;
|
|
281
|
+
SEPOLIA_RUN?: string | undefined;
|
|
282
|
+
}>, z.ZodObject<{
|
|
283
|
+
PXE_URL: z.ZodString;
|
|
284
|
+
NODE_URL: z.ZodString;
|
|
285
|
+
ETHEREUM_HOSTS: z.ZodEffects<z.ZodString, string, string>;
|
|
286
|
+
K8S: z.ZodLiteral<"false">;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
PXE_URL: string;
|
|
289
|
+
ETHEREUM_HOSTS: string;
|
|
290
|
+
K8S: "false";
|
|
291
|
+
NODE_URL: string;
|
|
292
|
+
}, {
|
|
293
|
+
PXE_URL: string;
|
|
294
|
+
ETHEREUM_HOSTS: string;
|
|
295
|
+
K8S: "false";
|
|
296
|
+
NODE_URL: string;
|
|
297
|
+
}>]>;
|
|
298
|
+
export type K8sLocalConfig = z.infer<typeof k8sLocalConfigSchema>;
|
|
299
|
+
export type K8sGCloudConfig = z.infer<typeof k8sGCloudConfigSchema>;
|
|
300
|
+
export type DirectConfig = z.infer<typeof directConfigSchema>;
|
|
301
|
+
export type EnvConfig = z.infer<typeof envSchema>;
|
|
302
|
+
export declare function isK8sConfig(config: EnvConfig): config is K8sLocalConfig | K8sGCloudConfig;
|
|
303
|
+
export declare function isGCloudConfig(config: EnvConfig): config is K8sGCloudConfig;
|
|
304
|
+
export declare function setupEnvironment(env: unknown): EnvConfig;
|
|
305
|
+
export declare function startPortForward({ resource, namespace, containerPort, hostPort, }: {
|
|
306
|
+
resource: string;
|
|
307
|
+
namespace: string;
|
|
308
|
+
containerPort: number;
|
|
309
|
+
hostPort?: number;
|
|
310
|
+
}): Promise<{
|
|
311
|
+
process: ChildProcess;
|
|
312
|
+
port: number;
|
|
313
|
+
}>;
|
|
314
|
+
export declare function deleteResourceByName({ resource, namespace, name, force, }: {
|
|
315
|
+
resource: string;
|
|
316
|
+
namespace: string;
|
|
317
|
+
name: string;
|
|
318
|
+
force?: boolean;
|
|
319
|
+
}): Promise<string>;
|
|
320
|
+
export declare function deleteResourceByLabel({ resource, namespace, label, }: {
|
|
321
|
+
resource: string;
|
|
322
|
+
namespace: string;
|
|
323
|
+
label: string;
|
|
324
|
+
}): Promise<string>;
|
|
325
|
+
export declare function waitForResourceByLabel({ resource, label, namespace, condition, timeout, }: {
|
|
326
|
+
resource: string;
|
|
327
|
+
label: string;
|
|
328
|
+
namespace: string;
|
|
329
|
+
condition?: string;
|
|
330
|
+
timeout?: string;
|
|
331
|
+
}): Promise<string>;
|
|
332
|
+
export declare function getChartDir(spartanDir: string, chartName: string): string;
|
|
333
|
+
/**
|
|
334
|
+
* Installs a Helm chart with the given parameters.
|
|
335
|
+
* @param instanceName - The name of the Helm chart instance.
|
|
336
|
+
* @param targetNamespace - The namespace with the resources to be affected by the Helm chart.
|
|
337
|
+
* @param valuesFile - The values file to use for the Helm chart.
|
|
338
|
+
* @param chaosMeshNamespace - The namespace to install the Helm chart in.
|
|
339
|
+
* @param timeout - The timeout for the Helm command.
|
|
340
|
+
* @param clean - Whether to clean up the Helm chart before installing it.
|
|
341
|
+
* @returns The stdout of the Helm command.
|
|
342
|
+
* @throws If the Helm command fails.
|
|
343
|
+
*
|
|
344
|
+
* Example usage:
|
|
345
|
+
* ```typescript
|
|
346
|
+
* const stdout = await installChaosMeshChart({ instanceName: 'force-reorg', targetNamespace: 'smoke', valuesFile: 'prover-failure.yaml'});
|
|
347
|
+
* console.log(stdout);
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
export declare function installChaosMeshChart({ instanceName, targetNamespace, valuesFile, helmChartDir, chaosMeshNamespace, timeout, clean, values, logger, }: {
|
|
351
|
+
instanceName: string;
|
|
352
|
+
targetNamespace: string;
|
|
353
|
+
valuesFile: string;
|
|
354
|
+
helmChartDir: string;
|
|
355
|
+
chaosMeshNamespace?: string;
|
|
356
|
+
timeout?: string;
|
|
357
|
+
clean?: boolean;
|
|
358
|
+
values?: Record<string, string | number>;
|
|
359
|
+
logger: Logger;
|
|
360
|
+
}): Promise<string>;
|
|
361
|
+
export declare function applyProverFailure({ namespace, spartanDir, durationSeconds, logger, }: {
|
|
362
|
+
namespace: string;
|
|
363
|
+
spartanDir: string;
|
|
364
|
+
durationSeconds: number;
|
|
365
|
+
logger: Logger;
|
|
366
|
+
}): Promise<string>;
|
|
367
|
+
export declare function applyProverKill({ namespace, spartanDir, logger, }: {
|
|
368
|
+
namespace: string;
|
|
369
|
+
spartanDir: string;
|
|
370
|
+
logger: Logger;
|
|
371
|
+
}): Promise<string>;
|
|
372
|
+
export declare function applyProverBrokerKill({ namespace, spartanDir, logger, }: {
|
|
373
|
+
namespace: string;
|
|
374
|
+
spartanDir: string;
|
|
375
|
+
logger: Logger;
|
|
376
|
+
}): Promise<string>;
|
|
377
|
+
export declare function applyBootNodeFailure({ namespace, spartanDir, durationSeconds, logger, }: {
|
|
378
|
+
namespace: string;
|
|
379
|
+
spartanDir: string;
|
|
380
|
+
durationSeconds: number;
|
|
381
|
+
logger: Logger;
|
|
382
|
+
}): Promise<string>;
|
|
383
|
+
export declare function applyValidatorKill({ namespace, spartanDir, logger, }: {
|
|
384
|
+
namespace: string;
|
|
385
|
+
spartanDir: string;
|
|
386
|
+
logger: Logger;
|
|
387
|
+
}): Promise<string>;
|
|
388
|
+
export declare function applyNetworkShaping({ valuesFile, namespace, spartanDir, logger, }: {
|
|
389
|
+
valuesFile: string;
|
|
390
|
+
namespace: string;
|
|
391
|
+
spartanDir: string;
|
|
392
|
+
logger: Logger;
|
|
393
|
+
}): Promise<string>;
|
|
394
|
+
export declare function awaitL2BlockNumber(rollupCheatCodes: RollupCheatCodes, blockNumber: bigint, timeoutSeconds: number, logger: Logger): Promise<void>;
|
|
395
|
+
export declare function restartBot(namespace: string, logger: Logger): Promise<void>;
|
|
396
|
+
export declare function enableValidatorDynamicBootNode(instanceName: string, namespace: string, spartanDir: string, logger: Logger): Promise<void>;
|
|
397
|
+
export declare function runAlertCheck(config: EnvConfig, alerts: AlertConfig[], logger: Logger): Promise<void>;
|
|
398
|
+
export declare function updateSequencerConfig(url: string, config: Partial<SequencerConfig>): Promise<void>;
|
|
399
|
+
export declare function getSequencers(namespace: string): Promise<string[]>;
|
|
400
|
+
export declare function updateK8sSequencersConfig(args: {
|
|
401
|
+
containerPort: number;
|
|
402
|
+
namespace: string;
|
|
403
|
+
config: Partial<SequencerConfig>;
|
|
404
|
+
}): Promise<void>;
|
|
405
|
+
export declare function updateSequencersConfig(env: EnvConfig, config: Partial<SequencerConfig>): Promise<void>;
|
|
406
|
+
/**
|
|
407
|
+
* Rolls the Aztec pods in the given namespace.
|
|
408
|
+
* @param namespace - The namespace to roll the Aztec pods in.
|
|
409
|
+
* @dev - IMPORTANT: This function DOES NOT delete the underlying PVCs.
|
|
410
|
+
* This means that the pods will be restarted with the same persistent storage.
|
|
411
|
+
* This is useful for testing, but you should be aware of the implications.
|
|
412
|
+
*/
|
|
413
|
+
export declare function rollAztecPods(namespace: string): Promise<void>;
|
|
414
|
+
export {};
|
|
415
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/spartan/utils.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAyB,MAAM,eAAe,CAAC;AAGpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAmBxF,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBxB,CAAC;AAEH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;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