@aztec/cli 1.0.0-nightly.20250604 → 1.0.0-nightly.20250606
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/l1/index.d.ts +1 -1
- package/dest/cmds/l1/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +1 -1
- package/dest/cmds/l1/update_l1_validators.d.ts +1 -0
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +23 -0
- package/package.json +22 -22
- package/src/cmds/l1/index.ts +1 -1
- package/src/cmds/l1/update_l1_validators.ts +36 -0
package/dest/cmds/l1/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
2
2
|
import { type Command } from 'commander';
|
|
3
|
-
export { addL1Validator } from './update_l1_validators.js';
|
|
3
|
+
export { addL1Validator, dripQueue } from './update_l1_validators.js';
|
|
4
4
|
export declare function injectCommands(program: Command, log: LogFn, debugLogger: Logger): Command;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAcjD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAcjD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAWtE,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WA4iB/E"}
|
package/dest/cmds/l1/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { Option } from 'commander';
|
|
3
3
|
import { ETHEREUM_HOSTS, MNEMONIC, PRIVATE_KEY, l1ChainIdOption, makePxeOption, parseAztecAddress, parseBigint, parseEthereumAddress, pxeOption } from '../../utils/commands.js';
|
|
4
|
-
export { addL1Validator } from './update_l1_validators.js';
|
|
4
|
+
export { addL1Validator, dripQueue } from './update_l1_validators.js';
|
|
5
5
|
const l1RpcUrlsOption = new Option('--l1-rpc-urls <string>', 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)').env('ETHEREUM_HOSTS').default([
|
|
6
6
|
ETHEREUM_HOSTS
|
|
7
7
|
]).makeOptionMandatory(true).argParser((arg)=>arg.split(',').map((url)=>url.trim()));
|
|
@@ -26,6 +26,7 @@ export declare function generateL1Account(): {
|
|
|
26
26
|
export declare function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, attesterAddress, stakingAssetHandlerAddress, log, debugLogger, }: StakingAssetHandlerCommandArgs & LoggerArgs & {
|
|
27
27
|
attesterAddress: EthAddress;
|
|
28
28
|
}): Promise<void>;
|
|
29
|
+
export declare function dripQueue({ rpcUrls, chainId, privateKey, mnemonic, stakingAssetHandlerAddress, log, debugLogger, }: StakingAssetHandlerCommandArgs & LoggerArgs): Promise<void>;
|
|
29
30
|
export declare function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, rollupAddress, log, debugLogger, }: RollupCommandArgs & LoggerArgs & {
|
|
30
31
|
validatorAddress: EthAddress;
|
|
31
32
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_l1_validators.d.ts","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ACR,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,iBAgBhC;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,iBAyBxD;AAED,wBAAsB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,iBAAiB,GAAG,UAAU,iBAwBzG"}
|
|
1
|
+
{"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAM3D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,UAAU,CAAC;IAC1B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,8BAA8B;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B,EAAE,UAAU,CAAC;CACxC;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,KAAK,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB;;;EAQhC;AAED,wBAAsB,cAAc,CAAC,EACnC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,0BAA0B,EAC1B,GAAG,EACH,WAAW,GACZ,EAAE,8BAA8B,GAAG,UAAU,GAAG;IAAE,eAAe,EAAE,UAAU,CAAA;CAAE,iBAuC/E;AAED,wBAAsB,SAAS,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,0BAA0B,EAC1B,GAAG,EACH,WAAW,GACZ,EAAE,8BAA8B,GAAG,UAAU,iBA0B7C;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,gBAAgB,EAAE,UAAU,CAAA;CAAE,iBAiBnE;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,iBAgBhC;AAED,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,OAAO,EACP,aAAa,EACb,SAAS,EACT,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAAG,UAAU,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,iBAyBxD;AAED,wBAAsB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,iBAAiB,GAAG,UAAU,iBAwBzG"}
|
|
@@ -53,6 +53,29 @@ export async function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, a
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
export async function dripQueue({ rpcUrls, chainId, privateKey, mnemonic, stakingAssetHandlerAddress, log, debugLogger }) {
|
|
57
|
+
const dualLog = makeDualLog(log, debugLogger);
|
|
58
|
+
const account = getAccount(privateKey, mnemonic);
|
|
59
|
+
const chain = createEthereumChain(rpcUrls, chainId);
|
|
60
|
+
const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
|
|
61
|
+
dualLog('Dripping Queue');
|
|
62
|
+
const l1TxUtils = new L1TxUtils(l1Client, debugLogger);
|
|
63
|
+
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
64
|
+
to: stakingAssetHandlerAddress.toString(),
|
|
65
|
+
data: encodeFunctionData({
|
|
66
|
+
abi: StakingAssetHandlerAbi,
|
|
67
|
+
functionName: 'dripQueue',
|
|
68
|
+
args: []
|
|
69
|
+
}),
|
|
70
|
+
abi: StakingAssetHandlerAbi
|
|
71
|
+
});
|
|
72
|
+
dualLog(`Receipt: ${receipt.transactionHash}`);
|
|
73
|
+
if (receipt.status === 'success') {
|
|
74
|
+
dualLog('Queue dripped successfully');
|
|
75
|
+
} else {
|
|
76
|
+
dualLog('Queue drip failed');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
56
79
|
export async function removeL1Validator({ rpcUrls, chainId, privateKey, mnemonic, validatorAddress, rollupAddress, log, debugLogger }) {
|
|
57
80
|
const dualLog = makeDualLog(log, debugLogger);
|
|
58
81
|
const account = getAccount(privateKey, mnemonic);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250606",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@aztec/archiver": "1.0.0-nightly.
|
|
69
|
-
"@aztec/aztec.js": "1.0.0-nightly.
|
|
70
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
71
|
-
"@aztec/entrypoints": "1.0.0-nightly.
|
|
72
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
73
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
74
|
-
"@aztec/p2p": "1.0.0-nightly.
|
|
75
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
76
|
-
"@aztec/world-state": "1.0.0-nightly.
|
|
68
|
+
"@aztec/archiver": "1.0.0-nightly.20250606",
|
|
69
|
+
"@aztec/aztec.js": "1.0.0-nightly.20250606",
|
|
70
|
+
"@aztec/constants": "1.0.0-nightly.20250606",
|
|
71
|
+
"@aztec/entrypoints": "1.0.0-nightly.20250606",
|
|
72
|
+
"@aztec/foundation": "1.0.0-nightly.20250606",
|
|
73
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250606",
|
|
74
|
+
"@aztec/p2p": "1.0.0-nightly.20250606",
|
|
75
|
+
"@aztec/stdlib": "1.0.0-nightly.20250606",
|
|
76
|
+
"@aztec/world-state": "1.0.0-nightly.20250606",
|
|
77
77
|
"@iarna/toml": "^2.2.5",
|
|
78
78
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
79
79
|
"commander": "^12.1.0",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"viem": "2.23.7"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
89
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
90
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
88
|
+
"@aztec/accounts": "1.0.0-nightly.20250606",
|
|
89
|
+
"@aztec/ethereum": "1.0.0-nightly.20250606",
|
|
90
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250606",
|
|
91
91
|
"@jest/globals": "^29.5.0",
|
|
92
92
|
"@types/jest": "^29.5.0",
|
|
93
93
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -103,15 +103,15 @@
|
|
|
103
103
|
"typescript": "^5.3.3"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
107
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
108
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
109
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
110
|
-
"@aztec/noir-contracts.js": "1.0.0-nightly.
|
|
111
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
112
|
-
"@aztec/noir-test-contracts.js": "1.0.0-nightly.
|
|
113
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
114
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
106
|
+
"@aztec/accounts": "1.0.0-nightly.20250606",
|
|
107
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250606",
|
|
108
|
+
"@aztec/ethereum": "1.0.0-nightly.20250606",
|
|
109
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250606",
|
|
110
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250606",
|
|
111
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250606",
|
|
112
|
+
"@aztec/noir-test-contracts.js": "1.0.0-nightly.20250606",
|
|
113
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250606",
|
|
114
|
+
"@aztec/stdlib": "1.0.0-nightly.20250606"
|
|
115
115
|
},
|
|
116
116
|
"files": [
|
|
117
117
|
"dest",
|
package/src/cmds/l1/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
pxeOption,
|
|
16
16
|
} from '../../utils/commands.js';
|
|
17
17
|
|
|
18
|
-
export { addL1Validator } from './update_l1_validators.js';
|
|
18
|
+
export { addL1Validator, dripQueue } from './update_l1_validators.js';
|
|
19
19
|
|
|
20
20
|
const l1RpcUrlsOption = new Option(
|
|
21
21
|
'--l1-rpc-urls <string>',
|
|
@@ -97,6 +97,42 @@ export async function addL1Validator({
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
export async function dripQueue({
|
|
101
|
+
rpcUrls,
|
|
102
|
+
chainId,
|
|
103
|
+
privateKey,
|
|
104
|
+
mnemonic,
|
|
105
|
+
stakingAssetHandlerAddress,
|
|
106
|
+
log,
|
|
107
|
+
debugLogger,
|
|
108
|
+
}: StakingAssetHandlerCommandArgs & LoggerArgs) {
|
|
109
|
+
const dualLog = makeDualLog(log, debugLogger);
|
|
110
|
+
const account = getAccount(privateKey, mnemonic);
|
|
111
|
+
const chain = createEthereumChain(rpcUrls, chainId);
|
|
112
|
+
const l1Client = createExtendedL1Client(rpcUrls, account, chain.chainInfo);
|
|
113
|
+
|
|
114
|
+
dualLog('Dripping Queue');
|
|
115
|
+
|
|
116
|
+
const l1TxUtils = new L1TxUtils(l1Client, debugLogger);
|
|
117
|
+
|
|
118
|
+
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
119
|
+
to: stakingAssetHandlerAddress.toString(),
|
|
120
|
+
data: encodeFunctionData({
|
|
121
|
+
abi: StakingAssetHandlerAbi,
|
|
122
|
+
functionName: 'dripQueue',
|
|
123
|
+
args: [],
|
|
124
|
+
}),
|
|
125
|
+
abi: StakingAssetHandlerAbi,
|
|
126
|
+
});
|
|
127
|
+
dualLog(`Receipt: ${receipt.transactionHash}`);
|
|
128
|
+
|
|
129
|
+
if (receipt.status === 'success') {
|
|
130
|
+
dualLog('Queue dripped successfully');
|
|
131
|
+
} else {
|
|
132
|
+
dualLog('Queue drip failed');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
100
136
|
export async function removeL1Validator({
|
|
101
137
|
rpcUrls,
|
|
102
138
|
chainId,
|