@aztec/cli 2.1.0-rc.13 → 2.1.0-rc.16

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,8 +1,8 @@
1
1
  import { Fr, createCompatibleClient } from '@aztec/aztec.js';
2
2
  import { GSEContract, RollupContract, createEthereumChain, getL1ContractsConfigEnvVars } from '@aztec/ethereum';
3
3
  import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
4
- import { createPublicClient, createWalletClient, fallback, getContract, http } from '@spalladino/viem';
5
- import { mnemonicToAccount } from '@spalladino/viem/accounts';
4
+ import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem';
5
+ import { mnemonicToAccount } from 'viem/accounts';
6
6
  export async function sequencers(opts) {
7
7
  const { command, who: maybeWho, mnemonic, bn254SecretKey, rpcUrl, l1RpcUrls, chainId, log, debugLogger } = opts;
8
8
  const client = await createCompatibleClient(rpcUrl, debugLogger);
@@ -1,4 +1,4 @@
1
- import { generatePrivateKey, privateKeyToAccount } from '@spalladino/viem/accounts';
1
+ import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
2
2
  import { prettyPrintJSON } from '../../utils/commands.js';
3
3
  export function createL1Account(json, log) {
4
4
  const privateKey = generatePrivateKey();
@@ -1,5 +1,5 @@
1
1
  import { RegistryContract, createEthereumChain } from '@aztec/ethereum';
2
- import { createPublicClient, fallback, http } from '@spalladino/viem';
2
+ import { createPublicClient, fallback, http } from 'viem';
3
3
  export async function getL1Addresses(registryAddress, rollupVersion, rpcUrls, chainId, json, log) {
4
4
  const chain = createEthereumChain(rpcUrls, chainId);
5
5
  const publicClient = createPublicClient({
@@ -1,6 +1,6 @@
1
1
  import { createEthereumChain } from '@aztec/ethereum';
2
2
  import { TestERC20Abi } from '@aztec/l1-artifacts';
3
- import { createPublicClient, fallback, getContract, http } from '@spalladino/viem';
3
+ import { createPublicClient, fallback, getContract, http } from 'viem';
4
4
  import { prettyPrintJSON } from '../../utils/commands.js';
5
5
  export async function getL1Balance(who, token, l1RpcUrls, chainId, json, log) {
6
6
  const chain = createEthereumChain(l1RpcUrls, chainId);
@@ -5,9 +5,9 @@ import { EthAddress } from '@aztec/foundation/eth-address';
5
5
  import { createLogger } from '@aztec/foundation/log';
6
6
  import { RollupAbi } from '@aztec/l1-artifacts';
7
7
  import { createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
8
- import { createPublicClient, fallback, getAbiItem, getAddress, http } from '@spalladino/viem';
9
8
  import chunk from 'lodash.chunk';
10
9
  import groupBy from 'lodash.groupby';
10
+ import { createPublicClient, fallback, getAbiItem, getAddress, http } from 'viem';
11
11
  export async function proverStats(opts) {
12
12
  const debugLog = createLogger('cli:prover_stats');
13
13
  const { startBlock, chainId, l1RpcUrls, l1RollupAddress, batchSize, nodeUrl, provingTimeout, endBlock, rawLogs, log } = opts;
@@ -1,6 +1,6 @@
1
1
  import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
2
2
  import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
3
- import { getContract } from '@spalladino/viem';
3
+ import { getContract } from 'viem';
4
4
  export async function triggerSeedSnapshot({ rpcUrls, chainId, privateKey, mnemonic, rollupAddress, log }) {
5
5
  const chain = createEthereumChain(rpcUrls, chainId);
6
6
  const client = createExtendedL1Client(rpcUrls, privateKey ?? mnemonic, chain.chainInfo);
@@ -2,8 +2,8 @@ import { GSEContract, RollupContract, createEthereumChain, createExtendedL1Clien
2
2
  import { EthCheatCodes } from '@aztec/ethereum/test';
3
3
  import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
4
4
  import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
5
- import { encodeFunctionData, formatEther, getContract } from '@spalladino/viem';
6
- import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts';
5
+ import { encodeFunctionData, formatEther, getContract } from 'viem';
6
+ import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
7
7
  import { addLeadingHex } from '../../utils/aztec.js';
8
8
  export function generateL1Account() {
9
9
  const privateKey = generatePrivateKey();
@@ -30,7 +30,6 @@ export declare const stagingIgnitionL2ChainConfig: L2ChainConfig;
30
30
  export declare const stagingPublicL2ChainConfig: L2ChainConfig;
31
31
  export declare const testnetL2ChainConfig: L2ChainConfig;
32
32
  export declare const ignitionL2ChainConfig: L2ChainConfig;
33
- export declare function getBootnodes(networkName: NetworkNames, cacheDir?: string): Promise<any>;
34
- export declare function getL2ChainConfig(networkName: NetworkNames, cacheDir?: string): Promise<L2ChainConfig | undefined>;
35
- export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): Promise<void>;
33
+ export declare function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined;
34
+ export declare function enrichEnvironmentWithChainConfig(networkName: NetworkNames): void;
36
35
  //# sourceMappingURL=chain_l2_config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chain_l2_config.d.ts","sourceRoot":"","sources":["../../src/config/chain_l2_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAarE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,GAC5C,IAAI,CAAC,aAAa,EAAE,sBAAsB,GAAG,uBAAuB,CAAC,GAAG;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,iB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MAAM,oBAAoB,EAAE,aAsDlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,aA+EnC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAYrF;AAMD,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,YAAY,QA2FzE"}
@@ -1,10 +1,9 @@
1
1
  import { DefaultL1ContractsConfig } from '@aztec/ethereum';
2
2
  import { EthAddress } from '@aztec/foundation/eth-address';
3
- import path, { join } from 'path';
3
+ import path from 'path';
4
4
  import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with {
5
5
  type: 'json'
6
6
  };
7
- import { cachedFetch } from './cached_fetch.js';
8
7
  import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
9
8
  const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
10
9
  const defaultDBMapSizeKb = 128 * 1_024 * 1_024; // 128 GB
@@ -257,16 +256,7 @@ export const ignitionL2ChainConfig = {
257
256
  slashExecuteRoundsLookBack: 4,
258
257
  ...DefaultNetworkDBMapSizeConfig
259
258
  };
260
- const BOOTNODE_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour;
261
- export async function getBootnodes(networkName, cacheDir) {
262
- const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
263
- const data = await cachedFetch(url, {
264
- cacheDurationMs: BOOTNODE_CACHE_DURATION_MS,
265
- cacheFile: cacheDir ? join(cacheDir, networkName, 'bootnodes.json') : undefined
266
- });
267
- return data?.bootnodes;
268
- }
269
- export async function getL2ChainConfig(networkName, cacheDir) {
259
+ export function getL2ChainConfig(networkName) {
270
260
  let config;
271
261
  if (networkName === 'staging-public') {
272
262
  config = {
@@ -285,26 +275,17 @@ export async function getL2ChainConfig(networkName, cacheDir) {
285
275
  ...ignitionL2ChainConfig
286
276
  };
287
277
  }
288
- if (!config) {
289
- return undefined;
290
- }
291
- // If the bootnodes are not set, get them from the network
292
- const bootnodeKey = 'BOOTSTRAP_NODES';
293
- if (!process.env[bootnodeKey]) {
294
- config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
295
- }
296
278
  return config;
297
279
  }
298
280
  function getDefaultDataDir(networkName) {
299
281
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
300
282
  }
301
- export async function enrichEnvironmentWithChainConfig(networkName) {
283
+ export function enrichEnvironmentWithChainConfig(networkName) {
302
284
  if (networkName === 'local') {
303
285
  return;
304
286
  }
305
287
  enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
306
- const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
307
- const config = await getL2ChainConfig(networkName, cacheDir);
288
+ const config = getL2ChainConfig(networkName);
308
289
  if (!config) {
309
290
  throw new Error(`Unknown network name: ${networkName}`);
310
291
  }
@@ -27,7 +27,7 @@ import { encodeArgs } from './encoding.js';
27
27
  * @param mnemonic - The mnemonic to be used in contract deployment.
28
28
  */ export async function deployAztecContracts(rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, acceleratedTestDeployments, config, existingToken, realVerifier, createVerificationJson, debugLogger) {
29
29
  const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
30
- const { mnemonicToAccount, privateKeyToAccount } = await import('@spalladino/viem/accounts');
30
+ const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
31
31
  const account = !privateKey ? mnemonicToAccount(mnemonic, {
32
32
  addressIndex: mnemonicIndex
33
33
  }) : privateKeyToAccount(addLeadingHex(privateKey));
@@ -49,7 +49,7 @@ import { encodeArgs } from './encoding.js';
49
49
  }
50
50
  export async function deployNewRollupContracts(registryAddress, rpcUrls, chainId, privateKey, mnemonic, mnemonicIndex, salt, initialValidators, genesisArchiveRoot, feeJuicePortalInitialBalance, config, realVerifier, logger) {
51
51
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
52
- const { mnemonicToAccount, privateKeyToAccount } = await import('@spalladino/viem/accounts');
52
+ const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
53
53
  const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
54
54
  const account = !privateKey ? mnemonicToAccount(mnemonic, {
55
55
  addressIndex: mnemonicIndex
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "2.1.0-rc.13",
3
+ "version": "2.1.0-rc.16",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./contracts": "./dest/cmds/contracts/index.js",
@@ -70,30 +70,30 @@
70
70
  ]
71
71
  },
72
72
  "dependencies": {
73
- "@aztec/archiver": "2.1.0-rc.13",
74
- "@aztec/aztec.js": "2.1.0-rc.13",
75
- "@aztec/constants": "2.1.0-rc.13",
76
- "@aztec/entrypoints": "2.1.0-rc.13",
77
- "@aztec/ethereum": "2.1.0-rc.13",
78
- "@aztec/foundation": "2.1.0-rc.13",
79
- "@aztec/l1-artifacts": "2.1.0-rc.13",
80
- "@aztec/node-lib": "2.1.0-rc.13",
81
- "@aztec/p2p": "2.1.0-rc.13",
82
- "@aztec/stdlib": "2.1.0-rc.13",
83
- "@aztec/world-state": "2.1.0-rc.13",
73
+ "@aztec/archiver": "2.1.0-rc.16",
74
+ "@aztec/aztec.js": "2.1.0-rc.16",
75
+ "@aztec/constants": "2.1.0-rc.16",
76
+ "@aztec/entrypoints": "2.1.0-rc.16",
77
+ "@aztec/ethereum": "2.1.0-rc.16",
78
+ "@aztec/foundation": "2.1.0-rc.16",
79
+ "@aztec/l1-artifacts": "2.1.0-rc.16",
80
+ "@aztec/node-lib": "2.1.0-rc.16",
81
+ "@aztec/p2p": "2.1.0-rc.16",
82
+ "@aztec/stdlib": "2.1.0-rc.16",
83
+ "@aztec/world-state": "2.1.0-rc.16",
84
84
  "@iarna/toml": "^2.2.5",
85
85
  "@libp2p/peer-id-factory": "^3.0.4",
86
- "@spalladino/viem": "2.38.2-eip7594.0",
87
86
  "commander": "^12.1.0",
88
87
  "lodash.chunk": "^4.2.0",
89
88
  "lodash.groupby": "^4.6.0",
90
89
  "semver": "^7.5.4",
91
90
  "source-map-support": "^0.5.21",
92
- "tslib": "^2.4.0"
91
+ "tslib": "^2.4.0",
92
+ "viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@aztec/accounts": "2.1.0-rc.13",
96
- "@aztec/protocol-contracts": "2.1.0-rc.13",
95
+ "@aztec/accounts": "2.1.0-rc.16",
96
+ "@aztec/protocol-contracts": "2.1.0-rc.16",
97
97
  "@jest/globals": "^30.0.0",
98
98
  "@types/jest": "^30.0.0",
99
99
  "@types/lodash.chunk": "^4.2.9",
@@ -109,15 +109,15 @@
109
109
  "typescript": "^5.3.3"
110
110
  },
111
111
  "peerDependencies": {
112
- "@aztec/accounts": "2.1.0-rc.13",
113
- "@aztec/bb-prover": "2.1.0-rc.13",
114
- "@aztec/ethereum": "2.1.0-rc.13",
115
- "@aztec/l1-artifacts": "2.1.0-rc.13",
116
- "@aztec/noir-contracts.js": "2.1.0-rc.13",
117
- "@aztec/noir-protocol-circuits-types": "2.1.0-rc.13",
118
- "@aztec/noir-test-contracts.js": "2.1.0-rc.13",
119
- "@aztec/protocol-contracts": "2.1.0-rc.13",
120
- "@aztec/stdlib": "2.1.0-rc.13"
112
+ "@aztec/accounts": "2.1.0-rc.16",
113
+ "@aztec/bb-prover": "2.1.0-rc.16",
114
+ "@aztec/ethereum": "2.1.0-rc.16",
115
+ "@aztec/l1-artifacts": "2.1.0-rc.16",
116
+ "@aztec/noir-contracts.js": "2.1.0-rc.16",
117
+ "@aztec/noir-protocol-circuits-types": "2.1.0-rc.16",
118
+ "@aztec/noir-test-contracts.js": "2.1.0-rc.16",
119
+ "@aztec/protocol-contracts": "2.1.0-rc.16",
120
+ "@aztec/stdlib": "2.1.0-rc.16"
121
121
  },
122
122
  "files": [
123
123
  "dest",
@@ -3,8 +3,8 @@ import { GSEContract, RollupContract, createEthereumChain, getL1ContractsConfigE
3
3
  import type { LogFn, Logger } from '@aztec/foundation/log';
4
4
  import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
5
5
 
6
- import { createPublicClient, createWalletClient, fallback, getContract, http } from '@spalladino/viem';
7
- import { mnemonicToAccount } from '@spalladino/viem/accounts';
6
+ import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem';
7
+ import { mnemonicToAccount } from 'viem/accounts';
8
8
 
9
9
  export async function sequencers(opts: {
10
10
  command: 'list' | 'add' | 'remove' | 'who-next' | 'flush';
@@ -1,6 +1,6 @@
1
1
  import type { LogFn } from '@aztec/foundation/log';
2
2
 
3
- import { generatePrivateKey, privateKeyToAccount } from '@spalladino/viem/accounts';
3
+ import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
4
4
 
5
5
  import { prettyPrintJSON } from '../../utils/commands.js';
6
6
 
@@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/aztec.js';
2
2
  import { RegistryContract, type ViemPublicClient, createEthereumChain } from '@aztec/ethereum';
3
3
  import type { LogFn } from '@aztec/foundation/log';
4
4
 
5
- import { createPublicClient, fallback, http } from '@spalladino/viem';
5
+ import { createPublicClient, fallback, http } from 'viem';
6
6
 
7
7
  export async function getL1Addresses(
8
8
  registryAddress: EthAddress,
@@ -3,7 +3,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address';
3
3
  import type { LogFn } from '@aztec/foundation/log';
4
4
  import { TestERC20Abi } from '@aztec/l1-artifacts';
5
5
 
6
- import { createPublicClient, fallback, getContract, http } from '@spalladino/viem';
6
+ import { createPublicClient, fallback, getContract, http } from 'viem';
7
7
 
8
8
  import { prettyPrintJSON } from '../../utils/commands.js';
9
9
 
@@ -6,9 +6,9 @@ import { type LogFn, type Logger, createLogger } from '@aztec/foundation/log';
6
6
  import { RollupAbi } from '@aztec/l1-artifacts';
7
7
  import { createAztecNodeClient } from '@aztec/stdlib/interfaces/client';
8
8
 
9
- import { createPublicClient, fallback, getAbiItem, getAddress, http } from '@spalladino/viem';
10
9
  import chunk from 'lodash.chunk';
11
10
  import groupBy from 'lodash.groupby';
11
+ import { createPublicClient, fallback, getAbiItem, getAddress, http } from 'viem';
12
12
 
13
13
  export async function proverStats(opts: {
14
14
  l1RpcUrls: string[];
@@ -2,7 +2,7 @@ import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
2
2
  import type { LogFn } from '@aztec/foundation/log';
3
3
  import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
4
4
 
5
- import { getContract } from '@spalladino/viem';
5
+ import { getContract } from 'viem';
6
6
 
7
7
  import type { RollupCommandArgs } from './update_l1_validators.js';
8
8
 
@@ -14,8 +14,8 @@ import type { LogFn, Logger } from '@aztec/foundation/log';
14
14
  import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
15
15
  import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
16
16
 
17
- import { encodeFunctionData, formatEther, getContract } from '@spalladino/viem';
18
- import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts';
17
+ import { encodeFunctionData, formatEther, getContract } from 'viem';
18
+ import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
19
19
 
20
20
  import { addLeadingHex } from '../../utils/aztec.js';
21
21
 
@@ -1,14 +1,13 @@
1
1
  import { DefaultL1ContractsConfig, type L1ContractsConfig } from '@aztec/ethereum';
2
- import type { EnvVar, NetworkNames } from '@aztec/foundation/config';
2
+ import type { NetworkNames } from '@aztec/foundation/config';
3
3
  import { EthAddress } from '@aztec/foundation/eth-address';
4
4
  import type { SharedNodeConfig } from '@aztec/node-lib/config';
5
5
  import type { P2PConfig } from '@aztec/p2p/config';
6
6
  import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
7
7
 
8
- import path, { join } from 'path';
8
+ import path from 'path';
9
9
 
10
10
  import publicIncludeMetrics from '../../public_include_metric_prefixes.json' with { type: 'json' };
11
- import { cachedFetch } from './cached_fetch.js';
12
11
  import { enrichEthAddressVar, enrichVar } from './enrich_env.js';
13
12
 
14
13
  const SNAPSHOTS_URL = 'https://aztec-labs-snapshots.com';
@@ -363,22 +362,7 @@ export const ignitionL2ChainConfig: L2ChainConfig = {
363
362
  ...DefaultNetworkDBMapSizeConfig,
364
363
  };
365
364
 
366
- const BOOTNODE_CACHE_DURATION_MS = 60 * 60 * 1000; // 1 hour;
367
-
368
- export async function getBootnodes(networkName: NetworkNames, cacheDir?: string) {
369
- const url = `http://static.aztec.network/${networkName}/bootnodes.json`;
370
- const data = await cachedFetch(url, {
371
- cacheDurationMs: BOOTNODE_CACHE_DURATION_MS,
372
- cacheFile: cacheDir ? join(cacheDir, networkName, 'bootnodes.json') : undefined,
373
- });
374
-
375
- return data?.bootnodes;
376
- }
377
-
378
- export async function getL2ChainConfig(
379
- networkName: NetworkNames,
380
- cacheDir?: string,
381
- ): Promise<L2ChainConfig | undefined> {
365
+ export function getL2ChainConfig(networkName: NetworkNames): L2ChainConfig | undefined {
382
366
  let config: L2ChainConfig | undefined;
383
367
  if (networkName === 'staging-public') {
384
368
  config = { ...stagingPublicL2ChainConfig };
@@ -389,14 +373,6 @@ export async function getL2ChainConfig(
389
373
  } else if (networkName === 'ignition') {
390
374
  config = { ...ignitionL2ChainConfig };
391
375
  }
392
- if (!config) {
393
- return undefined;
394
- }
395
- // If the bootnodes are not set, get them from the network
396
- const bootnodeKey: EnvVar = 'BOOTSTRAP_NODES';
397
- if (!process.env[bootnodeKey]) {
398
- config.p2pBootstrapNodes = await getBootnodes(networkName, cacheDir);
399
- }
400
376
  return config;
401
377
  }
402
378
 
@@ -404,14 +380,13 @@ function getDefaultDataDir(networkName: NetworkNames): string {
404
380
  return path.join(process.env.HOME || '~', '.aztec', networkName, 'data');
405
381
  }
406
382
 
407
- export async function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
383
+ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
408
384
  if (networkName === 'local') {
409
385
  return;
410
386
  }
411
387
 
412
388
  enrichVar('DATA_DIRECTORY', getDefaultDataDir(networkName));
413
- const cacheDir = process.env.DATA_DIRECTORY ? join(process.env.DATA_DIRECTORY, 'cache') : undefined;
414
- const config = await getL2ChainConfig(networkName, cacheDir);
389
+ const config = getL2ChainConfig(networkName);
415
390
 
416
391
  if (!config) {
417
392
  throw new Error(`Unknown network name: ${networkName}`);
@@ -63,7 +63,7 @@ export async function deployAztecContracts(
63
63
  debugLogger: Logger,
64
64
  ): Promise<DeployL1ContractsReturnType> {
65
65
  const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
66
- const { mnemonicToAccount, privateKeyToAccount } = await import('@spalladino/viem/accounts');
66
+ const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
67
67
 
68
68
  const account = !privateKey
69
69
  ? mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex })
@@ -112,7 +112,7 @@ export async function deployNewRollupContracts(
112
112
  logger: Logger,
113
113
  ): Promise<{ rollup: RollupContract; slashFactoryAddress: EthAddress }> {
114
114
  const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
115
- const { mnemonicToAccount, privateKeyToAccount } = await import('@spalladino/viem/accounts');
115
+ const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts');
116
116
  const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
117
117
 
118
118
  const account = !privateKey