@aztec/cli 0.0.1-fake-ceab37513c → 0.0.6-commit.a2d1860fe9
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 +2 -428
- package/dest/cmds/aztec_node/block_number.d.ts +3 -0
- package/dest/cmds/aztec_node/block_number.d.ts.map +1 -0
- package/dest/cmds/aztec_node/block_number.js +10 -0
- package/dest/cmds/aztec_node/get_block.d.ts +3 -0
- package/dest/cmds/aztec_node/get_block.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_block.js +10 -0
- 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_min_fee.js +7 -0
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts +5 -0
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_l1_to_l2_message_witness.js +12 -0
- package/dest/cmds/aztec_node/get_logs.d.ts +7 -0
- package/dest/cmds/aztec_node/get_logs.d.ts.map +1 -0
- package/dest/cmds/{pxe → aztec_node}/get_logs.js +4 -4
- package/dest/cmds/aztec_node/get_node_info.d.ts +3 -0
- package/dest/cmds/aztec_node/get_node_info.d.ts.map +1 -0
- package/dest/cmds/{pxe → aztec_node}/get_node_info.js +3 -8
- package/dest/cmds/aztec_node/index.d.ts +4 -0
- package/dest/cmds/aztec_node/index.d.ts.map +1 -0
- package/dest/cmds/aztec_node/index.js +28 -0
- 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 +3 -3
- package/dest/cmds/infrastructure/index.d.ts.map +1 -1
- package/dest/cmds/infrastructure/index.js +7 -9
- package/dest/cmds/infrastructure/sequencers.d.ts +3 -5
- package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
- package/dest/cmds/infrastructure/sequencers.js +15 -7
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts +2 -2
- package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -1
- package/dest/cmds/infrastructure/setup_l2_contract.js +11 -25
- package/dest/cmds/l1/advance_epoch.d.ts +2 -2
- package/dest/cmds/l1/advance_epoch.d.ts.map +1 -1
- package/dest/cmds/l1/advance_epoch.js +6 -5
- 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 +8 -8
- package/dest/cmds/l1/bridge_erc20.d.ts +2 -2
- package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -1
- package/dest/cmds/l1/bridge_erc20.js +3 -2
- 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} +42 -7
- 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 +5 -5
- package/dest/cmds/l1/get_l1_addresses.d.ts +2 -2
- 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 +20 -13
- 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 +62 -22
- 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 +2 -2
- package/dest/cmds/misc/generate_secret_key.d.ts +2 -2
- package/dest/cmds/misc/generate_secret_key.d.ts.map +1 -1
- package/dest/cmds/misc/generate_secret_key.js +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 +5 -0
- package/dest/cmds/validator_keys/add.d.ts.map +1 -0
- package/dest/cmds/validator_keys/add.js +83 -0
- package/dest/cmds/validator_keys/generate_bls_keypair.d.ts +12 -0
- package/dest/cmds/validator_keys/generate_bls_keypair.d.ts.map +1 -0
- package/dest/cmds/validator_keys/generate_bls_keypair.js +27 -0
- package/dest/cmds/validator_keys/index.d.ts +4 -0
- package/dest/cmds/validator_keys/index.d.ts.map +1 -0
- package/dest/cmds/validator_keys/index.js +32 -0
- package/dest/cmds/validator_keys/new.d.ts +29 -0
- package/dest/cmds/validator_keys/new.d.ts.map +1 -0
- package/dest/cmds/validator_keys/new.js +134 -0
- package/dest/cmds/validator_keys/shared.d.ts +68 -0
- package/dest/cmds/validator_keys/shared.d.ts.map +1 -0
- package/dest/cmds/validator_keys/shared.js +274 -0
- 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 +2 -2
- package/dest/config/cached_fetch.d.ts.map +1 -1
- package/dest/config/cached_fetch.js +1 -1
- package/dest/config/chain_l2_config.d.ts +13 -37
- package/dest/config/chain_l2_config.d.ts.map +1 -1
- package/dest/config/chain_l2_config.js +34 -363
- package/dest/config/enrich_env.d.ts +1 -1
- package/dest/config/enrich_env.js +1 -1
- package/dest/config/generated/networks.d.ts +211 -0
- package/dest/config/generated/networks.d.ts.map +1 -0
- package/dest/config/generated/networks.js +212 -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 +65 -29
- package/dest/utils/aztec.d.ts +8 -20
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +22 -68
- package/dest/utils/commands.d.ts +21 -12
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/commands.js +38 -11
- 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 +5 -11
- package/dest/utils/inspect.d.ts.map +1 -1
- package/dest/utils/inspect.js +17 -96
- package/dest/utils/setup_contracts.d.ts +2 -4
- package/dest/utils/setup_contracts.d.ts.map +1 -1
- package/dest/utils/setup_contracts.js +2 -22
- package/package.json +48 -30
- package/public_include_metric_prefixes.json +1 -0
- package/src/cmds/aztec_node/block_number.ts +9 -0
- package/src/cmds/aztec_node/get_block.ts +11 -0
- package/src/cmds/aztec_node/get_current_min_fee.ts +9 -0
- package/src/cmds/aztec_node/get_l1_to_l2_message_witness.ts +27 -0
- package/src/cmds/{pxe → aztec_node}/get_logs.ts +11 -9
- package/src/cmds/{pxe → aztec_node}/get_node_info.ts +5 -16
- package/src/cmds/aztec_node/index.ts +87 -0
- package/src/cmds/contracts/inspect_contract.ts +4 -11
- package/src/cmds/infrastructure/index.ts +7 -18
- package/src/cmds/infrastructure/sequencers.ts +13 -11
- package/src/cmds/infrastructure/setup_l2_contract.ts +14 -30
- package/src/cmds/l1/advance_epoch.ts +6 -5
- package/src/cmds/l1/assume_proven_through.ts +10 -9
- package/src/cmds/l1/bridge_erc20.ts +5 -2
- package/src/cmds/l1/compute_genesis_values.ts +29 -0
- package/src/cmds/l1/{deploy_l1_contracts.ts → deploy_l1_contracts_cmd.ts} +43 -25
- package/src/cmds/l1/deploy_new_rollup.ts +6 -11
- package/src/cmds/l1/get_l1_addresses.ts +5 -3
- 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 +34 -25
- 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 +56 -34
- package/src/cmds/misc/generate_secret_and_hash.ts +2 -2
- package/src/cmds/misc/generate_secret_key.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 +123 -0
- package/src/cmds/validator_keys/generate_bls_keypair.ts +34 -0
- package/src/cmds/validator_keys/index.ts +142 -0
- package/src/cmds/validator_keys/new.ts +207 -0
- package/src/cmds/validator_keys/shared.ts +326 -0
- package/src/cmds/validator_keys/staker.ts +301 -0
- package/src/cmds/validator_keys/utils.ts +81 -0
- package/src/config/cached_fetch.ts +1 -1
- package/src/config/chain_l2_config.ts +36 -470
- package/src/config/enrich_env.ts +1 -1
- package/src/config/generated/networks.ts +216 -0
- package/src/config/get_l1_config.ts +4 -1
- package/src/config/network_config.ts +75 -30
- package/src/utils/aztec.ts +27 -122
- package/src/utils/commands.ts +52 -15
- package/src/utils/encoding.ts +1 -1
- package/src/utils/inspect.ts +23 -112
- package/src/utils/setup_contracts.ts +4 -43
- package/dest/cmds/l1/deploy_l1_contracts.d.ts +0 -4
- package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +0 -1
- package/dest/cmds/pxe/add_contract.d.ts +0 -5
- package/dest/cmds/pxe/add_contract.d.ts.map +0 -1
- package/dest/cmds/pxe/add_contract.js +0 -29
- package/dest/cmds/pxe/block_number.d.ts +0 -3
- package/dest/cmds/pxe/block_number.d.ts.map +0 -1
- package/dest/cmds/pxe/block_number.js +0 -10
- package/dest/cmds/pxe/get_account.d.ts +0 -4
- package/dest/cmds/pxe/get_account.d.ts.map +0 -1
- package/dest/cmds/pxe/get_account.js +0 -10
- package/dest/cmds/pxe/get_accounts.d.ts +0 -3
- package/dest/cmds/pxe/get_accounts.d.ts.map +0 -1
- package/dest/cmds/pxe/get_accounts.js +0 -25
- package/dest/cmds/pxe/get_block.d.ts +0 -3
- package/dest/cmds/pxe/get_block.d.ts.map +0 -1
- package/dest/cmds/pxe/get_block.js +0 -9
- package/dest/cmds/pxe/get_contract_data.d.ts +0 -4
- package/dest/cmds/pxe/get_contract_data.d.ts.map +0 -1
- package/dest/cmds/pxe/get_contract_data.js +0 -31
- package/dest/cmds/pxe/get_current_base_fee.d.ts +0 -3
- package/dest/cmds/pxe/get_current_base_fee.d.ts.map +0 -1
- package/dest/cmds/pxe/get_current_base_fee.js +0 -7
- package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts +0 -4
- package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts.map +0 -1
- package/dest/cmds/pxe/get_l1_to_l2_message_witness.js +0 -11
- package/dest/cmds/pxe/get_logs.d.ts +0 -4
- package/dest/cmds/pxe/get_logs.d.ts.map +0 -1
- package/dest/cmds/pxe/get_node_info.d.ts +0 -3
- package/dest/cmds/pxe/get_node_info.d.ts.map +0 -1
- package/dest/cmds/pxe/get_pxe_info.d.ts +0 -3
- package/dest/cmds/pxe/get_pxe_info.d.ts.map +0 -1
- package/dest/cmds/pxe/get_pxe_info.js +0 -11
- package/dest/cmds/pxe/index.d.ts +0 -4
- package/dest/cmds/pxe/index.d.ts.map +0 -1
- package/dest/cmds/pxe/index.js +0 -55
- package/src/cmds/pxe/add_contract.ts +0 -41
- package/src/cmds/pxe/block_number.ts +0 -9
- package/src/cmds/pxe/get_account.ts +0 -16
- package/src/cmds/pxe/get_accounts.ts +0 -35
- package/src/cmds/pxe/get_block.ts +0 -10
- package/src/cmds/pxe/get_contract_data.ts +0 -51
- package/src/cmds/pxe/get_current_base_fee.ts +0 -9
- package/src/cmds/pxe/get_l1_to_l2_message_witness.ts +0 -25
- package/src/cmds/pxe/get_pxe_info.ts +0 -13
- package/src/cmds/pxe/index.ts +0 -170
package/package.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6-commit.a2d1860fe9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
7
7
|
"./devnet": "./dest/cmds/devnet/index.js",
|
|
8
8
|
"./infrastructure": "./dest/cmds/infrastructure/index.js",
|
|
9
9
|
"./l1": "./dest/cmds/l1/index.js",
|
|
10
|
-
"./
|
|
10
|
+
"./l1/validators": "./dest/cmds/l1/update_l1_validators.js",
|
|
11
|
+
"./aztec_node": "./dest/cmds/aztec_node/index.js",
|
|
11
12
|
"./cli-utils": "./dest/utils/index.js",
|
|
12
13
|
"./misc": "./dest/cmds/misc/index.js",
|
|
14
|
+
"./validator_keys": "./dest/cmds/validator_keys/index.js",
|
|
13
15
|
"./setup-contracts": "./dest/cmds/misc/setup_contracts.js",
|
|
14
16
|
"./utils": "./dest/utils/index.js",
|
|
15
17
|
"./inspect": "./dest/utils/inspect.js",
|
|
16
|
-
"./config": "./dest/config/index.js"
|
|
18
|
+
"./config": "./dest/config/index.js",
|
|
19
|
+
"./config/chain": "./dest/config/chain_l2_config.js",
|
|
20
|
+
"./config/network": "./dest/config/network_config.js"
|
|
17
21
|
},
|
|
18
22
|
"typedocOptions": {
|
|
19
23
|
"entryPoints": [
|
|
@@ -23,13 +27,16 @@
|
|
|
23
27
|
"tsconfig": "./tsconfig.json"
|
|
24
28
|
},
|
|
25
29
|
"scripts": {
|
|
26
|
-
"build": "yarn clean && tsc
|
|
27
|
-
"build:dev": "tsc
|
|
30
|
+
"build": "yarn clean && ../scripts/tsc.sh",
|
|
31
|
+
"build:dev": "../scripts/tsc.sh --watch",
|
|
28
32
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
33
|
+
"copy-generated": "mkdir -p dest/config/generated/networks && cp src/config/generated/networks/*.json dest/config/generated/networks/",
|
|
34
|
+
"generate": "./scripts/generate.sh",
|
|
29
35
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
30
36
|
},
|
|
31
37
|
"inherits": [
|
|
32
|
-
"../package.common.json"
|
|
38
|
+
"../package.common.json",
|
|
39
|
+
"./package.local.json"
|
|
33
40
|
],
|
|
34
41
|
"jest": {
|
|
35
42
|
"preset": "ts-jest/presets/default-esm",
|
|
@@ -70,30 +77,39 @@
|
|
|
70
77
|
]
|
|
71
78
|
},
|
|
72
79
|
"dependencies": {
|
|
73
|
-
"@aztec/
|
|
74
|
-
"@aztec/
|
|
75
|
-
"@aztec/
|
|
76
|
-
"@aztec/
|
|
77
|
-
"@aztec/
|
|
78
|
-
"@aztec/
|
|
79
|
-
"@aztec/
|
|
80
|
-
"@aztec/
|
|
81
|
-
"@aztec/
|
|
82
|
-
"@aztec/
|
|
83
|
-
"@aztec/
|
|
80
|
+
"@aztec/accounts": "0.0.6-commit.a2d1860fe9",
|
|
81
|
+
"@aztec/archiver": "0.0.6-commit.a2d1860fe9",
|
|
82
|
+
"@aztec/aztec.js": "0.0.6-commit.a2d1860fe9",
|
|
83
|
+
"@aztec/constants": "0.0.6-commit.a2d1860fe9",
|
|
84
|
+
"@aztec/entrypoints": "0.0.6-commit.a2d1860fe9",
|
|
85
|
+
"@aztec/ethereum": "0.0.6-commit.a2d1860fe9",
|
|
86
|
+
"@aztec/foundation": "0.0.6-commit.a2d1860fe9",
|
|
87
|
+
"@aztec/l1-artifacts": "0.0.6-commit.a2d1860fe9",
|
|
88
|
+
"@aztec/node-keystore": "0.0.6-commit.a2d1860fe9",
|
|
89
|
+
"@aztec/node-lib": "0.0.6-commit.a2d1860fe9",
|
|
90
|
+
"@aztec/p2p": "0.0.6-commit.a2d1860fe9",
|
|
91
|
+
"@aztec/protocol-contracts": "0.0.6-commit.a2d1860fe9",
|
|
92
|
+
"@aztec/sequencer-client": "0.0.6-commit.a2d1860fe9",
|
|
93
|
+
"@aztec/slasher": "0.0.6-commit.a2d1860fe9",
|
|
94
|
+
"@aztec/stdlib": "0.0.6-commit.a2d1860fe9",
|
|
95
|
+
"@aztec/wallets": "0.0.6-commit.a2d1860fe9",
|
|
96
|
+
"@aztec/world-state": "0.0.6-commit.a2d1860fe9",
|
|
97
|
+
"@ethersproject/wallet": "^5.8.0",
|
|
84
98
|
"@iarna/toml": "^2.2.5",
|
|
85
99
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
100
|
+
"@scure/bip39": "^2.0.1",
|
|
86
101
|
"commander": "^12.1.0",
|
|
87
102
|
"lodash.chunk": "^4.2.0",
|
|
88
103
|
"lodash.groupby": "^4.6.0",
|
|
89
104
|
"semver": "^7.5.4",
|
|
90
105
|
"source-map-support": "^0.5.21",
|
|
91
106
|
"tslib": "^2.4.0",
|
|
92
|
-
"viem": "npm:@
|
|
107
|
+
"viem": "npm:@aztec/viem@2.38.2"
|
|
93
108
|
},
|
|
94
109
|
"devDependencies": {
|
|
95
|
-
"@aztec/
|
|
96
|
-
"@aztec/
|
|
110
|
+
"@aztec/aztec-node": "0.0.6-commit.a2d1860fe9",
|
|
111
|
+
"@aztec/kv-store": "0.0.6-commit.a2d1860fe9",
|
|
112
|
+
"@aztec/telemetry-client": "0.0.6-commit.a2d1860fe9",
|
|
97
113
|
"@jest/globals": "^30.0.0",
|
|
98
114
|
"@types/jest": "^30.0.0",
|
|
99
115
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -102,6 +118,7 @@
|
|
|
102
118
|
"@types/node": "^22.15.17",
|
|
103
119
|
"@types/semver": "^7.5.2",
|
|
104
120
|
"@types/source-map-support": "^0.5.10",
|
|
121
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
105
122
|
"jest": "^30.0.0",
|
|
106
123
|
"jest-mock-extended": "^4.0.0",
|
|
107
124
|
"ts-jest": "^29.4.0",
|
|
@@ -109,20 +126,21 @@
|
|
|
109
126
|
"typescript": "^5.3.3"
|
|
110
127
|
},
|
|
111
128
|
"peerDependencies": {
|
|
112
|
-
"@aztec/accounts": "0.0.
|
|
113
|
-
"@aztec/bb-prover": "0.0.
|
|
114
|
-
"@aztec/ethereum": "0.0.
|
|
115
|
-
"@aztec/l1-artifacts": "0.0.
|
|
116
|
-
"@aztec/noir-contracts.js": "0.0.
|
|
117
|
-
"@aztec/noir-protocol-circuits-types": "0.0.
|
|
118
|
-
"@aztec/noir-test-contracts.js": "0.0.
|
|
119
|
-
"@aztec/protocol-contracts": "0.0.
|
|
120
|
-
"@aztec/stdlib": "0.0.
|
|
129
|
+
"@aztec/accounts": "0.0.6-commit.a2d1860fe9",
|
|
130
|
+
"@aztec/bb-prover": "0.0.6-commit.a2d1860fe9",
|
|
131
|
+
"@aztec/ethereum": "0.0.6-commit.a2d1860fe9",
|
|
132
|
+
"@aztec/l1-artifacts": "0.0.6-commit.a2d1860fe9",
|
|
133
|
+
"@aztec/noir-contracts.js": "0.0.6-commit.a2d1860fe9",
|
|
134
|
+
"@aztec/noir-protocol-circuits-types": "0.0.6-commit.a2d1860fe9",
|
|
135
|
+
"@aztec/noir-test-contracts.js": "0.0.6-commit.a2d1860fe9",
|
|
136
|
+
"@aztec/protocol-contracts": "0.0.6-commit.a2d1860fe9",
|
|
137
|
+
"@aztec/stdlib": "0.0.6-commit.a2d1860fe9"
|
|
121
138
|
},
|
|
122
139
|
"files": [
|
|
123
140
|
"dest",
|
|
124
141
|
"src",
|
|
125
|
-
"!*.test.*"
|
|
142
|
+
"!*.test.*",
|
|
143
|
+
"public_include_metric_prefixes.json"
|
|
126
144
|
],
|
|
127
145
|
"types": "./dest/index.d.ts",
|
|
128
146
|
"engines": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["aztec.validator", "aztec.tx_collector", "aztec.mempool", "aztec.p2p.gossip.agg_", "aztec.ivc_verifier.agg_"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
3
|
+
|
|
4
|
+
export async function blockNumber(nodeUrl: string, log: LogFn) {
|
|
5
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
6
|
+
const [latestNum, provenNum] = await Promise.all([aztecNode.getBlockNumber(), aztecNode.getProvenBlockNumber()]);
|
|
7
|
+
log(`Latest block: ${latestNum}`);
|
|
8
|
+
log(`Proven block: ${provenNum}`);
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
4
|
+
|
|
5
|
+
import { inspectBlock } from '../../utils/inspect.js';
|
|
6
|
+
|
|
7
|
+
export async function getBlock(nodeUrl: string, maybeBlockNumber: number | undefined, log: LogFn) {
|
|
8
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
9
|
+
const blockNumber: BlockNumber = maybeBlockNumber ? BlockNumber(maybeBlockNumber) : await aztecNode.getBlockNumber();
|
|
10
|
+
await inspectBlock(aztecNode, blockNumber, log, { showTxs: true });
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
|
+
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
3
|
+
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
4
|
+
|
|
5
|
+
export async function getCurrentMinFee(nodeUrl: string, debugLogger: Logger, log: LogFn) {
|
|
6
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
7
|
+
const fees = await node.getCurrentMinFees();
|
|
8
|
+
log(`Current fees: ${jsonStringify(fees)}`);
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import type { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
4
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
5
|
+
import { getNonNullifiedL1ToL2MessageWitness } from '@aztec/stdlib/messaging';
|
|
6
|
+
|
|
7
|
+
export async function getL1ToL2MessageWitness(
|
|
8
|
+
nodeUrl: string,
|
|
9
|
+
contractAddress: AztecAddress,
|
|
10
|
+
messageHash: Fr,
|
|
11
|
+
secret: Fr,
|
|
12
|
+
log: LogFn,
|
|
13
|
+
) {
|
|
14
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
15
|
+
const messageWitness = await getNonNullifiedL1ToL2MessageWitness(node, contractAddress, messageHash, secret);
|
|
16
|
+
|
|
17
|
+
log(
|
|
18
|
+
messageWitness === undefined
|
|
19
|
+
? `
|
|
20
|
+
L1 to L2 Message not found.
|
|
21
|
+
`
|
|
22
|
+
: `
|
|
23
|
+
L1 to L2 message index: ${messageWitness[0]}
|
|
24
|
+
L1 to L2 message sibling path: ${messageWitness[1]}
|
|
25
|
+
`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import type { AztecAddress
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import type { LogFilter, LogId } from '@aztec/aztec.js/log';
|
|
3
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
4
|
+
import type { TxHash } from '@aztec/aztec.js/tx';
|
|
5
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
6
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
4
7
|
import { sleep } from '@aztec/foundation/sleep';
|
|
5
8
|
|
|
6
9
|
export async function getLogs(
|
|
7
10
|
txHash: TxHash,
|
|
8
|
-
fromBlock:
|
|
9
|
-
toBlock:
|
|
11
|
+
fromBlock: BlockNumber,
|
|
12
|
+
toBlock: BlockNumber,
|
|
10
13
|
afterLog: LogId,
|
|
11
14
|
contractAddress: AztecAddress,
|
|
12
|
-
|
|
15
|
+
nodeUrl: string,
|
|
13
16
|
follow: boolean,
|
|
14
|
-
debugLogger: Logger,
|
|
15
17
|
log: LogFn,
|
|
16
18
|
) {
|
|
17
|
-
const
|
|
19
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
18
20
|
|
|
19
21
|
if (follow) {
|
|
20
22
|
if (txHash) {
|
|
@@ -28,7 +30,7 @@ export async function getLogs(
|
|
|
28
30
|
const filter: LogFilter = { txHash, fromBlock, toBlock, afterLog, contractAddress };
|
|
29
31
|
|
|
30
32
|
const fetchLogs = async () => {
|
|
31
|
-
const response = await
|
|
33
|
+
const response = await node.getPublicLogs(filter);
|
|
32
34
|
const logs = response.logs;
|
|
33
35
|
|
|
34
36
|
if (!logs.length) {
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { LogFn
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
2
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
3
|
+
|
|
4
|
+
export async function getNodeInfo(nodeUrl: string, json: boolean, log: LogFn, logJson: (output: any) => void) {
|
|
5
|
+
const client = createAztecNodeClient(nodeUrl);
|
|
3
6
|
|
|
4
|
-
export async function getNodeInfo(
|
|
5
|
-
rpcUrl: string,
|
|
6
|
-
pxeRequest: boolean,
|
|
7
|
-
debugLogger: Logger,
|
|
8
|
-
json: boolean,
|
|
9
|
-
log: LogFn,
|
|
10
|
-
logJson: (output: any) => void,
|
|
11
|
-
) {
|
|
12
|
-
let client: AztecNode | PXE;
|
|
13
|
-
if (pxeRequest) {
|
|
14
|
-
client = await createCompatibleClient(rpcUrl, debugLogger);
|
|
15
|
-
} else {
|
|
16
|
-
client = createAztecNodeClient(rpcUrl);
|
|
17
|
-
}
|
|
18
7
|
const info = await client.getNodeInfo();
|
|
19
8
|
if (json) {
|
|
20
9
|
logJson({
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
2
|
+
|
|
3
|
+
import type { Command } from 'commander';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
logJson,
|
|
7
|
+
nodeOption,
|
|
8
|
+
parseAztecAddress,
|
|
9
|
+
parseField,
|
|
10
|
+
parseOptionalAztecAddress,
|
|
11
|
+
parseOptionalInteger,
|
|
12
|
+
parseOptionalLogId,
|
|
13
|
+
parseOptionalTxHash,
|
|
14
|
+
} from '../../utils/commands.js';
|
|
15
|
+
|
|
16
|
+
export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
|
|
17
|
+
program
|
|
18
|
+
.command('get-block')
|
|
19
|
+
.description('Gets info for a given block or latest.')
|
|
20
|
+
.argument('[blockNumber]', 'Block height', parseOptionalInteger)
|
|
21
|
+
.addOption(nodeOption)
|
|
22
|
+
.action(async (blockNumber, options) => {
|
|
23
|
+
const { getBlock } = await import('./get_block.js');
|
|
24
|
+
await getBlock(options.nodeUrl, blockNumber, log);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
program
|
|
28
|
+
.command('get-current-min-fee')
|
|
29
|
+
.description('Gets the current base fee.')
|
|
30
|
+
.addOption(nodeOption)
|
|
31
|
+
.action(async options => {
|
|
32
|
+
const { getCurrentMinFee } = await import('./get_current_min_fee.js');
|
|
33
|
+
await getCurrentMinFee(options.rpcUrl, debugLogger, log);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
program
|
|
37
|
+
.command('get-l1-to-l2-message-witness')
|
|
38
|
+
.description('Gets a L1 to L2 message witness.')
|
|
39
|
+
.requiredOption('-ca, --contract-address <address>', 'Aztec address of the contract.', parseAztecAddress)
|
|
40
|
+
.requiredOption('--message-hash <messageHash>', 'The L1 to L2 message hash.', parseField)
|
|
41
|
+
.requiredOption('--secret <secret>', 'The secret used to claim the L1 to L2 message', parseField)
|
|
42
|
+
.addOption(nodeOption)
|
|
43
|
+
.action(async ({ contractAddress, messageHash, secret, nodeUrl }) => {
|
|
44
|
+
const { getL1ToL2MessageWitness } = await import('./get_l1_to_l2_message_witness.js');
|
|
45
|
+
await getL1ToL2MessageWitness(nodeUrl, contractAddress, messageHash, secret, log);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
program
|
|
49
|
+
.command('get-logs')
|
|
50
|
+
.description('Gets all the public logs from an intersection of all the filter params.')
|
|
51
|
+
.option('-tx, --tx-hash <txHash>', 'A transaction hash to get the receipt for.', parseOptionalTxHash)
|
|
52
|
+
.option(
|
|
53
|
+
'-fb, --from-block <blockNum>',
|
|
54
|
+
'Initial block number for getting logs (defaults to 1).',
|
|
55
|
+
parseOptionalInteger,
|
|
56
|
+
)
|
|
57
|
+
.option('-tb, --to-block <blockNum>', 'Up to which block to fetch logs (defaults to latest).', parseOptionalInteger)
|
|
58
|
+
.option('-al --after-log <logId>', 'ID of a log after which to fetch the logs.', parseOptionalLogId)
|
|
59
|
+
.option('-ca, --contract-address <address>', 'Contract address to filter logs by.', parseOptionalAztecAddress)
|
|
60
|
+
.addOption(nodeOption)
|
|
61
|
+
.option('--follow', 'If set, will keep polling for new logs until interrupted.')
|
|
62
|
+
.action(async ({ txHash, fromBlock, toBlock, afterLog, contractAddress, aztecNodeRpcUrl: nodeUrl, follow }) => {
|
|
63
|
+
const { getLogs } = await import('./get_logs.js');
|
|
64
|
+
await getLogs(txHash, fromBlock, toBlock, afterLog, contractAddress, nodeUrl, follow, log);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
program
|
|
68
|
+
.command('block-number')
|
|
69
|
+
.description('Gets the current Aztec L2 block number.')
|
|
70
|
+
.addOption(nodeOption)
|
|
71
|
+
.action(async (options: any) => {
|
|
72
|
+
const { blockNumber } = await import('./block_number.js');
|
|
73
|
+
await blockNumber(options.nodeUrl, log);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
program
|
|
77
|
+
.command('get-node-info')
|
|
78
|
+
.description('Gets the information of an Aztec node from a PXE or directly from an Aztec node.')
|
|
79
|
+
.option('--json', 'Emit output as json')
|
|
80
|
+
.addOption(nodeOption)
|
|
81
|
+
.action(async options => {
|
|
82
|
+
const { getNodeInfo } = await import('./get_node_info.js');
|
|
83
|
+
await getNodeInfo(options.nodeUrl, options.json, log, logJson(log));
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
return program;
|
|
87
|
+
}
|
|
@@ -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,28 +1,19 @@
|
|
|
1
|
-
import type { LogFn
|
|
1
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
2
2
|
|
|
3
3
|
import type { Command } from 'commander';
|
|
4
4
|
|
|
5
|
-
import { ETHEREUM_HOSTS, l1ChainIdOption,
|
|
5
|
+
import { ETHEREUM_HOSTS, l1ChainIdOption, nodeOption, parseOptionalInteger } from '../../utils/commands.js';
|
|
6
6
|
|
|
7
|
-
export function injectCommands(program: Command, log: LogFn
|
|
7
|
+
export function injectCommands(program: Command, log: LogFn) {
|
|
8
8
|
program
|
|
9
9
|
.command('setup-protocol-contracts')
|
|
10
10
|
.description('Bootstrap the blockchain by initializing all the protocol contracts')
|
|
11
|
-
.addOption(
|
|
11
|
+
.addOption(nodeOption)
|
|
12
12
|
.option('--testAccounts', 'Deploy funded test accounts.')
|
|
13
|
-
.option('--sponsoredFPC', 'Deploy a sponsored FPC.')
|
|
14
13
|
.option('--json', 'Output the contract addresses in JSON format')
|
|
15
|
-
.option('--skipProofWait', "Don't wait for proofs to land.")
|
|
16
14
|
.action(async options => {
|
|
17
15
|
const { setupL2Contracts } = await import('./setup_l2_contract.js');
|
|
18
|
-
await setupL2Contracts(
|
|
19
|
-
options.rpcUrl,
|
|
20
|
-
options.testAccounts,
|
|
21
|
-
options.sponsoredFPC,
|
|
22
|
-
options.json,
|
|
23
|
-
options.skipProofWait,
|
|
24
|
-
log,
|
|
25
|
-
);
|
|
16
|
+
await setupL2Contracts(options.nodeUrl, options.testAccounts, options.json, log);
|
|
26
17
|
});
|
|
27
18
|
|
|
28
19
|
program
|
|
@@ -42,7 +33,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
42
33
|
'test test test test test test test test test test test junk',
|
|
43
34
|
)
|
|
44
35
|
.option('--block-number <number>', 'Block number to query next sequencer for', parseOptionalInteger)
|
|
45
|
-
.addOption(
|
|
36
|
+
.addOption(nodeOption)
|
|
46
37
|
.addOption(l1ChainIdOption)
|
|
47
38
|
.action(async (command, who, options) => {
|
|
48
39
|
const { sequencers } = await import('./sequencers.js');
|
|
@@ -50,12 +41,10 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
|
|
|
50
41
|
command: command,
|
|
51
42
|
who,
|
|
52
43
|
mnemonic: options.mnemonic,
|
|
53
|
-
|
|
44
|
+
nodeUrl: options.nodeUrl,
|
|
54
45
|
l1RpcUrls: options.l1RpcUrls,
|
|
55
46
|
chainId: options.l1ChainId,
|
|
56
|
-
blockNumber: options.blockNumber,
|
|
57
47
|
log,
|
|
58
|
-
debugLogger,
|
|
59
48
|
});
|
|
60
49
|
});
|
|
61
50
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { Fr
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { Fr } from '@aztec/aztec.js/fields';
|
|
2
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
3
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
4
|
+
import { getL1ContractsConfigEnvVars } from '@aztec/ethereum/config';
|
|
5
|
+
import { GSEContract, RollupContract } from '@aztec/ethereum/contracts';
|
|
6
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
4
7
|
import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts';
|
|
5
8
|
|
|
6
9
|
import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem';
|
|
@@ -11,28 +14,26 @@ export async function sequencers(opts: {
|
|
|
11
14
|
who?: string;
|
|
12
15
|
mnemonic?: string;
|
|
13
16
|
bn254SecretKey?: bigint;
|
|
14
|
-
|
|
17
|
+
nodeUrl: string;
|
|
15
18
|
l1RpcUrls: string[];
|
|
16
19
|
chainId: number;
|
|
17
|
-
blockNumber?: number;
|
|
18
20
|
log: LogFn;
|
|
19
|
-
debugLogger: Logger;
|
|
20
21
|
}) {
|
|
21
|
-
const { command, who: maybeWho, mnemonic, bn254SecretKey,
|
|
22
|
-
const client =
|
|
22
|
+
const { command, who: maybeWho, mnemonic, bn254SecretKey, nodeUrl, l1RpcUrls, chainId, log } = opts;
|
|
23
|
+
const client = createAztecNodeClient(nodeUrl);
|
|
23
24
|
const { l1ContractAddresses } = await client.getNodeInfo();
|
|
24
25
|
|
|
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,50 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
2
|
+
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
+
import type { WaitOpts } from '@aztec/aztec.js/contracts';
|
|
4
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
5
|
+
import { AccountManager } from '@aztec/aztec.js/wallet';
|
|
3
6
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
4
7
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
8
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
9
|
+
import { EmbeddedWallet } from '@aztec/wallets/embedded';
|
|
10
|
+
import { deployFundedSchnorrAccounts } from '@aztec/wallets/testing';
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export async function setupL2Contracts(
|
|
10
|
-
rpcUrl: string,
|
|
11
|
-
testAccounts: boolean,
|
|
12
|
-
sponsoredFPC: boolean,
|
|
13
|
-
json: boolean,
|
|
14
|
-
skipProofWait: boolean,
|
|
15
|
-
log: LogFn,
|
|
16
|
-
) {
|
|
12
|
+
export async function setupL2Contracts(nodeUrl: string, testAccounts: boolean, json: boolean, log: LogFn) {
|
|
17
13
|
const waitOpts: WaitOpts = {
|
|
18
14
|
timeout: 180,
|
|
19
15
|
interval: 1,
|
|
20
16
|
};
|
|
21
|
-
const waitForProvenOptions: WaitForProvenOpts | undefined = !skipProofWait
|
|
22
|
-
? {
|
|
23
|
-
provenTimeout: 600,
|
|
24
|
-
}
|
|
25
|
-
: undefined;
|
|
26
17
|
log('setupL2Contracts: Wait options' + jsonStringify(waitOpts));
|
|
27
|
-
if (waitForProvenOptions) {
|
|
28
|
-
log('setupL2Contracts: Wait for proven options' + jsonStringify(waitForProvenOptions));
|
|
29
|
-
}
|
|
30
18
|
log('setupL2Contracts: Creating PXE client...');
|
|
31
|
-
const
|
|
19
|
+
const node = createAztecNodeClient(nodeUrl);
|
|
20
|
+
const wallet = await EmbeddedWallet.create(node);
|
|
32
21
|
|
|
33
|
-
let
|
|
22
|
+
let deployedAccountManagers: AccountManager[] = [];
|
|
34
23
|
if (testAccounts) {
|
|
35
24
|
log('setupL2Contracts: Deploying test accounts...');
|
|
36
|
-
|
|
37
|
-
await deployFundedSchnorrAccounts(
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (sponsoredFPC) {
|
|
41
|
-
log('setupL2Contracts: Setting up sponsored FPC...');
|
|
42
|
-
await setupSponsoredFPC(pxe, log, waitOpts, waitForProvenOptions);
|
|
25
|
+
const initialAccountsData = await getInitialTestAccountsData();
|
|
26
|
+
deployedAccountManagers = await deployFundedSchnorrAccounts(wallet, initialAccountsData, waitOpts);
|
|
43
27
|
}
|
|
44
28
|
|
|
45
29
|
if (json) {
|
|
46
30
|
const toPrint: Record<string, AztecAddress> = { ...ProtocolContractAddress };
|
|
47
|
-
|
|
31
|
+
deployedAccountManagers.forEach((a, i) => {
|
|
48
32
|
toPrint[`testAccount${i}`] = a.address;
|
|
49
33
|
});
|
|
50
34
|
log(JSON.stringify(toPrint, null, 2));
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAztecNodeClient } from '@aztec/aztec.js/node';
|
|
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
|
-
export async function advanceEpoch(l1RpcUrls: string[],
|
|
6
|
-
const
|
|
7
|
-
const rollupAddress = await
|
|
6
|
+
export async function advanceEpoch(l1RpcUrls: string[], nodeUrl: string, log: LogFn) {
|
|
7
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
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,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
5
|
+
import { DateProvider } from '@aztec/foundation/timer';
|
|
4
6
|
|
|
5
7
|
export async function assumeProvenThrough(
|
|
6
|
-
|
|
8
|
+
checkpointOrLatest: CheckpointNumber | undefined,
|
|
7
9
|
l1RpcUrls: string[],
|
|
8
|
-
|
|
10
|
+
nodeUrl: string,
|
|
9
11
|
log: LogFn,
|
|
10
12
|
) {
|
|
11
|
-
const
|
|
12
|
-
const rollupAddress = await
|
|
13
|
-
const blockNumber = blockNumberOrLatest ?? (await pxe.getBlockNumber());
|
|
13
|
+
const aztecNode = createAztecNodeClient(nodeUrl);
|
|
14
|
+
const rollupAddress = await aztecNode.getNodeInfo().then(i => i.l1ContractAddresses.rollupAddress);
|
|
14
15
|
|
|
15
|
-
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, { rollupAddress });
|
|
16
|
+
const rollupCheatCodes = RollupCheatCodes.create(l1RpcUrls, { rollupAddress }, new DateProvider());
|
|
16
17
|
|
|
17
|
-
await rollupCheatCodes.markAsProven(
|
|
18
|
-
log(`Assumed proven through
|
|
18
|
+
await rollupCheatCodes.markAsProven(checkpointOrLatest);
|
|
19
|
+
log(`Assumed proven through checkpoint ${checkpointOrLatest ?? 'latest'}`);
|
|
19
20
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { AztecAddress, EthAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import { L1ToL2TokenPortalManager } from '@aztec/aztec.js/ethereum';
|
|
3
|
+
import type { Fr } from '@aztec/aztec.js/fields';
|
|
4
|
+
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
5
|
+
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
3
6
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
4
7
|
|
|
5
8
|
import { prettyPrintJSON } from '../../utils/commands.js';
|