@aztec/cli 0.0.1-commit.b655e406 → 0.0.1-commit.b9865e97
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/README.md +1 -1
- package/dest/cmds/aztec_node/block_number.d.ts +1 -1
- package/dest/cmds/aztec_node/block_number.js +1 -1
- package/dest/cmds/aztec_node/get_block.d.ts +1 -1
- package/dest/cmds/aztec_node/get_block.d.ts.map +1 -1
- package/dest/cmds/aztec_node/get_block.js +2 -1
- package/dest/cmds/aztec_node/get_current_min_fee.d.ts +3 -0
- package/dest/cmds/aztec_node/get_current_min_fee.d.ts.map +1 -0
- package/dest/cmds/aztec_node/{get_current_base_fee.js → get_current_min_fee.js} +2 -2
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +1 -1
- package/dest/cmds/aztec_node/get_logs.d.ts +30 -3
- 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 +16 -6
- package/dest/cmds/contracts/index.d.ts +1 -1
- package/dest/cmds/contracts/inspect_contract.d.ts +1 -1
- package/dest/cmds/contracts/inspect_contract.d.ts.map +1 -1
- package/dest/cmds/contracts/inspect_contract.js +4 -10
- package/dest/cmds/contracts/parse_parameter_struct.d.ts +1 -1
- package/dest/cmds/infrastructure/index.d.ts +1 -1
- package/dest/cmds/infrastructure/index.d.ts.map +1 -1
- package/dest/cmds/infrastructure/index.js +0 -1
- package/dest/cmds/infrastructure/sequencers.d.ts +1 -2
- package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
- package/dest/cmds/infrastructure/sequencers.js +11 -4
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.js +9 -4
- package/dest/cmds/l1/advance_epoch.d.ts +1 -1
- package/dest/cmds/l1/assume_proven_through.d.ts +3 -2
- package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
- package/dest/cmds/l1/assume_proven_through.js +3 -4
- package/dest/cmds/l1/bridge_erc20.d.ts +1 -1
- package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
- package/dest/cmds/l1/bridge_erc20.js +2 -1
- package/dest/cmds/l1/compute_genesis_values.d.ts +4 -0
- package/dest/cmds/l1/compute_genesis_values.d.ts.map +1 -0
- package/dest/cmds/l1/compute_genesis_values.js +17 -0
- package/dest/cmds/l1/create_l1_account.d.ts +1 -1
- package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts +4 -0
- package/dest/cmds/l1/deploy_l1_contracts_cmd.d.ts.map +1 -0
- package/dest/cmds/l1/{deploy_l1_contracts.js → deploy_l1_contracts_cmd.js} +39 -5
- package/dest/cmds/l1/deploy_new_rollup.d.ts +4 -4
- package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_new_rollup.js +4 -6
- package/dest/cmds/l1/get_l1_addresses.d.ts +1 -1
- package/dest/cmds/l1/get_l1_addresses.d.ts.map +1 -1
- package/dest/cmds/l1/get_l1_addresses.js +5 -2
- package/dest/cmds/l1/get_l1_balance.d.ts +1 -1
- package/dest/cmds/l1/get_l1_balance.js +4 -2
- package/dest/cmds/l1/governance_utils.d.ts +5 -5
- package/dest/cmds/l1/governance_utils.d.ts.map +1 -1
- package/dest/cmds/l1/governance_utils.js +3 -1
- package/dest/cmds/l1/index.d.ts +1 -2
- package/dest/cmds/l1/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +17 -10
- package/dest/cmds/l1/prover_stats.d.ts +1 -1
- package/dest/cmds/l1/prover_stats.d.ts.map +1 -1
- package/dest/cmds/l1/prover_stats.js +32 -30
- package/dest/cmds/l1/trigger_seed_snapshot.d.ts +2 -2
- package/dest/cmds/l1/trigger_seed_snapshot.d.ts.map +1 -1
- package/dest/cmds/l1/trigger_seed_snapshot.js +2 -1
- package/dest/cmds/l1/update_l1_validators.d.ts +7 -7
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +58 -20
- package/dest/cmds/misc/compute_selector.d.ts +1 -1
- package/dest/cmds/misc/example_contracts.d.ts +1 -1
- package/dest/cmds/misc/generate_bootnode_enr.d.ts +1 -1
- package/dest/cmds/misc/generate_p2p_private_key.d.ts +1 -1
- package/dest/cmds/misc/generate_secret_and_hash.d.ts +1 -1
- package/dest/cmds/misc/generate_secret_and_hash.js +1 -1
- package/dest/cmds/misc/generate_secret_key.d.ts +1 -1
- package/dest/cmds/misc/get_canonical_sponsored_fpc_address.d.ts +1 -1
- package/dest/cmds/misc/index.d.ts +1 -1
- package/dest/cmds/misc/index.d.ts.map +1 -1
- package/dest/cmds/misc/index.js +1 -1
- package/dest/cmds/misc/update/common.d.ts +1 -1
- package/dest/cmds/misc/update/github.d.ts +1 -1
- package/dest/cmds/misc/update/noir.d.ts +1 -1
- package/dest/cmds/misc/update/npm.d.ts +1 -1
- package/dest/cmds/misc/update/npm.js +1 -1
- package/dest/cmds/misc/update/utils.d.ts +1 -1
- package/dest/cmds/misc/update.d.ts +1 -1
- package/dest/cmds/validator_keys/add.d.ts +1 -1
- package/dest/cmds/validator_keys/add.d.ts.map +1 -1
- package/dest/cmds/validator_keys/add.js +20 -7
- package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +1 -1
- package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -1
- package/dest/cmds/validator_keys/generate_bls_keypair.js +3 -2
- package/dest/cmds/validator_keys/index.d.ts +1 -1
- package/dest/cmds/validator_keys/index.d.ts.map +1 -1
- package/dest/cmds/validator_keys/index.js +16 -4
- package/dest/cmds/validator_keys/new.d.ts +7 -4
- package/dest/cmds/validator_keys/new.d.ts.map +1 -1
- package/dest/cmds/validator_keys/new.js +90 -16
- package/dest/cmds/validator_keys/shared.d.ts +4 -4
- package/dest/cmds/validator_keys/shared.d.ts.map +1 -1
- package/dest/cmds/validator_keys/shared.js +31 -28
- package/dest/cmds/validator_keys/staker.d.ts +38 -0
- package/dest/cmds/validator_keys/staker.d.ts.map +1 -0
- package/dest/cmds/validator_keys/staker.js +210 -0
- package/dest/cmds/validator_keys/utils.d.ts +25 -0
- package/dest/cmds/validator_keys/utils.d.ts.map +1 -0
- package/dest/cmds/validator_keys/utils.js +52 -0
- 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/chain_l2_config.d.ts +13 -38
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +35 -463
- package/dest/config/enrich_env.d.ts +1 -1
- package/dest/config/generated/networks.d.ts +221 -0
- package/dest/config/generated/networks.d.ts.map +1 -0
- package/dest/config/generated/networks.js +222 -0
- package/dest/config/get_l1_config.d.ts +3 -2
- package/dest/config/get_l1_config.d.ts.map +1 -1
- package/dest/config/get_l1_config.js +3 -1
- package/dest/config/index.d.ts +1 -1
- package/dest/config/network_config.d.ts +7 -4
- package/dest/config/network_config.d.ts.map +1 -1
- package/dest/config/network_config.js +70 -30
- package/dest/utils/aztec.d.ts +7 -14
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +19 -41
- package/dest/utils/commands.d.ts +20 -11
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/commands.js +24 -13
- package/dest/utils/encoding.d.ts +1 -1
- package/dest/utils/encoding.js +1 -1
- package/dest/utils/github.d.ts +1 -1
- package/dest/utils/index.d.ts +1 -1
- package/dest/utils/inspect.d.ts +3 -2
- package/dest/utils/inspect.d.ts.map +1 -1
- package/dest/utils/inspect.js +15 -12
- package/dest/utils/setup_contracts.d.ts +1 -1
- package/package.json +44 -31
- package/public_include_metric_prefixes.json +1 -0
- package/src/cmds/aztec_node/block_number.ts +1 -1
- package/src/cmds/aztec_node/get_block.ts +2 -1
- package/src/cmds/aztec_node/{get_current_base_fee.ts → get_current_min_fee.ts} +2 -2
- package/src/cmds/aztec_node/get_logs.ts +70 -37
- package/src/cmds/aztec_node/get_node_info.ts +0 -2
- package/src/cmds/aztec_node/index.ts +16 -11
- package/src/cmds/contracts/inspect_contract.ts +4 -11
- package/src/cmds/infrastructure/index.ts +0 -1
- package/src/cmds/infrastructure/sequencers.ts +7 -5
- package/src/cmds/infrastructure/setup_l2_contract.ts +9 -4
- package/src/cmds/l1/assume_proven_through.ts +4 -4
- package/src/cmds/l1/bridge_erc20.ts +2 -1
- package/src/cmds/l1/compute_genesis_values.ts +29 -0
- package/src/cmds/l1/{deploy_l1_contracts.ts → deploy_l1_contracts_cmd.ts} +39 -23
- package/src/cmds/l1/deploy_new_rollup.ts +5 -12
- package/src/cmds/l1/get_l1_addresses.ts +4 -2
- package/src/cmds/l1/get_l1_balance.ts +2 -2
- package/src/cmds/l1/governance_utils.ts +3 -8
- package/src/cmds/l1/index.ts +30 -21
- package/src/cmds/l1/prover_stats.ts +42 -31
- package/src/cmds/l1/trigger_seed_snapshot.ts +2 -1
- package/src/cmds/l1/update_l1_validators.ts +52 -32
- package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
- package/src/cmds/misc/index.ts +1 -1
- package/src/cmds/misc/update/npm.ts +1 -1
- package/src/cmds/validator_keys/add.ts +20 -10
- package/src/cmds/validator_keys/generate_bls_keypair.ts +3 -2
- package/src/cmds/validator_keys/index.ts +67 -21
- package/src/cmds/validator_keys/new.ts +110 -23
- package/src/cmds/validator_keys/shared.ts +32 -27
- package/src/cmds/validator_keys/staker.ts +301 -0
- package/src/cmds/validator_keys/utils.ts +81 -0
- package/src/config/cached_fetch.ts +119 -31
- package/src/config/chain_l2_config.ts +36 -604
- package/src/config/generated/networks.ts +226 -0
- package/src/config/get_l1_config.ts +4 -1
- package/src/config/network_config.ts +80 -31
- package/src/utils/aztec.ts +30 -95
- package/src/utils/commands.ts +27 -13
- package/src/utils/encoding.ts +1 -1
- package/src/utils/inspect.ts +13 -10
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts +0 -3
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts.map +0 -1
- package/dest/cmds/l1/deploy_l1_contracts.d.ts +0 -4
- package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +0 -1
|
@@ -1,21 +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';
|
|
4
|
+
import type { BlockNumber } from '@aztec/foundation/branded-types';
|
|
5
5
|
import type { LogFn } from '@aztec/foundation/log';
|
|
6
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';
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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;
|
|
19
45
|
|
|
20
46
|
if (follow) {
|
|
21
47
|
if (txHash) {
|
|
@@ -25,43 +51,50 @@ export async function getLogs(
|
|
|
25
51
|
throw Error('Cannot use --follow with --to-block');
|
|
26
52
|
}
|
|
27
53
|
}
|
|
54
|
+
if (txHash !== undefined && (fromBlock !== undefined || toBlock !== undefined)) {
|
|
55
|
+
throw Error('Cannot combine --tx-hash with --from-block / --to-block');
|
|
56
|
+
}
|
|
28
57
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const fetchLogs = async () => {
|
|
32
|
-
const response = await node.getPublicLogs(filter);
|
|
33
|
-
const logs = response.logs;
|
|
58
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
34
59
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
logs.forEach(publicLog => log(publicLog.toHumanReadable()));
|
|
48
|
-
// Set the continuation parameter for the following requests
|
|
49
|
-
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]);
|
|
50
71
|
}
|
|
51
|
-
return
|
|
72
|
+
return logsForTag;
|
|
52
73
|
};
|
|
53
74
|
|
|
54
75
|
if (follow) {
|
|
55
76
|
log('Fetching logs...');
|
|
56
77
|
while (true) {
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
78
|
+
const results = await drainLogs();
|
|
79
|
+
if (results.length === 0) {
|
|
59
80
|
await sleep(1000);
|
|
81
|
+
} else {
|
|
82
|
+
results.forEach(r => log(logResultToHumanReadable(r)));
|
|
60
83
|
}
|
|
61
84
|
}
|
|
62
85
|
} else {
|
|
63
|
-
|
|
64
|
-
|
|
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)));
|
|
65
98
|
}
|
|
66
99
|
}
|
|
67
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) {
|
|
@@ -25,12 +25,12 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
program
|
|
28
|
-
.command('get-current-
|
|
28
|
+
.command('get-current-min-fee')
|
|
29
29
|
.description('Gets the current base fee.')
|
|
30
30
|
.addOption(nodeOption)
|
|
31
31
|
.action(async options => {
|
|
32
|
-
const {
|
|
33
|
-
await
|
|
32
|
+
const { getCurrentMinFee } = await import('./get_current_min_fee.js');
|
|
33
|
+
await getCurrentMinFee(options.rpcUrl, debugLogger, log);
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
program
|
|
@@ -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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sha256 } from '@aztec/foundation/crypto';
|
|
1
|
+
import { sha256 } from '@aztec/foundation/crypto/sha256';
|
|
2
2
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
3
3
|
import {
|
|
4
4
|
type FunctionArtifact,
|
|
@@ -29,16 +29,9 @@ export async function inspectContract(contractArtifactFile: string, debugLogger:
|
|
|
29
29
|
log(`\tpublic bytecode commitment: ${contractClass.publicBytecodeCommitment.toString()}`);
|
|
30
30
|
log(`\tpublic bytecode length: ${contractClass.packedBytecode.length} bytes (${bytecodeLengthInFields} fields)`);
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
await Promise.all(externalFunctions.map(f => logFunction(f, log)));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const internalFunctions = contractFns.filter(f => f.isInternal);
|
|
39
|
-
if (internalFunctions.length > 0) {
|
|
40
|
-
log(`\nInternal functions:`);
|
|
41
|
-
await Promise.all(internalFunctions.map(f => logFunction(f, log)));
|
|
32
|
+
if (contractFns.length > 0) {
|
|
33
|
+
log(`\nExternal contract functions:`);
|
|
34
|
+
await Promise.all(contractFns.map(f => logFunction(f, log)));
|
|
42
35
|
}
|
|
43
36
|
}
|
|
44
37
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
2
2
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
3
|
-
import {
|
|
3
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
4
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
5
|
+
import { GSEContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
4
6
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
7
|
import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
6
8
|
|
|
@@ -15,7 +17,6 @@ export async function sequencers(opts: {
|
|
|
15
17
|
nodeUrl: string;
|
|
16
18
|
l1RpcUrls: string[];
|
|
17
19
|
chainId: number;
|
|
18
|
-
blockNumber?: number;
|
|
19
20
|
log: LogFn;
|
|
20
21
|
}) {
|
|
21
22
|
const { command, who: maybeWho, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
@@ -25,14 +26,14 @@ export async function sequencers(opts: {
|
|
|
25
26
|
const chain = createEthereumChain(l1RpcUrls, chainId);
|
|
26
27
|
const publicClient = createPublicClient({
|
|
27
28
|
chain: chain.chainInfo,
|
|
28
|
-
transport: fallback(l1RpcUrls.map(url => http(url))),
|
|
29
|
+
transport: fallback(l1RpcUrls.map(url => http(url, { batch: false }))),
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
const walletClient = mnemonic
|
|
32
33
|
? createWalletClient({
|
|
33
34
|
account: mnemonicToAccount(mnemonic),
|
|
34
35
|
chain: chain.chainInfo,
|
|
35
|
-
transport: fallback(l1RpcUrls.map(url => http(url))),
|
|
36
|
+
transport: fallback(l1RpcUrls.map(url => http(url, { batch: false }))),
|
|
36
37
|
})
|
|
37
38
|
: undefined;
|
|
38
39
|
|
|
@@ -65,8 +66,9 @@ export async function sequencers(opts: {
|
|
|
65
66
|
|
|
66
67
|
log(`Adding ${who} as sequencer`);
|
|
67
68
|
|
|
69
|
+
const stakingAssetAddress = await rollup.getStakingAsset();
|
|
68
70
|
const stakingAsset = getContract({
|
|
69
|
-
address:
|
|
71
|
+
address: stakingAssetAddress.toString(),
|
|
70
72
|
abi: TestERC20Abi,
|
|
71
73
|
client: walletClient,
|
|
72
74
|
});
|
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
|
-
import
|
|
2
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
3
3
|
import type { WaitOpts } from '@aztec/aztec.js/contracts';
|
|
4
4
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
5
|
+
import { TxStatus } from '@aztec/aztec.js/tx';
|
|
5
6
|
import { AccountManager } from '@aztec/aztec.js/wallet';
|
|
6
7
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
7
8
|
import type { LogFn } from '@aztec/foundation/log';
|
|
8
9
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
9
|
-
import {
|
|
10
|
+
import { EmbeddedWallet } from '@aztec/wallets/embedded';
|
|
11
|
+
import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
|
|
10
12
|
|
|
11
13
|
export async function setupL2Contracts(nodeUrl: string, testAccounts: boolean, json: boolean, log: LogFn) {
|
|
12
14
|
const waitOpts: WaitOpts = {
|
|
13
15
|
timeout: 180,
|
|
14
16
|
interval: 1,
|
|
17
|
+
// The embedded wallet defaults to PROPOSED, which can be dropped if its proposed block is pruned
|
|
18
|
+
// before the checkpoint lands. Wait for the checkpoint so serial setup is reliable.
|
|
19
|
+
waitForStatus: TxStatus.CHECKPOINTED,
|
|
15
20
|
};
|
|
16
21
|
log('setupL2Contracts: Wait options' + jsonStringify(waitOpts));
|
|
17
22
|
log('setupL2Contracts: Creating PXE client...');
|
|
18
23
|
const node = createAztecNodeClient(nodeUrl);
|
|
19
|
-
const wallet = await
|
|
24
|
+
const wallet = await EmbeddedWallet.create(node);
|
|
20
25
|
|
|
21
26
|
let deployedAccountManagers: AccountManager[] = [];
|
|
22
27
|
if (testAccounts) {
|
|
23
28
|
log('setupL2Contracts: Deploying test accounts...');
|
|
24
29
|
const initialAccountsData = await getInitialTestAccountsData();
|
|
25
|
-
deployedAccountManagers = await deployFundedSchnorrAccounts(wallet,
|
|
30
|
+
deployedAccountManagers = await deployFundedSchnorrAccounts(wallet, initialAccountsData, waitOpts);
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
if (json) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
2
|
import { RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { CheckpointNumber } from '@aztec/foundation/branded-types';
|
|
3
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
5
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
5
6
|
|
|
6
7
|
export async function assumeProvenThrough(
|
|
7
|
-
|
|
8
|
+
checkpointOrLatest: CheckpointNumber | undefined,
|
|
8
9
|
l1RpcUrls: string[],
|
|
9
10
|
nodeUrl: string,
|
|
10
11
|
log: LogFn,
|
|
11
12
|
) {
|
|
12
13
|
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
13
14
|
const rollupAddress = await aztecNode.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
14
|
-
const blockNumber = blockNumberOrLatest ?? (await aztecNode.getBlockNumber());
|
|
15
15
|
|
|
16
16
|
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, { rollupAddress }, new DateProvider());
|
|
17
17
|
|
|
18
|
-
await rollupCheatCodes.markAsProven(
|
|
19
|
-
log(`Assumed proven through
|
|
18
|
+
await rollupCheatCodes.markAsProven(checkpointOrLatest);
|
|
19
|
+
log(`Assumed proven through checkpoint ${checkpointOrLatest ?? 'latest'}`);
|
|
20
20
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import { L1ToL2TokenPortalManager } from '@aztec/aztec.js/ethereum';
|
|
3
3
|
import type { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
-
import { createEthereumChain
|
|
4
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
5
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
5
6
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
6
7
|
|
|
7
8
|
import { prettyPrintJSON } from '../../utils/commands.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
3
|
+
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
4
|
+
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
5
|
+
|
|
6
|
+
import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
|
|
7
|
+
|
|
8
|
+
/** Computes and prints genesis values needed for L1 contract deployment. */
|
|
9
|
+
export async function computeGenesisValuesCmd(testAccounts: boolean, sponsoredFPC: boolean, log: LogFn) {
|
|
10
|
+
const initialAccounts = testAccounts ? await getInitialTestAccountsData() : [];
|
|
11
|
+
const sponsoredFPCAddresses = sponsoredFPC ? await getSponsoredFPCAddress() : [];
|
|
12
|
+
const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddresses);
|
|
13
|
+
const { genesisArchiveRoot } = await getGenesisValues(initialFundedAccounts);
|
|
14
|
+
|
|
15
|
+
const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
|
|
16
|
+
const vkTreeRoot = getVKTreeRoot();
|
|
17
|
+
|
|
18
|
+
log(
|
|
19
|
+
JSON.stringify(
|
|
20
|
+
{
|
|
21
|
+
vkTreeRoot: vkTreeRoot.toString(),
|
|
22
|
+
protocolContractsHash: protocolContractsHash.toString(),
|
|
23
|
+
genesisArchiveRoot: genesisArchiveRoot.toString(),
|
|
24
|
+
},
|
|
25
|
+
null,
|
|
26
|
+
2,
|
|
27
|
+
),
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
2
|
import type { EthAddress } from '@aztec/aztec.js/addresses';
|
|
3
3
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
-
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum';
|
|
4
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
5
|
+
import { type Operator, deployAztecL1Contracts } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
5
6
|
import { SecretValue } from '@aztec/foundation/config';
|
|
6
7
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
8
|
+
import { protocolContractsHash } from '@aztec/protocol-contracts';
|
|
7
9
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
8
10
|
|
|
9
|
-
import {
|
|
11
|
+
import { mnemonicToAccount } from 'viem/accounts';
|
|
12
|
+
|
|
13
|
+
import { addLeadingHex } from '../../utils/aztec.js';
|
|
10
14
|
import { getSponsoredFPCAddress } from '../../utils/setup_contracts.js';
|
|
11
15
|
|
|
12
|
-
export async function
|
|
16
|
+
export async function deployL1ContractsCmd(
|
|
13
17
|
rpcUrls: string[],
|
|
14
18
|
chainId: number,
|
|
15
19
|
privateKey: string | undefined,
|
|
16
20
|
mnemonic: string,
|
|
17
21
|
mnemonicIndex: number,
|
|
18
|
-
salt: number | undefined,
|
|
19
22
|
testAccounts: boolean,
|
|
20
23
|
sponsoredFPC: boolean,
|
|
21
|
-
acceleratedTestDeployments: boolean,
|
|
22
24
|
json: boolean,
|
|
23
|
-
createVerificationJson: string | false,
|
|
24
25
|
initialValidators: EthAddress[],
|
|
25
26
|
realVerifier: boolean,
|
|
26
27
|
existingToken: EthAddress | undefined,
|
|
@@ -29,34 +30,50 @@ export async function deployL1Contracts(
|
|
|
29
30
|
) {
|
|
30
31
|
const config = getL1ContractsConfigEnvVars();
|
|
31
32
|
|
|
33
|
+
// Compute initial accounts for genesis (test accounts + sponsored FPC)
|
|
32
34
|
const initialAccounts = testAccounts ? await getInitialTestAccountsData() : [];
|
|
33
35
|
const sponsoredFPCAddress = sponsoredFPC ? await getSponsoredFPCAddress() : [];
|
|
34
36
|
const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddress);
|
|
35
37
|
const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
// Get the VK tree root
|
|
40
|
+
const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree');
|
|
41
|
+
const vkTreeRoot = getVKTreeRoot();
|
|
42
|
+
|
|
43
|
+
// Get private key (from direct input or mnemonic)
|
|
44
|
+
let deployerPrivateKey: `0x${string}`;
|
|
45
|
+
if (privateKey) {
|
|
46
|
+
deployerPrivateKey = addLeadingHex(privateKey);
|
|
47
|
+
} else {
|
|
48
|
+
const account = mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex });
|
|
49
|
+
deployerPrivateKey = `0x${Buffer.from(account.getHdKey().privateKey!).toString('hex')}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Prepare validator operators with bn254 keys
|
|
53
|
+
const initialValidatorOperators: Operator[] = initialValidators.map(a => ({
|
|
38
54
|
attester: a,
|
|
39
55
|
withdrawer: a,
|
|
40
56
|
bn254SecretKey: new SecretValue(Fr.random().toBigInt()),
|
|
41
57
|
}));
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
debugLogger.info('Deploying L1 contracts via Forge...');
|
|
60
|
+
|
|
61
|
+
// Deploy using l1-contracts Forge scripts
|
|
62
|
+
const { l1ContractAddresses, rollupVersion } = await deployAztecL1Contracts(rpcUrls[0], deployerPrivateKey, chainId, {
|
|
63
|
+
// Initial validators to add during deployment
|
|
64
|
+
initialValidators: initialValidatorOperators,
|
|
65
|
+
// Genesis config
|
|
66
|
+
vkTreeRoot,
|
|
67
|
+
protocolContractsHash,
|
|
51
68
|
genesisArchiveRoot,
|
|
52
|
-
|
|
53
|
-
acceleratedTestDeployments,
|
|
54
|
-
config,
|
|
55
|
-
existingToken,
|
|
69
|
+
// Deployment options
|
|
56
70
|
realVerifier,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
...config,
|
|
72
|
+
feeJuicePortalInitialBalance: fundingNeeded,
|
|
73
|
+
existingTokenAddress: existingToken,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
debugLogger.info('Forge deployment complete', { rollupVersion });
|
|
60
77
|
|
|
61
78
|
if (json) {
|
|
62
79
|
log(
|
|
@@ -79,7 +96,6 @@ export async function deployL1Contracts(
|
|
|
79
96
|
log(`RewardDistributor Address: ${l1ContractAddresses.rewardDistributorAddress.toString()}`);
|
|
80
97
|
log(`GovernanceProposer Address: ${l1ContractAddresses.governanceProposerAddress.toString()}`);
|
|
81
98
|
log(`Governance Address: ${l1ContractAddresses.governanceAddress.toString()}`);
|
|
82
|
-
log(`SlashFactory Address: ${l1ContractAddresses.slashFactoryAddress?.toString()}`);
|
|
83
99
|
log(`FeeAssetHandler Address: ${l1ContractAddresses.feeAssetHandlerAddress?.toString()}`);
|
|
84
100
|
log(`StakingAssetHandler Address: ${l1ContractAddresses.stakingAssetHandlerAddress?.toString()}`);
|
|
85
101
|
log(`ZK Passport Verifier Address: ${l1ContractAddresses.zkPassportVerifierAddress?.toString()}`);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
|
-
import {
|
|
2
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
3
|
+
import type { Operator } from '@aztec/ethereum/deploy-aztec-l1-contracts';
|
|
3
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
-
import type { LogFn
|
|
5
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
5
6
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
6
7
|
|
|
7
8
|
import { deployNewRollupContracts } from '../../utils/aztec.js';
|
|
@@ -14,15 +15,12 @@ export async function deployNewRollup(
|
|
|
14
15
|
privateKey: string | undefined,
|
|
15
16
|
mnemonic: string,
|
|
16
17
|
mnemonicIndex: number,
|
|
17
|
-
salt: number | undefined,
|
|
18
18
|
testAccounts: boolean,
|
|
19
19
|
sponsoredFPC: boolean,
|
|
20
20
|
json: boolean,
|
|
21
21
|
initialValidators: Operator[],
|
|
22
22
|
realVerifier: boolean,
|
|
23
|
-
createVerificationJson: string | false,
|
|
24
23
|
log: LogFn,
|
|
25
|
-
debugLogger: Logger,
|
|
26
24
|
) {
|
|
27
25
|
const config = getL1ContractsConfigEnvVars();
|
|
28
26
|
|
|
@@ -31,21 +29,18 @@ export async function deployNewRollup(
|
|
|
31
29
|
const initialFundedAccounts = initialAccounts.map(a => a.address).concat(sponsoredFPCAddress);
|
|
32
30
|
const { genesisArchiveRoot, fundingNeeded } = await getGenesisValues(initialFundedAccounts);
|
|
33
31
|
|
|
34
|
-
const { rollup
|
|
32
|
+
const { rollup } = await deployNewRollupContracts(
|
|
35
33
|
registryAddress,
|
|
36
34
|
rpcUrls,
|
|
37
|
-
chainId,
|
|
38
35
|
privateKey,
|
|
36
|
+
chainId,
|
|
39
37
|
mnemonic,
|
|
40
38
|
mnemonicIndex,
|
|
41
|
-
salt,
|
|
42
39
|
initialValidators,
|
|
43
40
|
genesisArchiveRoot,
|
|
44
41
|
fundingNeeded,
|
|
45
42
|
config,
|
|
46
43
|
realVerifier,
|
|
47
|
-
createVerificationJson,
|
|
48
|
-
debugLogger,
|
|
49
44
|
);
|
|
50
45
|
|
|
51
46
|
if (json) {
|
|
@@ -56,7 +51,6 @@ export async function deployNewRollup(
|
|
|
56
51
|
initialFundedAccounts: initialFundedAccounts.map(a => a.toString()),
|
|
57
52
|
initialValidators: initialValidators.map(a => a.attester.toString()),
|
|
58
53
|
genesisArchiveRoot: genesisArchiveRoot.toString(),
|
|
59
|
-
slashFactoryAddress: slashFactoryAddress.toString(),
|
|
60
54
|
},
|
|
61
55
|
null,
|
|
62
56
|
2,
|
|
@@ -67,6 +61,5 @@ export async function deployNewRollup(
|
|
|
67
61
|
log(`Initial funded accounts: ${initialFundedAccounts.map(a => a.toString()).join(', ')}`);
|
|
68
62
|
log(`Initial validators: ${initialValidators.map(a => a.attester.toString()).join(', ')}`);
|
|
69
63
|
log(`Genesis archive root: ${genesisArchiveRoot.toString()}`);
|
|
70
|
-
log(`Slash Factory Address: ${slashFactoryAddress.toString()}`);
|
|
71
64
|
}
|
|
72
65
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
-
import {
|
|
2
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
3
|
+
import { RegistryContract } from '@aztec/ethereum/contracts';
|
|
4
|
+
import type { ViemPublicClient } from '@aztec/ethereum/types';
|
|
3
5
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
6
|
|
|
5
7
|
import { createPublicClient, fallback, http } from 'viem';
|
|
@@ -15,7 +17,7 @@ export async function getL1Addresses(
|
|
|
15
17
|
const chain = createEthereumChain(rpcUrls, chainId);
|
|
16
18
|
const publicClient: ViemPublicClient = createPublicClient({
|
|
17
19
|
chain: chain.chainInfo,
|
|
18
|
-
transport: fallback(rpcUrls.map(url => http(url))),
|
|
20
|
+
transport: fallback(rpcUrls.map(url => http(url, { batch: false }))),
|
|
19
21
|
pollingInterval: 100,
|
|
20
22
|
});
|
|
21
23
|
const addresses = await RegistryContract.collectAddresses(publicClient, registryAddress.toString(), rollupVersion);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEthereumChain } from '@aztec/ethereum';
|
|
1
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import type { LogFn } from '@aztec/foundation/log';
|
|
4
4
|
import { TestERC20Abi } from '@aztec/l1-artifacts';
|
|
@@ -18,7 +18,7 @@ export async function getL1Balance(
|
|
|
18
18
|
const chain = createEthereumChain(l1RpcUrls, chainId);
|
|
19
19
|
const publicClient = createPublicClient({
|
|
20
20
|
chain: chain.chainInfo,
|
|
21
|
-
transport: fallback(l1RpcUrls.map(url => http(url))),
|
|
21
|
+
transport: fallback(l1RpcUrls.map(url => http(url, { batch: false }))),
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
let balance = 0n;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ProposalState,
|
|
5
|
-
RegistryContract,
|
|
6
|
-
createEthereumChain,
|
|
7
|
-
createExtendedL1Client,
|
|
8
|
-
} from '@aztec/ethereum';
|
|
1
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
2
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
3
|
+
import { FeeJuiceContract, GovernanceContract, ProposalState, RegistryContract } from '@aztec/ethereum/contracts';
|
|
9
4
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
10
5
|
|
|
11
6
|
export async function depositGovernanceTokens({
|