@aztec/cli 2.1.0-rc.2 → 2.1.0-rc.21

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.
@@ -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,iBA8CpB"}
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"}
@@ -3,13 +3,13 @@ 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
8
  const initialAccounts = testAccounts ? await getInitialTestAccounts() : [];
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 +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,WAkhB/E"}
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"}
@@ -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');
@@ -194,23 +194,5 @@ export function injectCommands(program, log, debugLogger) {
194
194
  const { advanceEpoch } = await import('./advance_epoch.js');
195
195
  await advanceEpoch(options.l1RpcUrls, options.rpcUrl, log);
196
196
  });
197
- program.command('prover-stats', {
198
- hidden: true
199
- }).addOption(l1RpcUrlsOption).addOption(l1ChainIdOption).option('--start-block <number>', 'The L1 block number to start from', parseBigint, 1n).option('--end-block <number>', 'The last L1 block number to query', parseBigint).option('--batch-size <number>', 'The number of blocks to query in each batch', parseBigint, 100n).option('--proving-timeout <number>', 'Cutoff for proving time to consider a block', parseBigint).option('--l1-rollup-address <string>', 'Address of the rollup contract (required if node URL is not set)').option('--node-url <string>', 'JSON RPC URL of an Aztec node to retrieve the rollup contract address (required if L1 rollup address is not set)').option('--raw-logs', 'Output raw logs instead of aggregated stats').action(async (options)=>{
200
- const { proverStats } = await import('./prover_stats.js');
201
- const { l1RpcUrls, chainId, l1RollupAddress, startBlock, endBlock, batchSize, nodeUrl, provingTimeout, rawLogs } = options;
202
- await proverStats({
203
- l1RpcUrls,
204
- chainId,
205
- l1RollupAddress,
206
- startBlock,
207
- endBlock,
208
- batchSize,
209
- nodeUrl,
210
- provingTimeout,
211
- rawLogs,
212
- log
213
- });
214
- });
215
197
  return program;
216
198
  }
@@ -25,12 +25,12 @@ export type L2ChainConfig = L1ContractsConfig & Pick<P2PConfig, 'txPoolDeleteTxs
25
25
  nullifierTreeMapSizeKb: number;
26
26
  publicDataTreeMapSizeKb: number;
27
27
  sentinelEnabled: boolean;
28
+ disableTransactions: boolean;
28
29
  };
29
30
  export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
30
31
  export declare const stagingPublicL2ChainConfig: L2ChainConfig;
31
32
  export declare const testnetL2ChainConfig: L2ChainConfig;
32
- export declare const ignitionL2ChainConfig: L2ChainConfig;
33
- export declare function getBootnodes(networkName: NetworkNames, cacheDir?: string): Promise<any>;
34
- export declare function getL2ChainConfig(networkName: NetworkNames, cacheDir?: string): Promise<L2ChainConfig | undefined>;
35
- export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
33
+ export declare const mainnetL2ChainConfig: L2ChainConfig;
34
+ export declare function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined;
35
+ export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): void;
36
36
  //# 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,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;AAarE,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,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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;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,aAgF1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,aAoDxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAuDlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAgFlC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAYrF;AAMD,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,YAAY,QA4FzE"}
@@ -1,10 +1,9 @@
1
1
  import { DefaultL1ContractsConfig } from '@aztec/ethereum';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import path, { join } from 'path';
3
+ import path from 'path';
4
4
  import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with {
5
5
  type: 'json'
6
6
  };
7
- import { cachedFetch } from './cached_fetch.js';
8
7
  import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
9
8
  const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
10
9
  const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
@@ -48,6 +47,7 @@ export const stagingIgnitionL2ChainConfig = {
48
47
  l1ChainId: 11155111,
49
48
  testAccounts: false,
50
49
  sponsoredFPC: false,
50
+ disableTransactions: true,
51
51
  p2pEnabled: true,
52
52
  p2pBootstrapNodes: [],
53
53
  seqMinTxsPerBlock: 0,
@@ -114,6 +114,7 @@ export const stagingPublicL2ChainConfig = {
114
114
  l1ChainId: 11155111,
115
115
  testAccounts: false,
116
116
  sponsoredFPC: true,
117
+ disableTransactions: false,
117
118
  p2pEnabled: true,
118
119
  p2pBootstrapNodes: [],
119
120
  seqMinTxsPerBlock: 0,
@@ -154,9 +155,10 @@ export const testnetL2ChainConfig = {
154
155
  testAccounts: false,
155
156
  sponsoredFPC: true,
156
157
  p2pEnabled: true,
158
+ disableTransactions: true,
157
159
  p2pBootstrapNodes: [],
158
160
  seqMinTxsPerBlock: 0,
159
- seqMaxTxsPerBlock: 20,
161
+ seqMaxTxsPerBlock: 0,
160
162
  realProofs: true,
161
163
  snapshotsUrls: [
162
164
  `${SNAPSHOTS_URL}/testnet/`
@@ -182,7 +184,7 @@ export const testnetL2ChainConfig = {
182
184
  /** The local ejection threshold for a validator. Stricter than ejectionThreshold but local to a specific rollup */ localEjectionThreshold: DefaultL1ContractsConfig.localEjectionThreshold,
183
185
  /** The slashing round size */ slashingRoundSizeInEpochs: DefaultL1ContractsConfig.slashingRoundSizeInEpochs,
184
186
  /** Governance proposing round size */ governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
185
- /** The mana target for the rollup */ manaTarget: DefaultL1ContractsConfig.manaTarget,
187
+ /** The mana target for the rollup */ manaTarget: 0n,
186
188
  /** The proving cost per mana */ provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
187
189
  /** Exit delay for stakers */ exitDelaySeconds: DefaultL1ContractsConfig.exitDelaySeconds,
188
190
  ...DefaultSlashConfig,
@@ -191,20 +193,21 @@ export const testnetL2ChainConfig = {
191
193
  slashInactivityPenalty: DefaultL1ContractsConfig.slashAmountMedium,
192
194
  ...DefaultNetworkDBMapSizeConfig
193
195
  };
194
- export const ignitionL2ChainConfig = {
196
+ export const mainnetL2ChainConfig = {
195
197
  l1ChainId: 1,
196
198
  testAccounts: false,
197
199
  sponsoredFPC: false,
198
200
  p2pEnabled: true,
201
+ disableTransactions: true,
199
202
  p2pBootstrapNodes: [],
200
203
  seqMinTxsPerBlock: 0,
201
204
  seqMaxTxsPerBlock: 0,
202
205
  realProofs: true,
203
206
  snapshotsUrls: [
204
- `${SNAPSHOTS_URL}/ignition/`
207
+ `${SNAPSHOTS_URL}/mainnet/`
205
208
  ],
206
209
  autoUpdate: 'notify',
207
- autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/ignition.json',
210
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
208
211
  maxTxPoolSize: 100_000_000,
209
212
  publicIncludeMetrics,
210
213
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
@@ -257,16 +260,7 @@ export const ignitionL2ChainConfig = {
257
260
  slashExecuteRoundsLookBack: 4,
258
261
  ...DefaultNetworkDBMapSizeConfig
259
262
  };
260
- const BOOTNODE_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour;
261
- export async function getBootnodes(networkName, cacheDir) {
262
- const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
263
- const data = await cachedFetch(url, {
264
- cacheDurationMs: BOOTNODE_CACHE_DURATION_MS,
265
- cacheFile: cacheDir ? join(cacheDir, networkName, 'bootnodes.json') : undefined
266
- });
267
- return data?.bootnodes;
268
- }
269
- export async function getL2ChainConfig(networkName, cacheDir) {
263
+ export function getL2ChainConfig(networkName) {
270
264
  let config;
271
265
  if (networkName === 'staging-public') {
272
266
  config = {
@@ -280,31 +274,22 @@ export async function getL2ChainConfig(networkName, cacheDir) {
280
274
  config = {
281
275
  ...stagingIgnitionL2ChainConfig
282
276
  };
283
- } else if (networkName === 'ignition') {
277
+ } else if (networkName === 'mainnet') {
284
278
  config = {
285
- ...ignitionL2ChainConfig
279
+ ...mainnetL2ChainConfig
286
280
  };
287
281
  }
288
- if (!config) {
289
- return undefined;
290
- }
291
- // If the bootnodes are not set, get them from the network
292
- const bootnodeKey = 'BOOTSTRAP_NODES';
293
- if (!process.env[bootnodeKey]) {
294
- config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
295
- }
296
282
  return config;
297
283
  }
298
284
  function getDefaultDataDir(networkName) {
299
285
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
300
286
  }
301
- export async function enrichEnvironmentWithChainConfig(networkName) {
287
+ export function enrichEnvironmentWithChainConfig(networkName) {
302
288
  if (networkName === 'local') {
303
289
  return;
304
290
  }
305
291
  enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
306
- const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
307
- const config = await getL2ChainConfig(networkName, cacheDir);
292
+ const config = getL2ChainConfig(networkName);
308
293
  if (!config) {
309
294
  throw new Error(`Unknown network name: ${networkName}`);
310
295
  }
@@ -378,4 +363,5 @@ export async function enrichEnvironmentWithChainConfig(networkName) {
378
363
  enrichVar('SLASH_OFFENSE_EXPIRATION_ROUNDS', config.slashOffenseExpirationRounds.toString());
379
364
  enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
380
365
  enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
366
+ enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
381
367
  }
@@ -19,7 +19,7 @@ export declare function getFunctionAbi(artifact: ContractArtifact, fnName: strin
19
19
  * @param mnemonic - The mnemonic to be used in contract deployment.
20
20
  */
21
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
- 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<{
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, createVerificationJson: string | false, logger: Logger): Promise<{
23
23
  rollup: RollupContract;
24
24
  slashFactoryAddress: EthAddress;
25
25
  }>;
@@ -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,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AY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,KAAK;;;;GAO3G;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,KAAG,MAK7C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,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"}
@@ -47,7 +47,7 @@ import { encodeArgs } from './encoding.js';
47
47
  }, config, createVerificationJson);
48
48
  return result;
49
49
  }
50
- export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, logger) {
50
+ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, createVerificationJson, logger) {
51
51
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
52
52
  const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
53
53
  const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
@@ -81,7 +81,7 @@ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId
81
81
  feeJuicePortalInitialBalance,
82
82
  realVerifier,
83
83
  ...config
84
- }, registryAddress, logger, config);
84
+ }, registryAddress, logger, config, createVerificationJson);
85
85
  return {
86
86
  rollup,
87
87
  slashFactoryAddress
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "2.1.0-rc.2",
3
+ "version": "2.1.0-rc.21",
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.1.0-rc.2",
74
- "@aztec/aztec.js": "2.1.0-rc.2",
75
- "@aztec/constants": "2.1.0-rc.2",
76
- "@aztec/entrypoints": "2.1.0-rc.2",
77
- "@aztec/ethereum": "2.1.0-rc.2",
78
- "@aztec/foundation": "2.1.0-rc.2",
79
- "@aztec/l1-artifacts": "2.1.0-rc.2",
80
- "@aztec/node-lib": "2.1.0-rc.2",
81
- "@aztec/p2p": "2.1.0-rc.2",
82
- "@aztec/stdlib": "2.1.0-rc.2",
83
- "@aztec/world-state": "2.1.0-rc.2",
73
+ "@aztec/archiver": "2.1.0-rc.21",
74
+ "@aztec/aztec.js": "2.1.0-rc.21",
75
+ "@aztec/constants": "2.1.0-rc.21",
76
+ "@aztec/entrypoints": "2.1.0-rc.21",
77
+ "@aztec/ethereum": "2.1.0-rc.21",
78
+ "@aztec/foundation": "2.1.0-rc.21",
79
+ "@aztec/l1-artifacts": "2.1.0-rc.21",
80
+ "@aztec/node-lib": "2.1.0-rc.21",
81
+ "@aztec/p2p": "2.1.0-rc.21",
82
+ "@aztec/stdlib": "2.1.0-rc.21",
83
+ "@aztec/world-state": "2.1.0-rc.21",
84
84
  "@iarna/toml": "^2.2.5",
85
85
  "@libp2p/peer-id-factory": "^3.0.4",
86
86
  "commander": "^12.1.0",
@@ -89,11 +89,11 @@
89
89
  "semver": "^7.5.4",
90
90
  "source-map-support": "^0.5.21",
91
91
  "tslib": "^2.4.0",
92
- "viem": "2.23.7"
92
+ "viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@aztec/accounts": "2.1.0-rc.2",
96
- "@aztec/protocol-contracts": "2.1.0-rc.2",
95
+ "@aztec/accounts": "2.1.0-rc.21",
96
+ "@aztec/protocol-contracts": "2.1.0-rc.21",
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.1.0-rc.2",
113
- "@aztec/bb-prover": "2.1.0-rc.2",
114
- "@aztec/ethereum": "2.1.0-rc.2",
115
- "@aztec/l1-artifacts": "2.1.0-rc.2",
116
- "@aztec/noir-contracts.js": "2.1.0-rc.2",
117
- "@aztec/noir-protocol-circuits-types": "2.1.0-rc.2",
118
- "@aztec/noir-test-contracts.js": "2.1.0-rc.2",
119
- "@aztec/protocol-contracts": "2.1.0-rc.2",
120
- "@aztec/stdlib": "2.1.0-rc.2"
112
+ "@aztec/accounts": "2.1.0-rc.21",
113
+ "@aztec/bb-prover": "2.1.0-rc.21",
114
+ "@aztec/ethereum": "2.1.0-rc.21",
115
+ "@aztec/l1-artifacts": "2.1.0-rc.21",
116
+ "@aztec/noir-contracts.js": "2.1.0-rc.21",
117
+ "@aztec/noir-protocol-circuits-types": "2.1.0-rc.21",
118
+ "@aztec/noir-test-contracts.js": "2.1.0-rc.21",
119
+ "@aztec/protocol-contracts": "2.1.0-rc.21",
120
+ "@aztec/stdlib": "2.1.0-rc.21"
121
121
  },
122
122
  "files": [
123
123
  "dest",
@@ -20,6 +20,7 @@ export async function deployNewRollup(
20
20
  json: boolean,
21
21
  initialValidators: Operator[],
22
22
  realVerifier: boolean,
23
+ createVerificationJson: string | false,
23
24
  log: LogFn,
24
25
  debugLogger: Logger,
25
26
  ) {
@@ -43,6 +44,7 @@ export async function deployNewRollup(
43
44
  fundingNeeded,
44
45
  config,
45
46
  realVerifier,
47
+ createVerificationJson,
46
48
  debugLogger,
47
49
  );
48
50
 
@@ -94,6 +94,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
94
94
  .option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts')
95
95
  .option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
96
96
  .option('--real-verifier', 'Deploy the real verifier', false)
97
+ .option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false)
97
98
  .action(async options => {
98
99
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
99
100
 
@@ -112,6 +113,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
112
113
  options.json,
113
114
  initialValidators,
114
115
  options.realVerifier,
116
+ options.createVerificationJson,
115
117
  log,
116
118
  debugLogger,
117
119
  );
@@ -525,37 +527,5 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
525
527
  await advanceEpoch(options.l1RpcUrls, options.rpcUrl, log);
526
528
  });
527
529
 
528
- program
529
- .command('prover-stats', { hidden: true })
530
- .addOption(l1RpcUrlsOption)
531
- .addOption(l1ChainIdOption)
532
- .option('--start-block <number>', 'The L1 block number to start from', parseBigint, 1n)
533
- .option('--end-block <number>', 'The last L1 block number to query', parseBigint)
534
- .option('--batch-size <number>', 'The number of blocks to query in each batch', parseBigint, 100n)
535
- .option('--proving-timeout <number>', 'Cutoff for proving time to consider a block', parseBigint)
536
- .option('--l1-rollup-address <string>', 'Address of the rollup contract (required if node URL is not set)')
537
- .option(
538
- '--node-url <string>',
539
- 'JSON RPC URL of an Aztec node to retrieve the rollup contract address (required if L1 rollup address is not set)',
540
- )
541
- .option('--raw-logs', 'Output raw logs instead of aggregated stats')
542
- .action(async options => {
543
- const { proverStats } = await import('./prover_stats.js');
544
- const { l1RpcUrls, chainId, l1RollupAddress, startBlock, endBlock, batchSize, nodeUrl, provingTimeout, rawLogs } =
545
- options;
546
- await proverStats({
547
- l1RpcUrls,
548
- chainId,
549
- l1RollupAddress,
550
- startBlock,
551
- endBlock,
552
- batchSize,
553
- nodeUrl,
554
- provingTimeout,
555
- rawLogs,
556
- log,
557
- });
558
- });
559
-
560
530
  return program;
561
531
  }
@@ -1,14 +1,13 @@
1
1
  import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum';
2
- import type { EnvVar, NetworkNames } from '@aztec/foundation/config';
2
+ import type { NetworkNames } from '@aztec/foundation/config';
3
3
  import { EthAddress } from '@aztec/foundation/eth-address';
4
4
  import type { SharedNodeConfig } from '@aztec/node-lib/config';
5
5
  import type { P2PConfig } from '@aztec/p2p/config';
6
6
  import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
7
7
 
8
- import path, { join } from 'path';
8
+ import path from 'path';
9
9
 
10
10
  import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with { type: 'json' };
11
- import { cachedFetch } from './cached_fetch.js';
12
11
  import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
13
12
 
14
13
  const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
@@ -45,6 +44,7 @@ export type L2ChainConfig = L1ContractsConfig &
45
44
 
46
45
  // Control whether sentinel is enabled or not. Needed for slashing
47
46
  sentinelEnabled: boolean;
47
+ disableTransactions: boolean;
48
48
  };
49
49
 
50
50
  const DefaultSlashConfig = {
@@ -96,6 +96,7 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
96
96
  l1ChainId: 11155111,
97
97
  testAccounts: false,
98
98
  sponsoredFPC: false,
99
+ disableTransactions: true,
99
100
  p2pEnabled: true,
100
101
  p2pBootstrapNodes: [],
101
102
  seqMinTxsPerBlock: 0,
@@ -177,6 +178,7 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
177
178
  l1ChainId: 11155111,
178
179
  testAccounts: false,
179
180
  sponsoredFPC: true,
181
+ disableTransactions: false,
180
182
  p2pEnabled: true,
181
183
  p2pBootstrapNodes: [],
182
184
  seqMinTxsPerBlock: 0,
@@ -231,9 +233,10 @@ export const testnetL2ChainConfig: L2ChainConfig = {
231
233
  testAccounts: false,
232
234
  sponsoredFPC: true,
233
235
  p2pEnabled: true,
236
+ disableTransactions: true,
234
237
  p2pBootstrapNodes: [],
235
238
  seqMinTxsPerBlock: 0,
236
- seqMaxTxsPerBlock: 20,
239
+ seqMaxTxsPerBlock: 0,
237
240
  realProofs: true,
238
241
  snapshotsUrls: [`${SNAPSHOTS_URL}/testnet/`],
239
242
  autoUpdate: 'config-and-version',
@@ -268,7 +271,7 @@ export const testnetL2ChainConfig: L2ChainConfig = {
268
271
  /** Governance proposing round size */
269
272
  governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
270
273
  /** The mana target for the rollup */
271
- manaTarget: DefaultL1ContractsConfig.manaTarget,
274
+ manaTarget: 0n,
272
275
  /** The proving cost per mana */
273
276
  provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
274
277
  /** Exit delay for stakers */
@@ -282,18 +285,19 @@ export const testnetL2ChainConfig: L2ChainConfig = {
282
285
  ...DefaultNetworkDBMapSizeConfig,
283
286
  };
284
287
 
285
- export const ignitionL2ChainConfig: L2ChainConfig = {
288
+ export const mainnetL2ChainConfig: L2ChainConfig = {
286
289
  l1ChainId: 1,
287
290
  testAccounts: false,
288
291
  sponsoredFPC: false,
289
292
  p2pEnabled: true,
293
+ disableTransactions: true,
290
294
  p2pBootstrapNodes: [],
291
295
  seqMinTxsPerBlock: 0,
292
296
  seqMaxTxsPerBlock: 0,
293
297
  realProofs: true,
294
- snapshotsUrls: [`${SNAPSHOTS_URL}/ignition/`],
298
+ snapshotsUrls: [`${SNAPSHOTS_URL}/mainnet/`],
295
299
  autoUpdate: 'notify',
296
- autoUpdateUrl: 'https://storage.googleapis.com/aztec-testnet/auto-update/ignition.json',
300
+ autoUpdateUrl: 'https://storage.googleapis.com/aztec-mainnet/auto-update/mainnet.json',
297
301
  maxTxPoolSize: 100_000_000, // 100MB
298
302
  publicIncludeMetrics,
299
303
  publicMetricsCollectorUrl: 'https://telemetry.alpha-testnet.aztec-labs.com/v1/metrics',
@@ -363,22 +367,7 @@ export const ignitionL2ChainConfig: L2ChainConfig = {
363
367
  ...DefaultNetworkDBMapSizeConfig,
364
368
  };
365
369
 
366
- const BOOTNODE_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour;
367
-
368
- export async function getBootnodes(networkName: NetworkNames, cacheDir?: string) {
369
- const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
370
- const data = await cachedFetch(url, {
371
- cacheDurationMs: BOOTNODE_CACHE_DURATION_MS,
372
- cacheFile: cacheDir ? join(cacheDir, networkName, 'bootnodes.json') : undefined,
373
- });
374
-
375
- return data?.bootnodes;
376
- }
377
-
378
- export async function getL2ChainConfig(
379
- networkName: NetworkNames,
380
- cacheDir?: string,
381
- ): Promise<L2ChainConfig | undefined> {
370
+ export function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined {
382
371
  let config: L2ChainConfig | undefined;
383
372
  if (networkName === 'staging-public') {
384
373
  config = { ...stagingPublicL2ChainConfig };
@@ -386,16 +375,8 @@ export async function getL2ChainConfig(
386
375
  config = { ...testnetL2ChainConfig };
387
376
  } else if (networkName === 'staging-ignition') {
388
377
  config = { ...stagingIgnitionL2ChainConfig };
389
- } else if (networkName === 'ignition') {
390
- config = { ...ignitionL2ChainConfig };
391
- }
392
- if (!config) {
393
- return undefined;
394
- }
395
- // If the bootnodes are not set, get them from the network
396
- const bootnodeKey: EnvVar = 'BOOTSTRAP_NODES';
397
- if (!process.env[bootnodeKey]) {
398
- config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
378
+ } else if (networkName === 'mainnet') {
379
+ config = { ...mainnetL2ChainConfig };
399
380
  }
400
381
  return config;
401
382
  }
@@ -404,14 +385,13 @@ function getDefaultDataDir(networkName: NetworkNames): string {
404
385
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
405
386
  }
406
387
 
407
- export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
388
+ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
408
389
  if (networkName === 'local') {
409
390
  return;
410
391
  }
411
392
 
412
393
  enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
413
- const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
414
- const config = await getL2ChainConfig(networkName, cacheDir);
394
+ const config = getL2ChainConfig(networkName);
415
395
 
416
396
  if (!config) {
417
397
  throw new Error(`Unknown network name: ${networkName}`);
@@ -496,4 +476,5 @@ export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames
496
476
  enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
497
477
 
498
478
  enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
479
+ enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
499
480
  }
@@ -109,6 +109,7 @@ export async function deployNewRollupContracts(
109
109
  feeJuicePortalInitialBalance: bigint,
110
110
  config: L1ContractsConfig,
111
111
  realVerifier: boolean,
112
+ createVerificationJson: string | false,
112
113
  logger: Logger,
113
114
  ): Promise<{ rollup: RollupContract; slashFactoryAddress: EthAddress }> {
114
115
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
@@ -152,6 +153,7 @@ export async function deployNewRollupContracts(
152
153
  registryAddress,
153
154
  logger,
154
155
  config,
156
+ createVerificationJson,
155
157
  );
156
158
 
157
159
  return { rollup, slashFactoryAddress };
@@ -1,3 +0,0 @@
1
- import type { LogFn, Logger } from '@aztec/foundation/log';
2
- export declare function bootstrapNetwork(pxeUrl: string, l1Urls: string[], l1ChainId: string, l1PrivateKey: `0x${string}` | undefined, l1Mnemonic: string, addressIndex: number, json: boolean, log: LogFn, debugLog: Logger): Promise<void>;
3
- //# sourceMappingURL=bootstrap_network.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootstrap_network.d.ts","sourceRoot":"","sources":["../../../src/cmds/devnet/bootstrap_network.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAqB3D,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,KAAK,MAAM,EAAE,GAAG,SAAS,EACvC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,MAAM,iBAkFjB"}