@aztec/cli 3.0.0-canary.a9708bd → 3.0.0-devnet.3
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 -427
- 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 +9 -0
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts +3 -0
- package/dest/cmds/aztec_node/get_current_base_fee.d.ts.map +1 -0
- package/dest/cmds/aztec_node/get_current_base_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 +6 -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.map +1 -0
- package/dest/cmds/aztec_node/index.js +28 -0
- package/dest/cmds/infrastructure/index.d.ts +2 -2
- package/dest/cmds/infrastructure/index.d.ts.map +1 -1
- package/dest/cmds/infrastructure/index.js +7 -8
- package/dest/cmds/infrastructure/sequencers.d.ts +2 -3
- package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -1
- package/dest/cmds/infrastructure/sequencers.js +4 -3
- 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 +10 -25
- package/dest/cmds/l1/advance_epoch.d.ts +1 -1
- 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 +1 -1
- package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -1
- package/dest/cmds/l1/assume_proven_through.js +7 -6
- 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 +1 -1
- package/dest/cmds/l1/deploy_l1_contracts.d.ts +2 -2
- package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/cmds/l1/deploy_l1_contracts.js +5 -5
- 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 +4 -4
- 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/index.d.ts.map +1 -1
- package/dest/cmds/l1/index.js +18 -34
- package/dest/cmds/l1/update_l1_validators.d.ts +5 -0
- package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -1
- package/dest/cmds/l1/update_l1_validators.js +67 -6
- 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/generate_secret_key.d.ts.map +1 -1
- package/dest/cmds/misc/generate_secret_key.js +1 -1
- package/dest/config/cached_fetch.d.ts +18 -0
- package/dest/config/cached_fetch.d.ts.map +1 -0
- package/dest/config/cached_fetch.js +54 -0
- package/dest/config/chain_l2_config.d.ts +37 -0
- package/dest/config/chain_l2_config.d.ts.map +1 -0
- package/dest/config/chain_l2_config.js +444 -0
- package/dest/config/enrich_env.d.ts +4 -0
- package/dest/config/enrich_env.d.ts.map +1 -0
- package/dest/config/enrich_env.js +12 -0
- package/dest/config/get_l1_config.d.ts +8 -0
- package/dest/config/get_l1_config.d.ts.map +1 -0
- package/dest/config/get_l1_config.js +22 -0
- package/dest/config/index.d.ts +5 -0
- package/dest/config/index.d.ts.map +1 -0
- package/dest/config/index.js +4 -0
- package/dest/config/network_config.d.ts +19 -0
- package/dest/config/network_config.d.ts.map +1 -0
- package/dest/config/network_config.js +79 -0
- package/dest/utils/aztec.d.ts +3 -9
- package/dest/utils/aztec.d.ts.map +1 -1
- package/dest/utils/aztec.js +8 -32
- package/dest/utils/commands.d.ts +6 -7
- package/dest/utils/commands.d.ts.map +1 -1
- package/dest/utils/commands.js +5 -6
- package/dest/utils/inspect.d.ts +3 -10
- package/dest/utils/inspect.d.ts.map +1 -1
- package/dest/utils/inspect.js +13 -95
- package/dest/utils/setup_contracts.d.ts +1 -3
- package/dest/utils/setup_contracts.d.ts.map +1 -1
- package/dest/utils/setup_contracts.js +2 -22
- package/package.json +28 -25
- package/src/cmds/aztec_node/block_number.ts +9 -0
- package/src/cmds/aztec_node/get_block.ts +10 -0
- package/src/cmds/aztec_node/get_current_base_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 +8 -7
- package/src/cmds/{pxe → aztec_node}/get_node_info.ts +5 -16
- package/src/cmds/aztec_node/index.ts +87 -0
- package/src/cmds/infrastructure/index.ts +7 -17
- package/src/cmds/infrastructure/sequencers.ts +6 -6
- package/src/cmds/infrastructure/setup_l2_contract.ts +13 -30
- package/src/cmds/l1/advance_epoch.ts +6 -5
- package/src/cmds/l1/assume_proven_through.ts +7 -6
- package/src/cmds/l1/bridge_erc20.ts +3 -1
- package/src/cmds/l1/deploy_l1_contracts.ts +6 -3
- package/src/cmds/l1/deploy_new_rollup.ts +4 -2
- package/src/cmds/l1/get_l1_addresses.ts +1 -1
- package/src/cmds/l1/index.ts +25 -53
- package/src/cmds/l1/update_l1_validators.ts +81 -6
- package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
- package/src/cmds/misc/generate_secret_key.ts +1 -1
- package/src/config/cached_fetch.ts +67 -0
- package/src/config/chain_l2_config.ts +585 -0
- package/src/config/enrich_env.ts +15 -0
- package/src/config/get_l1_config.ts +28 -0
- package/src/config/index.ts +4 -0
- package/src/config/network_config.ts +102 -0
- package/src/utils/aztec.ts +8 -40
- package/src/utils/commands.ts +8 -10
- package/src/utils/inspect.ts +18 -111
- package/src/utils/setup_contracts.ts +4 -43
- package/dest/cmds/devnet/bootstrap_network.d.ts +0 -3
- package/dest/cmds/devnet/bootstrap_network.d.ts.map +0 -1
- package/dest/cmds/devnet/bootstrap_network.js +0 -216
- package/dest/cmds/devnet/faucet.d.ts +0 -4
- package/dest/cmds/devnet/faucet.d.ts.map +0 -1
- package/dest/cmds/devnet/faucet.js +0 -26
- package/dest/cmds/devnet/index.d.ts.map +0 -1
- package/dest/cmds/devnet/index.js +0 -14
- 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/devnet/bootstrap_network.ts +0 -321
- package/src/cmds/devnet/faucet.ts +0 -33
- package/src/cmds/devnet/index.ts +0 -60
- 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/dest/cmds/{devnet → aztec_node}/index.d.ts +0 -0
package/src/cmds/pxe/index.ts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
3
|
-
|
|
4
|
-
import type { Command } from 'commander';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
logJson,
|
|
8
|
-
makePxeOption,
|
|
9
|
-
parseAztecAddress,
|
|
10
|
-
parseEthereumAddress,
|
|
11
|
-
parseField,
|
|
12
|
-
parseFieldFromHexString,
|
|
13
|
-
parseOptionalAztecAddress,
|
|
14
|
-
parseOptionalInteger,
|
|
15
|
-
parseOptionalLogId,
|
|
16
|
-
parseOptionalTxHash,
|
|
17
|
-
parsePublicKey,
|
|
18
|
-
pxeOption,
|
|
19
|
-
} from '../../utils/commands.js';
|
|
20
|
-
|
|
21
|
-
export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
|
|
22
|
-
program
|
|
23
|
-
.command('add-contract')
|
|
24
|
-
.description(
|
|
25
|
-
'Adds an existing contract to the PXE. This is useful if you have deployed a contract outside of the PXE and want to use it with the PXE.',
|
|
26
|
-
)
|
|
27
|
-
.requiredOption(
|
|
28
|
-
'-c, --contract-artifact <fileLocation>',
|
|
29
|
-
"A compiled Aztec.nr contract's ABI in JSON format or name of a contract ABI exported by @aztec/noir-contracts.js",
|
|
30
|
-
)
|
|
31
|
-
.requiredOption('-ca, --contract-address <address>', 'Aztec address of the contract.', parseAztecAddress)
|
|
32
|
-
.requiredOption('--init-hash <init hash>', 'Initialization hash', parseFieldFromHexString)
|
|
33
|
-
.option('--salt <salt>', 'Optional deployment salt', parseFieldFromHexString)
|
|
34
|
-
.option('-p, --public-key <public key>', 'Optional public key for this contract', parsePublicKey)
|
|
35
|
-
.option('--portal-address <address>', 'Optional address to a portal contract on L1', parseEthereumAddress)
|
|
36
|
-
.option('--deployer-address <address>', 'Optional address of the contract deployer', parseAztecAddress)
|
|
37
|
-
.addOption(pxeOption)
|
|
38
|
-
.action(async options => {
|
|
39
|
-
const { addContract } = await import('./add_contract.js');
|
|
40
|
-
await addContract(
|
|
41
|
-
options.rpcUrl,
|
|
42
|
-
options.contractArtifact,
|
|
43
|
-
options.contractAddress,
|
|
44
|
-
options.initHash,
|
|
45
|
-
options.salt ?? Fr.ZERO,
|
|
46
|
-
options.publicKey,
|
|
47
|
-
options.deployerAddress,
|
|
48
|
-
debugLogger,
|
|
49
|
-
log,
|
|
50
|
-
);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
program
|
|
54
|
-
.command('get-block')
|
|
55
|
-
.description('Gets info for a given block or latest.')
|
|
56
|
-
.argument('[blockNumber]', 'Block height', parseOptionalInteger)
|
|
57
|
-
.addOption(pxeOption)
|
|
58
|
-
.action(async (blockNumber, options) => {
|
|
59
|
-
const { getBlock } = await import('./get_block.js');
|
|
60
|
-
await getBlock(options.rpcUrl, blockNumber, debugLogger, log);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
program
|
|
64
|
-
.command('get-current-base-fee')
|
|
65
|
-
.description('Gets the current base fee.')
|
|
66
|
-
.addOption(pxeOption)
|
|
67
|
-
.action(async options => {
|
|
68
|
-
const { getCurrentBaseFee } = await import('./get_current_base_fee.js');
|
|
69
|
-
await getCurrentBaseFee(options.rpcUrl, debugLogger, log);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
program
|
|
73
|
-
.command('get-contract-data')
|
|
74
|
-
.description('Gets information about the Aztec contract deployed at the specified address.')
|
|
75
|
-
.argument('<contractAddress>', 'Aztec address of the contract.', parseAztecAddress)
|
|
76
|
-
.addOption(pxeOption)
|
|
77
|
-
.option('-b, --include-bytecode <boolean>', "Include the contract's public function bytecode, if any.", false)
|
|
78
|
-
.action(async (contractAddress, options) => {
|
|
79
|
-
const { getContractData } = await import('./get_contract_data.js');
|
|
80
|
-
await getContractData(options.rpcUrl, contractAddress, options.includeBytecode, debugLogger, log);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
program
|
|
84
|
-
.command('get-logs')
|
|
85
|
-
.description('Gets all the public logs from an intersection of all the filter params.')
|
|
86
|
-
.option('-tx, --tx-hash <txHash>', 'A transaction hash to get the receipt for.', parseOptionalTxHash)
|
|
87
|
-
.option(
|
|
88
|
-
'-fb, --from-block <blockNum>',
|
|
89
|
-
'Initial block number for getting logs (defaults to 1).',
|
|
90
|
-
parseOptionalInteger,
|
|
91
|
-
)
|
|
92
|
-
.option('-tb, --to-block <blockNum>', 'Up to which block to fetch logs (defaults to latest).', parseOptionalInteger)
|
|
93
|
-
.option('-al --after-log <logId>', 'ID of a log after which to fetch the logs.', parseOptionalLogId)
|
|
94
|
-
.option('-ca, --contract-address <address>', 'Contract address to filter logs by.', parseOptionalAztecAddress)
|
|
95
|
-
.addOption(pxeOption)
|
|
96
|
-
.option('--follow', 'If set, will keep polling for new logs until interrupted.')
|
|
97
|
-
.action(async ({ txHash, fromBlock, toBlock, afterLog, contractAddress, rpcUrl, follow }) => {
|
|
98
|
-
const { getLogs } = await import('./get_logs.js');
|
|
99
|
-
await getLogs(txHash, fromBlock, toBlock, afterLog, contractAddress, rpcUrl, follow, debugLogger, log);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
program
|
|
103
|
-
.command('get-accounts')
|
|
104
|
-
.description('Gets all the Aztec accounts stored in the PXE.')
|
|
105
|
-
.addOption(pxeOption)
|
|
106
|
-
.option('--json', 'Emit output as json')
|
|
107
|
-
.action(async (options: any) => {
|
|
108
|
-
const { getAccounts } = await import('./get_accounts.js');
|
|
109
|
-
await getAccounts(options.rpcUrl, options.json, debugLogger, log, logJson(log));
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
program
|
|
113
|
-
.command('get-account')
|
|
114
|
-
.description('Gets an account given its Aztec address.')
|
|
115
|
-
.argument('<address>', 'The Aztec address to get account for', parseAztecAddress)
|
|
116
|
-
.addOption(pxeOption)
|
|
117
|
-
.action(async (address, options) => {
|
|
118
|
-
const { getAccount } = await import('./get_account.js');
|
|
119
|
-
await getAccount(address, options.rpcUrl, debugLogger, log);
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
program
|
|
123
|
-
.command('block-number')
|
|
124
|
-
.description('Gets the current Aztec L2 block number.')
|
|
125
|
-
.addOption(pxeOption)
|
|
126
|
-
.action(async (options: any) => {
|
|
127
|
-
const { blockNumber } = await import('./block_number.js');
|
|
128
|
-
await blockNumber(options.rpcUrl, debugLogger, log);
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
program
|
|
132
|
-
.command('get-l1-to-l2-message-witness')
|
|
133
|
-
.description('Gets a L1 to L2 message witness.')
|
|
134
|
-
.requiredOption('-ca, --contract-address <address>', 'Aztec address of the contract.', parseAztecAddress)
|
|
135
|
-
.requiredOption('--message-hash <messageHash>', 'The L1 to L2 message hash.', parseField)
|
|
136
|
-
.requiredOption('--secret <secret>', 'The secret used to claim the L1 to L2 message', parseField)
|
|
137
|
-
.addOption(pxeOption)
|
|
138
|
-
.action(async ({ contractAddress, messageHash, secret, rpcUrl }) => {
|
|
139
|
-
const { getL1ToL2MessageWitness } = await import('./get_l1_to_l2_message_witness.js');
|
|
140
|
-
await getL1ToL2MessageWitness(rpcUrl, contractAddress, messageHash, secret, debugLogger, log);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
program
|
|
144
|
-
.command('get-node-info')
|
|
145
|
-
.description('Gets the information of an Aztec node from a PXE or directly from an Aztec node.')
|
|
146
|
-
.option('--node-url <string>', 'URL of the node.')
|
|
147
|
-
.option('--json', 'Emit output as json')
|
|
148
|
-
.addOption(makePxeOption(false))
|
|
149
|
-
.action(async options => {
|
|
150
|
-
const { getNodeInfo } = await import('./get_node_info.js');
|
|
151
|
-
let url: string;
|
|
152
|
-
if (options.nodeUrl) {
|
|
153
|
-
url = options.nodeUrl;
|
|
154
|
-
} else {
|
|
155
|
-
url = options.rpcUrl;
|
|
156
|
-
}
|
|
157
|
-
await getNodeInfo(url, !options.nodeUrl, debugLogger, options.json, log, logJson(log));
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
program
|
|
161
|
-
.command('get-pxe-info')
|
|
162
|
-
.description('Gets the information of a PXE at a URL.')
|
|
163
|
-
.addOption(pxeOption)
|
|
164
|
-
.action(async options => {
|
|
165
|
-
const { getPXEInfo } = await import('./get_pxe_info.js');
|
|
166
|
-
await getPXEInfo(options.rpcUrl, debugLogger, log);
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
return program;
|
|
170
|
-
}
|
|
File without changes
|