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

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":"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,iBA4EjB"}
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,iBAiFjB"}
@@ -1,4 +1,4 @@
1
- import { getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
1
+ import { getInitialTestAccountsManagers } from '@aztec/accounts/testing';
2
2
  import { BatchCall, Fr, L1FeeJuicePortalManager, createCompatibleClient, retryUntil, waitForProven } from '@aztec/aztec.js';
3
3
  import { createEthereumChain, createL1Clients, deployL1Contract } from '@aztec/ethereum';
4
4
  import { getContract } from 'viem';
@@ -13,7 +13,11 @@ const provenWaitOpts = {
13
13
  };
14
14
  export async function bootstrapNetwork(pxeUrl, l1Urls, l1ChainId, l1PrivateKey, l1Mnemonic, addressIndex, json, log, debugLog) {
15
15
  const pxe = await createCompatibleClient(pxeUrl, debugLog);
16
- const [wallet] = await getDeployedTestAccountsWallets(pxe);
16
+ // We assume here that the initial test accounts were prefunded with deploy-l1-contracts, and deployed with setup-l2-contracts
17
+ // so all we need to do is register them to our pxe.
18
+ const [accountManager] = await getInitialTestAccountsManagers(pxe);
19
+ await accountManager.register();
20
+ const wallet = await accountManager.getWallet();
17
21
  const l1Clients = createL1Clients(l1Urls, l1PrivateKey ? privateKeyToAccount(l1PrivateKey) : // Note that this account needs to be funded on L1 !
18
22
  mnemonicToAccount(l1Mnemonic, {
19
23
  addressIndex
@@ -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,iBAsDpB"}
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"}
@@ -8,11 +8,6 @@ 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()}`);
16
11
  const { l1ContractAddresses } = await deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, genesisBlockHash, acceleratedTestDeployments, config, debugLogger);
17
12
  if (json) {
18
13
  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, 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, bbBinaryPath: string, bbWorkingDirectory: 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,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"}
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"}
@@ -3,7 +3,10 @@ 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, log, debugLogger) {
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
+ }
7
10
  const { publicClient, walletClient } = createL1Clients(ethRpcUrls, privateKey ?? mnemonic, createEthereumChain(ethRpcUrls, l1ChainId).chainInfo);
8
11
  if (!rollupAddress && pxeRpcUrl) {
9
12
  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, sponsoredFPC: 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, 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;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"}
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"}
@@ -2,17 +2,10 @@ 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
- 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) {
5
+ export async function deployNewRollup(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, testAccounts, json, initialValidators, log, debugLogger) {
7
6
  const config = getL1ContractsConfigEnvVars();
8
7
  const initialFundedAccounts = testAccounts ? await getInitialTestAccounts() : [];
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()}`);
8
+ const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts.map((a)=>a.address));
16
9
  const { payloadAddress, rollup } = await deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, genesisBlockHash, config, debugLogger);
17
10
  if (json) {
18
11
  log(JSON.stringify({
@@ -5,7 +5,7 @@ export async function depositGovernanceTokens({ registryAddress, rpcUrls, chainI
5
5
  const { publicClient, walletClient } = createL1Clients(rpcUrls, privateKey ?? mnemonic, chain.chainInfo, mnemonicIndex);
6
6
  const addresses = await RegistryContract.collectAddresses(publicClient, registryAddress, 'canonical');
7
7
  const governanceAddress = addresses.governanceAddress.toString();
8
- const tokenAddress = addresses.feeJuiceAddress.toString();
8
+ const tokenAddress = addresses.stakingAssetAddress.toString();
9
9
  const feeJuice = new FeeJuiceContract(tokenAddress, publicClient, walletClient);
10
10
  const governance = new GovernanceContract(governanceAddress, publicClient, walletClient);
11
11
  if (mint) {
@@ -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,WAohB/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,WAwhB/E"}
@@ -5,15 +5,16 @@ 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;
8
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)=>{
9
10
  const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
10
11
  const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
11
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);
12
13
  });
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)=>{
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)=>{
14
15
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
15
16
  const initialValidators = options.validators?.split(',').map((validator)=>EthAddress.fromString(validator)) || [];
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);
17
+ await deployNewRollup(options.registryAddress, options.l1RpcUrls, options.l1ChainId, options.privateKey, options.mnemonic, options.mnemonicIndex, options.salt, options.testAccounts, options.json, initialValidators, log, debugLogger);
17
18
  });
18
19
  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)=>{
19
20
  const { depositGovernanceTokens } = await import('./governance_utils.js');
@@ -155,12 +156,12 @@ export function injectCommands(program, log, debugLogger) {
155
156
  debugLogger
156
157
  });
157
158
  });
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)=>{
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)=>{
159
160
  const { deployMockVerifier, deployUltraHonkVerifier } = await import('./deploy_l1_verifier.js');
160
161
  if (options.verifier === 'mock') {
161
162
  await deployMockVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, log, debugLogger);
162
163
  } else {
163
- await deployUltraHonkVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, log, debugLogger);
164
+ await deployUltraHonkVerifier(options.rollupAddress?.toString(), options.l1RpcUrls, options.l1ChainId, options.l1PrivateKey, options.mnemonic, options.rpcUrl, options.bb, options.bbWorkingDir, log, debugLogger);
164
165
  }
165
166
  });
166
167
  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.4",
3
+ "version": "0.82.3",
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.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",
70
+ "@aztec/archiver": "0.82.3",
71
+ "@aztec/aztec.js": "0.82.3",
72
+ "@aztec/constants": "0.82.3",
73
+ "@aztec/entrypoints": "0.82.3",
74
+ "@aztec/foundation": "0.82.3",
75
+ "@aztec/l1-artifacts": "0.82.3",
76
+ "@aztec/p2p": "0.82.3",
77
+ "@aztec/stdlib": "0.82.3",
78
+ "@aztec/world-state": "0.82.3",
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.4",
91
- "@aztec/ethereum": "0.82.2-alpha-testnet.4",
92
- "@aztec/protocol-contracts": "0.82.2-alpha-testnet.4",
90
+ "@aztec/accounts": "0.82.3",
91
+ "@aztec/ethereum": "0.82.3",
92
+ "@aztec/protocol-contracts": "0.82.3",
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.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"
108
+ "@aztec/accounts": "0.82.3",
109
+ "@aztec/bb-prover": "0.82.3",
110
+ "@aztec/ethereum": "0.82.3",
111
+ "@aztec/l1-artifacts": "0.82.3",
112
+ "@aztec/noir-contracts.js": "0.82.3",
113
+ "@aztec/noir-protocol-circuits-types": "0.82.3",
114
+ "@aztec/protocol-contracts": "0.82.3",
115
+ "@aztec/stdlib": "0.82.3"
116
116
  },
117
117
  "files": [
118
118
  "dest",
@@ -1,4 +1,4 @@
1
- import { getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
1
+ import { getInitialTestAccountsManagers } from '@aztec/accounts/testing';
2
2
  import {
3
3
  AztecAddress,
4
4
  BatchCall,
@@ -54,7 +54,12 @@ export async function bootstrapNetwork(
54
54
  ) {
55
55
  const pxe = await createCompatibleClient(pxeUrl, debugLog);
56
56
 
57
- const [wallet] = await getDeployedTestAccountsWallets(pxe);
57
+ // We assume here that the initial test accounts were prefunded with deploy-l1-contracts, and deployed with setup-l2-contracts
58
+ // so all we need to do is register them to our pxe.
59
+ const [accountManager] = await getInitialTestAccountsManagers(pxe);
60
+ await accountManager.register();
61
+
62
+ const wallet = await accountManager.getWallet();
58
63
 
59
64
  const l1Clients = createL1Clients(
60
65
  l1Urls,
@@ -30,12 +30,6 @@ 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
-
39
33
  const { l1ContractAddresses } = await deployAztecContracts(
40
34
  rpcUrls,
41
35
  chainId,
@@ -13,9 +13,15 @@ export async function deployUltraHonkVerifier(
13
13
  privateKey: string | undefined,
14
14
  mnemonic: string,
15
15
  pxeRpcUrl: string,
16
+ bbBinaryPath: string,
17
+ bbWorkingDirectory: string,
16
18
  log: LogFn,
17
19
  debugLogger: Logger,
18
20
  ) {
21
+ if (!bbBinaryPath || !bbWorkingDirectory) {
22
+ throw new InvalidOptionArgumentError('Missing path to bb binary and working directory');
23
+ }
24
+
19
25
  const { publicClient, walletClient } = createL1Clients(
20
26
  ethRpcUrls,
21
27
  privateKey ?? mnemonic,
@@ -5,7 +5,6 @@ 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';
9
8
 
10
9
  export async function deployNewRollup(
11
10
  registryAddress: EthAddress,
@@ -16,7 +15,6 @@ export async function deployNewRollup(
16
15
  mnemonicIndex: number,
17
16
  salt: number | undefined,
18
17
  testAccounts: boolean,
19
- sponsoredFPC: boolean,
20
18
  json: boolean,
21
19
  initialValidators: EthAddress[],
22
20
  log: LogFn,
@@ -25,16 +23,7 @@ export async function deployNewRollup(
25
23
  const config = getL1ContractsConfigEnvVars();
26
24
 
27
25
  const initialFundedAccounts = testAccounts ? await getInitialTestAccounts() : [];
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()}`);
26
+ const { genesisBlockHash, genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts.map(a => a.address));
38
27
 
39
28
  const { payloadAddress, rollup } = await deployNewRollupContracts(
40
29
  registryAddress,
@@ -42,7 +42,7 @@ export async function depositGovernanceTokens({
42
42
 
43
43
  const addresses = await RegistryContract.collectAddresses(publicClient, registryAddress, 'canonical');
44
44
  const governanceAddress = addresses.governanceAddress.toString();
45
- const tokenAddress = addresses.feeJuiceAddress.toString();
45
+ const tokenAddress = addresses.stakingAssetAddress.toString();
46
46
 
47
47
  const feeJuice = new FeeJuiceContract(tokenAddress, publicClient, walletClient);
48
48
  const governance = new GovernanceContract(governanceAddress, publicClient, walletClient);
@@ -24,6 +24,8 @@ 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
+
27
29
  program
28
30
  .command('deploy-l1-contracts')
29
31
  .description('Deploys all necessary Ethereum contracts for Aztec.')
@@ -81,7 +83,6 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
81
83
  .option('--salt <number>', 'The optional salt to use in deployment', arg => parseInt(arg))
82
84
  .option('--json', 'Output the contract addresses in JSON format')
83
85
  .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')
85
86
  .action(async options => {
86
87
  const { deployNewRollup } = await import('./deploy_new_rollup.js');
87
88
 
@@ -96,7 +97,6 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
96
97
  options.mnemonicIndex,
97
98
  options.salt,
98
99
  options.testAccounts,
99
- options.sponsoredFpc,
100
100
  options.json,
101
101
  initialValidators,
102
102
  log,
@@ -412,6 +412,8 @@ 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)
415
417
  .action(async options => {
416
418
  const { deployMockVerifier, deployUltraHonkVerifier } = await import('./deploy_l1_verifier.js');
417
419
  if (options.verifier === 'mock') {
@@ -433,6 +435,8 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
433
435
  options.l1PrivateKey,
434
436
  options.mnemonic,
435
437
  options.rpcUrl,
438
+ options.bb,
439
+ options.bbWorkingDir,
436
440
  log,
437
441
  debugLogger,
438
442
  );