@aztec/cli 2.0.3-rc.21 → 2.0.3-rc.23
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/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 +2 -2
- package/dest/cmds/l1/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +2 -2
- package/dest/config/chain_l2_config.d.ts +0 -3
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +0 -15
- package/dest/utils/aztec.d.ts +1 -1
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +2 -1
- package/package.json +23 -23
- package/src/cmds/l1/deploy_l1_contracts.ts +2 -0
- package/src/cmds/l1/index.ts +2 -0
- package/src/config/chain_l2_config.ts +0 -19
- package/src/utils/aztec.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type EthAddress } from '@aztec/aztec.js';
|
|
2
2
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
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, log: LogFn, debugLogger: Logger): Promise<void>;
|
|
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,KAAK,UAAU,EAAM,MAAM,iBAAiB,CAAC;AAGtD,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,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAM,MAAM,iBAAiB,CAAC;AAGtD,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"}
|
|
@@ -5,7 +5,7 @@ import { SecretValue } from '@aztec/foundation/config';
|
|
|
5
5
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
6
6
|
import { deployAztecContracts } from '../../utils/aztec.js';
|
|
7
7
|
import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
|
|
8
|
-
export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, acceleratedTestDeployments, json, createVerificationJson, initialValidators, realVerifier, log, debugLogger) {
|
|
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
10
|
const initialAccounts = testAccounts ? await getInitialTestAccounts() : [];
|
|
11
11
|
const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
|
|
@@ -16,7 +16,7 @@ export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic,
|
|
|
16
16
|
withdrawer: a,
|
|
17
17
|
bn254SecretKey: new SecretValue(Fr.random().toBigInt())
|
|
18
18
|
}));
|
|
19
|
-
const { l1ContractAddresses } = await deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidatorOperators, genesisArchiveRoot, fundingNeeded, acceleratedTestDeployments, config, realVerifier, createVerificationJson, debugLogger);
|
|
19
|
+
const { l1ContractAddresses } = await deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidatorOperators, genesisArchiveRoot, fundingNeeded, acceleratedTestDeployments, config, existingToken, realVerifier, createVerificationJson, debugLogger);
|
|
20
20
|
if (json) {
|
|
21
21
|
log(JSON.stringify(Object.fromEntries(Object.entries(l1ContractAddresses).map(([k, v])=>[
|
|
22
22
|
k,
|
|
@@ -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,WAkhB/E"}
|
package/dest/cmds/l1/index.js
CHANGED
|
@@ -8,10 +8,10 @@ const l1RpcUrlsOption = new Option('--l1-rpc-urls <string>', 'List of Ethereum h
|
|
|
8
8
|
]).makeOptionMandatory(true).argParser((arg)=>arg.split(',').map((url)=>url.trim()));
|
|
9
9
|
const networkOption = new Option('--network <string>', 'Network to execute against').env('NETWORK');
|
|
10
10
|
export function injectCommands(program, log, debugLogger) {
|
|
11
|
-
program.command('deploy-l1-contracts').description('Deploys all necessary Ethereum contracts for Aztec.').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', '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('--accelerated-test-deployments', 'Fire and forget deployment transactions, use in testing only', false).option('--real-verifier', 'Deploy the real verifier', false).option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false).action(async (options)=>{
|
|
11
|
+
program.command('deploy-l1-contracts').description('Deploys all necessary Ethereum contracts for Aztec.').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', '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('--accelerated-test-deployments', 'Fire and forget deployment transactions, use in testing only', false).option('--real-verifier', 'Deploy the real verifier', false).option('--existing-token <address>', 'Use an existing ERC20 for both fee and staking', parseEthereumAddress).option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false).action(async (options)=>{
|
|
12
12
|
const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
|
|
13
13
|
const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
|
|
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, log, debugLogger);
|
|
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
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)=>{
|
|
17
17
|
const { deployNewRollup } = await import('./deploy_new_rollup.js');
|
|
@@ -9,9 +9,6 @@ export type L2ChainConfig = L1ContractsConfig & Pick<P2PConfig, 'txPoolDeleteTxs
|
|
|
9
9
|
sponsoredFPC: boolean;
|
|
10
10
|
p2pEnabled: boolean;
|
|
11
11
|
p2pBootstrapNodes: string[];
|
|
12
|
-
registryAddress: string;
|
|
13
|
-
slashFactoryAddress: string;
|
|
14
|
-
feeAssetHandlerAddress: string;
|
|
15
12
|
seqMinTxsPerBlock: number;
|
|
16
13
|
seqMaxTxsPerBlock: number;
|
|
17
14
|
realProofs: boolean;
|
|
@@ -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,EAAU,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAWrE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,GAC5C,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,
|
|
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,EAAU,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAWrE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,GAC5C,IAAI,CAAC,aAAa,EAAE,sBAAsB,GAAG,uBAAuB,CAA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 @@ export const stagingIgnitionL2ChainConfig = {
|
|
|
49
49
|
sponsoredFPC: false,
|
|
50
50
|
p2pEnabled: true,
|
|
51
51
|
p2pBootstrapNodes: [],
|
|
52
|
-
registryAddress: '0x5f85fa0f40bc4b5ccd53c9f34258aa55d25cdde8',
|
|
53
|
-
slashFactoryAddress: '0x257db2ca1471b7f76f414d2997404bfbe916c8c9',
|
|
54
|
-
feeAssetHandlerAddress: '0x67d645b0a3e053605ea861d7e8909be6669812c4',
|
|
55
52
|
seqMinTxsPerBlock: 0,
|
|
56
53
|
seqMaxTxsPerBlock: 0,
|
|
57
54
|
realProofs: true,
|
|
@@ -116,9 +113,6 @@ export const stagingPublicL2ChainConfig = {
|
|
|
116
113
|
sponsoredFPC: true,
|
|
117
114
|
p2pEnabled: true,
|
|
118
115
|
p2pBootstrapNodes: [],
|
|
119
|
-
registryAddress: '0x2e48addca360da61e4d6c21ff2b1961af56eb83b',
|
|
120
|
-
slashFactoryAddress: '0xe19410632fd00695bc5a08dd82044b7b26317742',
|
|
121
|
-
feeAssetHandlerAddress: '0xb46dc3d91f849999330b6dd93473fa29fc45b076',
|
|
122
116
|
seqMinTxsPerBlock: 0,
|
|
123
117
|
seqMaxTxsPerBlock: 20,
|
|
124
118
|
realProofs: true,
|
|
@@ -156,9 +150,6 @@ export const testnetL2ChainConfig = {
|
|
|
156
150
|
sponsoredFPC: true,
|
|
157
151
|
p2pEnabled: true,
|
|
158
152
|
p2pBootstrapNodes: [],
|
|
159
|
-
registryAddress: '0xc2f24280f5c7f4897370dfdeb30f79ded14f1c81',
|
|
160
|
-
slashFactoryAddress: '0x76291684ae928d6e5bcff348e36917f4cc532db8',
|
|
161
|
-
feeAssetHandlerAddress: '0x50513c3713ffd33301e85f30d86ab764df421fe9',
|
|
162
153
|
seqMinTxsPerBlock: 0,
|
|
163
154
|
seqMaxTxsPerBlock: 20,
|
|
164
155
|
realProofs: true,
|
|
@@ -199,9 +190,6 @@ export const ignitionL2ChainConfig = {
|
|
|
199
190
|
sponsoredFPC: false,
|
|
200
191
|
p2pEnabled: true,
|
|
201
192
|
p2pBootstrapNodes: [],
|
|
202
|
-
registryAddress: '',
|
|
203
|
-
slashFactoryAddress: '',
|
|
204
|
-
feeAssetHandlerAddress: '',
|
|
205
193
|
seqMinTxsPerBlock: 0,
|
|
206
194
|
seqMaxTxsPerBlock: 0,
|
|
207
195
|
realProofs: true,
|
|
@@ -342,9 +330,6 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
|
|
|
342
330
|
if (config.publicMetricsCollectFrom) {
|
|
343
331
|
enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
|
|
344
332
|
}
|
|
345
|
-
enrichEthAddressVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
|
|
346
|
-
enrichEthAddressVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
|
|
347
|
-
enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
|
|
348
333
|
// Deployment stuff
|
|
349
334
|
enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
|
|
350
335
|
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
package/dest/utils/aztec.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare function getFunctionAbi(artifact: ContractArtifact, fnName: strin
|
|
|
18
18
|
* @param privateKey - The private key to be used in contract deployment.
|
|
19
19
|
* @param mnemonic - The mnemonic to be used in contract deployment.
|
|
20
20
|
*/
|
|
21
|
-
export declare function deployAztecContracts(rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, acceleratedTestDeployments: boolean, config: L1ContractsConfig, realVerifier: boolean, createVerificationJson: string | false, debugLogger: Logger): Promise<DeployL1ContractsReturnType>;
|
|
21
|
+
export declare function deployAztecContracts(rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, acceleratedTestDeployments: boolean, config: L1ContractsConfig, existingToken: EthAddress | undefined, realVerifier: boolean, createVerificationJson: string | false, debugLogger: Logger): Promise<DeployL1ContractsReturnType>;
|
|
22
22
|
export declare function deployNewRollupContracts(registryAddress: EthAddress, rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, initialValidators: Operator[], genesisArchiveRoot: Fr, feeJuicePortalInitialBalance: bigint, config: L1ContractsConfig, realVerifier: boolean, logger: Logger): Promise<{
|
|
23
23
|
rollup: RollupContract;
|
|
24
24
|
slashFactoryAddress: EthAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec.d.ts","sourceRoot":"","sources":["../../src/utils/aztec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAIjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAShE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,CAMtF;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EAAE,EACjB,OAA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AI,KAAK,MAAM,KAAG,KAAK,MAAM,EAKtD,CAAC;AAOF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAUtE;AAKD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,iBAyB9E"}
|
package/dest/utils/aztec.js
CHANGED
|
@@ -25,7 +25,7 @@ import { encodeArgs } from './encoding.js';
|
|
|
25
25
|
* @param chainId - The chain ID of the L1 host.
|
|
26
26
|
* @param privateKey - The private key to be used in contract deployment.
|
|
27
27
|
* @param mnemonic - The mnemonic to be used in contract deployment.
|
|
28
|
-
*/ export async function deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, acceleratedTestDeployments, config, realVerifier, createVerificationJson, debugLogger) {
|
|
28
|
+
*/ export async function deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, acceleratedTestDeployments, config, existingToken, realVerifier, createVerificationJson, debugLogger) {
|
|
29
29
|
const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
|
|
30
30
|
const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
|
|
31
31
|
const account = !privateKey ? mnemonicToAccount(mnemonic, {
|
|
@@ -42,6 +42,7 @@ import { encodeArgs } from './encoding.js';
|
|
|
42
42
|
acceleratedTestDeployments,
|
|
43
43
|
feeJuicePortalInitialBalance,
|
|
44
44
|
realVerifier,
|
|
45
|
+
existingTokenAddress: existingToken,
|
|
45
46
|
...config
|
|
46
47
|
}, config, createVerificationJson);
|
|
47
48
|
return result;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "2.0.3-rc.
|
|
3
|
+
"version": "2.0.3-rc.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -70,17 +70,17 @@
|
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@aztec/archiver": "2.0.3-rc.
|
|
74
|
-
"@aztec/aztec.js": "2.0.3-rc.
|
|
75
|
-
"@aztec/constants": "2.0.3-rc.
|
|
76
|
-
"@aztec/entrypoints": "2.0.3-rc.
|
|
77
|
-
"@aztec/ethereum": "2.0.3-rc.
|
|
78
|
-
"@aztec/foundation": "2.0.3-rc.
|
|
79
|
-
"@aztec/l1-artifacts": "2.0.3-rc.
|
|
80
|
-
"@aztec/node-lib": "2.0.3-rc.
|
|
81
|
-
"@aztec/p2p": "2.0.3-rc.
|
|
82
|
-
"@aztec/stdlib": "2.0.3-rc.
|
|
83
|
-
"@aztec/world-state": "2.0.3-rc.
|
|
73
|
+
"@aztec/archiver": "2.0.3-rc.23",
|
|
74
|
+
"@aztec/aztec.js": "2.0.3-rc.23",
|
|
75
|
+
"@aztec/constants": "2.0.3-rc.23",
|
|
76
|
+
"@aztec/entrypoints": "2.0.3-rc.23",
|
|
77
|
+
"@aztec/ethereum": "2.0.3-rc.23",
|
|
78
|
+
"@aztec/foundation": "2.0.3-rc.23",
|
|
79
|
+
"@aztec/l1-artifacts": "2.0.3-rc.23",
|
|
80
|
+
"@aztec/node-lib": "2.0.3-rc.23",
|
|
81
|
+
"@aztec/p2p": "2.0.3-rc.23",
|
|
82
|
+
"@aztec/stdlib": "2.0.3-rc.23",
|
|
83
|
+
"@aztec/world-state": "2.0.3-rc.23",
|
|
84
84
|
"@iarna/toml": "^2.2.5",
|
|
85
85
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
86
86
|
"commander": "^12.1.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"viem": "2.23.7"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@aztec/accounts": "2.0.3-rc.
|
|
96
|
-
"@aztec/protocol-contracts": "2.0.3-rc.
|
|
95
|
+
"@aztec/accounts": "2.0.3-rc.23",
|
|
96
|
+
"@aztec/protocol-contracts": "2.0.3-rc.23",
|
|
97
97
|
"@jest/globals": "^30.0.0",
|
|
98
98
|
"@types/jest": "^30.0.0",
|
|
99
99
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -109,15 +109,15 @@
|
|
|
109
109
|
"typescript": "^5.3.3"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
|
-
"@aztec/accounts": "2.0.3-rc.
|
|
113
|
-
"@aztec/bb-prover": "2.0.3-rc.
|
|
114
|
-
"@aztec/ethereum": "2.0.3-rc.
|
|
115
|
-
"@aztec/l1-artifacts": "2.0.3-rc.
|
|
116
|
-
"@aztec/noir-contracts.js": "2.0.3-rc.
|
|
117
|
-
"@aztec/noir-protocol-circuits-types": "2.0.3-rc.
|
|
118
|
-
"@aztec/noir-test-contracts.js": "2.0.3-rc.
|
|
119
|
-
"@aztec/protocol-contracts": "2.0.3-rc.
|
|
120
|
-
"@aztec/stdlib": "2.0.3-rc.
|
|
112
|
+
"@aztec/accounts": "2.0.3-rc.23",
|
|
113
|
+
"@aztec/bb-prover": "2.0.3-rc.23",
|
|
114
|
+
"@aztec/ethereum": "2.0.3-rc.23",
|
|
115
|
+
"@aztec/l1-artifacts": "2.0.3-rc.23",
|
|
116
|
+
"@aztec/noir-contracts.js": "2.0.3-rc.23",
|
|
117
|
+
"@aztec/noir-protocol-circuits-types": "2.0.3-rc.23",
|
|
118
|
+
"@aztec/noir-test-contracts.js": "2.0.3-rc.23",
|
|
119
|
+
"@aztec/protocol-contracts": "2.0.3-rc.23",
|
|
120
|
+
"@aztec/stdlib": "2.0.3-rc.23"
|
|
121
121
|
},
|
|
122
122
|
"files": [
|
|
123
123
|
"dest",
|
|
@@ -22,6 +22,7 @@ export async function deployL1Contracts(
|
|
|
22
22
|
createVerificationJson: string | false,
|
|
23
23
|
initialValidators: EthAddress[],
|
|
24
24
|
realVerifier: boolean,
|
|
25
|
+
existingToken: EthAddress | undefined,
|
|
25
26
|
log: LogFn,
|
|
26
27
|
debugLogger: Logger,
|
|
27
28
|
) {
|
|
@@ -50,6 +51,7 @@ export async function deployL1Contracts(
|
|
|
50
51
|
fundingNeeded,
|
|
51
52
|
acceleratedTestDeployments,
|
|
52
53
|
config,
|
|
54
|
+
existingToken,
|
|
53
55
|
realVerifier,
|
|
54
56
|
createVerificationJson,
|
|
55
57
|
debugLogger,
|
package/src/cmds/l1/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
48
48
|
.option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
|
|
49
49
|
.option('--accelerated-test-deployments', 'Fire and forget deployment transactions, use in testing only', false)
|
|
50
50
|
.option('--real-verifier', 'Deploy the real verifier', false)
|
|
51
|
+
.option('--existing-token <address>', 'Use an existing ERC20 for both fee and staking', parseEthereumAddress)
|
|
51
52
|
.option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false)
|
|
52
53
|
.action(async options => {
|
|
53
54
|
const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
|
|
@@ -68,6 +69,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
68
69
|
options.createVerificationJson,
|
|
69
70
|
initialValidators,
|
|
70
71
|
options.realVerifier,
|
|
72
|
+
options.existingToken,
|
|
71
73
|
log,
|
|
72
74
|
debugLogger,
|
|
73
75
|
);
|
|
@@ -22,9 +22,6 @@ export type L2ChainConfig = L1ContractsConfig &
|
|
|
22
22
|
sponsoredFPC: boolean;
|
|
23
23
|
p2pEnabled: boolean;
|
|
24
24
|
p2pBootstrapNodes: string[];
|
|
25
|
-
registryAddress: string;
|
|
26
|
-
slashFactoryAddress: string;
|
|
27
|
-
feeAssetHandlerAddress: string;
|
|
28
25
|
seqMinTxsPerBlock: number;
|
|
29
26
|
seqMaxTxsPerBlock: number;
|
|
30
27
|
realProofs: boolean;
|
|
@@ -99,9 +96,6 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
|
|
|
99
96
|
sponsoredFPC: false,
|
|
100
97
|
p2pEnabled: true,
|
|
101
98
|
p2pBootstrapNodes: [],
|
|
102
|
-
registryAddress: '0x5f85fa0f40bc4b5ccd53c9f34258aa55d25cdde8',
|
|
103
|
-
slashFactoryAddress: '0x257db2ca1471b7f76f414d2997404bfbe916c8c9',
|
|
104
|
-
feeAssetHandlerAddress: '0x67d645b0a3e053605ea861d7e8909be6669812c4',
|
|
105
99
|
seqMinTxsPerBlock: 0,
|
|
106
100
|
seqMaxTxsPerBlock: 0,
|
|
107
101
|
realProofs: true,
|
|
@@ -183,9 +177,6 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
|
|
|
183
177
|
sponsoredFPC: true,
|
|
184
178
|
p2pEnabled: true,
|
|
185
179
|
p2pBootstrapNodes: [],
|
|
186
|
-
registryAddress: '0x2e48addca360da61e4d6c21ff2b1961af56eb83b',
|
|
187
|
-
slashFactoryAddress: '0xe19410632fd00695bc5a08dd82044b7b26317742',
|
|
188
|
-
feeAssetHandlerAddress: '0xb46dc3d91f849999330b6dd93473fa29fc45b076',
|
|
189
180
|
seqMinTxsPerBlock: 0,
|
|
190
181
|
seqMaxTxsPerBlock: 20,
|
|
191
182
|
realProofs: true,
|
|
@@ -239,9 +230,6 @@ export const testnetL2ChainConfig: L2ChainConfig = {
|
|
|
239
230
|
sponsoredFPC: true,
|
|
240
231
|
p2pEnabled: true,
|
|
241
232
|
p2pBootstrapNodes: [],
|
|
242
|
-
registryAddress: '0xc2f24280f5c7f4897370dfdeb30f79ded14f1c81',
|
|
243
|
-
slashFactoryAddress: '0x76291684ae928d6e5bcff348e36917f4cc532db8',
|
|
244
|
-
feeAssetHandlerAddress: '0x50513c3713ffd33301e85f30d86ab764df421fe9',
|
|
245
233
|
seqMinTxsPerBlock: 0,
|
|
246
234
|
seqMaxTxsPerBlock: 20,
|
|
247
235
|
realProofs: true,
|
|
@@ -298,9 +286,6 @@ export const ignitionL2ChainConfig: L2ChainConfig = {
|
|
|
298
286
|
sponsoredFPC: false,
|
|
299
287
|
p2pEnabled: true,
|
|
300
288
|
p2pBootstrapNodes: [],
|
|
301
|
-
registryAddress: '',
|
|
302
|
-
slashFactoryAddress: '',
|
|
303
|
-
feeAssetHandlerAddress: '',
|
|
304
289
|
seqMinTxsPerBlock: 0,
|
|
305
290
|
seqMaxTxsPerBlock: 0,
|
|
306
291
|
realProofs: true,
|
|
@@ -468,10 +453,6 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
|
|
|
468
453
|
enrichVar('PUBLIC_OTEL_COLLECT_FROM', config.publicMetricsCollectFrom.join(','));
|
|
469
454
|
}
|
|
470
455
|
|
|
471
|
-
enrichEthAddressVar('REGISTRY_CONTRACT_ADDRESS', config.registryAddress);
|
|
472
|
-
enrichEthAddressVar('SLASH_FACTORY_CONTRACT_ADDRESS', config.slashFactoryAddress);
|
|
473
|
-
enrichEthAddressVar('FEE_ASSET_HANDLER_CONTRACT_ADDRESS', config.feeAssetHandlerAddress);
|
|
474
|
-
|
|
475
456
|
// Deployment stuff
|
|
476
457
|
enrichVar('ETHEREUM_SLOT_DURATION', config.ethereumSlotDuration.toString());
|
|
477
458
|
enrichVar('AZTEC_SLOT_DURATION', config.aztecSlotDuration.toString());
|
package/src/utils/aztec.ts
CHANGED
|
@@ -57,6 +57,7 @@ export async function deployAztecContracts(
|
|
|
57
57
|
feeJuicePortalInitialBalance: bigint,
|
|
58
58
|
acceleratedTestDeployments: boolean,
|
|
59
59
|
config: L1ContractsConfig,
|
|
60
|
+
existingToken: EthAddress | undefined,
|
|
60
61
|
realVerifier: boolean,
|
|
61
62
|
createVerificationJson: string | false,
|
|
62
63
|
debugLogger: Logger,
|
|
@@ -85,6 +86,7 @@ export async function deployAztecContracts(
|
|
|
85
86
|
acceleratedTestDeployments,
|
|
86
87
|
feeJuicePortalInitialBalance,
|
|
87
88
|
realVerifier,
|
|
89
|
+
existingTokenAddress: existingToken,
|
|
88
90
|
...config,
|
|
89
91
|
},
|
|
90
92
|
config,
|