@aztec/cli 3.0.0-nightly.20250923 → 3.0.0-nightly.20250924
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.d.ts.map +1 -1
- package/dest/cmds/l1/advance_epoch.js +2 -1
- package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
- package/dest/cmds/l1/assume_proven_through.js +2 -1
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +4 -3
- package/package.json +24 -24
- package/src/cmds/l1/advance_epoch.ts +2 -1
- package/src/cmds/l1/assume_proven_through.ts +2 -1
- package/src/cmds/l1/update_l1_validators.ts +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advance_epoch.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/advance_epoch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"advance_epoch.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/advance_epoch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,iBAQlF"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
4
|
export async function advanceEpoch(l1RpcUrls, nodeUrl, log) {
|
|
4
5
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
5
6
|
const rollupAddress = await aztecNode.getNodeInfo().then((i)=>i.l1ContractAddresses.rollupAddress);
|
|
6
7
|
const cheat = RollupCheatCodes.create(l1RpcUrls, {
|
|
7
8
|
rollupAddress
|
|
8
|
-
});
|
|
9
|
+
}, new DateProvider());
|
|
9
10
|
await cheat.advanceToNextEpoch();
|
|
10
11
|
log(`Warped time to advance to next epoch`);
|
|
11
12
|
}
|
|
@@ -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;
|
|
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;AAGnD,wBAAsB,mBAAmB,CACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,KAAK,iBAUX"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
4
|
export async function assumeProvenThrough(blockNumberOrLatest, l1RpcUrls, nodeUrl, log) {
|
|
4
5
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
5
6
|
const rollupAddress = await aztecNode.getNodeInfo().then((i)=>i.l1ContractAddresses.rollupAddress);
|
|
6
7
|
const blockNumber = blockNumberOrLatest ?? await aztecNode.getBlockNumber();
|
|
7
8
|
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, {
|
|
8
9
|
rollupAddress
|
|
9
|
-
});
|
|
10
|
+
}, new DateProvider());
|
|
10
11
|
await rollupCheatCodes.markAsProven(blockNumber);
|
|
11
12
|
log(`Assumed proven through block ${blockNumber}`);
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"update_l1_validators.d.ts","sourceRoot":"","sources":["../../../src/cmds/l1/update_l1_validators.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAU3D,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,WAAW,EACX,WAAW,EACX,YAAY,EACZ,GAAG,EACH,WAAW,GACZ,EAAE,8BAA8B,GAC/B,UAAU,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,iBA4DF;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,GAAG,EACH,WAAW,GACZ,EAAE,iBAAiB,GAClB,UAAU,GAAG;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,UAAU,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;CAC/B,iBAuDF;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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GSEContract, RollupContract, createEthereumChain, createExtendedL1Client, createL1TxUtilsFromViemWallet, getL1ContractsConfigEnvVars, getPublicClient, isAnvilTestChain } from '@aztec/ethereum';
|
|
2
2
|
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
3
4
|
import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
4
5
|
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
|
|
5
6
|
import { encodeFunctionData, formatEther, getContract } from 'viem';
|
|
@@ -59,7 +60,7 @@ export async function addL1Validator({ rpcUrls, chainId, privateKey, mnemonic, a
|
|
|
59
60
|
});
|
|
60
61
|
if (isAnvilTestChain(chainId)) {
|
|
61
62
|
dualLog(`Funding validator on L1`);
|
|
62
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
63
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
63
64
|
await cheatCodes.setBalance(attesterAddress, 10n ** 20n);
|
|
64
65
|
} else {
|
|
65
66
|
const balance = await l1Client.getBalance({
|
|
@@ -111,7 +112,7 @@ export async function addL1ValidatorViaRollup({ rpcUrls, chainId, privateKey, mn
|
|
|
111
112
|
});
|
|
112
113
|
if (isAnvilTestChain(chainId)) {
|
|
113
114
|
dualLog(`Funding validator on L1`);
|
|
114
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
115
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
115
116
|
await cheatCodes.setBalance(attesterAddress, 10n ** 20n);
|
|
116
117
|
} else {
|
|
117
118
|
const balance = await l1Client.getBalance({
|
|
@@ -170,7 +171,7 @@ export async function fastForwardEpochs({ rpcUrls, chainId, rollupAddress, numEp
|
|
|
170
171
|
abi: RollupAbi,
|
|
171
172
|
client: publicClient
|
|
172
173
|
});
|
|
173
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
174
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
174
175
|
const currentSlot = await rollup.read.getCurrentSlot();
|
|
175
176
|
const l2SlotsInEpoch = await rollup.read.getEpochDuration();
|
|
176
177
|
const timestamp = await rollup.read.getTimestampForSlot([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20250924",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -71,20 +71,20 @@
|
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
75
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
76
|
-
"@aztec/aztec.js": "3.0.0-nightly.
|
|
77
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
78
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
79
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
80
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
81
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
82
|
-
"@aztec/node-lib": "3.0.0-nightly.
|
|
83
|
-
"@aztec/p2p": "3.0.0-nightly.
|
|
84
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
85
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
86
|
-
"@aztec/test-wallet": "3.0.0-nightly.
|
|
87
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
74
|
+
"@aztec/accounts": "3.0.0-nightly.20250924",
|
|
75
|
+
"@aztec/archiver": "3.0.0-nightly.20250924",
|
|
76
|
+
"@aztec/aztec.js": "3.0.0-nightly.20250924",
|
|
77
|
+
"@aztec/constants": "3.0.0-nightly.20250924",
|
|
78
|
+
"@aztec/entrypoints": "3.0.0-nightly.20250924",
|
|
79
|
+
"@aztec/ethereum": "3.0.0-nightly.20250924",
|
|
80
|
+
"@aztec/foundation": "3.0.0-nightly.20250924",
|
|
81
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20250924",
|
|
82
|
+
"@aztec/node-lib": "3.0.0-nightly.20250924",
|
|
83
|
+
"@aztec/p2p": "3.0.0-nightly.20250924",
|
|
84
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20250924",
|
|
85
|
+
"@aztec/stdlib": "3.0.0-nightly.20250924",
|
|
86
|
+
"@aztec/test-wallet": "3.0.0-nightly.20250924",
|
|
87
|
+
"@aztec/world-state": "3.0.0-nightly.20250924",
|
|
88
88
|
"@iarna/toml": "^2.2.5",
|
|
89
89
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
90
90
|
"commander": "^12.1.0",
|
|
@@ -111,15 +111,15 @@
|
|
|
111
111
|
"typescript": "^5.3.3"
|
|
112
112
|
},
|
|
113
113
|
"peerDependencies": {
|
|
114
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
115
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
116
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
117
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
118
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
119
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
120
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
121
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
122
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
114
|
+
"@aztec/accounts": "3.0.0-nightly.20250924",
|
|
115
|
+
"@aztec/bb-prover": "3.0.0-nightly.20250924",
|
|
116
|
+
"@aztec/ethereum": "3.0.0-nightly.20250924",
|
|
117
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20250924",
|
|
118
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20250924",
|
|
119
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20250924",
|
|
120
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20250924",
|
|
121
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20250924",
|
|
122
|
+
"@aztec/stdlib": "3.0.0-nightly.20250924"
|
|
123
123
|
},
|
|
124
124
|
"files": [
|
|
125
125
|
"dest",
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
5
|
|
|
5
6
|
export async function advanceEpoch(l1RpcUrls: string[], nodeUrl: string, log: LogFn) {
|
|
6
7
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
7
8
|
const rollupAddress = await aztecNode.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
8
9
|
|
|
9
|
-
const cheat = RollupCheatCodes.create(l1RpcUrls, { rollupAddress });
|
|
10
|
+
const cheat = RollupCheatCodes.create(l1RpcUrls, { rollupAddress }, new DateProvider());
|
|
10
11
|
|
|
11
12
|
await cheat.advanceToNextEpoch();
|
|
12
13
|
log(`Warped time to advance to next epoch`);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
5
|
|
|
5
6
|
export async function assumeProvenThrough(
|
|
6
7
|
blockNumberOrLatest: number | undefined,
|
|
@@ -12,7 +13,7 @@ export async function assumeProvenThrough(
|
|
|
12
13
|
const rollupAddress = await aztecNode.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
13
14
|
const blockNumber = blockNumberOrLatest ?? (await aztecNode.getBlockNumber());
|
|
14
15
|
|
|
15
|
-
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, { rollupAddress });
|
|
16
|
+
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, { rollupAddress }, new DateProvider());
|
|
16
17
|
|
|
17
18
|
await rollupCheatCodes.markAsProven(blockNumber);
|
|
18
19
|
log(`Assumed proven through block ${blockNumber}`);
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { EthCheatCodes } from '@aztec/ethereum/test';
|
|
12
12
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
13
13
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
14
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
14
15
|
import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts';
|
|
15
16
|
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
|
|
16
17
|
|
|
@@ -120,7 +121,7 @@ export async function addL1Validator({
|
|
|
120
121
|
await l1Client.waitForTransactionReceipt({ hash: receipt.transactionHash });
|
|
121
122
|
if (isAnvilTestChain(chainId)) {
|
|
122
123
|
dualLog(`Funding validator on L1`);
|
|
123
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
124
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
124
125
|
await cheatCodes.setBalance(attesterAddress, 10n ** 20n);
|
|
125
126
|
} else {
|
|
126
127
|
const balance = await l1Client.getBalance({ address: attesterAddress.toString() });
|
|
@@ -194,7 +195,7 @@ export async function addL1ValidatorViaRollup({
|
|
|
194
195
|
await l1Client.waitForTransactionReceipt({ hash: receipt.transactionHash });
|
|
195
196
|
if (isAnvilTestChain(chainId)) {
|
|
196
197
|
dualLog(`Funding validator on L1`);
|
|
197
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
198
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
198
199
|
await cheatCodes.setBalance(attesterAddress, 10n ** 20n);
|
|
199
200
|
} else {
|
|
200
201
|
const balance = await l1Client.getBalance({ address: attesterAddress.toString() });
|
|
@@ -275,7 +276,7 @@ export async function fastForwardEpochs({
|
|
|
275
276
|
client: publicClient,
|
|
276
277
|
});
|
|
277
278
|
|
|
278
|
-
const cheatCodes = new EthCheatCodes(rpcUrls, debugLogger);
|
|
279
|
+
const cheatCodes = new EthCheatCodes(rpcUrls, new DateProvider(), debugLogger);
|
|
279
280
|
const currentSlot = await rollup.read.getCurrentSlot();
|
|
280
281
|
const l2SlotsInEpoch = await rollup.read.getEpochDuration();
|
|
281
282
|
const timestamp = await rollup.read.getTimestampForSlot([currentSlot + l2SlotsInEpoch * numEpochs]);
|