@aztec/cli 2.1.0-rc.9 → 3.0.0-devnet.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -427
- package/dest/cmds/aztec_node/block_number.d.ts +3 -0
- package/dest/cmds/aztec_node/block_number.d.ts.map +1 -0
- package/dest/cmds/aztec_node/block_number.js +10 -0
- package/dest/cmds/aztec_node/get_block.d.ts +3 -0
- package/dest/cmds/aztec_node/get_block.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_block.js +9 -0
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts +3 -0
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_current_base_fee.js +7 -0
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +5 -0
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.js +12 -0
- package/dest/cmds/aztec_node/get_logs.d.ts +6 -0
- package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -0
- package/dest/cmds/{pxe → aztec_node}/get_logs.js +4 -4
- package/dest/cmds/aztec_node/get_node_info.d.ts +3 -0
- package/dest/cmds/aztec_node/get_node_info.d.ts.map +1 -0
- package/dest/cmds/{pxe → aztec_node}/get_node_info.js +3 -8
- package/dest/cmds/aztec_node/index.d.ts.map +1 -0
- package/dest/cmds/aztec_node/index.js +28 -0
- package/dest/cmds/infrastructure/index.d.ts +2 -2
- package/dest/cmds/infrastructure/index.d.ts.map +1 -1
- package/dest/cmds/infrastructure/index.js +7 -8
- package/dest/cmds/infrastructure/sequencers.d.ts +2 -3
- package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
- package/dest/cmds/infrastructure/sequencers.js +4 -3
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.js +10 -25
- package/dest/cmds/l1/advance_epoch.d.ts +1 -1
- package/dest/cmds/l1/advance_epoch.d.ts.map +1 -1
- package/dest/cmds/l1/advance_epoch.js +6 -5
- package/dest/cmds/l1/assume_proven_through.d.ts +1 -1
- package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
- package/dest/cmds/l1/assume_proven_through.js +7 -6
- package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
- package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
- package/dest/cmds/l1/bridge_erc20.js +1 -1
- package/dest/cmds/l1/deploy_l1_contracts.d.ts +1 -1
- package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_l1_contracts.js +3 -3
- package/dest/cmds/l1/deploy_new_rollup.d.ts +1 -1
- package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_new_rollup.js +4 -4
- package/dest/cmds/l1/get_l1_addresses.d.ts +1 -1
- package/dest/cmds/l1/get_l1_addresses.d.ts.map +1 -1
- package/dest/cmds/l1/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +7 -7
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +4 -3
- package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
- package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
- package/dest/cmds/misc/generate_secret_key.d.ts.map +1 -1
- package/dest/cmds/misc/generate_secret_key.js +1 -1
- package/dest/config/cached_fetch.d.ts +1 -1
- package/dest/config/cached_fetch.d.ts.map +1 -1
- package/dest/config/cached_fetch.js +1 -1
- package/dest/config/chain_l2_config.d.ts +7 -6
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +103 -40
- package/dest/config/enrich_env.js +1 -1
- package/dest/utils/aztec.d.ts +2 -8
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +6 -31
- package/dest/utils/commands.d.ts +6 -7
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/commands.js +5 -6
- package/dest/utils/inspect.d.ts +3 -10
- package/dest/utils/inspect.d.ts.map +1 -1
- package/dest/utils/inspect.js +13 -95
- package/dest/utils/setup_contracts.d.ts +1 -3
- package/dest/utils/setup_contracts.d.ts.map +1 -1
- package/dest/utils/setup_contracts.js +2 -22
- package/package.json +26 -25
- package/src/cmds/aztec_node/block_number.ts +9 -0
- package/src/cmds/aztec_node/get_block.ts +10 -0
- package/src/cmds/aztec_node/get_current_base_fee.ts +9 -0
- package/src/cmds/aztec_node/get_l1_to_l2_message_witness.ts +27 -0
- package/src/cmds/{pxe → aztec_node}/get_logs.ts +8 -7
- package/src/cmds/{pxe → aztec_node}/get_node_info.ts +5 -16
- package/src/cmds/aztec_node/index.ts +87 -0
- package/src/cmds/infrastructure/index.ts +7 -17
- package/src/cmds/infrastructure/sequencers.ts +6 -6
- package/src/cmds/infrastructure/setup_l2_contract.ts +13 -30
- package/src/cmds/l1/advance_epoch.ts +6 -5
- package/src/cmds/l1/assume_proven_through.ts +7 -6
- package/src/cmds/l1/bridge_erc20.ts +3 -1
- package/src/cmds/l1/deploy_l1_contracts.ts +4 -3
- package/src/cmds/l1/deploy_new_rollup.ts +4 -2
- package/src/cmds/l1/get_l1_addresses.ts +1 -1
- package/src/cmds/l1/index.ts +7 -5
- package/src/cmds/l1/update_l1_validators.ts +4 -3
- package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
- package/src/cmds/misc/generate_secret_key.ts +1 -1
- package/src/config/cached_fetch.ts +1 -1
- package/src/config/chain_l2_config.ts +133 -47
- package/src/config/enrich_env.ts +1 -1
- package/src/utils/aztec.ts +6 -40
- package/src/utils/commands.ts +8 -10
- package/src/utils/inspect.ts +18 -111
- package/src/utils/setup_contracts.ts +4 -43
- package/dest/cmds/pxe/add_contract.d.ts +0 -5
- package/dest/cmds/pxe/add_contract.d.ts.map +0 -1
- package/dest/cmds/pxe/add_contract.js +0 -29
- package/dest/cmds/pxe/block_number.d.ts +0 -3
- package/dest/cmds/pxe/block_number.d.ts.map +0 -1
- package/dest/cmds/pxe/block_number.js +0 -10
- package/dest/cmds/pxe/get_account.d.ts +0 -4
- package/dest/cmds/pxe/get_account.d.ts.map +0 -1
- package/dest/cmds/pxe/get_account.js +0 -10
- package/dest/cmds/pxe/get_accounts.d.ts +0 -3
- package/dest/cmds/pxe/get_accounts.d.ts.map +0 -1
- package/dest/cmds/pxe/get_accounts.js +0 -25
- package/dest/cmds/pxe/get_block.d.ts +0 -3
- package/dest/cmds/pxe/get_block.d.ts.map +0 -1
- package/dest/cmds/pxe/get_block.js +0 -9
- package/dest/cmds/pxe/get_contract_data.d.ts +0 -4
- package/dest/cmds/pxe/get_contract_data.d.ts.map +0 -1
- package/dest/cmds/pxe/get_contract_data.js +0 -31
- package/dest/cmds/pxe/get_current_base_fee.d.ts +0 -3
- package/dest/cmds/pxe/get_current_base_fee.d.ts.map +0 -1
- package/dest/cmds/pxe/get_current_base_fee.js +0 -7
- package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts +0 -4
- package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts.map +0 -1
- package/dest/cmds/pxe/get_l1_to_l2_message_witness.js +0 -11
- package/dest/cmds/pxe/get_logs.d.ts +0 -4
- package/dest/cmds/pxe/get_logs.d.ts.map +0 -1
- package/dest/cmds/pxe/get_node_info.d.ts +0 -3
- package/dest/cmds/pxe/get_node_info.d.ts.map +0 -1
- package/dest/cmds/pxe/get_pxe_info.d.ts +0 -3
- package/dest/cmds/pxe/get_pxe_info.d.ts.map +0 -1
- package/dest/cmds/pxe/get_pxe_info.js +0 -11
- package/dest/cmds/pxe/index.d.ts.map +0 -1
- package/dest/cmds/pxe/index.js +0 -55
- package/src/cmds/pxe/add_contract.ts +0 -41
- package/src/cmds/pxe/block_number.ts +0 -9
- package/src/cmds/pxe/get_account.ts +0 -16
- package/src/cmds/pxe/get_accounts.ts +0 -35
- package/src/cmds/pxe/get_block.ts +0 -10
- package/src/cmds/pxe/get_contract_data.ts +0 -51
- package/src/cmds/pxe/get_current_base_fee.ts +0 -9
- package/src/cmds/pxe/get_l1_to_l2_message_witness.ts +0 -25
- package/src/cmds/pxe/get_pxe_info.ts +0 -13
- package/src/cmds/pxe/index.ts +0 -170
- /package/dest/cmds/{pxe → aztec_node}/index.d.ts +0 -0
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type { LogFn
|
|
1
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
export declare function sequencers(opts: {
|
|
3
3
|
command: 'list' | 'add' | 'remove' | 'who-next' | 'flush';
|
|
4
4
|
who?: string;
|
|
5
5
|
mnemonic?: string;
|
|
6
6
|
bn254SecretKey?: bigint;
|
|
7
|
-
|
|
7
|
+
nodeUrl: string;
|
|
8
8
|
l1RpcUrls: string[];
|
|
9
9
|
chainId: number;
|
|
10
10
|
blockNumber?: number;
|
|
11
11
|
log: LogFn;
|
|
12
|
-
debugLogger: Logger;
|
|
13
12
|
}): Promise<void>;
|
|
14
13
|
//# sourceMappingURL=sequencers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencers.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/sequencers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sequencers.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/sequencers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAMnD,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,KAAK,CAAC;CACZ,iBAoGA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Fr
|
|
1
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
2
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
3
|
import { GSEContract, RollupContract, createEthereumChain, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
3
4
|
import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
4
5
|
import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem';
|
|
5
6
|
import { mnemonicToAccount } from 'viem/accounts';
|
|
6
7
|
export async function sequencers(opts) {
|
|
7
|
-
const { command, who: maybeWho, mnemonic, bn254SecretKey,
|
|
8
|
-
const client =
|
|
8
|
+
const { command, who: maybeWho, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
9
|
+
const client = createAztecNodeClient(nodeUrl);
|
|
9
10
|
const { l1ContractAddresses } = await client.getNodeInfo();
|
|
10
11
|
const chain = createEthereumChain(l1RpcUrls, chainId);
|
|
11
12
|
const publicClient = createPublicClient({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
export declare function setupL2Contracts(
|
|
2
|
+
export declare function setupL2Contracts(nodeUrl: string, testAccounts: boolean, json: boolean, log: LogFn): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=setup_l2_contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_l2_contract.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/setup_l2_contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup_l2_contract.d.ts","sourceRoot":"","sources":["../../../src/cmds/infrastructure/setup_l2_contract.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAInD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,iBAwBvG"}
|
|
@@ -1,43 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
3
3
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
4
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
5
|
-
import {
|
|
6
|
-
export async function setupL2Contracts(
|
|
5
|
+
import { TestWallet, deployFundedSchnorrAccounts } from '@aztec/test-wallet/server';
|
|
6
|
+
export async function setupL2Contracts(nodeUrl, testAccounts, json, log) {
|
|
7
7
|
const waitOpts = {
|
|
8
8
|
timeout: 180,
|
|
9
9
|
interval: 1
|
|
10
10
|
};
|
|
11
|
-
const waitForProvenOptions = !skipProofWait ? {
|
|
12
|
-
provenTimeout: 600
|
|
13
|
-
} : undefined;
|
|
14
11
|
log('setupL2Contracts: Wait options' + jsonStringify(waitOpts));
|
|
15
|
-
if (waitForProvenOptions) {
|
|
16
|
-
log('setupL2Contracts: Wait for proven options' + jsonStringify(waitForProvenOptions));
|
|
17
|
-
}
|
|
18
12
|
log('setupL2Contracts: Creating PXE client...');
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
1,
|
|
23
|
-
1,
|
|
24
|
-
1
|
|
25
|
-
], false));
|
|
26
|
-
let deployedAccounts = [];
|
|
13
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
14
|
+
const wallet = await TestWallet.create(node);
|
|
15
|
+
let deployedAccountManagers = [];
|
|
27
16
|
if (testAccounts) {
|
|
28
17
|
log('setupL2Contracts: Deploying test accounts...');
|
|
29
|
-
|
|
30
|
-
await deployFundedSchnorrAccounts(
|
|
31
|
-
}
|
|
32
|
-
if (sponsoredFPC) {
|
|
33
|
-
log('setupL2Contracts: Setting up sponsored FPC...');
|
|
34
|
-
await setupSponsoredFPC(pxe, log, waitOpts, waitForProvenOptions);
|
|
18
|
+
const initialAccountsData = await getInitialTestAccountsData();
|
|
19
|
+
deployedAccountManagers = await deployFundedSchnorrAccounts(wallet, node, initialAccountsData, waitOpts);
|
|
35
20
|
}
|
|
36
21
|
if (json) {
|
|
37
22
|
const toPrint = {
|
|
38
23
|
...ProtocolContractAddress
|
|
39
24
|
};
|
|
40
|
-
|
|
25
|
+
deployedAccountManagers.forEach((a, i)=>{
|
|
41
26
|
toPrint[`testAccount${i}`] = a.address;
|
|
42
27
|
});
|
|
43
28
|
log(JSON.stringify(toPrint, null, 2));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
export declare function advanceEpoch(l1RpcUrls: string[],
|
|
2
|
+
export declare function advanceEpoch(l1RpcUrls: string[], nodeUrl: string, log: LogFn): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=advance_epoch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance_epoch.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/advance_epoch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"advance_epoch.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/advance_epoch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,iBAQlF"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
|
+
export async function advanceEpoch(l1RpcUrls, nodeUrl, log) {
|
|
5
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
6
|
+
const rollupAddress = await aztecNode.getNodeInfo().then((i)=>i.l1ContractAddresses.rollupAddress);
|
|
6
7
|
const cheat = RollupCheatCodes.create(l1RpcUrls, {
|
|
7
8
|
rollupAddress
|
|
8
|
-
});
|
|
9
|
+
}, new DateProvider());
|
|
9
10
|
await cheat.advanceToNextEpoch();
|
|
10
11
|
log(`Warped time to advance to next epoch`);
|
|
11
12
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
export declare function assumeProvenThrough(blockNumberOrLatest: number | undefined, l1RpcUrls: string[],
|
|
2
|
+
export declare function assumeProvenThrough(blockNumberOrLatest: number | undefined, l1RpcUrls: string[], nodeUrl: string, log: LogFn): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=assume_proven_through.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assume_proven_through.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/assume_proven_through.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"assume_proven_through.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/assume_proven_through.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,wBAAsB,mBAAmB,CACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,KAAK,iBAUX"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
|
+
export async function assumeProvenThrough(blockNumberOrLatest, l1RpcUrls, nodeUrl, log) {
|
|
5
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
6
|
+
const rollupAddress = await aztecNode.getNodeInfo().then((i)=>i.l1ContractAddresses.rollupAddress);
|
|
7
|
+
const blockNumber = blockNumberOrLatest ?? await aztecNode.getBlockNumber();
|
|
7
8
|
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, {
|
|
8
9
|
rollupAddress
|
|
9
|
-
});
|
|
10
|
+
}, new DateProvider());
|
|
10
11
|
await rollupCheatCodes.markAsProven(blockNumber);
|
|
11
12
|
log(`Assumed proven through block ${blockNumber}`);
|
|
12
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
3
3
|
export declare function bridgeERC20(amount: bigint, recipient: AztecAddress, l1RpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, tokenAddress: EthAddress, handlerAddress: EthAddress | undefined, portalAddress: EthAddress, privateTransfer: boolean, mint: boolean, json: boolean, log: LogFn, debugLogger: Logger): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=bridge_erc20.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge_erc20.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/bridge_erc20.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bridge_erc20.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/bridge_erc20.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAI3D,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,YAAY,EACvB,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,UAAU,EACxB,cAAc,EAAE,UAAU,GAAG,SAAS,EACtC,aAAa,EAAE,UAAU,EACzB,eAAe,EAAE,OAAO,EACxB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAgCpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L1ToL2TokenPortalManager } from '@aztec/aztec.js';
|
|
1
|
+
import { L1ToL2TokenPortalManager } from '@aztec/aztec.js/ethereum';
|
|
2
2
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
3
3
|
import { prettyPrintJSON } from '../../utils/commands.js';
|
|
4
4
|
export async function bridgeERC20(amount, recipient, l1RpcUrls, chainId, privateKey, mnemonic, tokenAddress, handlerAddress, portalAddress, privateTransfer, mint, json, log, debugLogger) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
3
3
|
export declare function deployL1Contracts(rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, testAccounts: boolean, sponsoredFPC: boolean, acceleratedTestDeployments: boolean, json: boolean, createVerificationJson: string | false, initialValidators: EthAddress[], realVerifier: boolean, existingToken: EthAddress | undefined, log: LogFn, debugLogger: Logger): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=deploy_l1_contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAM3D,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,EACrB,0BAA0B,EAAE,OAAO,EACnC,IAAI,EAAE,OAAO,EACb,sBAAsB,EAAE,MAAM,GAAG,KAAK,EACtC,iBAAiB,EAAE,UAAU,EAAE,EAC/B,YAAY,EAAE,OAAO,EACrB,aAAa,EAAE,UAAU,GAAG,SAAS,EACrC,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBA8DpB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Fr } from '@aztec/aztec.js';
|
|
1
|
+
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
3
|
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
4
4
|
import { SecretValue } from '@aztec/foundation/config';
|
|
5
5
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
@@ -7,7 +7,7 @@ import { deployAztecContracts } from '../../utils/aztec.js';
|
|
|
7
7
|
import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
|
|
8
8
|
export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, acceleratedTestDeployments, json, createVerificationJson, initialValidators, realVerifier, existingToken, log, debugLogger) {
|
|
9
9
|
const config = getL1ContractsConfigEnvVars();
|
|
10
|
-
const initialAccounts = testAccounts ? await
|
|
10
|
+
const initialAccounts = testAccounts ? await getInitialTestAccountsData() : [];
|
|
11
11
|
const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
|
|
12
12
|
const initialFundedAccounts = initialAccounts.map((a)=>a.address).concat(sponsoredFPCAddress);
|
|
13
13
|
const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Operator } from '@aztec/ethereum';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
4
|
-
export declare function deployNewRollup(registryAddress: EthAddress, rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, testAccounts: boolean, sponsoredFPC: boolean, json: boolean, initialValidators: Operator[], realVerifier: boolean, log: LogFn, debugLogger: Logger): Promise<void>;
|
|
4
|
+
export declare function deployNewRollup(registryAddress: EthAddress, rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, testAccounts: boolean, sponsoredFPC: boolean, json: boolean, initialValidators: Operator[], realVerifier: boolean, createVerificationJson: string | false, log: LogFn, debugLogger: Logger): Promise<void>;
|
|
5
5
|
//# sourceMappingURL=deploy_new_rollup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_new_rollup.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_new_rollup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAA+B,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAM3D,wBAAsB,eAAe,CACnC,eAAe,EAAE,UAAU,EAC3B,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,EACrB,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,QAAQ,EAAE,EAC7B,YAAY,EAAE,OAAO,EACrB,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deploy_new_rollup.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_new_rollup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAA+B,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAM3D,wBAAsB,eAAe,CACnC,eAAe,EAAE,UAAU,EAC3B,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,EACrB,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,QAAQ,EAAE,EAC7B,YAAY,EAAE,OAAO,EACrB,sBAAsB,EAAE,MAAM,GAAG,KAAK,EACtC,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBA+CpB"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
2
|
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
3
3
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
4
4
|
import { deployNewRollupContracts } from '../../utils/aztec.js';
|
|
5
5
|
import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
|
|
6
|
-
export async function deployNewRollup(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, json, initialValidators, realVerifier, log, debugLogger) {
|
|
6
|
+
export async function deployNewRollup(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, json, initialValidators, realVerifier, createVerificationJson, log, debugLogger) {
|
|
7
7
|
const config = getL1ContractsConfigEnvVars();
|
|
8
|
-
const initialAccounts = testAccounts ? await
|
|
8
|
+
const initialAccounts = testAccounts ? await getInitialTestAccountsData() : [];
|
|
9
9
|
const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
|
|
10
10
|
const initialFundedAccounts = initialAccounts.map((a)=>a.address).concat(sponsoredFPCAddress);
|
|
11
11
|
const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
|
|
12
|
-
const { rollup, slashFactoryAddress } = await deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, fundingNeeded, config, realVerifier, debugLogger);
|
|
12
|
+
const { rollup, slashFactoryAddress } = await deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, fundingNeeded, config, realVerifier, createVerificationJson, debugLogger);
|
|
13
13
|
if (json) {
|
|
14
14
|
log(JSON.stringify({
|
|
15
15
|
rollupAddress: rollup.address,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EthAddress } from '@aztec/aztec.js';
|
|
1
|
+
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import type { LogFn } from '@aztec/foundation/log';
|
|
3
3
|
export declare function getL1Addresses(registryAddress: EthAddress, rollupVersion: number | bigint | 'canonical', rpcUrls: string[], chainId: number, json: boolean, log: LogFn): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=get_l1_addresses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_l1_addresses.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/get_l1_addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get_l1_addresses.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/get_l1_addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAInD,wBAAsB,cAAc,CAClC,eAAe,EAAE,UAAU,EAC3B,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,EAC5C,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,KAAK,iBAiBX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAcjD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAa3D,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAcjD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAa3D,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAof/E"}
|
package/dest/cmds/l1/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { Option } from 'commander';
|
|
3
3
|
import { getL1RollupAddressFromEnv } from '../../config/get_l1_config.js';
|
|
4
|
-
import { ETHEREUM_HOSTS, MNEMONIC, PRIVATE_KEY, l1ChainIdOption, parseAztecAddress, parseBigint, parseEthereumAddress
|
|
4
|
+
import { ETHEREUM_HOSTS, MNEMONIC, PRIVATE_KEY, l1ChainIdOption, nodeOption, parseAztecAddress, parseBigint, parseEthereumAddress } from '../../utils/commands.js';
|
|
5
5
|
export { addL1Validator } from './update_l1_validators.js';
|
|
6
6
|
const l1RpcUrlsOption = new Option('--l1-rpc-urls <string>', 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)').env('ETHEREUM_HOSTS').default([
|
|
7
7
|
ETHEREUM_HOSTS
|
|
@@ -13,10 +13,10 @@ export function injectCommands(program, log, debugLogger) {
|
|
|
13
13
|
const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
|
|
14
14
|
await deployL1Contracts(options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.sponsoredFpc, options.acceleratedTestDeployments, options.json, options.createVerificationJson, initialValidators, options.realVerifier, options.existingToken, log, debugLogger);
|
|
15
15
|
});
|
|
16
|
-
program.command('deploy-new-rollup').description('Deploys a new rollup contract and adds it to the registry (if you are the owner).').requiredOption('-r, --registry-address <string>', 'The address of the registry contract', parseEthereumAddress).addOption(l1RpcUrlsOption).option('-pk, --private-key <string>', 'The private key to use for deployment', PRIVATE_KEY).option('--validators <string>', 'Comma separated list of validators').option('-m, --mnemonic <string>', 'The mnemonic to use in deployment', MNEMONIC ?? 'test test test test test test test test test test test junk').option('-i, --mnemonic-index <number>', 'The index of the mnemonic to use in deployment', (arg)=>parseInt(arg), 0).addOption(l1ChainIdOption).option('--salt <number>', 'The optional salt to use in deployment', (arg)=>parseInt(arg)).option('--json', 'Output the contract addresses in JSON format').option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts').option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract').option('--real-verifier', 'Deploy the real verifier', false).action(async (options)=>{
|
|
16
|
+
program.command('deploy-new-rollup').description('Deploys a new rollup contract and adds it to the registry (if you are the owner).').requiredOption('-r, --registry-address <string>', 'The address of the registry contract', parseEthereumAddress).addOption(l1RpcUrlsOption).option('-pk, --private-key <string>', 'The private key to use for deployment', PRIVATE_KEY).option('--validators <string>', 'Comma separated list of validators').option('-m, --mnemonic <string>', 'The mnemonic to use in deployment', MNEMONIC ?? 'test test test test test test test test test test test junk').option('-i, --mnemonic-index <number>', 'The index of the mnemonic to use in deployment', (arg)=>parseInt(arg), 0).addOption(l1ChainIdOption).option('--salt <number>', 'The optional salt to use in deployment', (arg)=>parseInt(arg)).option('--json', 'Output the contract addresses in JSON format').option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts').option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract').option('--real-verifier', 'Deploy the real verifier', false).option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false).action(async (options)=>{
|
|
17
17
|
const { deployNewRollup } = await import('./deploy_new_rollup.js');
|
|
18
18
|
const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
|
|
19
|
-
await deployNewRollup(options.registryAddress, options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.sponsoredFpc, options.json, initialValidators, options.realVerifier, log, debugLogger);
|
|
19
|
+
await deployNewRollup(options.registryAddress, options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.sponsoredFpc, options.json, initialValidators, options.realVerifier, options.createVerificationJson, log, debugLogger);
|
|
20
20
|
});
|
|
21
21
|
program.command('deposit-governance-tokens').description('Deposits governance tokens to the governance contract.').requiredOption('-r, --registry-address <string>', 'The address of the registry contract', parseEthereumAddress).requiredOption('--recipient <string>', 'The recipient of the tokens', parseEthereumAddress).requiredOption('-a, --amount <string>', 'The amount of tokens to deposit', parseBigint).option('--mint', 'Mint the tokens on L1', false).addOption(l1RpcUrlsOption).addOption(l1ChainIdOption).option('-p, --private-key <string>', 'The private key to use to deposit', PRIVATE_KEY).option('-m, --mnemonic <string>', 'The mnemonic to use to deposit', 'test test test test test test test test test test test junk').option('-i, --mnemonic-index <number>', 'The index of the mnemonic to use to deposit', (arg)=>parseInt(arg), 0).action(async (options)=>{
|
|
22
22
|
const { depositGovernanceTokens } = await import('./governance_utils.js');
|
|
@@ -186,13 +186,13 @@ export function injectCommands(program, log, debugLogger) {
|
|
|
186
186
|
});
|
|
187
187
|
program.command('set-proven-through', {
|
|
188
188
|
hidden: true
|
|
189
|
-
}).description('Instructs the L1 rollup contract to assume all blocks until the given number are automatically proven.').argument('[blockNumber]', 'The target block number, defaults to the latest pending block number.', parseBigint).addOption(l1RpcUrlsOption).addOption(
|
|
189
|
+
}).description('Instructs the L1 rollup contract to assume all blocks until the given number are automatically proven.').argument('[blockNumber]', 'The target block number, defaults to the latest pending block number.', parseBigint).addOption(l1RpcUrlsOption).addOption(nodeOption).action(async (blockNumber, options)=>{
|
|
190
190
|
const { assumeProvenThrough } = await import('./assume_proven_through.js');
|
|
191
|
-
await assumeProvenThrough(blockNumber, options.l1RpcUrls, options.
|
|
191
|
+
await assumeProvenThrough(blockNumber, options.l1RpcUrls, options.nodeUrl, log);
|
|
192
192
|
});
|
|
193
|
-
program.command('advance-epoch').description('Use L1 cheat codes to warp time until the next epoch.').addOption(l1RpcUrlsOption).addOption(
|
|
193
|
+
program.command('advance-epoch').description('Use L1 cheat codes to warp time until the next epoch.').addOption(l1RpcUrlsOption).addOption(nodeOption).action(async (options)=>{
|
|
194
194
|
const { advanceEpoch } = await import('./advance_epoch.js');
|
|
195
|
-
await advanceEpoch(options.l1RpcUrls, options.
|
|
195
|
+
await advanceEpoch(options.l1RpcUrls, options.nodeUrl, log);
|
|
196
196
|
});
|
|
197
197
|
return program;
|
|
198
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAU3D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,UAAU,CAAC;IAC1B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B,EAAE,UAAU,CAAC;CACxC;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,KAAK,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB;;;EAQhC;AAED,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,0BAA0B,EAC1B,WAAW,EACX,WAAW,EACX,YAAY,EACZ,GAAG,EACH,WAAW,GACZ,EAAE,8BAA8B,GAC/B,UAAU,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,iBA4DF;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAClB,UAAU,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;CAC/B,iBAuDF;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,gBAAgB,EAAE,UAAU,CAAA;CAAE,iBAiBnE;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,iBAgBhC;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,iBAyBxD;AAED,wBAAsB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,iBAAiB,GAAG,UAAU,iBAwBzG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GSEContract, RollupContract, createEthereumChain, createExtendedL1Client, createL1TxUtilsFromViemWallet, getL1ContractsConfigEnvVars, getPublicClient, isAnvilTestChain } from '@aztec/ethereum';
|
|
2
2
|
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
4
|
import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
4
5
|
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
|
|
5
6
|
import { encodeFunctionData, formatEther, getContract } from 'viem';
|
|
@@ -61,7 +62,7 @@ export async function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, a
|
|
|
61
62
|
});
|
|
62
63
|
if (isAnvilTestChain(chainId)) {
|
|
63
64
|
dualLog(`Funding validator on L1`);
|
|
64
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
65
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
65
66
|
await cheatCodes.setBalance(attesterAddress, 10n ** 20n);
|
|
66
67
|
} else {
|
|
67
68
|
const balance = await l1Client.getBalance({
|
|
@@ -115,7 +116,7 @@ export async function addL1ValidatorViaRollup({ rpcUrls, chainId, privateKey, mn
|
|
|
115
116
|
});
|
|
116
117
|
if (isAnvilTestChain(chainId)) {
|
|
117
118
|
dualLog(`Funding validator on L1`);
|
|
118
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
119
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
119
120
|
await cheatCodes.setBalance(attesterAddress, 10n ** 20n);
|
|
120
121
|
} else {
|
|
121
122
|
const balance = await l1Client.getBalance({
|
|
@@ -178,7 +179,7 @@ export async function fastForwardEpochs({ rpcUrls, chainId, rollupAddress, numEp
|
|
|
178
179
|
abi: RollupAbi,
|
|
179
180
|
client: publicClient
|
|
180
181
|
});
|
|
181
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
182
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
182
183
|
const currentSlot = await rollup.read.getCurrentSlot();
|
|
183
184
|
const l2SlotsInEpoch = await rollup.read.getEpochDuration();
|
|
184
185
|
const timestamp = await rollup.read.getTimestampForSlot([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate_secret_key.d.ts","sourceRoot":"","sources":["../../../src/cmds/misc/generate_secret_key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"generate_secret_key.d.ts","sourceRoot":"","sources":["../../../src/cmds/misc/generate_secret_key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAE5C,wBAAgB,iBAAiB;;EAEhC"}
|
|
@@ -14,5 +14,5 @@ export interface CachedFetchOptions {
|
|
|
14
14
|
* @param cacheDir - Optional cache directory (defaults to no caching)
|
|
15
15
|
* @returns The fetched and parsed JSON data, or undefined if fetch fails and throwOnError is false
|
|
16
16
|
*/
|
|
17
|
-
export declare function cachedFetch<T = any>(url: string, options: CachedFetchOptions, fetch?: typeof globalThis.fetch, log?: import("@aztec/aztec.js").Logger): Promise<T | undefined>;
|
|
17
|
+
export declare function cachedFetch<T = any>(url: string, options: CachedFetchOptions, fetch?: typeof globalThis.fetch, log?: import("@aztec/aztec.js/log").Logger): Promise<T | undefined>;
|
|
18
18
|
//# sourceMappingURL=cached_fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cached_fetch.d.ts","sourceRoot":"","sources":["../../src/config/cached_fetch.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,GAAG,EACvC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,EAC3B,KAAK,0BAAmB,EACxB,GAAG,
|
|
1
|
+
{"version":3,"file":"cached_fetch.d.ts","sourceRoot":"","sources":["../../src/config/cached_fetch.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAAC,CAAC,GAAG,GAAG,EACvC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,EAC3B,KAAK,0BAAmB,EACxB,GAAG,uCAA+B,GACjC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAuCxB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type L1ContractsConfig } from '@aztec/ethereum';
|
|
2
2
|
import type { NetworkNames } from '@aztec/foundation/config';
|
|
3
3
|
import type { SharedNodeConfig } from '@aztec/node-lib/config';
|
|
4
|
-
import type { P2PConfig } from '@aztec/p2p/config';
|
|
5
4
|
import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
6
|
-
export type L2ChainConfig = L1ContractsConfig &
|
|
5
|
+
export type L2ChainConfig = L1ContractsConfig & Omit<SlasherConfig, 'slashValidatorsNever' | 'slashValidatorsAlways'> & {
|
|
7
6
|
l1ChainId: number;
|
|
8
7
|
testAccounts: boolean;
|
|
9
8
|
sponsoredFPC: boolean;
|
|
@@ -25,12 +24,14 @@ export type L2ChainConfig = L1ContractsConfig & Pick<P2PConfig, 'txPoolDeleteTxs
|
|
|
25
24
|
nullifierTreeMapSizeKb: number;
|
|
26
25
|
publicDataTreeMapSizeKb: number;
|
|
27
26
|
sentinelEnabled: boolean;
|
|
27
|
+
disableTransactions: boolean;
|
|
28
28
|
};
|
|
29
29
|
export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
|
|
30
30
|
export declare const stagingPublicL2ChainConfig: L2ChainConfig;
|
|
31
|
+
export declare const nextNetL2ChainConfig: L2ChainConfig;
|
|
31
32
|
export declare const testnetL2ChainConfig: L2ChainConfig;
|
|
32
|
-
export declare const
|
|
33
|
-
export declare
|
|
34
|
-
export declare function getL2ChainConfig(networkName: NetworkNames
|
|
35
|
-
export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames):
|
|
33
|
+
export declare const mainnetL2ChainConfig: L2ChainConfig;
|
|
34
|
+
export declare const devnetL2ChainConfig: L2ChainConfig;
|
|
35
|
+
export declare function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined;
|
|
36
|
+
export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): void;
|
|
36
37
|
//# sourceMappingURL=chain_l2_config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAYrE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,aAAa,EAAE,sBAAsB,GAAG,uBAAuB,CAAC,GAAG;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IAIpC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAGhC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AA+CJ,eAAO,MAAM,4BAA4B,EAAE,aA+E1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,aAmDxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAmDlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAqDlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAiFlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aAmDjC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAgBrF;AAMD,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,YAAY,QA4FzE"}
|