@aztec/cli 2.1.0-rc.12 → 2.1.0-rc.14
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.
- package/dest/cmds/infrastructure/sequencers.js +2 -2
- package/dest/cmds/l1/create_l1_account.js +1 -1
- package/dest/cmds/l1/get_l1_addresses.js +1 -1
- package/dest/cmds/l1/get_l1_balance.js +1 -1
- package/dest/cmds/l1/prover_stats.js +1 -1
- package/dest/cmds/l1/trigger_seed_snapshot.js +1 -1
- package/dest/cmds/l1/update_l1_validators.js +2 -2
- package/dest/utils/aztec.js +2 -2
- package/package.json +25 -25
- package/src/cmds/infrastructure/sequencers.ts +2 -2
- package/src/cmds/l1/create_l1_account.ts +1 -1
- package/src/cmds/l1/get_l1_addresses.ts +1 -1
- package/src/cmds/l1/get_l1_balance.ts +1 -1
- package/src/cmds/l1/prover_stats.ts +1 -1
- package/src/cmds/l1/trigger_seed_snapshot.ts +1 -1
- package/src/cmds/l1/update_l1_validators.ts +2 -2
- package/src/utils/aztec.ts +2 -2
|
@@ -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 '
|
|
5
|
-
import { mnemonicToAccount } from '
|
|
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 '
|
|
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 '
|
|
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 '
|
|
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 '
|
|
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 '
|
|
6
|
-
import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from '
|
|
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();
|
package/dest/utils/aztec.js
CHANGED
|
@@ -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('
|
|
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('
|
|
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.
|
|
3
|
+
"version": "2.1.0-rc.14",
|
|
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.
|
|
74
|
-
"@aztec/aztec.js": "2.1.0-rc.
|
|
75
|
-
"@aztec/constants": "2.1.0-rc.
|
|
76
|
-
"@aztec/entrypoints": "2.1.0-rc.
|
|
77
|
-
"@aztec/ethereum": "2.1.0-rc.
|
|
78
|
-
"@aztec/foundation": "2.1.0-rc.
|
|
79
|
-
"@aztec/l1-artifacts": "2.1.0-rc.
|
|
80
|
-
"@aztec/node-lib": "2.1.0-rc.
|
|
81
|
-
"@aztec/p2p": "2.1.0-rc.
|
|
82
|
-
"@aztec/stdlib": "2.1.0-rc.
|
|
83
|
-
"@aztec/world-state": "2.1.0-rc.
|
|
73
|
+
"@aztec/archiver": "2.1.0-rc.14",
|
|
74
|
+
"@aztec/aztec.js": "2.1.0-rc.14",
|
|
75
|
+
"@aztec/constants": "2.1.0-rc.14",
|
|
76
|
+
"@aztec/entrypoints": "2.1.0-rc.14",
|
|
77
|
+
"@aztec/ethereum": "2.1.0-rc.14",
|
|
78
|
+
"@aztec/foundation": "2.1.0-rc.14",
|
|
79
|
+
"@aztec/l1-artifacts": "2.1.0-rc.14",
|
|
80
|
+
"@aztec/node-lib": "2.1.0-rc.14",
|
|
81
|
+
"@aztec/p2p": "2.1.0-rc.14",
|
|
82
|
+
"@aztec/stdlib": "2.1.0-rc.14",
|
|
83
|
+
"@aztec/world-state": "2.1.0-rc.14",
|
|
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.
|
|
96
|
-
"@aztec/protocol-contracts": "2.1.0-rc.
|
|
95
|
+
"@aztec/accounts": "2.1.0-rc.14",
|
|
96
|
+
"@aztec/protocol-contracts": "2.1.0-rc.14",
|
|
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.
|
|
113
|
-
"@aztec/bb-prover": "2.1.0-rc.
|
|
114
|
-
"@aztec/ethereum": "2.1.0-rc.
|
|
115
|
-
"@aztec/l1-artifacts": "2.1.0-rc.
|
|
116
|
-
"@aztec/noir-contracts.js": "2.1.0-rc.
|
|
117
|
-
"@aztec/noir-protocol-circuits-types": "2.1.0-rc.
|
|
118
|
-
"@aztec/noir-test-contracts.js": "2.1.0-rc.
|
|
119
|
-
"@aztec/protocol-contracts": "2.1.0-rc.
|
|
120
|
-
"@aztec/stdlib": "2.1.0-rc.
|
|
112
|
+
"@aztec/accounts": "2.1.0-rc.14",
|
|
113
|
+
"@aztec/bb-prover": "2.1.0-rc.14",
|
|
114
|
+
"@aztec/ethereum": "2.1.0-rc.14",
|
|
115
|
+
"@aztec/l1-artifacts": "2.1.0-rc.14",
|
|
116
|
+
"@aztec/noir-contracts.js": "2.1.0-rc.14",
|
|
117
|
+
"@aztec/noir-protocol-circuits-types": "2.1.0-rc.14",
|
|
118
|
+
"@aztec/noir-test-contracts.js": "2.1.0-rc.14",
|
|
119
|
+
"@aztec/protocol-contracts": "2.1.0-rc.14",
|
|
120
|
+
"@aztec/stdlib": "2.1.0-rc.14"
|
|
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 '
|
|
7
|
-
import { mnemonicToAccount } from '
|
|
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 '
|
|
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 '
|
|
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 '
|
|
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 '
|
|
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 '
|
|
18
|
-
import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from '
|
|
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
|
|
package/src/utils/aztec.ts
CHANGED
|
@@ -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('
|
|
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('
|
|
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
|