@aztec/cli 1.0.0-nightly.20250708 → 1.0.0-staging.1
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/advance_epoch.js +2 -2
- package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
- package/dest/cmds/l1/assume_proven_through.js +3 -2
- package/dest/cmds/l1/update_l1_validators.js +2 -5
- package/package.json +22 -22
- package/src/cmds/l1/advance_epoch.ts +2 -2
- package/src/cmds/l1/assume_proven_through.ts +3 -2
- package/src/cmds/l1/update_l1_validators.ts +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createPXEClient, makeFetch } from '@aztec/aztec.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
3
3
|
export async function advanceEpoch(l1RpcUrls, rpcUrl, log) {
|
|
4
4
|
const pxe = createPXEClient(rpcUrl, {}, makeFetch([], true));
|
|
5
5
|
const rollupAddress = await pxe.getNodeInfo().then((i)=>i.l1ContractAddresses.rollupAddress);
|
|
6
|
-
const cheat =
|
|
6
|
+
const cheat = CheatCodes.createRollup(l1RpcUrls, {
|
|
7
7
|
rollupAddress
|
|
8
8
|
});
|
|
9
9
|
await cheat.advanceToNextEpoch();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assume_proven_through.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/assume_proven_through.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,wBAAsB,mBAAmB,CACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,SAAS,EAAE,MAAM,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"assume_proven_through.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/assume_proven_through.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,wBAAsB,mBAAmB,CACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,SAAS,EAAE,MAAM,EAAE,EACnB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,KAAK,iBAWX"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createPXEClient, makeFetch } from '@aztec/aztec.js';
|
|
2
|
-
import { RollupCheatCodes } from '@aztec/
|
|
2
|
+
import { EthCheatCodes, RollupCheatCodes } from '@aztec/aztec.js/testing';
|
|
3
3
|
export async function assumeProvenThrough(blockNumberOrLatest, l1RpcUrls, rpcUrl, log) {
|
|
4
4
|
const pxe = createPXEClient(rpcUrl, {}, makeFetch([], true));
|
|
5
5
|
const rollupAddress = await pxe.getNodeInfo().then((i)=>i.l1ContractAddresses.rollupAddress);
|
|
6
6
|
const blockNumber = blockNumberOrLatest ?? await pxe.getBlockNumber();
|
|
7
|
-
const
|
|
7
|
+
const ethCheatCode = new EthCheatCodes(l1RpcUrls);
|
|
8
|
+
const rollupCheatCodes = new RollupCheatCodes(ethCheatCode, {
|
|
8
9
|
rollupAddress
|
|
9
10
|
});
|
|
10
11
|
await rollupCheatCodes.markAsProven(blockNumber);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { L1TxUtils, RollupContract, createEthereumChain, createExtendedL1Client, getL1ContractsConfigEnvVars, getPublicClient, isAnvilTestChain } from '@aztec/ethereum';
|
|
2
|
-
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
1
|
+
import { EthCheatCodes, L1TxUtils, RollupContract, createEthereumChain, createExtendedL1Client, getL1ContractsConfigEnvVars, getPublicClient, isAnvilTestChain } from '@aztec/ethereum';
|
|
3
2
|
import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
4
3
|
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
|
|
5
4
|
import { encodeFunctionData, formatEther, getContract } from 'viem';
|
|
@@ -115,9 +114,7 @@ export async function fastForwardEpochs({ rpcUrls, chainId, rollupAddress, numEp
|
|
|
115
114
|
]);
|
|
116
115
|
dualLog(`Fast forwarding ${numEpochs} epochs to ${timestamp}`);
|
|
117
116
|
try {
|
|
118
|
-
await cheatCodes.warp(Number(timestamp)
|
|
119
|
-
resetBlockInterval: true
|
|
120
|
-
});
|
|
117
|
+
await cheatCodes.warp(Number(timestamp));
|
|
121
118
|
dualLog(`Fast forwarded ${numEpochs} epochs to ${timestamp}`);
|
|
122
119
|
} catch (error) {
|
|
123
120
|
if (error instanceof Error && error.message.includes("is lower than or equal to previous block's timestamp")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-staging.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -69,16 +69,15 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/archiver": "1.0.0-
|
|
73
|
-
"@aztec/aztec.js": "1.0.0-
|
|
74
|
-
"@aztec/constants": "1.0.0-
|
|
75
|
-
"@aztec/entrypoints": "1.0.0-
|
|
76
|
-
"@aztec/
|
|
77
|
-
"@aztec/
|
|
78
|
-
"@aztec/
|
|
79
|
-
"@aztec/
|
|
80
|
-
"@aztec/
|
|
81
|
-
"@aztec/world-state": "1.0.0-nightly.20250708",
|
|
72
|
+
"@aztec/archiver": "1.0.0-staging.1",
|
|
73
|
+
"@aztec/aztec.js": "1.0.0-staging.1",
|
|
74
|
+
"@aztec/constants": "1.0.0-staging.1",
|
|
75
|
+
"@aztec/entrypoints": "1.0.0-staging.1",
|
|
76
|
+
"@aztec/foundation": "1.0.0-staging.1",
|
|
77
|
+
"@aztec/l1-artifacts": "1.0.0-staging.1",
|
|
78
|
+
"@aztec/p2p": "1.0.0-staging.1",
|
|
79
|
+
"@aztec/stdlib": "1.0.0-staging.1",
|
|
80
|
+
"@aztec/world-state": "1.0.0-staging.1",
|
|
82
81
|
"@iarna/toml": "^2.2.5",
|
|
83
82
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
84
83
|
"commander": "^12.1.0",
|
|
@@ -90,8 +89,9 @@
|
|
|
90
89
|
"viem": "2.23.7"
|
|
91
90
|
},
|
|
92
91
|
"devDependencies": {
|
|
93
|
-
"@aztec/accounts": "1.0.0-
|
|
94
|
-
"@aztec/
|
|
92
|
+
"@aztec/accounts": "1.0.0-staging.1",
|
|
93
|
+
"@aztec/ethereum": "1.0.0-staging.1",
|
|
94
|
+
"@aztec/protocol-contracts": "1.0.0-staging.1",
|
|
95
95
|
"@jest/globals": "^30.0.0",
|
|
96
96
|
"@types/jest": "^30.0.0",
|
|
97
97
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -107,15 +107,15 @@
|
|
|
107
107
|
"typescript": "^5.3.3"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
110
|
-
"@aztec/accounts": "1.0.0-
|
|
111
|
-
"@aztec/bb-prover": "1.0.0-
|
|
112
|
-
"@aztec/ethereum": "1.0.0-
|
|
113
|
-
"@aztec/l1-artifacts": "1.0.0-
|
|
114
|
-
"@aztec/noir-contracts.js": "1.0.0-
|
|
115
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-
|
|
116
|
-
"@aztec/noir-test-contracts.js": "1.0.0-
|
|
117
|
-
"@aztec/protocol-contracts": "1.0.0-
|
|
118
|
-
"@aztec/stdlib": "1.0.0-
|
|
110
|
+
"@aztec/accounts": "1.0.0-staging.1",
|
|
111
|
+
"@aztec/bb-prover": "1.0.0-staging.1",
|
|
112
|
+
"@aztec/ethereum": "1.0.0-staging.1",
|
|
113
|
+
"@aztec/l1-artifacts": "1.0.0-staging.1",
|
|
114
|
+
"@aztec/noir-contracts.js": "1.0.0-staging.1",
|
|
115
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-staging.1",
|
|
116
|
+
"@aztec/noir-test-contracts.js": "1.0.0-staging.1",
|
|
117
|
+
"@aztec/protocol-contracts": "1.0.0-staging.1",
|
|
118
|
+
"@aztec/stdlib": "1.0.0-staging.1"
|
|
119
119
|
},
|
|
120
120
|
"files": [
|
|
121
121
|
"dest",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createPXEClient, makeFetch } from '@aztec/aztec.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CheatCodes } from '@aztec/aztec.js/testing';
|
|
3
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
4
|
|
|
5
5
|
export async function advanceEpoch(l1RpcUrls: string[], rpcUrl: string, log: LogFn) {
|
|
6
6
|
const pxe = createPXEClient(rpcUrl, {}, makeFetch([], true));
|
|
7
7
|
const rollupAddress = await pxe.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
8
8
|
|
|
9
|
-
const cheat =
|
|
9
|
+
const cheat = CheatCodes.createRollup(l1RpcUrls, { rollupAddress });
|
|
10
10
|
|
|
11
11
|
await cheat.advanceToNextEpoch();
|
|
12
12
|
log(`Warped time to advance to next epoch`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPXEClient, makeFetch } from '@aztec/aztec.js';
|
|
2
|
-
import { RollupCheatCodes } from '@aztec/
|
|
2
|
+
import { EthCheatCodes, RollupCheatCodes } from '@aztec/aztec.js/testing';
|
|
3
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
4
|
|
|
5
5
|
export async function assumeProvenThrough(
|
|
@@ -12,7 +12,8 @@ export async function assumeProvenThrough(
|
|
|
12
12
|
const rollupAddress = await pxe.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
13
13
|
const blockNumber = blockNumberOrLatest ?? (await pxe.getBlockNumber());
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const ethCheatCode = new EthCheatCodes(l1RpcUrls);
|
|
16
|
+
const rollupCheatCodes = new RollupCheatCodes(ethCheatCode, { rollupAddress });
|
|
16
17
|
|
|
17
18
|
await rollupCheatCodes.markAsProven(blockNumber);
|
|
18
19
|
log(`Assumed proven through block ${blockNumber}`);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
EthCheatCodes,
|
|
2
3
|
L1TxUtils,
|
|
3
4
|
RollupContract,
|
|
4
5
|
createEthereumChain,
|
|
@@ -7,7 +8,6 @@ import {
|
|
|
7
8
|
getPublicClient,
|
|
8
9
|
isAnvilTestChain,
|
|
9
10
|
} from '@aztec/ethereum';
|
|
10
|
-
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
11
11
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
12
12
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
13
13
|
import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
@@ -181,7 +181,7 @@ export async function fastForwardEpochs({
|
|
|
181
181
|
const timestamp = await rollup.read.getTimestampForSlot([currentSlot + l2SlotsInEpoch * numEpochs]);
|
|
182
182
|
dualLog(`Fast forwarding ${numEpochs} epochs to ${timestamp}`);
|
|
183
183
|
try {
|
|
184
|
-
await cheatCodes.warp(Number(timestamp)
|
|
184
|
+
await cheatCodes.warp(Number(timestamp));
|
|
185
185
|
dualLog(`Fast forwarded ${numEpochs} epochs to ${timestamp}`);
|
|
186
186
|
} catch (error) {
|
|
187
187
|
if (error instanceof Error && error.message.includes("is lower than or equal to previous block's timestamp")) {
|