@hyperlane-xyz/helloworld 1.5.6-beta0 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/HelloWorld.sol +13 -11
- package/dist/hardhat.config.js +1 -1
- package/dist/hardhat.config.js.map +1 -1
- package/dist/src/app/app.d.ts +2 -1
- package/dist/src/app/app.d.ts.map +1 -1
- package/dist/src/app/app.js +2 -2
- package/dist/src/app/app.js.map +1 -1
- package/dist/src/app/types.d.ts +2 -2
- package/dist/src/app/types.d.ts.map +1 -1
- package/dist/src/deploy/deploy.d.ts.map +1 -1
- package/dist/src/deploy/deploy.js +1 -2
- package/dist/src/deploy/deploy.js.map +1 -1
- package/dist/src/multiProtocolApp/evmAdapter.d.ts +1 -2
- package/dist/src/multiProtocolApp/evmAdapter.d.ts.map +1 -1
- package/dist/src/multiProtocolApp/evmAdapter.js +2 -6
- package/dist/src/multiProtocolApp/evmAdapter.js.map +1 -1
- package/dist/src/multiProtocolApp/multiProtocolApp.d.ts.map +1 -1
- package/dist/src/multiProtocolApp/multiProtocolApp.js +6 -2
- package/dist/src/multiProtocolApp/multiProtocolApp.js.map +1 -1
- package/dist/src/multiProtocolApp/sealevelAdapter.d.ts +1 -2
- package/dist/src/multiProtocolApp/sealevelAdapter.d.ts.map +1 -1
- package/dist/src/multiProtocolApp/sealevelAdapter.js +6 -5
- package/dist/src/multiProtocolApp/sealevelAdapter.js.map +1 -1
- package/dist/src/multiProtocolApp/types.d.ts +1 -2
- package/dist/src/multiProtocolApp/types.d.ts.map +1 -1
- package/dist/src/scripts/check.js +2 -1
- package/dist/src/scripts/check.js.map +1 -1
- package/dist/src/scripts/deploy.js +2 -1
- package/dist/src/scripts/deploy.js.map +1 -1
- package/dist/src/test/deploy.test.js +1 -1
- package/dist/src/test/deploy.test.js.map +1 -1
- package/dist/src/test/helloworld.test.js +16 -16
- package/dist/src/test/helloworld.test.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient.d.ts +202 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/{hooks/libs/index.js → HyperlaneConnectionClient.js} +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient.js.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/Router.d.ts +279 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/Router.d.ts.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/{interfaces/hooks/index.js → Router.js} +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/Router.js.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/index.d.ts +2 -4
- package/dist/src/types/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/index.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/index.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.d.ts +107 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.js +3 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient.js.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster.d.ts +76 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster.d.ts.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/{client/index.js → interfaces/IInterchainGasPaymaster.js} +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster.js.map +1 -0
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts +3 -25
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +3 -10
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts +44 -163
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMailbox.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts +7 -22
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +2 -2
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/index.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/core/index.js +0 -1
- package/dist/src/types/@hyperlane-xyz/core/index.js.map +1 -1
- package/dist/src/types/@hyperlane-xyz/index.d.ts.map +1 -1
- package/dist/src/types/@hyperlane-xyz/index.js +0 -1
- package/dist/src/types/@hyperlane-xyz/index.js.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts +3 -42
- package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js +0 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.js.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/index.d.ts +2 -2
- package/dist/src/types/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/index.js +0 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/index.js.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/index.js +0 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/index.js.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts +2 -3
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js +0 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.js.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts +2 -3
- package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts.map +1 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js +0 -1
- package/dist/src/types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.js.map +1 -1
- package/dist/src/types/@openzeppelin/index.d.ts.map +1 -1
- package/dist/src/types/@openzeppelin/index.js +0 -1
- package/dist/src/types/@openzeppelin/index.js.map +1 -1
- package/dist/src/types/common.d.ts.map +1 -1
- package/dist/src/types/common.js +0 -1
- package/dist/src/types/common.js.map +1 -1
- package/dist/src/types/contracts/HelloWorld.d.ts +75 -294
- package/dist/src/types/contracts/HelloWorld.d.ts.map +1 -1
- package/dist/src/types/contracts/HelloWorld.js +0 -1
- package/dist/src/types/contracts/HelloWorld.js.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{client/MailboxClient__factory.d.ts → HyperlaneConnectionClient__factory.d.ts} +6 -6
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{client/MailboxClient__factory.js → HyperlaneConnectionClient__factory.js} +63 -22
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/HyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{client/Router__factory.d.ts → Router__factory.d.ts} +2 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/Router__factory.d.ts.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/{client/Router__factory.js → Router__factory.js} +71 -37
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/Router__factory.js.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.d.ts +2 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.d.ts.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.js +5 -3
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/index.js.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts +29 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.js +98 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IHyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts +36 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.js +97 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainGasPaymaster__factory.js.map +1 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts +2 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +2 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +2 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +2 -0
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts +2 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js +26 -181
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMailbox__factory.js.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts +2 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js +3 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/IMessageRecipient__factory.js.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts +2 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.d.ts.map +1 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js +5 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/index.js.map +1 -1
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts +2 -2
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js +2 -0
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.js.map +1 -1
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts +2 -2
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js +2 -0
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.js.map +1 -1
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts +2 -2
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts.map +1 -1
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js +2 -0
- package/dist/src/types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.js.map +1 -1
- package/dist/src/types/factories/contracts/HelloWorld__factory.d.ts +5 -5
- package/dist/src/types/factories/contracts/HelloWorld__factory.d.ts.map +1 -1
- package/dist/src/types/factories/contracts/HelloWorld__factory.js +78 -44
- package/dist/src/types/factories/contracts/HelloWorld__factory.js.map +1 -1
- package/dist/src/types/index.d.ts +10 -10
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +9 -10
- package/dist/src/types/index.js.map +1 -1
- package/package.json +10 -12
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts +0 -260
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js +0 -4
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/MailboxClient.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.d.ts +0 -445
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.js +0 -4
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/Router.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/index.d.ts +0 -3
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/index.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/client/index.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts +0 -3
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.js +0 -4
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/index.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts +0 -50
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js +0 -4
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +0 -2
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts +0 -96
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js +0 -4
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook.js.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +0 -2
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +0 -1
- package/dist/src/types/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/MailboxClient__factory.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/Router__factory.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts +0 -3
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.js +0 -11
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/client/index.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts +0 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js +0 -31
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/index.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts +0 -31
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js +0 -54
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata__factory.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts +0 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js +0 -9
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/hooks/libs/index.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts +0 -23
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js +0 -79
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/IPostDispatchHook__factory.js.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts +0 -2
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.d.ts.map +0 -1
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js +0 -9
- package/dist/src/types/factories/@hyperlane-xyz/core/contracts/interfaces/hooks/index.js.map +0 -1
package/contracts/HelloWorld.sol
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.13;
|
|
3
3
|
|
|
4
4
|
// ============ External Imports ============
|
|
5
|
-
import {Router} from "@hyperlane-xyz/core/contracts/
|
|
6
|
-
import {StandardHookMetadata} from "@hyperlane-xyz/core/contracts/hooks/libs/StandardHookMetadata.sol";
|
|
5
|
+
import {Router} from "@hyperlane-xyz/core/contracts/Router.sol";
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
* @title The Hello World App
|
|
@@ -43,10 +42,13 @@ contract HelloWorld is Router {
|
|
|
43
42
|
uint256 handleGasAmount
|
|
44
43
|
);
|
|
45
44
|
|
|
46
|
-
constructor(address _mailbox, address
|
|
45
|
+
constructor(address _mailbox, address _interchainGasPaymaster) {
|
|
47
46
|
// Transfer ownership of the contract to deployer
|
|
48
47
|
_transferOwnership(msg.sender);
|
|
49
|
-
|
|
48
|
+
// Set the addresses for the Mailbox and IGP
|
|
49
|
+
// Alternatively, this could be done later in an initialize method
|
|
50
|
+
_setMailbox(_mailbox);
|
|
51
|
+
_setInterchainGasPaymaster(_interchainGasPaymaster);
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
// ============ External functions ============
|
|
@@ -63,7 +65,13 @@ contract HelloWorld is Router {
|
|
|
63
65
|
{
|
|
64
66
|
sent += 1;
|
|
65
67
|
sentTo[_destinationDomain] += 1;
|
|
66
|
-
|
|
68
|
+
_dispatchWithGas(
|
|
69
|
+
_destinationDomain,
|
|
70
|
+
bytes(_message),
|
|
71
|
+
HANDLE_GAS_AMOUNT,
|
|
72
|
+
msg.value,
|
|
73
|
+
msg.sender
|
|
74
|
+
);
|
|
67
75
|
emit SentHelloWorld(
|
|
68
76
|
mailbox.localDomain(),
|
|
69
77
|
_destinationDomain,
|
|
@@ -72,12 +80,6 @@ contract HelloWorld is Router {
|
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
// ============ Internal functions ============
|
|
75
|
-
function _metadata(
|
|
76
|
-
uint32 /*_destinationDomain*/
|
|
77
|
-
) internal view override returns (bytes memory) {
|
|
78
|
-
return
|
|
79
|
-
StandardHookMetadata.formatMetadata(HANDLE_GAS_AMOUNT, msg.sender);
|
|
80
|
-
}
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
85
|
* @notice Handles a message from a remote router.
|
package/dist/hardhat.config.js
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = {
|
|
|
22
22
|
typechain: {
|
|
23
23
|
outDir: './src/types',
|
|
24
24
|
target: 'ethers-v5',
|
|
25
|
-
alwaysGenerateOverloads:
|
|
25
|
+
alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads?
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=hardhat.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAmC;AACnC,8BAA4B;AAC5B,gCAA8B;AAC9B,6BAA2B;AAE3B;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACf,QAAQ,EAAE;QACR,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,WAAW;QACnB,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAmC;AACnC,8BAA4B;AAC5B,gCAA8B;AAC9B,6BAA2B;AAE3B;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACf,QAAQ,EAAE;QACR,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,QAAQ;aAClB;SACF;KACF;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,WAAW;QACnB,uBAAuB,EAAE,KAAK,EAAE,mHAAmH;KACpJ;CACF,CAAC"}
|
package/dist/src/app/app.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { BigNumber, ethers } from 'ethers';
|
|
2
2
|
import { ChainMap, ChainName, HyperlaneContracts, HyperlaneContractsMap, HyperlaneCore, MultiProvider, RouterApp } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { Address } from '@hyperlane-xyz/utils';
|
|
3
4
|
import { HelloWorld } from '../types';
|
|
4
5
|
import { HelloWorldFactories } from './contracts';
|
|
5
6
|
import { StatCounts } from './types';
|
|
6
7
|
export declare class HelloWorldApp extends RouterApp<HelloWorldFactories> {
|
|
7
8
|
readonly core: HyperlaneCore;
|
|
8
|
-
constructor(core: HyperlaneCore, contractsMap: HyperlaneContractsMap<HelloWorldFactories>, multiProvider: MultiProvider);
|
|
9
|
+
constructor(core: HyperlaneCore, contractsMap: HyperlaneContractsMap<HelloWorldFactories>, multiProvider: MultiProvider, foreignDeployments?: ChainMap<Address>);
|
|
9
10
|
router(contracts: HyperlaneContracts<HelloWorldFactories>): HelloWorld;
|
|
10
11
|
sendHelloWorld(from: ChainName, to: ChainName, message: string, value: BigNumber): Promise<ethers.ContractReceipt>;
|
|
11
12
|
waitForMessageReceipt(receipt: ethers.ContractReceipt): Promise<ethers.ContractReceipt[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,SAAS,EACV,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,SAAS,EACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAS,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,qBAAa,aAAc,SAAQ,SAAS,CAAC,mBAAmB,CAAC;aAE7C,IAAI,EAAE,aAAa;gBAAnB,IAAI,EAAE,aAAa,EACnC,YAAY,EAAE,qBAAqB,CAAC,mBAAmB,CAAC,EACxD,aAAa,EAAE,aAAa,EAC5B,kBAAkB,GAAE,QAAQ,CAAC,OAAO,CAAM;IAK5C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAIhE,cAAc,CAClB,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,SAAS,EACb,OAAO,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;CAcvD"}
|
package/dist/src/app/app.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.HelloWorldApp = void 0;
|
|
|
4
4
|
const sdk_1 = require("@hyperlane-xyz/sdk");
|
|
5
5
|
const utils_1 = require("@hyperlane-xyz/utils");
|
|
6
6
|
class HelloWorldApp extends sdk_1.RouterApp {
|
|
7
|
-
constructor(core, contractsMap, multiProvider) {
|
|
8
|
-
super(contractsMap, multiProvider);
|
|
7
|
+
constructor(core, contractsMap, multiProvider, foreignDeployments = {}) {
|
|
8
|
+
super(contractsMap, multiProvider, undefined, foreignDeployments);
|
|
9
9
|
this.core = core;
|
|
10
10
|
}
|
|
11
11
|
router(contracts) {
|
package/dist/src/app/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":";;;AAEA,4CAQ4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/app/app.ts"],"names":[],"mappings":";;;AAEA,4CAQ4B;AAC5B,gDAAsD;AAOtD,MAAa,aAAc,SAAQ,eAA8B;IAC/D,YACkB,IAAmB,EACnC,YAAwD,EACxD,aAA4B,EAC5B,qBAAwC,EAAE;QAE1C,KAA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 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/app/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAuB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,kBAAmB,SAAQ,uBAAuB,CAC7D,gBAAgB,EAChB,mBAAmB,CACpB;IAGG,QAAQ,CAAC,UAAU,CAAC;gBADpB,aAAa,EAAE,aAAa,EACnB,UAAU,CAAC,iCAAqB;IAK3C,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,GAAG,UAAU;IAMhE,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB;;;CASjE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HelloWorldDeployer = void 0;
|
|
4
|
-
const ethers_1 = require("ethers");
|
|
5
4
|
const sdk_1 = require("@hyperlane-xyz/sdk");
|
|
6
5
|
const contracts_1 = require("../app/contracts");
|
|
7
6
|
class HelloWorldDeployer extends sdk_1.HyperlaneRouterDeployer {
|
|
@@ -17,7 +16,7 @@ class HelloWorldDeployer extends sdk_1.HyperlaneRouterDeployer {
|
|
|
17
16
|
async deployContracts(chain, config) {
|
|
18
17
|
const router = await this.deployContract(chain, 'router', [
|
|
19
18
|
config.mailbox,
|
|
20
|
-
config.
|
|
19
|
+
config.interchainGasPaymaster,
|
|
21
20
|
]);
|
|
22
21
|
return {
|
|
23
22
|
router,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/deploy/deploy.ts"],"names":[],"mappings":";;;AAAA,4CAM4B;AAE5B,gDAA4E;AAK5E,MAAa,kBAAmB,SAAQ,6BAGvC;IACC,YACE,aAA4B,EACnB,UAAgC;QAEzC,KAAK,CAAC,aAAa,EAAE,+BAAmB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAFjD,eAAU,GAAV,UAAU,CAAsB;IAG3C,CAAC;IAED,MAAM,CAAC,SAAkD;QACvD,OAAO,SAAS,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,+CAA+C;IAC/C,mEAAmE;IACnE,KAAK,CAAC,eAAe,CAAC,KAAgB,EAAE,MAAwB;QAC9D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE;YACxD,MAAM,CAAC,OAAO;YACd,MAAM,CAAC,sBAAsB;SAC9B,CAAC,CAAC;QACH,OAAO;YACL,MAAM;SACP,CAAC;IACJ,CAAC;CACF;AA1BD,gDA0BC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ChainName, EthersV5Transaction, EvmRouterAdapter, MultiProtocolProvider } from '@hyperlane-xyz/sdk';
|
|
2
2
|
import { Address } from '@hyperlane-xyz/utils';
|
|
3
|
-
import { StatCounts } from '../app/types';
|
|
4
3
|
import { HelloWorld } from '../types';
|
|
5
4
|
import { IHelloWorldAdapter } from './types';
|
|
6
5
|
export declare class EvmHelloWorldAdapter extends EvmRouterAdapter implements IHelloWorldAdapter {
|
|
@@ -15,7 +14,7 @@ export declare class EvmHelloWorldAdapter extends EvmRouterAdapter implements IH
|
|
|
15
14
|
mailbox: Address;
|
|
16
15
|
});
|
|
17
16
|
populateSendHelloTx(destination: ChainName, message: string, value: string): Promise<EthersV5Transaction>;
|
|
18
|
-
|
|
17
|
+
sentStat(destination: ChainName): Promise<number>;
|
|
19
18
|
getConnectedContract(): HelloWorld;
|
|
20
19
|
}
|
|
21
20
|
//# sourceMappingURL=evmAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evmAdapter.d.ts","sourceRoot":"","sources":["../../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"evmAdapter.d.ts","sourceRoot":"","sources":["../../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,qBAAa,oBACX,SAAQ,gBACR,YAAW,kBAAkB;aAGX,SAAS,EAAE,SAAS;aACpB,aAAa,EAAE,qBAAqB;aACpC,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,GACZ,OAAO,CAAC,mBAAmB,CAAC;IA2BzB,QAAQ,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAO9C,oBAAoB,IAAI,UAAU;CAM5C"}
|
|
@@ -24,15 +24,11 @@ class EvmHelloWorldAdapter extends sdk_1.EvmRouterAdapter {
|
|
|
24
24
|
});
|
|
25
25
|
return { transaction: tx, type: sdk_1.ProviderType.EthersV5 };
|
|
26
26
|
}
|
|
27
|
-
async
|
|
28
|
-
const originDomain = this.multiProvider.getDomainId(this.chainName);
|
|
27
|
+
async sentStat(destination) {
|
|
29
28
|
const destinationDomain = this.multiProvider.getDomainId(destination);
|
|
30
29
|
const originContract = this.getConnectedContract();
|
|
31
30
|
const sent = await originContract.sentTo(destinationDomain);
|
|
32
|
-
|
|
33
|
-
const destinationContract = types_1.HelloWorld__factory.connect(destinationMailbox, destinationProvider);
|
|
34
|
-
const received = await destinationContract.sentTo(originDomain);
|
|
35
|
-
return { sent: sent.toNumber(), received: received.toNumber() };
|
|
31
|
+
return sent.toNumber();
|
|
36
32
|
}
|
|
37
33
|
getConnectedContract() {
|
|
38
34
|
return types_1.HelloWorld__factory.connect(this.addresses.router, this.getProvider());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evmAdapter.js","sourceRoot":"","sources":["../../../src/multiProtocolApp/evmAdapter.ts"],"names":[],"mappings":";;;AAAA,4CAM4B;
|
|
1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|
|
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,cAAc,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,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;CAcvD"}
|
|
@@ -16,8 +16,12 @@ class HelloMultiProtocolApp extends sdk_1.MultiProtocolRouterApp {
|
|
|
16
16
|
populateHelloWorldTx(origin, destination, message, value, sender) {
|
|
17
17
|
return this.adapter(origin).populateSendHelloTx(destination, message, value, sender);
|
|
18
18
|
}
|
|
19
|
-
channelStats(origin, destination) {
|
|
20
|
-
|
|
19
|
+
async channelStats(origin, destination) {
|
|
20
|
+
const [sent, received] = await Promise.all([
|
|
21
|
+
this.adapter(origin).sentStat(destination),
|
|
22
|
+
this.adapter(destination).sentStat(origin),
|
|
23
|
+
]);
|
|
24
|
+
return { sent, received };
|
|
21
25
|
}
|
|
22
26
|
async stats() {
|
|
23
27
|
const entries = await Promise.all(this.chains().map(async (source) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiProtocolApp.js","sourceRoot":"","sources":["../../../src/multiProtocolApp/multiProtocolApp.ts"],"names":[],"mappings":";;;AAAA,4CAM4B;AAC5B,gDAA6D;AAI7D,6CAAoD;AACpD,uDAA8D;AAG9D,MAAa,qBAAsB,SAAQ,4BAG1C;IACU,iBAAiB,CAAC,QAAsB;QAC/C,IAAI,QAAQ,KAAK,oBAAY,CAAC,QAAQ;YAAE,OAAO,iCAAoB,CAAC;QACpE,IAAI,QAAQ,KAAK,oBAAY,CAAC,QAAQ;YAAE,OAAO,2CAAyB,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,
|
|
1
|
+
{"version":3,"file":"multiProtocolApp.js","sourceRoot":"","sources":["../../../src/multiProtocolApp/multiProtocolApp.ts"],"names":[],"mappings":";;;AAAA,4CAM4B;AAC5B,gDAA6D;AAI7D,6CAAoD;AACpD,uDAA8D;AAG9D,MAAa,qBAAsB,SAAQ,4BAG1C;IACU,iBAAiB,CAAC,QAAsB;QAC/C,IAAI,QAAQ,KAAK,oBAAY,CAAC,QAAQ;YAAE,OAAO,iCAAoB,CAAC;QACpE,IAAI,QAAQ,KAAK,oBAAY,CAAC,QAAQ;YAAE,OAAO,2C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sDAkDC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AccountMeta, PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { ChainName, MultiProtocolProvider, SealevelRouterAdapter, SolanaWeb3Transaction } from '@hyperlane-xyz/sdk';
|
|
3
3
|
import { Address, Domain } from '@hyperlane-xyz/utils';
|
|
4
|
-
import { StatCounts } from '../app/types';
|
|
5
4
|
import { IHelloWorldAdapter } from './types';
|
|
6
5
|
export declare class SealevelHelloWorldAdapter extends SealevelRouterAdapter implements IHelloWorldAdapter {
|
|
7
6
|
readonly chainName: ChainName;
|
|
@@ -17,7 +16,7 @@ export declare class SealevelHelloWorldAdapter extends SealevelRouterAdapter imp
|
|
|
17
16
|
populateSendHelloTx(destination: ChainName, message: string, value: string, sender: Address): Promise<SolanaWeb3Transaction>;
|
|
18
17
|
getSendHelloKeyList(programId: PublicKey, mailbox: PublicKey, sender: PublicKey, randomWallet: PublicKey): Array<AccountMeta>;
|
|
19
18
|
deriveProgramStoragePDA(programId: string | PublicKey): PublicKey;
|
|
20
|
-
|
|
19
|
+
sentStat(destination: ChainName): Promise<number>;
|
|
21
20
|
getAccountInfo(): Promise<HelloWorldData>;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"sealevelAdapter.d.ts","sourceRoot":"","sources":["../../../src/multiProtocolApp/sealevelAdapter.ts"],"names":[],"m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vC,WAAW,EAAG,MAAM,CAAC;IACrB,OAAO,EAAG,MAAM,CAAC;gBACW,MAAM,EAAE,GAAG;CAGxC;AAED,eAAO,MAAM,oBAAoB,eAqB/B,CAAC;AAGH,qBAAa,cAAc;aAgCG,MAAM,EAAE,GAAG;IA/BvC,YAAY,EAAG,MAAM,CAAC;IAEtB,OAAO,EAAG,UAAU,CAAC;IACrB,cAAc,EAAG,SAAS,CAAC;IAE3B,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IAEvB,GAAG,CAAC,EAAE;QACJ,UAAU,EAAE,UAAU,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,UAAU,CAAC;KACzB,CAAC;IACF,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB,IAAI,EAAG,MAAM,CAAC;IAEd,QAAQ,EAAG,MAAM,CAAC;IAGlB,OAAO,EAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAG9B,aAAa,EAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEpC,OAAO,EAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;gBAEN,MAAM,EAAE,GAAG;CAaxC;AAED,eAAO,MAAM,oBAAoB,eA8B/B,CAAC"}
|
|
@@ -98,17 +98,18 @@ class SealevelHelloWorldAdapter extends sdk_1.SealevelRouterAdapter {
|
|
|
98
98
|
deriveProgramStoragePDA(programId) {
|
|
99
99
|
return this.derivePda(['hello_world', '-', 'handle', '-', 'storage'], programId);
|
|
100
100
|
}
|
|
101
|
-
async
|
|
101
|
+
async sentStat(destination) {
|
|
102
|
+
const destinationDomain = this.multiProvider.getDomainId(destination);
|
|
102
103
|
const data = await this.getAccountInfo();
|
|
103
|
-
return
|
|
104
|
+
return Number(data.sent_to.get(destinationDomain) || 0);
|
|
104
105
|
}
|
|
105
106
|
async getAccountInfo() {
|
|
106
107
|
const address = this.addresses.router;
|
|
107
108
|
const connection = this.getProvider();
|
|
108
|
-
const
|
|
109
|
-
const accountInfo = await connection.getAccountInfo(
|
|
109
|
+
const pda = this.deriveProgramStoragePDA(address);
|
|
110
|
+
const accountInfo = await connection.getAccountInfo(pda);
|
|
110
111
|
if (!accountInfo)
|
|
111
|
-
throw new Error(`No account info found for ${
|
|
112
|
+
throw new Error(`No account info found for ${pda.toBase58()}}`);
|
|
112
113
|
const accountData = (0, borsh_1.deserializeUnchecked)(exports.HelloWorldDataSchema, sdk_1.SealevelAccountDataWrapper, accountInfo.data);
|
|
113
114
|
return accountData.data;
|
|
114
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sealevelAdapter.js","sourceRoot":"","sources":["../../../src/multiProtocolApp/sealevelAdapter.ts"],"names":[],"mappings":";;;AAAA,6CAOyB;AACzB,iCAAwD;AAExD,4CAa4B;
|
|
1
|
+
{"version":3,"file":"sealevelAdapter.js","sourceRoot":"","sources":["../../../src/multiProtocolApp/sealevelAdapter.ts"],"names":[],"mappings":";;;AAAA,6CAOyB;AACzB,iCAAwD;AAExD,4CAa4B;AAK5B,MAAa,yBACX,SAAQ,2BAAqB;IAG7B,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,CACT,yCAAyC,EACzC,IAAI,CAAC,SAAS,EACd,WAAW,EACX,OAAO,EACP,KAAK,CACN,C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EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;aACtD;SACF;KACF;IACD;QACE,0CAAoC;QACpC,gDAA0C;KAC3C;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ChainName, IRouterAdapter, TypedTransaction } from '@hyperlane-xyz/sdk';
|
|
2
2
|
import { Address } from '@hyperlane-xyz/utils';
|
|
3
|
-
import { StatCounts } from '../app/types';
|
|
4
3
|
export interface IHelloWorldAdapter extends IRouterAdapter {
|
|
5
4
|
populateSendHelloTx: (destination: ChainName, message: string, value: string, sender: Address) => Promise<TypedTransaction>;
|
|
6
|
-
|
|
5
|
+
sentStat: (destination: ChainName) => Promise<number>;
|
|
7
6
|
}
|
|
8
7
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -14,8 +14,9 @@ async function check() {
|
|
|
14
14
|
const multiProvider = new sdk_1.MultiProvider(config_1.prodConfigs);
|
|
15
15
|
const contractsMap = (0, sdk_1.attachContractsMap)(deploymentAddresses, contracts_1.helloWorldFactories);
|
|
16
16
|
const core = sdk_1.HyperlaneCore.fromEnvironment('testnet', multiProvider);
|
|
17
|
+
const igp = sdk_1.HyperlaneIgp.fromEnvironment('testnet', multiProvider);
|
|
17
18
|
const app = new app_1.HelloWorldApp(core, contractsMap, multiProvider);
|
|
18
|
-
const config =
|
|
19
|
+
const config = (0, sdk_1.createRouterConfigMap)(ownerAddress, core.contractsMap, igp.contractsMap);
|
|
19
20
|
console.info('Starting check');
|
|
20
21
|
const helloWorldChecker = new check_1.HelloWorldChecker(multiProvider, app, config);
|
|
21
22
|
await helloWorldChecker.check();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/scripts/check.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/scripts/check.ts"],"names":[],"mappings":";;AAAA,4CAM4B;AAE5B,oCAA2C;AAC3C,gDAAuD;AACvD,2CAAoD;AACpD,6CAA+C;AAE/C,iEAAiE;AACjE,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAE/B,kCAAkC;AAClC,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,KAAK,UAAU,KAAK;IAClB,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,IAAI,mBAAa,CAAC,oBAAW,CAAC,CAAC;IAErD,MAAM,YAAY,GAAG,IAAA,wBAAkB,EACrC,mBAAmB,EACnB,+BAAmB,CACpB,CAAC;IAEF,MAAM,IAAI,GAAG,mBAAa,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACrE,MAAM,GAAG,GAAG,kBAAY,CAAC,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACnE,MAAM,GAAG,GAAG,IAAI,mBAAa,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,IAAA,2BAAqB,EAClC,YAAY,EACZ,IAAI,CAAC,YAAY,EACjB,GAAG,CAAC,YAAY,CACjB,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/B,MAAM,iBAAiB,GAAG,IAAI,yBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5E,MAAM,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAChC,iBAAiB,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAED,KAAK,EAAE;KACJ,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KAC1C,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -11,7 +11,8 @@ async function main() {
|
|
|
11
11
|
const multiProvider = new sdk_1.MultiProvider(config_1.prodConfigs);
|
|
12
12
|
multiProvider.setSharedSigner(signer);
|
|
13
13
|
const core = sdk_1.HyperlaneCore.fromEnvironment('testnet', multiProvider);
|
|
14
|
-
const
|
|
14
|
+
const igp = sdk_1.HyperlaneIgp.fromEnvironment('testnet', multiProvider);
|
|
15
|
+
const config = (0, sdk_1.createRouterConfigMap)(signer.address, core.contractsMap, igp.contractsMap);
|
|
15
16
|
const deployer = new deploy_1.HelloWorldDeployer(multiProvider);
|
|
16
17
|
const chainToContracts = await deployer.deploy(config);
|
|
17
18
|
const addresses = (0, sdk_1.serializeContractsMap)(chainToContracts);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/scripts/deploy.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AA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
@@ -18,7 +18,7 @@ describe('deploy', async () => {
|
|
|
18
18
|
multiProvider = sdk_1.MultiProvider.createTestMultiProvider({ signer });
|
|
19
19
|
const coreDeployer = new sdk_1.TestCoreDeployer(multiProvider);
|
|
20
20
|
core = await coreDeployer.deployApp();
|
|
21
|
-
config =
|
|
21
|
+
config = await (0, sdk_1.deployTestIgpsAndGetRouterConfig)(multiProvider, signer.address, core.contractsMap);
|
|
22
22
|
deployer = new deploy_1.HelloWorldDeployer(multiProvider);
|
|
23
23
|
});
|
|
24
24
|
it('deploys', async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.test.js","sourceRoot":"","sources":["../../../src/test/deploy.test.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAiC;AAEjC,
|
|
1
|
+
{"version":3,"file":"deploy.test.js","sourceRoot":"","sources":["../../../src/test/deploy.test.ts"],"names":[],"mappings":";;AAAA,qCAAmC;AACnC,qCAAiC;AAEjC,4CAO4B;AAE5B,oCAA2C;AAE3C,2CAAoD;AAEpD,6CAAsD;AAEtD,QAAQ,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC5B,IAAI,aAA4B,CAAC;IACjC,IAAI,IAAiB,CAAC;IACtB,IAAI,MAAkC,CAAC;IACvC,IAAI,QAA4B,CAAC;IACjC,IAAI,SAAqD,CAAC;IAC1D,IAAI,GAAkB,CAAC;IAEvB,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,gBAAM,CAAC,UAAU,EAAE,CAAC;QAC3C,aAAa,GAAG,mBAAa,CAAC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAElE,MAAM,YAAY,GAAG,IAAI,sBAAgB,CAAC,aAAa,CAAC,CAAC;QACzD,IAAI,GAAG,MAAM,YAAY,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,GAAG,MAAM,IAAA,sCAAgC,EAC7C,aAAa,EACb,MAAM,CAAC,OAAO,EACd,IAAI,CAAC,YAAY,CAClB,CAAC;QACF,QAAQ,GAAG,IAAI,2BAAkB,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC,CAAC,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,mBAAa,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,yBAAiB,CAAC,aAAa,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAClE,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACtB,OAAO,CAAC,WAAW,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const chai_1 = require("chai");
|
|
4
4
|
const hardhat_1 = require("hardhat");
|
|
5
5
|
const sdk_1 = require("@hyperlane-xyz/sdk");
|
|
6
|
-
const utils_1 = require("@hyperlane-xyz/utils");
|
|
7
6
|
const deploy_1 = require("../deploy/deploy");
|
|
7
|
+
const types_1 = require("../types");
|
|
8
8
|
describe('HelloWorld', async () => {
|
|
9
9
|
const localChain = sdk_1.Chains.test1;
|
|
10
10
|
const remoteChain = sdk_1.Chains.test2;
|
|
@@ -13,37 +13,39 @@ describe('HelloWorld', async () => {
|
|
|
13
13
|
let signer;
|
|
14
14
|
let local;
|
|
15
15
|
let remote;
|
|
16
|
+
let localIgp;
|
|
16
17
|
let multiProvider;
|
|
17
18
|
let coreApp;
|
|
18
19
|
let config;
|
|
19
20
|
before(async () => {
|
|
20
21
|
[signer] = await hardhat_1.ethers.getSigners();
|
|
21
22
|
multiProvider = sdk_1.MultiProvider.createTestMultiProvider({ signer });
|
|
22
|
-
coreApp = await new sdk_1.TestCoreDeployer(multiProvider).deployApp();
|
|
23
|
-
config = coreApp.getRouterConfig(signer.address);
|
|
24
23
|
localDomain = multiProvider.getDomainId(localChain);
|
|
25
24
|
remoteDomain = multiProvider.getDomainId(remoteChain);
|
|
25
|
+
const coreDeployer = new sdk_1.TestCoreDeployer(multiProvider);
|
|
26
|
+
const coreContractsMaps = await coreDeployer.deploy();
|
|
27
|
+
coreApp = new sdk_1.TestCoreApp(coreContractsMaps, multiProvider);
|
|
28
|
+
config = await (0, sdk_1.deployTestIgpsAndGetRouterConfig)(multiProvider, signer.address, coreContractsMaps);
|
|
26
29
|
});
|
|
27
30
|
beforeEach(async () => {
|
|
28
31
|
const helloWorld = new deploy_1.HelloWorldDeployer(multiProvider);
|
|
29
32
|
const contracts = await helloWorld.deploy(config);
|
|
30
33
|
local = contracts[localChain].router;
|
|
31
34
|
remote = contracts[remoteChain].router;
|
|
35
|
+
localIgp = types_1.IInterchainGasPaymaster__factory.connect(config[localChain].interchainGasPaymaster, multiProvider.getProvider(localChain));
|
|
32
36
|
// The all counts start empty
|
|
33
37
|
(0, chai_1.expect)(await local.sent()).to.equal(0);
|
|
34
38
|
(0, chai_1.expect)(await local.received()).to.equal(0);
|
|
35
39
|
(0, chai_1.expect)(await remote.sent()).to.equal(0);
|
|
36
40
|
(0, chai_1.expect)(await remote.received()).to.equal(0);
|
|
37
41
|
});
|
|
38
|
-
async function quoteGasPayment(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.mailbox['quoteDispatch(uint32,bytes32,bytes)'](remoteDomain, (0, utils_1.addressToBytes32)(remote.address), Buffer.from(body));
|
|
42
|
+
async function quoteGasPayment(fromRouter, destinationDomain, igp) {
|
|
43
|
+
const handleGasAmount = await fromRouter.HANDLE_GAS_AMOUNT();
|
|
44
|
+
return igp.quoteGasPayment(destinationDomain, handleGasAmount);
|
|
42
45
|
}
|
|
43
46
|
it('sends a message', async () => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
value: await quoteGasPayment(body),
|
|
47
|
+
await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, 'Hello', {
|
|
48
|
+
value: await quoteGasPayment(local, remoteDomain, localIgp),
|
|
47
49
|
})).to.emit(local, 'SentHelloWorld');
|
|
48
50
|
// The sent counts are correct
|
|
49
51
|
(0, chai_1.expect)(await local.sent()).to.equal(1);
|
|
@@ -52,15 +54,13 @@ describe('HelloWorld', async () => {
|
|
|
52
54
|
(0, chai_1.expect)(await local.received()).to.equal(0);
|
|
53
55
|
});
|
|
54
56
|
it('reverts if there is insufficient payment', async () => {
|
|
55
|
-
|
|
56
|
-
await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, body, {
|
|
57
|
+
await (0, chai_1.expect)(local.sendHelloWorld(remoteDomain, 'Hello', {
|
|
57
58
|
value: 0,
|
|
58
|
-
})).to.be.revertedWith('
|
|
59
|
+
})).to.be.revertedWith('insufficient interchain gas payment');
|
|
59
60
|
});
|
|
60
61
|
it('handles a message', async () => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
value: await quoteGasPayment(body),
|
|
62
|
+
await local.sendHelloWorld(remoteDomain, 'World', {
|
|
63
|
+
value: await quoteGasPayment(local, remoteDomain, localIgp),
|
|
64
64
|
});
|
|
65
65
|
// Mock processing of the message by Hyperlane
|
|
66
66
|
await coreApp.processOutboundMessages(localChain);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helloworld.test.js","sourceRoot":"","sources":["../../../src/test/helloworld.test.ts"],"names":[],"mappings":";;AACA,+BAA8B;AAC9B,qCAAiC;AAEjC,
|
|
1
|
+
{"version":3,"file":"helloworld.test.js","sourceRo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