@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
@@ -7,27 +7,30 @@ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
7
7
  import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
8
8
 
9
9
  // ============ Internal Imports ============
10
- import {IMultisigIsm} from "../../interfaces/IMultisigIsm.sol";
11
- import {Message} from "../libs/Message.sol";
12
- import {MultisigIsmMetadata} from "../libs/MultisigIsmMetadata.sol";
13
- import {MerkleLib} from "../libs/Merkle.sol";
10
+ import {IInterchainSecurityModule} from "../../interfaces/IInterchainSecurityModule.sol";
11
+ import {Message} from "../../libs/Message.sol";
12
+ import {IMultisigIsm} from "../../interfaces/isms/IMultisigIsm.sol";
13
+ import {LegacyMultisigIsmMetadata} from "../../libs/isms/LegacyMultisigIsmMetadata.sol";
14
+ import {MerkleLib} from "../../libs/Merkle.sol";
15
+ import {CheckpointLib} from "../../libs/CheckpointLib.sol";
14
16
 
15
17
  /**
16
18
  * @title MultisigIsm
17
19
  * @notice Manages an ownable set of validators that ECDSA sign checkpoints to
18
20
  * reach a quorum.
19
21
  */
20
- contract MultisigIsm is IMultisigIsm, Ownable {
22
+ contract LegacyMultisigIsm is IMultisigIsm, Ownable {
21
23
  // ============ Libraries ============
22
24
 
23
25
  using EnumerableSet for EnumerableSet.AddressSet;
24
26
  using Message for bytes;
25
- using MultisigIsmMetadata for bytes;
27
+ using LegacyMultisigIsmMetadata for bytes;
26
28
  using MerkleLib for MerkleLib.Tree;
27
29
 
28
30
  // ============ Constants ============
29
31
 
30
- uint8 public constant moduleType = 3;
32
+ uint8 public constant moduleType =
33
+ uint8(IInterchainSecurityModule.Types.LEGACY_MULTISIG);
31
34
 
32
35
  // ============ Mutable Storage ============
33
36
 
@@ -195,7 +198,7 @@ contract MultisigIsm is IMultisigIsm, Ownable {
195
198
  * @notice Verifies that a quorum of the origin domain's validators signed
196
199
  * a checkpoint, and verifies the merkle proof of `_message` against that
197
200
  * checkpoint.
198
- * @param _metadata ABI encoded module metadata (see MultisigIsmMetadata.sol)
201
+ * @param _metadata ABI encoded module metadata (see LegacyMultisigIsmMetadata.sol)
199
202
  * @param _message Formatted Hyperlane message (see Message.sol).
200
203
  */
201
204
  function verify(bytes calldata _metadata, bytes calldata _message)
@@ -284,7 +287,7 @@ contract MultisigIsm is IMultisigIsm, Ownable {
284
287
  /**
285
288
  * @notice Verifies the merkle proof of `_message` against the provided
286
289
  * checkpoint.
287
- * @param _metadata ABI encoded module metadata (see MultisigIsmMetadata.sol)
290
+ * @param _metadata ABI encoded module metadata (see LegacyMultisigIsmMetadata.sol)
288
291
  * @param _message Formatted Hyperlane message (see Message.sol).
289
292
  */
290
293
  function _verifyMerkleProof(
@@ -303,7 +306,7 @@ contract MultisigIsm is IMultisigIsm, Ownable {
303
306
  /**
304
307
  * @notice Verifies that a quorum of the origin domain's validators signed
305
308
  * the provided checkpoint.
306
- * @param _metadata ABI encoded module metadata (see MultisigIsmMetadata.sol)
309
+ * @param _metadata ABI encoded module metadata (see LegacyMultisigIsmMetadata.sol)
307
310
  * @param _message Formatted Hyperlane message (see Message.sol).
308
311
  */
309
312
  function _verifyValidatorSignatures(
@@ -324,7 +327,12 @@ contract MultisigIsm is IMultisigIsm, Ownable {
324
327
  // non-zero computed commitment, and this check will fail
325
328
  // as the commitment in storage will be zero.
326
329
  require(_commitment == commitment[_origin], "!commitment");
327
- _digest = _getCheckpointDigest(_metadata, _origin);
330
+ _digest = CheckpointLib.digest(
331
+ _origin,
332
+ LegacyMultisigIsmMetadata.originMailbox(_metadata),
333
+ LegacyMultisigIsmMetadata.root(_metadata),
334
+ LegacyMultisigIsmMetadata.index(_metadata)
335
+ );
328
336
  }
329
337
  uint256 _validatorCount = _metadata.validatorCount();
330
338
  uint256 _validatorIndex = 0;
@@ -344,53 +352,4 @@ contract MultisigIsm is IMultisigIsm, Ownable {
344
352
  }
345
353
  return true;
346
354
  }
347
-
348
- /**
349
- * @notice Returns the domain hash that validators are expected to use
350
- * when signing checkpoints.
351
- * @param _origin The origin domain of the checkpoint.
352
- * @param _originMailbox The address of the origin mailbox as bytes32.
353
- * @return The domain hash.
354
- */
355
- function _getDomainHash(uint32 _origin, bytes32 _originMailbox)
356
- internal
357
- pure
358
- returns (bytes32)
359
- {
360
- // Including the origin mailbox address in the signature allows the slashing
361
- // protocol to enroll multiple mailboxes. Otherwise, a valid signature for
362
- // mailbox A would be indistinguishable from a fraudulent signature for mailbox
363
- // B.
364
- // The slashing protocol should slash if validators sign attestations for
365
- // anything other than a whitelisted mailbox.
366
- return
367
- keccak256(abi.encodePacked(_origin, _originMailbox, "HYPERLANE"));
368
- }
369
-
370
- /**
371
- * @notice Returns the digest validators are expected to sign when signing checkpoints.
372
- * @param _metadata ABI encoded module metadata (see MultisigIsmMetadata.sol)
373
- * @param _origin The origin domain of the checkpoint.
374
- * @return The digest of the checkpoint.
375
- */
376
- function _getCheckpointDigest(bytes calldata _metadata, uint32 _origin)
377
- internal
378
- pure
379
- returns (bytes32)
380
- {
381
- bytes32 _domainHash = _getDomainHash(
382
- _origin,
383
- _metadata.originMailbox()
384
- );
385
- return
386
- ECDSA.toEthSignedMessageHash(
387
- keccak256(
388
- abi.encodePacked(
389
- _domainHash,
390
- _metadata.root(),
391
- _metadata.index()
392
- )
393
- )
394
- );
395
- }
396
355
  }
@@ -0,0 +1,33 @@
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >=0.8.0;
3
+
4
+ // ============ Internal Imports ============
5
+ import {AbstractMultisigIsm} from "./AbstractMultisigIsm.sol";
6
+ import {MultisigIsmMetadata} from "../../libs/isms/MultisigIsmMetadata.sol";
7
+ import {MetaProxy} from "../../libs/MetaProxy.sol";
8
+
9
+ /**
10
+ * @title StaticMultisigIsm
11
+ * @notice Manages per-domain m-of-n Validator sets that are used
12
+ * to verify interchain messages.
13
+ */
14
+ contract StaticMultisigIsm is AbstractMultisigIsm {
15
+ // ============ Public Functions ============
16
+
17
+ /**
18
+ * @notice Returns the set of validators responsible for verifying _message
19
+ * and the number of signatures required
20
+ * @dev Can change based on the content of _message
21
+ * @return validators The array of validator addresses
22
+ * @return threshold The number of validator signatures needed
23
+ */
24
+ function validatorsAndThreshold(bytes calldata)
25
+ public
26
+ view
27
+ virtual
28
+ override
29
+ returns (address[] memory, uint8)
30
+ {
31
+ return abi.decode(MetaProxy.metadata(), (address[], uint8));
32
+ }
33
+ }
@@ -0,0 +1,16 @@
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >=0.8.0;
3
+ // ============ Internal Imports ============
4
+ import {StaticMultisigIsm} from "./StaticMultisigIsm.sol";
5
+ import {StaticMOfNAddressSetFactory} from "../../libs/StaticMOfNAddressSetFactory.sol";
6
+
7
+ contract StaticMultisigIsmFactory is StaticMOfNAddressSetFactory {
8
+ function _deployImplementation()
9
+ internal
10
+ virtual
11
+ override
12
+ returns (address)
13
+ {
14
+ return address(new StaticMultisigIsm());
15
+ }
16
+ }
@@ -13,8 +13,10 @@ library CallLib {
13
13
  }
14
14
 
15
15
  struct Call {
16
+ // supporting non EVM targets
17
+ bytes32 to;
16
18
  uint256 value;
17
- StaticCall _call;
19
+ bytes data;
18
20
  }
19
21
 
20
22
  struct StaticCallWithCallback {
@@ -22,18 +24,14 @@ library CallLib {
22
24
  bytes callback;
23
25
  }
24
26
 
25
- function target(StaticCall memory _call) internal pure returns (address) {
26
- return TypeCasts.bytes32ToAddress(_call.to);
27
- }
28
-
29
27
  function call(Call memory _call)
30
28
  internal
31
29
  returns (bytes memory returnData)
32
30
  {
33
31
  return
34
32
  Address.functionCallWithValue(
35
- target(_call._call),
36
- _call._call.data,
33
+ TypeCasts.bytes32ToAddress(_call.to),
34
+ _call.data,
37
35
  _call.value
38
36
  );
39
37
  }
@@ -43,7 +41,11 @@ library CallLib {
43
41
  view
44
42
  returns (bytes memory)
45
43
  {
46
- return Address.functionStaticCall(target(_call), _call.data);
44
+ return
45
+ Address.functionStaticCall(
46
+ TypeCasts.bytes32ToAddress(_call.to),
47
+ _call.data
48
+ );
47
49
  }
48
50
 
49
51
  function staticcall(StaticCallWithCallback memory _call)
@@ -114,7 +116,7 @@ library CallLib {
114
116
  uint256 value,
115
117
  bytes memory data
116
118
  ) internal pure returns (Call memory) {
117
- return Call(value, build(to, data));
119
+ return Call(to, value, data);
118
120
  }
119
121
 
120
122
  function build(
@@ -122,7 +124,7 @@ library CallLib {
122
124
  uint256 value,
123
125
  bytes memory data
124
126
  ) internal pure returns (Call memory) {
125
- return Call(value, build(to, data));
127
+ return Call(TypeCasts.addressToBytes32(to), value, data);
126
128
  }
127
129
 
128
130
  function build(
@@ -0,0 +1,54 @@
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >=0.8.0;
3
+
4
+ // ============ External Imports ============
5
+ import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
6
+
7
+ library CheckpointLib {
8
+ /**
9
+ * @notice Returns the digest validators are expected to sign when signing checkpoints.
10
+ * @param _origin The origin domain of the checkpoint.
11
+ * @param _originMailbox The address of the origin mailbox as bytes32.
12
+ * @return The digest of the checkpoint.
13
+ */
14
+ function digest(
15
+ uint32 _origin,
16
+ bytes32 _originMailbox,
17
+ bytes32 _checkpointRoot,
18
+ uint32 _checkpointIndex
19
+ ) internal pure returns (bytes32) {
20
+ bytes32 _domainHash = domainHash(_origin, _originMailbox);
21
+ return
22
+ ECDSA.toEthSignedMessageHash(
23
+ keccak256(
24
+ abi.encodePacked(
25
+ _domainHash,
26
+ _checkpointRoot,
27
+ _checkpointIndex
28
+ )
29
+ )
30
+ );
31
+ }
32
+
33
+ /**
34
+ * @notice Returns the domain hash that validators are expected to use
35
+ * when signing checkpoints.
36
+ * @param _origin The origin domain of the checkpoint.
37
+ * @param _originMailbox The address of the origin mailbox as bytes32.
38
+ * @return The domain hash.
39
+ */
40
+ function domainHash(uint32 _origin, bytes32 _originMailbox)
41
+ internal
42
+ pure
43
+ returns (bytes32)
44
+ {
45
+ // Including the origin mailbox address in the signature allows the slashing
46
+ // protocol to enroll multiple mailboxes. Otherwise, a valid signature for
47
+ // mailbox A would be indistinguishable from a fraudulent signature for mailbox
48
+ // B.
49
+ // The slashing protocol should slash if validators sign attestations for
50
+ // anything other than a whitelisted mailbox.
51
+ return
52
+ keccak256(abi.encodePacked(_origin, _originMailbox, "HYPERLANE"));
53
+ }
54
+ }
@@ -0,0 +1,40 @@
1
+ // SPDX-License-Identifier: CC0-1.0
2
+ pragma solidity >=0.7.6;
3
+
4
+ /// @dev Adapted from https://eips.ethereum.org/EIPS/eip-3448
5
+ library MetaProxy {
6
+ bytes32 constant PREFIX =
7
+ hex"600b380380600b3d393df3363d3d373d3d3d3d60368038038091363936013d73";
8
+ bytes13 constant SUFFIX = hex"5af43d3d93803e603457fd5bf3";
9
+
10
+ function bytecode(address _implementation, bytes memory _metadata)
11
+ internal
12
+ pure
13
+ returns (bytes memory)
14
+ {
15
+ return
16
+ abi.encodePacked(
17
+ PREFIX,
18
+ bytes20(_implementation),
19
+ SUFFIX,
20
+ _metadata,
21
+ _metadata.length
22
+ );
23
+ }
24
+
25
+ function metadata() internal pure returns (bytes memory) {
26
+ bytes memory data;
27
+ assembly {
28
+ let posOfMetadataSize := sub(calldatasize(), 32)
29
+ let size := calldataload(posOfMetadataSize)
30
+ let dataPtr := sub(posOfMetadataSize, size)
31
+ data := mload(64)
32
+ // increment free memory pointer by metadata size + 32 bytes (length)
33
+ mstore(64, add(data, add(size, 32)))
34
+ mstore(data, size)
35
+ let memPtr := add(data, 32)
36
+ calldatacopy(memPtr, dataPtr, size)
37
+ }
38
+ return data;
39
+ }
40
+ }
@@ -0,0 +1,98 @@
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >=0.8.0;
3
+ // ============ External Imports ============
4
+ import {Address} from "@openzeppelin/contracts/utils/Address.sol";
5
+ import {Create2} from "@openzeppelin/contracts/utils/Create2.sol";
6
+
7
+ // ============ Internal Imports ============
8
+ import {MetaProxy} from "./MetaProxy.sol";
9
+
10
+ abstract contract StaticMOfNAddressSetFactory {
11
+ // ============ Immutables ============
12
+ address private immutable _implementation;
13
+
14
+ // ============ Constructor ============
15
+
16
+ constructor() {
17
+ _implementation = _deployImplementation();
18
+ }
19
+
20
+ function _deployImplementation() internal virtual returns (address);
21
+
22
+ /**
23
+ * @notice Deploys a StaticMOfNAddressSet contract address for the given
24
+ * values
25
+ * @dev Consider sorting addresses to ensure contract reuse
26
+ * @param _values An array of addresses
27
+ * @param _threshold The threshold value to use
28
+ * @return set The contract address representing this StaticMOfNAddressSet
29
+ */
30
+ function deploy(address[] calldata _values, uint8 _threshold)
31
+ external
32
+ returns (address)
33
+ {
34
+ (bytes32 _salt, bytes memory _bytecode) = _saltAndBytecode(
35
+ _values,
36
+ _threshold
37
+ );
38
+ address _set = _getAddress(_salt, _bytecode);
39
+ if (!Address.isContract(_set)) {
40
+ _set = Create2.deploy(0, _salt, _bytecode);
41
+ }
42
+ return _set;
43
+ }
44
+
45
+ /**
46
+ * @notice Returns the StaticMOfNAddressSet contract address for the given
47
+ * values
48
+ * @dev Consider sorting addresses to ensure contract reuse
49
+ * @param _values An array of addresses
50
+ * @param _threshold The threshold value to use
51
+ * @return set The contract address representing this StaticMOfNAddressSet
52
+ */
53
+ function getAddress(address[] calldata _values, uint8 _threshold)
54
+ external
55
+ view
56
+ returns (address)
57
+ {
58
+ (bytes32 _salt, bytes memory _bytecode) = _saltAndBytecode(
59
+ _values,
60
+ _threshold
61
+ );
62
+ return _getAddress(_salt, _bytecode);
63
+ }
64
+
65
+ /**
66
+ * @notice Returns the StaticMOfNAddressSet contract address for the given
67
+ * values
68
+ * @param _salt The salt used in Create2
69
+ * @param _bytecode The metaproxy bytecode used in Create2
70
+ * @return set The contract address representing this StaticMOfNAddressSet
71
+ */
72
+ function _getAddress(bytes32 _salt, bytes memory _bytecode)
73
+ private
74
+ view
75
+ returns (address)
76
+ {
77
+ bytes32 _bytecodeHash = keccak256(_bytecode);
78
+ return Create2.computeAddress(_salt, _bytecodeHash);
79
+ }
80
+
81
+ /**
82
+ * @notice Returns the create2 salt and bytecode for the given values
83
+ * @param _values An array of addresses
84
+ * @param _threshold The threshold value to use
85
+ * @return _salt The salt used in Create2
86
+ * @return _bytecode The metaproxy bytecode used in Create2
87
+ */
88
+ function _saltAndBytecode(address[] calldata _values, uint8 _threshold)
89
+ private
90
+ view
91
+ returns (bytes32, bytes memory)
92
+ {
93
+ bytes memory _metadata = abi.encode(_values, _threshold);
94
+ bytes memory _bytecode = MetaProxy.bytecode(_implementation, _metadata);
95
+ bytes32 _salt = keccak256(_metadata);
96
+ return (_salt, _bytecode);
97
+ }
98
+ }
@@ -2,26 +2,6 @@
2
2
  pragma solidity >=0.6.11;
3
3
 
4
4
  library TypeCasts {
5
- // treat it as a null-terminated string of max 32 bytes
6
- function coerceString(bytes32 _buf)
7
- internal
8
- pure
9
- returns (string memory _newStr)
10
- {
11
- uint8 _slen = 0;
12
- while (_slen < 32 && _buf[_slen] != 0) {
13
- _slen++;
14
- }
15
-
16
- // solhint-disable-next-line no-inline-assembly
17
- assembly {
18
- _newStr := mload(0x40)
19
- mstore(0x40, add(_newStr, 0x40)) // may end up with extra
20
- mstore(_newStr, _slen)
21
- mstore(add(_newStr, 0x20), _buf)
22
- }
23
- }
24
-
25
5
  // alignment preserving cast
26
6
  function addressToBytes32(address _addr) internal pure returns (bytes32) {
27
7
  return bytes32(uint256(uint160(_addr)));
@@ -0,0 +1,72 @@
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >=0.8.0;
3
+
4
+ /**
5
+ * Format of metadata:
6
+ *
7
+ * [????:????] Metadata start/end uint32 ranges, packed as uint64
8
+ * [????:????] ISM metadata, packed encoding
9
+ */
10
+ library AggregationIsmMetadata {
11
+ uint256 private constant RANGE_SIZE = 4;
12
+
13
+ /**
14
+ * @notice Returns whether or not metadata was provided for the ISM at
15
+ * `_index`
16
+ * @dev Callers must ensure _index is less than the number of metadatas
17
+ * provided
18
+ * @param _metadata Encoded Aggregation ISM metadata
19
+ * @param _index The index of the ISM to check for metadata for
20
+ * @return Whether or not metadata was provided for the ISM at `_index`
21
+ */
22
+ function hasMetadata(bytes calldata _metadata, uint8 _index)
23
+ internal
24
+ pure
25
+ returns (bool)
26
+ {
27
+ (uint32 _start, ) = _metadataRange(_metadata, _index);
28
+ return _start > 0;
29
+ }
30
+
31
+ /**
32
+ * @notice Returns the metadata provided for the ISM at `_index`
33
+ * @dev Callers must ensure _index is less than the number of metadatas
34
+ * provided
35
+ * @dev Callers must ensure `hasMetadata(_metadata, _index)`
36
+ * @param _metadata Encoded Aggregation ISM metadata
37
+ * @param _index The index of the ISM to return metadata for
38
+ * @return The metadata provided for the ISM at `_index`
39
+ */
40
+ function metadataAt(bytes calldata _metadata, uint8 _index)
41
+ internal
42
+ pure
43
+ returns (bytes calldata)
44
+ {
45
+ (uint32 _start, uint32 _end) = _metadataRange(_metadata, _index);
46
+ return _metadata[_start:_end];
47
+ }
48
+
49
+ /**
50
+ * @notice Returns the range of the metadata provided for the ISM at
51
+ * `_index`, or zeroes if not provided
52
+ * @dev Callers must ensure _index is less than the number of metadatas
53
+ * provided
54
+ * @param _metadata Encoded Aggregation ISM metadata
55
+ * @param _index The index of the ISM to return metadata range for
56
+ * @return The range of the metadata provided for the ISM at `_index`, or
57
+ * zeroes if not provided
58
+ */
59
+ function _metadataRange(bytes calldata _metadata, uint8 _index)
60
+ private
61
+ pure
62
+ returns (uint32, uint32)
63
+ {
64
+ uint256 _start = (uint32(_index) * RANGE_SIZE * 2);
65
+ uint256 _mid = _start + RANGE_SIZE;
66
+ uint256 _end = _mid + RANGE_SIZE;
67
+ return (
68
+ uint32(bytes4(_metadata[_start:_mid])),
69
+ uint32(bytes4(_metadata[_mid:_end]))
70
+ );
71
+ }
72
+ }
@@ -11,7 +11,7 @@ pragma solidity >=0.8.0;
11
11
  * [1093:????] Validator signatures, 65 bytes each, length == Threshold
12
12
  * [????:????] Addresses of the entire validator set, left padded to bytes32
13
13
  */
14
- library MultisigIsmMetadata {
14
+ library LegacyMultisigIsmMetadata {
15
15
  uint256 private constant MERKLE_ROOT_OFFSET = 0;
16
16
  uint256 private constant MERKLE_INDEX_OFFSET = 32;
17
17
  uint256 private constant ORIGIN_MAILBOX_OFFSET = 36;
@@ -0,0 +1,91 @@
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >=0.8.0;
3
+
4
+ /**
5
+ * Format of metadata:
6
+ * [ 0: 32] Merkle root
7
+ * [ 32: 36] Root index
8
+ * [ 36: 68] Origin mailbox address
9
+ * [ 68:1092] Merkle proof
10
+ * [1092:????] Validator signatures, 65 bytes each, length == Threshold
11
+ */
12
+ library MultisigIsmMetadata {
13
+ uint256 private constant MERKLE_ROOT_OFFSET = 0;
14
+ uint256 private constant MERKLE_INDEX_OFFSET = 32;
15
+ uint256 private constant ORIGIN_MAILBOX_OFFSET = 36;
16
+ uint256 private constant MERKLE_PROOF_OFFSET = 68;
17
+ uint256 private constant SIGNATURES_OFFSET = 1092;
18
+ uint256 private constant SIGNATURE_LENGTH = 65;
19
+
20
+ /**
21
+ * @notice Returns the merkle root of the signed checkpoint.
22
+ * @param _metadata ABI encoded Multisig ISM metadata.
23
+ * @return Merkle root of the signed checkpoint
24
+ */
25
+ function root(bytes calldata _metadata) internal pure returns (bytes32) {
26
+ return bytes32(_metadata[MERKLE_ROOT_OFFSET:MERKLE_INDEX_OFFSET]);
27
+ }
28
+
29
+ /**
30
+ * @notice Returns the index of the signed checkpoint.
31
+ * @param _metadata ABI encoded Multisig ISM metadata.
32
+ * @return Index of the signed checkpoint
33
+ */
34
+ function index(bytes calldata _metadata) internal pure returns (uint32) {
35
+ return
36
+ uint32(
37
+ bytes4(_metadata[MERKLE_INDEX_OFFSET:ORIGIN_MAILBOX_OFFSET])
38
+ );
39
+ }
40
+
41
+ /**
42
+ * @notice Returns the origin mailbox of the signed checkpoint as bytes32.
43
+ * @param _metadata ABI encoded Multisig ISM metadata.
44
+ * @return Origin mailbox of the signed checkpoint as bytes32
45
+ */
46
+ function originMailbox(bytes calldata _metadata)
47
+ internal
48
+ pure
49
+ returns (bytes32)
50
+ {
51
+ return bytes32(_metadata[ORIGIN_MAILBOX_OFFSET:MERKLE_PROOF_OFFSET]);
52
+ }
53
+
54
+ /**
55
+ * @notice Returns the merkle proof branch of the message.
56
+ * @dev This appears to be more gas efficient than returning a calldata
57
+ * slice and using that.
58
+ * @param _metadata ABI encoded Multisig ISM metadata.
59
+ * @return Merkle proof branch of the message.
60
+ */
61
+ function proof(bytes calldata _metadata)
62
+ internal
63
+ pure
64
+ returns (bytes32[32] memory)
65
+ {
66
+ return
67
+ abi.decode(
68
+ _metadata[MERKLE_PROOF_OFFSET:SIGNATURES_OFFSET],
69
+ (bytes32[32])
70
+ );
71
+ }
72
+
73
+ /**
74
+ * @notice Returns the validator ECDSA signature at `_index`.
75
+ * @dev Assumes signatures are sorted by validator
76
+ * @dev Assumes `_metadata` encodes `threshold` signatures.
77
+ * @dev Assumes `_index` is less than `threshold`
78
+ * @param _metadata ABI encoded Multisig ISM metadata.
79
+ * @param _index The index of the signature to return.
80
+ * @return The validator ECDSA signature at `_index`.
81
+ */
82
+ function signatureAt(bytes calldata _metadata, uint256 _index)
83
+ internal
84
+ pure
85
+ returns (bytes calldata)
86
+ {
87
+ uint256 _start = SIGNATURES_OFFSET + (_index * SIGNATURE_LENGTH);
88
+ uint256 _end = _start + SIGNATURE_LENGTH;
89
+ return _metadata[_start:_end];
90
+ }
91
+ }