@hyperlane-xyz/core 1.2.3 → 1.3.0

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 (524) hide show
  1. package/contracts/HyperlaneConnectionClient.sol +5 -4
  2. package/contracts/Mailbox.sol +3 -41
  3. package/contracts/OwnableMulticall.sol +11 -11
  4. package/contracts/Router.sol +4 -4
  5. package/contracts/ValidatorAnnounce.sol +2 -2
  6. package/contracts/igps/InterchainGasPaymaster.sol +2 -2
  7. package/contracts/igps/OverheadIgp.sol +1 -1
  8. package/contracts/igps/gas-oracles/StorageGasOracle.sol +1 -1
  9. package/contracts/interfaces/IAggregationIsm.sol +19 -0
  10. package/contracts/interfaces/IHyperlaneConnectionClient.sol +20 -0
  11. package/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol +8 -0
  12. package/contracts/interfaces/IMailbox.sol +71 -0
  13. package/contracts/interfaces/IRouter.sol +15 -0
  14. package/{interfaces → contracts/interfaces/isms}/IMultisigIsm.sol +1 -1
  15. package/contracts/interfaces/middleware/IInterchainAccountRouter.sol +50 -0
  16. package/contracts/interfaces/middleware/IInterchainQueryRouter.sol +18 -0
  17. package/contracts/isms/aggregation/AbstractAggregationIsm.sol +72 -0
  18. package/contracts/isms/aggregation/StaticAggregationIsm.sol +33 -0
  19. package/contracts/isms/aggregation/StaticAggregationIsmFactory.sol +16 -0
  20. package/contracts/isms/multisig/AbstractMultisigIsm.sol +124 -0
  21. package/contracts/isms/{MultisigIsm.sol → multisig/LegacyMultisigIsm.sol} +19 -60
  22. package/contracts/isms/multisig/StaticMultisigIsm.sol +33 -0
  23. package/contracts/isms/multisig/StaticMultisigIsmFactory.sol +16 -0
  24. package/contracts/libs/Call.sol +12 -10
  25. package/contracts/libs/CheckpointLib.sol +54 -0
  26. package/contracts/libs/MetaProxy.sol +40 -0
  27. package/contracts/libs/StaticMOfNAddressSetFactory.sol +98 -0
  28. package/contracts/libs/TypeCasts.sol +0 -20
  29. package/contracts/libs/isms/AggregationIsmMetadata.sol +72 -0
  30. package/contracts/libs/{MultisigIsmMetadata.sol → isms/LegacyMultisigIsmMetadata.sol} +1 -1
  31. package/contracts/libs/isms/MultisigIsmMetadata.sol +91 -0
  32. package/contracts/libs/middleware/InterchainAccountMessage.sol +86 -0
  33. package/contracts/libs/middleware/InterchainQueryMessage.sol +125 -0
  34. package/contracts/middleware/InterchainAccountRouter.sol +448 -94
  35. package/contracts/middleware/InterchainQueryRouter.sol +50 -27
  36. package/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol +2 -2
  37. package/contracts/mock/MockMailbox.sol +1 -1
  38. package/contracts/test/TestHyperlaneConnectionClient.sol +5 -1
  39. package/contracts/test/TestIsm.sol +1 -1
  40. package/contracts/test/TestLegacyMultisigIsm.sol +16 -0
  41. package/contracts/test/TestLiquidityLayerMessageRecipient.sol +1 -1
  42. package/contracts/test/TestMailbox.sol +1 -1
  43. package/contracts/test/TestQuerySender.sol +2 -2
  44. package/contracts/test/TestRecipient.sol +9 -6
  45. package/contracts/test/TestSendReceiver.sol +3 -3
  46. package/contracts/test/TestTokenRecipient.sol +1 -1
  47. package/contracts/test/bad-recipient/BadRecipient1.sol +1 -1
  48. package/contracts/test/bad-recipient/BadRecipient3.sol +1 -1
  49. package/contracts/test/bad-recipient/BadRecipient5.sol +1 -1
  50. package/contracts/test/bad-recipient/BadRecipient6.sol +1 -1
  51. package/dist/contracts/GasRouter.d.ts +2 -2
  52. package/dist/contracts/GasRouter.d.ts.map +1 -1
  53. package/dist/contracts/OwnableMulticall.d.ts +16 -94
  54. package/dist/contracts/OwnableMulticall.d.ts.map +1 -1
  55. package/dist/contracts/Router.d.ts +2 -2
  56. package/dist/contracts/Router.d.ts.map +1 -1
  57. package/dist/contracts/index.d.ts +4 -0
  58. package/dist/contracts/index.d.ts.map +1 -1
  59. package/dist/contracts/interfaces/IAggregationIsm.d.ts +76 -0
  60. package/dist/contracts/interfaces/IAggregationIsm.d.ts.map +1 -0
  61. package/dist/contracts/{test/TestMultisigIsm.js → interfaces/IAggregationIsm.js} +1 -1
  62. package/dist/contracts/interfaces/IAggregationIsm.js.map +1 -0
  63. package/dist/{interfaces → contracts/interfaces}/IGasOracle.d.ts +1 -1
  64. package/dist/contracts/interfaces/IGasOracle.d.ts.map +1 -0
  65. package/dist/contracts/interfaces/IGasOracle.js.map +1 -0
  66. package/dist/contracts/interfaces/IHyperlaneConnectionClient.d.ts +107 -0
  67. package/dist/contracts/interfaces/IHyperlaneConnectionClient.d.ts.map +1 -0
  68. package/dist/contracts/interfaces/IHyperlaneConnectionClient.js +4 -0
  69. package/dist/contracts/interfaces/IHyperlaneConnectionClient.js.map +1 -0
  70. package/dist/{interfaces → contracts/interfaces}/IInterchainGasPaymaster.d.ts +1 -1
  71. package/dist/contracts/interfaces/IInterchainGasPaymaster.d.ts.map +1 -0
  72. package/dist/contracts/interfaces/IInterchainGasPaymaster.js.map +1 -0
  73. package/dist/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts +1 -1
  74. package/dist/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -0
  75. package/dist/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -0
  76. package/dist/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +1 -1
  77. package/dist/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -0
  78. package/dist/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -0
  79. package/dist/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
  80. package/dist/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
  81. package/dist/{interfaces → contracts/interfaces}/ILiquidityLayerMessageRecipient.d.ts +1 -1
  82. package/dist/contracts/interfaces/ILiquidityLayerMessageRecipient.d.ts.map +1 -0
  83. package/dist/contracts/interfaces/ILiquidityLayerMessageRecipient.js.map +1 -0
  84. package/dist/{interfaces → contracts/interfaces}/ILiquidityLayerRouter.d.ts +1 -1
  85. package/dist/contracts/interfaces/ILiquidityLayerRouter.d.ts.map +1 -0
  86. package/dist/contracts/interfaces/ILiquidityLayerRouter.js.map +1 -0
  87. package/dist/{interfaces → contracts/interfaces}/IMailbox.d.ts +73 -5
  88. package/dist/contracts/interfaces/IMailbox.d.ts.map +1 -0
  89. package/dist/contracts/interfaces/IMailbox.js.map +1 -0
  90. package/dist/{interfaces → contracts/interfaces}/IMessageRecipient.d.ts +1 -1
  91. package/dist/contracts/interfaces/IMessageRecipient.d.ts.map +1 -0
  92. package/dist/contracts/interfaces/IMessageRecipient.js.map +1 -0
  93. package/dist/contracts/interfaces/IRouter.d.ts +83 -0
  94. package/dist/contracts/interfaces/IRouter.d.ts.map +1 -0
  95. package/dist/contracts/{isms/MultisigIsm.js → interfaces/IRouter.js} +1 -1
  96. package/dist/contracts/interfaces/IRouter.js.map +1 -0
  97. package/dist/{interfaces → contracts/interfaces}/IValidatorAnnounce.d.ts +1 -1
  98. package/dist/contracts/interfaces/IValidatorAnnounce.d.ts.map +1 -0
  99. package/dist/contracts/interfaces/IValidatorAnnounce.js.map +1 -0
  100. package/dist/{interfaces → contracts/interfaces}/index.d.ts +7 -3
  101. package/dist/contracts/interfaces/index.d.ts.map +1 -0
  102. package/dist/contracts/interfaces/index.js.map +1 -0
  103. package/dist/{interfaces → contracts/interfaces/isms}/IMultisigIsm.d.ts +1 -1
  104. package/dist/contracts/interfaces/isms/IMultisigIsm.d.ts.map +1 -0
  105. package/dist/contracts/interfaces/isms/IMultisigIsm.js.map +1 -0
  106. package/dist/contracts/interfaces/isms/index.d.ts +2 -0
  107. package/dist/contracts/interfaces/isms/index.d.ts.map +1 -0
  108. package/dist/contracts/interfaces/isms/index.js +3 -0
  109. package/dist/contracts/interfaces/isms/index.js.map +1 -0
  110. package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.d.ts +127 -0
  111. package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.d.ts.map +1 -0
  112. package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.js.map +1 -0
  113. package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.d.ts +88 -0
  114. package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.d.ts.map +1 -0
  115. package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.js.map +1 -0
  116. package/dist/contracts/interfaces/middleware/index.d.ts +3 -0
  117. package/dist/contracts/interfaces/middleware/index.d.ts.map +1 -0
  118. package/dist/contracts/interfaces/middleware/index.js +3 -0
  119. package/dist/contracts/interfaces/middleware/index.js.map +1 -0
  120. package/dist/contracts/isms/aggregation/AbstractAggregationIsm.d.ts +67 -0
  121. package/dist/contracts/isms/aggregation/AbstractAggregationIsm.d.ts.map +1 -0
  122. package/dist/contracts/isms/aggregation/AbstractAggregationIsm.js +4 -0
  123. package/dist/contracts/isms/aggregation/AbstractAggregationIsm.js.map +1 -0
  124. package/dist/contracts/isms/aggregation/StaticAggregationIsm.d.ts +67 -0
  125. package/dist/contracts/isms/aggregation/StaticAggregationIsm.d.ts.map +1 -0
  126. package/dist/contracts/isms/aggregation/StaticAggregationIsm.js +4 -0
  127. package/dist/contracts/isms/aggregation/StaticAggregationIsm.js.map +1 -0
  128. package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.d.ts +59 -0
  129. package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.d.ts.map +1 -0
  130. package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.js +4 -0
  131. package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.js.map +1 -0
  132. package/dist/contracts/isms/aggregation/index.d.ts +4 -0
  133. package/dist/contracts/isms/aggregation/index.d.ts.map +1 -0
  134. package/dist/contracts/isms/aggregation/index.js +3 -0
  135. package/dist/contracts/isms/aggregation/index.js.map +1 -0
  136. package/dist/contracts/isms/index.d.ts +4 -1
  137. package/dist/contracts/isms/index.d.ts.map +1 -1
  138. package/dist/contracts/isms/index.js +1 -0
  139. package/dist/contracts/isms/index.js.map +1 -1
  140. package/dist/contracts/isms/multisig/AbstractMultisigIsm.d.ts +59 -0
  141. package/dist/contracts/isms/multisig/AbstractMultisigIsm.d.ts.map +1 -0
  142. package/dist/contracts/isms/multisig/AbstractMultisigIsm.js +4 -0
  143. package/dist/contracts/isms/multisig/AbstractMultisigIsm.js.map +1 -0
  144. package/dist/contracts/isms/{MultisigIsm.d.ts → multisig/LegacyMultisigIsm.d.ts} +5 -5
  145. package/dist/contracts/isms/multisig/LegacyMultisigIsm.d.ts.map +1 -0
  146. package/dist/contracts/isms/multisig/LegacyMultisigIsm.js +4 -0
  147. package/dist/contracts/isms/multisig/LegacyMultisigIsm.js.map +1 -0
  148. package/dist/contracts/isms/multisig/StaticMultisigIsm.d.ts +59 -0
  149. package/dist/contracts/isms/multisig/StaticMultisigIsm.d.ts.map +1 -0
  150. package/dist/contracts/isms/multisig/StaticMultisigIsm.js +4 -0
  151. package/dist/contracts/isms/multisig/StaticMultisigIsm.js.map +1 -0
  152. package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.d.ts +59 -0
  153. package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.d.ts.map +1 -0
  154. package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.js +4 -0
  155. package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.js.map +1 -0
  156. package/dist/contracts/isms/multisig/index.d.ts +5 -0
  157. package/dist/contracts/isms/multisig/index.d.ts.map +1 -0
  158. package/dist/contracts/isms/multisig/index.js +3 -0
  159. package/dist/contracts/isms/multisig/index.js.map +1 -0
  160. package/dist/contracts/libs/StaticMOfNAddressSetFactory.d.ts +59 -0
  161. package/dist/contracts/libs/StaticMOfNAddressSetFactory.d.ts.map +1 -0
  162. package/dist/contracts/libs/StaticMOfNAddressSetFactory.js +4 -0
  163. package/dist/contracts/libs/StaticMOfNAddressSetFactory.js.map +1 -0
  164. package/dist/contracts/libs/index.d.ts +2 -0
  165. package/dist/contracts/libs/index.d.ts.map +1 -0
  166. package/dist/contracts/libs/index.js +3 -0
  167. package/dist/contracts/libs/index.js.map +1 -0
  168. package/dist/contracts/middleware/InterchainAccountRouter.d.ts +170 -72
  169. package/dist/contracts/middleware/InterchainAccountRouter.d.ts.map +1 -1
  170. package/dist/contracts/middleware/InterchainQueryRouter.d.ts +32 -16
  171. package/dist/contracts/middleware/InterchainQueryRouter.d.ts.map +1 -1
  172. package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.d.ts +2 -2
  173. package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.d.ts.map +1 -1
  174. package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.d.ts +2 -2
  175. package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.d.ts.map +1 -1
  176. package/dist/contracts/middleware/liquidity-layer/adapters/PortalAdapter.d.ts +2 -2
  177. package/dist/contracts/middleware/liquidity-layer/adapters/PortalAdapter.d.ts.map +1 -1
  178. package/dist/contracts/test/LightTestRecipient.d.ts +54 -1
  179. package/dist/contracts/test/LightTestRecipient.d.ts.map +1 -1
  180. package/dist/contracts/test/TestGasRouter.d.ts +2 -2
  181. package/dist/contracts/test/TestGasRouter.d.ts.map +1 -1
  182. package/dist/contracts/test/{TestMultisigIsm.d.ts → TestLegacyMultisigIsm.d.ts} +5 -13
  183. package/dist/contracts/test/TestLegacyMultisigIsm.d.ts.map +1 -0
  184. package/dist/contracts/test/TestLegacyMultisigIsm.js +4 -0
  185. package/dist/contracts/test/TestLegacyMultisigIsm.js.map +1 -0
  186. package/dist/contracts/test/TestRecipient.d.ts +54 -1
  187. package/dist/contracts/test/TestRecipient.d.ts.map +1 -1
  188. package/dist/contracts/test/TestRouter.d.ts +2 -2
  189. package/dist/contracts/test/TestRouter.d.ts.map +1 -1
  190. package/dist/contracts/test/index.d.ts +1 -1
  191. package/dist/contracts/test/index.d.ts.map +1 -1
  192. package/dist/factories/contracts/GasRouter__factory.js +1 -1
  193. package/dist/factories/contracts/GasRouter__factory.js.map +1 -1
  194. package/dist/factories/contracts/Mailbox__factory.d.ts +1 -1
  195. package/dist/factories/contracts/Mailbox__factory.js +1 -1
  196. package/dist/factories/contracts/OwnableMulticall__factory.d.ts +10 -43
  197. package/dist/factories/contracts/OwnableMulticall__factory.d.ts.map +1 -1
  198. package/dist/factories/contracts/OwnableMulticall__factory.js +20 -80
  199. package/dist/factories/contracts/OwnableMulticall__factory.js.map +1 -1
  200. package/dist/factories/contracts/Router__factory.js +1 -1
  201. package/dist/factories/contracts/Router__factory.js.map +1 -1
  202. package/dist/factories/contracts/ValidatorAnnounce__factory.d.ts +1 -1
  203. package/dist/factories/contracts/ValidatorAnnounce__factory.js +1 -1
  204. package/dist/factories/contracts/igps/InterchainGasPaymaster__factory.d.ts +1 -1
  205. package/dist/factories/contracts/igps/InterchainGasPaymaster__factory.js +1 -1
  206. package/dist/factories/contracts/igps/OverheadIgp__factory.d.ts +1 -1
  207. package/dist/factories/contracts/igps/OverheadIgp__factory.js +1 -1
  208. package/dist/factories/contracts/igps/gas-oracles/StorageGasOracle__factory.d.ts +1 -1
  209. package/dist/factories/contracts/igps/gas-oracles/StorageGasOracle__factory.js +1 -1
  210. package/dist/factories/contracts/index.d.ts +2 -0
  211. package/dist/factories/contracts/index.d.ts.map +1 -1
  212. package/dist/factories/contracts/index.js +3 -1
  213. package/dist/factories/contracts/index.js.map +1 -1
  214. package/dist/factories/contracts/interfaces/IAggregationIsm__factory.d.ts +23 -0
  215. package/dist/factories/contracts/interfaces/IAggregationIsm__factory.d.ts.map +1 -0
  216. package/dist/factories/contracts/interfaces/IAggregationIsm__factory.js +79 -0
  217. package/dist/factories/contracts/interfaces/IAggregationIsm__factory.js.map +1 -0
  218. package/dist/factories/{interfaces → contracts/interfaces}/IGasOracle__factory.d.ts +1 -1
  219. package/dist/factories/contracts/interfaces/IGasOracle__factory.d.ts.map +1 -0
  220. package/dist/factories/contracts/interfaces/IGasOracle__factory.js.map +1 -0
  221. package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts +29 -0
  222. package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts.map +1 -0
  223. package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.js +96 -0
  224. package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.js.map +1 -0
  225. package/dist/factories/{interfaces → contracts/interfaces}/IInterchainGasPaymaster__factory.d.ts +1 -1
  226. package/dist/factories/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts.map +1 -0
  227. package/dist/factories/contracts/interfaces/IInterchainGasPaymaster__factory.js.map +1 -0
  228. package/dist/factories/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts +1 -1
  229. package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -0
  230. package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -0
  231. package/dist/factories/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +1 -1
  232. package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -0
  233. package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -0
  234. package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
  235. package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
  236. package/dist/factories/{interfaces → contracts/interfaces}/ILiquidityLayerMessageRecipient__factory.d.ts +1 -1
  237. package/dist/factories/contracts/interfaces/ILiquidityLayerMessageRecipient__factory.d.ts.map +1 -0
  238. package/dist/factories/contracts/interfaces/ILiquidityLayerMessageRecipient__factory.js.map +1 -0
  239. package/dist/factories/{interfaces → contracts/interfaces}/ILiquidityLayerRouter__factory.d.ts +1 -1
  240. package/dist/factories/contracts/interfaces/ILiquidityLayerRouter__factory.d.ts.map +1 -0
  241. package/dist/factories/contracts/interfaces/ILiquidityLayerRouter__factory.js.map +1 -0
  242. package/dist/factories/contracts/interfaces/IMailbox__factory.d.ts +36 -0
  243. package/dist/factories/contracts/interfaces/IMailbox__factory.d.ts.map +1 -0
  244. package/dist/factories/{interfaces → contracts/interfaces}/IMailbox__factory.js +114 -0
  245. package/dist/factories/contracts/interfaces/IMailbox__factory.js.map +1 -0
  246. package/dist/factories/{interfaces → contracts/interfaces}/IMessageRecipient__factory.d.ts +1 -1
  247. package/dist/factories/contracts/interfaces/IMessageRecipient__factory.d.ts.map +1 -0
  248. package/dist/factories/contracts/interfaces/IMessageRecipient__factory.js.map +1 -0
  249. package/dist/factories/{interfaces/IMailbox__factory.d.ts → contracts/interfaces/IRouter__factory.d.ts} +5 -5
  250. package/dist/factories/contracts/interfaces/IRouter__factory.d.ts.map +1 -0
  251. package/dist/factories/contracts/interfaces/IRouter__factory.js +86 -0
  252. package/dist/factories/contracts/interfaces/IRouter__factory.js.map +1 -0
  253. package/dist/factories/{interfaces → contracts/interfaces}/IValidatorAnnounce__factory.d.ts +1 -1
  254. package/dist/factories/contracts/interfaces/IValidatorAnnounce__factory.d.ts.map +1 -0
  255. package/dist/factories/contracts/interfaces/IValidatorAnnounce__factory.js.map +1 -0
  256. package/dist/factories/{interfaces → contracts/interfaces}/index.d.ts +5 -3
  257. package/dist/factories/contracts/interfaces/index.d.ts.map +1 -0
  258. package/dist/factories/{interfaces → contracts/interfaces}/index.js +9 -7
  259. package/dist/factories/contracts/interfaces/index.js.map +1 -0
  260. package/dist/factories/{interfaces → contracts/interfaces/isms}/IMultisigIsm__factory.d.ts +1 -1
  261. package/dist/factories/contracts/interfaces/isms/IMultisigIsm__factory.d.ts.map +1 -0
  262. package/dist/factories/contracts/interfaces/isms/IMultisigIsm__factory.js.map +1 -0
  263. package/dist/factories/contracts/interfaces/isms/index.d.ts +2 -0
  264. package/dist/factories/contracts/interfaces/isms/index.d.ts.map +1 -0
  265. package/dist/factories/contracts/interfaces/isms/index.js +9 -0
  266. package/dist/factories/contracts/interfaces/isms/index.js.map +1 -0
  267. package/dist/factories/{interfaces → contracts/interfaces/middleware}/IInterchainAccountRouter__factory.d.ts +3 -13
  268. package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.d.ts.map +1 -0
  269. package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.js +265 -0
  270. package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.js.map +1 -0
  271. package/dist/factories/{interfaces → contracts/interfaces/middleware}/IInterchainQueryRouter__factory.d.ts +1 -1
  272. package/dist/factories/contracts/interfaces/middleware/IInterchainQueryRouter__factory.d.ts.map +1 -0
  273. package/dist/factories/{interfaces → contracts/interfaces/middleware}/IInterchainQueryRouter__factory.js +35 -1
  274. package/dist/factories/contracts/interfaces/middleware/IInterchainQueryRouter__factory.js.map +1 -0
  275. package/dist/factories/contracts/interfaces/middleware/index.d.ts +3 -0
  276. package/dist/factories/contracts/interfaces/middleware/index.d.ts.map +1 -0
  277. package/dist/factories/contracts/interfaces/middleware/index.js +11 -0
  278. package/dist/factories/contracts/interfaces/middleware/index.js.map +1 -0
  279. package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.d.ts +23 -0
  280. package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.d.ts.map +1 -0
  281. package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.js +79 -0
  282. package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.js.map +1 -0
  283. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.d.ts +35 -0
  284. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.d.ts.map +1 -0
  285. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.js +89 -0
  286. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.js.map +1 -0
  287. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.d.ts +35 -0
  288. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.d.ts.map +1 -0
  289. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.js +102 -0
  290. package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.js.map +1 -0
  291. package/dist/factories/contracts/isms/aggregation/index.d.ts +4 -0
  292. package/dist/factories/contracts/isms/aggregation/index.d.ts.map +1 -0
  293. package/dist/factories/contracts/isms/aggregation/index.js +13 -0
  294. package/dist/factories/contracts/isms/aggregation/index.js.map +1 -0
  295. package/dist/factories/contracts/isms/index.d.ts +2 -1
  296. package/dist/factories/contracts/isms/index.d.ts.map +1 -1
  297. package/dist/factories/contracts/isms/index.js +26 -3
  298. package/dist/factories/contracts/isms/index.js.map +1 -1
  299. package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.d.ts +23 -0
  300. package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.d.ts.map +1 -0
  301. package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.js +79 -0
  302. package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.js.map +1 -0
  303. package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.d.ts +55 -0
  304. package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.d.ts.map +1 -0
  305. package/dist/factories/contracts/isms/{MultisigIsm__factory.js → multisig/LegacyMultisigIsm__factory.js} +7 -7
  306. package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.js.map +1 -0
  307. package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.d.ts +35 -0
  308. package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.d.ts.map +1 -0
  309. package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.js +89 -0
  310. package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.js.map +1 -0
  311. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.d.ts +35 -0
  312. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.d.ts.map +1 -0
  313. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.js +102 -0
  314. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.js.map +1 -0
  315. package/dist/factories/contracts/isms/multisig/index.d.ts +5 -0
  316. package/dist/factories/contracts/isms/multisig/index.d.ts.map +1 -0
  317. package/dist/factories/contracts/isms/multisig/index.js +15 -0
  318. package/dist/factories/contracts/isms/multisig/index.js.map +1 -0
  319. package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.d.ts +23 -0
  320. package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.d.ts.map +1 -0
  321. package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.js +66 -0
  322. package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.js.map +1 -0
  323. package/dist/factories/contracts/libs/index.d.ts +2 -0
  324. package/dist/factories/contracts/libs/index.d.ts.map +1 -0
  325. package/dist/factories/contracts/libs/index.js +9 -0
  326. package/dist/factories/contracts/libs/index.js.map +1 -0
  327. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts +11 -17
  328. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts.map +1 -1
  329. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js +319 -39
  330. package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js.map +1 -1
  331. package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts +1 -1
  332. package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts.map +1 -1
  333. package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js +39 -5
  334. package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js.map +1 -1
  335. package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts +1 -1
  336. package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts.map +1 -1
  337. package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js +2 -2
  338. package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js.map +1 -1
  339. package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts +1 -1
  340. package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts.map +1 -1
  341. package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js +2 -2
  342. package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js.map +1 -1
  343. package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.d.ts +1 -1
  344. package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.d.ts.map +1 -1
  345. package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.js +2 -2
  346. package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.js.map +1 -1
  347. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts +1 -1
  348. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts.map +1 -1
  349. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js +1 -1
  350. package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js.map +1 -1
  351. package/dist/factories/contracts/mock/MockMailbox__factory.d.ts +1 -1
  352. package/dist/factories/contracts/mock/MockMailbox__factory.js +1 -1
  353. package/dist/factories/contracts/mock/MockPortalBridge__factory.d.ts +1 -1
  354. package/dist/factories/contracts/mock/MockPortalBridge__factory.js +1 -1
  355. package/dist/factories/contracts/test/LightTestRecipient__factory.d.ts +1 -1
  356. package/dist/factories/contracts/test/LightTestRecipient__factory.d.ts.map +1 -1
  357. package/dist/factories/contracts/test/LightTestRecipient__factory.js +53 -1
  358. package/dist/factories/contracts/test/LightTestRecipient__factory.js.map +1 -1
  359. package/dist/factories/contracts/test/TestGasRouter__factory.d.ts +1 -1
  360. package/dist/factories/contracts/test/TestGasRouter__factory.d.ts.map +1 -1
  361. package/dist/factories/contracts/test/TestGasRouter__factory.js +2 -2
  362. package/dist/factories/contracts/test/TestGasRouter__factory.js.map +1 -1
  363. package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts +9 -2
  364. package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts.map +1 -1
  365. package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js +6 -1
  366. package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js.map +1 -1
  367. package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.d.ts +1 -1
  368. package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.js +1 -1
  369. package/dist/factories/contracts/test/TestIsm__factory.d.ts +1 -1
  370. package/dist/factories/contracts/test/TestIsm__factory.js +1 -1
  371. package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.d.ts +48 -0
  372. package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.d.ts.map +1 -0
  373. package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.js +456 -0
  374. package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.js.map +1 -0
  375. package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.d.ts +1 -1
  376. package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.js +1 -1
  377. package/dist/factories/contracts/test/TestMailbox__factory.d.ts +1 -1
  378. package/dist/factories/contracts/test/TestMailbox__factory.js +1 -1
  379. package/dist/factories/contracts/test/TestMessage__factory.d.ts +1 -1
  380. package/dist/factories/contracts/test/TestMessage__factory.js +1 -1
  381. package/dist/factories/contracts/test/TestQuerySender__factory.d.ts +1 -1
  382. package/dist/factories/contracts/test/TestQuerySender__factory.js +1 -1
  383. package/dist/factories/contracts/test/TestQuery__factory.d.ts +1 -1
  384. package/dist/factories/contracts/test/TestQuery__factory.js +1 -1
  385. package/dist/factories/contracts/test/TestRecipient__factory.d.ts +1 -1
  386. package/dist/factories/contracts/test/TestRecipient__factory.d.ts.map +1 -1
  387. package/dist/factories/contracts/test/TestRecipient__factory.js +53 -1
  388. package/dist/factories/contracts/test/TestRecipient__factory.js.map +1 -1
  389. package/dist/factories/contracts/test/TestRouter__factory.d.ts +1 -1
  390. package/dist/factories/contracts/test/TestRouter__factory.d.ts.map +1 -1
  391. package/dist/factories/contracts/test/TestRouter__factory.js +2 -2
  392. package/dist/factories/contracts/test/TestRouter__factory.js.map +1 -1
  393. package/dist/factories/contracts/test/TestSendReceiver__factory.d.ts +1 -1
  394. package/dist/factories/contracts/test/TestSendReceiver__factory.js +1 -1
  395. package/dist/factories/contracts/test/TestTokenRecipient__factory.d.ts +1 -1
  396. package/dist/factories/contracts/test/TestTokenRecipient__factory.js +1 -1
  397. package/dist/factories/contracts/test/bad-recipient/BadRecipient1__factory.d.ts +1 -1
  398. package/dist/factories/contracts/test/bad-recipient/BadRecipient1__factory.js +1 -1
  399. package/dist/factories/contracts/test/bad-recipient/BadRecipient3__factory.d.ts +1 -1
  400. package/dist/factories/contracts/test/bad-recipient/BadRecipient3__factory.js +1 -1
  401. package/dist/factories/contracts/test/bad-recipient/BadRecipient5__factory.d.ts +1 -1
  402. package/dist/factories/contracts/test/bad-recipient/BadRecipient5__factory.js +1 -1
  403. package/dist/factories/contracts/test/bad-recipient/BadRecipient6__factory.d.ts +1 -1
  404. package/dist/factories/contracts/test/bad-recipient/BadRecipient6__factory.js +1 -1
  405. package/dist/factories/contracts/test/index.d.ts +1 -1
  406. package/dist/factories/contracts/test/index.d.ts.map +1 -1
  407. package/dist/factories/contracts/test/index.js +3 -3
  408. package/dist/factories/contracts/test/index.js.map +1 -1
  409. package/dist/factories/index.d.ts +0 -1
  410. package/dist/factories/index.d.ts.map +1 -1
  411. package/dist/factories/index.js +1 -2
  412. package/dist/factories/index.js.map +1 -1
  413. package/dist/index.d.ts +48 -30
  414. package/dist/index.d.ts.map +1 -1
  415. package/dist/index.js +50 -30
  416. package/dist/index.js.map +1 -1
  417. package/package.json +4 -4
  418. package/contracts/middleware/InterchainCallMessage.sol +0 -112
  419. package/contracts/test/TestMultisigIsm.sol +0 -23
  420. package/dist/contracts/isms/MultisigIsm.d.ts.map +0 -1
  421. package/dist/contracts/isms/MultisigIsm.js.map +0 -1
  422. package/dist/contracts/test/TestMultisigIsm.d.ts.map +0 -1
  423. package/dist/contracts/test/TestMultisigIsm.js.map +0 -1
  424. package/dist/factories/contracts/isms/MultisigIsm__factory.d.ts +0 -55
  425. package/dist/factories/contracts/isms/MultisigIsm__factory.d.ts.map +0 -1
  426. package/dist/factories/contracts/isms/MultisigIsm__factory.js.map +0 -1
  427. package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts +0 -48
  428. package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts.map +0 -1
  429. package/dist/factories/contracts/test/TestMultisigIsm__factory.js +0 -480
  430. package/dist/factories/contracts/test/TestMultisigIsm__factory.js.map +0 -1
  431. package/dist/factories/interfaces/IGasOracle__factory.d.ts.map +0 -1
  432. package/dist/factories/interfaces/IGasOracle__factory.js.map +0 -1
  433. package/dist/factories/interfaces/IInterchainAccountRouter__factory.d.ts.map +0 -1
  434. package/dist/factories/interfaces/IInterchainAccountRouter__factory.js +0 -114
  435. package/dist/factories/interfaces/IInterchainAccountRouter__factory.js.map +0 -1
  436. package/dist/factories/interfaces/IInterchainGasPaymaster__factory.d.ts.map +0 -1
  437. package/dist/factories/interfaces/IInterchainGasPaymaster__factory.js.map +0 -1
  438. package/dist/factories/interfaces/IInterchainQueryRouter__factory.d.ts.map +0 -1
  439. package/dist/factories/interfaces/IInterchainQueryRouter__factory.js.map +0 -1
  440. package/dist/factories/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +0 -1
  441. package/dist/factories/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +0 -1
  442. package/dist/factories/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +0 -1
  443. package/dist/factories/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +0 -1
  444. package/dist/factories/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +0 -1
  445. package/dist/factories/interfaces/IInterchainSecurityModule.sol/index.js.map +0 -1
  446. package/dist/factories/interfaces/ILiquidityLayerMessageRecipient__factory.d.ts.map +0 -1
  447. package/dist/factories/interfaces/ILiquidityLayerMessageRecipient__factory.js.map +0 -1
  448. package/dist/factories/interfaces/ILiquidityLayerRouter__factory.d.ts.map +0 -1
  449. package/dist/factories/interfaces/ILiquidityLayerRouter__factory.js.map +0 -1
  450. package/dist/factories/interfaces/IMailbox__factory.d.ts.map +0 -1
  451. package/dist/factories/interfaces/IMailbox__factory.js.map +0 -1
  452. package/dist/factories/interfaces/IMessageRecipient__factory.d.ts.map +0 -1
  453. package/dist/factories/interfaces/IMessageRecipient__factory.js.map +0 -1
  454. package/dist/factories/interfaces/IMultisigIsm__factory.d.ts.map +0 -1
  455. package/dist/factories/interfaces/IMultisigIsm__factory.js.map +0 -1
  456. package/dist/factories/interfaces/IValidatorAnnounce__factory.d.ts.map +0 -1
  457. package/dist/factories/interfaces/IValidatorAnnounce__factory.js.map +0 -1
  458. package/dist/factories/interfaces/index.d.ts.map +0 -1
  459. package/dist/factories/interfaces/index.js.map +0 -1
  460. package/dist/interfaces/IGasOracle.d.ts.map +0 -1
  461. package/dist/interfaces/IGasOracle.js.map +0 -1
  462. package/dist/interfaces/IInterchainAccountRouter.d.ts +0 -85
  463. package/dist/interfaces/IInterchainAccountRouter.d.ts.map +0 -1
  464. package/dist/interfaces/IInterchainAccountRouter.js.map +0 -1
  465. package/dist/interfaces/IInterchainGasPaymaster.d.ts.map +0 -1
  466. package/dist/interfaces/IInterchainGasPaymaster.js.map +0 -1
  467. package/dist/interfaces/IInterchainQueryRouter.d.ts +0 -72
  468. package/dist/interfaces/IInterchainQueryRouter.d.ts.map +0 -1
  469. package/dist/interfaces/IInterchainQueryRouter.js.map +0 -1
  470. package/dist/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +0 -1
  471. package/dist/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +0 -1
  472. package/dist/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +0 -1
  473. package/dist/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +0 -1
  474. package/dist/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +0 -1
  475. package/dist/interfaces/IInterchainSecurityModule.sol/index.js.map +0 -1
  476. package/dist/interfaces/ILiquidityLayerMessageRecipient.d.ts.map +0 -1
  477. package/dist/interfaces/ILiquidityLayerMessageRecipient.js.map +0 -1
  478. package/dist/interfaces/ILiquidityLayerRouter.d.ts.map +0 -1
  479. package/dist/interfaces/ILiquidityLayerRouter.js.map +0 -1
  480. package/dist/interfaces/IMailbox.d.ts.map +0 -1
  481. package/dist/interfaces/IMailbox.js.map +0 -1
  482. package/dist/interfaces/IMessageRecipient.d.ts.map +0 -1
  483. package/dist/interfaces/IMessageRecipient.js.map +0 -1
  484. package/dist/interfaces/IMultisigIsm.d.ts.map +0 -1
  485. package/dist/interfaces/IMultisigIsm.js.map +0 -1
  486. package/dist/interfaces/IValidatorAnnounce.d.ts.map +0 -1
  487. package/dist/interfaces/IValidatorAnnounce.js.map +0 -1
  488. package/dist/interfaces/index.d.ts.map +0 -1
  489. package/dist/interfaces/index.js.map +0 -1
  490. package/interfaces/IInterchainAccountRouter.sol +0 -20
  491. package/interfaces/IInterchainQueryRouter.sol +0 -11
  492. package/interfaces/IMailbox.sol +0 -28
  493. /package/{interfaces → contracts/interfaces}/IGasOracle.sol +0 -0
  494. /package/{interfaces → contracts/interfaces}/IInterchainGasPaymaster.sol +0 -0
  495. /package/{interfaces → contracts/interfaces}/ILiquidityLayerMessageRecipient.sol +0 -0
  496. /package/{interfaces → contracts/interfaces}/ILiquidityLayerRouter.sol +0 -0
  497. /package/{interfaces → contracts/interfaces}/IMessageRecipient.sol +0 -0
  498. /package/{interfaces → contracts/interfaces}/IValidatorAnnounce.sol +0 -0
  499. /package/dist/{interfaces → contracts/interfaces}/IGasOracle.js +0 -0
  500. /package/dist/{interfaces → contracts/interfaces}/IInterchainGasPaymaster.js +0 -0
  501. /package/dist/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +0 -0
  502. /package/dist/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +0 -0
  503. /package/dist/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/index.d.ts +0 -0
  504. /package/dist/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/index.js +0 -0
  505. /package/dist/{interfaces → contracts/interfaces}/ILiquidityLayerMessageRecipient.js +0 -0
  506. /package/dist/{interfaces → contracts/interfaces}/ILiquidityLayerRouter.js +0 -0
  507. /package/dist/{interfaces → contracts/interfaces}/IMailbox.js +0 -0
  508. /package/dist/{interfaces → contracts/interfaces}/IMessageRecipient.js +0 -0
  509. /package/dist/{interfaces → contracts/interfaces}/IValidatorAnnounce.js +0 -0
  510. /package/dist/{interfaces → contracts/interfaces}/index.js +0 -0
  511. /package/dist/{interfaces → contracts/interfaces/isms}/IMultisigIsm.js +0 -0
  512. /package/dist/{interfaces → contracts/interfaces/middleware}/IInterchainAccountRouter.js +0 -0
  513. /package/dist/{interfaces → contracts/interfaces/middleware}/IInterchainQueryRouter.js +0 -0
  514. /package/dist/factories/{interfaces → contracts/interfaces}/IGasOracle__factory.js +0 -0
  515. /package/dist/factories/{interfaces → contracts/interfaces}/IInterchainGasPaymaster__factory.js +0 -0
  516. /package/dist/factories/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +0 -0
  517. /package/dist/factories/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +0 -0
  518. /package/dist/factories/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/index.d.ts +0 -0
  519. /package/dist/factories/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol/index.js +0 -0
  520. /package/dist/factories/{interfaces → contracts/interfaces}/ILiquidityLayerMessageRecipient__factory.js +0 -0
  521. /package/dist/factories/{interfaces → contracts/interfaces}/ILiquidityLayerRouter__factory.js +0 -0
  522. /package/dist/factories/{interfaces → contracts/interfaces}/IMessageRecipient__factory.js +0 -0
  523. /package/dist/factories/{interfaces → contracts/interfaces}/IValidatorAnnounce__factory.js +0 -0
  524. /package/dist/factories/{interfaces → contracts/interfaces/isms}/IMultisigIsm__factory.js +0 -0
@@ -3,12 +3,14 @@ pragma solidity ^0.8.13;
3
3
 
4
4
  // ============ Internal Imports ============
5
5
  import {OwnableMulticall} from "../OwnableMulticall.sol";
6
- import {Router} from "../Router.sol";
7
- import {IInterchainAccountRouter} from "../../interfaces/IInterchainAccountRouter.sol";
8
- import {InterchainCallMessage} from "./InterchainCallMessage.sol";
6
+ import {HyperlaneConnectionClient} from "../HyperlaneConnectionClient.sol";
7
+ import {IRouter} from "../interfaces/IRouter.sol";
8
+ import {IInterchainAccountRouter} from "../interfaces/middleware/IInterchainAccountRouter.sol";
9
+ import {InterchainAccountMessage} from "../libs/middleware/InterchainAccountMessage.sol";
9
10
  import {MinimalProxy} from "../libs/MinimalProxy.sol";
10
11
  import {CallLib} from "../libs/Call.sol";
11
12
  import {TypeCasts} from "../libs/TypeCasts.sol";
13
+ import {EnumerableMapExtended} from "../libs/EnumerableMapExtended.sol";
12
14
 
13
15
  // ============ External Imports ============
14
16
  import {Create2} from "@openzeppelin/contracts/utils/Create2.sol";
@@ -16,44 +18,112 @@ import {Address} from "@openzeppelin/contracts/utils/Address.sol";
16
18
  import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
17
19
 
18
20
  /*
19
- * @title Interchain Accounts Router that relays messages via proxy contracts on other chains.
20
- * @dev Currently does not support Sovereign Consensus (user specified Interchain Security Modules).
21
+ * @title A contract that allows accounts on chain A to call contracts via a
22
+ * proxy contract on chain B.
21
23
  */
22
- contract InterchainAccountRouter is Router, IInterchainAccountRouter {
24
+ contract InterchainAccountRouter is
25
+ HyperlaneConnectionClient,
26
+ IRouter,
27
+ IInterchainAccountRouter
28
+ {
29
+ // ============ Libraries ============
30
+
23
31
  using TypeCasts for address;
24
32
  using TypeCasts for bytes32;
25
33
 
34
+ // ============ Constants ============
35
+
36
+ uint32 internal immutable localDomain;
26
37
  address internal immutable implementation;
27
38
  bytes32 internal immutable bytecodeHash;
28
39
 
40
+ // ============ Private Storage ============
41
+ uint32[] private _domains;
42
+
43
+ // ============ Public Storage ============
44
+ mapping(uint32 => bytes32) public routers;
45
+ mapping(uint32 => bytes32) public isms;
46
+
47
+ // ============ Upgrade Gap ============
48
+
49
+ // gap for upgrade safety
50
+ uint256[47] private __GAP;
51
+
52
+ // ============ Events ============
53
+
54
+ /**
55
+ * @notice Emitted when a default router is set for a remote domain
56
+ * @param domain The remote domain
57
+ * @param router The address of the remote router
58
+ */
59
+ event RemoteRouterEnrolled(uint32 indexed domain, bytes32 router);
60
+
61
+ /**
62
+ * @notice Emitted when a default ISM is set for a remote domain
63
+ * @param domain The remote domain
64
+ * @param ism The address of the remote ISM
65
+ */
66
+ event RemoteIsmEnrolled(uint32 indexed domain, bytes32 ism);
67
+
68
+ /**
69
+ * @notice Emitted when an interchain call is dispatched to a remote domain
70
+ * @param destination The destination domain on which to make the call
71
+ * @param owner The local owner of the remote ICA
72
+ * @param router The address of the remote router
73
+ * @param ism The address of the remote ISM
74
+ */
75
+ event RemoteCallDispatched(
76
+ uint32 indexed destination,
77
+ address indexed owner,
78
+ bytes32 router,
79
+ bytes32 ism
80
+ );
81
+
29
82
  /**
30
- * @notice Emitted when an interchain account is created (first time message is sent from a given `origin`/`sender` pair)
83
+ * @notice Emitted when an interchain account contract is deployed
31
84
  * @param origin The domain of the chain where the message was sent from
32
- * @param sender The address of the account that sent the message
85
+ * @param owner The address of the account that sent the message
86
+ * @param ism The address of the local ISM
33
87
  * @param account The address of the proxy account that was created
34
88
  */
35
89
  event InterchainAccountCreated(
36
90
  uint32 indexed origin,
37
- bytes32 sender,
91
+ bytes32 indexed owner,
92
+ address ism,
38
93
  address account
39
94
  );
40
95
 
96
+ // ============ Constructor ============
97
+
41
98
  /**
42
- * @notice Constructor deploys a relay (OwnableMulticall.sol) contract that will be cloned for each interchain account.
99
+ * @notice Constructor deploys a relay (OwnableMulticall.sol) contract that
100
+ * will be cloned for each interchain account.
101
+ * @param _localDomain The Hyperlane domain ID on which this contract is
102
+ * deployed.
103
+ * @param _proxy The address of a proxy contract that delegates calls to
104
+ * this contract. Used by OwnableMulticall for access control.
105
+ * @dev Set proxy to address(0) to use this contract without a proxy.
43
106
  */
44
- constructor() {
45
- implementation = address(new OwnableMulticall());
107
+ constructor(uint32 _localDomain, address _proxy) {
108
+ localDomain = _localDomain;
109
+ // TODO: always proxy and remove this sentinel
110
+ if (_proxy == address(0)) {
111
+ _proxy = address(this);
112
+ }
113
+ implementation = address(new OwnableMulticall(_proxy));
46
114
  // cannot be stored immutably because it is dynamically sized
47
- bytes memory bytecode = MinimalProxy.bytecode(implementation);
48
- bytecodeHash = keccak256(bytecode);
115
+ bytes memory _bytecode = MinimalProxy.bytecode(implementation);
116
+ bytecodeHash = keccak256(_bytecode);
49
117
  }
50
118
 
119
+ // ============ Initializers ============
120
+
51
121
  /**
52
- * @notice Initializes the Router contract with Hyperlane core contracts and the address of the interchain security module.
53
- * @param _mailbox The address of the mailbox contract.
54
- * @param _interchainGasPaymaster The address of the interchain gas paymaster contract.
55
- * @param _interchainSecurityModule The address of the interchain security module contract.
56
- * @param _owner The address with owner privileges.
122
+ * @notice Initializes the contract with HyperlaneConnectionClient contracts
123
+ * @param _mailbox The address of the mailbox contract
124
+ * @param _interchainGasPaymaster Unused but required by HyperlaneConnectionClient
125
+ * @param _interchainSecurityModule The address of the local ISM contract
126
+ * @param _owner The address with owner privileges
57
127
  */
58
128
  function initialize(
59
129
  address _mailbox,
@@ -67,121 +137,405 @@ contract InterchainAccountRouter is Router, IInterchainAccountRouter {
67
137
  _interchainSecurityModule,
68
138
  _owner
69
139
  );
140
+ require(localDomain == mailbox.localDomain(), "domain mismatch");
141
+ }
142
+
143
+ // ============ External Functions ============
144
+
145
+ /**
146
+ * @notice Registers the address of many remote InterchainAccountRouter
147
+ * contracts to use as a default when making interchain calls
148
+ * @param _destinations The remote domains
149
+ * @param _routers The addresses of the remote InterchainAccountRouters
150
+ */
151
+ function enrollRemoteRouters(
152
+ uint32[] calldata _destinations,
153
+ bytes32[] calldata _routers
154
+ ) external onlyOwner {
155
+ require(_destinations.length == _routers.length, "!length");
156
+ for (uint256 i = 0; i < _destinations.length; i += 1) {
157
+ _enrollRemoteRouterAndIsm(
158
+ _destinations[i],
159
+ _routers[i],
160
+ bytes32(0)
161
+ );
162
+ }
70
163
  }
71
164
 
72
165
  /**
73
- * @notice Dispatches a sequence of calls to be relayed by the sender's interchain account on the destination domain.
74
- * @param _destinationDomain The domain of the chain where the message will be sent to.
75
- * @param calls The sequence of calls to be relayed.
166
+ * @notice Dispatches a single remote call to be made by an owner's
167
+ * interchain account on the destination domain
168
+ * @dev Uses the default router and ISM addresses for the destination
169
+ * domain, reverting if none have been configured
170
+ * @param _destination The remote domain of the chain to make calls on
171
+ * @param _to The address of the contract to call
172
+ * @param _value The value to include in the call
173
+ * @param _data The calldata
174
+ * @return The Hyperlane message ID
175
+ */
176
+ function callRemote(
177
+ uint32 _destination,
178
+ address _to,
179
+ uint256 _value,
180
+ bytes memory _data
181
+ ) external returns (bytes32) {
182
+ bytes32 _router = routers[_destination];
183
+ bytes32 _ism = isms[_destination];
184
+ bytes memory _body = InterchainAccountMessage.encode(
185
+ msg.sender,
186
+ _ism,
187
+ _to,
188
+ _value,
189
+ _data
190
+ );
191
+ return _dispatchMessage(_destination, _router, _ism, _body);
192
+ }
193
+
194
+ /**
195
+ * @notice Dispatches a sequence of remote calls to be made by an owner's
196
+ * interchain account on the destination domain
197
+ * @dev Uses the default router and ISM addresses for the destination
198
+ * domain, reverting if none have been configured
76
199
  * @dev Recommend using CallLib.build to format the interchain calls.
200
+ * @param _destination The remote domain of the chain to make calls on
201
+ * @param _calls The sequence of calls to make
202
+ * @return The Hyperlane message ID
77
203
  */
78
- function dispatch(uint32 _destinationDomain, CallLib.Call[] calldata calls)
204
+ function callRemote(uint32 _destination, CallLib.Call[] calldata _calls)
79
205
  external
80
206
  returns (bytes32)
81
207
  {
208
+ bytes32 _router = routers[_destination];
209
+ bytes32 _ism = isms[_destination];
210
+ return callRemoteWithOverrides(_destination, _router, _ism, _calls);
211
+ }
212
+
213
+ /**
214
+ * @notice Handles dispatched messages by relaying calls to the interchain account
215
+ * @param _origin The origin domain of the interchain account
216
+ * @param _sender The sender of the interchain message
217
+ * @param _message The InterchainAccountMessage containing the account
218
+ * owner, ISM, and sequence of calls to be relayed
219
+ * @dev Does not need to be onlyRemoteRouter, as this application is designed
220
+ * to receive messages from untrusted remote contracts.
221
+ */
222
+ function handle(
223
+ uint32 _origin,
224
+ bytes32 _sender,
225
+ bytes calldata _message
226
+ ) external onlyMailbox {
227
+ (
228
+ bytes32 _owner,
229
+ bytes32 _ism,
230
+ CallLib.Call[] memory _calls
231
+ ) = InterchainAccountMessage.decode(_message);
232
+
233
+ OwnableMulticall _interchainAccount = getDeployedInterchainAccount(
234
+ _origin,
235
+ _owner,
236
+ _sender,
237
+ TypeCasts.bytes32ToAddress(_ism)
238
+ );
239
+ _interchainAccount.multicall(_calls);
240
+ }
241
+
242
+ /**
243
+ * @notice Returns the local address of an interchain account
244
+ * @dev This interchain account is not guaranteed to have been deployed
245
+ * @param _origin The remote origin domain of the interchain account
246
+ * @param _router The remote origin InterchainAccountRouter
247
+ * @param _owner The remote owner of the interchain account
248
+ * @param _ism The local address of the ISM
249
+ * @return The local address of the interchain account
250
+ */
251
+ function getLocalInterchainAccount(
252
+ uint32 _origin,
253
+ address _owner,
254
+ address _router,
255
+ address _ism
256
+ ) external view returns (OwnableMulticall) {
257
+ bytes32 _routerAsBytes32 = TypeCasts.addressToBytes32(_router);
258
+ bytes32 _ownerAsBytes32 = TypeCasts.addressToBytes32(_owner);
82
259
  return
83
- _dispatch(
84
- _destinationDomain,
85
- InterchainCallMessage.format(
86
- calls,
87
- msg.sender.addressToBytes32()
88
- )
260
+ getLocalInterchainAccount(
261
+ _origin,
262
+ _ownerAsBytes32,
263
+ _routerAsBytes32,
264
+ _ism
89
265
  );
90
266
  }
91
267
 
92
268
  /**
93
- * @notice Returns the address of the interchain account deployed on the current chain for a given `origin`/`sender` pair.
94
- * @param _origin The origin domain of the interchain account.
95
- * @param _sender The parent account address on the origin domain.
96
- * @return The address of the interchain account.
269
+ * @notice Returns the remote address of a locally owned interchain account
270
+ * @dev This interchain account is not guaranteed to have been deployed
271
+ * @dev This function will only work if the destination domain is
272
+ * EVM compatible
273
+ * @param _destination The remote destination domain of the interchain account
274
+ * @param _owner The local owner of the interchain account
275
+ * @return The remote address of the interchain account
97
276
  */
98
- function getInterchainAccount(uint32 _origin, bytes32 _sender)
99
- public
277
+ function getRemoteInterchainAccount(uint32 _destination, address _owner)
278
+ external
100
279
  view
101
- returns (address payable)
280
+ returns (address)
102
281
  {
103
- return _getInterchainAccount(_salt(_origin, _sender));
282
+ address _router = TypeCasts.bytes32ToAddress(routers[_destination]);
283
+ address _ism = TypeCasts.bytes32ToAddress(isms[_destination]);
284
+ return getRemoteInterchainAccount(_owner, _router, _ism);
104
285
  }
105
286
 
106
- function getInterchainAccount(uint32 _origin, address _sender)
107
- external
108
- view
109
- returns (address payable)
110
- {
111
- return getInterchainAccount(_origin, _sender.addressToBytes32());
287
+ function domains() external view returns (uint32[] memory) {
288
+ return _domains;
112
289
  }
113
290
 
291
+ // ============ Public Functions ============
292
+
114
293
  /**
115
- * @notice Returns and deploys (if not already) the interchain account for a given `origin`/`sender` pair.
116
- * @param _origin The origin domain of the interchain account.
117
- * @param _sender The parent account address on the origin domain.
118
- * @return The address of the interchain account.
294
+ * @notice Registers the address of a remote InterchainAccountRouter
295
+ * contract to use as a default when making interchain calls
296
+ * @param _destination The remote domain
297
+ * @param _router The address of the remote InterchainAccountRouter
119
298
  */
120
- function getDeployedInterchainAccount(uint32 _origin, bytes32 _sender)
299
+ function enrollRemoteRouter(uint32 _destination, bytes32 _router)
121
300
  public
122
- returns (OwnableMulticall)
301
+ onlyOwner
123
302
  {
124
- bytes32 salt = _salt(_origin, _sender);
125
- address payable interchainAccount = _getInterchainAccount(salt);
126
- if (!Address.isContract(interchainAccount)) {
127
- bytes memory bytecode = MinimalProxy.bytecode(implementation);
128
- interchainAccount = payable(Create2.deploy(0, salt, bytecode));
129
- emit InterchainAccountCreated(_origin, _sender, interchainAccount);
130
- // transfers ownership to this contract
131
- OwnableMulticall(interchainAccount).initialize();
132
- }
133
- return OwnableMulticall(interchainAccount);
303
+ _enrollRemoteRouterAndIsm(_destination, _router, bytes32(0));
134
304
  }
135
305
 
136
- function getDeployedInterchainAccount(uint32 _origin, address _sender)
137
- public
138
- returns (OwnableMulticall)
139
- {
140
- return
141
- getDeployedInterchainAccount(_origin, _sender.addressToBytes32());
306
+ /**
307
+ * @notice Registers the address of remote InterchainAccountRouter
308
+ * and ISM contracts to use as a default when making interchain calls
309
+ * @param _destination The remote domain
310
+ * @param _router The address of the remote InterchainAccountRouter
311
+ * @param _ism The address of the remote ISM
312
+ */
313
+ function enrollRemoteRouterAndIsm(
314
+ uint32 _destination,
315
+ bytes32 _router,
316
+ bytes32 _ism
317
+ ) public onlyOwner {
318
+ _enrollRemoteRouterAndIsm(_destination, _router, _ism);
142
319
  }
143
320
 
144
321
  /**
145
- * @notice Returns the salt used to deploy the interchain account for a given `origin`/`sender` pair.
146
- * @param _origin The origin domain of the interchain account.
147
- * @param _sender The parent account address on the origin domain.
148
- * @return The CREATE2 salt used for deploying the interchain account.
322
+ * @notice Dispatches a sequence of remote calls to be made by an owner's
323
+ * interchain account on the destination domain
324
+ * @dev Recommend using CallLib.build to format the interchain calls
325
+ * @param _destination The remote domain of the chain to make calls on
326
+ * @param _router The remote router address
327
+ * @param _ism The remote ISM address
328
+ * @param _calls The sequence of calls to make
329
+ * @return The Hyperlane message ID
149
330
  */
150
- function _salt(uint32 _origin, bytes32 _sender)
151
- internal
152
- pure
153
- returns (bytes32)
154
- {
155
- return bytes32(abi.encodePacked(_origin, _sender));
331
+ function callRemoteWithOverrides(
332
+ uint32 _destination,
333
+ bytes32 _router,
334
+ bytes32 _ism,
335
+ CallLib.Call[] calldata _calls
336
+ ) public returns (bytes32) {
337
+ bytes memory _body = InterchainAccountMessage.encode(
338
+ msg.sender,
339
+ _ism,
340
+ _calls
341
+ );
342
+ return _dispatchMessage(_destination, _router, _ism, _body);
156
343
  }
157
344
 
158
345
  /**
159
- * @notice Returns the address of the interchain account deployed on the current chain for a given salt.
160
- * @param salt The salt used to deploy the interchain account.
161
- * @return The address of the interchain account.
346
+ * @notice Returns and deploys (if not already) an interchain account
347
+ * @param _origin The remote origin domain of the interchain account
348
+ * @param _owner The remote owner of the interchain account
349
+ * @param _router The remote origin InterchainAccountRouter
350
+ * @param _ism The local address of the ISM
351
+ * @return The address of the interchain account
162
352
  */
163
- function _getInterchainAccount(bytes32 salt)
164
- internal
165
- view
166
- returns (address payable)
167
- {
168
- return payable(Create2.computeAddress(salt, bytecodeHash));
353
+ function getDeployedInterchainAccount(
354
+ uint32 _origin,
355
+ address _owner,
356
+ address _router,
357
+ address _ism
358
+ ) public returns (OwnableMulticall) {
359
+ return
360
+ getDeployedInterchainAccount(
361
+ _origin,
362
+ TypeCasts.addressToBytes32(_owner),
363
+ TypeCasts.addressToBytes32(_router),
364
+ _ism
365
+ );
169
366
  }
170
367
 
171
368
  /**
172
- * @notice Handles dispatched messages by relaying calls to the interchain account.
173
- * @param _origin The origin domain of the interchain account.
174
- * @param _message The ABI-encoded message containing the sender and the sequence of calls to be relayed.
369
+ * @notice Returns and deploys (if not already) an interchain account
370
+ * @param _origin The remote origin domain of the interchain account
371
+ * @param _owner The remote owner of the interchain account
372
+ * @param _router The remote origin InterchainAccountRouter
373
+ * @param _ism The local address of the ISM
374
+ * @return The address of the interchain account
175
375
  */
176
- function _handle(
376
+ function getDeployedInterchainAccount(
177
377
  uint32 _origin,
178
- bytes32, // router sender
179
- bytes calldata _message
180
- ) internal override {
181
- OwnableMulticall interchainAccount = getDeployedInterchainAccount(
378
+ bytes32 _owner,
379
+ bytes32 _router,
380
+ address _ism
381
+ ) public returns (OwnableMulticall) {
382
+ bytes32 _salt = _getSalt(
182
383
  _origin,
183
- InterchainCallMessage.sender(_message)
384
+ _owner,
385
+ _router,
386
+ TypeCasts.addressToBytes32(_ism)
387
+ );
388
+ address payable _account = _getLocalInterchainAccount(_salt);
389
+ if (!Address.isContract(_account)) {
390
+ bytes memory _bytecode = MinimalProxy.bytecode(implementation);
391
+ _account = payable(Create2.deploy(0, _salt, _bytecode));
392
+ emit InterchainAccountCreated(_origin, _owner, _ism, _account);
393
+ }
394
+ return OwnableMulticall(_account);
395
+ }
396
+
397
+ /**
398
+ * @notice Returns the local address of a remotely owned interchain account
399
+ * @dev This interchain account is not guaranteed to have been deployed
400
+ * @param _origin The remote origin domain of the interchain account
401
+ * @param _owner The remote owner of the interchain account
402
+ * @param _router The remote InterchainAccountRouter
403
+ * @param _ism The local address of the ISM
404
+ * @return The local address of the interchain account
405
+ */
406
+ function getLocalInterchainAccount(
407
+ uint32 _origin,
408
+ bytes32 _owner,
409
+ bytes32 _router,
410
+ address _ism
411
+ ) public view returns (OwnableMulticall) {
412
+ return
413
+ OwnableMulticall(
414
+ _getLocalInterchainAccount(
415
+ _getSalt(
416
+ _origin,
417
+ _owner,
418
+ _router,
419
+ TypeCasts.addressToBytes32(_ism)
420
+ )
421
+ )
422
+ );
423
+ }
424
+
425
+ /**
426
+ * @notice Returns the remote address of a locally owned interchain account
427
+ * @dev This interchain account is not guaranteed to have been deployed
428
+ * @dev This function will only work if the destination domain is
429
+ * EVM compatible
430
+ * @param _owner The local owner of the interchain account
431
+ * @param _router The remote InterchainAccountRouter
432
+ * @param _ism The remote address of the ISM
433
+ * @return The remote address of the interchain account
434
+ */
435
+ function getRemoteInterchainAccount(
436
+ address _owner,
437
+ address _router,
438
+ address _ism
439
+ ) public view returns (address) {
440
+ require(_router != address(0), "no router specified for destination");
441
+ // Derives the address of the first contract deployed by _router using
442
+ // the CREATE opcode.
443
+ address _implementation = address(
444
+ uint160(
445
+ uint256(
446
+ keccak256(
447
+ abi.encodePacked(
448
+ bytes1(0xd6),
449
+ bytes1(0x94),
450
+ _router,
451
+ bytes1(0x01)
452
+ )
453
+ )
454
+ )
455
+ )
456
+ );
457
+ bytes memory _proxyBytecode = MinimalProxy.bytecode(_implementation);
458
+ bytes32 _bytecodeHash = keccak256(_proxyBytecode);
459
+ bytes32 _salt = _getSalt(
460
+ localDomain,
461
+ TypeCasts.addressToBytes32(_owner),
462
+ TypeCasts.addressToBytes32(address(this)),
463
+ TypeCasts.addressToBytes32(_ism)
464
+ );
465
+ return Create2.computeAddress(_salt, _bytecodeHash, _router);
466
+ }
467
+
468
+ // ============ Private Functions ============
469
+
470
+ /**
471
+ * @notice Registers the address of remote InterchainAccountRouter
472
+ * and ISM contracts to use as a default when making interchain calls
473
+ * @param _destination The remote domain
474
+ * @param _router The address of the remote InterchainAccountRouter
475
+ * @param _ism The address of the remote ISM
476
+ */
477
+ function _enrollRemoteRouterAndIsm(
478
+ uint32 _destination,
479
+ bytes32 _router,
480
+ bytes32 _ism
481
+ ) private {
482
+ require(_router != bytes32(0), "invalid router address");
483
+ require(
484
+ routers[_destination] == bytes32(0),
485
+ "router and ISM defaults are immutable once set"
184
486
  );
185
- interchainAccount.proxyCalls(InterchainCallMessage.calls(_message));
487
+ _domains.push(_destination);
488
+ routers[_destination] = _router;
489
+ isms[_destination] = _ism;
490
+ emit RemoteRouterEnrolled(_destination, _router);
491
+ emit RemoteIsmEnrolled(_destination, _ism);
492
+ }
493
+
494
+ /**
495
+ * @notice Dispatches an InterchainAccountMessage to the remote router
496
+ * @param _destination The remote domain
497
+ * @param _router The address of the remote InterchainAccountRouter
498
+ * @param _ism The address of the remote ISM
499
+ * @param _body The InterchainAccountMessage body
500
+ */
501
+ function _dispatchMessage(
502
+ uint32 _destination,
503
+ bytes32 _router,
504
+ bytes32 _ism,
505
+ bytes memory _body
506
+ ) private returns (bytes32) {
507
+ require(_router != bytes32(0), "no router specified for destination");
508
+ emit RemoteCallDispatched(_destination, msg.sender, _router, _ism);
509
+ return mailbox.dispatch(_destination, _router, _body);
510
+ }
511
+
512
+ /**
513
+ * @notice Returns the salt used to deploy an interchain account
514
+ * @param _origin The remote origin domain of the interchain account
515
+ * @param _owner The remote owner of the interchain account
516
+ * @param _router The remote origin InterchainAccountRouter
517
+ * @param _ism The local address of the ISM
518
+ * @return The CREATE2 salt used for deploying the interchain account
519
+ */
520
+ function _getSalt(
521
+ uint32 _origin,
522
+ bytes32 _owner,
523
+ bytes32 _router,
524
+ bytes32 _ism
525
+ ) private pure returns (bytes32) {
526
+ return keccak256(abi.encodePacked(_origin, _owner, _router, _ism));
527
+ }
528
+
529
+ /**
530
+ * @notice Returns the address of the interchain account on the local chain
531
+ * @param _salt The CREATE2 salt used for deploying the interchain account
532
+ * @return The address of the interchain account
533
+ */
534
+ function _getLocalInterchainAccount(bytes32 _salt)
535
+ private
536
+ view
537
+ returns (address payable)
538
+ {
539
+ return payable(Create2.computeAddress(_salt, bytecodeHash));
186
540
  }
187
541
  }