@aztec/cli 0.82.2-alpha-testnet.2 → 0.82.2-alpha-testnet.4

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 +1 @@
1
- {"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_contracts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,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,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAgDpB"}
1
+ {"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_l1_contracts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,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,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAsDpB"}
@@ -8,6 +8,11 @@ export async function deployL1Contracts(rpcUrls, chainId, privateKey, mnemonic,
8
8
  const initialFundedAccounts = testAccounts ? await getInitialTestAccounts() : [];
9
9
  const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
10
10
  const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address).concat(sponsoredFPCAddress));
11
+ log(`Deploying Aztec contracts to chain ${chainId}...`);
12
+ log(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.address.toString()).join(', ')}`);
13
+ log(`Initial validators: ${initialValidators.map((a)=>a.toString()).join(', ')}`);
14
+ log(`Genesis block hash: ${genesisBlockHash.toString()}`);
15
+ log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
11
16
  const { l1ContractAddresses } = await deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, genesisBlockHash, acceleratedTestDeployments, config, debugLogger);
12
17
  if (json) {
13
18
  log(JSON.stringify(Object.fromEntries(Object.entries(l1ContractAddresses).map(([k, v])=>[
@@ -1,5 +1,5 @@
1
1
  import type { LogFn, Logger } from '@aztec/foundation/log';
2
2
  import { type Hex } from 'viem';
3
- export declare function deployUltraHonkVerifier(rollupAddress: Hex | undefined, ethRpcUrls: string[], l1ChainId: string, privateKey: string | undefined, mnemonic: string, pxeRpcUrl: string, bbBinaryPath: string, bbWorkingDirectory: string, log: LogFn, debugLogger: Logger): Promise<void>;
3
+ export declare function deployUltraHonkVerifier(rollupAddress: Hex | undefined, ethRpcUrls: string[], l1ChainId: string, privateKey: string | undefined, mnemonic: string, pxeRpcUrl: string, log: LogFn, debugLogger: Logger): Promise<void>;
4
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>;
5
5
  //# 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;AAE7C,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,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAyCpB;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,iBAmCpB"}
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;AAE7C,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,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAqCpB;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,iBAmCpB"}
@@ -3,10 +3,7 @@ import { createEthereumChain, createL1Clients, deployL1Contract } from '@aztec/e
3
3
  import { HonkVerifierAbi, HonkVerifierBytecode } from '@aztec/l1-artifacts';
4
4
  import { InvalidOptionArgumentError } from 'commander';
5
5
  import { getContract } from 'viem';
6
- export async function deployUltraHonkVerifier(rollupAddress, ethRpcUrls, l1ChainId, privateKey, mnemonic, pxeRpcUrl, bbBinaryPath, bbWorkingDirectory, log, debugLogger) {
7
- if (!bbBinaryPath || !bbWorkingDirectory) {
8
- throw new InvalidOptionArgumentError('Missing path to bb binary and working directory');
9
- }
6
+ export async function deployUltraHonkVerifier(rollupAddress, ethRpcUrls, l1ChainId, privateKey, mnemonic, pxeRpcUrl, log, debugLogger) {
10
7
  const { publicClient, walletClient } = createL1Clients(ethRpcUrls, privateKey ?? mnemonic, createEthereumChain(ethRpcUrls, l1ChainId).chainInfo);
11
8
  if (!rollupAddress && pxeRpcUrl) {
12
9
  const pxe = await createCompatibleClient(pxeRpcUrl, debugLogger);
@@ -1,4 +1,4 @@
1
1
  import type { EthAddress } from '@aztec/foundation/eth-address';
2
2
  import type { LogFn, Logger } from '@aztec/foundation/log';
3
- export declare function deployNewRollup(registryAddress: EthAddress, rpcUrls: string[], chainId: number, privateKey: string | undefined, mnemonic: string, mnemonicIndex: number, salt: number | undefined, testAccounts: boolean, json: boolean, initialValidators: EthAddress[], log: LogFn, debugLogger: Logger): Promise<void>;
3
+ 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: EthAddress[], log: LogFn, debugLogger: Logger): Promise<void>;
4
4
  //# 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":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAK3D,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,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,UAAU,EAAE,EAC/B,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBAqCpB"}
1
+ {"version":3,"file":"deploy_new_rollup.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/deploy_new_rollup.ts"],"names":[],"mappings":"AAEA,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,UAAU,EAAE,EAC/B,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,iBA8CpB"}
@@ -2,10 +2,17 @@ import { getInitialTestAccounts } from '@aztec/accounts/testing';
2
2
  import { getL1ContractsConfigEnvVars } from '@aztec/ethereum';
3
3
  import { getGenesisValues } from '@aztec/world-state/testing';
4
4
  import { deployNewRollupContracts } from '../../utils/aztec.js';
5
- export async function deployNewRollup(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, json, initialValidators, log, debugLogger) {
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
7
  const config = getL1ContractsConfigEnvVars();
7
8
  const initialFundedAccounts = testAccounts ? await getInitialTestAccounts() : [];
8
- const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address));
9
+ const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
10
+ const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address).concat(sponsoredFPCAddress));
11
+ log(`Deploying new rollup contracts to chain ${chainId}...`);
12
+ log(`Initial funded accounts: ${initialFundedAccounts.map((a)=>a.address.toString()).join(', ')}`);
13
+ log(`Initial validators: ${initialValidators.map((a)=>a.toString()).join(', ')}`);
14
+ log(`Genesis block hash: ${genesisBlockHash.toString()}`);
15
+ log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
9
16
  const { payloadAddress, rollup } = await deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, genesisBlockHash, config, debugLogger);
10
17
  if (json) {
11
18
  log(JSON.stringify({
@@ -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;AAsBjD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAwhB/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;AAsBjD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAohB/E"}
@@ -5,16 +5,15 @@ const l1RpcUrlsOption = new Option('--l1-rpc-urls <string>', 'List of Ethereum h
5
5
  ETHEREUM_HOSTS
6
6
  ]).makeOptionMandatory(true).argParser((arg)=>arg.split(',').map((url)=>url.trim()));
7
7
  export function injectCommands(program, log, debugLogger) {
8
- const { BB_BINARY_PATH, BB_WORKING_DIRECTORY } = process.env;
9
8
  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
9
  const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
11
10
  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);
11
+ 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
12
  });
14
- program.command('deploy-new-rollup').description('Deploys a new rollup contract and a payload to upgrade the registry with it.').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', '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').action(async (options)=>{
13
+ program.command('deploy-new-rollup').description('Deploys a new rollup contract and a payload to upgrade the registry with it.').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', '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
14
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
16
15
  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.json, initialValidators, log, debugLogger);
16
+ 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
17
  });
19
18
  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
19
  const { depositGovernanceTokens } = await import('./governance_utils.js');
@@ -156,12 +155,12 @@ export function injectCommands(program, log, debugLogger) {
156
155
  debugLogger
157
156
  });
158
157
  });
159
- 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').requiredOption('--verifier <verifier>', 'Either mock or real', 'real').option('--bb <path>', 'Path to bb binary', BB_BINARY_PATH).option('--bb-working-dir <path>', 'Path to bb working directory', BB_WORKING_DIRECTORY).action(async (options)=>{
158
+ 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').requiredOption('--verifier <verifier>', 'Either mock or real', 'real').action(async (options)=>{
160
159
  const { deployMockVerifier, deployUltraHonkVerifier } = await import('./deploy_l1_verifier.js');
161
160
  if (options.verifier === 'mock') {
162
161
  await deployMockVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, log, debugLogger);
163
162
  } else {
164
- await deployUltraHonkVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, options.bb, options.bbWorkingDir, log, debugLogger);
163
+ await deployUltraHonkVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, log, debugLogger);
165
164
  }
166
165
  });
167
166
  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)=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "0.82.2-alpha-testnet.2",
3
+ "version": "0.82.2-alpha-testnet.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./contracts": "./dest/cmds/contracts/index.js",
@@ -67,15 +67,15 @@
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@aztec/archiver": "0.82.2-alpha-testnet.2",
71
- "@aztec/aztec.js": "0.82.2-alpha-testnet.2",
72
- "@aztec/constants": "0.82.2-alpha-testnet.2",
73
- "@aztec/entrypoints": "0.82.2-alpha-testnet.2",
74
- "@aztec/foundation": "0.82.2-alpha-testnet.2",
75
- "@aztec/l1-artifacts": "0.82.2-alpha-testnet.2",
76
- "@aztec/p2p": "0.82.2-alpha-testnet.2",
77
- "@aztec/stdlib": "0.82.2-alpha-testnet.2",
78
- "@aztec/world-state": "0.82.2-alpha-testnet.2",
70
+ "@aztec/archiver": "0.82.2-alpha-testnet.4",
71
+ "@aztec/aztec.js": "0.82.2-alpha-testnet.4",
72
+ "@aztec/constants": "0.82.2-alpha-testnet.4",
73
+ "@aztec/entrypoints": "0.82.2-alpha-testnet.4",
74
+ "@aztec/foundation": "0.82.2-alpha-testnet.4",
75
+ "@aztec/l1-artifacts": "0.82.2-alpha-testnet.4",
76
+ "@aztec/p2p": "0.82.2-alpha-testnet.4",
77
+ "@aztec/stdlib": "0.82.2-alpha-testnet.4",
78
+ "@aztec/world-state": "0.82.2-alpha-testnet.4",
79
79
  "@iarna/toml": "^2.2.5",
80
80
  "@libp2p/peer-id-factory": "^3.0.4",
81
81
  "commander": "^12.1.0",
@@ -87,9 +87,9 @@
87
87
  "viem": "2.23.7"
88
88
  },
89
89
  "devDependencies": {
90
- "@aztec/accounts": "0.82.2-alpha-testnet.2",
91
- "@aztec/ethereum": "0.82.2-alpha-testnet.2",
92
- "@aztec/protocol-contracts": "0.82.2-alpha-testnet.2",
90
+ "@aztec/accounts": "0.82.2-alpha-testnet.4",
91
+ "@aztec/ethereum": "0.82.2-alpha-testnet.4",
92
+ "@aztec/protocol-contracts": "0.82.2-alpha-testnet.4",
93
93
  "@jest/globals": "^29.5.0",
94
94
  "@types/jest": "^29.5.0",
95
95
  "@types/lodash.chunk": "^4.2.9",
@@ -105,14 +105,14 @@
105
105
  "typescript": "^5.0.4"
106
106
  },
107
107
  "peerDependencies": {
108
- "@aztec/accounts": "0.82.2-alpha-testnet.2",
109
- "@aztec/bb-prover": "0.82.2-alpha-testnet.2",
110
- "@aztec/ethereum": "0.82.2-alpha-testnet.2",
111
- "@aztec/l1-artifacts": "0.82.2-alpha-testnet.2",
112
- "@aztec/noir-contracts.js": "0.82.2-alpha-testnet.2",
113
- "@aztec/noir-protocol-circuits-types": "0.82.2-alpha-testnet.2",
114
- "@aztec/protocol-contracts": "0.82.2-alpha-testnet.2",
115
- "@aztec/stdlib": "0.82.2-alpha-testnet.2"
108
+ "@aztec/accounts": "0.82.2-alpha-testnet.4",
109
+ "@aztec/bb-prover": "0.82.2-alpha-testnet.4",
110
+ "@aztec/ethereum": "0.82.2-alpha-testnet.4",
111
+ "@aztec/l1-artifacts": "0.82.2-alpha-testnet.4",
112
+ "@aztec/noir-contracts.js": "0.82.2-alpha-testnet.4",
113
+ "@aztec/noir-protocol-circuits-types": "0.82.2-alpha-testnet.4",
114
+ "@aztec/protocol-contracts": "0.82.2-alpha-testnet.4",
115
+ "@aztec/stdlib": "0.82.2-alpha-testnet.4"
116
116
  },
117
117
  "files": [
118
118
  "dest",
@@ -30,6 +30,12 @@ export async function deployL1Contracts(
30
30
  initialFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
31
31
  );
32
32
 
33
+ log(`Deploying Aztec contracts to chain ${chainId}...`);
34
+ log(`Initial funded accounts: ${initialFundedAccounts.map(a => a.address.toString()).join(', ')}`);
35
+ log(`Initial validators: ${initialValidators.map(a => a.toString()).join(', ')}`);
36
+ log(`Genesis block hash: ${genesisBlockHash.toString()}`);
37
+ log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
38
+
33
39
  const { l1ContractAddresses } = await deployAztecContracts(
34
40
  rpcUrls,
35
41
  chainId,
@@ -13,15 +13,9 @@ export async function deployUltraHonkVerifier(
13
13
  privateKey: string | undefined,
14
14
  mnemonic: string,
15
15
  pxeRpcUrl: string,
16
- bbBinaryPath: string,
17
- bbWorkingDirectory: string,
18
16
  log: LogFn,
19
17
  debugLogger: Logger,
20
18
  ) {
21
- if (!bbBinaryPath || !bbWorkingDirectory) {
22
- throw new InvalidOptionArgumentError('Missing path to bb binary and working directory');
23
- }
24
-
25
19
  const { publicClient, walletClient } = createL1Clients(
26
20
  ethRpcUrls,
27
21
  privateKey ?? mnemonic,
@@ -5,6 +5,7 @@ import type { LogFn, Logger } from '@aztec/foundation/log';
5
5
  import { getGenesisValues } from '@aztec/world-state/testing';
6
6
 
7
7
  import { deployNewRollupContracts } from '../../utils/aztec.js';
8
+ import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
8
9
 
9
10
  export async function deployNewRollup(
10
11
  registryAddress: EthAddress,
@@ -15,6 +16,7 @@ export async function deployNewRollup(
15
16
  mnemonicIndex: number,
16
17
  salt: number | undefined,
17
18
  testAccounts: boolean,
19
+ sponsoredFPC: boolean,
18
20
  json: boolean,
19
21
  initialValidators: EthAddress[],
20
22
  log: LogFn,
@@ -23,7 +25,16 @@ export async function deployNewRollup(
23
25
  const config = getL1ContractsConfigEnvVars();
24
26
 
25
27
  const initialFundedAccounts = testAccounts ? await getInitialTestAccounts() : [];
26
- const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts.map(a => a.address));
28
+ const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
29
+ const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(
30
+ initialFundedAccounts.map(a => a.address).concat(sponsoredFPCAddress),
31
+ );
32
+
33
+ log(`Deploying new rollup contracts to chain ${chainId}...`);
34
+ log(`Initial funded accounts: ${initialFundedAccounts.map(a => a.address.toString()).join(', ')}`);
35
+ log(`Initial validators: ${initialValidators.map(a => a.toString()).join(', ')}`);
36
+ log(`Genesis block hash: ${genesisBlockHash.toString()}`);
37
+ log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
27
38
 
28
39
  const { payloadAddress, rollup } = await deployNewRollupContracts(
29
40
  registryAddress,
@@ -24,8 +24,6 @@ const l1RpcUrlsOption = new Option(
24
24
  .argParser((arg: string) => arg.split(',').map(url => url.trim()));
25
25
 
26
26
  export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
27
- const { BB_BINARY_PATH, BB_WORKING_DIRECTORY } = process.env;
28
-
29
27
  program
30
28
  .command('deploy-l1-contracts')
31
29
  .description('Deploys all necessary Ethereum contracts for Aztec.')
@@ -57,7 +55,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
57
55
  options.mnemonicIndex,
58
56
  options.salt,
59
57
  options.testAccounts,
60
- options.sponsoredFPC,
58
+ options.sponsoredFpc,
61
59
  options.acceleratedTestDeployments,
62
60
  options.json,
63
61
  initialValidators,
@@ -83,6 +81,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
83
81
  .option('--salt <number>', 'The optional salt to use in deployment', arg => parseInt(arg))
84
82
  .option('--json', 'Output the contract addresses in JSON format')
85
83
  .option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts')
84
+ .option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
86
85
  .action(async options => {
87
86
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
88
87
 
@@ -97,6 +96,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
97
96
  options.mnemonicIndex,
98
97
  options.salt,
99
98
  options.testAccounts,
99
+ options.sponsoredFpc,
100
100
  options.json,
101
101
  initialValidators,
102
102
  log,
@@ -412,8 +412,6 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
412
412
  'test test test test test test test test test test test junk',
413
413
  )
414
414
  .requiredOption('--verifier <verifier>', 'Either mock or real', 'real')
415
- .option('--bb <path>', 'Path to bb binary', BB_BINARY_PATH)
416
- .option('--bb-working-dir <path>', 'Path to bb working directory', BB_WORKING_DIRECTORY)
417
415
  .action(async options => {
418
416
  const { deployMockVerifier, deployUltraHonkVerifier } = await import('./deploy_l1_verifier.js');
419
417
  if (options.verifier === 'mock') {
@@ -435,8 +433,6 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
435
433
  options.l1PrivateKey,
436
434
  options.mnemonic,
437
435
  options.rpcUrl,
438
- options.bb,
439
- options.bbWorkingDir,
440
436
  log,
441
437
  debugLogger,
442
438
  );