@aztec/cli 0.0.1-commit.fce3e4f → 0.0.1-commit.fffb133c
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/cmds/aztec_node/get_block.d.ts +1 -1
- package/dest/cmds/aztec_node/get_block.d.ts.map +1 -1
- package/dest/cmds/aztec_node/get_block.js +2 -1
- package/dest/cmds/aztec_node/get_current_min_fee.d.ts +3 -0
- package/dest/cmds/aztec_node/get_current_min_fee.d.ts.map +1 -0
- package/dest/cmds/aztec_node/{get_current_base_fee.js → get_current_min_fee.js} +2 -2
- package/dest/cmds/aztec_node/get_logs.d.ts +3 -2
- package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -1
- package/dest/cmds/aztec_node/index.js +3 -3
- package/dest/cmds/contracts/inspect_contract.js +1 -1
- package/dest/cmds/infrastructure/index.d.ts +1 -1
- package/dest/cmds/infrastructure/index.d.ts.map +1 -1
- package/dest/cmds/infrastructure/index.js +0 -1
- package/dest/cmds/infrastructure/sequencers.d.ts +1 -2
- package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
- package/dest/cmds/infrastructure/sequencers.js +11 -4
- package/dest/cmds/infrastructure/setup_l2_contract.js +1 -1
- package/dest/cmds/l1/assume_proven_through.d.ts +3 -2
- package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
- package/dest/cmds/l1/assume_proven_through.js +3 -4
- 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 +2 -1
- package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts +4 -0
- package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts.map +1 -0
- package/dest/cmds/l1/{deploy_l1_contracts.js → deploy_l1_contracts_cmd.js} +39 -4
- package/dest/cmds/l1/deploy_new_rollup.d.ts +4 -4
- package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_new_rollup.js +3 -3
- 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/get_l1_addresses.js +5 -2
- package/dest/cmds/l1/get_l1_balance.js +4 -2
- package/dest/cmds/l1/governance_utils.d.ts +1 -1
- package/dest/cmds/l1/governance_utils.d.ts.map +1 -1
- package/dest/cmds/l1/governance_utils.js +3 -1
- package/dest/cmds/l1/index.d.ts +1 -2
- package/dest/cmds/l1/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +13 -10
- package/dest/cmds/l1/prover_stats.d.ts +1 -1
- package/dest/cmds/l1/prover_stats.d.ts.map +1 -1
- package/dest/cmds/l1/prover_stats.js +4 -2
- package/dest/cmds/l1/trigger_seed_snapshot.d.ts +1 -1
- package/dest/cmds/l1/trigger_seed_snapshot.d.ts.map +1 -1
- package/dest/cmds/l1/trigger_seed_snapshot.js +2 -1
- package/dest/cmds/l1/update_l1_validators.d.ts +3 -3
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +52 -13
- package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
- package/dest/cmds/misc/index.d.ts +1 -1
- package/dest/cmds/misc/index.d.ts.map +1 -1
- package/dest/cmds/misc/index.js +1 -1
- package/dest/cmds/validator_keys/generate_bls_keypair.js +1 -1
- package/dest/cmds/validator_keys/new.d.ts +1 -1
- package/dest/cmds/validator_keys/new.d.ts.map +1 -1
- package/dest/cmds/validator_keys/new.js +5 -2
- package/dest/cmds/validator_keys/shared.d.ts +1 -1
- package/dest/cmds/validator_keys/shared.d.ts.map +1 -1
- package/dest/cmds/validator_keys/shared.js +2 -1
- package/dest/cmds/validator_keys/staker.d.ts +2 -2
- package/dest/cmds/validator_keys/staker.d.ts.map +1 -1
- package/dest/cmds/validator_keys/staker.js +7 -4
- package/dest/cmds/validator_keys/utils.d.ts +1 -1
- package/dest/cmds/validator_keys/utils.d.ts.map +1 -1
- package/dest/cmds/validator_keys/utils.js +1 -1
- package/dest/config/chain_l2_config.d.ts +12 -38
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +33 -493
- package/dest/config/generated/networks.d.ts +205 -0
- package/dest/config/generated/networks.d.ts.map +1 -0
- package/dest/config/generated/networks.js +206 -0
- package/dest/config/get_l1_config.d.ts +3 -2
- package/dest/config/get_l1_config.d.ts.map +1 -1
- package/dest/config/get_l1_config.js +3 -1
- package/dest/config/network_config.d.ts +6 -3
- package/dest/config/network_config.d.ts.map +1 -1
- package/dest/config/network_config.js +50 -28
- package/dest/utils/aztec.d.ts +7 -13
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +19 -40
- package/dest/utils/commands.d.ts +7 -6
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/commands.js +6 -5
- package/dest/utils/encoding.js +1 -1
- package/dest/utils/inspect.d.ts +3 -2
- package/dest/utils/inspect.d.ts.map +1 -1
- package/dest/utils/inspect.js +4 -1
- package/package.json +41 -33
- package/src/cmds/aztec_node/get_block.ts +2 -1
- package/src/cmds/aztec_node/{get_current_base_fee.ts → get_current_min_fee.ts} +2 -2
- package/src/cmds/aztec_node/get_logs.ts +3 -2
- package/src/cmds/aztec_node/index.ts +3 -3
- package/src/cmds/contracts/inspect_contract.ts +1 -1
- package/src/cmds/infrastructure/index.ts +0 -1
- package/src/cmds/infrastructure/sequencers.ts +7 -5
- package/src/cmds/infrastructure/setup_l2_contract.ts +1 -1
- package/src/cmds/l1/assume_proven_through.ts +4 -4
- package/src/cmds/l1/bridge_erc20.ts +2 -1
- package/src/cmds/l1/{deploy_l1_contracts.ts → deploy_l1_contracts_cmd.ts} +39 -22
- package/src/cmds/l1/deploy_new_rollup.ts +4 -9
- package/src/cmds/l1/get_l1_addresses.ts +4 -2
- package/src/cmds/l1/get_l1_balance.ts +2 -2
- package/src/cmds/l1/governance_utils.ts +3 -8
- package/src/cmds/l1/index.ts +12 -21
- package/src/cmds/l1/prover_stats.ts +6 -2
- package/src/cmds/l1/trigger_seed_snapshot.ts +2 -1
- package/src/cmds/l1/update_l1_validators.ts +46 -25
- package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
- package/src/cmds/misc/index.ts +1 -1
- package/src/cmds/validator_keys/generate_bls_keypair.ts +1 -1
- package/src/cmds/validator_keys/new.ts +3 -2
- package/src/cmds/validator_keys/shared.ts +2 -1
- package/src/cmds/validator_keys/staker.ts +5 -4
- package/src/cmds/validator_keys/utils.ts +2 -1
- package/src/config/chain_l2_config.ts +33 -644
- package/src/config/generated/networks.ts +210 -0
- package/src/config/get_l1_config.ts +4 -1
- package/src/config/network_config.ts +53 -29
- package/src/utils/aztec.ts +24 -83
- package/src/utils/commands.ts +6 -5
- package/src/utils/encoding.ts +1 -1
- package/src/utils/inspect.ts +6 -2
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts +0 -3
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts.map +0 -1
- package/dest/cmds/l1/deploy_l1_contracts.d.ts +0 -4
- package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec.d.ts","sourceRoot":"","sources":["../../src/utils/aztec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAIjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"aztec.d.ts","sourceRoot":"","sources":["../../src/utils/aztec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAIjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,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gCAKzB,CAAC;AAOF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAUtE"}
|
package/dest/utils/aztec.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { FunctionType, getAllFunctionAbis, loadContractArtifact } from '@aztec/aztec.js/abi';
|
|
2
2
|
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
3
|
import { SecretValue } from '@aztec/foundation/config';
|
|
4
|
-
import { Fr } from '@aztec/foundation/
|
|
4
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
5
6
|
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
6
7
|
import TOML from '@iarna/toml';
|
|
7
8
|
import { readFile } from 'fs/promises';
|
|
8
9
|
import { encodeArgs } from './encoding.js';
|
|
10
|
+
const logger = createLogger('cli:utils:aztec');
|
|
9
11
|
/**
|
|
10
12
|
* Helper to get an ABI function or throw error if it doesn't exist.
|
|
11
13
|
* @param artifact - Contract's build artifact in JSON format.
|
|
@@ -18,43 +20,21 @@ import { encodeArgs } from './encoding.js';
|
|
|
18
20
|
}
|
|
19
21
|
return fn;
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* @param rpcUrls - The RPC URL of the ethereum node.
|
|
24
|
-
* @param chainId - The chain ID of the L1 host.
|
|
25
|
-
* @param privateKey - The private key to be used in contract deployment.
|
|
26
|
-
* @param mnemonic - The mnemonic to be used in contract deployment.
|
|
27
|
-
*/ export async function deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, acceleratedTestDeployments, config, existingToken, realVerifier, createVerificationJson, debugLogger) {
|
|
28
|
-
const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
|
|
29
|
-
const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
|
|
30
|
-
const account = !privateKey ? mnemonicToAccount(mnemonic, {
|
|
31
|
-
addressIndex: mnemonicIndex
|
|
32
|
-
}) : privateKeyToAccount(addLeadingHex(privateKey));
|
|
33
|
-
const chain = createEthereumChain(rpcUrls, chainId);
|
|
34
|
-
const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
|
|
35
|
-
const result = await deployL1Contracts(chain.rpcUrls, account, chain.chainInfo, debugLogger, {
|
|
36
|
-
vkTreeRoot: getVKTreeRoot(),
|
|
37
|
-
protocolContractsHash,
|
|
38
|
-
genesisArchiveRoot,
|
|
39
|
-
salt,
|
|
40
|
-
initialValidators,
|
|
41
|
-
acceleratedTestDeployments,
|
|
42
|
-
feeJuicePortalInitialBalance,
|
|
43
|
-
realVerifier,
|
|
44
|
-
existingTokenAddress: existingToken,
|
|
45
|
-
...config
|
|
46
|
-
}, config, createVerificationJson);
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, createVerificationJson, logger) {
|
|
50
|
-
const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
|
|
23
|
+
export async function deployNewRollupContracts(registryAddress, rpcUrls, privateKey, chainId, mnemonic, mnemonicIndex, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier) {
|
|
24
|
+
const { deployRollupForUpgrade } = await import('@aztec/ethereum/deploy-aztec-l1-contracts');
|
|
51
25
|
const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
|
|
52
26
|
const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
27
|
+
let account;
|
|
28
|
+
if (privateKey) {
|
|
29
|
+
account = privateKeyToAccount(addLeadingHex(privateKey));
|
|
30
|
+
} else {
|
|
31
|
+
account = mnemonicToAccount(mnemonic, {
|
|
32
|
+
addressIndex: mnemonicIndex
|
|
33
|
+
});
|
|
34
|
+
const privateKeyBuf = account.getHdKey().privateKey;
|
|
35
|
+
const privateKeyHex = Buffer.from(privateKeyBuf).toString('hex');
|
|
36
|
+
privateKey = `0x${privateKeyHex}`;
|
|
37
|
+
}
|
|
58
38
|
if (!initialValidators || initialValidators.length === 0) {
|
|
59
39
|
// initialize the new rollup with Amin's validator address.
|
|
60
40
|
const aminAddressString = '0x3b218d0F26d15B36C715cB06c949210a0d630637';
|
|
@@ -71,8 +51,7 @@ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId
|
|
|
71
51
|
initialValidators
|
|
72
52
|
});
|
|
73
53
|
}
|
|
74
|
-
const { rollup, slashFactoryAddress } = await deployRollupForUpgrade(
|
|
75
|
-
salt,
|
|
54
|
+
const { rollup, slashFactoryAddress } = await deployRollupForUpgrade(privateKey, rpcUrls[0], chainId, registryAddress, {
|
|
76
55
|
vkTreeRoot: getVKTreeRoot(),
|
|
77
56
|
protocolContractsHash,
|
|
78
57
|
genesisArchiveRoot,
|
|
@@ -80,10 +59,10 @@ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId
|
|
|
80
59
|
feeJuicePortalInitialBalance,
|
|
81
60
|
realVerifier,
|
|
82
61
|
...config
|
|
83
|
-
}
|
|
62
|
+
});
|
|
84
63
|
return {
|
|
85
64
|
rollup,
|
|
86
|
-
slashFactoryAddress
|
|
65
|
+
slashFactoryAddress: EthAddress.fromString(slashFactoryAddress)
|
|
87
66
|
};
|
|
88
67
|
}
|
|
89
68
|
/**
|
package/dest/utils/commands.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
-
import { LogId } from '@aztec/aztec.js/log';
|
|
5
|
-
import { TxHash } from '@aztec/aztec.js/tx';
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
6
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
7
4
|
import type { PXE } from '@aztec/pxe/server';
|
|
5
|
+
import { FunctionSelector } from '@aztec/stdlib/abi/function-selector';
|
|
6
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
7
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
8
|
+
import { LogId } from '@aztec/stdlib/logs/log-id';
|
|
9
|
+
import { TxHash } from '@aztec/stdlib/tx/tx-hash';
|
|
9
10
|
import { type Command, Option } from 'commander';
|
|
10
11
|
/**
|
|
11
12
|
* If we can successfully resolve 'host.docker.internal', then we are running in a container, and we should treat
|
|
@@ -148,4 +149,4 @@ export declare function parseFields(fields: string[]): Fr[];
|
|
|
148
149
|
* @returns A JSON string
|
|
149
150
|
*/
|
|
150
151
|
export declare function prettyPrintJSON(data: Record<string, any>): string;
|
|
151
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
152
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jb21tYW5kcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQzNELE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLEdBQUcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0F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ixXQUFXLENBQUMsTUFBTSxFQUFFLE1BQU0sR0FBRyxNQUFNLENBTWxEO0FBRUQ7Ozs7OztHQU1HO0FBQ0gsd0JBQWdCLG1CQUFtQixDQUFDLE1BQU0sRUFBRSxNQUFNLEdBQUcsTUFBTSxHQUFHLFNBQVMsQ0FLdEU7QUFFRDs7Ozs7R0FLRztBQUNILHdCQUFnQixjQUFjLENBQUMsU0FBUyxFQUFFLE1BQU0sR0FBRyxVQUFVLEdBQUcsU0FBUyxDQVN4RTtBQUVEOzs7OztHQUtHO0FBQ0gsd0JBQWdCLG1CQUFtQixDQUFDLE9BQU8sRUFBRSxNQUFNLEdBQUcsRUFBRSxDQU12RDtBQUVEOzs7OztHQUtHO0FBQ0gsd0JBQWdCLGNBQWMsQ0FBQyxTQUFTLEVBQUUsTUFBTSxHQUFHLEVBQUUsQ0FNcEQ7QUFFRDs7Ozs7R0FLRztBQUNILHdCQUFnQixVQUFVLENBQUMsS0FBSyxFQUFFLE1BQU0sR0FBRyxFQUFFLENBeUI1QztBQUVEOzs7O0dBSUc7QUFDSCx3QkFBZ0IsV0FBVyxDQUFDLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBRyxFQUFFLEVBQUUsQ0FFbEQ7QUFFRDs7OztHQUlHO0FBQ0gsd0JBQWdCLGVBQWUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDLE1BQU0sRUFBRSxHQUFHLENBQUMsR0FBRyxNQUFNLENBY2pFIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,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BAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAElD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAcjE"}
|
package/dest/utils/commands.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { TxHash } from '@aztec/aztec.js/tx';
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
+
import { FunctionSelector } from '@aztec/stdlib/abi/function-selector';
|
|
4
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
5
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
6
|
+
import { LogId } from '@aztec/stdlib/logs/log-id';
|
|
7
|
+
import { TxHash } from '@aztec/stdlib/tx/tx-hash';
|
|
7
8
|
import { CommanderError, InvalidArgumentError, Option } from 'commander';
|
|
8
9
|
import { lookup } from 'dns/promises';
|
|
9
10
|
import { rename, writeFile } from 'fs/promises';
|
package/dest/utils/encoding.js
CHANGED
package/dest/utils/inspect.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
3
|
import type { AztecNode } from '@aztec/stdlib/interfaces/client';
|
|
3
4
|
import type { TxHash } from '@aztec/stdlib/tx';
|
|
4
|
-
export declare function inspectBlock(aztecNode: AztecNode, blockNumber:
|
|
5
|
+
export declare function inspectBlock(aztecNode: AztecNode, blockNumber: BlockNumber, log: LogFn, opts?: {
|
|
5
6
|
showTxs?: boolean;
|
|
6
7
|
}): Promise<void>;
|
|
7
8
|
export declare function inspectTx(aztecNode: AztecNode, txHash: TxHash, log: LogFn, opts?: {
|
|
8
9
|
includeBlockInfo?: boolean;
|
|
9
10
|
}): Promise<void>;
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zcGVjdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL2luc3BlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzlELE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRS9DLHdCQUFzQixZQUFZLENBQ2hDLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLFdBQVcsRUFBRSxXQUFXLEVBQ3hCLEdBQUcsRUFBRSxLQUFLLEVBQ1YsSUFBSSxHQUFFO0lBQUUsT0FBTyxDQUFDLEVBQUUsT0FBTyxDQUFBO0NBQU8saUJBMEJqQztBQUVELHdCQUFzQixTQUFTLENBQzdCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLE1BQU0sRUFBRSxNQUFNLEVBQ2QsR0FBRyxFQUFFLEtBQUssRUFDVixJQUFJLEdBQUU7SUFBRSxnQkFBZ0IsQ0FBQyxFQUFFLE9BQU8sQ0FBQTtDQUFPLGlCQXNFMUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/utils/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAsB,YAAY,CAChC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/utils/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAsB,YAAY,CAChC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,KAAK,EACV,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,iBA0BjC;AAED,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,KAAK,EACV,IAAI,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,iBAsE1C"}
|
package/dest/utils/inspect.js
CHANGED
|
@@ -30,7 +30,10 @@ export async function inspectTx(aztecNode, txHash, log, opts = {}) {
|
|
|
30
30
|
]);
|
|
31
31
|
// Base tx data
|
|
32
32
|
log(`Tx ${txHash.toString()}`);
|
|
33
|
-
log(` Status: ${receipt.status}
|
|
33
|
+
log(` Status: ${receipt.status}`);
|
|
34
|
+
if (receipt.executionResult) {
|
|
35
|
+
log(` Execution result: ${receipt.executionResult}`);
|
|
36
|
+
}
|
|
34
37
|
if (receipt.error) {
|
|
35
38
|
log(` Error: ${receipt.error}`);
|
|
36
39
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.fffb133c",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
7
7
|
"./devnet": "./dest/cmds/devnet/index.js",
|
|
8
8
|
"./infrastructure": "./dest/cmds/infrastructure/index.js",
|
|
9
9
|
"./l1": "./dest/cmds/l1/index.js",
|
|
10
|
+
"./l1/validators": "./dest/cmds/l1/update_l1_validators.js",
|
|
10
11
|
"./aztec_node": "./dest/cmds/aztec_node/index.js",
|
|
11
12
|
"./cli-utils": "./dest/utils/index.js",
|
|
12
13
|
"./misc": "./dest/cmds/misc/index.js",
|
|
@@ -14,7 +15,9 @@
|
|
|
14
15
|
"./setup-contracts": "./dest/cmds/misc/setup_contracts.js",
|
|
15
16
|
"./utils": "./dest/utils/index.js",
|
|
16
17
|
"./inspect": "./dest/utils/inspect.js",
|
|
17
|
-
"./config": "./dest/config/index.js"
|
|
18
|
+
"./config": "./dest/config/index.js",
|
|
19
|
+
"./config/chain": "./dest/config/chain_l2_config.js",
|
|
20
|
+
"./config/network": "./dest/config/network_config.js"
|
|
18
21
|
},
|
|
19
22
|
"typedocOptions": {
|
|
20
23
|
"entryPoints": [
|
|
@@ -24,13 +27,16 @@
|
|
|
24
27
|
"tsconfig": "./tsconfig.json"
|
|
25
28
|
},
|
|
26
29
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"build:dev": "
|
|
30
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
31
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
29
32
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
33
|
+
"copy-generated": "mkdir -p dest/config/generated/networks && cp src/config/generated/networks/*.json dest/config/generated/networks/",
|
|
34
|
+
"generate": "./scripts/generate.sh",
|
|
30
35
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
31
36
|
},
|
|
32
37
|
"inherits": [
|
|
33
|
-
"../package.common.json"
|
|
38
|
+
"../package.common.json",
|
|
39
|
+
"./package.local.json"
|
|
34
40
|
],
|
|
35
41
|
"jest": {
|
|
36
42
|
"preset": "ts-jest/presets/default-esm",
|
|
@@ -71,21 +77,23 @@
|
|
|
71
77
|
]
|
|
72
78
|
},
|
|
73
79
|
"dependencies": {
|
|
74
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
75
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
76
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
77
|
-
"@aztec/constants": "0.0.1-commit.
|
|
78
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
79
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
80
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
81
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
82
|
-
"@aztec/node-keystore": "0.0.1-commit.
|
|
83
|
-
"@aztec/node-lib": "0.0.1-commit.
|
|
84
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
85
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
86
|
-
"@aztec/
|
|
87
|
-
"@aztec/
|
|
88
|
-
"@aztec/
|
|
80
|
+
"@aztec/accounts": "0.0.1-commit.fffb133c",
|
|
81
|
+
"@aztec/archiver": "0.0.1-commit.fffb133c",
|
|
82
|
+
"@aztec/aztec.js": "0.0.1-commit.fffb133c",
|
|
83
|
+
"@aztec/constants": "0.0.1-commit.fffb133c",
|
|
84
|
+
"@aztec/entrypoints": "0.0.1-commit.fffb133c",
|
|
85
|
+
"@aztec/ethereum": "0.0.1-commit.fffb133c",
|
|
86
|
+
"@aztec/foundation": "0.0.1-commit.fffb133c",
|
|
87
|
+
"@aztec/l1-artifacts": "0.0.1-commit.fffb133c",
|
|
88
|
+
"@aztec/node-keystore": "0.0.1-commit.fffb133c",
|
|
89
|
+
"@aztec/node-lib": "0.0.1-commit.fffb133c",
|
|
90
|
+
"@aztec/p2p": "0.0.1-commit.fffb133c",
|
|
91
|
+
"@aztec/protocol-contracts": "0.0.1-commit.fffb133c",
|
|
92
|
+
"@aztec/sequencer-client": "0.0.1-commit.fffb133c",
|
|
93
|
+
"@aztec/slasher": "0.0.1-commit.fffb133c",
|
|
94
|
+
"@aztec/stdlib": "0.0.1-commit.fffb133c",
|
|
95
|
+
"@aztec/test-wallet": "0.0.1-commit.fffb133c",
|
|
96
|
+
"@aztec/world-state": "0.0.1-commit.fffb133c",
|
|
89
97
|
"@ethersproject/wallet": "^5.8.0",
|
|
90
98
|
"@iarna/toml": "^2.2.5",
|
|
91
99
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
@@ -99,9 +107,9 @@
|
|
|
99
107
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
100
108
|
},
|
|
101
109
|
"devDependencies": {
|
|
102
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
103
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
104
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
110
|
+
"@aztec/aztec-node": "0.0.1-commit.fffb133c",
|
|
111
|
+
"@aztec/kv-store": "0.0.1-commit.fffb133c",
|
|
112
|
+
"@aztec/telemetry-client": "0.0.1-commit.fffb133c",
|
|
105
113
|
"@jest/globals": "^30.0.0",
|
|
106
114
|
"@types/jest": "^30.0.0",
|
|
107
115
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -110,7 +118,7 @@
|
|
|
110
118
|
"@types/node": "^22.15.17",
|
|
111
119
|
"@types/semver": "^7.5.2",
|
|
112
120
|
"@types/source-map-support": "^0.5.10",
|
|
113
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
121
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
114
122
|
"jest": "^30.0.0",
|
|
115
123
|
"jest-mock-extended": "^4.0.0",
|
|
116
124
|
"ts-jest": "^29.4.0",
|
|
@@ -118,15 +126,15 @@
|
|
|
118
126
|
"typescript": "^5.3.3"
|
|
119
127
|
},
|
|
120
128
|
"peerDependencies": {
|
|
121
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
122
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
123
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
124
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
125
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
126
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
127
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
128
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
129
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
129
|
+
"@aztec/accounts": "0.0.1-commit.fffb133c",
|
|
130
|
+
"@aztec/bb-prover": "0.0.1-commit.fffb133c",
|
|
131
|
+
"@aztec/ethereum": "0.0.1-commit.fffb133c",
|
|
132
|
+
"@aztec/l1-artifacts": "0.0.1-commit.fffb133c",
|
|
133
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.fffb133c",
|
|
134
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.fffb133c",
|
|
135
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.fffb133c",
|
|
136
|
+
"@aztec/protocol-contracts": "0.0.1-commit.fffb133c",
|
|
137
|
+
"@aztec/stdlib": "0.0.1-commit.fffb133c"
|
|
130
138
|
},
|
|
131
139
|
"files": [
|
|
132
140
|
"dest",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
3
4
|
|
|
4
5
|
import { inspectBlock } from '../../utils/inspect.js';
|
|
5
6
|
|
|
6
7
|
export async function getBlock(nodeUrl: string, maybeBlockNumber: number | undefined, log: LogFn) {
|
|
7
8
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
8
|
-
const blockNumber = maybeBlockNumber
|
|
9
|
+
const blockNumber: BlockNumber = maybeBlockNumber ? BlockNumber(maybeBlockNumber) : await aztecNode.getBlockNumber();
|
|
9
10
|
await inspectBlock(aztecNode, blockNumber, log, { showTxs: true });
|
|
10
11
|
}
|
|
@@ -2,8 +2,8 @@ import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
|
2
2
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
3
3
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
4
4
|
|
|
5
|
-
export async function
|
|
5
|
+
export async function getCurrentMinFee(nodeUrl: string, debugLogger: Logger, log: LogFn) {
|
|
6
6
|
const node = createAztecNodeClient(nodeUrl);
|
|
7
|
-
const fees = await node.
|
|
7
|
+
const fees = await node.getCurrentMinFees();
|
|
8
8
|
log(`Current fees: ${jsonStringify(fees)}`);
|
|
9
9
|
}
|
|
@@ -2,13 +2,14 @@ import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
|
2
2
|
import type { LogFilter, LogId } from '@aztec/aztec.js/log';
|
|
3
3
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
4
4
|
import type { TxHash } from '@aztec/aztec.js/tx';
|
|
5
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
5
6
|
import type { LogFn } from '@aztec/foundation/log';
|
|
6
7
|
import { sleep } from '@aztec/foundation/sleep';
|
|
7
8
|
|
|
8
9
|
export async function getLogs(
|
|
9
10
|
txHash: TxHash,
|
|
10
|
-
fromBlock:
|
|
11
|
-
toBlock:
|
|
11
|
+
fromBlock: BlockNumber,
|
|
12
|
+
toBlock: BlockNumber,
|
|
12
13
|
afterLog: LogId,
|
|
13
14
|
contractAddress: AztecAddress,
|
|
14
15
|
nodeUrl: string,
|
|
@@ -25,12 +25,12 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
program
|
|
28
|
-
.command('get-current-
|
|
28
|
+
.command('get-current-min-fee')
|
|
29
29
|
.description('Gets the current base fee.')
|
|
30
30
|
.addOption(nodeOption)
|
|
31
31
|
.action(async options => {
|
|
32
|
-
const {
|
|
33
|
-
await
|
|
32
|
+
const { getCurrentMinFee } = await import('./get_current_min_fee.js');
|
|
33
|
+
await getCurrentMinFee(options.rpcUrl, debugLogger, log);
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
program
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
2
2
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
3
|
-
import {
|
|
3
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
4
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
5
|
+
import { GSEContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
4
6
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
7
|
import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
6
8
|
|
|
@@ -15,7 +17,6 @@ export async function sequencers(opts: {
|
|
|
15
17
|
nodeUrl: string;
|
|
16
18
|
l1RpcUrls: string[];
|
|
17
19
|
chainId: number;
|
|
18
|
-
blockNumber?: number;
|
|
19
20
|
log: LogFn;
|
|
20
21
|
}) {
|
|
21
22
|
const { command, who: maybeWho, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
@@ -25,14 +26,14 @@ export async function sequencers(opts: {
|
|
|
25
26
|
const chain = createEthereumChain(l1RpcUrls, chainId);
|
|
26
27
|
const publicClient = createPublicClient({
|
|
27
28
|
chain: chain.chainInfo,
|
|
28
|
-
transport: fallback(l1RpcUrls.map(url => http(url))),
|
|
29
|
+
transport: fallback(l1RpcUrls.map(url => http(url, { batch: false }))),
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
const walletClient = mnemonic
|
|
32
33
|
? createWalletClient({
|
|
33
34
|
account: mnemonicToAccount(mnemonic),
|
|
34
35
|
chain: chain.chainInfo,
|
|
35
|
-
transport: fallback(l1RpcUrls.map(url => http(url))),
|
|
36
|
+
transport: fallback(l1RpcUrls.map(url => http(url, { batch: false }))),
|
|
36
37
|
})
|
|
37
38
|
: undefined;
|
|
38
39
|
|
|
@@ -65,8 +66,9 @@ export async function sequencers(opts: {
|
|
|
65
66
|
|
|
66
67
|
log(`Adding ${who} as sequencer`);
|
|
67
68
|
|
|
69
|
+
const stakingAssetAddress = await rollup.getStakingAsset();
|
|
68
70
|
const stakingAsset = getContract({
|
|
69
|
-
address:
|
|
71
|
+
address: stakingAssetAddress.toString(),
|
|
70
72
|
abi: TestERC20Abi,
|
|
71
73
|
client: walletClient,
|
|
72
74
|
});
|
|
@@ -22,7 +22,7 @@ export async function setupL2Contracts(nodeUrl: string, testAccounts: boolean, j
|
|
|
22
22
|
if (testAccounts) {
|
|
23
23
|
log('setupL2Contracts: Deploying test accounts...');
|
|
24
24
|
const initialAccountsData = await getInitialTestAccountsData();
|
|
25
|
-
deployedAccountManagers = await deployFundedSchnorrAccounts(wallet,
|
|
25
|
+
deployedAccountManagers = await deployFundedSchnorrAccounts(wallet, initialAccountsData, waitOpts);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (json) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
5
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
6
|
|
|
6
7
|
export async function assumeProvenThrough(
|
|
7
|
-
|
|
8
|
+
checkpointOrLatest: CheckpointNumber | undefined,
|
|
8
9
|
l1RpcUrls: string[],
|
|
9
10
|
nodeUrl: string,
|
|
10
11
|
log: LogFn,
|
|
11
12
|
) {
|
|
12
13
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
13
14
|
const rollupAddress = await aztecNode.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
14
|
-
const blockNumber = blockNumberOrLatest ?? (await aztecNode.getBlockNumber());
|
|
15
15
|
|
|
16
16
|
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, { rollupAddress }, new DateProvider());
|
|
17
17
|
|
|
18
|
-
await rollupCheatCodes.markAsProven(
|
|
19
|
-
log(`Assumed proven through
|
|
18
|
+
await rollupCheatCodes.markAsProven(checkpointOrLatest);
|
|
19
|
+
log(`Assumed proven through checkpoint ${checkpointOrLatest ?? 'latest'}`);
|
|
20
20
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import { L1ToL2TokenPortalManager } from '@aztec/aztec.js/ethereum';
|
|
3
3
|
import type { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
-
import { createEthereumChain
|
|
4
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
5
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
5
6
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
6
7
|
|
|
7
8
|
import { prettyPrintJSON } from '../../utils/commands.js';
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
2
|
import type { EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
3
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
-
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
4
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
5
|
+
import { type Operator, deployAztecL1Contracts } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
5
6
|
import { SecretValue } from '@aztec/foundation/config';
|
|
6
7
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
8
|
+
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
7
9
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
8
10
|
|
|
9
|
-
import {
|
|
11
|
+
import { mnemonicToAccount } from 'viem/accounts';
|
|
12
|
+
|
|
13
|
+
import { addLeadingHex } from '../../utils/aztec.js';
|
|
10
14
|
import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
|
|
11
15
|
|
|
12
|
-
export async function
|
|
16
|
+
export async function deployL1ContractsCmd(
|
|
13
17
|
rpcUrls: string[],
|
|
14
18
|
chainId: number,
|
|
15
19
|
privateKey: string | undefined,
|
|
16
20
|
mnemonic: string,
|
|
17
21
|
mnemonicIndex: number,
|
|
18
|
-
salt: number | undefined,
|
|
19
22
|
testAccounts: boolean,
|
|
20
23
|
sponsoredFPC: boolean,
|
|
21
|
-
acceleratedTestDeployments: boolean,
|
|
22
24
|
json: boolean,
|
|
23
|
-
createVerificationJson: string | false,
|
|
24
25
|
initialValidators: EthAddress[],
|
|
25
26
|
realVerifier: boolean,
|
|
26
27
|
existingToken: EthAddress | undefined,
|
|
@@ -29,34 +30,50 @@ export async function deployL1Contracts(
|
|
|
29
30
|
) {
|
|
30
31
|
const config = getL1ContractsConfigEnvVars();
|
|
31
32
|
|
|
33
|
+
// Compute initial accounts for genesis (test accounts + sponsored FPC)
|
|
32
34
|
const initialAccounts = testAccounts ? await getInitialTestAccountsData() : [];
|
|
33
35
|
const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
|
|
34
36
|
const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddress);
|
|
35
37
|
const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
// Get the VK tree root
|
|
40
|
+
const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
|
|
41
|
+
const vkTreeRoot = getVKTreeRoot();
|
|
42
|
+
|
|
43
|
+
// Get private key (from direct input or mnemonic)
|
|
44
|
+
let deployerPrivateKey: `0x${string}`;
|
|
45
|
+
if (privateKey) {
|
|
46
|
+
deployerPrivateKey = addLeadingHex(privateKey);
|
|
47
|
+
} else {
|
|
48
|
+
const account = mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex });
|
|
49
|
+
deployerPrivateKey = `0x${Buffer.from(account.getHdKey().privateKey!).toString('hex')}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Prepare validator operators with bn254 keys
|
|
53
|
+
const initialValidatorOperators: Operator[] = initialValidators.map(a => ({
|
|
38
54
|
attester: a,
|
|
39
55
|
withdrawer: a,
|
|
40
56
|
bn254SecretKey: new SecretValue(Fr.random().toBigInt()),
|
|
41
57
|
}));
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
debugLogger.info('Deploying L1 contracts via Forge...');
|
|
60
|
+
|
|
61
|
+
// Deploy using l1-contracts Forge scripts
|
|
62
|
+
const { l1ContractAddresses, rollupVersion } = await deployAztecL1Contracts(rpcUrls[0], deployerPrivateKey, chainId, {
|
|
63
|
+
// Initial validators to add during deployment
|
|
64
|
+
initialValidators: initialValidatorOperators,
|
|
65
|
+
// Genesis config
|
|
66
|
+
vkTreeRoot,
|
|
67
|
+
protocolContractsHash,
|
|
51
68
|
genesisArchiveRoot,
|
|
52
|
-
|
|
53
|
-
acceleratedTestDeployments,
|
|
54
|
-
config,
|
|
55
|
-
existingToken,
|
|
69
|
+
// Deployment options
|
|
56
70
|
realVerifier,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
...config,
|
|
72
|
+
feeJuicePortalInitialBalance: fundingNeeded,
|
|
73
|
+
existingTokenAddress: existingToken,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
debugLogger.info('Forge deployment complete', { rollupVersion });
|
|
60
77
|
|
|
61
78
|
if (json) {
|
|
62
79
|
log(
|