@hyperlane-xyz/core 1.3.7 → 1.3.8

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 (280) hide show
  1. package/README.md +6 -4
  2. package/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.sol +30 -0
  3. package/contracts/hooks/ERC5164MessageHook.sol +95 -0
  4. package/contracts/hooks/OptimismMessageHook.sol +3 -1
  5. package/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol +10 -4
  6. package/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol +8 -3
  7. package/contracts/isms/native/AbstractNativeISM.sol +17 -6
  8. package/contracts/isms/native/ERC5164ISM.sol +75 -0
  9. package/contracts/isms/native/OptimismISM.sol +15 -4
  10. package/contracts/mock/MockERC5164.sol +26 -0
  11. package/dist/contracts/CheckpointFraudProofs.d.ts +103 -0
  12. package/dist/contracts/CheckpointFraudProofs.d.ts.map +1 -0
  13. package/dist/contracts/CheckpointFraudProofs.js +4 -0
  14. package/dist/contracts/CheckpointFraudProofs.js.map +1 -0
  15. package/dist/contracts/hooks/ERC5164/index.d.ts +3 -0
  16. package/dist/contracts/hooks/ERC5164/index.d.ts.map +1 -0
  17. package/dist/contracts/hooks/ERC5164/index.js +4 -0
  18. package/dist/contracts/hooks/ERC5164/index.js.map +1 -0
  19. package/dist/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.d.ts +72 -0
  20. package/dist/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.d.ts.map +1 -0
  21. package/dist/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.js +4 -0
  22. package/dist/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.js.map +1 -0
  23. package/dist/contracts/hooks/ERC5164/interfaces/index.d.ts +2 -0
  24. package/dist/contracts/hooks/ERC5164/interfaces/index.d.ts.map +1 -0
  25. package/dist/contracts/hooks/ERC5164/interfaces/index.js +3 -0
  26. package/dist/contracts/hooks/ERC5164/interfaces/index.js.map +1 -0
  27. package/dist/contracts/hooks/ERC5164MessageHook.d.ts +75 -0
  28. package/dist/contracts/hooks/ERC5164MessageHook.d.ts.map +1 -0
  29. package/dist/contracts/hooks/ERC5164MessageHook.js +4 -0
  30. package/dist/contracts/hooks/ERC5164MessageHook.js.map +1 -0
  31. package/dist/contracts/hooks/index.d.ts +3 -0
  32. package/dist/contracts/hooks/index.d.ts.map +1 -1
  33. package/dist/contracts/hooks/index.js +1 -0
  34. package/dist/contracts/hooks/index.js.map +1 -1
  35. package/dist/contracts/isms/native/AbstractNativeISM.d.ts +10 -10
  36. package/dist/contracts/isms/native/AbstractNativeISM.d.ts.map +1 -1
  37. package/dist/contracts/isms/native/ERC5164ISM.d.ts +107 -0
  38. package/dist/contracts/isms/native/ERC5164ISM.d.ts.map +1 -0
  39. package/dist/contracts/isms/native/ERC5164ISM.js +4 -0
  40. package/dist/contracts/isms/native/ERC5164ISM.js.map +1 -0
  41. package/dist/contracts/isms/native/OptimismISM.d.ts +17 -17
  42. package/dist/contracts/isms/native/OptimismISM.d.ts.map +1 -1
  43. package/dist/contracts/isms/native/index.d.ts +1 -0
  44. package/dist/contracts/isms/native/index.d.ts.map +1 -1
  45. package/dist/contracts/libs/TestMerkle.sol/MerkleTree.d.ts +77 -0
  46. package/dist/contracts/libs/TestMerkle.sol/MerkleTree.d.ts.map +1 -0
  47. package/dist/contracts/libs/TestMerkle.sol/MerkleTree.js +4 -0
  48. package/dist/contracts/libs/TestMerkle.sol/MerkleTree.js.map +1 -0
  49. package/dist/contracts/libs/TestMerkle.sol/index.d.ts +2 -0
  50. package/dist/contracts/libs/TestMerkle.sol/index.d.ts.map +1 -0
  51. package/dist/contracts/libs/TestMerkle.sol/index.js +3 -0
  52. package/dist/contracts/libs/TestMerkle.sol/index.js.map +1 -0
  53. package/dist/contracts/mock/MockERC5164.sol/MockMessageDispatcher.d.ts +72 -0
  54. package/dist/contracts/mock/MockERC5164.sol/MockMessageDispatcher.d.ts.map +1 -0
  55. package/dist/contracts/mock/MockERC5164.sol/MockMessageDispatcher.js +4 -0
  56. package/dist/contracts/mock/MockERC5164.sol/MockMessageDispatcher.js.map +1 -0
  57. package/dist/contracts/mock/MockERC5164.sol/MockMessageExecutor.d.ts +44 -0
  58. package/dist/contracts/mock/MockERC5164.sol/MockMessageExecutor.d.ts.map +1 -0
  59. package/dist/contracts/mock/MockERC5164.sol/MockMessageExecutor.js +4 -0
  60. package/dist/contracts/mock/MockERC5164.sol/MockMessageExecutor.js.map +1 -0
  61. package/dist/contracts/mock/MockERC5164.sol/index.d.ts +3 -0
  62. package/dist/contracts/mock/MockERC5164.sol/index.d.ts.map +1 -0
  63. package/dist/contracts/mock/MockERC5164.sol/index.js +3 -0
  64. package/dist/contracts/mock/MockERC5164.sol/index.js.map +1 -0
  65. package/dist/contracts/mock/index.d.ts +2 -0
  66. package/dist/contracts/mock/index.d.ts.map +1 -1
  67. package/dist/contracts/mock/index.js +1 -0
  68. package/dist/contracts/mock/index.js.map +1 -1
  69. package/dist/factories/contracts/CheckpointFraudProofs__factory.d.ts +45 -0
  70. package/dist/factories/contracts/CheckpointFraudProofs__factory.d.ts.map +1 -0
  71. package/dist/factories/contracts/CheckpointFraudProofs__factory.js +231 -0
  72. package/dist/factories/contracts/CheckpointFraudProofs__factory.js.map +1 -0
  73. package/dist/factories/contracts/hooks/ERC5164/index.d.ts +2 -0
  74. package/dist/factories/contracts/hooks/ERC5164/index.d.ts.map +1 -0
  75. package/dist/factories/contracts/hooks/ERC5164/index.js +31 -0
  76. package/dist/factories/contracts/hooks/ERC5164/index.js.map +1 -0
  77. package/dist/factories/contracts/hooks/ERC5164/interfaces/IMessageDispatcher__factory.d.ts +36 -0
  78. package/dist/factories/contracts/hooks/ERC5164/interfaces/IMessageDispatcher__factory.d.ts.map +1 -0
  79. package/dist/factories/contracts/hooks/ERC5164/interfaces/IMessageDispatcher__factory.js +84 -0
  80. package/dist/factories/contracts/hooks/ERC5164/interfaces/IMessageDispatcher__factory.js.map +1 -0
  81. package/dist/factories/contracts/hooks/ERC5164/interfaces/index.d.ts +2 -0
  82. package/dist/factories/contracts/hooks/ERC5164/interfaces/index.d.ts.map +1 -0
  83. package/dist/factories/contracts/hooks/ERC5164/interfaces/index.js +9 -0
  84. package/dist/factories/contracts/hooks/ERC5164/interfaces/index.js.map +1 -0
  85. package/dist/factories/contracts/hooks/ERC5164MessageHook__factory.d.ts +45 -0
  86. package/dist/factories/contracts/hooks/ERC5164MessageHook__factory.d.ts.map +1 -0
  87. package/dist/factories/contracts/hooks/ERC5164MessageHook__factory.js +125 -0
  88. package/dist/factories/contracts/hooks/ERC5164MessageHook__factory.js.map +1 -0
  89. package/dist/factories/contracts/hooks/OptimismMessageHook__factory.d.ts +1 -1
  90. package/dist/factories/contracts/hooks/OptimismMessageHook__factory.d.ts.map +1 -1
  91. package/dist/factories/contracts/hooks/OptimismMessageHook__factory.js +1 -1
  92. package/dist/factories/contracts/hooks/OptimismMessageHook__factory.js.map +1 -1
  93. package/dist/factories/contracts/hooks/index.d.ts +2 -0
  94. package/dist/factories/contracts/hooks/index.d.ts.map +1 -1
  95. package/dist/factories/contracts/hooks/index.js +27 -1
  96. package/dist/factories/contracts/hooks/index.js.map +1 -1
  97. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsmFactory__factory.d.ts +1 -1
  98. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsmFactory__factory.js +1 -1
  99. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsm__factory.d.ts +1 -1
  100. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsm__factory.js +1 -1
  101. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsmFactory__factory.d.ts +1 -1
  102. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsmFactory__factory.js +1 -1
  103. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsm__factory.d.ts +1 -1
  104. package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsm__factory.js +1 -1
  105. package/dist/factories/contracts/isms/native/AbstractNativeISM__factory.d.ts.map +1 -1
  106. package/dist/factories/contracts/isms/native/AbstractNativeISM__factory.js +4 -9
  107. package/dist/factories/contracts/isms/native/AbstractNativeISM__factory.js.map +1 -1
  108. package/dist/factories/contracts/isms/native/ERC5164ISM__factory.d.ts +59 -0
  109. package/dist/factories/contracts/isms/native/ERC5164ISM__factory.d.ts.map +1 -0
  110. package/dist/factories/contracts/isms/native/ERC5164ISM__factory.js +171 -0
  111. package/dist/factories/contracts/isms/native/ERC5164ISM__factory.js.map +1 -0
  112. package/dist/factories/contracts/isms/native/OptimismISM__factory.d.ts +1 -1
  113. package/dist/factories/contracts/isms/native/OptimismISM__factory.d.ts.map +1 -1
  114. package/dist/factories/contracts/isms/native/OptimismISM__factory.js +7 -12
  115. package/dist/factories/contracts/isms/native/OptimismISM__factory.js.map +1 -1
  116. package/dist/factories/contracts/isms/native/index.d.ts +1 -0
  117. package/dist/factories/contracts/isms/native/index.d.ts.map +1 -1
  118. package/dist/factories/contracts/isms/native/index.js +3 -1
  119. package/dist/factories/contracts/isms/native/index.js.map +1 -1
  120. package/dist/factories/contracts/libs/TestMerkle.sol/MerkleTree__factory.d.ts +41 -0
  121. package/dist/factories/contracts/libs/TestMerkle.sol/MerkleTree__factory.d.ts.map +1 -0
  122. package/dist/factories/contracts/libs/TestMerkle.sol/MerkleTree__factory.js +151 -0
  123. package/dist/factories/contracts/libs/TestMerkle.sol/MerkleTree__factory.js.map +1 -0
  124. package/dist/factories/contracts/libs/TestMerkle.sol/index.d.ts +2 -0
  125. package/dist/factories/contracts/libs/TestMerkle.sol/index.d.ts.map +1 -0
  126. package/dist/factories/contracts/libs/TestMerkle.sol/index.js +9 -0
  127. package/dist/factories/contracts/libs/TestMerkle.sol/index.js.map +1 -0
  128. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageDispatcher__factory.d.ts +48 -0
  129. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageDispatcher__factory.d.ts.map +1 -0
  130. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageDispatcher__factory.js +107 -0
  131. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageDispatcher__factory.js.map +1 -0
  132. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageExecutor__factory.d.ts +31 -0
  133. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageExecutor__factory.d.ts.map +1 -0
  134. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageExecutor__factory.js +60 -0
  135. package/dist/factories/contracts/mock/MockERC5164.sol/MockMessageExecutor__factory.js.map +1 -0
  136. package/dist/factories/contracts/mock/MockERC5164.sol/index.d.ts +3 -0
  137. package/dist/factories/contracts/mock/MockERC5164.sol/index.d.ts.map +1 -0
  138. package/dist/factories/contracts/mock/MockERC5164.sol/index.js +11 -0
  139. package/dist/factories/contracts/mock/MockERC5164.sol/index.js.map +1 -0
  140. package/dist/factories/contracts/mock/index.d.ts +1 -0
  141. package/dist/factories/contracts/mock/index.d.ts.map +1 -1
  142. package/dist/factories/contracts/mock/index.js +25 -1
  143. package/dist/factories/contracts/mock/index.js.map +1 -1
  144. package/dist/index.d.ts +10 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +13 -3
  147. package/dist/index.js.map +1 -1
  148. package/docs/book.css +13 -0
  149. package/docs/book.toml +12 -0
  150. package/docs/solidity.min.js +74 -0
  151. package/docs/src/README.md +15 -0
  152. package/docs/src/SUMMARY.md +128 -0
  153. package/docs/src/contracts/GasRouter.sol/abstract.GasRouter.md +124 -0
  154. package/docs/src/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md +191 -0
  155. package/docs/src/contracts/Mailbox.sol/contract.Mailbox.md +251 -0
  156. package/docs/src/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md +41 -0
  157. package/docs/src/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md +100 -0
  158. package/docs/src/contracts/README.md +19 -0
  159. package/docs/src/contracts/Router.sol/abstract.Router.md +255 -0
  160. package/docs/src/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md +117 -0
  161. package/docs/src/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md +71 -0
  162. package/docs/src/contracts/hooks/README.md +4 -0
  163. package/docs/src/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md +231 -0
  164. package/docs/src/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md +161 -0
  165. package/docs/src/contracts/igps/README.md +6 -0
  166. package/docs/src/contracts/igps/gas-oracles/README.md +4 -0
  167. package/docs/src/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md +114 -0
  168. package/docs/src/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md +25 -0
  169. package/docs/src/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md +43 -0
  170. package/docs/src/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md +33 -0
  171. package/docs/src/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md +55 -0
  172. package/docs/src/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md +12 -0
  173. package/docs/src/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md +13 -0
  174. package/docs/src/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md +19 -0
  175. package/docs/src/contracts/interfaces/IMailbox.sol/interface.IMailbox.md +103 -0
  176. package/docs/src/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md +12 -0
  177. package/docs/src/contracts/interfaces/IRouter.sol/interface.IRouter.md +33 -0
  178. package/docs/src/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md +78 -0
  179. package/docs/src/contracts/interfaces/README.md +17 -0
  180. package/docs/src/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md +12 -0
  181. package/docs/src/contracts/interfaces/hooks/README.md +4 -0
  182. package/docs/src/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md +36 -0
  183. package/docs/src/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md +36 -0
  184. package/docs/src/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md +31 -0
  185. package/docs/src/contracts/interfaces/isms/README.md +6 -0
  186. package/docs/src/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md +64 -0
  187. package/docs/src/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md +21 -0
  188. package/docs/src/contracts/interfaces/middleware/README.md +5 -0
  189. package/docs/src/contracts/isms/README.md +7 -0
  190. package/docs/src/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md +60 -0
  191. package/docs/src/contracts/isms/aggregation/README.md +6 -0
  192. package/docs/src/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md +30 -0
  193. package/docs/src/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md +15 -0
  194. package/docs/src/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md +78 -0
  195. package/docs/src/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md +69 -0
  196. package/docs/src/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md +102 -0
  197. package/docs/src/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md +355 -0
  198. package/docs/src/contracts/isms/multisig/README.md +12 -0
  199. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md +36 -0
  200. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md +11 -0
  201. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md +15 -0
  202. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md +10 -0
  203. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md +15 -0
  204. package/docs/src/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md +44 -0
  205. package/docs/src/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md +66 -0
  206. package/docs/src/contracts/isms/native/README.md +5 -0
  207. package/docs/src/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md +55 -0
  208. package/docs/src/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md +112 -0
  209. package/docs/src/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md +47 -0
  210. package/docs/src/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md +44 -0
  211. package/docs/src/contracts/isms/routing/README.md +7 -0
  212. package/docs/src/contracts/libs/Call.sol/library.CallLib.md +124 -0
  213. package/docs/src/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md +61 -0
  214. package/docs/src/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md +63 -0
  215. package/docs/src/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md +55 -0
  216. package/docs/src/contracts/libs/Merkle.sol/library.MerkleLib.md +354 -0
  217. package/docs/src/contracts/libs/Message.sol/library.Message.md +304 -0
  218. package/docs/src/contracts/libs/MetaProxy.sol/library.MetaProxy.md +36 -0
  219. package/docs/src/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md +34 -0
  220. package/docs/src/contracts/libs/README.md +16 -0
  221. package/docs/src/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md +123 -0
  222. package/docs/src/contracts/libs/TestMerkle.sol/contract.MerkleTree.md +66 -0
  223. package/docs/src/contracts/libs/TypeCasts.sol/library.TypeCasts.md +19 -0
  224. package/docs/src/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md +31 -0
  225. package/docs/src/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md +97 -0
  226. package/docs/src/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md +296 -0
  227. package/docs/src/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md +177 -0
  228. package/docs/src/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md +109 -0
  229. package/docs/src/contracts/libs/isms/README.md +7 -0
  230. package/docs/src/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md +134 -0
  231. package/docs/src/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md +203 -0
  232. package/docs/src/contracts/libs/middleware/README.md +5 -0
  233. package/docs/src/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md +545 -0
  234. package/docs/src/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md +119 -0
  235. package/docs/src/contracts/middleware/README.md +6 -0
  236. package/docs/src/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md +81 -0
  237. package/docs/src/contracts/middleware/liquidity-layer/README.md +6 -0
  238. package/docs/src/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md +197 -0
  239. package/docs/src/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md +189 -0
  240. package/docs/src/contracts/middleware/liquidity-layer/adapters/README.md +5 -0
  241. package/docs/src/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md +23 -0
  242. package/docs/src/contracts/middleware/liquidity-layer/interfaces/README.md +6 -0
  243. package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md +54 -0
  244. package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md +92 -0
  245. package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/README.md +5 -0
  246. package/docs/src/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md +131 -0
  247. package/docs/src/contracts/middleware/liquidity-layer/interfaces/portal/README.md +4 -0
  248. package/docs/src/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md +58 -0
  249. package/docs/src/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md +44 -0
  250. package/docs/src/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md +69 -0
  251. package/docs/src/contracts/mock/MockMailbox.sol/contract.MockMailbox.md +137 -0
  252. package/docs/src/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md +82 -0
  253. package/docs/src/contracts/mock/MockToken.sol/contract.MockToken.md +22 -0
  254. package/docs/src/contracts/mock/README.md +9 -0
  255. package/docs/src/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md +15 -0
  256. package/docs/src/contracts/test/README.md +20 -0
  257. package/docs/src/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md +27 -0
  258. package/docs/src/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md +29 -0
  259. package/docs/src/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md +30 -0
  260. package/docs/src/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md +15 -0
  261. package/docs/src/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md +23 -0
  262. package/docs/src/contracts/test/TestMailbox.sol/contract.TestMailbox.md +29 -0
  263. package/docs/src/contracts/test/TestMerkle.sol/contract.TestMerkle.md +50 -0
  264. package/docs/src/contracts/test/TestMessage.sol/contract.TestMessage.md +68 -0
  265. package/docs/src/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md +51 -0
  266. package/docs/src/contracts/test/TestQuery.sol/contract.TestQuery.md +45 -0
  267. package/docs/src/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md +128 -0
  268. package/docs/src/contracts/test/TestRecipient.sol/contract.TestRecipient.md +78 -0
  269. package/docs/src/contracts/test/TestRouter.sol/contract.TestRouter.md +63 -0
  270. package/docs/src/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md +49 -0
  271. package/docs/src/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md +80 -0
  272. package/docs/src/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md +15 -0
  273. package/docs/src/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md +12 -0
  274. package/docs/src/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md +15 -0
  275. package/docs/src/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md +15 -0
  276. package/docs/src/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md +15 -0
  277. package/docs/src/contracts/test/bad-recipient/README.md +8 -0
  278. package/docs/src/contracts/upgrade/README.md +4 -0
  279. package/docs/src/contracts/upgrade/Versioned.sol/contract.Versioned.md +14 -0
  280. package/package.json +6 -4
@@ -0,0 +1,545 @@
1
+ # InterchainAccountRouter
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/InterchainAccountRouter.sol)
3
+
4
+ **Inherits:**
5
+ [HyperlaneConnectionClient](/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md), [IRouter](/contracts/interfaces/IRouter.sol/interface.IRouter.md), [IInterchainAccountRouter](/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md)
6
+
7
+
8
+ ## State Variables
9
+ ### localDomain
10
+
11
+ ```solidity
12
+ uint32 internal immutable localDomain;
13
+ ```
14
+
15
+
16
+ ### implementation
17
+
18
+ ```solidity
19
+ address internal immutable implementation;
20
+ ```
21
+
22
+
23
+ ### bytecodeHash
24
+
25
+ ```solidity
26
+ bytes32 internal immutable bytecodeHash;
27
+ ```
28
+
29
+
30
+ ### _domains
31
+
32
+ ```solidity
33
+ uint32[] private _domains;
34
+ ```
35
+
36
+
37
+ ### routers
38
+
39
+ ```solidity
40
+ mapping(uint32 => bytes32) public routers;
41
+ ```
42
+
43
+
44
+ ### isms
45
+
46
+ ```solidity
47
+ mapping(uint32 => bytes32) public isms;
48
+ ```
49
+
50
+
51
+ ### __GAP
52
+
53
+ ```solidity
54
+ uint256[47] private __GAP;
55
+ ```
56
+
57
+
58
+ ## Functions
59
+ ### constructor
60
+
61
+ Constructor deploys a relay (OwnableMulticall.sol) contract that
62
+ will be cloned for each interchain account.
63
+
64
+ *Set proxy to address(0) to use this contract without a proxy.*
65
+
66
+
67
+ ```solidity
68
+ constructor(uint32 _localDomain, address _proxy);
69
+ ```
70
+ **Parameters**
71
+
72
+ |Name|Type|Description|
73
+ |----|----|-----------|
74
+ |`_localDomain`|`uint32`|The Hyperlane domain ID on which this contract is deployed.|
75
+ |`_proxy`|`address`|The address of a proxy contract that delegates calls to this contract. Used by OwnableMulticall for access control.|
76
+
77
+
78
+ ### initialize
79
+
80
+ Initializes the contract with HyperlaneConnectionClient contracts
81
+
82
+
83
+ ```solidity
84
+ function initialize(
85
+ address _mailbox,
86
+ address _interchainGasPaymaster,
87
+ address _interchainSecurityModule,
88
+ address _owner
89
+ ) external initializer;
90
+ ```
91
+ **Parameters**
92
+
93
+ |Name|Type|Description|
94
+ |----|----|-----------|
95
+ |`_mailbox`|`address`|The address of the mailbox contract|
96
+ |`_interchainGasPaymaster`|`address`|Unused but required by HyperlaneConnectionClient|
97
+ |`_interchainSecurityModule`|`address`|The address of the local ISM contract|
98
+ |`_owner`|`address`|The address with owner privileges|
99
+
100
+
101
+ ### enrollRemoteRouters
102
+
103
+ Registers the address of many remote InterchainAccountRouter
104
+ contracts to use as a default when making interchain calls
105
+
106
+
107
+ ```solidity
108
+ function enrollRemoteRouters(uint32[] calldata _destinations, bytes32[] calldata _routers) external onlyOwner;
109
+ ```
110
+ **Parameters**
111
+
112
+ |Name|Type|Description|
113
+ |----|----|-----------|
114
+ |`_destinations`|`uint32[]`|The remote domains|
115
+ |`_routers`|`bytes32[]`|The addresses of the remote InterchainAccountRouters|
116
+
117
+
118
+ ### callRemote
119
+
120
+ Dispatches a single remote call to be made by an owner's
121
+ interchain account on the destination domain
122
+
123
+ *Uses the default router and ISM addresses for the destination
124
+ domain, reverting if none have been configured*
125
+
126
+
127
+ ```solidity
128
+ function callRemote(uint32 _destination, address _to, uint256 _value, bytes memory _data) external returns (bytes32);
129
+ ```
130
+ **Parameters**
131
+
132
+ |Name|Type|Description|
133
+ |----|----|-----------|
134
+ |`_destination`|`uint32`|The remote domain of the chain to make calls on|
135
+ |`_to`|`address`|The address of the contract to call|
136
+ |`_value`|`uint256`|The value to include in the call|
137
+ |`_data`|`bytes`|The calldata|
138
+
139
+ **Returns**
140
+
141
+ |Name|Type|Description|
142
+ |----|----|-----------|
143
+ |`<none>`|`bytes32`|The Hyperlane message ID|
144
+
145
+
146
+ ### callRemote
147
+
148
+ Dispatches a sequence of remote calls to be made by an owner's
149
+ interchain account on the destination domain
150
+
151
+ *Uses the default router and ISM addresses for the destination
152
+ domain, reverting if none have been configured*
153
+
154
+ *Recommend using CallLib.build to format the interchain calls.*
155
+
156
+
157
+ ```solidity
158
+ function callRemote(uint32 _destination, CallLib.Call[] calldata _calls) external returns (bytes32);
159
+ ```
160
+ **Parameters**
161
+
162
+ |Name|Type|Description|
163
+ |----|----|-----------|
164
+ |`_destination`|`uint32`|The remote domain of the chain to make calls on|
165
+ |`_calls`|`CallLib.Call[]`|The sequence of calls to make|
166
+
167
+ **Returns**
168
+
169
+ |Name|Type|Description|
170
+ |----|----|-----------|
171
+ |`<none>`|`bytes32`|The Hyperlane message ID|
172
+
173
+
174
+ ### handle
175
+
176
+ Handles dispatched messages by relaying calls to the interchain account
177
+
178
+ *Does not need to be onlyRemoteRouter, as this application is designed
179
+ to receive messages from untrusted remote contracts.*
180
+
181
+
182
+ ```solidity
183
+ function handle(uint32 _origin, bytes32 _sender, bytes calldata _message) external onlyMailbox;
184
+ ```
185
+ **Parameters**
186
+
187
+ |Name|Type|Description|
188
+ |----|----|-----------|
189
+ |`_origin`|`uint32`|The origin domain of the interchain account|
190
+ |`_sender`|`bytes32`|The sender of the interchain message|
191
+ |`_message`|`bytes`|The InterchainAccountMessage containing the account owner, ISM, and sequence of calls to be relayed|
192
+
193
+
194
+ ### getLocalInterchainAccount
195
+
196
+ Returns the local address of an interchain account
197
+
198
+ *This interchain account is not guaranteed to have been deployed*
199
+
200
+
201
+ ```solidity
202
+ function getLocalInterchainAccount(uint32 _origin, address _owner, address _router, address _ism)
203
+ external
204
+ view
205
+ returns (OwnableMulticall);
206
+ ```
207
+ **Parameters**
208
+
209
+ |Name|Type|Description|
210
+ |----|----|-----------|
211
+ |`_origin`|`uint32`|The remote origin domain of the interchain account|
212
+ |`_owner`|`address`|The remote owner of the interchain account|
213
+ |`_router`|`address`|The remote origin InterchainAccountRouter|
214
+ |`_ism`|`address`|The local address of the ISM|
215
+
216
+ **Returns**
217
+
218
+ |Name|Type|Description|
219
+ |----|----|-----------|
220
+ |`<none>`|`OwnableMulticall`|The local address of the interchain account|
221
+
222
+
223
+ ### getRemoteInterchainAccount
224
+
225
+ Returns the remote address of a locally owned interchain account
226
+
227
+ *This interchain account is not guaranteed to have been deployed*
228
+
229
+ *This function will only work if the destination domain is
230
+ EVM compatible*
231
+
232
+
233
+ ```solidity
234
+ function getRemoteInterchainAccount(uint32 _destination, address _owner) external view returns (address);
235
+ ```
236
+ **Parameters**
237
+
238
+ |Name|Type|Description|
239
+ |----|----|-----------|
240
+ |`_destination`|`uint32`|The remote destination domain of the interchain account|
241
+ |`_owner`|`address`|The local owner of the interchain account|
242
+
243
+ **Returns**
244
+
245
+ |Name|Type|Description|
246
+ |----|----|-----------|
247
+ |`<none>`|`address`|The remote address of the interchain account|
248
+
249
+
250
+ ### domains
251
+
252
+
253
+ ```solidity
254
+ function domains() external view returns (uint32[] memory);
255
+ ```
256
+
257
+ ### enrollRemoteRouter
258
+
259
+ Registers the address of a remote InterchainAccountRouter
260
+ contract to use as a default when making interchain calls
261
+
262
+
263
+ ```solidity
264
+ function enrollRemoteRouter(uint32 _destination, bytes32 _router) public onlyOwner;
265
+ ```
266
+ **Parameters**
267
+
268
+ |Name|Type|Description|
269
+ |----|----|-----------|
270
+ |`_destination`|`uint32`|The remote domain|
271
+ |`_router`|`bytes32`|The address of the remote InterchainAccountRouter|
272
+
273
+
274
+ ### enrollRemoteRouterAndIsm
275
+
276
+ Registers the address of remote InterchainAccountRouter
277
+ and ISM contracts to use as a default when making interchain calls
278
+
279
+
280
+ ```solidity
281
+ function enrollRemoteRouterAndIsm(uint32 _destination, bytes32 _router, bytes32 _ism) public onlyOwner;
282
+ ```
283
+ **Parameters**
284
+
285
+ |Name|Type|Description|
286
+ |----|----|-----------|
287
+ |`_destination`|`uint32`|The remote domain|
288
+ |`_router`|`bytes32`|The address of the remote InterchainAccountRouter|
289
+ |`_ism`|`bytes32`|The address of the remote ISM|
290
+
291
+
292
+ ### callRemoteWithOverrides
293
+
294
+ Dispatches a sequence of remote calls to be made by an owner's
295
+ interchain account on the destination domain
296
+
297
+ *Recommend using CallLib.build to format the interchain calls*
298
+
299
+
300
+ ```solidity
301
+ function callRemoteWithOverrides(uint32 _destination, bytes32 _router, bytes32 _ism, CallLib.Call[] calldata _calls)
302
+ public
303
+ returns (bytes32);
304
+ ```
305
+ **Parameters**
306
+
307
+ |Name|Type|Description|
308
+ |----|----|-----------|
309
+ |`_destination`|`uint32`|The remote domain of the chain to make calls on|
310
+ |`_router`|`bytes32`|The remote router address|
311
+ |`_ism`|`bytes32`|The remote ISM address|
312
+ |`_calls`|`CallLib.Call[]`|The sequence of calls to make|
313
+
314
+ **Returns**
315
+
316
+ |Name|Type|Description|
317
+ |----|----|-----------|
318
+ |`<none>`|`bytes32`|The Hyperlane message ID|
319
+
320
+
321
+ ### getDeployedInterchainAccount
322
+
323
+ Returns and deploys (if not already) an interchain account
324
+
325
+
326
+ ```solidity
327
+ function getDeployedInterchainAccount(uint32 _origin, address _owner, address _router, address _ism)
328
+ public
329
+ returns (OwnableMulticall);
330
+ ```
331
+ **Parameters**
332
+
333
+ |Name|Type|Description|
334
+ |----|----|-----------|
335
+ |`_origin`|`uint32`|The remote origin domain of the interchain account|
336
+ |`_owner`|`address`|The remote owner of the interchain account|
337
+ |`_router`|`address`|The remote origin InterchainAccountRouter|
338
+ |`_ism`|`address`|The local address of the ISM|
339
+
340
+ **Returns**
341
+
342
+ |Name|Type|Description|
343
+ |----|----|-----------|
344
+ |`<none>`|`OwnableMulticall`|The address of the interchain account|
345
+
346
+
347
+ ### getDeployedInterchainAccount
348
+
349
+ Returns and deploys (if not already) an interchain account
350
+
351
+
352
+ ```solidity
353
+ function getDeployedInterchainAccount(uint32 _origin, bytes32 _owner, bytes32 _router, address _ism)
354
+ public
355
+ returns (OwnableMulticall);
356
+ ```
357
+ **Parameters**
358
+
359
+ |Name|Type|Description|
360
+ |----|----|-----------|
361
+ |`_origin`|`uint32`|The remote origin domain of the interchain account|
362
+ |`_owner`|`bytes32`|The remote owner of the interchain account|
363
+ |`_router`|`bytes32`|The remote origin InterchainAccountRouter|
364
+ |`_ism`|`address`|The local address of the ISM|
365
+
366
+ **Returns**
367
+
368
+ |Name|Type|Description|
369
+ |----|----|-----------|
370
+ |`<none>`|`OwnableMulticall`|The address of the interchain account|
371
+
372
+
373
+ ### getLocalInterchainAccount
374
+
375
+ Returns the local address of a remotely owned interchain account
376
+
377
+ *This interchain account is not guaranteed to have been deployed*
378
+
379
+
380
+ ```solidity
381
+ function getLocalInterchainAccount(uint32 _origin, bytes32 _owner, bytes32 _router, address _ism)
382
+ public
383
+ view
384
+ returns (OwnableMulticall);
385
+ ```
386
+ **Parameters**
387
+
388
+ |Name|Type|Description|
389
+ |----|----|-----------|
390
+ |`_origin`|`uint32`|The remote origin domain of the interchain account|
391
+ |`_owner`|`bytes32`|The remote owner of the interchain account|
392
+ |`_router`|`bytes32`|The remote InterchainAccountRouter|
393
+ |`_ism`|`address`|The local address of the ISM|
394
+
395
+ **Returns**
396
+
397
+ |Name|Type|Description|
398
+ |----|----|-----------|
399
+ |`<none>`|`OwnableMulticall`|The local address of the interchain account|
400
+
401
+
402
+ ### getRemoteInterchainAccount
403
+
404
+ Returns the remote address of a locally owned interchain account
405
+
406
+ *This interchain account is not guaranteed to have been deployed*
407
+
408
+ *This function will only work if the destination domain is
409
+ EVM compatible*
410
+
411
+
412
+ ```solidity
413
+ function getRemoteInterchainAccount(address _owner, address _router, address _ism) public view returns (address);
414
+ ```
415
+ **Parameters**
416
+
417
+ |Name|Type|Description|
418
+ |----|----|-----------|
419
+ |`_owner`|`address`|The local owner of the interchain account|
420
+ |`_router`|`address`|The remote InterchainAccountRouter|
421
+ |`_ism`|`address`|The remote address of the ISM|
422
+
423
+ **Returns**
424
+
425
+ |Name|Type|Description|
426
+ |----|----|-----------|
427
+ |`<none>`|`address`|The remote address of the interchain account|
428
+
429
+
430
+ ### _enrollRemoteRouterAndIsm
431
+
432
+ Registers the address of remote InterchainAccountRouter
433
+ and ISM contracts to use as a default when making interchain calls
434
+
435
+
436
+ ```solidity
437
+ function _enrollRemoteRouterAndIsm(uint32 _destination, bytes32 _router, bytes32 _ism) private;
438
+ ```
439
+ **Parameters**
440
+
441
+ |Name|Type|Description|
442
+ |----|----|-----------|
443
+ |`_destination`|`uint32`|The remote domain|
444
+ |`_router`|`bytes32`|The address of the remote InterchainAccountRouter|
445
+ |`_ism`|`bytes32`|The address of the remote ISM|
446
+
447
+
448
+ ### _dispatchMessage
449
+
450
+ Dispatches an InterchainAccountMessage to the remote router
451
+
452
+
453
+ ```solidity
454
+ function _dispatchMessage(uint32 _destination, bytes32 _router, bytes32 _ism, bytes memory _body)
455
+ private
456
+ returns (bytes32);
457
+ ```
458
+ **Parameters**
459
+
460
+ |Name|Type|Description|
461
+ |----|----|-----------|
462
+ |`_destination`|`uint32`|The remote domain|
463
+ |`_router`|`bytes32`|The address of the remote InterchainAccountRouter|
464
+ |`_ism`|`bytes32`|The address of the remote ISM|
465
+ |`_body`|`bytes`|The InterchainAccountMessage body|
466
+
467
+
468
+ ### _getSalt
469
+
470
+ Returns the salt used to deploy an interchain account
471
+
472
+
473
+ ```solidity
474
+ function _getSalt(uint32 _origin, bytes32 _owner, bytes32 _router, bytes32 _ism) private pure returns (bytes32);
475
+ ```
476
+ **Parameters**
477
+
478
+ |Name|Type|Description|
479
+ |----|----|-----------|
480
+ |`_origin`|`uint32`|The remote origin domain of the interchain account|
481
+ |`_owner`|`bytes32`|The remote owner of the interchain account|
482
+ |`_router`|`bytes32`|The remote origin InterchainAccountRouter|
483
+ |`_ism`|`bytes32`|The local address of the ISM|
484
+
485
+ **Returns**
486
+
487
+ |Name|Type|Description|
488
+ |----|----|-----------|
489
+ |`<none>`|`bytes32`|The CREATE2 salt used for deploying the interchain account|
490
+
491
+
492
+ ### _getLocalInterchainAccount
493
+
494
+ Returns the address of the interchain account on the local chain
495
+
496
+
497
+ ```solidity
498
+ function _getLocalInterchainAccount(bytes32 _salt) private view returns (address payable);
499
+ ```
500
+ **Parameters**
501
+
502
+ |Name|Type|Description|
503
+ |----|----|-----------|
504
+ |`_salt`|`bytes32`|The CREATE2 salt used for deploying the interchain account|
505
+
506
+ **Returns**
507
+
508
+ |Name|Type|Description|
509
+ |----|----|-----------|
510
+ |`<none>`|`address payable`|The address of the interchain account|
511
+
512
+
513
+ ## Events
514
+ ### RemoteRouterEnrolled
515
+ Emitted when a default router is set for a remote domain
516
+
517
+
518
+ ```solidity
519
+ event RemoteRouterEnrolled(uint32 indexed domain, bytes32 router);
520
+ ```
521
+
522
+ ### RemoteIsmEnrolled
523
+ Emitted when a default ISM is set for a remote domain
524
+
525
+
526
+ ```solidity
527
+ event RemoteIsmEnrolled(uint32 indexed domain, bytes32 ism);
528
+ ```
529
+
530
+ ### RemoteCallDispatched
531
+ Emitted when an interchain call is dispatched to a remote domain
532
+
533
+
534
+ ```solidity
535
+ event RemoteCallDispatched(uint32 indexed destination, address indexed owner, bytes32 router, bytes32 ism);
536
+ ```
537
+
538
+ ### InterchainAccountCreated
539
+ Emitted when an interchain account contract is deployed
540
+
541
+
542
+ ```solidity
543
+ event InterchainAccountCreated(uint32 indexed origin, bytes32 indexed owner, address ism, address account);
544
+ ```
545
+
@@ -0,0 +1,119 @@
1
+ # InterchainQueryRouter
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/InterchainQueryRouter.sol)
3
+
4
+ **Inherits:**
5
+ [Router](/contracts/Router.sol/abstract.Router.md), [IInterchainQueryRouter](/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md)
6
+
7
+ *Currently does not support Sovereign Consensus (user specified Interchain Security Modules).*
8
+
9
+
10
+ ## Functions
11
+ ### initialize
12
+
13
+ Initializes the Router contract with Hyperlane core contracts and the address of the interchain security module.
14
+
15
+
16
+ ```solidity
17
+ function initialize(
18
+ address _mailbox,
19
+ address _interchainGasPaymaster,
20
+ address _interchainSecurityModule,
21
+ address _owner
22
+ ) external initializer;
23
+ ```
24
+ **Parameters**
25
+
26
+ |Name|Type|Description|
27
+ |----|----|-----------|
28
+ |`_mailbox`|`address`|The address of the mailbox contract.|
29
+ |`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.|
30
+ |`_interchainSecurityModule`|`address`|The address of the interchain security module contract.|
31
+ |`_owner`|`address`|The address with owner privileges.|
32
+
33
+
34
+ ### query
35
+
36
+ Dispatches a sequence of static calls (query) to the destination domain and set of callbacks to resolve the results on the dispatcher.
37
+
38
+ *Callbacks must be returned to the `msg.sender` for security reasons. Require this contract is the `msg.sender` on callbacks.*
39
+
40
+
41
+ ```solidity
42
+ function query(uint32 _destination, address _to, bytes memory _data, bytes memory _callback)
43
+ public
44
+ returns (bytes32 messageId);
45
+ ```
46
+ **Parameters**
47
+
48
+ |Name|Type|Description|
49
+ |----|----|-----------|
50
+ |`_destination`|`uint32`|The domain of the chain to query.|
51
+ |`_to`|`address`|The address of the contract to query|
52
+ |`_data`|`bytes`|The calldata encoding the query|
53
+ |`_callback`|`bytes`|The calldata of the callback that will be made on the sender. The return value of the query will be appended.|
54
+
55
+
56
+ ### query
57
+
58
+ Dispatches a sequence of static calls (query) to the destination domain and set of callbacks to resolve the results on the dispatcher.
59
+
60
+ *Recommend using CallLib.build to format the interchain calls.*
61
+
62
+ *Callbacks must be returned to the `msg.sender` for security reasons. Require this contract is the `msg.sender` on callbacks.*
63
+
64
+
65
+ ```solidity
66
+ function query(uint32 _destination, CallLib.StaticCallWithCallback[] calldata calls)
67
+ public
68
+ returns (bytes32 messageId);
69
+ ```
70
+ **Parameters**
71
+
72
+ |Name|Type|Description|
73
+ |----|----|-----------|
74
+ |`_destination`|`uint32`|The domain of the chain to query.|
75
+ |`calls`|`CallLib.StaticCallWithCallback[]`|The sequence of static calls to dispatch and callbacks on the sender to resolve the results.|
76
+
77
+
78
+ ### _handle
79
+
80
+ Handles a message from remote enrolled Interchain Query Router.
81
+
82
+
83
+ ```solidity
84
+ function _handle(uint32 _origin, bytes32, bytes calldata _message) internal override;
85
+ ```
86
+ **Parameters**
87
+
88
+ |Name|Type|Description|
89
+ |----|----|-----------|
90
+ |`_origin`|`uint32`|The domain of the chain that sent the message.|
91
+ |`<none>`|`bytes32`||
92
+ |`_message`|`bytes`|The ABI-encoded interchain query.|
93
+
94
+
95
+ ## Events
96
+ ### QueryDispatched
97
+ Emitted when a query is dispatched to another chain.
98
+
99
+
100
+ ```solidity
101
+ event QueryDispatched(uint32 indexed destination, address indexed sender);
102
+ ```
103
+
104
+ ### QueryExecuted
105
+ Emitted when a query is executed on the and callback dispatched to the origin chain.
106
+
107
+
108
+ ```solidity
109
+ event QueryExecuted(uint32 indexed originDomain, bytes32 indexed sender);
110
+ ```
111
+
112
+ ### QueryResolved
113
+ Emitted when a query is resolved on the origin chain.
114
+
115
+
116
+ ```solidity
117
+ event QueryResolved(uint32 indexed destination, address indexed sender);
118
+ ```
119
+
@@ -0,0 +1,6 @@
1
+
2
+
3
+ # Contents
4
+ - [liquidity-layer](/contracts/middleware/liquidity-layer)
5
+ - [InterchainAccountRouter](InterchainAccountRouter.sol/contract.InterchainAccountRouter.md)
6
+ - [InterchainQueryRouter](InterchainQueryRouter.sol/contract.InterchainQueryRouter.md)