@hyperlane-xyz/cli 3.1.9 → 3.2.0-alpha

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 (228) hide show
  1. package/README.md +6 -1
  2. package/dist/cli.d.ts +1 -1
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +27 -3
  5. package/dist/cli.js.map +1 -1
  6. package/dist/env.d.ts +2 -0
  7. package/dist/env.d.ts.map +1 -0
  8. package/dist/env.js +14 -0
  9. package/dist/env.js.map +1 -0
  10. package/dist/src/avs/config.d.ts +11 -0
  11. package/dist/src/avs/config.d.ts.map +1 -0
  12. package/dist/src/avs/config.js +10 -0
  13. package/dist/src/avs/config.js.map +1 -0
  14. package/dist/src/avs/stakeRegistry.d.ts +19 -0
  15. package/dist/src/avs/stakeRegistry.d.ts.map +1 -0
  16. package/dist/src/avs/stakeRegistry.js +94 -0
  17. package/dist/src/avs/stakeRegistry.js.map +1 -0
  18. package/dist/src/commands/avs.d.ts +12 -0
  19. package/dist/src/commands/avs.d.ts.map +1 -0
  20. package/dist/src/commands/avs.js +58 -0
  21. package/dist/src/commands/avs.js.map +1 -0
  22. package/dist/src/commands/chains.d.ts.map +1 -1
  23. package/dist/src/commands/chains.js +46 -27
  24. package/dist/src/commands/chains.js.map +1 -1
  25. package/dist/src/commands/config.js +74 -85
  26. package/dist/src/commands/config.js.map +1 -1
  27. package/dist/src/commands/deploy.d.ts.map +1 -1
  28. package/dist/src/commands/deploy.js +58 -91
  29. package/dist/src/commands/deploy.js.map +1 -1
  30. package/dist/src/commands/hook.d.ts +12 -0
  31. package/dist/src/commands/hook.d.ts.map +1 -0
  32. package/dist/src/commands/hook.js +34 -0
  33. package/dist/src/commands/hook.js.map +1 -0
  34. package/dist/src/commands/ism.d.ts +12 -0
  35. package/dist/src/commands/ism.d.ts.map +1 -0
  36. package/dist/src/commands/ism.js +36 -0
  37. package/dist/src/commands/ism.js.map +1 -0
  38. package/dist/src/commands/options.d.ts +19 -7
  39. package/dist/src/commands/options.d.ts.map +1 -1
  40. package/dist/src/commands/options.js +90 -27
  41. package/dist/src/commands/options.js.map +1 -1
  42. package/dist/src/commands/send.d.ts +14 -1
  43. package/dist/src/commands/send.d.ts.map +1 -1
  44. package/dist/src/commands/send.js +32 -55
  45. package/dist/src/commands/send.js.map +1 -1
  46. package/dist/src/commands/signCommands.d.ts +3 -0
  47. package/dist/src/commands/signCommands.d.ts.map +1 -0
  48. package/dist/src/commands/signCommands.js +11 -0
  49. package/dist/src/commands/signCommands.js.map +1 -0
  50. package/dist/src/commands/status.d.ts +5 -2
  51. package/dist/src/commands/status.d.ts.map +1 -1
  52. package/dist/src/commands/status.js +9 -19
  53. package/dist/src/commands/status.js.map +1 -1
  54. package/dist/src/config/chain.d.ts +5 -7
  55. package/dist/src/config/chain.d.ts.map +1 -1
  56. package/dist/src/config/chain.js +94 -64
  57. package/dist/src/config/chain.js.map +1 -1
  58. package/dist/src/config/chain.test.d.ts +2 -0
  59. package/dist/src/config/chain.test.d.ts.map +1 -0
  60. package/dist/src/config/chain.test.js +9 -0
  61. package/dist/src/config/chain.test.js.map +1 -0
  62. package/dist/src/config/hooks.d.ts +91 -214
  63. package/dist/src/config/hooks.d.ts.map +1 -1
  64. package/dist/src/config/hooks.js +218 -122
  65. package/dist/src/config/hooks.js.map +1 -1
  66. package/dist/src/config/ism.d.ts +74 -0
  67. package/dist/src/config/ism.d.ts.map +1 -0
  68. package/dist/src/config/ism.js +223 -0
  69. package/dist/src/config/ism.js.map +1 -0
  70. package/dist/src/config/multisig.d.ts +4 -14
  71. package/dist/src/config/multisig.d.ts.map +1 -1
  72. package/dist/src/config/multisig.js +35 -29
  73. package/dist/src/config/multisig.js.map +1 -1
  74. package/dist/src/config/warp.d.ts +7 -180
  75. package/dist/src/config/warp.d.ts.map +1 -1
  76. package/dist/src/config/warp.js +55 -62
  77. package/dist/src/config/warp.js.map +1 -1
  78. package/dist/src/consts.d.ts +1 -0
  79. package/dist/src/consts.d.ts.map +1 -1
  80. package/dist/src/consts.js +1 -0
  81. package/dist/src/consts.js.map +1 -1
  82. package/dist/src/context/context.d.ts +14 -0
  83. package/dist/src/context/context.d.ts.map +1 -0
  84. package/dist/src/context/context.js +108 -0
  85. package/dist/src/context/context.js.map +1 -0
  86. package/dist/src/context/types.d.ts +33 -0
  87. package/dist/src/context/types.d.ts.map +1 -0
  88. package/dist/src/context/types.js.map +1 -0
  89. package/dist/src/deploy/agent.d.ts +6 -4
  90. package/dist/src/deploy/agent.d.ts.map +1 -1
  91. package/dist/src/deploy/agent.js +10 -24
  92. package/dist/src/deploy/agent.js.map +1 -1
  93. package/dist/src/deploy/core.d.ts +10 -7
  94. package/dist/src/deploy/core.d.ts.map +1 -1
  95. package/dist/src/deploy/core.js +156 -160
  96. package/dist/src/deploy/core.js.map +1 -1
  97. package/dist/src/deploy/dry-run.d.ts +19 -0
  98. package/dist/src/deploy/dry-run.d.ts.map +1 -0
  99. package/dist/src/deploy/dry-run.js +45 -0
  100. package/dist/src/deploy/dry-run.js.map +1 -0
  101. package/dist/src/deploy/utils.d.ts +15 -8
  102. package/dist/src/deploy/utils.d.ts.map +1 -1
  103. package/dist/src/deploy/utils.js +60 -11
  104. package/dist/src/deploy/utils.js.map +1 -1
  105. package/dist/src/deploy/warp.d.ts +4 -7
  106. package/dist/src/deploy/warp.d.ts.map +1 -1
  107. package/dist/src/deploy/warp.js +131 -169
  108. package/dist/src/deploy/warp.js.map +1 -1
  109. package/dist/src/hook/read.d.ts +13 -0
  110. package/dist/src/hook/read.d.ts.map +1 -0
  111. package/dist/src/hook/read.js +25 -0
  112. package/dist/src/hook/read.js.map +1 -0
  113. package/dist/src/ism/read.d.ts +13 -0
  114. package/dist/src/ism/read.d.ts.map +1 -0
  115. package/dist/src/ism/read.js +25 -0
  116. package/dist/src/ism/read.js.map +1 -0
  117. package/dist/src/logger.d.ts +17 -0
  118. package/dist/src/logger.d.ts.map +1 -0
  119. package/dist/src/logger.js +32 -0
  120. package/dist/src/logger.js.map +1 -0
  121. package/dist/src/registry/MergedRegistry.d.ts +35 -0
  122. package/dist/src/registry/MergedRegistry.d.ts.map +1 -0
  123. package/dist/src/registry/MergedRegistry.js +83 -0
  124. package/dist/src/registry/MergedRegistry.js.map +1 -0
  125. package/dist/src/send/message.d.ts +7 -6
  126. package/dist/src/send/message.d.ts.map +1 -1
  127. package/dist/src/send/message.js +40 -22
  128. package/dist/src/send/message.js.map +1 -1
  129. package/dist/src/send/transfer.d.ts +8 -10
  130. package/dist/src/send/transfer.d.ts.map +1 -1
  131. package/dist/src/send/transfer.js +68 -70
  132. package/dist/src/send/transfer.js.map +1 -1
  133. package/dist/src/status/message.d.ts +7 -5
  134. package/dist/src/status/message.d.ts.map +1 -1
  135. package/dist/src/status/message.js +25 -12
  136. package/dist/src/status/message.js.map +1 -1
  137. package/dist/src/submit/submit.d.ts +5 -0
  138. package/dist/src/submit/submit.d.ts.map +1 -0
  139. package/dist/src/submit/submit.js +30 -0
  140. package/dist/src/submit/submit.js.map +1 -0
  141. package/dist/src/submit/types.d.ts +18 -0
  142. package/dist/src/submit/types.d.ts.map +1 -0
  143. package/dist/src/submit/types.js +2 -0
  144. package/dist/src/{deploy → submit}/types.js.map +1 -1
  145. package/dist/src/tests/deployTestErc20.d.ts +2 -0
  146. package/dist/src/tests/deployTestErc20.d.ts.map +1 -0
  147. package/dist/src/tests/deployTestErc20.js +26 -0
  148. package/dist/src/tests/deployTestErc20.js.map +1 -0
  149. package/dist/src/tests/hooks.test.d.ts +2 -0
  150. package/dist/src/tests/hooks.test.d.ts.map +1 -0
  151. package/dist/src/tests/hooks.test.js +83 -0
  152. package/dist/src/tests/hooks.test.js.map +1 -0
  153. package/dist/src/tests/ism.test.d.ts +2 -0
  154. package/dist/src/tests/ism.test.d.ts.map +1 -0
  155. package/dist/src/tests/ism.test.js +76 -0
  156. package/dist/src/tests/ism.test.js.map +1 -0
  157. package/dist/src/tests/multisig.test.d.ts +2 -0
  158. package/dist/src/tests/multisig.test.d.ts.map +1 -0
  159. package/dist/src/tests/multisig.test.js +34 -0
  160. package/dist/src/tests/multisig.test.js.map +1 -0
  161. package/dist/src/utils/balances.d.ts +2 -4
  162. package/dist/src/utils/balances.d.ts.map +1 -1
  163. package/dist/src/utils/balances.js +8 -12
  164. package/dist/src/utils/balances.js.map +1 -1
  165. package/dist/src/utils/chains.d.ts +3 -2
  166. package/dist/src/utils/chains.d.ts.map +1 -1
  167. package/dist/src/utils/chains.js +42 -23
  168. package/dist/src/utils/chains.js.map +1 -1
  169. package/dist/src/utils/env.d.ts +6 -0
  170. package/dist/src/utils/env.d.ts.map +1 -0
  171. package/dist/src/utils/env.js +9 -0
  172. package/dist/src/utils/env.js.map +1 -0
  173. package/dist/src/utils/files.d.ts +7 -4
  174. package/dist/src/utils/files.d.ts.map +1 -1
  175. package/dist/src/utils/files.js +52 -29
  176. package/dist/src/utils/files.js.map +1 -1
  177. package/dist/src/utils/keys.d.ts +28 -1
  178. package/dist/src/utils/keys.d.ts.map +1 -1
  179. package/dist/src/utils/keys.js +65 -6
  180. package/dist/src/utils/keys.js.map +1 -1
  181. package/dist/src/utils/time.d.ts.map +1 -1
  182. package/dist/src/utils/time.js +8 -1
  183. package/dist/src/utils/time.js.map +1 -1
  184. package/dist/src/utils/time.test.d.ts +2 -0
  185. package/dist/src/utils/time.test.d.ts.map +1 -0
  186. package/dist/src/utils/time.test.js +9 -0
  187. package/dist/src/utils/time.test.js.map +1 -0
  188. package/dist/src/utils/tokens.d.ts +3 -0
  189. package/dist/src/utils/tokens.d.ts.map +1 -0
  190. package/dist/src/utils/tokens.js +14 -0
  191. package/dist/src/utils/tokens.js.map +1 -0
  192. package/dist/src/utils/version-check.d.ts +2 -0
  193. package/dist/src/utils/version-check.d.ts.map +1 -0
  194. package/dist/src/utils/version-check.js +15 -0
  195. package/dist/src/utils/version-check.js.map +1 -0
  196. package/dist/src/version.d.ts +2 -0
  197. package/dist/src/version.d.ts.map +1 -0
  198. package/dist/src/version.js +2 -0
  199. package/dist/src/version.js.map +1 -0
  200. package/examples/chain-config.yaml +38 -40
  201. package/examples/contract-artifacts.yaml +4 -4
  202. package/examples/hooks.yaml +66 -0
  203. package/examples/ism-advanced.yaml +33 -0
  204. package/examples/{multisig-ism.yaml → ism.yaml} +0 -8
  205. package/examples/warp-route-deployment.yaml +32 -0
  206. package/package.json +27 -14
  207. package/dist/logger.d.ts +0 -13
  208. package/dist/logger.d.ts.map +0 -1
  209. package/dist/logger.js +0 -44
  210. package/dist/logger.js.map +0 -1
  211. package/dist/src/config/artifacts.d.ts +0 -3
  212. package/dist/src/config/artifacts.d.ts.map +0 -1
  213. package/dist/src/config/artifacts.js +0 -18
  214. package/dist/src/config/artifacts.js.map +0 -1
  215. package/dist/src/context.d.ts +0 -388
  216. package/dist/src/context.d.ts.map +0 -1
  217. package/dist/src/context.js +0 -30
  218. package/dist/src/context.js.map +0 -1
  219. package/dist/src/deploy/TestRecipientDeployer.d.ts +0 -20
  220. package/dist/src/deploy/TestRecipientDeployer.d.ts.map +0 -1
  221. package/dist/src/deploy/TestRecipientDeployer.js +0 -36
  222. package/dist/src/deploy/TestRecipientDeployer.js.map +0 -1
  223. package/dist/src/deploy/types.d.ts +0 -21
  224. package/dist/src/deploy/types.d.ts.map +0 -1
  225. package/examples/anvil-chains.yaml +0 -22
  226. package/examples/hook-config.yaml +0 -18
  227. package/examples/warp-tokens.yaml +0 -26
  228. /package/dist/src/{deploy → context}/types.js +0 -0
@@ -1,44 +1,42 @@
1
1
  # Configs for describing chain metadata for use in Hyperlane deployments or apps
2
- # Consists of a map of chain names to metadata
3
2
  # Schema here: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/metadata/chainMetadataTypes.ts
4
3
  ---
5
- mychainname:
4
+ # Required fields:
5
+ chainId: 1234567890 # Number: Use EIP-155 for EVM chains
6
+ domainId: 1234567890 # Number: Recommend matching chainId when possible
7
+ name: mychainname # String: Unique identifier for the chain, must match key above
8
+ protocol: ethereum # ProtocolType: Ethereum, Sealevel, etc.
9
+ rpcUrls: # Array: List of RPC configs
10
+ # Only http field is required
11
+ - http: https://mychain.com/rpc # String: HTTP URL of the RPC endpoint (preferably HTTPS)
12
+ # Others here are optional
13
+ pagination:
14
+ maxBlockRange: 1000 # Number
15
+ maxBlockAge: 1000 # Number
16
+ minBlockNumber: 1000 # Number
17
+ retry:
18
+ maxRequests: 5 # Number
19
+ baseRetryMs: 1000 # Number
20
+ # Optional fields, not required for Hyperlane deployments but useful for apps:
21
+ isTestnet: false # Boolean: Whether the chain is considered a testnet or a mainnet
22
+ blockExplorers: # Array: List of BlockExplorer configs
6
23
  # Required fields:
7
- chainId: 1234567890 # Number: Use EIP-155 for EVM chains
8
- domainId: 1234567890 # Number: Recommend matching chainId when possible
9
- name: mychainname # String: Unique identifier for the chain, must match key above
10
- protocol: ethereum # ProtocolType: Ethereum, Sealevel, etc.
11
- rpcUrls: # Array: List of RPC configs
12
- # Only http field is required
13
- - http: https://mychain.com/rpc # String: HTTP URL of the RPC endpoint (preferably HTTPS)
14
- # Others here are optional
15
- pagination:
16
- maxBlockRange: 1000 # Number
17
- maxBlockAge: 1000 # Number
18
- minBlockNumber: 1000 # Number
19
- retry:
20
- maxRequests: 5 # Number
21
- baseRetryMs: 1000 # Number
22
- # Optional fields, not required for Hyperlane deployments but useful for apps:
23
- isTestnet: false # Boolean: Whether the chain is considered a testnet or a mainnet
24
- blockExplorers: # Array: List of BlockExplorer configs
25
- # Required fields:
26
- - name: My Chain Explorer # String: Human-readable name for the explorer
27
- url: https://mychain.com/explorer # String: Base URL for the explorer
28
- apiUrl: https://mychain.com/api # String: Base URL for the explorer API
29
- # Optional fields:
30
- apiKey: myapikey # String: API key for the explorer (optional)
31
- family: etherscan # ExplorerFamily: See ExplorerFamily for valid values
32
- nativeToken:
33
- name: Eth # String
34
- symbol: ETH # String
35
- decimals: 18 # Number
36
- displayName: My Chain Name # String: Human-readable name of the chain
37
- displayNameShort: My Chain # String: A shorter human-readable name
38
- logoURI: https://mychain.com/logo.png # String: URI to a logo image for the chain
39
- blocks:
40
- confirmations: 12 # Number: Blocks to wait before considering a transaction confirmed
41
- reorgPeriod: 100 # Number: Blocks before a transaction has a near-zero chance of reverting
42
- estimateBlockTime: 15 # Number: Rough estimate of time per block in seconds
43
- # transactionOverrides: # Object: Properties to include when forming transaction requests
44
- # Any tx fields are allowed
24
+ - name: My Chain Explorer # String: Human-readable name for the explorer
25
+ url: https://mychain.com/explorer # String: Base URL for the explorer
26
+ apiUrl: https://mychain.com/api # String: Base URL for the explorer API
27
+ # Optional fields:
28
+ apiKey: myapikey # String: API key for the explorer (optional)
29
+ family: etherscan # ExplorerFamily: See ExplorerFamily for valid values
30
+ nativeToken:
31
+ name: Eth # String
32
+ symbol: ETH # String
33
+ decimals: 18 # Number
34
+ displayName: My Chain Name # String: Human-readable name of the chain
35
+ displayNameShort: My Chain # String: A shorter human-readable name
36
+ logoURI: https://mychain.com/logo.png # String: URI to a logo image for the chain
37
+ blocks:
38
+ confirmations: 12 # Number: Blocks to wait before considering a transaction confirmed
39
+ reorgPeriod: 100 # Number: Blocks before a transaction has a near-zero chance of reverting
40
+ estimateBlockTime: 15 # Number: Rough estimate of time per block in seconds
41
+ # transactionOverrides: # Object: Properties to include when forming transaction requests
42
+ # Any tx fields are allowed
@@ -12,9 +12,9 @@ anvil1:
12
12
  multisigIsm: '0x9bDE63104EE030d9De419EEd6bA7D14b86D6fE3f'
13
13
  testRecipient: '0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35'
14
14
  interchainAccountIsm: '0x5e8ee6840caa4f367aff1FF28aA36D5B1b836d35'
15
- aggregationIsmFactory: '0xc864fa3B662613cA5051f41e157d0a997f9a5A87'
16
- routingIsmFactory: '0x1fdfD1486b8339638C6b92f8a96D698D8182D2b1'
15
+ staticAggregationIsmFactory: '0xc864fa3B662613cA5051f41e157d0a997f9a5A87'
16
+ domainRoutingIsmFactory: '0x1fdfD1486b8339638C6b92f8a96D698D8182D2b1'
17
17
  interchainQueryRouter: '0xA837e38C3F7D509DF3a7a0fCf65E3814DB6c2618'
18
18
  interchainAccountRouter: '0x9521291A43ebA3aD3FD24d610F4b7F7543C8d761'
19
- merkleRootMultisigIsmFactory: '0x82140b2ddAd4E4dd7e1D6757Fb5F9485c230B79d'
20
- messageIdMultisigIsmFactory: '0x1079056da3EC7D55521F27e1E094015C0d39Cc65'
19
+ staticMerkleRootMultisigIsmFactory: '0x82140b2ddAd4E4dd7e1D6757Fb5F9485c230B79d'
20
+ staticMessageIdMultisigIsmFactory: '0x1079056da3EC7D55521F27e1E094015C0d39Cc65'
@@ -0,0 +1,66 @@
1
+ # A config to define the hooks for core contract deployments
2
+ # Ideally, use the `hyperlane config create hooks` command to generate this file
3
+ # but you we can refer to https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/hook/types.ts for the matching types
4
+
5
+ # HooksConfig:
6
+ # required: HookConfig
7
+ # default: HookConfig
8
+
9
+ # HookConfig:
10
+ # type: HookType
11
+ # ... hook-specific config
12
+
13
+ # HookType:
14
+ # - merkleTreeHook
15
+ # - domainRoutingHook
16
+ # - interchainGasPaymaster
17
+ # - protocolFee
18
+ # - aggregationHook
19
+ # - opStack (not yet supported)
20
+
21
+ anvil1:
22
+ required:
23
+ type: protocolFee
24
+ maxProtocolFee: '1000000000000000000' # in wei (string)
25
+ protocolFee: '200000000000000' # in wei (string)
26
+ beneficiary: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
27
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
28
+ default:
29
+ type: domainRoutingHook
30
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
31
+ domains:
32
+ anvil2:
33
+ type: aggregationHook
34
+ hooks:
35
+ - type: merkleTreeHook
36
+ - type: interchainGasPaymaster
37
+ beneficiary: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
38
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
39
+ oracleKey: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
40
+ overhead:
41
+ anvil2: 50000 # gas amount (number)
42
+ gasOracleType:
43
+ anvil2: StorageGasOracle
44
+ anvil2:
45
+ required:
46
+ type: protocolFee
47
+ maxProtocolFee: '1000000000000000000'
48
+ protocolFee: '200000000000000'
49
+ beneficiary: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
50
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
51
+ default:
52
+ type: domainRoutingHook
53
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
54
+ domains:
55
+ anvil1:
56
+ type: aggregationHook
57
+ hooks:
58
+ - type: merkleTreeHook
59
+ - type: interchainGasPaymaster
60
+ beneficiary: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
61
+ owner: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
62
+ oracleKey: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
63
+ overhead:
64
+ anvil1: 50000
65
+ gasOracleType:
66
+ anvil1: StorageGasOracle
@@ -0,0 +1,33 @@
1
+ anvil1:
2
+ type: defaultFallbackRoutingIsm
3
+ owner: '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
4
+ domains:
5
+ anvil2:
6
+ type: staticAggregationIsm
7
+ modules:
8
+ - type: messageIdMultisigIsm
9
+ threshold: 1
10
+ validators:
11
+ - '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
12
+ - type: merkleRootMultisigIsm
13
+ threshold: 1
14
+ validators:
15
+ - '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
16
+ threshold: 1
17
+
18
+ anvil2:
19
+ type: domainRoutingIsm
20
+ owner: '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
21
+ domains:
22
+ anvil1:
23
+ type: staticAggregationIsm
24
+ modules:
25
+ - type: messageIdMultisigIsm
26
+ threshold: 1
27
+ validators:
28
+ - '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
29
+ - type: merkleRootMultisigIsm
30
+ threshold: 1
31
+ validators:
32
+ - '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
33
+ threshold: 1
@@ -1,21 +1,13 @@
1
1
  # A config for a multisig Interchain Security Module (ISM)
2
2
  # Schema: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/ism/types.ts
3
3
  #
4
- # Valid module types:
5
- # routing
6
- # aggregation
7
- # merkleRootMultisig
8
- # messageIdMultisigIsm
9
4
 
10
- # ism type don't work currently (sets to messageIdMultisigIsm for all)
11
5
  ---
12
6
  anvil1:
13
- type: 'messageIdMultisigIsm'
14
7
  threshold: 1 # Number: Signatures required to approve a message
15
8
  validators: # Array: List of validator addresses
16
9
  - '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
17
10
  anvil2:
18
- type: 'messageIdMultisigIsm'
19
11
  threshold: 1
20
12
  validators:
21
13
  - '0xa0ee7a142d267c1f36714e4a8f75612f20a79720'
@@ -0,0 +1,32 @@
1
+ # A config for a Warp Route deployment
2
+ # Typically used with the 'hyperlane deploy warp' command
3
+ #
4
+ # Token Types:
5
+ # native
6
+ # collateral
7
+ # synthetic
8
+ #
9
+ # see comprehensive [list](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/token/config.ts#L8)
10
+ ---
11
+ anvil1:
12
+ type: native
13
+ # token: "0x123" # Collateral/vault address. Required for collateral types
14
+ # owner: "0x123" # Optional owner address for synthetic token
15
+ # mailbox: "0x123" # mailbox address route
16
+ # interchainGasPaymaster: "0x123" # Optional interchainGasPaymaster address
17
+ # isNft: true # If the token is an NFT (ERC721), set to true
18
+ # You can optionally set the token metadata
19
+ # name: "MyCollateralToken"
20
+ # symbol: "MCT"
21
+ # totalSupply: 10000000
22
+
23
+ anvil2:
24
+ type: synthetic
25
+ # token: "0x123" # Collateral/vault address. Required for collateral types
26
+ # owner: "0x123" # Optional owner address for synthetic token
27
+ # mailbox: "0x123" # mailbox address route
28
+ # interchainGasPaymaster: "0x123" # Optional interchainGasPaymaster address
29
+ # You can optionally set the token metadata
30
+ # name: "MySyntheticToken"
31
+ # symbol: "MST"
32
+ # totalSupply: 10000000
package/package.json CHANGED
@@ -1,43 +1,57 @@
1
1
  {
2
2
  "name": "@hyperlane-xyz/cli",
3
- "version": "3.1.9",
3
+ "version": "3.2.0-alpha",
4
4
  "description": "A command-line utility for common Hyperlane operations",
5
5
  "dependencies": {
6
- "@hyperlane-xyz/sdk": "3.1.9",
6
+ "@hyperlane-xyz/registry": "^1.2.0",
7
+ "@hyperlane-xyz/sdk": "3.12.2",
8
+ "@hyperlane-xyz/utils": "3.12.2",
7
9
  "@inquirer/prompts": "^3.0.0",
8
10
  "bignumber.js": "^9.1.1",
9
11
  "chalk": "^5.3.0",
10
12
  "ethers": "^5.7.2",
13
+ "latest-version": "^8.0.0",
11
14
  "terminal-link": "^3.0.0",
12
- "yaml": "^2.3.1",
15
+ "tsx": "^4.7.1",
16
+ "yaml": "^2.4.1",
13
17
  "yargs": "^17.7.2",
14
18
  "zod": "^3.21.2"
15
19
  },
16
20
  "devDependencies": {
21
+ "@types/mocha": "^10.0.1",
17
22
  "@types/node": "^18.14.5",
18
23
  "@types/yargs": "^17.0.24",
19
- "@typescript-eslint/eslint-plugin": "^5.62.0",
20
- "@typescript-eslint/parser": "^5.62.0",
21
- "eslint": "^8.43.0",
22
- "eslint-config-prettier": "^8.8.0",
24
+ "@typescript-eslint/eslint-plugin": "^7.4.0",
25
+ "@typescript-eslint/parser": "^7.4.0",
26
+ "chai": "^4.3.6",
27
+ "eslint": "^8.57.0",
28
+ "eslint-config-prettier": "^9.1.0",
29
+ "mocha": "^10.2.0",
23
30
  "prettier": "^2.8.8",
24
31
  "typescript": "^5.1.6"
25
32
  },
26
33
  "scripts": {
27
34
  "hyperlane": "node ./dist/cli.js",
28
- "build": "tsc",
29
- "dev": "tsc --watch",
35
+ "build": "yarn version:update && tsc",
36
+ "dev": "yarn version:update && tsc --watch",
30
37
  "clean": "rm -rf ./dist",
31
38
  "lint": "eslint . --ext .ts",
32
- "prettier": "prettier --write ./src ./examples"
39
+ "prettier": "prettier --write ./src ./examples",
40
+ "test": "mocha --config .mocharc.json",
41
+ "test:ci": "yarn test",
42
+ "version:update": "echo \"export const VERSION = '$npm_package_version';\" > src/version.ts"
33
43
  },
34
44
  "files": [
35
45
  "./dist",
36
- "./examples"
46
+ "./examples",
47
+ "package.json"
37
48
  ],
38
49
  "main": "./dist/index.js",
39
50
  "types": "./dist/index.d.ts",
40
51
  "type": "module",
52
+ "engines": {
53
+ "node": ">=16"
54
+ },
41
55
  "bin": {
42
56
  "hyperlane": "./dist/cli.js"
43
57
  },
@@ -53,6 +67,5 @@
53
67
  "Permissionless",
54
68
  "Deployment",
55
69
  "Typescript"
56
- ],
57
- "packageManager": "yarn@4.0.1"
58
- }
70
+ ]
71
+ }
package/dist/logger.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import debug from 'debug';
2
- export declare const logger: debug.Debugger;
3
- export declare const error: debug.Debugger;
4
- export declare function createLogger(namespace: string, isError?: boolean): debug.Debugger;
5
- export declare const logBlue: (...args: any) => void;
6
- export declare const logPink: (...args: any) => void;
7
- export declare const logGray: (...args: any) => void;
8
- export declare const logGreen: (...args: any) => void;
9
- export declare const logRed: (...args: any) => void;
10
- export declare const errorRed: (...args: any) => void;
11
- export declare const log: (...args: any) => void;
12
- export declare const logTable: (...args: any) => void;
13
- //# sourceMappingURL=logger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../logger.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B,eAAO,MAAM,MAAM,gBAAsB,CAAC;AAC1C,eAAO,MAAM,KAAK,gBAAiC,CAAC;AAEpD,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,UAAQ,kBAE9D;AAoBD,eAAO,MAAM,OAAO,YAAa,GAAG,SAAqC,CAAC;AAC1E,eAAO,MAAM,OAAO,YAAa,GAAG,SACO,CAAC;AAC5C,eAAO,MAAM,OAAO,YAAa,GAAG,SAAqC,CAAC;AAC1E,eAAO,MAAM,QAAQ,YAAa,GAAG,SAAsC,CAAC;AAC5E,eAAO,MAAM,MAAM,YAAa,GAAG,SAAoC,CAAC;AACxE,eAAO,MAAM,QAAQ,YAAa,GAAG,SAAsC,CAAC;AAC5E,eAAO,MAAM,GAAG,YAAa,GAAG,SAAyB,CAAC;AAC1D,eAAO,MAAM,QAAQ,YAAa,GAAG,SAA2B,CAAC"}
package/dist/logger.js DELETED
@@ -1,44 +0,0 @@
1
- // This file isn't in the src dir so it it's imported before others after import sort
2
- // See bigint hack below and https://github.com/trivago/prettier-plugin-sort-imports/issues/112
3
- import chalk from 'chalk';
4
- import debug from 'debug';
5
- // Workaround for bug in bigint-buffer which solana-web3.js depends on
6
- // https://github.com/no2chem/bigint-buffer/issues/31#issuecomment-1752134062
7
- const defaultWarn = console.warn;
8
- console.warn = (...args) => {
9
- if (args &&
10
- typeof args[0] === 'string' &&
11
- args[0]?.includes('bigint: Failed to load bindings'))
12
- return;
13
- defaultWarn(...args);
14
- };
15
- const HYPERLANE_NS = 'hyperlane';
16
- // Default root logger for use in utils/scripts
17
- export const logger = debug(HYPERLANE_NS);
18
- export const error = debug(`${HYPERLANE_NS}:ERROR`);
19
- export function createLogger(namespace, isError = false) {
20
- return isError ? error.extend(namespace) : logger.extend(namespace);
21
- }
22
- // Ensure hyperlane logging is enabled by forcing inclusion of hyperlane namespace
23
- const activeNamespaces = debug.disable();
24
- const otherNamespaces = activeNamespaces
25
- .split(',')
26
- .filter((ns) => ns.includes(HYPERLANE_NS));
27
- const hypNamespaces = `${HYPERLANE_NS},${HYPERLANE_NS}:*`;
28
- debug.enable(otherNamespaces ? `${otherNamespaces},${hypNamespaces}` : `${hypNamespaces}`);
29
- // Change Debug's output format to remove prefixes + postfixes
30
- function formatArgs(args) {
31
- args.push(debug.humanize(this.diff));
32
- args.pop();
33
- }
34
- debug.formatArgs = formatArgs;
35
- // Colored logs directly to console
36
- export const logBlue = (...args) => console.log(chalk.blue(...args));
37
- export const logPink = (...args) => console.log(chalk.magentaBright(...args));
38
- export const logGray = (...args) => console.log(chalk.gray(...args));
39
- export const logGreen = (...args) => console.log(chalk.green(...args));
40
- export const logRed = (...args) => console.log(chalk.red(...args));
41
- export const errorRed = (...args) => console.error(chalk.red(...args));
42
- export const log = (...args) => console.log(...args);
43
- export const logTable = (...args) => console.table(...args);
44
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../logger.ts"],"names":[],"mappings":"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"}
@@ -1,3 +0,0 @@
1
- import { HyperlaneContractsMap } from '@hyperlane-xyz/sdk';
2
- export declare function readDeploymentArtifacts(filePath: string): HyperlaneContractsMap<any>;
3
- //# sourceMappingURL=artifacts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/config/artifacts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAW3D,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,8BAmBvD"}
@@ -1,18 +0,0 @@
1
- import { z } from 'zod';
2
- import { logBlue } from '../../logger.js';
3
- import { readYamlOrJson } from '../utils/files.js';
4
- const RecursiveObjectSchema = z.lazy(() => z.object({}).catchall(z.union([z.string(), RecursiveObjectSchema])));
5
- const DeploymentArtifactsSchema = z.object({}).catchall(RecursiveObjectSchema);
6
- export function readDeploymentArtifacts(filePath) {
7
- const artifacts = readYamlOrJson(filePath);
8
- if (!artifacts)
9
- throw new Error(`No artifacts found at ${filePath}`);
10
- const result = DeploymentArtifactsSchema.safeParse(artifacts);
11
- if (!result.success) {
12
- const firstIssue = result.error.issues[0];
13
- logBlue(`Read deployment artifacts from ${JSON.stringify(result.error.issues, null, 4)}`);
14
- throw new Error(`Invalid artifacts: ${firstIssue.path} => ${firstIssue.message}`);
15
- }
16
- return artifacts;
17
- }
18
- //# sourceMappingURL=artifacts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../src/config/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,CAAC,EAAE,MAAM,KAAK,CAAC;AAIpC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,qBAAqB,GAAe,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACpD,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,qBAAqB,CAAC,CAAC,CAAC,CACpE,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAE/E,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,MAAM,SAAS,GAAG,cAAc,CAA6B,QAAQ,CAAC,CAAC;IAEvE,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;QACnB,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC1C,OAAO,CACL,kCAAkC,IAAI,CAAC,SAAS,CAC9C,MAAM,CAAC,KAAK,CAAC,MAAM,EACnB,IAAI,EACJ,CAAC,CACF,EAAE,CACJ,CAAC;QACF,MAAM,IAAI,KAAK,CACb,sBAAsB,UAAU,CAAC,IAAI,OAAO,UAAU,CAAC,OAAO,EAAE,CACjE,CAAC;KACH;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}