@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.
- package/README.md +27 -0
- package/contracts/HelloWorld.sol +107 -0
- package/dist/app/app.d.ts +17 -0
- package/dist/app/app.d.ts.map +1 -0
- package/dist/app/app.js +55 -0
- package/dist/app/app.js.map +1 -0
- package/dist/app/contracts.d.ts +6 -0
- package/dist/app/contracts.d.ts.map +1 -0
- package/dist/app/contracts.js +5 -0
- package/dist/app/contracts.js.map +1 -0
- package/dist/app/types.d.ts +5 -0
- package/dist/app/types.d.ts.map +1 -0
- package/dist/app/types.js +2 -0
- package/dist/app/types.js.map +1 -0
- package/dist/deploy/check.d.ts +7 -0
- package/dist/deploy/check.d.ts.map +1 -0
- package/dist/deploy/check.js +4 -0
- package/dist/deploy/check.js.map +1 -0
- package/dist/deploy/config.d.ts +6 -0
- package/dist/deploy/config.d.ts.map +1 -0
- package/dist/deploy/config.js +6 -0
- package/dist/deploy/config.js.map +1 -0
- package/dist/deploy/deploy.d.ts +14 -0
- package/dist/deploy/deploy.d.ts.map +1 -0
- package/dist/deploy/deploy.js +32 -0
- package/dist/deploy/deploy.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/multiProtocolApp/evmAdapter.d.ts +20 -0
- package/dist/multiProtocolApp/evmAdapter.d.ts.map +1 -0
- package/dist/multiProtocolApp/evmAdapter.js +46 -0
- package/dist/multiProtocolApp/evmAdapter.js.map +1 -0
- package/dist/multiProtocolApp/multiProtocolApp.d.ts +15 -0
- package/dist/multiProtocolApp/multiProtocolApp.d.ts.map +1 -0
- package/dist/multiProtocolApp/multiProtocolApp.js +35 -0
- package/dist/multiProtocolApp/multiProtocolApp.js.map +1 -0
- package/dist/multiProtocolApp/sealevelAdapter.d.ts +62 -0
- package/dist/multiProtocolApp/sealevelAdapter.d.ts.map +1 -0
- package/dist/multiProtocolApp/sealevelAdapter.js +233 -0
- package/dist/multiProtocolApp/sealevelAdapter.js.map +1 -0
- package/dist/multiProtocolApp/types.d.ts +7 -0
- package/dist/multiProtocolApp/types.d.ts.map +1 -0
- package/dist/multiProtocolApp/types.js +2 -0
- package/dist/multiProtocolApp/types.js.map +1 -0
- package/dist/scripts/check.d.ts +2 -0
- package/dist/scripts/check.d.ts.map +1 -0
- package/dist/scripts/check.js +28 -0
- package/dist/scripts/check.js.map +1 -0
- package/dist/scripts/deploy.d.ts +2 -0
- package/dist/scripts/deploy.d.ts.map +1 -0
- package/dist/scripts/deploy.js +25 -0
- package/dist/scripts/deploy.js.map +1 -0
- package/dist/test/deploy.test.d.ts +2 -0
- package/dist/test/deploy.test.d.ts.map +1 -0
- package/dist/test/deploy.test.js +37 -0
- package/dist/test/deploy.test.js.map +1 -0
- package/dist/test/helloworld.test.d.ts +2 -0
- package/dist/test/helloworld.test.d.ts.map +1 -0
- package/dist/test/helloworld.test.js +70 -0
- package/dist/test/helloworld.test.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.d.ts +50 -0
- package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/PackageVersioned.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts +295 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/Router.d.ts +480 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/Router.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/Router.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/Router.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/index.d.ts +3 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/client/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts +3 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts +50 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/index.d.ts +8 -0
- package/dist/types/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts +81 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +50 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts +324 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts +66 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts +111 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +7 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/core/index.d.ts +3 -0
- package/dist/types/@hyperlane-xyz/core/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/core/index.js +2 -0
- package/dist/types/@hyperlane-xyz/core/index.js.map +1 -0
- package/dist/types/@hyperlane-xyz/index.d.ts +3 -0
- package/dist/types/@hyperlane-xyz/index.d.ts.map +1 -0
- package/dist/types/@hyperlane-xyz/index.js +2 -0
- package/dist/types/@hyperlane-xyz/index.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts +138 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/index.d.ts +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/index.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/index.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/access/index.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/index.d.ts +7 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/index.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/index.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +3 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/index.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts +41 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/proxy/utils/index.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts +41 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.d.ts +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.d.ts.map +1 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.js +2 -0
- package/dist/types/@openzeppelin/contracts-upgradeable/utils/index.js.map +1 -0
- package/dist/types/@openzeppelin/index.d.ts +3 -0
- package/dist/types/@openzeppelin/index.d.ts.map +1 -0
- package/dist/types/@openzeppelin/index.js +2 -0
- package/dist/types/@openzeppelin/index.js.map +1 -0
- package/dist/types/common.d.ts +22 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +2 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/contracts/HelloWorld.d.ts +649 -0
- package/dist/types/contracts/HelloWorld.d.ts.map +1 -0
- package/dist/types/contracts/HelloWorld.js +2 -0
- package/dist/types/contracts/HelloWorld.js.map +1 -0
- package/dist/types/contracts/index.d.ts +2 -0
- package/dist/types/contracts/index.d.ts.map +1 -0
- package/dist/types/contracts/index.js +2 -0
- package/dist/types/contracts/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.d.ts +19 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.js +29 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/PackageVersioned__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.d.ts +150 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.js +198 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.d.ts +240 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.js +315 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts +3 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.js +6 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/client/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts +2 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js +5 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts +31 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js +52 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +2 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js +5 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/index.d.ts +5 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/index.js +8 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts +37 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +53 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +19 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +29 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js +6 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts +332 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js +436 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts +27 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js +39 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts +65 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js +90 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +2 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js +5 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +5 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js +8 -0
- package/dist/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/index.d.ts +2 -0
- package/dist/types/factories/@hyperlane-xyz/core/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/core/index.js +5 -0
- package/dist/types/factories/@hyperlane-xyz/core/index.js.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/index.d.ts +2 -0
- package/dist/types/factories/@hyperlane-xyz/index.d.ts.map +1 -0
- package/dist/types/factories/@hyperlane-xyz/index.js +5 -0
- package/dist/types/factories/@hyperlane-xyz/index.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts +60 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js +81 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.d.ts +2 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.js +5 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/access/index.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.d.ts +4 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.js +7 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/index.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +2 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.js +5 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/index.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts +19 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js +29 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +2 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.js +5 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts +19 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js +29 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.d.ts +2 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.js +5 -0
- package/dist/types/factories/@openzeppelin/contracts-upgradeable/utils/index.js.map +1 -0
- package/dist/types/factories/@openzeppelin/index.d.ts +2 -0
- package/dist/types/factories/@openzeppelin/index.d.ts.map +1 -0
- package/dist/types/factories/@openzeppelin/index.js +5 -0
- package/dist/types/factories/@openzeppelin/index.js.map +1 -0
- package/dist/types/factories/contracts/HelloWorld__factory.d.ts +414 -0
- package/dist/types/factories/contracts/HelloWorld__factory.d.ts.map +1 -0
- package/dist/types/factories/contracts/HelloWorld__factory.js +548 -0
- package/dist/types/factories/contracts/HelloWorld__factory.js.map +1 -0
- package/dist/types/factories/contracts/index.d.ts +2 -0
- package/dist/types/factories/contracts/index.d.ts.map +1 -0
- package/dist/types/factories/contracts/index.js +5 -0
- package/dist/types/factories/contracts/index.js.map +1 -0
- package/dist/types/factories/index.d.ts +4 -0
- package/dist/types/factories/index.d.ts.map +1 -0
- package/dist/types/factories/index.js +7 -0
- package/dist/types/factories/index.js.map +1 -0
- package/dist/types/index.d.ts +34 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +15 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +81 -0
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Hyperlane 'Hello World' App Template
|
|
2
|
+
|
|
3
|
+
A basic Hyperlane application with a router contract that can dispatch messages.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
# Install dependencies
|
|
9
|
+
yarn
|
|
10
|
+
|
|
11
|
+
# Build source and generate types
|
|
12
|
+
yarn build
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Test
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
# Run all unit tests
|
|
19
|
+
yarn test
|
|
20
|
+
|
|
21
|
+
# Lint check code
|
|
22
|
+
yarn lint
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Learn more
|
|
26
|
+
|
|
27
|
+
For more information, see the [Hyperlane documentation](https://docs.hyperlane.xyz/docs/intro).
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
pragma solidity ^0.8.13;
|
|
3
|
+
|
|
4
|
+
// ============ External Imports ============
|
|
5
|
+
import {Router} from "@hyperlane-xyz/core/contracts/client/Router.sol";
|
|
6
|
+
import {StandardHookMetadata} from "@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.sol";
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* @title The Hello World App
|
|
10
|
+
* @dev You can use this simple app as a starting point for your own application.
|
|
11
|
+
*/
|
|
12
|
+
contract HelloWorld is Router {
|
|
13
|
+
// A generous upper bound on the amount of gas to use in the handle
|
|
14
|
+
// function when a message is processed. Used for paying for gas.
|
|
15
|
+
uint256 public constant HANDLE_GAS_AMOUNT = 50_000;
|
|
16
|
+
|
|
17
|
+
// A counter of how many messages have been sent from this contract.
|
|
18
|
+
uint256 public sent;
|
|
19
|
+
// A counter of how many messages have been received by this contract.
|
|
20
|
+
uint256 public received;
|
|
21
|
+
|
|
22
|
+
// Keyed by domain, a counter of how many messages that have been sent
|
|
23
|
+
// from this contract to the domain.
|
|
24
|
+
mapping(uint32 => uint256) public sentTo;
|
|
25
|
+
// Keyed by domain, a counter of how many messages that have been received
|
|
26
|
+
// by this contract from the domain.
|
|
27
|
+
mapping(uint32 => uint256) public receivedFrom;
|
|
28
|
+
|
|
29
|
+
// ============ Events ============
|
|
30
|
+
event SentHelloWorld(
|
|
31
|
+
uint32 indexed origin,
|
|
32
|
+
uint32 indexed destination,
|
|
33
|
+
string message
|
|
34
|
+
);
|
|
35
|
+
event ReceivedHelloWorld(
|
|
36
|
+
uint32 indexed origin,
|
|
37
|
+
uint32 indexed destination,
|
|
38
|
+
bytes32 sender,
|
|
39
|
+
string message
|
|
40
|
+
);
|
|
41
|
+
event HandleGasAmountSet(
|
|
42
|
+
uint32 indexed destination,
|
|
43
|
+
uint256 handleGasAmount
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
constructor(address _mailbox, address _hook) Router(_mailbox) {
|
|
47
|
+
// Transfer ownership of the contract to deployer
|
|
48
|
+
_transferOwnership(msg.sender);
|
|
49
|
+
setHook(_hook);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ============ External functions ============
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @notice Sends a message to the _destinationDomain. Any msg.value is
|
|
56
|
+
* used as interchain gas payment.
|
|
57
|
+
* @param _destinationDomain The destination domain to send the message to.
|
|
58
|
+
* @param _message The message to send.
|
|
59
|
+
*/
|
|
60
|
+
function sendHelloWorld(
|
|
61
|
+
uint32 _destinationDomain,
|
|
62
|
+
string calldata _message
|
|
63
|
+
) external payable {
|
|
64
|
+
sent += 1;
|
|
65
|
+
sentTo[_destinationDomain] += 1;
|
|
66
|
+
_Router_dispatch(_destinationDomain, msg.value, bytes(_message));
|
|
67
|
+
emit SentHelloWorld(
|
|
68
|
+
mailbox.localDomain(),
|
|
69
|
+
_destinationDomain,
|
|
70
|
+
_message
|
|
71
|
+
);
|
|
72
|
+
}
|
|
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(
|
|
79
|
+
uint32 _destinationDomain,
|
|
80
|
+
bytes calldata _message
|
|
81
|
+
) external view returns (uint256) {
|
|
82
|
+
return _Router_quoteDispatch(_destinationDomain, _message);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ============ Internal functions ============
|
|
86
|
+
/**
|
|
87
|
+
* @notice Handles a message from a remote router.
|
|
88
|
+
* @dev Only called for messages sent from a remote router, as enforced by Router.sol.
|
|
89
|
+
* @param _origin The domain of the origin of the message.
|
|
90
|
+
* @param _sender The sender of the message.
|
|
91
|
+
* @param _message The message body.
|
|
92
|
+
*/
|
|
93
|
+
function _handle(
|
|
94
|
+
uint32 _origin,
|
|
95
|
+
bytes32 _sender,
|
|
96
|
+
bytes calldata _message
|
|
97
|
+
) internal override {
|
|
98
|
+
received += 1;
|
|
99
|
+
receivedFrom[_origin] += 1;
|
|
100
|
+
emit ReceivedHelloWorld(
|
|
101
|
+
_origin,
|
|
102
|
+
mailbox.localDomain(),
|
|
103
|
+
_sender,
|
|
104
|
+
string(_message)
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BigNumber, ethers } from 'ethers';
|
|
2
|
+
import { ChainMap, ChainName, HyperlaneContracts, HyperlaneContractsMap, HyperlaneCore, MultiProvider, RouterApp } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { Address } from '@hyperlane-xyz/utils';
|
|
4
|
+
import { HelloWorld } from '../types/index.js';
|
|
5
|
+
import { HelloWorldFactories } from './contracts.js';
|
|
6
|
+
import { StatCounts } from './types.js';
|
|
7
|
+
export declare class HelloWorldApp extends RouterApp<HelloWorldFactories> {
|
|
8
|
+
readonly core: HyperlaneCore;
|
|
9
|
+
constructor(core: HyperlaneCore, contractsMap: HyperlaneContractsMap<HelloWorldFactories>, multiProvider: MultiProvider, foreignDeployments?: ChainMap<Address>);
|
|
10
|
+
router(contracts: HyperlaneContracts<HelloWorldFactories>): HelloWorld;
|
|
11
|
+
sendHelloWorld(from: ChainName, to: ChainName, message: string, value: BigNumber): Promise<ethers.ContractReceipt>;
|
|
12
|
+
waitForMessageReceipt(receipt: ethers.ContractReceipt): Promise<ethers.ContractReceipt[]>;
|
|
13
|
+
waitForMessageProcessed(receipt: ethers.ContractReceipt): Promise<void>;
|
|
14
|
+
channelStats(from: ChainName, to: ChainName): Promise<StatCounts>;
|
|
15
|
+
stats(): Promise<ChainMap<ChainMap<StatCounts>>>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +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,EAAmC,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,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;IAU5C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAIhE,cAAc,CAClB,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC;IA4B5B,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;CAevD"}
|
package/dist/app/app.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { RouterApp, } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { addBufferToGasLimit, rootLogger } from '@hyperlane-xyz/utils';
|
|
3
|
+
export class HelloWorldApp extends RouterApp {
|
|
4
|
+
core;
|
|
5
|
+
constructor(core, contractsMap, multiProvider, foreignDeployments = {}) {
|
|
6
|
+
super(contractsMap, multiProvider, rootLogger.child({ module: 'HelloWorldApp' }), foreignDeployments);
|
|
7
|
+
this.core = core;
|
|
8
|
+
}
|
|
9
|
+
router(contracts) {
|
|
10
|
+
return contracts.router;
|
|
11
|
+
}
|
|
12
|
+
async sendHelloWorld(from, to, message, value) {
|
|
13
|
+
const sender = this.getContracts(from).router;
|
|
14
|
+
const toDomain = this.multiProvider.getDomainId(to);
|
|
15
|
+
const { blocks, transactionOverrides } = this.multiProvider.getChainMetadata(from);
|
|
16
|
+
// apply gas buffer due to https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/634
|
|
17
|
+
const estimated = await sender.estimateGas.sendHelloWorld(toDomain, message, { ...transactionOverrides, value });
|
|
18
|
+
const quote = await sender.quoteDispatch(toDomain, message);
|
|
19
|
+
const tx = await sender.sendHelloWorld(toDomain, message, {
|
|
20
|
+
gasLimit: addBufferToGasLimit(estimated),
|
|
21
|
+
...transactionOverrides,
|
|
22
|
+
value: value.add(quote),
|
|
23
|
+
});
|
|
24
|
+
this.logger.info('Sending hello message', {
|
|
25
|
+
from,
|
|
26
|
+
to,
|
|
27
|
+
message,
|
|
28
|
+
tx,
|
|
29
|
+
});
|
|
30
|
+
return tx.wait(blocks?.confirmations ?? 1);
|
|
31
|
+
}
|
|
32
|
+
async waitForMessageReceipt(receipt) {
|
|
33
|
+
return this.core.waitForMessageProcessing(receipt);
|
|
34
|
+
}
|
|
35
|
+
async waitForMessageProcessed(receipt) {
|
|
36
|
+
return this.core.waitForMessageProcessed(receipt);
|
|
37
|
+
}
|
|
38
|
+
async channelStats(from, to) {
|
|
39
|
+
const sent = await this.getContracts(from).router.sentTo(this.multiProvider.getDomainId(to));
|
|
40
|
+
const received = await this.getContracts(to).router.receivedFrom(this.multiProvider.getDomainId(from));
|
|
41
|
+
return { sent: sent.toNumber(), received: received.toNumber() };
|
|
42
|
+
}
|
|
43
|
+
async stats() {
|
|
44
|
+
const entries = await Promise.all(this.chains().map(async (source) => {
|
|
45
|
+
const remoteChains = await this.remoteChains(source);
|
|
46
|
+
const destinationEntries = await Promise.all(remoteChains.map(async (destination) => [
|
|
47
|
+
destination,
|
|
48
|
+
await this.channelStats(source, destination),
|
|
49
|
+
]));
|
|
50
|
+
return [source, Object.fromEntries(destinationEntries)];
|
|
51
|
+
}));
|
|
52
|
+
return Object.fromEntries(entries);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|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AI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACrD,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,GAAG,CAC1C,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;gBACtC,WAAW;gBACX,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC;aAC7C,CAAC,CACH,CAAC;YACF,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC,CACH,CAAC;QACF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/app/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,mBAAmB;;CAE/B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/app/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,MAAM,EAAE,IAAI,mBAAmB,EAAE;CAClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/app/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/app/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HyperlaneRouterChecker } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { HelloWorldApp } from '../app/app.js';
|
|
3
|
+
import { HelloWorldFactories } from '../app/contracts.js';
|
|
4
|
+
import { HelloWorldConfig } from './config.js';
|
|
5
|
+
export declare class HelloWorldChecker extends HyperlaneRouterChecker<HelloWorldFactories, HelloWorldApp, HelloWorldConfig> {
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/deploy/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,qBAAa,iBAAkB,SAAQ,sBAAsB,CAC3D,mBAAmB,EACnB,aAAa,EACb,gBAAgB,CACjB;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/deploy/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAO5D,MAAM,OAAO,iBAAkB,SAAQ,sBAItC;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/deploy/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAG5C,eAAO,MAAM,WAAW;;CAEvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/deploy/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKxD,qEAAqE;AACrE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,aAAa;CACjB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChainName, ContractVerifier, HyperlaneContracts, HyperlaneIsmFactory, HyperlaneRouterDeployer, MultiProvider } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { HelloWorldFactories } from '../app/contracts.js';
|
|
3
|
+
import { HelloWorld } from '../types/index.js';
|
|
4
|
+
import { HelloWorldConfig } from './config.js';
|
|
5
|
+
export declare class HelloWorldDeployer extends HyperlaneRouterDeployer<HelloWorldConfig, HelloWorldFactories> {
|
|
6
|
+
readonly ismFactory?: HyperlaneIsmFactory | undefined;
|
|
7
|
+
readonly contractVerifier?: ContractVerifier | undefined;
|
|
8
|
+
constructor(multiProvider: MultiProvider, ismFactory?: HyperlaneIsmFactory | undefined, contractVerifier?: ContractVerifier | undefined, concurrentDeploy?: boolean);
|
|
9
|
+
router(contracts: HyperlaneContracts<HelloWorldFactories>): HelloWorld;
|
|
10
|
+
deployContracts(chain: ChainName, config: HelloWorldConfig): Promise<{
|
|
11
|
+
router: HelloWorld;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/deploy/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAuB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,qBAAa,kBAAmB,SAAQ,uBAAuB,CAC7D,gBAAgB,EAChB,mBAAmB,CACpB;IAGG,QAAQ,CAAC,UAAU,CAAC;IACpB,QAAQ,CAAC,gBAAgB,CAAC;gBAF1B,aAAa,EAAE,aAAa,EACnB,UAAU,CAAC,iCAAqB,EAChC,gBAAgB,CAAC,8BAAkB,EAC5C,gBAAgB,UAAQ;IAS1B,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAMhE,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB;;;CAUjE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ethers } from 'ethers';
|
|
2
|
+
import { HyperlaneRouterDeployer, } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { helloWorldFactories } from '../app/contracts.js';
|
|
4
|
+
export class HelloWorldDeployer extends HyperlaneRouterDeployer {
|
|
5
|
+
ismFactory;
|
|
6
|
+
contractVerifier;
|
|
7
|
+
constructor(multiProvider, ismFactory, contractVerifier, concurrentDeploy = false) {
|
|
8
|
+
super(multiProvider, helloWorldFactories, {
|
|
9
|
+
ismFactory,
|
|
10
|
+
contractVerifier,
|
|
11
|
+
concurrentDeploy,
|
|
12
|
+
});
|
|
13
|
+
this.ismFactory = ismFactory;
|
|
14
|
+
this.contractVerifier = contractVerifier;
|
|
15
|
+
}
|
|
16
|
+
router(contracts) {
|
|
17
|
+
return contracts.router;
|
|
18
|
+
}
|
|
19
|
+
// Custom contract deployment logic can go here
|
|
20
|
+
// If no custom logic is needed, call deployContract for the router
|
|
21
|
+
async deployContracts(chain, config) {
|
|
22
|
+
const router = await this.deployContract(chain, 'router', [
|
|
23
|
+
config.mailbox,
|
|
24
|
+
ethers.constants.AddressZero,
|
|
25
|
+
]);
|
|
26
|
+
await super.configureClient(chain, router, config);
|
|
27
|
+
return {
|
|
28
|
+
router,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/deploy/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAKL,uBAAuB,GAExB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAuB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAK/E,MAAM,OAAO,kBAAmB,SAAQ,uBAGvC;IAGY;IACA;IAHX,YACE,aAA4B,EACnB,UAAgC,EAChC,gBAAmC,EAC5C,gBAAgB,GAAG,KAAK;QAExB,KAAK,CAAC,aAAa,EAAE,mBAAmB,EAAE;YACxC,UAAU;YACV,gBAAgB;YAChB,gBAAgB;SACjB,CAAC,CAAC;QARM,eAAU,GAAV,UAAU,CAAsB;QAChC,qBAAgB,GAAhB,gBAAgB,CAAmB;IAQ9C,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,SAAS,CAAC,WAAW;SAC7B,CAAC,CAAC;QACH,MAAM,KAAK,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO;YACL,MAAM;SACP,CAAC;IACJ,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { HelloWorldApp } from './app/app.js';
|
|
2
|
+
export { HelloWorldFactories, helloWorldFactories } from './app/contracts.js';
|
|
3
|
+
export { HelloWorldChecker } from './deploy/check.js';
|
|
4
|
+
export { HelloWorldConfig } from './deploy/config.js';
|
|
5
|
+
export { HelloWorldDeployer } from './deploy/deploy.js';
|
|
6
|
+
export { EvmHelloWorldAdapter } from './multiProtocolApp/evmAdapter.js';
|
|
7
|
+
export { HelloMultiProtocolApp } from './multiProtocolApp/multiProtocolApp.js';
|
|
8
|
+
export { SealevelHelloWorldAdapter } from './multiProtocolApp/sealevelAdapter.js';
|
|
9
|
+
export { IHelloWorldAdapter } from './multiProtocolApp/types.js';
|
|
10
|
+
export * as types from './types/index.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { HelloWorldApp } from './app/app.js';
|
|
2
|
+
export { helloWorldFactories } from './app/contracts.js';
|
|
3
|
+
export { HelloWorldChecker } from './deploy/check.js';
|
|
4
|
+
export { HelloWorldDeployer } from './deploy/deploy.js';
|
|
5
|
+
export { EvmHelloWorldAdapter } from './multiProtocolApp/evmAdapter.js';
|
|
6
|
+
export { HelloMultiProtocolApp } from './multiProtocolApp/multiProtocolApp.js';
|
|
7
|
+
export { SealevelHelloWorldAdapter } from './multiProtocolApp/sealevelAdapter.js';
|
|
8
|
+
export * as types from './types/index.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAuB,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChainName, EthersV5Transaction, EvmRouterAdapter, MultiProtocolProvider } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { Address } from '@hyperlane-xyz/utils';
|
|
3
|
+
import { HelloWorld } from '../types/index.js';
|
|
4
|
+
import { IHelloWorldAdapter } from './types.js';
|
|
5
|
+
export declare class EvmHelloWorldAdapter extends EvmRouterAdapter implements IHelloWorldAdapter {
|
|
6
|
+
readonly chainName: ChainName;
|
|
7
|
+
readonly multiProvider: MultiProtocolProvider;
|
|
8
|
+
readonly addresses: {
|
|
9
|
+
router: Address;
|
|
10
|
+
mailbox: Address;
|
|
11
|
+
};
|
|
12
|
+
constructor(chainName: ChainName, multiProvider: MultiProtocolProvider, addresses: {
|
|
13
|
+
router: Address;
|
|
14
|
+
mailbox: Address;
|
|
15
|
+
});
|
|
16
|
+
populateSendHelloTx(destination: ChainName, message: string, value: string, sender: Address): Promise<EthersV5Transaction>;
|
|
17
|
+
sentStat(destination: ChainName): Promise<number>;
|
|
18
|
+
getConnectedContract(): HelloWorld;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=evmAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evmAdapter.d.ts","sourceRoot":"","sources":["../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAuB,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,oBACX,SAAQ,gBACR,YAAW,kBAAkB;aAGX,SAAS,EAAE,SAAS;aACpB,aAAa,EAAE,qBAAqB;aACpC,SAAS,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;gBAFhD,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,qBAAqB,EACpC,SAAS,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;IAK5D,mBAAmB,CACvB,WAAW,EAAE,SAAS,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,mBAAmB,CAAC;IAqCzB,QAAQ,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAO9C,oBAAoB,IAAI,UAAU;CAM5C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BigNumber, ethers } from 'ethers';
|
|
2
|
+
import { EvmRouterAdapter, ProviderType, } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { addBufferToGasLimit } from '@hyperlane-xyz/utils';
|
|
4
|
+
import { HelloWorld__factory } from '../types/index.js';
|
|
5
|
+
export class EvmHelloWorldAdapter extends EvmRouterAdapter {
|
|
6
|
+
chainName;
|
|
7
|
+
multiProvider;
|
|
8
|
+
addresses;
|
|
9
|
+
constructor(chainName, multiProvider, addresses) {
|
|
10
|
+
super(chainName, multiProvider, addresses);
|
|
11
|
+
this.chainName = chainName;
|
|
12
|
+
this.multiProvider = multiProvider;
|
|
13
|
+
this.addresses = addresses;
|
|
14
|
+
}
|
|
15
|
+
async populateSendHelloTx(destination, message, value, sender) {
|
|
16
|
+
const contract = this.getConnectedContract();
|
|
17
|
+
const toDomain = this.multiProvider.getDomainId(destination);
|
|
18
|
+
const { transactionOverrides } = this.multiProvider.getChainMetadata(this.chainName);
|
|
19
|
+
const quote = await contract.callStatic.quoteDispatch(toDomain, ethers.utils.toUtf8Bytes(message));
|
|
20
|
+
// apply gas buffer due to https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/634
|
|
21
|
+
const estimated = await contract.estimateGas.sendHelloWorld(toDomain, message, {
|
|
22
|
+
...transactionOverrides,
|
|
23
|
+
// Some networks, like PolygonZkEvm, require a `from` address
|
|
24
|
+
// with funds to be specified when estimating gas for a transaction
|
|
25
|
+
// that provides non-zero `value`.
|
|
26
|
+
from: sender,
|
|
27
|
+
value: BigNumber.from(value).add(quote),
|
|
28
|
+
});
|
|
29
|
+
const tx = await contract.populateTransaction.sendHelloWorld(toDomain, message, {
|
|
30
|
+
gasLimit: addBufferToGasLimit(estimated),
|
|
31
|
+
...transactionOverrides,
|
|
32
|
+
value: BigNumber.from(value).add(quote),
|
|
33
|
+
});
|
|
34
|
+
return { transaction: tx, type: ProviderType.EthersV5 };
|
|
35
|
+
}
|
|
36
|
+
async sentStat(destination) {
|
|
37
|
+
const destinationDomain = this.multiProvider.getDomainId(destination);
|
|
38
|
+
const originContract = this.getConnectedContract();
|
|
39
|
+
const sent = await originContract.sentTo(destinationDomain);
|
|
40
|
+
return sent.toNumber();
|
|
41
|
+
}
|
|
42
|
+
getConnectedContract() {
|
|
43
|
+
return HelloWorld__factory.connect(this.addresses.router, this.getProvider());
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=evmAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evmAdapter.js","sourceRoot":"","sources":["../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAGL,gBAAgB,EAEhB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAW,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAc,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIpE,MAAM,OAAO,oBACX,SAAQ,gBAAgB;IAIN;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,MAAM,QAAQ,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAC7D,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAClE,IAAI,CAAC,SAAS,CACf,CAAC;QAEF,MAA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|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChainMap, ChainName, MultiProtocolRouterApp, RouterAddress, TypedTransaction } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { Address, ProtocolType } from '@hyperlane-xyz/utils';
|
|
3
|
+
import { StatCounts } from '../app/types.js';
|
|
4
|
+
import { EvmHelloWorldAdapter } from './evmAdapter.js';
|
|
5
|
+
import { SealevelHelloWorldAdapter } from './sealevelAdapter.js';
|
|
6
|
+
import { IHelloWorldAdapter } from './types.js';
|
|
7
|
+
export declare class HelloMultiProtocolApp extends MultiProtocolRouterApp<IHelloWorldAdapter, RouterAddress & {
|
|
8
|
+
mailbox: Address;
|
|
9
|
+
}> {
|
|
10
|
+
protocolToAdapter(protocol: ProtocolType): typeof EvmHelloWorldAdapter | typeof SealevelHelloWorldAdapter;
|
|
11
|
+
populateHelloWorldTx(origin: ChainName, destination: ChainName, message: string, value: string, sender: Address): Promise<TypedTransaction>;
|
|
12
|
+
channelStats(origin: ChainName, destination: ChainName): Promise<StatCounts>;
|
|
13
|
+
stats(): Promise<ChainMap<ChainMap<StatCounts>>>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=multiProtocolApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiProtocolApp.d.ts","sourceRoot":"","sources":["../../src/multiProtocolApp/multiProtocolApp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,qBAAsB,SAAQ,sBAAsB,CAC/D,kBAAkB,EAClB,aAAa,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CACrC;IACU,iBAAiB,CAAC,QAAQ,EAAE,YAAY;IAMjD,oBAAoB,CAClB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,SAAS,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,gBAAgB,CAAC;IAStB,YAAY,CAChB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,SAAS,GACrB,OAAO,CAAC,UAAU,CAAC;IAQhB,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;CAevD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MultiProtocolRouterApp, } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { ProtocolType } from '@hyperlane-xyz/utils';
|
|
3
|
+
import { EvmHelloWorldAdapter } from './evmAdapter.js';
|
|
4
|
+
import { SealevelHelloWorldAdapter } from './sealevelAdapter.js';
|
|
5
|
+
export class HelloMultiProtocolApp extends MultiProtocolRouterApp {
|
|
6
|
+
protocolToAdapter(protocol) {
|
|
7
|
+
if (protocol === ProtocolType.Ethereum)
|
|
8
|
+
return EvmHelloWorldAdapter;
|
|
9
|
+
if (protocol === ProtocolType.Sealevel)
|
|
10
|
+
return SealevelHelloWorldAdapter;
|
|
11
|
+
throw new Error(`No adapter for protocol ${protocol}`);
|
|
12
|
+
}
|
|
13
|
+
populateHelloWorldTx(origin, destination, message, value, sender) {
|
|
14
|
+
return this.adapter(origin).populateSendHelloTx(destination, message, value, sender);
|
|
15
|
+
}
|
|
16
|
+
async channelStats(origin, destination) {
|
|
17
|
+
const [sent, received] = await Promise.all([
|
|
18
|
+
this.adapter(origin).sentStat(destination),
|
|
19
|
+
this.adapter(destination).sentStat(origin),
|
|
20
|
+
]);
|
|
21
|
+
return { sent, received };
|
|
22
|
+
}
|
|
23
|
+
async stats() {
|
|
24
|
+
const entries = await Promise.all(this.chains().map(async (source) => {
|
|
25
|
+
const remoteChains = await this.remoteChains(source);
|
|
26
|
+
const destinationEntries = await Promise.all(remoteChains.map(async (destination) => [
|
|
27
|
+
destination,
|
|
28
|
+
await this.channelStats(source, destination),
|
|
29
|
+
]));
|
|
30
|
+
return [source, Object.fromEntries(destinationEntries)];
|
|
31
|
+
}));
|
|
32
|
+
return Object.fromEntries(entries);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=multiProtocolApp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiProtocolApp.js","sourceRoot":"","sources":["../../src/multiProtocolApp/multiProtocolApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,GAGvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAW,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAI7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,MAAM,OAAO,qBAAsB,SAAQ,sBAG1C;IACU,iBAAiB,CAAC,QAAsB;QAC/C,IAAI,QAAQ,KAAK,YAAY,CAAC,QAAQ;YAAE,OAAO,oBAAoB,CAAC;QACpE,IAAI,QAAQ,KAAK,YAAY,CAAC,QAAQ;YAAE,OAAO,yBAAyB,CAAC;QACzE,MAAM,IAAI,KAAK,CAAC,2BAA2B,QAAQ,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,oBAAoB,CAClB,MAAiB,EACjB,WAAsB,EACtB,OAAe,EACf,KAAa,EACb,MAAe;QAEf,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAC7C,WAAW,EACX,OAAO,EACP,KAAK,EACL,MAAM,CACP,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,MAAiB,EACjB,WAAsB;QAEtB,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACzC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC;YAC1C,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC3C,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,OAAO,GAA6C,MAAM,OAAO,CAAC,GAAG,CACzE,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACjC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YACrD,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,GAAG,CAC1C,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;gBACtC,WAAW;gBACX,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC;aAC7C,CAAC,CACH,CAAC;YACF,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC,CACH,CAAC;QACF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AccountMeta, PublicKey } from '@solana/web3.js';
|
|
2
|
+
import { ChainName, MultiProtocolProvider, SealevelRouterAdapter, SolanaWeb3Transaction } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { Address, Domain } from '@hyperlane-xyz/utils';
|
|
4
|
+
import { IHelloWorldAdapter } from './types.js';
|
|
5
|
+
export declare class SealevelHelloWorldAdapter extends SealevelRouterAdapter implements IHelloWorldAdapter {
|
|
6
|
+
readonly chainName: ChainName;
|
|
7
|
+
readonly multiProvider: MultiProtocolProvider;
|
|
8
|
+
readonly addresses: {
|
|
9
|
+
router: Address;
|
|
10
|
+
mailbox: Address;
|
|
11
|
+
};
|
|
12
|
+
constructor(chainName: ChainName, multiProvider: MultiProtocolProvider, addresses: {
|
|
13
|
+
router: Address;
|
|
14
|
+
mailbox: Address;
|
|
15
|
+
});
|
|
16
|
+
populateSendHelloTx(destination: ChainName, message: string, value: string, sender: Address): Promise<SolanaWeb3Transaction>;
|
|
17
|
+
getSendHelloKeyList(programId: PublicKey, mailbox: PublicKey, sender: PublicKey, randomWallet: PublicKey): Array<AccountMeta>;
|
|
18
|
+
deriveProgramStoragePDA(programId: string | PublicKey): PublicKey;
|
|
19
|
+
sentStat(destination: ChainName): Promise<number>;
|
|
20
|
+
getAccountInfo(): Promise<HelloWorldData>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Borsh Schema
|
|
24
|
+
*/
|
|
25
|
+
export declare enum HelloWorldInstruction {
|
|
26
|
+
Init = 0,
|
|
27
|
+
SendHelloWorld = 1,
|
|
28
|
+
SetInterchainSecurityModule = 2,
|
|
29
|
+
EnrollRemoteRouters = 3
|
|
30
|
+
}
|
|
31
|
+
export declare class SendHelloWorldInstruction {
|
|
32
|
+
readonly fields: any;
|
|
33
|
+
destination: number;
|
|
34
|
+
message: string;
|
|
35
|
+
constructor(fields: any);
|
|
36
|
+
}
|
|
37
|
+
export declare const SendHelloWorldSchema: Map<any, any>;
|
|
38
|
+
export declare class HelloWorldData {
|
|
39
|
+
readonly fields: any;
|
|
40
|
+
local_domain: Domain;
|
|
41
|
+
mailbox: Uint8Array;
|
|
42
|
+
mailbox_pubkey: PublicKey;
|
|
43
|
+
ism?: Uint8Array;
|
|
44
|
+
ism_pubkey?: PublicKey;
|
|
45
|
+
igp?: {
|
|
46
|
+
program_id: Uint8Array;
|
|
47
|
+
type: number;
|
|
48
|
+
igp_account: Uint8Array;
|
|
49
|
+
};
|
|
50
|
+
igp_pubkey?: PublicKey;
|
|
51
|
+
igp_account_pubkey?: PublicKey;
|
|
52
|
+
owner?: Uint8Array;
|
|
53
|
+
owner_pubkey?: PublicKey;
|
|
54
|
+
sent: bigint;
|
|
55
|
+
received: bigint;
|
|
56
|
+
sent_to: Map<Domain, bigint>;
|
|
57
|
+
received_from: Map<Domain, bigint>;
|
|
58
|
+
routers: Map<Domain, Uint8Array>;
|
|
59
|
+
constructor(fields: any);
|
|
60
|
+
}
|
|
61
|
+
export declare const HelloWorldDataSchema: Map<any, any>;
|
|
62
|
+
//# sourceMappingURL=sealevelAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sealevelAdapter.d.ts","sourceRoot":"","sources":["../../src/multiProtocolApp/sealevelAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,SAAS,EACT,qBAAqB,EAQrB,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,qBAAa,yBACX,SAAQ,qBACR,YAAW,kBAAkB;aAGX,SAAS,EAAE,SAAS;aACpB,aAAa,EAAE,qBAAqB;aACpC,SAAS,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;gBAFhD,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,qBAAqB,EACpC,SAAS,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;IAK5D,mBAAmB,CACvB,WAAW,EAAE,SAAS,EACtB,OA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