@aztec/aztec 0.0.1-commit.9b94fc1 → 0.0.1-commit.d3ec352c
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.
|
@@ -102,7 +102,7 @@ import { getAddress, getContract } from 'viem';
|
|
|
102
102
|
async warpTimeIfNeeded() {
|
|
103
103
|
try {
|
|
104
104
|
const currentSlot = SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot());
|
|
105
|
-
const pendingCheckpointNumber =
|
|
105
|
+
const pendingCheckpointNumber = await this.rollup.read.getPendingCheckpointNumber();
|
|
106
106
|
const checkpointLog = await this.rollup.read.getCheckpoint([
|
|
107
107
|
pendingCheckpointNumber
|
|
108
108
|
]);
|
|
@@ -38,4 +38,4 @@ export declare class CheatCodes {
|
|
|
38
38
|
*/
|
|
39
39
|
warpL2TimeAtLeastBy(sequencerClient: SequencerClient, node: AztecNode, duration: bigint | number): Promise<void>;
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlYXRfY29kZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0aW5nL2NoZWF0X2NvZGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUd2RSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUMvRCxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRTs7Ozs7R0FLRztBQUNILHFCQUFhLFVBQVU7SUFHWixHQUFHLEVBQUUsYUFBYTtJQUVsQixNQUFNLEVBQUUsZ0JBQWdCO0lBSmpDO0lBQ0UseUJBQXlCO0lBQ2xCLEdBQUcsRUFBRSxhQUFhO0lBQ3pCLHVEQUF1RDtJQUNoRCxNQUFNLEVBQUUsZ0JBQWdCLEVBQzdCO0lBRUosT0FBYSxNQUFNLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLFlBQVksR0FBRyxPQUFPLENBQUMsVUFBVSxDQUFDLENBT3ZHO0lBRUQ7Ozs7Ozs7O09BUUc7SUFDRyxtQkFBbUIsQ0FBQyxlQUFlLEVBQUUsZUFBZSxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsZUFBZSxFQUFFLE1BQU0sR0FBRyxNQUFNLGlCQXVCNUc7SUFFRDs7Ozs7Ozs7T0FRRztJQUNHLG1CQUFtQixDQUFDLGVBQWUsRUFBRSxlQUFlLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsTUFBTSxHQUFHLE1BQU0saUJBSXJHO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cheat_codes.d.ts","sourceRoot":"","sources":["../../src/testing/cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"cheat_codes.d.ts","sourceRoot":"","sources":["../../src/testing/cheat_codes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE;;;;;GAKG;AACH,qBAAa,UAAU;IAGZ,GAAG,EAAE,aAAa;IAElB,MAAM,EAAE,gBAAgB;IAJjC;IACE,yBAAyB;IAClB,GAAG,EAAE,aAAa;IACzB,uDAAuD;IAChD,MAAM,EAAE,gBAAgB,EAC7B;IAEJ,OAAa,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAOvG;IAED;;;;;;;;OAQG;IACG,mBAAmB,CAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,iBAuB5G;IAED;;;;;;;;OAQG;IACG,mBAAmB,CAAC,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,iBAIrG;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.d3ec352c",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"tsconfig": "./tsconfig.json"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "yarn clean &&
|
|
18
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
19
19
|
"start": "node --no-warnings ./dest/bin",
|
|
20
20
|
"start:debug": "node --inspect=0.0.0.0:9221 --no-warnings ./dest/bin",
|
|
21
21
|
"start:local-network": "ETHEREUM_HOSTS=http://0.0.0.0:8545/ && yarn start start --local-network",
|
|
22
22
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
23
|
-
"build:dev": "
|
|
23
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
24
24
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}",
|
|
25
25
|
"run:example:token": "LOG_LEVEL='verbose' node ./dest/examples/token.js"
|
|
26
26
|
},
|
|
@@ -28,37 +28,37 @@
|
|
|
28
28
|
"../package.common.json"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
32
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
33
|
-
"@aztec/aztec-faucet": "0.0.1-commit.
|
|
34
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
35
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
36
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
37
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
38
|
-
"@aztec/blob-sink": "0.0.1-commit.
|
|
39
|
-
"@aztec/bot": "0.0.1-commit.
|
|
40
|
-
"@aztec/builder": "0.0.1-commit.
|
|
41
|
-
"@aztec/cli": "0.0.1-commit.
|
|
42
|
-
"@aztec/constants": "0.0.1-commit.
|
|
43
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
44
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
45
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
46
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
47
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
48
|
-
"@aztec/node-lib": "0.0.1-commit.
|
|
49
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
50
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
51
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
52
|
-
"@aztec/p2p-bootstrap": "0.0.1-commit.
|
|
53
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
54
|
-
"@aztec/prover-client": "0.0.1-commit.
|
|
55
|
-
"@aztec/prover-node": "0.0.1-commit.
|
|
56
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
57
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
58
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
59
|
-
"@aztec/test-wallet": "0.0.1-commit.
|
|
60
|
-
"@aztec/txe": "0.0.1-commit.
|
|
61
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
31
|
+
"@aztec/accounts": "0.0.1-commit.d3ec352c",
|
|
32
|
+
"@aztec/archiver": "0.0.1-commit.d3ec352c",
|
|
33
|
+
"@aztec/aztec-faucet": "0.0.1-commit.d3ec352c",
|
|
34
|
+
"@aztec/aztec-node": "0.0.1-commit.d3ec352c",
|
|
35
|
+
"@aztec/aztec.js": "0.0.1-commit.d3ec352c",
|
|
36
|
+
"@aztec/bb-prover": "0.0.1-commit.d3ec352c",
|
|
37
|
+
"@aztec/bb.js": "0.0.1-commit.d3ec352c",
|
|
38
|
+
"@aztec/blob-sink": "0.0.1-commit.d3ec352c",
|
|
39
|
+
"@aztec/bot": "0.0.1-commit.d3ec352c",
|
|
40
|
+
"@aztec/builder": "0.0.1-commit.d3ec352c",
|
|
41
|
+
"@aztec/cli": "0.0.1-commit.d3ec352c",
|
|
42
|
+
"@aztec/constants": "0.0.1-commit.d3ec352c",
|
|
43
|
+
"@aztec/entrypoints": "0.0.1-commit.d3ec352c",
|
|
44
|
+
"@aztec/ethereum": "0.0.1-commit.d3ec352c",
|
|
45
|
+
"@aztec/foundation": "0.0.1-commit.d3ec352c",
|
|
46
|
+
"@aztec/kv-store": "0.0.1-commit.d3ec352c",
|
|
47
|
+
"@aztec/l1-artifacts": "0.0.1-commit.d3ec352c",
|
|
48
|
+
"@aztec/node-lib": "0.0.1-commit.d3ec352c",
|
|
49
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.d3ec352c",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.d3ec352c",
|
|
51
|
+
"@aztec/p2p": "0.0.1-commit.d3ec352c",
|
|
52
|
+
"@aztec/p2p-bootstrap": "0.0.1-commit.d3ec352c",
|
|
53
|
+
"@aztec/protocol-contracts": "0.0.1-commit.d3ec352c",
|
|
54
|
+
"@aztec/prover-client": "0.0.1-commit.d3ec352c",
|
|
55
|
+
"@aztec/prover-node": "0.0.1-commit.d3ec352c",
|
|
56
|
+
"@aztec/pxe": "0.0.1-commit.d3ec352c",
|
|
57
|
+
"@aztec/stdlib": "0.0.1-commit.d3ec352c",
|
|
58
|
+
"@aztec/telemetry-client": "0.0.1-commit.d3ec352c",
|
|
59
|
+
"@aztec/test-wallet": "0.0.1-commit.d3ec352c",
|
|
60
|
+
"@aztec/txe": "0.0.1-commit.d3ec352c",
|
|
61
|
+
"@aztec/world-state": "0.0.1-commit.d3ec352c",
|
|
62
62
|
"@types/chalk": "^2.2.0",
|
|
63
63
|
"abitype": "^0.8.11",
|
|
64
64
|
"chalk": "^5.3.0",
|
package/scripts/aztec.sh
CHANGED
|
@@ -4,7 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
script_dir="$(dirname "$(realpath "$0")")"
|
|
5
5
|
|
|
6
6
|
function aztec {
|
|
7
|
-
node --no-warnings $script_dir/../dest/bin/index.js "$@"
|
|
7
|
+
exec node --no-warnings $script_dir/../dest/bin/index.js "$@"
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
cmd=${1:-}
|
|
@@ -50,10 +50,6 @@ case $cmd in
|
|
|
50
50
|
compile|new|init|flamegraph)
|
|
51
51
|
$script_dir/${cmd}.sh "$@"
|
|
52
52
|
;;
|
|
53
|
-
fmt|check|lsp)
|
|
54
|
-
# TODO: These should be removed, just use nargo directly.
|
|
55
|
-
nargo $cmd "$@"
|
|
56
|
-
;;
|
|
57
53
|
*)
|
|
58
54
|
aztec $cmd "$@"
|
|
59
55
|
;;
|
|
@@ -125,7 +125,7 @@ export class AnvilTestWatcher {
|
|
|
125
125
|
async warpTimeIfNeeded() {
|
|
126
126
|
try {
|
|
127
127
|
const currentSlot = SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot());
|
|
128
|
-
const pendingCheckpointNumber =
|
|
128
|
+
const pendingCheckpointNumber = await this.rollup.read.getPendingCheckpointNumber();
|
|
129
129
|
const checkpointLog = await this.rollup.read.getCheckpoint([pendingCheckpointNumber]);
|
|
130
130
|
const nextSlot = SlotNumber(currentSlot + 1);
|
|
131
131
|
const nextSlotTimestamp = Number(await this.rollup.read.getTimestampForSlot([BigInt(nextSlot)]));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
4
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
4
5
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
@@ -37,7 +38,7 @@ export class CheatCodes {
|
|
|
37
38
|
* @param targetTimestamp - The target timestamp to warp to (in seconds)
|
|
38
39
|
*/
|
|
39
40
|
async warpL2TimeAtLeastTo(sequencerClient: SequencerClient, node: AztecNode, targetTimestamp: bigint | number) {
|
|
40
|
-
const currentL2BlockNumber = await node.getBlockNumber();
|
|
41
|
+
const currentL2BlockNumber: BlockNumber = await node.getBlockNumber();
|
|
41
42
|
|
|
42
43
|
// We warp the L1 timestamp
|
|
43
44
|
await this.eth.warp(targetTimestamp, { resetBlockInterval: true });
|
|
@@ -49,7 +50,7 @@ export class CheatCodes {
|
|
|
49
50
|
|
|
50
51
|
await retryUntil(
|
|
51
52
|
async () => {
|
|
52
|
-
const newL2BlockNumber = await node.getBlockNumber();
|
|
53
|
+
const newL2BlockNumber: BlockNumber = await node.getBlockNumber();
|
|
53
54
|
return newL2BlockNumber > currentL2BlockNumber;
|
|
54
55
|
},
|
|
55
56
|
'new block after warping L2 time',
|