@aztec/cli 0.0.1-commit.7b97ef96e → 0.0.1-commit.7cbc774
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/aztec_node/block_number.js +1 -1
- package/dest/cmds/aztec_node/get_logs.d.ts +30 -4
- package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -1
- package/dest/cmds/aztec_node/get_logs.js +39 -29
- package/dest/cmds/aztec_node/get_node_info.d.ts +1 -1
- package/dest/cmds/aztec_node/get_node_info.d.ts.map +1 -1
- package/dest/cmds/aztec_node/get_node_info.js +0 -2
- package/dest/cmds/aztec_node/index.d.ts +1 -1
- package/dest/cmds/aztec_node/index.d.ts.map +1 -1
- package/dest/cmds/aztec_node/index.js +13 -3
- package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts +1 -1
- package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_l1_contracts_cmd.js +0 -1
- package/dest/cmds/l1/deploy_new_rollup.d.ts +1 -1
- package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_new_rollup.js +2 -4
- package/dest/cmds/l1/update_l1_validators.d.ts +1 -1
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +0 -1
- package/dest/config/cached_fetch.d.ts +19 -10
- package/dest/config/cached_fetch.d.ts.map +1 -1
- package/dest/config/cached_fetch.js +110 -32
- package/dest/config/generated/networks.d.ts +66 -56
- package/dest/config/generated/networks.d.ts.map +1 -1
- package/dest/config/generated/networks.js +67 -57
- package/dest/config/network_config.d.ts +1 -1
- package/dest/config/network_config.d.ts.map +1 -1
- package/dest/config/network_config.js +6 -2
- package/dest/utils/aztec.d.ts +1 -2
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +2 -3
- package/dest/utils/commands.d.ts +14 -6
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/commands.js +19 -9
- package/dest/utils/inspect.d.ts +1 -1
- package/dest/utils/inspect.d.ts.map +1 -1
- package/dest/utils/inspect.js +6 -5
- package/package.json +30 -30
- package/src/cmds/aztec_node/block_number.ts +1 -1
- package/src/cmds/aztec_node/get_logs.ts +70 -38
- package/src/cmds/aztec_node/get_node_info.ts +0 -2
- package/src/cmds/aztec_node/index.ts +13 -8
- package/src/cmds/l1/deploy_l1_contracts_cmd.ts +0 -1
- package/src/cmds/l1/deploy_new_rollup.ts +1 -3
- package/src/cmds/l1/update_l1_validators.ts +0 -1
- package/src/config/cached_fetch.ts +119 -31
- package/src/config/generated/networks.ts +65 -55
- package/src/config/network_config.ts +6 -2
- package/src/utils/aztec.ts +12 -18
- package/src/utils/commands.ts +22 -9
- package/src/utils/inspect.ts +4 -5
package/dest/utils/commands.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ import type { PXE } from '@aztec/pxe/server';
|
|
|
5
5
|
import { FunctionSelector } from '@aztec/stdlib/abi/function-selector';
|
|
6
6
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
7
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
8
|
-
import {
|
|
8
|
+
import { LogCursor, Tag } from '@aztec/stdlib/logs';
|
|
9
9
|
import { TxHash } from '@aztec/stdlib/tx/tx-hash';
|
|
10
10
|
import { type Command, Option } from 'commander';
|
|
11
|
+
export { LogCursor };
|
|
11
12
|
/**
|
|
12
13
|
* If we can successfully resolve 'host.docker.internal', then we are running in a container, and we should treat
|
|
13
14
|
* localhost as being host.docker.internal.
|
|
@@ -73,12 +74,19 @@ export declare function parseEthereumAddress(address: string): EthAddress;
|
|
|
73
74
|
*/
|
|
74
75
|
export declare function parseOptionalAztecAddress(address: string): AztecAddress | undefined;
|
|
75
76
|
/**
|
|
76
|
-
* Parses an optional
|
|
77
|
+
* Parses an optional `<blockNumber>-<txIndexWithinBlock>-<logIndexWithinTx>` triple into a {@link LogCursor},
|
|
78
|
+
* used as the `--after-log` argument of `get-logs` to resume pagination strictly after a previously-seen log.
|
|
79
|
+
* Thin wrapper over {@link LogCursor.parseOptional} that surfaces parse errors as commander's
|
|
80
|
+
* {@link InvalidArgumentError}.
|
|
81
|
+
*/
|
|
82
|
+
export declare function parseOptionalLogCursor(value: string): LogCursor | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Parses a log tag from a string. Tags are field-element values; we delegate to the {@link parseField} parser.
|
|
77
85
|
*
|
|
78
|
-
* @param
|
|
79
|
-
* @returns
|
|
86
|
+
* @param tag - A hex string, integer, or boolean string representing the tag.
|
|
87
|
+
* @returns A {@link Tag} wrapping the parsed field.
|
|
80
88
|
*/
|
|
81
|
-
export declare function
|
|
89
|
+
export declare function parseTag(tag: string): Tag;
|
|
82
90
|
/**
|
|
83
91
|
* Parses a selector from a string.
|
|
84
92
|
* @param selector - A serialized selector.
|
|
@@ -149,4 +157,4 @@ export declare function parseFields(fields: string[]): Fr[];
|
|
|
149
157
|
* @returns A JSON string
|
|
150
158
|
*/
|
|
151
159
|
export declare function prettyPrintJSON(data: Record<string, any>): string;
|
|
152
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
160
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jb21tYW5kcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQzNELE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLEdBQUcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0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ACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CASpF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,MAAgC,EACrC,GAAG,GAAE,MAAgC,GACpC,MAAM,GAAG,SAAS,CAepB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CASxE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,EAAE,CAMvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,EAAE,CAMpD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAyB5C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAElD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAcjE"}
|
package/dest/utils/commands.js
CHANGED
|
@@ -3,11 +3,12 @@ import { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
3
3
|
import { FunctionSelector } from '@aztec/stdlib/abi/function-selector';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
6
|
-
import {
|
|
6
|
+
import { LogCursor, Tag } from '@aztec/stdlib/logs';
|
|
7
7
|
import { TxHash } from '@aztec/stdlib/tx/tx-hash';
|
|
8
8
|
import { CommanderError, InvalidArgumentError, Option } from 'commander';
|
|
9
9
|
import { lookup } from 'dns/promises';
|
|
10
10
|
import { rename, writeFile } from 'fs/promises';
|
|
11
|
+
export { LogCursor };
|
|
11
12
|
/**
|
|
12
13
|
* If we can successfully resolve 'host.docker.internal', then we are running in a container, and we should treat
|
|
13
14
|
* localhost as being host.docker.internal.
|
|
@@ -166,15 +167,24 @@ export function parseBigint(bigint) {
|
|
|
166
167
|
return parseAztecAddress(address);
|
|
167
168
|
}
|
|
168
169
|
/**
|
|
169
|
-
* Parses an optional
|
|
170
|
-
*
|
|
171
|
-
* @
|
|
172
|
-
* @
|
|
173
|
-
*/ export function
|
|
174
|
-
|
|
175
|
-
return
|
|
170
|
+
* Parses an optional `<blockNumber>-<txIndexWithinBlock>-<logIndexWithinTx>` triple into a {@link LogCursor},
|
|
171
|
+
* used as the `--after-log` argument of `get-logs` to resume pagination strictly after a previously-seen log.
|
|
172
|
+
* Thin wrapper over {@link LogCursor.parseOptional} that surfaces parse errors as commander's
|
|
173
|
+
* {@link InvalidArgumentError}.
|
|
174
|
+
*/ export function parseOptionalLogCursor(value) {
|
|
175
|
+
try {
|
|
176
|
+
return LogCursor.parseOptional(value);
|
|
177
|
+
} catch (err) {
|
|
178
|
+
throw new InvalidArgumentError(err instanceof Error ? err.message : String(err));
|
|
176
179
|
}
|
|
177
|
-
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Parses a log tag from a string. Tags are field-element values; we delegate to the {@link parseField} parser.
|
|
183
|
+
*
|
|
184
|
+
* @param tag - A hex string, integer, or boolean string representing the tag.
|
|
185
|
+
* @returns A {@link Tag} wrapping the parsed field.
|
|
186
|
+
*/ export function parseTag(tag) {
|
|
187
|
+
return new Tag(parseField(tag));
|
|
178
188
|
}
|
|
179
189
|
/**
|
|
180
190
|
* Parses a selector from a string.
|
package/dest/utils/inspect.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export declare function inspectBlock(aztecNode: AztecNode, blockNumber: BlockNum
|
|
|
8
8
|
export declare function inspectTx(aztecNode: AztecNode, txHash: TxHash, log: LogFn, opts?: {
|
|
9
9
|
includeBlockInfo?: boolean;
|
|
10
10
|
}): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zcGVjdC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL2luc3BlY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQzlELE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ2pFLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRS9DLHdCQUFzQixZQUFZLENBQ2hDLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLFdBQVcsRUFBRSxXQUFXLEVBQ3hCLEdBQUcsRUFBRSxLQUFLLEVBQ1YsSUFBSSxHQUFFO0lBQUUsT0FBTyxDQUFDLEVBQUUsT0FBTyxDQUFBO0NBQU8saUJBeUJqQztBQUVELHdCQUFzQixTQUFTLENBQzdCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLE1BQU0sRUFBRSxNQUFNLEVBQ2QsR0FBRyxFQUFFLEtBQUssRUFDVixJQUFJLEdBQUU7SUFBRSxnQkFBZ0IsQ0FBQyxFQUFFLE9BQU8sQ0FBQTtDQUFPLGlCQXNFMUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/utils/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAsB,YAAY,CAChC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,KAAK,EACV,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/utils/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAsB,YAAY,CAChC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,KAAK,EACV,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,iBAyBjC;AAED,wBAAsB,SAAS,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,KAAK,EACV,IAAI,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAO,iBAsE1C"}
|
package/dest/utils/inspect.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
export async function inspectBlock(aztecNode, blockNumber, log, opts = {}) {
|
|
2
|
-
const block = await aztecNode.getBlock(blockNumber
|
|
2
|
+
const block = await aztecNode.getBlock(blockNumber, {
|
|
3
|
+
includeTransactions: opts.showTxs
|
|
4
|
+
});
|
|
3
5
|
if (!block) {
|
|
4
6
|
log(`No block found for block number ${blockNumber}`);
|
|
5
7
|
return;
|
|
6
8
|
}
|
|
7
|
-
|
|
8
|
-
log(`Block ${blockNumber} (${blockHash.toString()})`);
|
|
9
|
+
log(`Block ${blockNumber} (${block.hash.toString()})`);
|
|
9
10
|
log(` Total fees: ${block.header.totalFees.toBigInt()}`);
|
|
10
11
|
log(` Total mana used: ${block.header.totalManaUsed.toBigInt()}`);
|
|
11
12
|
log(` Fee per gas unit: DA=${block.header.globalVariables.gasFees.feePerDaGas} L2=${block.header.globalVariables.gasFees.feePerL2Gas}`);
|
|
12
13
|
log(` Coinbase: ${block.header.globalVariables.coinbase}`);
|
|
13
14
|
log(` Fee recipient: ${block.header.globalVariables.feeRecipient}`);
|
|
14
15
|
log(` Timestamp: ${new Date(Number(block.header.globalVariables.timestamp) * 500)}`);
|
|
15
|
-
if (opts.showTxs) {
|
|
16
|
+
if (opts.showTxs && block.body) {
|
|
16
17
|
log(``);
|
|
17
18
|
for (const txHash of block.body.txEffects.map((tx)=>tx.txHash)){
|
|
18
19
|
await inspectTx(aztecNode, txHash, log, {
|
|
19
20
|
includeBlockInfo: false
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
} else {
|
|
23
|
+
} else if (block.body) {
|
|
23
24
|
log(` Transactions: ${block.body.txEffects.length}`);
|
|
24
25
|
}
|
|
25
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.7cbc774",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -77,23 +77,23 @@
|
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
81
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
82
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
83
|
-
"@aztec/constants": "0.0.1-commit.
|
|
84
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
85
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
86
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
87
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
88
|
-
"@aztec/node-keystore": "0.0.1-commit.
|
|
89
|
-
"@aztec/node-lib": "0.0.1-commit.
|
|
90
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
91
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
92
|
-
"@aztec/sequencer-client": "0.0.1-commit.
|
|
93
|
-
"@aztec/slasher": "0.0.1-commit.
|
|
94
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
95
|
-
"@aztec/wallets": "0.0.1-commit.
|
|
96
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
80
|
+
"@aztec/accounts": "0.0.1-commit.7cbc774",
|
|
81
|
+
"@aztec/archiver": "0.0.1-commit.7cbc774",
|
|
82
|
+
"@aztec/aztec.js": "0.0.1-commit.7cbc774",
|
|
83
|
+
"@aztec/constants": "0.0.1-commit.7cbc774",
|
|
84
|
+
"@aztec/entrypoints": "0.0.1-commit.7cbc774",
|
|
85
|
+
"@aztec/ethereum": "0.0.1-commit.7cbc774",
|
|
86
|
+
"@aztec/foundation": "0.0.1-commit.7cbc774",
|
|
87
|
+
"@aztec/l1-artifacts": "0.0.1-commit.7cbc774",
|
|
88
|
+
"@aztec/node-keystore": "0.0.1-commit.7cbc774",
|
|
89
|
+
"@aztec/node-lib": "0.0.1-commit.7cbc774",
|
|
90
|
+
"@aztec/p2p": "0.0.1-commit.7cbc774",
|
|
91
|
+
"@aztec/protocol-contracts": "0.0.1-commit.7cbc774",
|
|
92
|
+
"@aztec/sequencer-client": "0.0.1-commit.7cbc774",
|
|
93
|
+
"@aztec/slasher": "0.0.1-commit.7cbc774",
|
|
94
|
+
"@aztec/stdlib": "0.0.1-commit.7cbc774",
|
|
95
|
+
"@aztec/wallets": "0.0.1-commit.7cbc774",
|
|
96
|
+
"@aztec/world-state": "0.0.1-commit.7cbc774",
|
|
97
97
|
"@ethersproject/wallet": "^5.8.0",
|
|
98
98
|
"@iarna/toml": "^2.2.5",
|
|
99
99
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
@@ -107,9 +107,9 @@
|
|
|
107
107
|
"viem": "npm:@aztec/viem@2.38.2"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
111
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
112
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
110
|
+
"@aztec/aztec-node": "0.0.1-commit.7cbc774",
|
|
111
|
+
"@aztec/kv-store": "0.0.1-commit.7cbc774",
|
|
112
|
+
"@aztec/telemetry-client": "0.0.1-commit.7cbc774",
|
|
113
113
|
"@jest/globals": "^30.0.0",
|
|
114
114
|
"@types/jest": "^30.0.0",
|
|
115
115
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -126,15 +126,15 @@
|
|
|
126
126
|
"typescript": "^5.3.3"
|
|
127
127
|
},
|
|
128
128
|
"peerDependencies": {
|
|
129
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
130
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
131
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
132
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
133
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
134
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
135
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
136
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
137
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
129
|
+
"@aztec/accounts": "0.0.1-commit.7cbc774",
|
|
130
|
+
"@aztec/bb-prover": "0.0.1-commit.7cbc774",
|
|
131
|
+
"@aztec/ethereum": "0.0.1-commit.7cbc774",
|
|
132
|
+
"@aztec/l1-artifacts": "0.0.1-commit.7cbc774",
|
|
133
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.7cbc774",
|
|
134
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.7cbc774",
|
|
135
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.7cbc774",
|
|
136
|
+
"@aztec/protocol-contracts": "0.0.1-commit.7cbc774",
|
|
137
|
+
"@aztec/stdlib": "0.0.1-commit.7cbc774"
|
|
138
138
|
},
|
|
139
139
|
"files": [
|
|
140
140
|
"dest",
|
|
@@ -3,7 +3,7 @@ import type { LogFn } from '@aztec/foundation/log';
|
|
|
3
3
|
|
|
4
4
|
export async function blockNumber(nodeUrl: string, log: LogFn) {
|
|
5
5
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
6
|
-
const [latestNum, provenNum] = await Promise.all([aztecNode.getBlockNumber(), aztecNode.
|
|
6
|
+
const [latestNum, provenNum] = await Promise.all([aztecNode.getBlockNumber(), aztecNode.getBlockNumber('proven')]);
|
|
7
7
|
log(`Latest block: ${latestNum}`);
|
|
8
8
|
log(`Proven block: ${provenNum}`);
|
|
9
9
|
}
|
|
@@ -1,22 +1,47 @@
|
|
|
1
1
|
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
-
import type { LogFilter, LogId } from '@aztec/aztec.js/log';
|
|
3
2
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
4
3
|
import type { TxHash } from '@aztec/aztec.js/tx';
|
|
5
|
-
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
4
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
6
5
|
import type { LogFn } from '@aztec/foundation/log';
|
|
7
6
|
import { sleep } from '@aztec/foundation/sleep';
|
|
7
|
+
import {
|
|
8
|
+
LogCursor,
|
|
9
|
+
type PublicLogsQuery,
|
|
10
|
+
type Tag,
|
|
11
|
+
logResultToHumanReadable,
|
|
12
|
+
queryAllPublicLogsByTags,
|
|
13
|
+
} from '@aztec/stdlib/logs';
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
/** Options for the `get-logs` CLI command. */
|
|
16
|
+
export type GetLogsOptions = {
|
|
17
|
+
/** Contract address that emitted the logs (required). */
|
|
18
|
+
contractAddress: AztecAddress;
|
|
19
|
+
/** Tag to filter logs by (required). */
|
|
20
|
+
tag: Tag;
|
|
21
|
+
/** Restrict the search to this tx hash. Mutually exclusive with `fromBlock`/`toBlock`. */
|
|
22
|
+
txHash?: TxHash;
|
|
23
|
+
/** Lower block bound, inclusive. */
|
|
24
|
+
fromBlock?: BlockNumber;
|
|
25
|
+
/** Upper block bound, exclusive. */
|
|
26
|
+
toBlock?: BlockNumber;
|
|
27
|
+
/** Log cursor to resume pagination strictly after a previously-seen log. */
|
|
28
|
+
afterLog?: LogCursor;
|
|
29
|
+
/** Node RPC URL. */
|
|
30
|
+
nodeUrl: string;
|
|
31
|
+
/** When set, polls indefinitely for new logs. Incompatible with `txHash` and `toBlock`. */
|
|
32
|
+
follow: boolean;
|
|
33
|
+
/** Log function. */
|
|
34
|
+
log: LogFn;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Fetches public logs for a (contract, tag) pair, draining all pages via the stdlib pagination helper.
|
|
39
|
+
* In `--follow` mode, polls indefinitely: each round drains all currently-available logs, then sleeps
|
|
40
|
+
* until the next poll if nothing new was found.
|
|
41
|
+
*/
|
|
42
|
+
export async function getLogs(options: GetLogsOptions): Promise<void> {
|
|
43
|
+
const { txHash, fromBlock, toBlock, contractAddress, tag, nodeUrl, follow, log } = options;
|
|
44
|
+
let afterLog = options.afterLog;
|
|
20
45
|
|
|
21
46
|
if (follow) {
|
|
22
47
|
if (txHash) {
|
|
@@ -26,43 +51,50 @@ export async function getLogs(
|
|
|
26
51
|
throw Error('Cannot use --follow with --to-block');
|
|
27
52
|
}
|
|
28
53
|
}
|
|
54
|
+
if (txHash !== undefined && (fromBlock !== undefined || toBlock !== undefined)) {
|
|
55
|
+
throw Error('Cannot combine --tx-hash with --from-block / --to-block');
|
|
56
|
+
}
|
|
29
57
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const fetchLogs = async () => {
|
|
33
|
-
const response = await node.getPublicLogs(filter);
|
|
34
|
-
const logs = response.logs;
|
|
58
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
35
59
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
logs.forEach(publicLog => log(publicLog.toHumanReadable()));
|
|
49
|
-
// Set the continuation parameter for the following requests
|
|
50
|
-
filter.afterLog = logs[logs.length - 1].id;
|
|
60
|
+
const drainLogs = async () => {
|
|
61
|
+
const query: PublicLogsQuery = {
|
|
62
|
+
contractAddress,
|
|
63
|
+
tags: [afterLog !== undefined ? { tag, afterLog } : tag],
|
|
64
|
+
fromBlock,
|
|
65
|
+
toBlock,
|
|
66
|
+
txHash,
|
|
67
|
+
};
|
|
68
|
+
const [logsForTag] = await queryAllPublicLogsByTags(node, query);
|
|
69
|
+
if (logsForTag.length > 0) {
|
|
70
|
+
afterLog = LogCursor.fromLog(logsForTag[logsForTag.length - 1]);
|
|
51
71
|
}
|
|
52
|
-
return
|
|
72
|
+
return logsForTag;
|
|
53
73
|
};
|
|
54
74
|
|
|
55
75
|
if (follow) {
|
|
56
76
|
log('Fetching logs...');
|
|
57
77
|
while (true) {
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
78
|
+
const results = await drainLogs();
|
|
79
|
+
if (results.length === 0) {
|
|
60
80
|
await sleep(1000);
|
|
81
|
+
} else {
|
|
82
|
+
results.forEach(r => log(logResultToHumanReadable(r)));
|
|
61
83
|
}
|
|
62
84
|
}
|
|
63
85
|
} else {
|
|
64
|
-
|
|
65
|
-
|
|
86
|
+
const results = await drainLogs();
|
|
87
|
+
if (results.length === 0) {
|
|
88
|
+
log(
|
|
89
|
+
`No logs found for {contractAddress: ${contractAddress.toString()}, tag: ${tag.toString()}` +
|
|
90
|
+
`${txHash ? `, txHash: ${txHash.toString()}` : ''}` +
|
|
91
|
+
`${fromBlock !== undefined ? `, fromBlock: ${fromBlock}` : ''}` +
|
|
92
|
+
`${toBlock !== undefined ? `, toBlock: ${toBlock}` : ''}` +
|
|
93
|
+
`${afterLog ? `, afterLog: ${afterLog.toString()}` : ''}}`,
|
|
94
|
+
);
|
|
95
|
+
} else {
|
|
96
|
+
log('Logs found: \n');
|
|
97
|
+
results.forEach(r => log(logResultToHumanReadable(r)));
|
|
66
98
|
}
|
|
67
99
|
}
|
|
68
100
|
}
|
|
@@ -23,7 +23,6 @@ export async function getNodeInfo(nodeUrl: string, json: boolean, log: LogFn, lo
|
|
|
23
23
|
rewardDistributor: info.l1ContractAddresses.rewardDistributorAddress.toString(),
|
|
24
24
|
governanceProposer: info.l1ContractAddresses.governanceProposerAddress.toString(),
|
|
25
25
|
governance: info.l1ContractAddresses.governanceAddress.toString(),
|
|
26
|
-
slashFactory: info.l1ContractAddresses.slashFactoryAddress?.toString(),
|
|
27
26
|
feeAssetHandler: info.l1ContractAddresses.feeAssetHandlerAddress?.toString(),
|
|
28
27
|
stakingAssetHandler: info.l1ContractAddresses.stakingAssetHandlerAddress?.toString(),
|
|
29
28
|
},
|
|
@@ -51,7 +50,6 @@ export async function getNodeInfo(nodeUrl: string, json: boolean, log: LogFn, lo
|
|
|
51
50
|
log(` RewardDistributor Address: ${info.l1ContractAddresses.rewardDistributorAddress.toString()}`);
|
|
52
51
|
log(` GovernanceProposer Address: ${info.l1ContractAddresses.governanceProposerAddress.toString()}`);
|
|
53
52
|
log(` Governance Address: ${info.l1ContractAddresses.governanceAddress.toString()}`);
|
|
54
|
-
log(` SlashFactory Address: ${info.l1ContractAddresses.slashFactoryAddress?.toString()}`);
|
|
55
53
|
log(` FeeAssetHandler Address: ${info.l1ContractAddresses.feeAssetHandlerAddress?.toString()}`);
|
|
56
54
|
log(` StakingAssetHandler Address: ${info.l1ContractAddresses.stakingAssetHandlerAddress?.toString()}`);
|
|
57
55
|
log(`L2 Contract Addresses:`);
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
nodeOption,
|
|
8
8
|
parseAztecAddress,
|
|
9
9
|
parseField,
|
|
10
|
-
parseOptionalAztecAddress,
|
|
11
10
|
parseOptionalInteger,
|
|
12
|
-
|
|
11
|
+
parseOptionalLogCursor,
|
|
13
12
|
parseOptionalTxHash,
|
|
13
|
+
parseTag,
|
|
14
14
|
} from '../../utils/commands.js';
|
|
15
15
|
|
|
16
16
|
export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
|
|
@@ -47,21 +47,26 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
47
47
|
|
|
48
48
|
program
|
|
49
49
|
.command('get-logs')
|
|
50
|
-
.description('Gets
|
|
51
|
-
.
|
|
50
|
+
.description('Gets public logs for a contract and tag, optionally restricted by block range or tx hash.')
|
|
51
|
+
.requiredOption('-ca, --contract-address <address>', 'Contract address that emitted the logs.', parseAztecAddress)
|
|
52
|
+
.requiredOption('--tag <tag>', 'Tag (Fr value) to filter logs by.', parseTag)
|
|
53
|
+
.option('-tx, --tx-hash <txHash>', 'A transaction hash to restrict the search to.', parseOptionalTxHash)
|
|
52
54
|
.option(
|
|
53
55
|
'-fb, --from-block <blockNum>',
|
|
54
56
|
'Initial block number for getting logs (defaults to 1).',
|
|
55
57
|
parseOptionalInteger,
|
|
56
58
|
)
|
|
57
59
|
.option('-tb, --to-block <blockNum>', 'Up to which block to fetch logs (defaults to latest).', parseOptionalInteger)
|
|
58
|
-
.option(
|
|
59
|
-
|
|
60
|
+
.option(
|
|
61
|
+
'-al --after-log <cursor>',
|
|
62
|
+
'Log cursor of the form <blockNumber>-<txIndexWithinBlock>-<logIndexWithinTx> to resume pagination after.',
|
|
63
|
+
parseOptionalLogCursor,
|
|
64
|
+
)
|
|
60
65
|
.addOption(nodeOption)
|
|
61
66
|
.option('--follow', 'If set, will keep polling for new logs until interrupted.')
|
|
62
|
-
.action(async ({ txHash, fromBlock, toBlock, afterLog, contractAddress,
|
|
67
|
+
.action(async ({ txHash, fromBlock, toBlock, afterLog, contractAddress, tag, nodeUrl, follow }) => {
|
|
63
68
|
const { getLogs } = await import('./get_logs.js');
|
|
64
|
-
await getLogs(txHash, fromBlock, toBlock, afterLog, contractAddress, nodeUrl, follow, log);
|
|
69
|
+
await getLogs({ txHash, fromBlock, toBlock, afterLog, contractAddress, tag, nodeUrl, follow, log });
|
|
65
70
|
});
|
|
66
71
|
|
|
67
72
|
program
|
|
@@ -96,7 +96,6 @@ export async function deployL1ContractsCmd(
|
|
|
96
96
|
log(`RewardDistributor Address: ${l1ContractAddresses.rewardDistributorAddress.toString()}`);
|
|
97
97
|
log(`GovernanceProposer Address: ${l1ContractAddresses.governanceProposerAddress.toString()}`);
|
|
98
98
|
log(`Governance Address: ${l1ContractAddresses.governanceAddress.toString()}`);
|
|
99
|
-
log(`SlashFactory Address: ${l1ContractAddresses.slashFactoryAddress?.toString()}`);
|
|
100
99
|
log(`FeeAssetHandler Address: ${l1ContractAddresses.feeAssetHandlerAddress?.toString()}`);
|
|
101
100
|
log(`StakingAssetHandler Address: ${l1ContractAddresses.stakingAssetHandlerAddress?.toString()}`);
|
|
102
101
|
log(`ZK Passport Verifier Address: ${l1ContractAddresses.zkPassportVerifierAddress?.toString()}`);
|
|
@@ -29,7 +29,7 @@ export async function deployNewRollup(
|
|
|
29
29
|
const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddress);
|
|
30
30
|
const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
|
|
31
31
|
|
|
32
|
-
const { rollup
|
|
32
|
+
const { rollup } = await deployNewRollupContracts(
|
|
33
33
|
registryAddress,
|
|
34
34
|
rpcUrls,
|
|
35
35
|
privateKey,
|
|
@@ -51,7 +51,6 @@ export async function deployNewRollup(
|
|
|
51
51
|
initialFundedAccounts: initialFundedAccounts.map(a => a.toString()),
|
|
52
52
|
initialValidators: initialValidators.map(a => a.attester.toString()),
|
|
53
53
|
genesisArchiveRoot: genesisArchiveRoot.toString(),
|
|
54
|
-
slashFactoryAddress: slashFactoryAddress.toString(),
|
|
55
54
|
},
|
|
56
55
|
null,
|
|
57
56
|
2,
|
|
@@ -62,6 +61,5 @@ export async function deployNewRollup(
|
|
|
62
61
|
log(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
|
|
63
62
|
log(`Initial validators: ${initialValidators.map(a => a.attester.toString()).join(', ')}`);
|
|
64
63
|
log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
|
|
65
|
-
log(`Slash Factory Address: ${slashFactoryAddress.toString()}`);
|
|
66
64
|
}
|
|
67
65
|
}
|