@aztec/cli 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2 → 0.77.0-testnet-ignition.21

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.
Files changed (191) hide show
  1. package/README.md +1 -1
  2. package/dest/cmds/contracts/index.d.ts +4 -0
  3. package/dest/cmds/contracts/index.d.ts.map +1 -0
  4. package/dest/cmds/contracts/inspect_contract.d.ts +3 -0
  5. package/dest/cmds/contracts/inspect_contract.d.ts.map +1 -0
  6. package/dest/cmds/contracts/inspect_contract.js +3 -3
  7. package/dest/cmds/contracts/parse_parameter_struct.d.ts +3 -0
  8. package/dest/cmds/contracts/parse_parameter_struct.d.ts.map +1 -0
  9. package/dest/cmds/devnet/bootstrap_network.d.ts +3 -0
  10. package/dest/cmds/devnet/bootstrap_network.d.ts.map +1 -0
  11. package/dest/cmds/devnet/bootstrap_network.js +13 -10
  12. package/dest/cmds/devnet/faucet.d.ts +4 -0
  13. package/dest/cmds/devnet/faucet.d.ts.map +1 -0
  14. package/dest/cmds/devnet/index.d.ts +4 -0
  15. package/dest/cmds/devnet/index.d.ts.map +1 -0
  16. package/dest/cmds/devnet/index.js +5 -3
  17. package/dest/cmds/infrastructure/index.d.ts +4 -0
  18. package/dest/cmds/infrastructure/index.d.ts.map +1 -0
  19. package/dest/cmds/infrastructure/index.js +8 -6
  20. package/dest/cmds/infrastructure/sequencers.d.ts +13 -0
  21. package/dest/cmds/infrastructure/sequencers.d.ts.map +1 -0
  22. package/dest/cmds/infrastructure/sequencers.js +5 -5
  23. package/dest/cmds/infrastructure/setup_l2_contract.d.ts +3 -0
  24. package/dest/cmds/infrastructure/setup_l2_contract.d.ts.map +1 -0
  25. package/dest/cmds/infrastructure/setup_l2_contract.js +43 -0
  26. package/dest/cmds/l1/advance_epoch.d.ts +3 -0
  27. package/dest/cmds/l1/advance_epoch.d.ts.map +1 -0
  28. package/dest/cmds/l1/advance_epoch.js +3 -3
  29. package/dest/cmds/l1/assume_proven_through.d.ts +3 -0
  30. package/dest/cmds/l1/assume_proven_through.d.ts.map +1 -0
  31. package/dest/cmds/l1/assume_proven_through.js +8 -8
  32. package/dest/cmds/l1/bridge_erc20.d.ts +4 -0
  33. package/dest/cmds/l1/bridge_erc20.d.ts.map +1 -0
  34. package/dest/cmds/l1/bridge_erc20.js +3 -3
  35. package/dest/cmds/l1/create_l1_account.d.ts +3 -0
  36. package/dest/cmds/l1/create_l1_account.d.ts.map +1 -0
  37. package/dest/cmds/l1/deploy_l1_contracts.d.ts +4 -0
  38. package/dest/cmds/l1/deploy_l1_contracts.d.ts.map +1 -0
  39. package/dest/cmds/l1/deploy_l1_contracts.js +7 -3
  40. package/dest/cmds/l1/deploy_l1_verifier.d.ts +5 -0
  41. package/dest/cmds/l1/deploy_l1_verifier.d.ts.map +1 -0
  42. package/dest/cmds/l1/deploy_l1_verifier.js +4 -4
  43. package/dest/cmds/l1/deploy_new_rollup.d.ts +4 -0
  44. package/dest/cmds/l1/deploy_new_rollup.d.ts.map +1 -0
  45. package/dest/cmds/l1/deploy_new_rollup.js +19 -0
  46. package/dest/cmds/l1/get_l1_addresses.d.ts +4 -0
  47. package/dest/cmds/l1/get_l1_addresses.d.ts.map +1 -0
  48. package/dest/cmds/l1/get_l1_addresses.js +18 -0
  49. package/dest/cmds/l1/get_l1_balance.d.ts +4 -0
  50. package/dest/cmds/l1/get_l1_balance.d.ts.map +1 -0
  51. package/dest/cmds/l1/get_l1_balance.js +4 -4
  52. package/dest/cmds/l1/governance_utils.d.ts +50 -0
  53. package/dest/cmds/l1/governance_utils.d.ts.map +1 -0
  54. package/dest/cmds/l1/governance_utils.js +85 -0
  55. package/dest/cmds/l1/index.d.ts +4 -0
  56. package/dest/cmds/l1/index.d.ts.map +1 -0
  57. package/dest/cmds/l1/index.js +108 -27
  58. package/dest/cmds/l1/prover_stats.d.ts +14 -0
  59. package/dest/cmds/l1/prover_stats.d.ts.map +1 -0
  60. package/dest/cmds/l1/prover_stats.js +6 -6
  61. package/dest/cmds/l1/update_l1_validators.d.ts +30 -0
  62. package/dest/cmds/l1/update_l1_validators.d.ts.map +1 -0
  63. package/dest/cmds/l1/update_l1_validators.js +22 -22
  64. package/dest/cmds/misc/compute_selector.d.ts +3 -0
  65. package/dest/cmds/misc/compute_selector.d.ts.map +1 -0
  66. package/dest/cmds/misc/compute_selector.js +1 -1
  67. package/dest/cmds/misc/example_contracts.d.ts +3 -0
  68. package/dest/cmds/misc/example_contracts.d.ts.map +1 -0
  69. package/dest/cmds/misc/generate_bootnode_enr.d.ts +3 -0
  70. package/dest/cmds/misc/generate_bootnode_enr.d.ts.map +1 -0
  71. package/dest/cmds/misc/generate_bootnode_enr.js +5 -0
  72. package/dest/cmds/misc/generate_p2p_private_key.d.ts +3 -0
  73. package/dest/cmds/misc/generate_p2p_private_key.d.ts.map +1 -0
  74. package/dest/cmds/misc/generate_secret_and_hash.d.ts +3 -0
  75. package/dest/cmds/misc/generate_secret_and_hash.d.ts.map +1 -0
  76. package/dest/cmds/misc/generate_secret_key.d.ts +5 -0
  77. package/dest/cmds/misc/generate_secret_key.d.ts.map +1 -0
  78. package/dest/cmds/misc/index.d.ts +4 -0
  79. package/dest/cmds/misc/index.d.ts.map +1 -0
  80. package/dest/cmds/misc/index.js +9 -1
  81. package/dest/cmds/misc/setup_contracts.d.ts +7 -0
  82. package/dest/cmds/misc/setup_contracts.d.ts.map +1 -0
  83. package/dest/cmds/misc/setup_contracts.js +5 -3
  84. package/dest/cmds/misc/update/common.d.ts +17 -0
  85. package/dest/cmds/misc/update/common.d.ts.map +1 -0
  86. package/dest/cmds/misc/update/github.d.ts +4 -0
  87. package/dest/cmds/misc/update/github.d.ts.map +1 -0
  88. package/dest/cmds/misc/update/noir.d.ts +10 -0
  89. package/dest/cmds/misc/update/noir.d.ts.map +1 -0
  90. package/dest/cmds/misc/update/npm.d.ts +34 -0
  91. package/dest/cmds/misc/update/npm.d.ts.map +1 -0
  92. package/dest/cmds/misc/update/utils.d.ts +14 -0
  93. package/dest/cmds/misc/update/utils.d.ts.map +1 -0
  94. package/dest/cmds/misc/update.d.ts +3 -0
  95. package/dest/cmds/misc/update.d.ts.map +1 -0
  96. package/dest/cmds/pxe/add_contract.d.ts +5 -0
  97. package/dest/cmds/pxe/add_contract.d.ts.map +1 -0
  98. package/dest/cmds/pxe/add_contract.js +6 -4
  99. package/dest/cmds/pxe/block_number.d.ts +3 -0
  100. package/dest/cmds/pxe/block_number.d.ts.map +1 -0
  101. package/dest/cmds/pxe/get_account.d.ts +4 -0
  102. package/dest/cmds/pxe/get_account.d.ts.map +1 -0
  103. package/dest/cmds/pxe/get_accounts.d.ts +3 -0
  104. package/dest/cmds/pxe/get_accounts.d.ts.map +1 -0
  105. package/dest/cmds/pxe/get_block.d.ts +3 -0
  106. package/dest/cmds/pxe/get_block.d.ts.map +1 -0
  107. package/dest/cmds/pxe/get_contract_data.d.ts +4 -0
  108. package/dest/cmds/pxe/get_contract_data.d.ts.map +1 -0
  109. package/dest/cmds/pxe/get_contract_data.js +1 -1
  110. package/dest/cmds/pxe/get_current_base_fee.d.ts +3 -0
  111. package/dest/cmds/pxe/get_current_base_fee.d.ts.map +1 -0
  112. package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts +4 -0
  113. package/dest/cmds/pxe/get_l1_to_l2_message_witness.d.ts.map +1 -0
  114. package/dest/cmds/pxe/get_logs.d.ts +4 -0
  115. package/dest/cmds/pxe/get_logs.d.ts.map +1 -0
  116. package/dest/cmds/pxe/get_node_info.d.ts +3 -0
  117. package/dest/cmds/pxe/get_node_info.d.ts.map +1 -0
  118. package/dest/cmds/pxe/get_node_info.js +2 -2
  119. package/dest/cmds/pxe/get_pxe_info.d.ts +3 -0
  120. package/dest/cmds/pxe/get_pxe_info.d.ts.map +1 -0
  121. package/dest/cmds/pxe/index.d.ts +4 -0
  122. package/dest/cmds/pxe/index.d.ts.map +1 -0
  123. package/dest/cmds/pxe/index.js +1 -1
  124. package/dest/utils/aztec.d.ts +68 -0
  125. package/dest/utils/aztec.d.ts.map +1 -0
  126. package/dest/utils/aztec.js +34 -23
  127. package/dest/utils/commands.d.ts +143 -0
  128. package/dest/utils/commands.d.ts.map +1 -0
  129. package/dest/utils/commands.js +2 -2
  130. package/dest/utils/encoding.d.ts +15 -0
  131. package/dest/utils/encoding.d.ts.map +1 -0
  132. package/dest/utils/encoding.js +6 -13
  133. package/dest/utils/github.d.ts +4 -0
  134. package/dest/utils/github.d.ts.map +1 -0
  135. package/dest/utils/index.d.ts +5 -0
  136. package/dest/utils/index.d.ts.map +1 -0
  137. package/dest/utils/inspect.d.ts +17 -0
  138. package/dest/utils/inspect.d.ts.map +1 -0
  139. package/dest/utils/inspect.js +4 -4
  140. package/package.json +21 -20
  141. package/src/cmds/contracts/index.ts +2 -2
  142. package/src/cmds/contracts/inspect_contract.ts +5 -5
  143. package/src/cmds/contracts/parse_parameter_struct.ts +2 -2
  144. package/src/cmds/devnet/bootstrap_network.ts +24 -12
  145. package/src/cmds/devnet/faucet.ts +2 -2
  146. package/src/cmds/devnet/index.ts +16 -8
  147. package/src/cmds/infrastructure/index.ts +12 -11
  148. package/src/cmds/infrastructure/sequencers.ts +10 -7
  149. package/src/cmds/infrastructure/setup_l2_contract.ts +47 -0
  150. package/src/cmds/l1/advance_epoch.ts +4 -4
  151. package/src/cmds/l1/assume_proven_through.ts +8 -14
  152. package/src/cmds/l1/bridge_erc20.ts +5 -6
  153. package/src/cmds/l1/create_l1_account.ts +1 -1
  154. package/src/cmds/l1/deploy_l1_contracts.ts +13 -5
  155. package/src/cmds/l1/deploy_l1_verifier.ts +7 -7
  156. package/src/cmds/l1/deploy_new_rollup.ts +58 -0
  157. package/src/cmds/l1/get_l1_addresses.ts +30 -0
  158. package/src/cmds/l1/get_l1_balance.ts +9 -6
  159. package/src/cmds/l1/governance_utils.ts +187 -0
  160. package/src/cmds/l1/index.ts +238 -97
  161. package/src/cmds/l1/prover_stats.ts +21 -11
  162. package/src/cmds/l1/update_l1_validators.ts +25 -25
  163. package/src/cmds/misc/compute_selector.ts +2 -2
  164. package/src/cmds/misc/example_contracts.ts +1 -1
  165. package/src/cmds/misc/generate_bootnode_enr.ts +12 -0
  166. package/src/cmds/misc/generate_p2p_private_key.ts +1 -1
  167. package/src/cmds/misc/generate_secret_and_hash.ts +1 -1
  168. package/src/cmds/misc/index.ts +25 -3
  169. package/src/cmds/misc/setup_contracts.ts +6 -4
  170. package/src/cmds/misc/update/noir.ts +2 -2
  171. package/src/cmds/misc/update/npm.ts +2 -2
  172. package/src/cmds/misc/update/utils.ts +1 -1
  173. package/src/cmds/misc/update.ts +2 -2
  174. package/src/cmds/pxe/add_contract.ts +7 -5
  175. package/src/cmds/pxe/block_number.ts +1 -1
  176. package/src/cmds/pxe/get_account.ts +2 -2
  177. package/src/cmds/pxe/get_accounts.ts +1 -1
  178. package/src/cmds/pxe/get_block.ts +1 -1
  179. package/src/cmds/pxe/get_contract_data.ts +5 -3
  180. package/src/cmds/pxe/get_current_base_fee.ts +1 -1
  181. package/src/cmds/pxe/get_l1_to_l2_message_witness.ts +1 -1
  182. package/src/cmds/pxe/get_logs.ts +2 -2
  183. package/src/cmds/pxe/get_node_info.ts +3 -3
  184. package/src/cmds/pxe/get_pxe_info.ts +1 -1
  185. package/src/cmds/pxe/index.ts +3 -3
  186. package/src/utils/aztec.ts +74 -44
  187. package/src/utils/commands.ts +4 -4
  188. package/src/utils/encoding.ts +7 -13
  189. package/src/utils/inspect.ts +8 -7
  190. package/dest/cmds/infrastructure/setup_protocol_contract.js +0 -31
  191. package/src/cmds/infrastructure/setup_protocol_contract.ts +0 -36
@@ -0,0 +1,143 @@
1
+ import { FunctionSelector } from '@aztec/aztec.js/abi';
2
+ import { AztecAddress } from '@aztec/aztec.js/addresses';
3
+ import { EthAddress } from '@aztec/aztec.js/eth_address';
4
+ import { Fr } from '@aztec/aztec.js/fields';
5
+ import { LogId } from '@aztec/aztec.js/log_id';
6
+ import { TxHash } from '@aztec/aztec.js/tx_hash';
7
+ import type { LogFn } from '@aztec/foundation/log';
8
+ import type { PXE } from '@aztec/stdlib/interfaces/client';
9
+ import { PublicKeys } from '@aztec/stdlib/keys';
10
+ import { type Command, Option } from 'commander';
11
+ /**
12
+ * If we can successfully resolve 'host.docker.internal', then we are running in a container, and we should treat
13
+ * localhost as being host.docker.internal.
14
+ */
15
+ export declare const getLocalhost: () => Promise<string>;
16
+ export declare const LOCALHOST: string;
17
+ export declare const ETHEREUM_HOSTS: string, PRIVATE_KEY: string | undefined, API_KEY: string | undefined, CLI_VERSION: string | undefined;
18
+ export declare function addOptions(program: Command, options: Option[]): Command;
19
+ export declare const makePxeOption: (mandatory: boolean) => Option;
20
+ export declare const pxeOption: Option;
21
+ export declare const l1ChainIdOption: Option;
22
+ export declare const createSecretKeyOption: (description: string, mandatory: boolean, argsParser?: (value: string, previous: Fr) => Fr) => Option;
23
+ export declare const logJson: (log: LogFn) => (obj: object) => void;
24
+ /**
25
+ * Updates a file in place atomically.
26
+ * @param filePath - Path to file
27
+ * @param contents - New contents to write
28
+ */
29
+ export declare function atomicUpdateFile(filePath: string, contents: string): Promise<void>;
30
+ /**
31
+ * Utility to select a TX sender either from user input
32
+ * or from the first account that is found in a PXE instance.
33
+ * @param pxe - The PXE instance that will be checked for an account.
34
+ * @param _from - The user input.
35
+ * @returns An Aztec address. Will throw if one can't be found in either options.
36
+ */
37
+ export declare function getTxSender(pxe: PXE, _from?: string): Promise<AztecAddress>;
38
+ export declare function parseBigint(bigint: string): bigint | undefined;
39
+ /**
40
+ * Parses a hex encoded string to an Fr integer
41
+ * @param str - Hex encoded string
42
+ * @returns A integer
43
+ */
44
+ export declare function parseFieldFromHexString(str: string): Fr;
45
+ /**
46
+ * Parses an AztecAddress from a string.
47
+ * @param address - A serialized Aztec address
48
+ * @returns An Aztec address
49
+ * @throws InvalidArgumentError if the input string is not valid.
50
+ */
51
+ export declare function parseAztecAddress(address: string): AztecAddress;
52
+ /**
53
+ * Parses an Ethereum address from a string.
54
+ * @param address - A serialized Ethereum address
55
+ * @returns An Ethereum address
56
+ * @throws InvalidArgumentError if the input string is not valid.
57
+ */
58
+ export declare function parseEthereumAddress(address: string): EthAddress;
59
+ /**
60
+ * Parses an AztecAddress from a string.
61
+ * @param address - A serialized Aztec address
62
+ * @returns An Aztec address
63
+ * @throws InvalidArgumentError if the input string is not valid.
64
+ */
65
+ export declare function parseOptionalAztecAddress(address: string): AztecAddress | undefined;
66
+ /**
67
+ * Parses an optional log ID string into a LogId object.
68
+ *
69
+ * @param logId - The log ID string to parse.
70
+ * @returns The parsed LogId object, or undefined if the log ID is missing or empty.
71
+ */
72
+ export declare function parseOptionalLogId(logId: string): LogId | undefined;
73
+ /**
74
+ * Parses a selector from a string.
75
+ * @param selector - A serialized selector.
76
+ * @returns A selector.
77
+ * @throws InvalidArgumentError if the input string is not valid.
78
+ */
79
+ export declare function parseOptionalSelector(selector: string): FunctionSelector | undefined;
80
+ /**
81
+ * Parses a string into an integer or returns undefined if the input is falsy.
82
+ *
83
+ * @param value - The string to parse into an integer.
84
+ * @returns The parsed integer, or undefined if the input string is falsy.
85
+ * @throws If the input is not a valid integer.
86
+ */
87
+ export declare function parseOptionalInteger(value: string): number | undefined;
88
+ /**
89
+ * Parses a TxHash from a string.
90
+ * @param txHash - A transaction hash
91
+ * @returns A TxHash instance
92
+ * @throws InvalidArgumentError if the input string is not valid.
93
+ */
94
+ export declare function parseTxHash(txHash: string): TxHash;
95
+ /**
96
+ * Parses an optional TxHash from a string.
97
+ * Calls parseTxHash internally.
98
+ * @param txHash - A transaction hash
99
+ * @returns A TxHash instance, or undefined if the input string is falsy.
100
+ * @throws InvalidArgumentError if the input string is not valid.
101
+ */
102
+ export declare function parseOptionalTxHash(txHash: string): TxHash | undefined;
103
+ /**
104
+ * Parses a public key from a string.
105
+ * @param publicKey - A public keys object serialised as a string
106
+ * @returns A PublicKeys instance
107
+ * @throws InvalidArgumentError if the input string is not valid.
108
+ */
109
+ export declare function parsePublicKey(publicKey: string): PublicKeys | undefined;
110
+ /**
111
+ * Parses a partial address from a string.
112
+ * @param address - A partial address
113
+ * @returns A Fr instance
114
+ * @throws InvalidArgumentError if the input string is not valid.
115
+ */
116
+ export declare function parsePartialAddress(address: string): Fr;
117
+ /**
118
+ * Parses a secret key from a string.
119
+ * @param privateKey - A string
120
+ * @returns A secret key
121
+ * @throws InvalidArgumentError if the input string is not valid.
122
+ */
123
+ export declare function parseSecretKey(secretKey: string): Fr;
124
+ /**
125
+ * Parses a field from a string.
126
+ * @param field - A string representing the field.
127
+ * @returns A field.
128
+ * @throws InvalidArgumentError if the input string is not valid.
129
+ */
130
+ export declare function parseField(field: string): Fr;
131
+ /**
132
+ * Parses an array of strings to Frs.
133
+ * @param fields - An array of strings representing the fields.
134
+ * @returns An array of Frs.
135
+ */
136
+ export declare function parseFields(fields: string[]): Fr[];
137
+ /**
138
+ * Pretty prints an object as JSON
139
+ * @param data - The object to stringify
140
+ * @returns A JSON string
141
+ */
142
+ export declare function prettyPrintJSON(data: Record<string, any>): string;
143
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/utils/commands.ts"],"names":[],"mappings":"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"}
@@ -4,7 +4,7 @@ import { EthAddress } from '@aztec/aztec.js/eth_address';
4
4
  import { Fr } from '@aztec/aztec.js/fields';
5
5
  import { LogId } from '@aztec/aztec.js/log_id';
6
6
  import { TxHash } from '@aztec/aztec.js/tx_hash';
7
- import { PublicKeys } from '@aztec/circuits.js/types';
7
+ import { PublicKeys } from '@aztec/stdlib/keys';
8
8
  import { CommanderError, InvalidArgumentError, Option } from 'commander';
9
9
  import { lookup } from 'dns/promises';
10
10
  import { rename, writeFile } from 'fs/promises';
@@ -13,7 +13,7 @@ import { rename, writeFile } from 'fs/promises';
13
13
  * localhost as being host.docker.internal.
14
14
  */ export const getLocalhost = ()=>lookup('host.docker.internal').then(()=>'host.docker.internal').catch(()=>'localhost');
15
15
  export const LOCALHOST = await getLocalhost();
16
- export const { ETHEREUM_HOST = `http://${LOCALHOST}:8545`, PRIVATE_KEY, API_KEY, CLI_VERSION } = process.env;
16
+ export const { ETHEREUM_HOSTS = `http://${LOCALHOST}:8545`, PRIVATE_KEY, API_KEY, CLI_VERSION } = process.env;
17
17
  export function addOptions(program, options) {
18
18
  options.forEach((option)=>program.addOption(option));
19
19
  return program;
@@ -0,0 +1,15 @@
1
+ import type { ABIParameter, StructType } from '@aztec/stdlib/abi';
2
+ /**
3
+ * Parses a hex string into an ABI struct type.
4
+ * @param str - The encoded hex string.
5
+ * @param abiType - The ABI Struct type.
6
+ * @returns An object in the ABI struct type's format.
7
+ */
8
+ export declare function parseStructString(str: string, abiType: StructType): any;
9
+ /**
10
+ * Tries to encode function args to their equivalent TS type.
11
+ * @param args - An array of function's / constructor's args.
12
+ * @returns The encoded array.
13
+ */
14
+ export declare function encodeArgs(args: any[], params: ABIParameter[]): any[];
15
+ //# sourceMappingURL=encoding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../src/utils/encoding.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,OAcjE;AA4ED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,SAY7D"}
@@ -1,4 +1,3 @@
1
- import { isU128Struct } from '@aztec/foundation/abi';
2
1
  import { Fr } from '@aztec/foundation/fields';
3
2
  /**
4
3
  * Parses a hex string into an ABI struct type.
@@ -78,19 +77,13 @@ import { Fr } from '@aztec/foundation/fields';
78
77
  throw Error(`Array passed for arg ${name}. Expected a struct.`);
79
78
  }
80
79
  const res = {};
81
- if (isU128Struct(abiType)) {
82
- // When dealing with U128 we don't expect to receive limbs from the user but instead just a normal number.
83
- // Also encoder.ts expects a normal number so we just return it as such.
84
- return obj;
85
- } else {
86
- for (const field of abiType.fields){
87
- // Remove field name from list as it's present
88
- const arg = obj[field.name];
89
- if (!arg) {
90
- throw Error(`Expected field ${field.name} not found in struct ${name}.`);
91
- }
92
- res[field.name] = encodeArg(obj[field.name], field.type, field.name);
80
+ for (const field of abiType.fields){
81
+ // Remove field name from list as it's present
82
+ const arg = obj[field.name];
83
+ if (!arg) {
84
+ throw Error(`Expected field ${field.name} not found in struct ${name}.`);
93
85
  }
86
+ res[field.name] = encodeArg(obj[field.name], field.type, field.name);
94
87
  }
95
88
  return res;
96
89
  }
@@ -0,0 +1,4 @@
1
+ export declare const GITHUB_OWNER = "AztecProtocol";
2
+ export declare const GITHUB_REPO = "aztec-packages";
3
+ export declare const GITHUB_TAG_PREFIX = "aztec-packages";
4
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/utils/github.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAC5C,eAAO,MAAM,WAAW,mBAAmB,CAAC;AAC5C,eAAO,MAAM,iBAAiB,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './commands.js';
2
+ export * from './aztec.js';
3
+ export * from './encoding.js';
4
+ export * from './github.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ContractArtifact, Fr } from '@aztec/aztec.js';
2
+ import type { LogFn } from '@aztec/foundation/log';
3
+ import type { PXE } from '@aztec/stdlib/interfaces/client';
4
+ import type { TxHash } from '@aztec/stdlib/tx';
5
+ export declare function inspectBlock(pxe: PXE, blockNumber: number, log: LogFn, opts?: {
6
+ showTxs?: boolean;
7
+ }): Promise<void>;
8
+ export declare function inspectTx(pxe: PXE, txHash: TxHash, log: LogFn, opts?: {
9
+ includeBlockInfo?: boolean;
10
+ artifactMap?: ArtifactMap;
11
+ }): Promise<void>;
12
+ type ArtifactMap = Record<string, ContractArtifactWithClassId>;
13
+ type ContractArtifactWithClassId = ContractArtifact & {
14
+ classId: Fr;
15
+ };
16
+ export {};
17
+ //# sourceMappingURL=inspect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/utils/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,gBAAgB,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,wBAAsB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,iBA0B7G;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,KAAK,EACV,IAAI,GAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,WAAW,CAAA;CAAO,iBAmGrE;AAyCD,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;AAC/D,KAAK,2BAA2B,GAAG,gBAAgB,GAAG;IAAE,OAAO,EAAE,EAAE,CAAA;CAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- import { NoteStatus } from '@aztec/circuit-types';
2
- import { siloNullifier } from '@aztec/circuits.js/hash';
3
1
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
2
+ import { siloNullifier } from '@aztec/stdlib/hash';
3
+ import { NoteStatus } from '@aztec/stdlib/note';
4
4
  export async function inspectBlock(pxe, blockNumber, log, opts = {}) {
5
5
  const block = await pxe.getBlock(blockNumber);
6
6
  if (!block) {
@@ -158,7 +158,7 @@ async function getKnownArtifacts(pxe) {
158
158
  const knownContractAddresses = await pxe.getContracts();
159
159
  const knownContracts = (await Promise.all(knownContractAddresses.map((contractAddress)=>pxe.getContractMetadata(contractAddress)))).map((contractMetadata)=>contractMetadata.contractInstance);
160
160
  const classIds = [
161
- ...new Set(knownContracts.map((contract)=>contract?.contractClassId))
161
+ ...new Set(knownContracts.map((contract)=>contract?.currentContractClassId))
162
162
  ];
163
163
  const knownArtifacts = (await Promise.all(classIds.map((classId)=>classId ? pxe.getContractClassMetadata(classId) : undefined))).map((contractClassMetadata)=>contractClassMetadata ? {
164
164
  ...contractClassMetadata.artifact,
@@ -167,7 +167,7 @@ async function getKnownArtifacts(pxe) {
167
167
  const map = {};
168
168
  for (const instance of knownContracts){
169
169
  if (instance) {
170
- const artifact = knownArtifacts.find((a)=>a?.classId?.equals(instance.contractClassId));
170
+ const artifact = knownArtifacts.find((a)=>a?.classId?.equals(instance.currentContractClassId));
171
171
  if (artifact) {
172
172
  map[instance.address.toString()] = artifact;
173
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
3
+ "version": "0.77.0-testnet-ignition.21",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./contracts": "./dest/cmds/contracts/index.js",
@@ -61,18 +61,20 @@
61
61
  "reporters": [
62
62
  "default"
63
63
  ],
64
- "testTimeout": 30000,
64
+ "testTimeout": 120000,
65
65
  "setupFiles": [
66
66
  "../../foundation/src/jest/setup.mjs"
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@aztec/archiver": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
71
- "@aztec/aztec.js": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
72
- "@aztec/circuit-types": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
73
- "@aztec/foundation": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
74
- "@aztec/l1-artifacts": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
75
- "@aztec/types": "0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2",
70
+ "@aztec/archiver": "0.77.0-testnet-ignition.21",
71
+ "@aztec/aztec.js": "0.77.0-testnet-ignition.21",
72
+ "@aztec/constants": "0.77.0-testnet-ignition.21",
73
+ "@aztec/foundation": "0.77.0-testnet-ignition.21",
74
+ "@aztec/l1-artifacts": "0.77.0-testnet-ignition.21",
75
+ "@aztec/p2p": "0.77.0-testnet-ignition.21",
76
+ "@aztec/stdlib": "0.77.0-testnet-ignition.21",
77
+ "@aztec/world-state": "0.77.0-testnet-ignition.21",
76
78
  "@iarna/toml": "^2.2.5",
77
79
  "@libp2p/peer-id-factory": "^3.0.4",
78
80
  "commander": "^12.1.0",
@@ -84,10 +86,9 @@
84
86
  "viem": "2.22.8"
85
87
  },
86
88
  "devDependencies": {
87
- "@aztec/accounts": "workspace:^",
88
- "@aztec/circuits.js": "workspace:^",
89
- "@aztec/ethereum": "workspace:^",
90
- "@aztec/protocol-contracts": "workspace:^",
89
+ "@aztec/accounts": "0.77.0-testnet-ignition.21",
90
+ "@aztec/ethereum": "0.77.0-testnet-ignition.21",
91
+ "@aztec/protocol-contracts": "0.77.0-testnet-ignition.21",
91
92
  "@jest/globals": "^29.5.0",
92
93
  "@types/jest": "^29.5.0",
93
94
  "@types/lodash.chunk": "^4.2.9",
@@ -103,14 +104,14 @@
103
104
  "typescript": "^5.0.4"
104
105
  },
105
106
  "peerDependencies": {
106
- "@aztec/accounts": "workspace:^",
107
- "@aztec/bb-prover": "workspace:^",
108
- "@aztec/circuits.js": "workspace:^",
109
- "@aztec/ethereum": "workspace:^",
110
- "@aztec/l1-artifacts": "workspace:^",
111
- "@aztec/noir-contracts.js": "workspace:^",
112
- "@aztec/noir-protocol-circuits-types": "workspace:^",
113
- "@aztec/protocol-contracts": "workspace:^"
107
+ "@aztec/accounts": "0.77.0-testnet-ignition.21",
108
+ "@aztec/bb-prover": "0.77.0-testnet-ignition.21",
109
+ "@aztec/ethereum": "0.77.0-testnet-ignition.21",
110
+ "@aztec/l1-artifacts": "0.77.0-testnet-ignition.21",
111
+ "@aztec/noir-contracts.js": "0.77.0-testnet-ignition.21",
112
+ "@aztec/noir-protocol-circuits-types": "0.77.0-testnet-ignition.21",
113
+ "@aztec/protocol-contracts": "0.77.0-testnet-ignition.21",
114
+ "@aztec/stdlib": "0.77.0-testnet-ignition.21"
114
115
  },
115
116
  "files": [
116
117
  "dest",
@@ -1,6 +1,6 @@
1
- import { type LogFn, type Logger } from '@aztec/foundation/log';
1
+ import type { LogFn, Logger } from '@aztec/foundation/log';
2
2
 
3
- import { type Command } from 'commander';
3
+ import type { Command } from 'commander';
4
4
 
5
5
  export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
6
6
  program
@@ -1,18 +1,18 @@
1
- import { getContractClassFromArtifact } from '@aztec/circuits.js';
1
+ import { sha256 } from '@aztec/foundation/crypto';
2
+ import type { LogFn, Logger } from '@aztec/foundation/log';
2
3
  import {
3
4
  type FunctionArtifact,
4
5
  FunctionSelector,
5
6
  decodeFunctionSignature,
6
7
  decodeFunctionSignatureWithParameterNames,
7
- } from '@aztec/foundation/abi';
8
- import { sha256 } from '@aztec/foundation/crypto';
9
- import { type LogFn, type Logger } from '@aztec/foundation/log';
8
+ } from '@aztec/stdlib/abi';
9
+ import { getContractClassFromArtifact } from '@aztec/stdlib/contract';
10
10
 
11
11
  import { getContractArtifact } from '../../utils/aztec.js';
12
12
 
13
13
  export async function inspectContract(contractArtifactFile: string, debugLogger: Logger, log: LogFn) {
14
14
  const contractArtifact = await getContractArtifact(contractArtifactFile, log);
15
- const contractFns = contractArtifact.functions.filter(f => f.name !== 'compute_note_hash_and_optionally_a_nullifier');
15
+ const contractFns = contractArtifact.functions;
16
16
  if (contractFns.length === 0) {
17
17
  log(`No functions found for contract ${contractArtifact.name}`);
18
18
  }
@@ -1,6 +1,6 @@
1
- import { type StructType } from '@aztec/foundation/abi';
2
1
  import { jsonStringify } from '@aztec/foundation/json-rpc';
3
- import { type LogFn } from '@aztec/foundation/log';
2
+ import type { LogFn } from '@aztec/foundation/log';
3
+ import type { StructType } from '@aztec/stdlib/abi';
4
4
 
5
5
  import { getContractArtifact } from '../../utils/aztec.js';
6
6
  import { parseStructString } from '../../utils/encoding.js';
@@ -1,6 +1,9 @@
1
- import { getSchnorrAccount } from '@aztec/accounts/schnorr';
1
+ import { getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
2
2
  import {
3
+ AztecAddress,
3
4
  BatchCall,
5
+ EthAddress,
6
+ Fr,
4
7
  L1FeeJuicePortalManager,
5
8
  type PXE,
6
9
  type WaitOpts,
@@ -8,7 +11,7 @@ import {
8
11
  createCompatibleClient,
9
12
  retryUntil,
10
13
  } from '@aztec/aztec.js';
11
- import { type AztecAddress, type EthAddress, FEE_FUNDING_FOR_TESTER_ACCOUNT, Fq, Fr } from '@aztec/circuits.js';
14
+ import { FEE_FUNDING_FOR_TESTER_ACCOUNT } from '@aztec/constants';
12
15
  import {
13
16
  type ContractArtifacts,
14
17
  type L1Clients,
@@ -16,10 +19,10 @@ import {
16
19
  createL1Clients,
17
20
  deployL1Contract,
18
21
  } from '@aztec/ethereum';
19
- import { type LogFn, type Logger } from '@aztec/foundation/log';
22
+ import type { LogFn, Logger } from '@aztec/foundation/log';
20
23
 
21
24
  import { getContract } from 'viem';
22
- import { privateKeyToAccount } from 'viem/accounts';
25
+ import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts';
23
26
 
24
27
  type ContractDeploymentInfo = {
25
28
  address: AztecAddress;
@@ -35,24 +38,27 @@ const waitOpts: WaitOpts = {
35
38
 
36
39
  export async function bootstrapNetwork(
37
40
  pxeUrl: string,
38
- l1Url: string,
41
+ l1Urls: string[],
39
42
  l1ChainId: string,
40
43
  l1PrivateKey: `0x${string}` | undefined,
41
44
  l1Mnemonic: string,
45
+ addressIndex: number,
42
46
  json: boolean,
43
47
  log: LogFn,
44
48
  debugLog: Logger,
45
49
  ) {
46
50
  const pxe = await createCompatibleClient(pxeUrl, debugLog);
47
51
 
48
- // setup a one-off account contract
49
- const account = await getSchnorrAccount(pxe, Fr.random(), Fq.random(), Fr.random());
50
- const wallet = await account.deploy().getWallet();
52
+ const [wallet] = await getDeployedTestAccountsWallets(pxe);
51
53
 
52
54
  const l1Clients = createL1Clients(
53
- l1Url,
54
- l1PrivateKey ? privateKeyToAccount(l1PrivateKey) : l1Mnemonic,
55
- createEthereumChain(l1Url, +l1ChainId).chainInfo,
55
+ l1Urls,
56
+ l1PrivateKey
57
+ ? privateKeyToAccount(l1PrivateKey)
58
+ : // We need to use a different account that the main "deployer" account because the "deployer" account creates transactions that send blobs.
59
+ // Note that this account needs to be funded on L1 !
60
+ mnemonicToAccount(l1Mnemonic, { addressIndex }),
61
+ createEthereumChain(l1Urls, +l1ChainId).chainInfo,
56
62
  );
57
63
 
58
64
  const { erc20Address, portalAddress } = await deployERC20(l1Clients);
@@ -65,7 +71,7 @@ export async function bootstrapNetwork(
65
71
  const fpc = await deployFPC(wallet, token.address, fpcAdmin);
66
72
 
67
73
  const counter = await deployCounter(wallet);
68
- // NOTE: Disabling for now in order to get devnet running
74
+
69
75
  await fundFPC(counter.address, wallet, l1Clients, fpc.address, debugLog);
70
76
 
71
77
  if (json) {
@@ -294,13 +300,19 @@ async function fundFPC(
294
300
 
295
301
  const counter = await CounterContract.at(counterAddress, wallet);
296
302
 
303
+ debugLog.info('Incrementing Counter');
304
+
297
305
  // TODO (alexg) remove this once sequencer builds blocks continuously
298
306
  // advance the chain
299
307
  await counter.methods.increment(wallet.getAddress(), wallet.getAddress()).send().wait(waitOpts);
300
308
  await counter.methods.increment(wallet.getAddress(), wallet.getAddress()).send().wait(waitOpts);
301
309
 
310
+ debugLog.info('Claiming FPC');
311
+
302
312
  await feeJuiceContract.methods
303
313
  .claim(fpcAddress, claimAmount, claimSecret, messageLeafIndex)
304
314
  .send()
305
315
  .wait({ ...waitOpts, proven: true });
316
+
317
+ debugLog.info('Finished claiming FPC');
306
318
  }
@@ -1,5 +1,5 @@
1
- import { type EthAddress } from '@aztec/circuits.js';
2
- import { type LogFn } from '@aztec/foundation/log';
1
+ import type { EthAddress } from '@aztec/foundation/eth-address';
2
+ import type { LogFn } from '@aztec/foundation/log';
3
3
 
4
4
  import { prettyPrintJSON } from '../../utils/commands.js';
5
5
 
@@ -1,8 +1,8 @@
1
- import { type LogFn, type Logger } from '@aztec/foundation/log';
1
+ import type { LogFn, Logger } from '@aztec/foundation/log';
2
2
 
3
- import { type Command } from 'commander';
3
+ import type { Command } from 'commander';
4
4
 
5
- import { ETHEREUM_HOST, l1ChainIdOption, parseEthereumAddress, pxeOption } from '../../utils/commands.js';
5
+ import { ETHEREUM_HOSTS, l1ChainIdOption, parseEthereumAddress, pxeOption } from '../../utils/commands.js';
6
6
 
7
7
  export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
8
8
  program
@@ -10,10 +10,11 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
10
10
  .description('Bootstrap a new network')
11
11
  .addOption(pxeOption)
12
12
  .addOption(l1ChainIdOption)
13
- .requiredOption(
14
- '--l1-rpc-url <string>',
15
- 'Url of the ethereum host. Chain identifiers localhost and testnet can be used',
16
- ETHEREUM_HOST,
13
+ .requiredOption<string[]>(
14
+ '--l1-rpc-urls <string>',
15
+ 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)',
16
+ (arg: string) => arg.split(','),
17
+ [ETHEREUM_HOSTS],
17
18
  )
18
19
  .option('--l1-private-key <string>', 'The private key to use for deployment', process.env.PRIVATE_KEY)
19
20
  .option(
@@ -21,15 +22,22 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
21
22
  'The mnemonic to use in deployment',
22
23
  'test test test test test test test test test test test junk',
23
24
  )
25
+ .option(
26
+ '-ai, --address-index <number>',
27
+ 'The address index to use when calculating an address',
28
+ arg => BigInt(arg),
29
+ 0n,
30
+ )
24
31
  .option('--json', 'Output the result as JSON')
25
32
  .action(async options => {
26
33
  const { bootstrapNetwork } = await import('./bootstrap_network.js');
27
34
  await bootstrapNetwork(
28
35
  options[pxeOption.attributeName()],
29
- options.l1RpcUrl,
36
+ options.l1RpcUrls,
30
37
  options[l1ChainIdOption.attributeName()],
31
38
  options.l1PrivateKey,
32
39
  options.mnemonic,
40
+ options.addressIndex,
33
41
  options.json,
34
42
  log,
35
43
  debugLogger,
@@ -1,20 +1,20 @@
1
- import { type LogFn, type Logger } from '@aztec/foundation/log';
1
+ import type { LogFn, Logger } from '@aztec/foundation/log';
2
2
 
3
- import { type Command } from 'commander';
3
+ import type { Command } from 'commander';
4
4
 
5
- import { ETHEREUM_HOST, l1ChainIdOption, parseOptionalInteger, pxeOption } from '../../utils/commands.js';
5
+ import { ETHEREUM_HOSTS, l1ChainIdOption, parseOptionalInteger, pxeOption } from '../../utils/commands.js';
6
6
 
7
7
  export function injectCommands(program: Command, log: LogFn, debugLogger: Logger) {
8
8
  program
9
9
  .command('setup-protocol-contracts')
10
10
  .description('Bootstrap the blockchain by initializing all the protocol contracts')
11
11
  .addOption(pxeOption)
12
- .addOption(l1ChainIdOption)
12
+ .option('--testAccounts', 'Deploy funded test accounts.')
13
13
  .option('--json', 'Output the contract addresses in JSON format')
14
14
  .option('--skipProofWait', "Don't wait for proofs to land.")
15
15
  .action(async options => {
16
- const { setupProtocolContracts } = await import('./setup_protocol_contract.js');
17
- await setupProtocolContracts(options.rpcUrl, options.l1ChainId, options.json, options.skipProofWait, log);
16
+ const { setupL2Contracts } = await import('./setup_l2_contract.js');
17
+ await setupL2Contracts(options.rpcUrl, options.testAccounts, options.json, options.skipProofWait, log);
18
18
  });
19
19
 
20
20
  program
@@ -22,10 +22,11 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
22
22
  .argument('<command>', 'Command to run: list, add, remove, who-next')
23
23
  .argument('[who]', 'Who to add/remove')
24
24
  .description('Manages or queries registered sequencers on the L1 rollup contract.')
25
- .requiredOption(
26
- '--l1-rpc-url <string>',
27
- 'Url of the ethereum host. Chain identifiers localhost and testnet can be used',
28
- ETHEREUM_HOST,
25
+ .requiredOption<string[]>(
26
+ '--l1-rpc-urls <string>',
27
+ 'List of Ethereum host URLs. Chain identifiers localhost and testnet can be used (comma separated)',
28
+ (arg: string) => arg.split(','),
29
+ [ETHEREUM_HOSTS],
29
30
  )
30
31
  .option(
31
32
  '-m, --mnemonic <string>',
@@ -42,7 +43,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
42
43
  who,
43
44
  mnemonic: options.mnemonic,
44
45
  rpcUrl: options.rpcUrl,
45
- l1RpcUrl: options.l1RpcUrl,
46
+ l1RpcUrls: options.l1RpcUrls.split(','),
46
47
  chainId: options.l1ChainId,
47
48
  blockNumber: options.blockNumber,
48
49
  log,