@aztec/cli 1.0.0-nightly.20250606 → 1.0.0-nightly.20250607

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,4 +1,4 @@
1
- import { type Operator } from '@aztec/ethereum';
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, initialValidators: Operator[], 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, initialValidators: EthAddress[], realVerifier: boolean, 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,QAAQ,EAA+B,MAAM,iBAAiB,CAAC;AAC7E,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,iBAAiB,EAAE,QAAQ,EAAE,EAC7B,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAoDpB"}
1
+ {"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,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,iBAAiB,EAAE,UAAU,EAAE,EAC/B,YAAY,EAAE,OAAO,EACrB,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBA0DpB"}
@@ -3,13 +3,17 @@ import { getL1ContractsConfigEnvVars } from '@aztec/ethereum';
3
3
  import { getGenesisValues } from '@aztec/world-state/testing';
4
4
  import { deployAztecContracts } from '../../utils/aztec.js';
5
5
  import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
6
- export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, acceleratedTestDeployments, json, initialValidators, log, debugLogger) {
6
+ export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, acceleratedTestDeployments, json, initialValidators, realVerifier, 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 { l1ContractAddresses } = await deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, fundingNeeded, acceleratedTestDeployments, config, debugLogger);
12
+ const initialValidatorOperators = initialValidators.map((a)=>({
13
+ attester: a,
14
+ withdrawer: a
15
+ }));
16
+ const { l1ContractAddresses } = await deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidatorOperators, genesisArchiveRoot, fundingNeeded, acceleratedTestDeployments, config, realVerifier, debugLogger);
13
17
  if (json) {
14
18
  log(JSON.stringify(Object.fromEntries(Object.entries(l1ContractAddresses).map(([k, v])=>[
15
19
  k,
@@ -32,7 +36,7 @@ export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic,
32
36
  log(`FeeAssetHandler Address: ${l1ContractAddresses.feeAssetHandlerAddress?.toString()}`);
33
37
  log(`StakingAssetHandler Address: ${l1ContractAddresses.stakingAssetHandlerAddress?.toString()}`);
34
38
  log(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.toString()).join(', ')}`);
35
- log(`Initial validators: ${initialValidators.map((a)=>a.attester.toString()).join(', ')}`);
39
+ log(`Initial validators: ${initialValidators.map((a)=>a.toString()).join(', ')}`);
36
40
  log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
37
41
  }
38
42
  }
@@ -1,5 +1,4 @@
1
- import type { LogFn, Logger } from '@aztec/foundation/log';
2
- import { type Hex } from 'viem';
3
- export declare function deployUltraHonkVerifier(rollupAddress: Hex | undefined, ethRpcUrls: string[], l1ChainId: string, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, pxeRpcUrl: string, log: LogFn, debugLogger: Logger): Promise<void>;
4
- export declare function deployMockVerifier(rollupAddress: Hex | undefined, ethRpcUrls: string[], l1ChainId: string, privateKey: string | undefined, mnemonic: string, pxeRpcUrl: string, log: LogFn, debugLogger: Logger): Promise<void>;
1
+ import type { LogFn } from '@aztec/foundation/log';
2
+ export declare function deployUltraHonkVerifier(ethRpcUrls: string[], l1ChainId: string, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, log: LogFn): Promise<void>;
3
+ export declare function deployMockVerifier(ethRpcUrls: string[], l1ChainId: string, privateKey: string | undefined, mnemonic: string, log: LogFn): Promise<void>;
5
4
  //# sourceMappingURL=deploy_l1_verifier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy_l1_verifier.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAG7C,wBAAsB,uBAAuB,CAC3C,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAmCpB;AAED,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,GAAG,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAkCpB"}
1
+ {"version":3,"file":"deploy_l1_verifier.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_verifier.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAKnD,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,KAAK,iBAeX;AAED,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,KAAK,iBAeX"}
@@ -1,55 +1,18 @@
1
- import { createCompatibleClient } from '@aztec/aztec.js';
2
1
  import { createEthereumChain, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
3
2
  import { HonkVerifierAbi, HonkVerifierBytecode } from '@aztec/l1-artifacts';
4
- import { InvalidOptionArgumentError } from 'commander';
5
- import { getContract } from 'viem';
6
3
  import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
7
- export async function deployUltraHonkVerifier(rollupAddress, ethRpcUrls, l1ChainId, privateKey, mnemonic, mnemonicIndex, pxeRpcUrl, log, debugLogger) {
4
+ export async function deployUltraHonkVerifier(ethRpcUrls, l1ChainId, privateKey, mnemonic, mnemonicIndex, log) {
8
5
  const account = !privateKey ? mnemonicToAccount(mnemonic, {
9
6
  addressIndex: mnemonicIndex
10
7
  }) : privateKeyToAccount(`${privateKey.startsWith('0x') ? '' : '0x'}${privateKey}`);
11
8
  const extendedClient = createExtendedL1Client(ethRpcUrls, account, createEthereumChain(ethRpcUrls, l1ChainId).chainInfo);
12
- if (!rollupAddress && pxeRpcUrl) {
13
- const pxe = await createCompatibleClient(pxeRpcUrl, debugLogger);
14
- const { l1ContractAddresses } = await pxe.getNodeInfo();
15
- rollupAddress = l1ContractAddresses.rollupAddress.toString();
16
- }
17
- if (!rollupAddress) {
18
- throw new InvalidOptionArgumentError('Missing rollup address');
19
- }
20
- const { RollupAbi } = await import('@aztec/l1-artifacts');
21
- const rollup = getContract({
22
- abi: RollupAbi,
23
- address: rollupAddress,
24
- client: extendedClient
25
- });
26
9
  const { address: verifierAddress } = await deployL1Contract(extendedClient, HonkVerifierAbi, HonkVerifierBytecode);
27
10
  log(`Deployed honk verifier at ${verifierAddress}`);
28
- await rollup.write.setEpochVerifier([
29
- verifierAddress.toString()
30
- ]);
31
11
  log(`Rollup accepts only real proofs now`);
32
12
  }
33
- export async function deployMockVerifier(rollupAddress, ethRpcUrls, l1ChainId, privateKey, mnemonic, pxeRpcUrl, log, debugLogger) {
13
+ export async function deployMockVerifier(ethRpcUrls, l1ChainId, privateKey, mnemonic, log) {
34
14
  const extendedClient = createExtendedL1Client(ethRpcUrls, privateKey ?? mnemonic, createEthereumChain(ethRpcUrls, l1ChainId).chainInfo);
35
- const { MockVerifierAbi, MockVerifierBytecode, RollupAbi } = await import('@aztec/l1-artifacts');
15
+ const { MockVerifierAbi, MockVerifierBytecode } = await import('@aztec/l1-artifacts');
36
16
  const { address: mockVerifierAddress } = await deployL1Contract(extendedClient, MockVerifierAbi, MockVerifierBytecode);
37
17
  log(`Deployed MockVerifier at ${mockVerifierAddress.toString()}`);
38
- if (!rollupAddress && pxeRpcUrl) {
39
- const pxe = await createCompatibleClient(pxeRpcUrl, debugLogger);
40
- const { l1ContractAddresses } = await pxe.getNodeInfo();
41
- rollupAddress = l1ContractAddresses.rollupAddress.toString();
42
- }
43
- if (!rollupAddress) {
44
- throw new InvalidOptionArgumentError('Missing rollup address');
45
- }
46
- const rollup = getContract({
47
- abi: RollupAbi,
48
- address: rollupAddress,
49
- client: extendedClient
50
- });
51
- await rollup.write.setEpochVerifier([
52
- mockVerifierAddress.toString()
53
- ]);
54
- log(`Rollup accepts only fake proofs now`);
55
18
  }
@@ -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[], 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, 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,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBA6CpB"}
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"}
@@ -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, log, debugLogger) {
6
+ export async function deployNewRollup(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, sponsoredFPC, json, initialValidators, realVerifier, 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, debugLogger);
12
+ const { rollup, slashFactoryAddress } = await deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, fundingNeeded, config, realVerifier, debugLogger);
13
13
  if (json) {
14
14
  log(JSON.stringify({
15
15
  rollupAddress: rollup.address,
@@ -1,5 +1,5 @@
1
1
  import type { LogFn, Logger } from '@aztec/foundation/log';
2
2
  import { type Command } from 'commander';
3
- export { addL1Validator, dripQueue } from './update_l1_validators.js';
3
+ export { addL1ValidatorToQueue, dripQueue } from './update_l1_validators.js';
4
4
  export declare function injectCommands(program: Command, log: LogFn, debugLogger: Logger): Command;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -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,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAWtE,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WA4iB/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;AAG3D,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAajD,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAW7E,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAiiB/E"}
@@ -1,20 +1,21 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
+ import { withoutHexPrefix } from '@aztec/foundation/string';
2
3
  import { Option } from 'commander';
3
- import { ETHEREUM_HOSTS, MNEMONIC, PRIVATE_KEY, l1ChainIdOption, makePxeOption, parseAztecAddress, parseBigint, parseEthereumAddress, pxeOption } from '../../utils/commands.js';
4
- export { addL1Validator, dripQueue } from './update_l1_validators.js';
4
+ import { ETHEREUM_HOSTS, MNEMONIC, PRIVATE_KEY, l1ChainIdOption, parseAztecAddress, parseBigint, parseEthereumAddress, pxeOption } from '../../utils/commands.js';
5
+ export { addL1ValidatorToQueue, dripQueue } from './update_l1_validators.js';
5
6
  const l1RpcUrlsOption = new Option('--l1-rpc-urls <string>', 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)').env('ETHEREUM_HOSTS').default([
6
7
  ETHEREUM_HOSTS
7
8
  ]).makeOptionMandatory(true).argParser((arg)=>arg.split(',').map((url)=>url.trim()));
8
9
  export function injectCommands(program, log, debugLogger) {
9
- 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).action(async (options)=>{
10
+ 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).action(async (options)=>{
10
11
  const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
11
12
  const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
12
- await deployL1Contracts(options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.sponsoredFpc, options.acceleratedTestDeployments, options.json, initialValidators, log, debugLogger);
13
+ await deployL1Contracts(options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.sponsoredFpc, options.acceleratedTestDeployments, options.json, initialValidators, options.realVerifier, log, debugLogger);
13
14
  });
14
- 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').action(async (options)=>{
15
+ 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)=>{
15
16
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
16
17
  const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
17
- await deployNewRollup(options.registryAddress, options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.sponsoredFpc, options.json, initialValidators, log, debugLogger);
18
+ 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);
18
19
  });
19
20
  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)=>{
20
21
  const { depositGovernanceTokens } = await import('./governance_utils.js');
@@ -94,15 +95,16 @@ export function injectCommands(program, log, debugLogger) {
94
95
  const account = generateL1Account();
95
96
  log(JSON.stringify(account, null, 2));
96
97
  });
97
- program.command('add-l1-validator').description('Adds a validator to the L1 rollup contract.').addOption(l1RpcUrlsOption).option('-pk, --private-key <string>', 'The private key to use sending the transaction', PRIVATE_KEY).option('-m, --mnemonic <string>', 'The mnemonic to use sending the transaction', 'test test test test test test test test test test test junk').addOption(l1ChainIdOption).option('--attester <address>', 'ethereum address of the attester', parseEthereumAddress).option('--staking-asset-handler <address>', 'ethereum address of the staking asset handler', parseEthereumAddress).action(async (options)=>{
98
- const { addL1Validator } = await import('./update_l1_validators.js');
99
- await addL1Validator({
98
+ program.command('add-l1-validator-to-queue').description('Adds a validator to the L1 rollup contract.').addOption(l1RpcUrlsOption).option('-pk, --private-key <string>', 'The private key to use sending the transaction', PRIVATE_KEY).option('-m, --mnemonic <string>', 'The mnemonic to use sending the transaction', 'test test test test test test test test test test test junk').addOption(l1ChainIdOption).option('--attester <address>', 'ethereum address of the attester', parseEthereumAddress).option('--staking-asset-handler <address>', 'ethereum address of the staking asset handler', parseEthereumAddress).option('--proof <buffer>', 'The proof to use for the attestation', (arg)=>Buffer.from(withoutHexPrefix(arg), 'hex')).action(async (options)=>{
99
+ const { addL1ValidatorToQueue } = await import('./update_l1_validators.js');
100
+ await addL1ValidatorToQueue({
100
101
  rpcUrls: options.l1RpcUrls,
101
102
  chainId: options.l1ChainId,
102
103
  privateKey: options.privateKey,
103
104
  mnemonic: options.mnemonic,
104
105
  attesterAddress: options.attester,
105
106
  stakingAssetHandlerAddress: options.stakingAssetHandler,
107
+ proofParams: options.proof,
106
108
  log,
107
109
  debugLogger
108
110
  });
@@ -166,12 +168,12 @@ export function injectCommands(program, log, debugLogger) {
166
168
  debugLogger
167
169
  });
168
170
  });
169
- program.command('deploy-l1-verifier').description('Deploys the rollup verifier contract').addOption(l1RpcUrlsOption).addOption(l1ChainIdOption).addOption(makePxeOption(false).conflicts('rollup-address')).addOption(new Option('--rollup-address <string>', 'The address of the rollup contract').env('ROLLUP_CONTRACT_ADDRESS').argParser(parseEthereumAddress).conflicts('rpc-url')).option('--l1-private-key <string>', 'The L1 private key to use for deployment', PRIVATE_KEY).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).requiredOption('--verifier <verifier>', 'Either mock or real', 'real').action(async (options)=>{
171
+ program.command('deploy-l1-verifier').description('Deploys the rollup verifier contract').addOption(l1RpcUrlsOption).addOption(l1ChainIdOption).option('--l1-private-key <string>', 'The L1 private key to use for deployment', PRIVATE_KEY).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).requiredOption('--verifier <verifier>', 'Either mock or real', 'real').action(async (options)=>{
170
172
  const { deployMockVerifier, deployUltraHonkVerifier } = await import('./deploy_l1_verifier.js');
171
173
  if (options.verifier === 'mock') {
172
- await deployMockVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, log, debugLogger);
174
+ await deployMockVerifier(options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, log);
173
175
  } else {
174
- await deployUltraHonkVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.mnemonicIndex, options.rpcUrl, log, debugLogger);
176
+ await deployUltraHonkVerifier(options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.mnemonicIndex, log);
175
177
  }
176
178
  });
177
179
  program.command('bridge-erc20').description('Bridges ERC20 tokens to L2.').argument('<amount>', 'The amount of Fee Juice to mint and bridge.', parseBigint).argument('<recipient>', 'Aztec address of the recipient.', parseAztecAddress).addOption(l1RpcUrlsOption).option('-m, --mnemonic <string>', 'The mnemonic to use for deriving the Ethereum address that will mint and bridge', 'test test test test test test test test test test test junk').option('--mint', 'Mint the tokens on L1', false).option('--private', 'If the bridge should use the private flow', false).addOption(l1ChainIdOption).requiredOption('-t, --token <string>', 'The address of the token to bridge', parseEthereumAddress).requiredOption('-p, --portal <string>', 'The address of the portal contract', parseEthereumAddress).option('-f, --faucet <string>', 'The address of the faucet contract (only used if minting)', parseEthereumAddress).option('--l1-private-key <string>', 'The private key to use for deployment', PRIVATE_KEY).option('--json', 'Output the claim in JSON format').action(async (amount, recipient, options)=>{
@@ -23,8 +23,9 @@ export declare function generateL1Account(): {
23
23
  privateKey: `0x${string}`;
24
24
  address: `0x${string}`;
25
25
  };
26
- export declare function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, attesterAddress, stakingAssetHandlerAddress, log, debugLogger, }: StakingAssetHandlerCommandArgs & LoggerArgs & {
26
+ export declare function addL1ValidatorToQueue({ rpcUrls, chainId, privateKey, mnemonic, attesterAddress, stakingAssetHandlerAddress, proofParams, log, debugLogger, }: StakingAssetHandlerCommandArgs & LoggerArgs & {
27
27
  attesterAddress: EthAddress;
28
+ proofParams: Buffer;
28
29
  }): Promise<void>;
29
30
  export declare function dripQueue({ rpcUrls, chainId, privateKey, mnemonic, stakingAssetHandlerAddress, log, debugLogger, }: StakingAssetHandlerCommandArgs & LoggerArgs): Promise<void>;
30
31
  export declare function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, rollupAddress, log, debugLogger, }: RollupCommandArgs & LoggerArgs & {
@@ -1 +1 @@
1
- {"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAM3D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,UAAU,CAAC;IAC1B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B,EAAE,UAAU,CAAC;CACxC;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,KAAK,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB;;;EAQhC;AAED,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,0BAA0B,EAC1B,GAAG,EACH,WAAW,GACZ,EAAE,8BAA8B,GAAG,UAAU,GAAG;IAAE,eAAe,EAAE,UAAU,CAAA;CAAE,iBAuC/E;AAED,wBAAsB,SAAS,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,0BAA0B,EAC1B,GAAG,EACH,WAAW,GACZ,EAAE,8BAA8B,GAAG,UAAU,iBA0B7C;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,gBAAgB,EAAE,UAAU,CAAA;CAAE,iBAiBnE;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,iBAgBhC;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,iBAyBxD;AAED,wBAAsB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,iBAAiB,GAAG,UAAU,iBAwBzG"}
1
+ {"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAO3D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,UAAU,CAAC;IAC1B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B,EAAE,UAAU,CAAC;CACxC;AAED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endedL1Client, getL1ContractsConfigEnvVars, getPublicClient, isAnvilTestChain } from '@aztec/ethereum';
2
2
  import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
3
+ import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
3
4
  import { encodeFunctionData, formatEther, getContract } from 'viem';
4
5
  import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
5
6
  export function generateL1Account() {
@@ -11,7 +12,7 @@ export function generateL1Account() {
11
12
  address: account.address
12
13
  };
13
14
  }
14
- export async function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, attesterAddress, stakingAssetHandlerAddress, log, debugLogger }) {
15
+ export async function addL1ValidatorToQueue({ rpcUrls, chainId, privateKey, mnemonic, attesterAddress, stakingAssetHandlerAddress, proofParams, log, debugLogger }) {
15
16
  const dualLog = makeDualLog(log, debugLogger);
16
17
  const account = getAccount(privateKey, mnemonic);
17
18
  const chain = createEthereumChain(rpcUrls, chainId);
@@ -22,15 +23,17 @@ export async function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, a
22
23
  client: l1Client
23
24
  });
24
25
  const rollup = await stakingAssetHandler.read.getRollup();
25
- dualLog(`Adding validator (${attesterAddress} to rollup ${rollup.toString()}`);
26
+ dualLog(`Adding validator ${attesterAddress} to rollup ${rollup.toString()}`);
26
27
  const l1TxUtils = new L1TxUtils(l1Client, debugLogger);
28
+ const proofParamsObj = ZkPassportProofParams.fromBuffer(proofParams);
27
29
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
28
30
  to: stakingAssetHandlerAddress.toString(),
29
31
  data: encodeFunctionData({
30
32
  abi: StakingAssetHandlerAbi,
31
- functionName: 'addValidator',
33
+ functionName: 'addValidatorToQueue',
32
34
  args: [
33
- attesterAddress.toString()
35
+ attesterAddress.toString(),
36
+ proofParamsObj.toViem()
34
37
  ]
35
38
  }),
36
39
  abi: StakingAssetHandlerAbi
@@ -18,8 +18,8 @@ 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, 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, logger: Logger): Promise<{
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, 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<{
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,2B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GAO3G;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,MAAM,WAK1C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAUtE;AAKD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,iBAyB9E"}
@@ -23,7 +23,7 @@ import { encodeArgs } from './encoding.js';
23
23
  * @param chainId - The chain ID of the L1 host.
24
24
  * @param privateKey - The private key to be used in contract deployment.
25
25
  * @param mnemonic - The mnemonic to be used in contract deployment.
26
- */ export async function deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, acceleratedTestDeployments, config, debugLogger) {
26
+ */ export async function deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, acceleratedTestDeployments, config, realVerifier, debugLogger) {
27
27
  const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
28
28
  const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
29
29
  const account = !privateKey ? mnemonicToAccount(mnemonic, {
@@ -39,10 +39,11 @@ import { encodeArgs } from './encoding.js';
39
39
  initialValidators,
40
40
  acceleratedTestDeployments,
41
41
  feeJuicePortalInitialBalance,
42
+ realVerifier,
42
43
  ...config
43
44
  }, config);
44
45
  }
45
- export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, logger) {
46
+ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, logger) {
46
47
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
47
48
  const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
48
49
  const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
@@ -71,6 +72,7 @@ export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId
71
72
  genesisArchiveRoot,
72
73
  initialValidators,
73
74
  feeJuicePortalInitialBalance,
75
+ realVerifier,
74
76
  ...config
75
77
  }, registryAddress, logger, config);
76
78
  return {
@@ -11,7 +11,7 @@ export async function inspectBlock(pxe, blockNumber, log, opts = {}) {
11
11
  log(`Block ${blockNumber} (${blockHash.toString()})`);
12
12
  log(` Total fees: ${block.header.totalFees.toBigInt()}`);
13
13
  log(` Total mana used: ${block.header.totalManaUsed.toBigInt()}`);
14
- log(` Fee per gas unit: DA=${block.header.globalVariables.gasFees.feePerDaGas.toBigInt()} L2=${block.header.globalVariables.gasFees.feePerL2Gas.toBigInt()}`);
14
+ log(` Fee per gas unit: DA=${block.header.globalVariables.gasFees.feePerDaGas} L2=${block.header.globalVariables.gasFees.feePerL2Gas}`);
15
15
  log(` Coinbase: ${block.header.globalVariables.coinbase}`);
16
16
  log(` Fee recipient: ${block.header.globalVariables.feeRecipient}`);
17
17
  log(` Timestamp: ${new Date(block.header.globalVariables.timestamp.toNumber() * 500)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "1.0.0-nightly.20250606",
3
+ "version": "1.0.0-nightly.20250607",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./contracts": "./dest/cmds/contracts/index.js",
@@ -65,15 +65,15 @@
65
65
  ]
66
66
  },
67
67
  "dependencies": {
68
- "@aztec/archiver": "1.0.0-nightly.20250606",
69
- "@aztec/aztec.js": "1.0.0-nightly.20250606",
70
- "@aztec/constants": "1.0.0-nightly.20250606",
71
- "@aztec/entrypoints": "1.0.0-nightly.20250606",
72
- "@aztec/foundation": "1.0.0-nightly.20250606",
73
- "@aztec/l1-artifacts": "1.0.0-nightly.20250606",
74
- "@aztec/p2p": "1.0.0-nightly.20250606",
75
- "@aztec/stdlib": "1.0.0-nightly.20250606",
76
- "@aztec/world-state": "1.0.0-nightly.20250606",
68
+ "@aztec/archiver": "1.0.0-nightly.20250607",
69
+ "@aztec/aztec.js": "1.0.0-nightly.20250607",
70
+ "@aztec/constants": "1.0.0-nightly.20250607",
71
+ "@aztec/entrypoints": "1.0.0-nightly.20250607",
72
+ "@aztec/foundation": "1.0.0-nightly.20250607",
73
+ "@aztec/l1-artifacts": "1.0.0-nightly.20250607",
74
+ "@aztec/p2p": "1.0.0-nightly.20250607",
75
+ "@aztec/stdlib": "1.0.0-nightly.20250607",
76
+ "@aztec/world-state": "1.0.0-nightly.20250607",
77
77
  "@iarna/toml": "^2.2.5",
78
78
  "@libp2p/peer-id-factory": "^3.0.4",
79
79
  "commander": "^12.1.0",
@@ -85,9 +85,9 @@
85
85
  "viem": "2.23.7"
86
86
  },
87
87
  "devDependencies": {
88
- "@aztec/accounts": "1.0.0-nightly.20250606",
89
- "@aztec/ethereum": "1.0.0-nightly.20250606",
90
- "@aztec/protocol-contracts": "1.0.0-nightly.20250606",
88
+ "@aztec/accounts": "1.0.0-nightly.20250607",
89
+ "@aztec/ethereum": "1.0.0-nightly.20250607",
90
+ "@aztec/protocol-contracts": "1.0.0-nightly.20250607",
91
91
  "@jest/globals": "^29.5.0",
92
92
  "@types/jest": "^29.5.0",
93
93
  "@types/lodash.chunk": "^4.2.9",
@@ -103,15 +103,15 @@
103
103
  "typescript": "^5.3.3"
104
104
  },
105
105
  "peerDependencies": {
106
- "@aztec/accounts": "1.0.0-nightly.20250606",
107
- "@aztec/bb-prover": "1.0.0-nightly.20250606",
108
- "@aztec/ethereum": "1.0.0-nightly.20250606",
109
- "@aztec/l1-artifacts": "1.0.0-nightly.20250606",
110
- "@aztec/noir-contracts.js": "1.0.0-nightly.20250606",
111
- "@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250606",
112
- "@aztec/noir-test-contracts.js": "1.0.0-nightly.20250606",
113
- "@aztec/protocol-contracts": "1.0.0-nightly.20250606",
114
- "@aztec/stdlib": "1.0.0-nightly.20250606"
106
+ "@aztec/accounts": "1.0.0-nightly.20250607",
107
+ "@aztec/bb-prover": "1.0.0-nightly.20250607",
108
+ "@aztec/ethereum": "1.0.0-nightly.20250607",
109
+ "@aztec/l1-artifacts": "1.0.0-nightly.20250607",
110
+ "@aztec/noir-contracts.js": "1.0.0-nightly.20250607",
111
+ "@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250607",
112
+ "@aztec/noir-test-contracts.js": "1.0.0-nightly.20250607",
113
+ "@aztec/protocol-contracts": "1.0.0-nightly.20250607",
114
+ "@aztec/stdlib": "1.0.0-nightly.20250607"
115
115
  },
116
116
  "files": [
117
117
  "dest",
@@ -1,4 +1,5 @@
1
1
  import { getInitialTestAccounts } from '@aztec/accounts/testing';
2
+ import type { EthAddress } from '@aztec/aztec.js';
2
3
  import { type Operator, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
3
4
  import type { LogFn, Logger } from '@aztec/foundation/log';
4
5
  import { getGenesisValues } from '@aztec/world-state/testing';
@@ -17,7 +18,8 @@ export async function deployL1Contracts(
17
18
  sponsoredFPC: boolean,
18
19
  acceleratedTestDeployments: boolean,
19
20
  json: boolean,
20
- initialValidators: Operator[],
21
+ initialValidators: EthAddress[],
22
+ realVerifier: boolean,
21
23
  log: LogFn,
22
24
  debugLogger: Logger,
23
25
  ) {
@@ -28,6 +30,11 @@ export async function deployL1Contracts(
28
30
  const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddress);
29
31
  const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
30
32
 
33
+ const initialValidatorOperators = initialValidators.map(a => ({
34
+ attester: a,
35
+ withdrawer: a,
36
+ })) as Operator[];
37
+
31
38
  const { l1ContractAddresses } = await deployAztecContracts(
32
39
  rpcUrls,
33
40
  chainId,
@@ -35,11 +42,12 @@ export async function deployL1Contracts(
35
42
  mnemonic,
36
43
  mnemonicIndex,
37
44
  salt,
38
- initialValidators,
45
+ initialValidatorOperators,
39
46
  genesisArchiveRoot,
40
47
  fundingNeeded,
41
48
  acceleratedTestDeployments,
42
49
  config,
50
+ realVerifier,
43
51
  debugLogger,
44
52
  );
45
53
 
@@ -68,7 +76,7 @@ export async function deployL1Contracts(
68
76
  log(`FeeAssetHandler Address: ${l1ContractAddresses.feeAssetHandlerAddress?.toString()}`);
69
77
  log(`StakingAssetHandler Address: ${l1ContractAddresses.stakingAssetHandlerAddress?.toString()}`);
70
78
  log(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
71
- log(`Initial validators: ${initialValidators.map(a => a.attester.toString()).join(', ')}`);
79
+ log(`Initial validators: ${initialValidators.map(a => a.toString()).join(', ')}`);
72
80
  log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
73
81
  }
74
82
  }
@@ -1,22 +1,16 @@
1
- import { createCompatibleClient } from '@aztec/aztec.js';
2
1
  import { createEthereumChain, createExtendedL1Client, deployL1Contract } from '@aztec/ethereum';
3
- import type { LogFn, Logger } from '@aztec/foundation/log';
2
+ import type { LogFn } from '@aztec/foundation/log';
4
3
  import { HonkVerifierAbi, HonkVerifierBytecode } from '@aztec/l1-artifacts';
5
4
 
6
- import { InvalidOptionArgumentError } from 'commander';
7
- import { type Hex, getContract } from 'viem';
8
5
  import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
9
6
 
10
7
  export async function deployUltraHonkVerifier(
11
- rollupAddress: Hex | undefined,
12
8
  ethRpcUrls: string[],
13
9
  l1ChainId: string,
14
10
  privateKey: string | undefined,
15
11
  mnemonic: string,
16
12
  mnemonicIndex: number,
17
- pxeRpcUrl: string,
18
13
  log: LogFn,
19
- debugLogger: Logger,
20
14
  ) {
21
15
  const account = !privateKey
22
16
  ? mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex })
@@ -27,48 +21,25 @@ export async function deployUltraHonkVerifier(
27
21
  createEthereumChain(ethRpcUrls, l1ChainId).chainInfo,
28
22
  );
29
23
 
30
- if (!rollupAddress && pxeRpcUrl) {
31
- const pxe = await createCompatibleClient(pxeRpcUrl, debugLogger);
32
- const { l1ContractAddresses } = await pxe.getNodeInfo();
33
- rollupAddress = l1ContractAddresses.rollupAddress.toString();
34
- }
35
-
36
- if (!rollupAddress) {
37
- throw new InvalidOptionArgumentError('Missing rollup address');
38
- }
39
-
40
- const { RollupAbi } = await import('@aztec/l1-artifacts');
41
-
42
- const rollup = getContract({
43
- abi: RollupAbi,
44
- address: rollupAddress,
45
- client: extendedClient,
46
- });
47
-
48
24
  const { address: verifierAddress } = await deployL1Contract(extendedClient, HonkVerifierAbi, HonkVerifierBytecode);
49
25
  log(`Deployed honk verifier at ${verifierAddress}`);
50
26
 
51
- await rollup.write.setEpochVerifier([verifierAddress.toString()]);
52
-
53
27
  log(`Rollup accepts only real proofs now`);
54
28
  }
55
29
 
56
30
  export async function deployMockVerifier(
57
- rollupAddress: Hex | undefined,
58
31
  ethRpcUrls: string[],
59
32
  l1ChainId: string,
60
33
  privateKey: string | undefined,
61
34
  mnemonic: string,
62
- pxeRpcUrl: string,
63
35
  log: LogFn,
64
- debugLogger: Logger,
65
36
  ) {
66
37
  const extendedClient = createExtendedL1Client(
67
38
  ethRpcUrls,
68
39
  privateKey ?? mnemonic,
69
40
  createEthereumChain(ethRpcUrls, l1ChainId).chainInfo,
70
41
  );
71
- const { MockVerifierAbi, MockVerifierBytecode, RollupAbi } = await import('@aztec/l1-artifacts');
42
+ const { MockVerifierAbi, MockVerifierBytecode } = await import('@aztec/l1-artifacts');
72
43
 
73
44
  const { address: mockVerifierAddress } = await deployL1Contract(
74
45
  extendedClient,
@@ -76,23 +47,4 @@ export async function deployMockVerifier(
76
47
  MockVerifierBytecode,
77
48
  );
78
49
  log(`Deployed MockVerifier at ${mockVerifierAddress.toString()}`);
79
-
80
- if (!rollupAddress && pxeRpcUrl) {
81
- const pxe = await createCompatibleClient(pxeRpcUrl, debugLogger);
82
- const { l1ContractAddresses } = await pxe.getNodeInfo();
83
- rollupAddress = l1ContractAddresses.rollupAddress.toString();
84
- }
85
-
86
- if (!rollupAddress) {
87
- throw new InvalidOptionArgumentError('Missing rollup address');
88
- }
89
-
90
- const rollup = getContract({
91
- abi: RollupAbi,
92
- address: rollupAddress,
93
- client: extendedClient,
94
- });
95
-
96
- await rollup.write.setEpochVerifier([mockVerifierAddress.toString()]);
97
- log(`Rollup accepts only fake proofs now`);
98
50
  }
@@ -19,6 +19,7 @@ export async function deployNewRollup(
19
19
  sponsoredFPC: boolean,
20
20
  json: boolean,
21
21
  initialValidators: Operator[],
22
+ realVerifier: boolean,
22
23
  log: LogFn,
23
24
  debugLogger: Logger,
24
25
  ) {
@@ -41,6 +42,7 @@ export async function deployNewRollup(
41
42
  genesisArchiveRoot,
42
43
  fundingNeeded,
43
44
  config,
45
+ realVerifier,
44
46
  debugLogger,
45
47
  );
46
48
 
@@ -1,5 +1,6 @@
1
1
  import { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import type { LogFn, Logger } from '@aztec/foundation/log';
3
+ import { withoutHexPrefix } from '@aztec/foundation/string';
3
4
 
4
5
  import { type Command, Option } from 'commander';
5
6
 
@@ -8,14 +9,13 @@ import {
8
9
  MNEMONIC,
9
10
  PRIVATE_KEY,
10
11
  l1ChainIdOption,
11
- makePxeOption,
12
12
  parseAztecAddress,
13
13
  parseBigint,
14
14
  parseEthereumAddress,
15
15
  pxeOption,
16
16
  } from '../../utils/commands.js';
17
17
 
18
- export { addL1Validator, dripQueue } from './update_l1_validators.js';
18
+ export { addL1ValidatorToQueue, dripQueue } from './update_l1_validators.js';
19
19
 
20
20
  const l1RpcUrlsOption = new Option(
21
21
  '--l1-rpc-urls <string>',
@@ -45,6 +45,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
45
45
  .option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts')
46
46
  .option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
47
47
  .option('--accelerated-test-deployments', 'Fire and forget deployment transactions, use in testing only', false)
48
+ .option('--real-verifier', 'Deploy the real verifier', false)
48
49
  .action(async options => {
49
50
  const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
50
51
 
@@ -62,6 +63,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
62
63
  options.acceleratedTestDeployments,
63
64
  options.json,
64
65
  initialValidators,
66
+ options.realVerifier,
65
67
  log,
66
68
  debugLogger,
67
69
  );
@@ -85,6 +87,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
85
87
  .option('--json', 'Output the contract addresses in JSON format')
86
88
  .option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts')
87
89
  .option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
90
+ .option('--real-verifier', 'Deploy the real verifier', false)
88
91
  .action(async options => {
89
92
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
90
93
 
@@ -102,6 +105,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
102
105
  options.sponsoredFpc,
103
106
  options.json,
104
107
  initialValidators,
108
+ options.realVerifier,
105
109
  log,
106
110
  debugLogger,
107
111
  );
@@ -278,7 +282,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
278
282
  });
279
283
 
280
284
  program
281
- .command('add-l1-validator')
285
+ .command('add-l1-validator-to-queue')
282
286
  .description('Adds a validator to the L1 rollup contract.')
283
287
  .addOption(l1RpcUrlsOption)
284
288
  .option('-pk, --private-key <string>', 'The private key to use sending the transaction', PRIVATE_KEY)
@@ -290,15 +294,19 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
290
294
  .addOption(l1ChainIdOption)
291
295
  .option('--attester <address>', 'ethereum address of the attester', parseEthereumAddress)
292
296
  .option('--staking-asset-handler <address>', 'ethereum address of the staking asset handler', parseEthereumAddress)
297
+ .option('--proof <buffer>', 'The proof to use for the attestation', arg =>
298
+ Buffer.from(withoutHexPrefix(arg), 'hex'),
299
+ )
293
300
  .action(async options => {
294
- const { addL1Validator } = await import('./update_l1_validators.js');
295
- await addL1Validator({
301
+ const { addL1ValidatorToQueue } = await import('./update_l1_validators.js');
302
+ await addL1ValidatorToQueue({
296
303
  rpcUrls: options.l1RpcUrls,
297
304
  chainId: options.l1ChainId,
298
305
  privateKey: options.privateKey,
299
306
  mnemonic: options.mnemonic,
300
307
  attesterAddress: options.attester,
301
308
  stakingAssetHandlerAddress: options.stakingAssetHandler,
309
+ proofParams: options.proof,
302
310
  log,
303
311
  debugLogger,
304
312
  });
@@ -423,13 +431,6 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
423
431
  .description('Deploys the rollup verifier contract')
424
432
  .addOption(l1RpcUrlsOption)
425
433
  .addOption(l1ChainIdOption)
426
- .addOption(makePxeOption(false).conflicts('rollup-address'))
427
- .addOption(
428
- new Option('--rollup-address <string>', 'The address of the rollup contract')
429
- .env('ROLLUP_CONTRACT_ADDRESS')
430
- .argParser(parseEthereumAddress)
431
- .conflicts('rpc-url'),
432
- )
433
434
  .option('--l1-private-key <string>', 'The L1 private key to use for deployment', PRIVATE_KEY)
434
435
  .option(
435
436
  '-m, --mnemonic <string>',
@@ -441,27 +442,15 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
441
442
  .action(async options => {
442
443
  const { deployMockVerifier, deployUltraHonkVerifier } = await import('./deploy_l1_verifier.js');
443
444
  if (options.verifier === 'mock') {
444
- await deployMockVerifier(
445
- options.rollupAddress?.toString(),
446
- options.l1RpcUrls,
447
- options.l1ChainId,
448
- options.l1PrivateKey,
449
- options.mnemonic,
450
- options.rpcUrl,
451
- log,
452
- debugLogger,
453
- );
445
+ await deployMockVerifier(options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, log);
454
446
  } else {
455
447
  await deployUltraHonkVerifier(
456
- options.rollupAddress?.toString(),
457
448
  options.l1RpcUrls,
458
449
  options.l1ChainId,
459
450
  options.l1PrivateKey,
460
451
  options.mnemonic,
461
452
  options.mnemonicIndex,
462
- options.rpcUrl,
463
453
  log,
464
- debugLogger,
465
454
  );
466
455
  }
467
456
  });
@@ -11,6 +11,7 @@ import {
11
11
  import type { EthAddress } from '@aztec/foundation/eth-address';
12
12
  import type { LogFn, Logger } from '@aztec/foundation/log';
13
13
  import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
14
+ import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
14
15
 
15
16
  import { encodeFunctionData, formatEther, getContract } from 'viem';
16
17
  import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
@@ -47,16 +48,17 @@ export function generateL1Account() {
47
48
  };
48
49
  }
49
50
 
50
- export async function addL1Validator({
51
+ export async function addL1ValidatorToQueue({
51
52
  rpcUrls,
52
53
  chainId,
53
54
  privateKey,
54
55
  mnemonic,
55
56
  attesterAddress,
56
57
  stakingAssetHandlerAddress,
58
+ proofParams,
57
59
  log,
58
60
  debugLogger,
59
- }: StakingAssetHandlerCommandArgs & LoggerArgs & { attesterAddress: EthAddress }) {
61
+ }: StakingAssetHandlerCommandArgs & LoggerArgs & { attesterAddress: EthAddress; proofParams: Buffer }) {
60
62
  const dualLog = makeDualLog(log, debugLogger);
61
63
  const account = getAccount(privateKey, mnemonic);
62
64
  const chain = createEthereumChain(rpcUrls, chainId);
@@ -69,16 +71,17 @@ export async function addL1Validator({
69
71
  });
70
72
 
71
73
  const rollup = await stakingAssetHandler.read.getRollup();
72
- dualLog(`Adding validator (${attesterAddress} to rollup ${rollup.toString()}`);
74
+ dualLog(`Adding validator ${attesterAddress} to rollup ${rollup.toString()}`);
73
75
 
74
76
  const l1TxUtils = new L1TxUtils(l1Client, debugLogger);
77
+ const proofParamsObj = ZkPassportProofParams.fromBuffer(proofParams);
75
78
 
76
79
  const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
77
80
  to: stakingAssetHandlerAddress.toString(),
78
81
  data: encodeFunctionData({
79
82
  abi: StakingAssetHandlerAbi,
80
- functionName: 'addValidator',
81
- args: [attesterAddress.toString()],
83
+ functionName: 'addValidatorToQueue',
84
+ args: [attesterAddress.toString(), proofParamsObj.toViem()],
82
85
  }),
83
86
  abi: StakingAssetHandlerAbi,
84
87
  });
@@ -56,6 +56,7 @@ export async function deployAztecContracts(
56
56
  feeJuicePortalInitialBalance: bigint,
57
57
  acceleratedTestDeployments: boolean,
58
58
  config: L1ContractsConfig,
59
+ realVerifier: boolean,
59
60
  debugLogger: Logger,
60
61
  ): Promise<DeployL1ContractsReturnType> {
61
62
  const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
@@ -81,6 +82,7 @@ export async function deployAztecContracts(
81
82
  initialValidators,
82
83
  acceleratedTestDeployments,
83
84
  feeJuicePortalInitialBalance,
85
+ realVerifier,
84
86
  ...config,
85
87
  },
86
88
  config,
@@ -99,6 +101,7 @@ export async function deployNewRollupContracts(
99
101
  genesisArchiveRoot: Fr,
100
102
  feeJuicePortalInitialBalance: bigint,
101
103
  config: L1ContractsConfig,
104
+ realVerifier: boolean,
102
105
  logger: Logger,
103
106
  ): Promise<{ rollup: RollupContract; slashFactoryAddress: EthAddress }> {
104
107
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
@@ -127,6 +130,7 @@ export async function deployNewRollupContracts(
127
130
  genesisArchiveRoot,
128
131
  initialValidators,
129
132
  feeJuicePortalInitialBalance,
133
+ realVerifier,
130
134
  ...config,
131
135
  },
132
136
  registryAddress,
@@ -18,7 +18,7 @@ export async function inspectBlock(pxe: PXE, blockNumber: number, log: LogFn, op
18
18
  log(` Total fees: ${block.header.totalFees.toBigInt()}`);
19
19
  log(` Total mana used: ${block.header.totalManaUsed.toBigInt()}`);
20
20
  log(
21
- ` Fee per gas unit: DA=${block.header.globalVariables.gasFees.feePerDaGas.toBigInt()} L2=${block.header.globalVariables.gasFees.feePerL2Gas.toBigInt()}`,
21
+ ` Fee per gas unit: DA=${block.header.globalVariables.gasFees.feePerDaGas} L2=${block.header.globalVariables.gasFees.feePerL2Gas}`,
22
22
  );
23
23
  log(` Coinbase: ${block.header.globalVariables.coinbase}`);
24
24
  log(` Fee recipient: ${block.header.globalVariables.feeRecipient}`);