@hyperlane-xyz/helloworld 1.5.8 → 3.1.0-beta0

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 (213) hide show
  1. package/contracts/HelloWorld.sol +23 -13
  2. package/dist/hardhat.config.js +1 -1
  3. package/dist/hardhat.config.js.map +1 -1
  4. package/dist/src/app/app.d.ts.map +1 -1
  5. package/dist/src/app/app.js +2 -1
  6. package/dist/src/app/app.js.map +1 -1
  7. package/dist/src/deploy/deploy.d.ts.map +1 -1
  8. package/dist/src/deploy/deploy.js +2 -1
  9. package/dist/src/deploy/deploy.js.map +1 -1
  10. package/dist/src/multiProtocolApp/evmAdapter.d.ts.map +1 -1
  11. package/dist/src/multiProtocolApp/evmAdapter.js +4 -2
  12. package/dist/src/multiProtocolApp/evmAdapter.js.map +1 -1
  13. package/dist/src/scripts/check.js +1 -2
  14. package/dist/src/scripts/check.js.map +1 -1
  15. package/dist/src/scripts/deploy.js +1 -2
  16. package/dist/src/scripts/deploy.js.map +1 -1
  17. package/dist/src/test/deploy.test.js +4 -2
  18. package/dist/src/test/deploy.test.js.map +1 -1
  19. package/dist/src/test/helloworld.test.js +15 -17
  20. package/dist/src/test/helloworld.test.js.map +1 -1
  21. package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts +260 -0
  22. package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts.map +1 -0
  23. package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js +4 -0
  24. package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js.map +1 -0
  25. package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.d.ts +445 -0
  26. package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.d.ts.map +1 -0
  27. package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.js +4 -0
  28. package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.js.map +1 -0
  29. package/dist/src/types/@hyperlane-xyz/core/contracts/client/index.d.ts +3 -0
  30. package/dist/src/types/@hyperlane-xyz/core/contracts/client/index.d.ts.map +1 -0
  31. package/dist/src/types/@hyperlane-xyz/core/contracts/{Router.js → client/index.js} +1 -1
  32. package/dist/src/types/@hyperlane-xyz/core/contracts/client/index.js.map +1 -0
  33. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts +3 -0
  34. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +1 -0
  35. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.js +4 -0
  36. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.js.map +1 -0
  37. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts +50 -0
  38. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts.map +1 -0
  39. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js +4 -0
  40. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js.map +1 -0
  41. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +2 -0
  42. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +1 -0
  43. package/dist/src/types/@hyperlane-xyz/core/contracts/{interfaces/IInterchainGasPaymaster.js → hooks/libs/index.js} +1 -1
  44. package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +1 -0
  45. package/dist/src/types/@hyperlane-xyz/core/contracts/index.d.ts +4 -2
  46. package/dist/src/types/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -1
  47. package/dist/src/types/@hyperlane-xyz/core/contracts/index.js +1 -0
  48. package/dist/src/types/@hyperlane-xyz/core/contracts/index.js.map +1 -1
  49. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts +25 -3
  50. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -1
  51. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +1 -0
  52. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -1
  53. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +10 -3
  54. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -1
  55. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +1 -0
  56. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -1
  57. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts +163 -44
  58. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts.map +1 -1
  59. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js +1 -0
  60. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js.map +1 -1
  61. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts +22 -7
  62. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts.map +1 -1
  63. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js +1 -0
  64. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js.map +1 -1
  65. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts +111 -0
  66. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts.map +1 -0
  67. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js +4 -0
  68. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js.map +1 -0
  69. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +2 -0
  70. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +1 -0
  71. package/dist/src/types/@hyperlane-xyz/core/contracts/{HyperlaneConnectionClient.js → interfaces/hooks/index.js} +1 -1
  72. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +1 -0
  73. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +2 -2
  74. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -1
  75. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.js +1 -0
  76. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -1
  77. package/dist/src/types/@hyperlane-xyz/core/index.d.ts.map +1 -1
  78. package/dist/src/types/@hyperlane-xyz/core/index.js +1 -0
  79. package/dist/src/types/@hyperlane-xyz/core/index.js.map +1 -1
  80. package/dist/src/types/@hyperlane-xyz/index.d.ts.map +1 -1
  81. package/dist/src/types/@hyperlane-xyz/index.js +1 -0
  82. package/dist/src/types/@hyperlane-xyz/index.js.map +1 -1
  83. package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts +42 -3
  84. package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts.map +1 -1
  85. package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js +1 -0
  86. package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js.map +1 -1
  87. package/dist/src/types/@openzeppelin/contracts-upgradeable/index.d.ts +2 -2
  88. package/dist/src/types/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -1
  89. package/dist/src/types/@openzeppelin/contracts-upgradeable/index.js +1 -0
  90. package/dist/src/types/@openzeppelin/contracts-upgradeable/index.js.map +1 -1
  91. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -1
  92. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/index.js +1 -0
  93. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/index.js.map +1 -1
  94. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts +3 -2
  95. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts.map +1 -1
  96. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js +1 -0
  97. package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js.map +1 -1
  98. package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts +3 -2
  99. package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts.map +1 -1
  100. package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js +1 -0
  101. package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js.map +1 -1
  102. package/dist/src/types/@openzeppelin/index.d.ts.map +1 -1
  103. package/dist/src/types/@openzeppelin/index.js +1 -0
  104. package/dist/src/types/@openzeppelin/index.js.map +1 -1
  105. package/dist/src/types/common.d.ts.map +1 -1
  106. package/dist/src/types/common.js +1 -0
  107. package/dist/src/types/common.js.map +1 -1
  108. package/dist/src/types/contracts/HelloWorld.d.ts +309 -75
  109. package/dist/src/types/contracts/HelloWorld.d.ts.map +1 -1
  110. package/dist/src/types/contracts/HelloWorld.js +1 -0
  111. package/dist/src/types/contracts/HelloWorld.js.map +1 -1
  112. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{HyperlaneConnectionClient__factory.d.ts → client/MailboxClient__factory.d.ts} +6 -6
  113. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.d.ts.map +1 -0
  114. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{HyperlaneConnectionClient__factory.js → client/MailboxClient__factory.js} +22 -63
  115. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.js.map +1 -0
  116. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{Router__factory.d.ts → client/Router__factory.d.ts} +2 -2
  117. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.d.ts.map +1 -0
  118. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{Router__factory.js → client/Router__factory.js} +37 -71
  119. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.js.map +1 -0
  120. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts +3 -0
  121. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts.map +1 -0
  122. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.js +11 -0
  123. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.js.map +1 -0
  124. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts +2 -0
  125. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +1 -0
  126. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js +31 -0
  127. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js.map +1 -0
  128. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts +31 -0
  129. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts.map +1 -0
  130. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js +54 -0
  131. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js.map +1 -0
  132. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +2 -0
  133. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +1 -0
  134. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js +9 -0
  135. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +1 -0
  136. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.d.ts +2 -2
  137. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -1
  138. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.js +3 -5
  139. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.js.map +1 -1
  140. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts +2 -2
  141. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -1
  142. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +0 -2
  143. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -1
  144. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +2 -2
  145. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -1
  146. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +0 -2
  147. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -1
  148. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts +2 -2
  149. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts.map +1 -1
  150. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js +181 -26
  151. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js.map +1 -1
  152. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts +2 -2
  153. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts.map +1 -1
  154. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js +1 -3
  155. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js.map +1 -1
  156. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts +23 -0
  157. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts.map +1 -0
  158. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js +92 -0
  159. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js.map +1 -0
  160. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +2 -0
  161. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +1 -0
  162. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js +9 -0
  163. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +1 -0
  164. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +1 -2
  165. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -1
  166. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js +2 -5
  167. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -1
  168. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts +2 -2
  169. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts.map +1 -1
  170. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js +0 -2
  171. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js.map +1 -1
  172. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts +2 -2
  173. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts.map +1 -1
  174. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js +0 -2
  175. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js.map +1 -1
  176. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts +2 -2
  177. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts.map +1 -1
  178. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js +0 -2
  179. package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js.map +1 -1
  180. package/dist/src/types/factories/contracts/HelloWorld__factory.d.ts +5 -5
  181. package/dist/src/types/factories/contracts/HelloWorld__factory.d.ts.map +1 -1
  182. package/dist/src/types/factories/contracts/HelloWorld__factory.js +68 -78
  183. package/dist/src/types/factories/contracts/HelloWorld__factory.js.map +1 -1
  184. package/dist/src/types/index.d.ts +10 -10
  185. package/dist/src/types/index.d.ts.map +1 -1
  186. package/dist/src/types/index.js +10 -9
  187. package/dist/src/types/index.js.map +1 -1
  188. package/package.json +12 -10
  189. package/dist/src/types/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient.d.ts +0 -202
  190. package/dist/src/types/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient.d.ts.map +0 -1
  191. package/dist/src/types/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient.js.map +0 -1
  192. package/dist/src/types/@hyperlane-xyz/core/contracts/Router.d.ts +0 -279
  193. package/dist/src/types/@hyperlane-xyz/core/contracts/Router.d.ts.map +0 -1
  194. package/dist/src/types/@hyperlane-xyz/core/contracts/Router.js.map +0 -1
  195. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.d.ts +0 -107
  196. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.d.ts.map +0 -1
  197. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.js +0 -3
  198. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.js.map +0 -1
  199. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster.d.ts +0 -76
  200. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster.d.ts.map +0 -1
  201. package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster.js.map +0 -1
  202. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient__factory.d.ts.map +0 -1
  203. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient__factory.js.map +0 -1
  204. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/Router__factory.d.ts.map +0 -1
  205. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/Router__factory.js.map +0 -1
  206. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts +0 -29
  207. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts.map +0 -1
  208. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.js +0 -98
  209. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.js.map +0 -1
  210. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts +0 -36
  211. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts.map +0 -1
  212. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.js +0 -97
  213. package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.js.map +0 -1
@@ -2,7 +2,8 @@
2
2
  pragma solidity ^0.8.13;
3
3
 
4
4
  // ============ External Imports ============
5
- import {Router} from "@hyperlane-xyz/core/contracts/Router.sol";
5
+ import {Router} from "@hyperlane-xyz/core/contracts/client/Router.sol";
6
+ import {StandardHookMetadata} from "@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.sol";
6
7
 
7
8
  /*
8
9
  * @title The Hello World App
@@ -42,13 +43,10 @@ contract HelloWorld is Router {
42
43
  uint256 handleGasAmount
43
44
  );
44
45
 
45
- constructor(address _mailbox, address _interchainGasPaymaster) {
46
+ constructor(address _mailbox, address _hook) Router(_mailbox) {
46
47
  // Transfer ownership of the contract to deployer
47
48
  _transferOwnership(msg.sender);
48
- // Set the addresses for the Mailbox and IGP
49
- // Alternatively, this could be done later in an initialize method
50
- _setMailbox(_mailbox);
51
- _setInterchainGasPaymaster(_interchainGasPaymaster);
49
+ setHook(_hook);
52
50
  }
53
51
 
54
52
  // ============ External functions ============
@@ -65,13 +63,7 @@ contract HelloWorld is Router {
65
63
  {
66
64
  sent += 1;
67
65
  sentTo[_destinationDomain] += 1;
68
- _dispatchWithGas(
69
- _destinationDomain,
70
- bytes(_message),
71
- HANDLE_GAS_AMOUNT,
72
- msg.value,
73
- msg.sender
74
- );
66
+ _dispatch(_destinationDomain, bytes(_message));
75
67
  emit SentHelloWorld(
76
68
  mailbox.localDomain(),
77
69
  _destinationDomain,
@@ -79,7 +71,25 @@ contract HelloWorld is Router {
79
71
  );
80
72
  }
81
73
 
74
+ /**
75
+ * @notice Fetches the amount of gas that will be used when a message is
76
+ * dispatched to the given domain.
77
+ */
78
+ function quoteDispatch(uint32 _destinationDomain, bytes calldata _message)
79
+ external
80
+ view
81
+ returns (uint256)
82
+ {
83
+ return _quoteDispatch(_destinationDomain, _message);
84
+ }
85
+
82
86
  // ============ Internal functions ============
87
+ function _metadata(
88
+ uint32 /*_destinationDomain*/
89
+ ) internal view override returns (bytes memory) {
90
+ return
91
+ StandardHookMetadata.formatMetadata(HANDLE_GAS_AMOUNT, msg.sender);
92
+ }
83
93
 
84
94
  /**
85
95
  * @notice Handles a message from a remote router.
@@ -22,7 +22,7 @@ module.exports = {
22
22
  typechain: {
23
23
  outDir: './src/types',
24
24
  target: 'ethers-v5',
25
- alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads?
25
+ alwaysGenerateOverloads: true,
26
26
  },
27
27
  };
28
28
  //# sourceMappingURL=hardhat.config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAmC;AACnC,8BAA4B;AAC5B,gCAA8B;AAC9B,6BAA2B;AAE3B;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACf,QAAQ,EAAE;QACR,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,WAAW;QACnB,uBAAuB,EAAE,KAAK,EAAE,mHAAmH;KACpJ;CACF,CAAC"}
1
+ {"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAmC;AACnC,8BAA4B;AAC5B,gCAA8B;AAC9B,6BAA2B;AAE3B;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACf,QAAQ,EAAE;QACR,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,WAAW;QACnB,uBAAuB,EAAE,IAAI;KAC9B;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,SAAS,EACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAS,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,qBAAa,aAAc,SAAQ,SAAS,CAAC,mBAAmB,CAAC;aAE7C,IAAI,EAAE,aAAa;gBAAnB,IAAI,EAAE,aAAa,EACnC,YAAY,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACxD,aAAa,EAAE,aAAa,EAC5B,kBAAkB,GAAE,QAAQ,CAAC,OAAO,CAAM;IAK5C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAIhE,cAAc,CAClB,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,SAAS,EACb,OAAO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EACf,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC;IA6B5B,qBAAqB,CACzB,OAAO,EAAE,MAAM,CAAC,eAAe,GAC9B,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;IAI9B,uBAAuB,CAC3B,OAAO,EAAE,MAAM,CAAC,eAAe,GAC9B,OAAO,CAAC,IAAI,CAAC;IAIV,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IAWjE,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;CAcvD"}
@@ -18,10 +18,11 @@ class HelloWorldApp extends sdk_1.RouterApp {
18
18
  // apply gas buffer due to https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/634
19
19
  const estimated = await sender.estimateGas.sendHelloWorld(toDomain, message, { ...transactionOverrides, value });
20
20
  const gasLimit = estimated.mul(12).div(10);
21
+ const quote = await sender.quoteDispatch(toDomain, message);
21
22
  const tx = await sender.sendHelloWorld(toDomain, message, {
22
23
  ...transactionOverrides,
23
24
  gasLimit,
24
- value,
25
+ value: value.add(quote),
25
26
  });
26
27
  (0, utils_1.debug)('Sending hello message', {
27
28
  from,
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":";;;AAEA,4CAQ4B;AAC5B,gDAAsD;AAOtD,MAAa,aAAc,SAAQ,eAA8B;IAC/D,YACkB,IAAmB,EACnC,YAAwD,EACxD,aAA4B,EAC5B,qBAAwC,EAAE;QAE1C,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,kBAAkB,CAAC,CAAC;QALlD,SAAI,GAAJ,IAAI,CAAe;IAMrC,CAAC;IAED,MAAM,CAAC,SAAkD;QACvD,OAAO,SAAS,CA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AC,CAAC,CACH,CAAC;QACF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF;AArFD,sCAqFC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAuB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,kBAAmB,SAAQ,uBAAuB,CAC7D,gBAAgB,EAChB,mBAAmB,CACpB;IAGG,QAAQ,CAAC,UAAU,CAAC;gBADpB,aAAa,EAAE,aAAa,EACnB,UAAU,CAAC,iCAAqB;IAK3C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAMhE,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB;;;CASjE"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAuB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,kBAAmB,SAAQ,uBAAuB,CAC7D,gBAAgB,EAChB,mBAAmB,CACpB;IAGG,QAAQ,CAAC,UAAU,CAAC;gBADpB,aAAa,EAAE,aAAa,EACnB,UAAU,CAAC,iCAAqB;IAK3C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAMhE,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB;;;CASjE"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HelloWorldDeployer = void 0;
4
+ const ethers_1 = require("ethers");
4
5
  const sdk_1 = require("@hyperlane-xyz/sdk");
5
6
  const contracts_1 = require("../app/contracts");
6
7
  class HelloWorldDeployer extends sdk_1.HyperlaneRouterDeployer {
@@ -16,7 +17,7 @@ class HelloWorldDeployer extends sdk_1.HyperlaneRouterDeployer {
16
17
  async deployContracts(chain, config) {
17
18
  const router = await this.deployContract(chain, 'router', [
18
19
  config.mailbox,
19
- config.interchainGasPaymaster,
20
+ config.hook ?? ethers_1.ethers.constants.AddressZero,
20
21
  ]);
21
22
  return {
22
23
  router,
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":";;;AAAA,4CAM4B;AAE5B,gDAA4E;AAK5E,MAAa,kBAAmB,SAAQ,6BAGvC;IACC,YACE,aAA4B,EACnB,UAAgC;QAEzC,KAAK,CAAC,aAAa,EAAE,+BAAmB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAFjD,eAAU,GAAV,UAAU,CAAsB;IAG3C,CAAC;IAED,MAAM,CAAC,SAAkD;QACvD,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,+CAA+C;IAC/C,mEAAmE;IACnE,KAAK,CAAC,eAAe,CAAC,KAAgB,EAAE,MAAwB;QAC9D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE;YACxD,MAAM,CAAC,OAAO;YACd,MAAM,CAAC,sBAAsB;SAC9B,CAAC,CAAC;QACH,OAAO;YACL,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AA1BD,gDA0BC"}
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,4CAM4B;AAE5B,gDAA4E;AAK5E,MAAa,kBAAmB,SAAQ,6BAGvC;IACC,YACE,aAA4B,EACnB,UAAgC;QAEzC,KAAK,CAAC,aAAa,EAAE,+BAAmB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAFjD,eAAU,GAAV,UAAU,CAAsB;IAG3C,CAAC;IAED,MAAM,CAAC,SAAkD;QACvD,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,+CAA+C;IAC/C,mEAAmE;IACnE,KAAK,CAAC,eAAe,CAAC,KAAgB,EAAE,MAAwB;QAC9D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE;YACxD,MAAM,CAAC,OAAO;YACd,MAAM,CAAC,IAAI,IAAI,eAAM,CAAC,SAAS,CAAC,WAAW;SAC5C,CAAC,CAAC;QACH,OAAO;YACL,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AA1BD,gDA0BC"}
@@ -1 +1 @@
1
- {"version":3,"file":"evmAdapter.d.ts","sourceRoot":"","sources":["../../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,oBACX,SAAQ,gBACR,YAAW,kBAAkB;aAGX,SAAS,EAAE,SAAS;aACpB,aAAa,EAAE,qBAAqB;aACpC,SA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AAC,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAO9C,oBAAoB,IAAI,UAAU;CAM5C"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EvmHelloWorldAdapter = void 0;
4
+ const ethers_1 = require("ethers");
4
5
  const sdk_1 = require("@hyperlane-xyz/sdk");
5
6
  const types_1 = require("../types");
6
7
  class EvmHelloWorldAdapter extends sdk_1.EvmRouterAdapter {
@@ -14,13 +15,14 @@ class EvmHelloWorldAdapter extends sdk_1.EvmRouterAdapter {
14
15
  const contract = this.getConnectedContract();
15
16
  const toDomain = this.multiProvider.getDomainId(destination);
16
17
  const { transactionOverrides } = this.multiProvider.getChainMetadata(this.chainName);
18
+ const quote = await contract.callStatic.quoteDispatch(toDomain, ethers_1.ethers.utils.toUtf8Bytes(message));
17
19
  // apply gas buffer due to https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/634
18
- const estimated = await contract.estimateGas.sendHelloWorld(toDomain, message, { ...transactionOverrides, value });
20
+ const estimated = await contract.estimateGas.sendHelloWorld(toDomain, message, { ...transactionOverrides, value: ethers_1.BigNumber.from(value).add(quote) });
19
21
  const gasLimit = estimated.mul(12).div(10);
20
22
  const tx = await contract.populateTransaction.sendHelloWorld(toDomain, message, {
21
23
  ...transactionOverrides,
22
24
  gasLimit,
23
- value,
25
+ value: ethers_1.BigNumber.from(value).add(quote),
24
26
  });
25
27
  return { transaction: tx, type: sdk_1.ProviderType.EthersV5 };
26
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"evmAdapter.js","sourceRoot":"","sources":["../../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":";;;AAAA,4CAM4B;AAG5B,oCAA2D;AAI3D,MAAa,oBACX,SAAQ,sBAAgB;IAGxB,YACkB,SAAoB,EACpB,aAAoC,EACpC,SAAgD;QAEhE,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,CAAC,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M,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAE3C,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,mBAAmB,CAAC,cAAc,CAC1D,QAAQ,EACR,OAAO,EACP;YACE,GAAG,oBAAoB;YACvB,QAAQ;YACR,KAAK,EAAE,kBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;SACxC,CACF,CAAC;QACF,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAY,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,WAAsB;QACnC,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,cAAc,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACnD,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAEQ,oBAAoB;QAC3B,OAAO,2BAAmB,CAAC,OAAO,CAChC,IAAI,CAAC,SAAS,CAAC,MAAM,EACrB,IAAI,CAAC,WAAW,EAAE,CACnB,CAAC;IACJ,CAAC;CACF;AA5DD,oDA4DC"}
@@ -14,9 +14,8 @@ async function check() {
14
14
  const multiProvider = new sdk_1.MultiProvider(config_1.prodConfigs);
15
15
  const contractsMap = (0, sdk_1.attachContractsMap)(deploymentAddresses, contracts_1.helloWorldFactories);
16
16
  const core = sdk_1.HyperlaneCore.fromEnvironment('testnet', multiProvider);
17
- const igp = sdk_1.HyperlaneIgp.fromEnvironment('testnet', multiProvider);
18
17
  const app = new app_1.HelloWorldApp(core, contractsMap, multiProvider);
19
- const config = (0, sdk_1.createRouterConfigMap)(ownerAddress, core.contractsMap, igp.contractsMap);
18
+ const config = core.getRouterConfig(ownerAddress);
20
19
  console.info('Starting check');
21
20
  const helloWorldChecker = new check_1.HelloWorldChecker(multiProvider, app, config);
22
21
  await helloWorldChecker.check();
@@ -1 +1 @@
1
- {"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/scripts/check.ts"],"names":[],"mappings":";;AAAA,4CAM4B;AAE5B,oCAA2C;AAC3C,gDAAuD;AACvD,2CAAoD;AACpD,6CAA+C;AAE/C,iEAAiE;AACjE,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,kCAAkC;AAClC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,KAAK,UAAU,KAAK;IAClB,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,IAAI,mBAAa,CAAC,oBAAW,CAAC,CAAC;IAErD,MAAM,YAAY,GAAG,IAAA,wBAAkB,EACrC,mBAAmB,EACnB,+BAAmB,CACpB,CAAC;IAEF,MAAM,IAAI,GAAG,mBAAa,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACrE,MAAM,GAAG,GAAG,kBAAY,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACnE,MAAM,GAAG,GAAG,IAAI,mBAAa,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,IAAA,2BAAqB,EAClC,YAAY,EACZ,IAAI,CAAC,YAAY,EACjB,GAAG,CAAC,YAAY,CACjB,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/B,MAAM,iBAAiB,GAAG,IAAI,yBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5E,MAAM,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAChC,iBAAiB,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAED,KAAK,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAC1C,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/scripts/check.ts"],"names":[],"mappings":";;AAAA,4CAI4B;AAE5B,oCAA2C;AAC3C,gDAAuD;AACvD,2CAAoD;AACpD,6CAA+C;AAE/C,iEAAiE;AACjE,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,kCAAkC;AAClC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,KAAK,UAAU,KAAK;IAClB,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,IAAI,mBAAa,CAAC,oBAAW,CAAC,CAAC;IAErD,MAAM,YAAY,GAAG,IAAA,wBAAkB,EACrC,mBAAmB,EACnB,+BAAmB,CACpB,CAAC;IAEF,MAAM,IAAI,GAAG,mBAAa,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACrE,MAAM,GAAG,GAAG,IAAI,mBAAa,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAElD,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/B,MAAM,iBAAiB,GAAG,IAAI,yBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5E,MAAM,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAChC,iBAAiB,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAED,KAAK,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAC1C,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -11,8 +11,7 @@ async function main() {
11
11
  const multiProvider = new sdk_1.MultiProvider(config_1.prodConfigs);
12
12
  multiProvider.setSharedSigner(signer);
13
13
  const core = sdk_1.HyperlaneCore.fromEnvironment('testnet', multiProvider);
14
- const igp = sdk_1.HyperlaneIgp.fromEnvironment('testnet', multiProvider);
15
- const config = (0, sdk_1.createRouterConfigMap)(signer.address, core.contractsMap, igp.contractsMap);
14
+ const config = core.getRouterConfig(signer.address);
16
15
  const deployer = new deploy_1.HelloWorldDeployer(multiProvider);
17
16
  const chainToContracts = await deployer.deploy(config);
18
17
  const addresses = (0, sdk_1.serializeContractsMap)(chainToContracts);
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/scripts/deploy.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAEhC,4CAM4B;AAE5B,6CAA+C;AAC/C,6CAAsD;AAEtD,KAAK,UAAU,IAAI;IACjB,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,wCAAwC,CAAC,CAAC;IAEpE,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,IAAI,mBAAa,CAAC,oBAAW,CAAC,CAAC;IACrD,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAEtC,MAAM,IAAI,GAAG,mBAAa,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACrE,MAAM,GAAG,GAAG,kBAAY,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,IAAA,2BAAqB,EAClC,MAAM,CAAC,OAAO,EACd,IAAI,CAAC,YAAY,EACjB,GAAG,CAAC,YAAY,CACjB,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAI,2BAAkB,CAAC,aAAa,CAAC,CAAC;IACvD,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CA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IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,IAAI,EAAE;KACH,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;KAC3C,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,9 +16,11 @@ describe('deploy', async () => {
16
16
  before(async () => {
17
17
  const [signer] = await hardhat_1.ethers.getSigners();
18
18
  multiProvider = sdk_1.MultiProvider.createTestMultiProvider({ signer });
19
- const coreDeployer = new sdk_1.TestCoreDeployer(multiProvider);
19
+ const ismFactoryDeployer = new sdk_1.HyperlaneProxyFactoryDeployer(multiProvider);
20
+ const ismFactory = new sdk_1.HyperlaneIsmFactory(await ismFactoryDeployer.deploy(multiProvider.mapKnownChains(() => ({}))), multiProvider);
21
+ const coreDeployer = new sdk_1.TestCoreDeployer(multiProvider, ismFactory);
20
22
  core = await coreDeployer.deployApp();
21
- config = await (0, sdk_1.deployTestIgpsAndGetRouterConfig)(multiProvider, signer.address, core.contractsMap);
23
+ config = core.getRouterConfig(signer.address);
22
24
  deployer = new deploy_1.HelloWorldDeployer(multiProvider);
23
25
  });
24
26
  it('deploys', async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.test.js","sourceRoot":"","sources":["../../../src/test/deploy.test.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAiC;AAEjC,4CAO4B;AAE5B,oCAA2C;AAE3C,2CAAoD;AAEpD,6CAAsD;AAEtD,QAAQ,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,IAAI,aAA4B,CAAC;IACjC,IAAI,IAAiB,CAAC;IACtB,IAAI,MAAkC,CAAC;IACvC,IAAI,QAA4B,CAAC;IACjC,IAAI,SAAqD,CAAC;IAC1D,IAAI,GAAkB,CAAC;IAEvB,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,MAAM,CAAC,MAAM,CAAC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,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QACtB,MAAM,OAAO,GAAG,IAAI,yBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAClE,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACtB,OAAO,CAAC,WAAW,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -4,7 +4,6 @@ const chai_1 = require("chai");
4
4
  const hardhat_1 = require("hardhat");
5
5
  const sdk_1 = require("@hyperlane-xyz/sdk");
6
6
  const deploy_1 = require("../deploy/deploy");
7
- const types_1 = require("../types");
8
7
  describe('HelloWorld', async () => {
9
8
  const localChain = sdk_1.Chains.test1;
10
9
  const remoteChain = sdk_1.Chains.test2;
@@ -13,39 +12,35 @@ describe('HelloWorld', async () => {
13
12
  let signer;
14
13
  let local;
15
14
  let remote;
16
- let localIgp;
17
15
  let multiProvider;
18
16
  let coreApp;
19
17
  let config;
20
18
  before(async () => {
21
19
  [signer] = await hardhat_1.ethers.getSigners();
22
20
  multiProvider = sdk_1.MultiProvider.createTestMultiProvider({ signer });
21
+ const ismFactoryDeployer = new sdk_1.HyperlaneProxyFactoryDeployer(multiProvider);
22
+ const ismFactory = new sdk_1.HyperlaneIsmFactory(await ismFactoryDeployer.deploy(multiProvider.mapKnownChains(() => ({}))), multiProvider);
23
+ coreApp = await new sdk_1.TestCoreDeployer(multiProvider, ismFactory).deployApp();
24
+ config = coreApp.getRouterConfig(signer.address);
23
25
  localDomain = multiProvider.getDomainId(localChain);
24
26
  remoteDomain = multiProvider.getDomainId(remoteChain);
25
- const coreDeployer = new sdk_1.TestCoreDeployer(multiProvider);
26
- const coreContractsMaps = await coreDeployer.deploy();
27
- coreApp = new sdk_1.TestCoreApp(coreContractsMaps, multiProvider);
28
- config = await (0, sdk_1.deployTestIgpsAndGetRouterConfig)(multiProvider, signer.address, coreContractsMaps);
29
27
  });
30
28
  beforeEach(async () => {
31
29
  const helloWorld = new deploy_1.HelloWorldDeployer(multiProvider);
32
30
  const contracts = await helloWorld.deploy(config);
33
31
  local = contracts[localChain].router;
34
32
  remote = contracts[remoteChain].router;
35
- localIgp = types_1.IInterchainGasPaymaster__factory.connect(config[localChain].interchainGasPaymaster, multiProvider.getProvider(localChain));
36
33
  // The all counts start empty
37
34
  (0, chai_1.expect)(await local.sent()).to.equal(0);
38
35
  (0, chai_1.expect)(await local.received()).to.equal(0);
39
36
  (0, chai_1.expect)(await remote.sent()).to.equal(0);
40
37
  (0, chai_1.expect)(await remote.received()).to.equal(0);
41
38
  });
42
- async function quoteGasPayment(fromRouter, destinationDomain, igp) {
43
- const handleGasAmount = await fromRouter.HANDLE_GAS_AMOUNT();
44
- return igp.quoteGasPayment(destinationDomain, handleGasAmount);
45
- }
46
39
  it('sends a message', async () => {
47
- await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, 'Hello', {
48
- value: await quoteGasPayment(local, remoteDomain, localIgp),
40
+ const body = 'Hello';
41
+ const payment = await local['quoteDispatch(uint32,bytes)'](remoteDomain, Buffer.from(body));
42
+ await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, body, {
43
+ value: payment,
49
44
  })).to.emit(local, 'SentHelloWorld');
50
45
  // The sent counts are correct
51
46
  (0, chai_1.expect)(await local.sent()).to.equal(1);
@@ -54,13 +49,16 @@ describe('HelloWorld', async () => {
54
49
  (0, chai_1.expect)(await local.received()).to.equal(0);
55
50
  });
56
51
  it('reverts if there is insufficient payment', async () => {
57
- await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, 'Hello', {
52
+ const body = 'Hello';
53
+ await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, body, {
58
54
  value: 0,
59
- })).to.be.revertedWith('insufficient interchain gas payment');
55
+ })).to.be.revertedWith('StaticProtocolFee: insufficient protocol fee');
60
56
  });
61
57
  it('handles a message', async () => {
62
- await local.sendHelloWorld(remoteDomain, 'World', {
63
- value: await quoteGasPayment(local, remoteDomain, localIgp),
58
+ const body = 'World';
59
+ const payment = await local['quoteDispatch(uint32,bytes)'](remoteDomain, Buffer.from(body));
60
+ await local.sendHelloWorld(remoteDomain, body, {
61
+ value: payment,
64
62
  });
65
63
  // Mock processing of the message by Hyperlane
66
64
  await coreApp.processOutboundMessages(localChain);
@@ -1 +1 @@
1
- {"version":3,"file":"helloworld.test.js","sourceRoot":"","sources":["../../../src/test/helloworld.test.ts"],"names":[],"mappings":";;AACA,+BAA8B;AAC9B,qCAAiC;AAEjC,4CAO4B;AAG5B,6CAAsD;AACtD,oCAIkB;AAElB,QAAQ,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;IAChC,MAAM,UAAU,GAAG,YAAM,CAAC,KAAK,CAAC;IAChC,MAAM,WAAW,GAAG,YAAM,CAAC,KAAK,CAAC;IACjC,IAAI,WAAmB,CAAC;IACxB,IAAI,YAAoB,CAAC;IAEzB,IAAI,MAAyB,CAAC;IAC9B,IAAI,KAAiB,CAAC;IACtB,IAAI,MAAkB,CAAC;IACvB,IAAI,QAAiC,CAAC;IACtC,IAAI,aAA4B,CAAC;IACjC,IAAI,OAAoB,CAAC;IACzB,IAAI,MAAkC,CAAC;IAEvC,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,CAAC,MAAM,CAAC,GAAG,MAAM,gBAAM,CAAC,UAAU,EAAE,CAAC;QAErC,aAAa,GAAG,mBAAa,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAClE,WAAW,GAAG,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACpD,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAEtD,MAAM,YAAY,GAAG,IAAI,sBAAgB,CAAC,aAAa,CAAC,CAAC;QACzD,MAAM,iBAAiB,GAAG,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC;QACtD,OAAO,GAAG,IAAI,iBAA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,IAAI,CAAC,CAClB,CAAC;QACF,MAAM,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE;YAC7C,KAAK,EAAE,OAAO;SACf,CAAC,CAAC;QACH,8CAA8C;QAC9C,MAAM,OAAO,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAClD,2CAA2C;QAC3C,IAAA,aAAM,EAAC,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvC,0CAA0C;QAC1C,IAAA,aAAM,EAAC,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5C,IAAA,aAAM,EAAC,MAAM,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,260 @@
1
+ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../common";
2
+ import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
3
+ import type { Listener, Provider } from "@ethersproject/providers";
4
+ import type { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
5
+ export interface MailboxClientInterface extends utils.Interface {
6
+ functions: {
7
+ "hook()": FunctionFragment;
8
+ "interchainSecurityModule()": FunctionFragment;
9
+ "localDomain()": FunctionFragment;
10
+ "mailbox()": FunctionFragment;
11
+ "owner()": FunctionFragment;
12
+ "renounceOwnership()": FunctionFragment;
13
+ "setHook(address)": FunctionFragment;
14
+ "setInterchainSecurityModule(address)": FunctionFragment;
15
+ "transferOwnership(address)": FunctionFragment;
16
+ };
17
+ getFunction(nameOrSignatureOrTopic: "hook" | "hook()" | "interchainSecurityModule" | "interchainSecurityModule()" | "localDomain" | "localDomain()" | "mailbox" | "mailbox()" | "owner" | "owner()" | "renounceOwnership" | "renounceOwnership()" | "setHook" | "setHook(address)" | "setInterchainSecurityModule" | "setInterchainSecurityModule(address)" | "transferOwnership" | "transferOwnership(address)"): FunctionFragment;
18
+ encodeFunctionData(functionFragment: "hook", values?: undefined): string;
19
+ encodeFunctionData(functionFragment: "hook()", values?: undefined): string;
20
+ encodeFunctionData(functionFragment: "interchainSecurityModule", values?: undefined): string;
21
+ encodeFunctionData(functionFragment: "interchainSecurityModule()", values?: undefined): string;
22
+ encodeFunctionData(functionFragment: "localDomain", values?: undefined): string;
23
+ encodeFunctionData(functionFragment: "localDomain()", values?: undefined): string;
24
+ encodeFunctionData(functionFragment: "mailbox", values?: undefined): string;
25
+ encodeFunctionData(functionFragment: "mailbox()", values?: undefined): string;
26
+ encodeFunctionData(functionFragment: "owner", values?: undefined): string;
27
+ encodeFunctionData(functionFragment: "owner()", values?: undefined): string;
28
+ encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
29
+ encodeFunctionData(functionFragment: "renounceOwnership()", values?: undefined): string;
30
+ encodeFunctionData(functionFragment: "setHook", values: [string]): string;
31
+ encodeFunctionData(functionFragment: "setHook(address)", values: [string]): string;
32
+ encodeFunctionData(functionFragment: "setInterchainSecurityModule", values: [string]): string;
33
+ encodeFunctionData(functionFragment: "setInterchainSecurityModule(address)", values: [string]): string;
34
+ encodeFunctionData(functionFragment: "transferOwnership", values: [string]): string;
35
+ encodeFunctionData(functionFragment: "transferOwnership(address)", values: [string]): string;
36
+ decodeFunctionResult(functionFragment: "hook", data: BytesLike): Result;
37
+ decodeFunctionResult(functionFragment: "hook()", data: BytesLike): Result;
38
+ decodeFunctionResult(functionFragment: "interchainSecurityModule", data: BytesLike): Result;
39
+ decodeFunctionResult(functionFragment: "interchainSecurityModule()", data: BytesLike): Result;
40
+ decodeFunctionResult(functionFragment: "localDomain", data: BytesLike): Result;
41
+ decodeFunctionResult(functionFragment: "localDomain()", data: BytesLike): Result;
42
+ decodeFunctionResult(functionFragment: "mailbox", data: BytesLike): Result;
43
+ decodeFunctionResult(functionFragment: "mailbox()", data: BytesLike): Result;
44
+ decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
45
+ decodeFunctionResult(functionFragment: "owner()", data: BytesLike): Result;
46
+ decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
47
+ decodeFunctionResult(functionFragment: "renounceOwnership()", data: BytesLike): Result;
48
+ decodeFunctionResult(functionFragment: "setHook", data: BytesLike): Result;
49
+ decodeFunctionResult(functionFragment: "setHook(address)", data: BytesLike): Result;
50
+ decodeFunctionResult(functionFragment: "setInterchainSecurityModule", data: BytesLike): Result;
51
+ decodeFunctionResult(functionFragment: "setInterchainSecurityModule(address)", data: BytesLike): Result;
52
+ decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
53
+ decodeFunctionResult(functionFragment: "transferOwnership(address)", data: BytesLike): Result;
54
+ events: {
55
+ "Initialized(uint8)": EventFragment;
56
+ "OwnershipTransferred(address,address)": EventFragment;
57
+ };
58
+ getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment;
59
+ getEvent(nameOrSignatureOrTopic: "Initialized(uint8)"): EventFragment;
60
+ getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
61
+ getEvent(nameOrSignatureOrTopic: "OwnershipTransferred(address,address)"): EventFragment;
62
+ }
63
+ export interface InitializedEventObject {
64
+ version: number;
65
+ }
66
+ export type InitializedEvent = TypedEvent<[number], InitializedEventObject>;
67
+ export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
68
+ export interface OwnershipTransferredEventObject {
69
+ previousOwner: string;
70
+ newOwner: string;
71
+ }
72
+ export type OwnershipTransferredEvent = TypedEvent<[
73
+ string,
74
+ string
75
+ ], OwnershipTransferredEventObject>;
76
+ export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
77
+ export interface MailboxClient extends BaseContract {
78
+ connect(signerOrProvider: Signer | Provider | string): this;
79
+ attach(addressOrName: string): this;
80
+ deployed(): Promise<this>;
81
+ interface: MailboxClientInterface;
82
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
83
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
84
+ listeners(eventName?: string): Array<Listener>;
85
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
86
+ removeAllListeners(eventName?: string): this;
87
+ off: OnEvent<this>;
88
+ on: OnEvent<this>;
89
+ once: OnEvent<this>;
90
+ removeListener: OnEvent<this>;
91
+ functions: {
92
+ hook(overrides?: CallOverrides): Promise<[string]>;
93
+ "hook()"(overrides?: CallOverrides): Promise<[string]>;
94
+ interchainSecurityModule(overrides?: CallOverrides): Promise<[string]>;
95
+ "interchainSecurityModule()"(overrides?: CallOverrides): Promise<[string]>;
96
+ localDomain(overrides?: CallOverrides): Promise<[number]>;
97
+ "localDomain()"(overrides?: CallOverrides): Promise<[number]>;
98
+ mailbox(overrides?: CallOverrides): Promise<[string]>;
99
+ "mailbox()"(overrides?: CallOverrides): Promise<[string]>;
100
+ owner(overrides?: CallOverrides): Promise<[string]>;
101
+ "owner()"(overrides?: CallOverrides): Promise<[string]>;
102
+ renounceOwnership(overrides?: Overrides & {
103
+ from?: string | Promise<string>;
104
+ }): Promise<ContractTransaction>;
105
+ "renounceOwnership()"(overrides?: Overrides & {
106
+ from?: string | Promise<string>;
107
+ }): Promise<ContractTransaction>;
108
+ setHook(_hook: string, overrides?: Overrides & {
109
+ from?: string | Promise<string>;
110
+ }): Promise<ContractTransaction>;
111
+ "setHook(address)"(_hook: string, overrides?: Overrides & {
112
+ from?: string | Promise<string>;
113
+ }): Promise<ContractTransaction>;
114
+ setInterchainSecurityModule(_module: string, overrides?: Overrides & {
115
+ from?: string | Promise<string>;
116
+ }): Promise<ContractTransaction>;
117
+ "setInterchainSecurityModule(address)"(_module: string, overrides?: Overrides & {
118
+ from?: string | Promise<string>;
119
+ }): Promise<ContractTransaction>;
120
+ transferOwnership(newOwner: string, overrides?: Overrides & {
121
+ from?: string | Promise<string>;
122
+ }): Promise<ContractTransaction>;
123
+ "transferOwnership(address)"(newOwner: string, overrides?: Overrides & {
124
+ from?: string | Promise<string>;
125
+ }): Promise<ContractTransaction>;
126
+ };
127
+ hook(overrides?: CallOverrides): Promise<string>;
128
+ "hook()"(overrides?: CallOverrides): Promise<string>;
129
+ interchainSecurityModule(overrides?: CallOverrides): Promise<string>;
130
+ "interchainSecurityModule()"(overrides?: CallOverrides): Promise<string>;
131
+ localDomain(overrides?: CallOverrides): Promise<number>;
132
+ "localDomain()"(overrides?: CallOverrides): Promise<number>;
133
+ mailbox(overrides?: CallOverrides): Promise<string>;
134
+ "mailbox()"(overrides?: CallOverrides): Promise<string>;
135
+ owner(overrides?: CallOverrides): Promise<string>;
136
+ "owner()"(overrides?: CallOverrides): Promise<string>;
137
+ renounceOwnership(overrides?: Overrides & {
138
+ from?: string | Promise<string>;
139
+ }): Promise<ContractTransaction>;
140
+ "renounceOwnership()"(overrides?: Overrides & {
141
+ from?: string | Promise<string>;
142
+ }): Promise<ContractTransaction>;
143
+ setHook(_hook: string, overrides?: Overrides & {
144
+ from?: string | Promise<string>;
145
+ }): Promise<ContractTransaction>;
146
+ "setHook(address)"(_hook: string, overrides?: Overrides & {
147
+ from?: string | Promise<string>;
148
+ }): Promise<ContractTransaction>;
149
+ setInterchainSecurityModule(_module: string, overrides?: Overrides & {
150
+ from?: string | Promise<string>;
151
+ }): Promise<ContractTransaction>;
152
+ "setInterchainSecurityModule(address)"(_module: string, overrides?: Overrides & {
153
+ from?: string | Promise<string>;
154
+ }): Promise<ContractTransaction>;
155
+ transferOwnership(newOwner: string, overrides?: Overrides & {
156
+ from?: string | Promise<string>;
157
+ }): Promise<ContractTransaction>;
158
+ "transferOwnership(address)"(newOwner: string, overrides?: Overrides & {
159
+ from?: string | Promise<string>;
160
+ }): Promise<ContractTransaction>;
161
+ callStatic: {
162
+ hook(overrides?: CallOverrides): Promise<string>;
163
+ "hook()"(overrides?: CallOverrides): Promise<string>;
164
+ interchainSecurityModule(overrides?: CallOverrides): Promise<string>;
165
+ "interchainSecurityModule()"(overrides?: CallOverrides): Promise<string>;
166
+ localDomain(overrides?: CallOverrides): Promise<number>;
167
+ "localDomain()"(overrides?: CallOverrides): Promise<number>;
168
+ mailbox(overrides?: CallOverrides): Promise<string>;
169
+ "mailbox()"(overrides?: CallOverrides): Promise<string>;
170
+ owner(overrides?: CallOverrides): Promise<string>;
171
+ "owner()"(overrides?: CallOverrides): Promise<string>;
172
+ renounceOwnership(overrides?: CallOverrides): Promise<void>;
173
+ "renounceOwnership()"(overrides?: CallOverrides): Promise<void>;
174
+ setHook(_hook: string, overrides?: CallOverrides): Promise<void>;
175
+ "setHook(address)"(_hook: string, overrides?: CallOverrides): Promise<void>;
176
+ setInterchainSecurityModule(_module: string, overrides?: CallOverrides): Promise<void>;
177
+ "setInterchainSecurityModule(address)"(_module: string, overrides?: CallOverrides): Promise<void>;
178
+ transferOwnership(newOwner: string, overrides?: CallOverrides): Promise<void>;
179
+ "transferOwnership(address)"(newOwner: string, overrides?: CallOverrides): Promise<void>;
180
+ };
181
+ filters: {
182
+ "Initialized(uint8)"(version?: null): InitializedEventFilter;
183
+ Initialized(version?: null): InitializedEventFilter;
184
+ "OwnershipTransferred(address,address)"(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
185
+ OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
186
+ };
187
+ estimateGas: {
188
+ hook(overrides?: CallOverrides): Promise<BigNumber>;
189
+ "hook()"(overrides?: CallOverrides): Promise<BigNumber>;
190
+ interchainSecurityModule(overrides?: CallOverrides): Promise<BigNumber>;
191
+ "interchainSecurityModule()"(overrides?: CallOverrides): Promise<BigNumber>;
192
+ localDomain(overrides?: CallOverrides): Promise<BigNumber>;
193
+ "localDomain()"(overrides?: CallOverrides): Promise<BigNumber>;
194
+ mailbox(overrides?: CallOverrides): Promise<BigNumber>;
195
+ "mailbox()"(overrides?: CallOverrides): Promise<BigNumber>;
196
+ owner(overrides?: CallOverrides): Promise<BigNumber>;
197
+ "owner()"(overrides?: CallOverrides): Promise<BigNumber>;
198
+ renounceOwnership(overrides?: Overrides & {
199
+ from?: string | Promise<string>;
200
+ }): Promise<BigNumber>;
201
+ "renounceOwnership()"(overrides?: Overrides & {
202
+ from?: string | Promise<string>;
203
+ }): Promise<BigNumber>;
204
+ setHook(_hook: string, overrides?: Overrides & {
205
+ from?: string | Promise<string>;
206
+ }): Promise<BigNumber>;
207
+ "setHook(address)"(_hook: string, overrides?: Overrides & {
208
+ from?: string | Promise<string>;
209
+ }): Promise<BigNumber>;
210
+ setInterchainSecurityModule(_module: string, overrides?: Overrides & {
211
+ from?: string | Promise<string>;
212
+ }): Promise<BigNumber>;
213
+ "setInterchainSecurityModule(address)"(_module: string, overrides?: Overrides & {
214
+ from?: string | Promise<string>;
215
+ }): Promise<BigNumber>;
216
+ transferOwnership(newOwner: string, overrides?: Overrides & {
217
+ from?: string | Promise<string>;
218
+ }): Promise<BigNumber>;
219
+ "transferOwnership(address)"(newOwner: string, overrides?: Overrides & {
220
+ from?: string | Promise<string>;
221
+ }): Promise<BigNumber>;
222
+ };
223
+ populateTransaction: {
224
+ hook(overrides?: CallOverrides): Promise<PopulatedTransaction>;
225
+ "hook()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
226
+ interchainSecurityModule(overrides?: CallOverrides): Promise<PopulatedTransaction>;
227
+ "interchainSecurityModule()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
228
+ localDomain(overrides?: CallOverrides): Promise<PopulatedTransaction>;
229
+ "localDomain()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
230
+ mailbox(overrides?: CallOverrides): Promise<PopulatedTransaction>;
231
+ "mailbox()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
232
+ owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
233
+ "owner()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
234
+ renounceOwnership(overrides?: Overrides & {
235
+ from?: string | Promise<string>;
236
+ }): Promise<PopulatedTransaction>;
237
+ "renounceOwnership()"(overrides?: Overrides & {
238
+ from?: string | Promise<string>;
239
+ }): Promise<PopulatedTransaction>;
240
+ setHook(_hook: string, overrides?: Overrides & {
241
+ from?: string | Promise<string>;
242
+ }): Promise<PopulatedTransaction>;
243
+ "setHook(address)"(_hook: string, overrides?: Overrides & {
244
+ from?: string | Promise<string>;
245
+ }): Promise<PopulatedTransaction>;
246
+ setInterchainSecurityModule(_module: string, overrides?: Overrides & {
247
+ from?: string | Promise<string>;
248
+ }): Promise<PopulatedTransaction>;
249
+ "setInterchainSecurityModule(address)"(_module: string, overrides?: Overrides & {
250
+ from?: string | Promise<string>;
251
+ }): Promise<PopulatedTransaction>;
252
+ transferOwnership(newOwner: string, overrides?: Overrides & {
253
+ from?: string | Promise<string>;
254
+ }): Promise<PopulatedTransaction>;
255
+ "transferOwnership(address)"(newOwner: string, overrides?: Overrides & {
256
+ from?: string | Promise<string>;
257
+ }): Promise<PopulatedTransaction>;
258
+ };
259
+ }
260
+ //# sourceMappingURL=MailboxClient.d.ts.map