@hyperlane-xyz/helloworld 0.0.0-beta-20251201221151

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 (307) hide show
  1. package/README.md +27 -0
  2. package/contracts/HelloWorld.sol +107 -0
  3. package/dist/app/app.d.ts +17 -0
  4. package/dist/app/app.d.ts.map +1 -0
  5. package/dist/app/app.js +55 -0
  6. package/dist/app/app.js.map +1 -0
  7. package/dist/app/contracts.d.ts +6 -0
  8. package/dist/app/contracts.d.ts.map +1 -0
  9. package/dist/app/contracts.js +5 -0
  10. package/dist/app/contracts.js.map +1 -0
  11. package/dist/app/types.d.ts +5 -0
  12. package/dist/app/types.d.ts.map +1 -0
  13. package/dist/app/types.js +2 -0
  14. package/dist/app/types.js.map +1 -0
  15. package/dist/deploy/check.d.ts +7 -0
  16. package/dist/deploy/check.d.ts.map +1 -0
  17. package/dist/deploy/check.js +4 -0
  18. package/dist/deploy/check.js.map +1 -0
  19. package/dist/deploy/config.d.ts +6 -0
  20. package/dist/deploy/config.d.ts.map +1 -0
  21. package/dist/deploy/config.js +6 -0
  22. package/dist/deploy/config.js.map +1 -0
  23. package/dist/deploy/deploy.d.ts +14 -0
  24. package/dist/deploy/deploy.d.ts.map +1 -0
  25. package/dist/deploy/deploy.js +32 -0
  26. package/dist/deploy/deploy.js.map +1 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +9 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/multiProtocolApp/evmAdapter.d.ts +20 -0
  32. package/dist/multiProtocolApp/evmAdapter.d.ts.map +1 -0
  33. package/dist/multiProtocolApp/evmAdapter.js +46 -0
  34. package/dist/multiProtocolApp/evmAdapter.js.map +1 -0
  35. package/dist/multiProtocolApp/multiProtocolApp.d.ts +15 -0
  36. package/dist/multiProtocolApp/multiProtocolApp.d.ts.map +1 -0
  37. package/dist/multiProtocolApp/multiProtocolApp.js +35 -0
  38. package/dist/multiProtocolApp/multiProtocolApp.js.map +1 -0
  39. package/dist/multiProtocolApp/sealevelAdapter.d.ts +62 -0
  40. package/dist/multiProtocolApp/sealevelAdapter.d.ts.map +1 -0
  41. package/dist/multiProtocolApp/sealevelAdapter.js +233 -0
  42. package/dist/multiProtocolApp/sealevelAdapter.js.map +1 -0
  43. package/dist/multiProtocolApp/types.d.ts +7 -0
  44. package/dist/multiProtocolApp/types.d.ts.map +1 -0
  45. package/dist/multiProtocolApp/types.js +2 -0
  46. package/dist/multiProtocolApp/types.js.map +1 -0
  47. package/dist/scripts/check.d.ts +2 -0
  48. package/dist/scripts/check.d.ts.map +1 -0
  49. package/dist/scripts/check.js +28 -0
  50. package/dist/scripts/check.js.map +1 -0
  51. package/dist/scripts/deploy.d.ts +2 -0
  52. package/dist/scripts/deploy.d.ts.map +1 -0
  53. package/dist/scripts/deploy.js +25 -0
  54. package/dist/scripts/deploy.js.map +1 -0
  55. package/dist/test/deploy.test.d.ts +2 -0
  56. package/dist/test/deploy.test.d.ts.map +1 -0
  57. package/dist/test/deploy.test.js +37 -0
  58. package/dist/test/deploy.test.js.map +1 -0
  59. package/dist/test/helloworld.test.d.ts +2 -0
  60. package/dist/test/helloworld.test.d.ts.map +1 -0
  61. package/dist/test/helloworld.test.js +70 -0
  62. package/dist/test/helloworld.test.js.map +1 -0
  63. package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.d.ts +50 -0
  64. package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.d.ts.map +1 -0
  65. package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.js +2 -0
  66. package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.js.map +1 -0
  67. package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts +295 -0
  68. package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts.map +1 -0
  69. package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js +2 -0
  70. package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js.map +1 -0
  71. package/dist/types/@hyperlane-xyz/core/contracts/client/Router.d.ts +480 -0
  72. package/dist/types/@hyperlane-xyz/core/contracts/client/Router.d.ts.map +1 -0
  73. package/dist/types/@hyperlane-xyz/core/contracts/client/Router.js +2 -0
  74. package/dist/types/@hyperlane-xyz/core/contracts/client/Router.js.map +1 -0
  75. package/dist/types/@hyperlane-xyz/core/contracts/client/index.d.ts +3 -0
  76. package/dist/types/@hyperlane-xyz/core/contracts/client/index.d.ts.map +1 -0
  77. package/dist/types/@hyperlane-xyz/core/contracts/client/index.js +2 -0
  78. package/dist/types/@hyperlane-xyz/core/contracts/client/index.js.map +1 -0
  79. package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts +3 -0
  80. package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +1 -0
  81. package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.js +2 -0
  82. package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.js.map +1 -0
  83. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts +50 -0
  84. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts.map +1 -0
  85. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js +2 -0
  86. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js.map +1 -0
  87. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +2 -0
  88. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +1 -0
  89. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.js +2 -0
  90. package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +1 -0
  91. package/dist/types/@hyperlane-xyz/core/contracts/index.d.ts +8 -0
  92. package/dist/types/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -0
  93. package/dist/types/@hyperlane-xyz/core/contracts/index.js +2 -0
  94. package/dist/types/@hyperlane-xyz/core/contracts/index.js.map +1 -0
  95. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts +81 -0
  96. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -0
  97. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +2 -0
  98. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -0
  99. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +50 -0
  100. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -0
  101. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +2 -0
  102. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -0
  103. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
  104. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
  105. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js +2 -0
  106. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
  107. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts +324 -0
  108. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts.map +1 -0
  109. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js +2 -0
  110. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js.map +1 -0
  111. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts +66 -0
  112. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts.map +1 -0
  113. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js +2 -0
  114. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js.map +1 -0
  115. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts +111 -0
  116. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts.map +1 -0
  117. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js +2 -0
  118. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js.map +1 -0
  119. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +2 -0
  120. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +1 -0
  121. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js +2 -0
  122. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +1 -0
  123. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +7 -0
  124. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -0
  125. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.js +2 -0
  126. package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -0
  127. package/dist/types/@hyperlane-xyz/core/index.d.ts +3 -0
  128. package/dist/types/@hyperlane-xyz/core/index.d.ts.map +1 -0
  129. package/dist/types/@hyperlane-xyz/core/index.js +2 -0
  130. package/dist/types/@hyperlane-xyz/core/index.js.map +1 -0
  131. package/dist/types/@hyperlane-xyz/index.d.ts +3 -0
  132. package/dist/types/@hyperlane-xyz/index.d.ts.map +1 -0
  133. package/dist/types/@hyperlane-xyz/index.js +2 -0
  134. package/dist/types/@hyperlane-xyz/index.js.map +1 -0
  135. package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts +138 -0
  136. package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts.map +1 -0
  137. package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js +2 -0
  138. package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js.map +1 -0
  139. package/dist/types/@openzeppelin/contracts-upgradeable/access/index.d.ts +2 -0
  140. package/dist/types/@openzeppelin/contracts-upgradeable/access/index.d.ts.map +1 -0
  141. package/dist/types/@openzeppelin/contracts-upgradeable/access/index.js +2 -0
  142. package/dist/types/@openzeppelin/contracts-upgradeable/access/index.js.map +1 -0
  143. package/dist/types/@openzeppelin/contracts-upgradeable/index.d.ts +7 -0
  144. package/dist/types/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -0
  145. package/dist/types/@openzeppelin/contracts-upgradeable/index.js +2 -0
  146. package/dist/types/@openzeppelin/contracts-upgradeable/index.js.map +1 -0
  147. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +3 -0
  148. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -0
  149. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.js +2 -0
  150. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.js.map +1 -0
  151. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts +41 -0
  152. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts.map +1 -0
  153. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js +2 -0
  154. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js.map +1 -0
  155. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +2 -0
  156. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts.map +1 -0
  157. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.js +2 -0
  158. package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.js.map +1 -0
  159. package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts +41 -0
  160. package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts.map +1 -0
  161. package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js +2 -0
  162. package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js.map +1 -0
  163. package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.d.ts +2 -0
  164. package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.d.ts.map +1 -0
  165. package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.js +2 -0
  166. package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.js.map +1 -0
  167. package/dist/types/@openzeppelin/index.d.ts +3 -0
  168. package/dist/types/@openzeppelin/index.d.ts.map +1 -0
  169. package/dist/types/@openzeppelin/index.js +2 -0
  170. package/dist/types/@openzeppelin/index.js.map +1 -0
  171. package/dist/types/common.d.ts +22 -0
  172. package/dist/types/common.d.ts.map +1 -0
  173. package/dist/types/common.js +2 -0
  174. package/dist/types/common.js.map +1 -0
  175. package/dist/types/contracts/HelloWorld.d.ts +649 -0
  176. package/dist/types/contracts/HelloWorld.d.ts.map +1 -0
  177. package/dist/types/contracts/HelloWorld.js +2 -0
  178. package/dist/types/contracts/HelloWorld.js.map +1 -0
  179. package/dist/types/contracts/index.d.ts +2 -0
  180. package/dist/types/contracts/index.d.ts.map +1 -0
  181. package/dist/types/contracts/index.js +2 -0
  182. package/dist/types/contracts/index.js.map +1 -0
  183. package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.d.ts +19 -0
  184. package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.d.ts.map +1 -0
  185. package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.js +29 -0
  186. package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.js.map +1 -0
  187. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.d.ts +150 -0
  188. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.d.ts.map +1 -0
  189. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.js +198 -0
  190. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.js.map +1 -0
  191. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.d.ts +240 -0
  192. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.d.ts.map +1 -0
  193. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.js +315 -0
  194. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.js.map +1 -0
  195. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts +3 -0
  196. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts.map +1 -0
  197. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.js +6 -0
  198. package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.js.map +1 -0
  199. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts +2 -0
  200. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +1 -0
  201. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js +5 -0
  202. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js.map +1 -0
  203. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts +31 -0
  204. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts.map +1 -0
  205. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js +52 -0
  206. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js.map +1 -0
  207. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +2 -0
  208. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +1 -0
  209. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js +5 -0
  210. package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +1 -0
  211. package/dist/types/factories/@hyperlane-xyz/core/contracts/index.d.ts +5 -0
  212. package/dist/types/factories/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -0
  213. package/dist/types/factories/@hyperlane-xyz/core/contracts/index.js +8 -0
  214. package/dist/types/factories/@hyperlane-xyz/core/contracts/index.js.map +1 -0
  215. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts +37 -0
  216. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -0
  217. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +53 -0
  218. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -0
  219. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +19 -0
  220. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -0
  221. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +29 -0
  222. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -0
  223. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
  224. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
  225. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js +6 -0
  226. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
  227. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts +332 -0
  228. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts.map +1 -0
  229. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js +436 -0
  230. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js.map +1 -0
  231. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts +27 -0
  232. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts.map +1 -0
  233. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js +39 -0
  234. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js.map +1 -0
  235. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts +65 -0
  236. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts.map +1 -0
  237. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js +90 -0
  238. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js.map +1 -0
  239. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +2 -0
  240. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +1 -0
  241. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js +5 -0
  242. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +1 -0
  243. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +5 -0
  244. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -0
  245. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js +8 -0
  246. package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -0
  247. package/dist/types/factories/@hyperlane-xyz/core/index.d.ts +2 -0
  248. package/dist/types/factories/@hyperlane-xyz/core/index.d.ts.map +1 -0
  249. package/dist/types/factories/@hyperlane-xyz/core/index.js +5 -0
  250. package/dist/types/factories/@hyperlane-xyz/core/index.js.map +1 -0
  251. package/dist/types/factories/@hyperlane-xyz/index.d.ts +2 -0
  252. package/dist/types/factories/@hyperlane-xyz/index.d.ts.map +1 -0
  253. package/dist/types/factories/@hyperlane-xyz/index.js +5 -0
  254. package/dist/types/factories/@hyperlane-xyz/index.js.map +1 -0
  255. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts +60 -0
  256. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts.map +1 -0
  257. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js +81 -0
  258. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js.map +1 -0
  259. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.d.ts +2 -0
  260. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.d.ts.map +1 -0
  261. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.js +5 -0
  262. package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.js.map +1 -0
  263. package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.d.ts +4 -0
  264. package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -0
  265. package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.js +7 -0
  266. package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.js.map +1 -0
  267. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +2 -0
  268. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -0
  269. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.js +5 -0
  270. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.js.map +1 -0
  271. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts +19 -0
  272. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts.map +1 -0
  273. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js +29 -0
  274. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js.map +1 -0
  275. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +2 -0
  276. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts.map +1 -0
  277. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.js +5 -0
  278. package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.js.map +1 -0
  279. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts +19 -0
  280. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts.map +1 -0
  281. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js +29 -0
  282. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js.map +1 -0
  283. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.d.ts +2 -0
  284. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.d.ts.map +1 -0
  285. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.js +5 -0
  286. package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.js.map +1 -0
  287. package/dist/types/factories/@openzeppelin/index.d.ts +2 -0
  288. package/dist/types/factories/@openzeppelin/index.d.ts.map +1 -0
  289. package/dist/types/factories/@openzeppelin/index.js +5 -0
  290. package/dist/types/factories/@openzeppelin/index.js.map +1 -0
  291. package/dist/types/factories/contracts/HelloWorld__factory.d.ts +414 -0
  292. package/dist/types/factories/contracts/HelloWorld__factory.d.ts.map +1 -0
  293. package/dist/types/factories/contracts/HelloWorld__factory.js +548 -0
  294. package/dist/types/factories/contracts/HelloWorld__factory.js.map +1 -0
  295. package/dist/types/factories/contracts/index.d.ts +2 -0
  296. package/dist/types/factories/contracts/index.d.ts.map +1 -0
  297. package/dist/types/factories/contracts/index.js +5 -0
  298. package/dist/types/factories/contracts/index.js.map +1 -0
  299. package/dist/types/factories/index.d.ts +4 -0
  300. package/dist/types/factories/index.d.ts.map +1 -0
  301. package/dist/types/factories/index.js +7 -0
  302. package/dist/types/factories/index.js.map +1 -0
  303. package/dist/types/index.d.ts +34 -0
  304. package/dist/types/index.d.ts.map +1 -0
  305. package/dist/types/index.js +15 -0
  306. package/dist/types/index.js.map +1 -0
  307. package/package.json +81 -0
@@ -0,0 +1,233 @@
1
+ import { Keypair, PublicKey, SystemProgram, Transaction, TransactionInstruction, } from '@solana/web3.js';
2
+ import { deserializeUnchecked, serialize } from 'borsh';
3
+ import { ProviderType, SEALEVEL_SPL_NOOP_ADDRESS, SealevelAccountDataWrapper, SealevelCoreAdapter, SealevelInstructionWrapper, SealevelInterchainGasPaymasterConfig, SealevelInterchainGasPaymasterConfigSchema, SealevelRouterAdapter, getSealevelAccountDataSchema, } from '@hyperlane-xyz/sdk';
4
+ export class SealevelHelloWorldAdapter extends SealevelRouterAdapter {
5
+ chainName;
6
+ multiProvider;
7
+ addresses;
8
+ constructor(chainName, multiProvider, addresses) {
9
+ super(chainName, multiProvider, addresses);
10
+ this.chainName = chainName;
11
+ this.multiProvider = multiProvider;
12
+ this.addresses = addresses;
13
+ }
14
+ async populateSendHelloTx(destination, message, value, sender) {
15
+ this.logger.info('Creating sendHelloWorld tx for sealevel', this.chainName, destination, message, value);
16
+ const { mailbox, router: programId } = this.addresses;
17
+ const mailboxPubKey = new PublicKey(mailbox);
18
+ const senderPubKey = new PublicKey(sender);
19
+ const programPubKey = new PublicKey(programId);
20
+ const randomWallet = Keypair.generate();
21
+ const keys = this.getSendHelloKeyList(programPubKey, mailboxPubKey, senderPubKey, randomWallet.publicKey);
22
+ const instructionData = new SealevelInstructionWrapper({
23
+ instruction: HelloWorldInstruction.SendHelloWorld,
24
+ data: new SendHelloWorldInstruction({
25
+ destination: this.multiProvider.getDomainId(destination),
26
+ message,
27
+ }),
28
+ });
29
+ const serializedData = serialize(SendHelloWorldSchema, instructionData);
30
+ const txInstruction = new TransactionInstruction({
31
+ keys,
32
+ programId: programPubKey,
33
+ data: Buffer.from(serializedData),
34
+ });
35
+ const connection = this.getProvider();
36
+ const recentBlockhash = (await connection.getLatestBlockhash('finalized'))
37
+ .blockhash;
38
+ // @ts-ignore Workaround for bug in the web3 lib, sometimes uses recentBlockhash and sometimes uses blockhash
39
+ const transaction = new Transaction({
40
+ feePayer: senderPubKey,
41
+ blockhash: recentBlockhash,
42
+ recentBlockhash,
43
+ }).add(txInstruction);
44
+ transaction.partialSign(randomWallet);
45
+ return { type: ProviderType.SolanaWeb3, transaction };
46
+ }
47
+ // Should match https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/dd7ff727b0d3d393a159afa5f0a364775bde3a58/rust/sealevel/programs/helloworld/src/processor.rs#L157
48
+ getSendHelloKeyList(programId, mailbox, sender, randomWallet) {
49
+ return [
50
+ // 0. [writable] Program storage.
51
+ {
52
+ pubkey: this.deriveProgramStoragePDA(programId),
53
+ isSigner: false,
54
+ isWritable: true,
55
+ },
56
+ // 1. [executable] The mailbox.
57
+ { pubkey: mailbox, isSigner: false, isWritable: false },
58
+ // 2. [writeable] Outbox PDA
59
+ {
60
+ pubkey: SealevelCoreAdapter.deriveMailboxOutboxPda(mailbox),
61
+ isSigner: false,
62
+ isWritable: true,
63
+ },
64
+ // 3. [] Program's dispatch authority
65
+ {
66
+ pubkey: SealevelCoreAdapter.deriveMailboxDispatchAuthorityPda(programId),
67
+ isSigner: false,
68
+ isWritable: false,
69
+ },
70
+ // 4. [executable] The system program.
71
+ { pubkey: SystemProgram.programId, isSigner: false, isWritable: false },
72
+ // 5. [executable] The spl_noop program.
73
+ {
74
+ pubkey: new PublicKey(SEALEVEL_SPL_NOOP_ADDRESS),
75
+ isSigner: false,
76
+ isWritable: false,
77
+ },
78
+ // 6. [signer] Tx payer.
79
+ { pubkey: sender, isSigner: true, isWritable: true },
80
+ // 7. [signer] Unique message account.
81
+ { pubkey: randomWallet, isSigner: true, isWritable: false },
82
+ // 8. [writeable] Dispatched message PDA
83
+ {
84
+ pubkey: SealevelCoreAdapter.deriveMailboxDispatchedMessagePda(mailbox, randomWallet),
85
+ isSigner: false,
86
+ isWritable: true,
87
+ },
88
+ /// ---- if an IGP is configured ----
89
+ /// 9. [executable] The IGP program.
90
+ /// 10. [writeable] The IGP program data.
91
+ /// 11. [writeable] The gas payment PDA.
92
+ /// 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP.
93
+ /// 13. [writeable] The IGP account.
94
+ /// ---- end if an IGP is configured ----
95
+ ];
96
+ }
97
+ // Should match https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/dd7ff727b0d3d393a159afa5f0a364775bde3a58/rust/sealevel/programs/helloworld/src/processor.rs#L44
98
+ deriveProgramStoragePDA(programId) {
99
+ return this.derivePda(['hello_world', '-', 'handle', '-', 'storage'], programId);
100
+ }
101
+ async sentStat(destination) {
102
+ const destinationDomain = this.multiProvider.getDomainId(destination);
103
+ const data = await this.getAccountInfo();
104
+ return Number(data.sent_to.get(destinationDomain) || 0);
105
+ }
106
+ async getAccountInfo() {
107
+ const address = this.addresses.router;
108
+ const connection = this.getProvider();
109
+ const pda = this.deriveProgramStoragePDA(address);
110
+ const accountInfo = await connection.getAccountInfo(pda);
111
+ if (!accountInfo)
112
+ throw new Error(`No account info found for ${pda.toBase58()}}`);
113
+ const accountData = deserializeUnchecked(HelloWorldDataSchema, SealevelAccountDataWrapper, accountInfo.data);
114
+ return accountData.data;
115
+ }
116
+ }
117
+ /**
118
+ * Borsh Schema
119
+ */
120
+ // Should match https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/dd7ff727b0d3d393a159afa5f0a364775bde3a58/rust/sealevel/programs/helloworld/src/instruction.rs#L40
121
+ export var HelloWorldInstruction;
122
+ (function (HelloWorldInstruction) {
123
+ HelloWorldInstruction[HelloWorldInstruction["Init"] = 0] = "Init";
124
+ HelloWorldInstruction[HelloWorldInstruction["SendHelloWorld"] = 1] = "SendHelloWorld";
125
+ HelloWorldInstruction[HelloWorldInstruction["SetInterchainSecurityModule"] = 2] = "SetInterchainSecurityModule";
126
+ HelloWorldInstruction[HelloWorldInstruction["EnrollRemoteRouters"] = 3] = "EnrollRemoteRouters";
127
+ })(HelloWorldInstruction || (HelloWorldInstruction = {}));
128
+ export class SendHelloWorldInstruction {
129
+ fields;
130
+ destination;
131
+ message;
132
+ constructor(fields) {
133
+ this.fields = fields;
134
+ Object.assign(this, fields);
135
+ }
136
+ }
137
+ export const SendHelloWorldSchema = new Map([
138
+ [
139
+ SealevelInstructionWrapper,
140
+ {
141
+ kind: 'struct',
142
+ fields: [
143
+ ['instruction', 'u8'],
144
+ ['data', SendHelloWorldInstruction],
145
+ ],
146
+ },
147
+ ],
148
+ [
149
+ SendHelloWorldInstruction,
150
+ {
151
+ kind: 'struct',
152
+ fields: [
153
+ ['destination', 'u32'],
154
+ ['message', 'string'],
155
+ ],
156
+ },
157
+ ],
158
+ ]);
159
+ // Should match https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/dd7ff727b0d3d393a159afa5f0a364775bde3a58/rust/sealevel/programs/helloworld/src/accounts.rs#L20
160
+ export class HelloWorldData {
161
+ fields;
162
+ local_domain;
163
+ /// The address of the mailbox contract.
164
+ mailbox;
165
+ mailbox_pubkey;
166
+ // The address of the ISM
167
+ ism;
168
+ ism_pubkey;
169
+ // The address of the IGP
170
+ igp;
171
+ igp_pubkey;
172
+ igp_account_pubkey;
173
+ // The address of the owner
174
+ owner;
175
+ owner_pubkey;
176
+ // A counter of how many messages have been sent from this contract.
177
+ sent;
178
+ // A counter of how many messages have been received by this contract.
179
+ received;
180
+ // Keyed by domain, a counter of how many messages that have been sent
181
+ // from this contract to the domain.
182
+ sent_to;
183
+ // Keyed by domain, a counter of how many messages that have been received
184
+ // by this contract from the domain.
185
+ received_from;
186
+ // Keyed by domain, the router for the remote domain.
187
+ routers;
188
+ constructor(fields) {
189
+ this.fields = fields;
190
+ Object.assign(this, fields);
191
+ this.mailbox_pubkey = new PublicKey(this.mailbox);
192
+ this.ism_pubkey = this.ism ? new PublicKey(this.ism) : undefined;
193
+ this.igp_pubkey = this.igp?.program_id
194
+ ? new PublicKey(this.igp.program_id)
195
+ : undefined;
196
+ this.igp_account_pubkey = this.igp?.igp_account
197
+ ? new PublicKey(this.igp.igp_account)
198
+ : undefined;
199
+ this.owner_pubkey = this.owner ? new PublicKey(this.owner) : undefined;
200
+ }
201
+ }
202
+ export const HelloWorldDataSchema = new Map([
203
+ [SealevelAccountDataWrapper, getSealevelAccountDataSchema(HelloWorldData)],
204
+ [
205
+ HelloWorldData,
206
+ {
207
+ kind: 'struct',
208
+ fields: [
209
+ ['domain', 'u32'],
210
+ ['mailbox', [32]],
211
+ ['ism', { kind: 'option', type: [32] }],
212
+ [
213
+ 'igp',
214
+ {
215
+ kind: 'option',
216
+ type: SealevelInterchainGasPaymasterConfig,
217
+ },
218
+ ],
219
+ ['owner', { kind: 'option', type: [32] }],
220
+ ['sent', 'u64'],
221
+ ['received', 'u64'],
222
+ ['sent_to', { kind: 'map', key: 'u32', value: 'u64' }],
223
+ ['received_from', { kind: 'map', key: 'u32', value: 'u64' }],
224
+ ['routers', { kind: 'map', key: 'u32', value: [32] }],
225
+ ],
226
+ },
227
+ ],
228
+ [
229
+ SealevelInterchainGasPaymasterConfig,
230
+ SealevelInterchainGasPaymasterConfigSchema,
231
+ ],
232
+ ]);
233
+ //# sourceMappingURL=sealevelAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sealevelAdapter.js","sourceRoot":"","sources":["../../src/multiProtocolApp/sealevelAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,SAAS,EACT,aAAa,EACb,WAAW,EACX,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAGL,YAAY,EACZ,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,EAC1B,oCAAoC,EACpC,0CAA0C,EAC1C,qBAAqB,EAErB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAK5B,MAAM,OAAO,yBACX,SAAQ,qBAAqB;IAIX;IACA;IACA;IAHlB,YACkB,SAAoB,EACpB,aAAoC,EACpC,SAAgD;QAEhE,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;QAJ3B,cAAS,GAAT,SAAS,CAAW;QACpB,kBAAa,GAAb,aAAa,CAAuB;QACpC,cAAS,GAAT,SAAS,CAAuC;IAGlE,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,WAAsB,EACtB,OAAe,EACf,KAAa,EACb,MAAe;QAEf,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,yCAAyC,EACzC,IAAI,CAAC,SAAS,EACd,WAAW,EACX,OAAO,EACP,KAAK,CACN,CAAC;QAEF,MAAM,EAAE,OAAO,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;qBAC3C;iBACF;gBACD,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;gBACzC,CAAC,MAAM,EAAE,KAAK,CAAC;gBACf,CAAC,UAAU,EAAE,KAAK,CAAC;gBACnB,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;gBACtD,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;gBAC5D,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;aACtD;SACF;KACF;IACD;QACE,oCAAoC;QACpC,0CAA0C;KAC3C;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ChainName, IRouterAdapter, TypedTransaction } from '@hyperlane-xyz/sdk';
2
+ import { Address } from '@hyperlane-xyz/utils';
3
+ export interface IHelloWorldAdapter extends IRouterAdapter {
4
+ populateSendHelloTx: (destination: ChainName, message: string, value: string, sender: Address) => Promise<TypedTransaction>;
5
+ sentStat: (destination: ChainName) => Promise<number>;
6
+ }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/multiProtocolApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,cAAc,EACd,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,mBAAmB,EAAE,CACnB,WAAW,EAAE,SAAS,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,KACZ,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE/B,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACvD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/multiProtocolApp/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/scripts/check.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import { chainAddresses } from '@hyperlane-xyz/registry';
2
+ import { HyperlaneCore, MultiProvider, attachContractsMap, } from '@hyperlane-xyz/sdk';
3
+ import { HelloWorldApp } from '../app/app.js';
4
+ import { helloWorldFactories } from '../app/contracts.js';
5
+ import { HelloWorldChecker } from '../deploy/check.js';
6
+ import { prodConfigs } from '../deploy/config.js';
7
+ // COPY FROM OUTPUT OF DEPLOYMENT SCRIPT OR IMPORT FROM ELSEWHERE
8
+ const deploymentAddresses = {};
9
+ // SET CONTRACT OWNER ADDRESS HERE
10
+ const ownerAddress = '0x123...';
11
+ async function check() {
12
+ console.info('Preparing utilities');
13
+ const multiProvider = new MultiProvider(prodConfigs);
14
+ const contractsMap = attachContractsMap(deploymentAddresses, helloWorldFactories);
15
+ // If the default registry does not contain the core contract addresses you need,
16
+ // Replace `chainAddresses` with a custom map of addresses
17
+ const core = HyperlaneCore.fromAddressesMap(chainAddresses, multiProvider);
18
+ const app = new HelloWorldApp(core, contractsMap, multiProvider);
19
+ const config = core.getRouterConfig(ownerAddress);
20
+ console.info('Starting check');
21
+ const helloWorldChecker = new HelloWorldChecker(multiProvider, app, config);
22
+ await helloWorldChecker.check();
23
+ helloWorldChecker.expectEmpty();
24
+ }
25
+ check()
26
+ .then(() => console.info('Check complete'))
27
+ .catch(console.error);
28
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/scripts/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAEL,aAAa,EACb,aAAa,EACb,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,iEAAiE;AACjE,MAAM,mBAAmB,GAAsC,EAAE,CAAC;AAElE,kCAAkC;AAClC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,KAAK,UAAU,KAAK;IAClB,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC;IAErD,MAAM,YAAY,GAAG,kBAAkB,CACrC,mBAAmB,EACnB,mBAAmB,CACpB,CAAC;IAEF,iFAAiF;IACjF,0DAA0D;IAC1D,MAAM,IAAI,GAAG,aAAa,CAAC,gBAAgB,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;IAC3E,MAAM,GAAG,GAAG,IAAI,aAAa,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,iBAAiB,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/scripts/deploy.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { Wallet } from 'ethers';
2
+ import { chainAddresses } from '@hyperlane-xyz/registry';
3
+ import { HyperlaneCore, MultiProvider, serializeContractsMap, } from '@hyperlane-xyz/sdk';
4
+ import { prodConfigs } from '../deploy/config.js';
5
+ import { HelloWorldDeployer } from '../deploy/deploy.js';
6
+ async function main() {
7
+ console.info('Getting signer');
8
+ const signer = new Wallet('SET KEY HERE OR CREATE YOUR OWN SIGNER');
9
+ console.info('Preparing utilities');
10
+ const multiProvider = new MultiProvider(prodConfigs);
11
+ multiProvider.setSharedSigner(signer);
12
+ // If the default registry does not contain the core contract addresses you need,
13
+ // Replace `chainAddresses` with a custom map of addresses
14
+ const core = HyperlaneCore.fromAddressesMap(chainAddresses, multiProvider);
15
+ const config = core.getRouterConfig(signer.address);
16
+ const deployer = new HelloWorldDeployer(multiProvider);
17
+ const chainToContracts = await deployer.deploy(config);
18
+ const addresses = serializeContractsMap(chainToContracts);
19
+ console.info('===Contract Addresses===');
20
+ console.info(JSON.stringify(addresses));
21
+ }
22
+ main()
23
+ .then(() => console.info('Deploy complete'))
24
+ .catch(console.error);
25
+ //# sourceMappingURL=deploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/scripts/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC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1
+ import '@nomiclabs/hardhat-waffle';
2
+ //# sourceMappingURL=deploy.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.test.d.ts","sourceRoot":"","sources":["../../src/test/deploy.test.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,37 @@
1
+ import '@nomiclabs/hardhat-waffle';
2
+ import hre from 'hardhat';
3
+ import { HyperlaneIsmFactory, HyperlaneProxyFactoryDeployer, MultiProvider, TestCoreDeployer, } from '@hyperlane-xyz/sdk';
4
+ import { HelloWorldApp } from '../app/app.js';
5
+ import { HelloWorldChecker } from '../deploy/check.js';
6
+ import { HelloWorldDeployer } from '../deploy/deploy.js';
7
+ describe('deploy', async () => {
8
+ let multiProvider;
9
+ let core;
10
+ let config;
11
+ let deployer;
12
+ let contracts;
13
+ let app;
14
+ before(async () => {
15
+ const [signer] = await hre.ethers.getSigners();
16
+ multiProvider = MultiProvider.createTestMultiProvider({ signer });
17
+ const ismFactoryDeployer = new HyperlaneProxyFactoryDeployer(multiProvider);
18
+ const ismFactory = new HyperlaneIsmFactory(await ismFactoryDeployer.deploy(multiProvider.mapKnownChains(() => ({}))), multiProvider);
19
+ const coreDeployer = new TestCoreDeployer(multiProvider, ismFactory);
20
+ core = await coreDeployer.deployApp();
21
+ config = core.getRouterConfig(signer.address);
22
+ deployer = new HelloWorldDeployer(multiProvider);
23
+ });
24
+ it('deploys', async () => {
25
+ contracts = await deployer.deploy(config);
26
+ });
27
+ it('builds app', async () => {
28
+ contracts = await deployer.deploy(config);
29
+ app = new HelloWorldApp(core, contracts, multiProvider);
30
+ });
31
+ it('checks', async () => {
32
+ const checker = new HelloWorldChecker(multiProvider, app, config);
33
+ await checker.check();
34
+ checker.expectEmpty();
35
+ });
36
+ });
37
+ //# sourceMappingURL=deploy.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.test.js","sourceRoot":"","sources":["../../src/test/deploy.test.ts"],"names":[],"mappings":"A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,CAAC;IAEH,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,SAAS,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;QAC1B,SAAS,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1C,GAAG,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QACtB,MAAM,OAAO,GAAG,IAAI,iBAAiB,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=helloworld.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helloworld.test.d.ts","sourceRoot":"","sources":["../../src/test/helloworld.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,70 @@
1
+ import { expect } from 'chai';
2
+ import hre from 'hardhat';
3
+ import { HyperlaneIsmFactory, HyperlaneProxyFactoryDeployer, MultiProvider, TestChainName, TestCoreDeployer, } from '@hyperlane-xyz/sdk';
4
+ import { HelloWorldDeployer } from '../deploy/deploy.js';
5
+ describe('HelloWorld', async () => {
6
+ const localChain = TestChainName.test1;
7
+ const remoteChain = TestChainName.test2;
8
+ let localDomain;
9
+ let remoteDomain;
10
+ let signer;
11
+ let local;
12
+ let remote;
13
+ let multiProvider;
14
+ let coreApp;
15
+ let config;
16
+ before(async () => {
17
+ [signer] = await hre.ethers.getSigners();
18
+ multiProvider = MultiProvider.createTestMultiProvider({ signer });
19
+ const ismFactoryDeployer = new HyperlaneProxyFactoryDeployer(multiProvider);
20
+ const ismFactory = new HyperlaneIsmFactory(await ismFactoryDeployer.deploy(multiProvider.mapKnownChains(() => ({}))), multiProvider);
21
+ coreApp = await new TestCoreDeployer(multiProvider, ismFactory).deployApp();
22
+ config = coreApp.getRouterConfig(signer.address);
23
+ localDomain = multiProvider.getDomainId(localChain);
24
+ remoteDomain = multiProvider.getDomainId(remoteChain);
25
+ });
26
+ beforeEach(async () => {
27
+ const helloWorld = new HelloWorldDeployer(multiProvider);
28
+ const contracts = await helloWorld.deploy(config);
29
+ local = contracts[localChain].router;
30
+ remote = contracts[remoteChain].router;
31
+ // The all counts start empty
32
+ expect(await local.sent()).to.equal(0);
33
+ expect(await local.received()).to.equal(0);
34
+ expect(await remote.sent()).to.equal(0);
35
+ expect(await remote.received()).to.equal(0);
36
+ });
37
+ it('sends a message', async () => {
38
+ const body = 'Hello';
39
+ const payment = await local['quoteDispatch(uint32,bytes)'](remoteDomain, Buffer.from(body));
40
+ await expect(local.sendHelloWorld(remoteDomain, body, {
41
+ value: payment,
42
+ })).to.emit(local, 'SentHelloWorld');
43
+ // The sent counts are correct
44
+ expect(await local.sent()).to.equal(1);
45
+ expect(await local.sentTo(remoteDomain)).to.equal(1);
46
+ // The received counts are correct
47
+ expect(await local.received()).to.equal(0);
48
+ });
49
+ it('reverts if there is insufficient payment', async () => {
50
+ const body = 'Hello';
51
+ await expect(local.sendHelloWorld(remoteDomain, body, {
52
+ value: 0,
53
+ })).to.be.revertedWith('ProtocolFee: insufficient protocol fee');
54
+ });
55
+ it('handles a message', async () => {
56
+ const body = 'World';
57
+ const payment = await local['quoteDispatch(uint32,bytes)'](remoteDomain, Buffer.from(body));
58
+ await local.sendHelloWorld(remoteDomain, body, {
59
+ value: payment,
60
+ });
61
+ // Mock processing of the message by Hyperlane
62
+ await coreApp.processOutboundMessages(localChain);
63
+ // The initial message has been dispatched.
64
+ expect(await local.sent()).to.equal(1);
65
+ // The initial message has been processed.
66
+ expect(await remote.received()).to.equal(1);
67
+ expect(await remote.receivedFrom(localDomain)).to.equal(1);
68
+ });
69
+ });
70
+ //# sourceMappingURL=helloworld.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helloworld.test.js","sourceRoot":"","sources":["../../src/test/helloworld.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,GAAG,MAAM,SAAS,CAAC;AAE1B,OAAO,EAEL,mBAAmB,EACnB,6BAA6B,EAC7B,aAAa,EACb,aAAa,EAEb,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzD,QAAQ,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;IAChC,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC;IACvC,MAAM,WAAW,GAAG,aAAa,CAAC,KAAK,CAAC;IACxC,IAAI,WAAmB,CAAC;IACxB,IAAI,YAAoB,CAAC;IAEzB,IAAI,MAAyB,CAAC;IAC9B,IAAI,KAAiB,CAAC;IACtB,IAAI,MAAkB,CAAC;IACvB,IAAI,aAA4B,CAAC;IACjC,IAAI,OAAoB,CAAC;IACzB,IAAI,MAAkC,CAAC;IAEvC,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACzC,aAAa,GAAG,aAAa,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAClE,MAAM,kBAAkB,GAAG,IAAI,6BAA6B,CAAC,aAAa,CAAC,CAAC;QAC5E,MAAM,UAAU,GAAG,IAAI,mBAAmB,CACxC,MAAM,kBAAkB,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EACzE,aAAa,C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,CAAC,UAAU,CAAC,CAAC;QAClD,2CAA2C;QAC3C,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvC,0CAA0C;QAC1C,MAAM,CAAC,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,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,50 @@
1
+ import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
2
+ import type { FunctionFragment, Result } from "@ethersproject/abi";
3
+ import type { Listener, Provider } from "@ethersproject/providers";
4
+ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../common.js";
5
+ export interface PackageVersionedInterface extends utils.Interface {
6
+ functions: {
7
+ "PACKAGE_VERSION()": FunctionFragment;
8
+ };
9
+ getFunction(nameOrSignatureOrTopic: "PACKAGE_VERSION" | "PACKAGE_VERSION()"): FunctionFragment;
10
+ encodeFunctionData(functionFragment: "PACKAGE_VERSION", values?: undefined): string;
11
+ encodeFunctionData(functionFragment: "PACKAGE_VERSION()", values?: undefined): string;
12
+ decodeFunctionResult(functionFragment: "PACKAGE_VERSION", data: BytesLike): Result;
13
+ decodeFunctionResult(functionFragment: "PACKAGE_VERSION()", data: BytesLike): Result;
14
+ events: {};
15
+ }
16
+ export interface PackageVersioned extends BaseContract {
17
+ connect(signerOrProvider: Signer | Provider | string): this;
18
+ attach(addressOrName: string): this;
19
+ deployed(): Promise<this>;
20
+ interface: PackageVersionedInterface;
21
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
22
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
23
+ listeners(eventName?: string): Array<Listener>;
24
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
25
+ removeAllListeners(eventName?: string): this;
26
+ off: OnEvent<this>;
27
+ on: OnEvent<this>;
28
+ once: OnEvent<this>;
29
+ removeListener: OnEvent<this>;
30
+ functions: {
31
+ PACKAGE_VERSION(overrides?: CallOverrides): Promise<[string]>;
32
+ "PACKAGE_VERSION()"(overrides?: CallOverrides): Promise<[string]>;
33
+ };
34
+ PACKAGE_VERSION(overrides?: CallOverrides): Promise<string>;
35
+ "PACKAGE_VERSION()"(overrides?: CallOverrides): Promise<string>;
36
+ callStatic: {
37
+ PACKAGE_VERSION(overrides?: CallOverrides): Promise<string>;
38
+ "PACKAGE_VERSION()"(overrides?: CallOverrides): Promise<string>;
39
+ };
40
+ filters: {};
41
+ estimateGas: {
42
+ PACKAGE_VERSION(overrides?: CallOverrides): Promise<BigNumber>;
43
+ "PACKAGE_VERSION()"(overrides?: CallOverrides): Promise<BigNumber>;
44
+ };
45
+ populateTransaction: {
46
+ PACKAGE_VERSION(overrides?: CallOverrides): Promise<PopulatedTransaction>;
47
+ "PACKAGE_VERSION()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;
48
+ };
49
+ }
50
+ //# sourceMappingURL=PackageVersioned.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageVersioned.d.ts","sourceRoot":"","sources":["../../../../../src/types/@hyperlane-xyz/core/contracts/PackageVersioned.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,MAAM,EACN,KAAK,EACN,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,oBAA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,SAAS,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAE/D,mBAAmB,CAAC,SAAS,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;KACpE,CAAC;IAEF,mBAAmB,EAAE;QACnB,eAAe,CAAC,SAAS,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAE1E,mBAAmB,CACjB,SAAS,CAAC,EAAE,aAAa,GACxB,OAAO,CAAC,oBAAoB,CAAC,CAAC;KAClC,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PackageVersioned.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PackageVersioned.js","sourceRoot":"","sources":["../../../../../src/types/@hyperlane-xyz/core/contracts/PackageVersioned.ts"],"names":[],"mappings":""}