@hyperlane-xyz/core 1.2.3 → 1.3.1
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/HyperlaneConnectionClient.sol +5 -4
- package/contracts/Mailbox.sol +3 -41
- package/contracts/OwnableMulticall.sol +11 -11
- package/contracts/Router.sol +4 -4
- package/contracts/ValidatorAnnounce.sol +2 -2
- package/contracts/igps/InterchainGasPaymaster.sol +2 -8
- package/contracts/igps/OverheadIgp.sol +1 -1
- package/contracts/igps/gas-oracles/StorageGasOracle.sol +1 -1
- package/contracts/interfaces/IAggregationIsm.sol +19 -0
- package/contracts/interfaces/IHyperlaneConnectionClient.sol +20 -0
- package/{interfaces → contracts/interfaces}/IInterchainSecurityModule.sol +8 -0
- package/contracts/interfaces/IMailbox.sol +71 -0
- package/contracts/interfaces/IRouter.sol +15 -0
- package/{interfaces → contracts/interfaces/isms}/IMultisigIsm.sol +1 -1
- package/contracts/interfaces/middleware/IInterchainAccountRouter.sol +50 -0
- package/contracts/interfaces/middleware/IInterchainQueryRouter.sol +18 -0
- package/contracts/isms/aggregation/AbstractAggregationIsm.sol +72 -0
- package/contracts/isms/aggregation/StaticAggregationIsm.sol +33 -0
- package/contracts/isms/aggregation/StaticAggregationIsmFactory.sol +16 -0
- package/contracts/isms/multisig/AbstractMultisigIsm.sol +124 -0
- package/contracts/isms/{MultisigIsm.sol → multisig/LegacyMultisigIsm.sol} +19 -60
- package/contracts/isms/multisig/StaticMultisigIsm.sol +33 -0
- package/contracts/isms/multisig/StaticMultisigIsmFactory.sol +16 -0
- package/contracts/libs/Call.sol +12 -10
- package/contracts/libs/CheckpointLib.sol +54 -0
- package/contracts/libs/MetaProxy.sol +40 -0
- package/contracts/libs/StaticMOfNAddressSetFactory.sol +98 -0
- package/contracts/libs/TypeCasts.sol +0 -20
- package/contracts/libs/isms/AggregationIsmMetadata.sol +72 -0
- package/contracts/libs/{MultisigIsmMetadata.sol → isms/LegacyMultisigIsmMetadata.sol} +1 -1
- package/contracts/libs/isms/MultisigIsmMetadata.sol +91 -0
- package/contracts/libs/middleware/InterchainAccountMessage.sol +86 -0
- package/contracts/libs/middleware/InterchainQueryMessage.sol +125 -0
- package/contracts/middleware/InterchainAccountRouter.sol +448 -94
- package/contracts/middleware/InterchainQueryRouter.sol +50 -27
- package/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol +2 -2
- package/contracts/mock/MockMailbox.sol +1 -1
- package/contracts/test/TestHyperlaneConnectionClient.sol +5 -1
- package/contracts/test/TestInterchainGasPaymaster.sol +3 -1
- package/contracts/test/TestIsm.sol +1 -1
- package/contracts/test/TestLegacyMultisigIsm.sol +16 -0
- package/contracts/test/TestLiquidityLayerMessageRecipient.sol +1 -1
- package/contracts/test/TestMailbox.sol +1 -1
- package/contracts/test/TestQuerySender.sol +2 -2
- package/contracts/test/TestRecipient.sol +9 -6
- package/contracts/test/TestSendReceiver.sol +3 -3
- package/contracts/test/TestTokenRecipient.sol +1 -1
- package/contracts/test/bad-recipient/BadRecipient1.sol +1 -1
- package/contracts/test/bad-recipient/BadRecipient3.sol +1 -1
- package/contracts/test/bad-recipient/BadRecipient5.sol +1 -1
- package/contracts/test/bad-recipient/BadRecipient6.sol +1 -1
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.d.ts +75 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.d.ts.map +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.js +4 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit.js.map +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.d.ts +2 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.d.ts.map +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.js +3 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.js.map +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +3 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts.map +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/index.js +4 -0
- package/dist/@openzeppelin/contracts/token/ERC20/extensions/index.js.map +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/index.d.ts +2 -0
- package/dist/@openzeppelin/contracts/token/ERC20/index.d.ts.map +1 -1
- package/dist/@openzeppelin/contracts/token/ERC20/index.js +1 -0
- package/dist/@openzeppelin/contracts/token/ERC20/index.js.map +1 -1
- package/dist/contracts/GasRouter.d.ts +2 -2
- package/dist/contracts/GasRouter.d.ts.map +1 -1
- package/dist/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient.d.ts +202 -0
- package/dist/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient.js +4 -0
- package/dist/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient.js.map +1 -0
- package/dist/contracts/ImmutableConnectionClient.sol/index.d.ts +2 -0
- package/dist/contracts/ImmutableConnectionClient.sol/index.d.ts.map +1 -0
- package/dist/contracts/ImmutableConnectionClient.sol/index.js +3 -0
- package/dist/contracts/ImmutableConnectionClient.sol/index.js.map +1 -0
- package/dist/contracts/InterchainGasPaymaster.d.ts +162 -0
- package/dist/contracts/InterchainGasPaymaster.d.ts.map +1 -0
- package/dist/contracts/InterchainGasPaymaster.js +4 -0
- package/dist/contracts/InterchainGasPaymaster.js.map +1 -0
- package/dist/contracts/OwnableMulticall.d.ts +16 -94
- package/dist/contracts/OwnableMulticall.d.ts.map +1 -1
- package/dist/contracts/Router.d.ts +2 -2
- package/dist/contracts/Router.d.ts.map +1 -1
- package/dist/contracts/index.d.ts +4 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/interfaces/IAggregationIsm.d.ts +76 -0
- package/dist/contracts/interfaces/IAggregationIsm.d.ts.map +1 -0
- package/dist/contracts/interfaces/IAggregationIsm.js +4 -0
- package/dist/contracts/interfaces/IAggregationIsm.js.map +1 -0
- package/dist/contracts/interfaces/IGasOracle.d.ts +61 -0
- package/dist/contracts/interfaces/IGasOracle.d.ts.map +1 -0
- package/dist/contracts/interfaces/IGasOracle.js +4 -0
- package/dist/contracts/interfaces/IGasOracle.js.map +1 -0
- package/dist/contracts/interfaces/IHyperlaneConnectionClient.d.ts +107 -0
- package/dist/contracts/interfaces/IHyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/contracts/interfaces/IHyperlaneConnectionClient.js +4 -0
- package/dist/contracts/interfaces/IHyperlaneConnectionClient.js.map +1 -0
- package/dist/contracts/interfaces/IInterchainGasPaymaster.d.ts +76 -0
- package/dist/contracts/interfaces/IInterchainGasPaymaster.d.ts.map +1 -0
- package/dist/contracts/interfaces/IInterchainGasPaymaster.js +4 -0
- package/dist/contracts/interfaces/IInterchainGasPaymaster.js.map +1 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts +59 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +4 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +43 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +4 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/index.js +3 -0
- package/dist/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
- package/dist/contracts/interfaces/ILiquidityLayerMessageRecipient.d.ts +51 -0
- package/dist/contracts/interfaces/ILiquidityLayerMessageRecipient.d.ts.map +1 -0
- package/dist/contracts/interfaces/ILiquidityLayerMessageRecipient.js +4 -0
- package/dist/contracts/interfaces/ILiquidityLayerMessageRecipient.js.map +1 -0
- package/dist/contracts/interfaces/ILiquidityLayerRouter.d.ts +51 -0
- package/dist/contracts/interfaces/ILiquidityLayerRouter.d.ts.map +1 -0
- package/dist/contracts/interfaces/ILiquidityLayerRouter.js +4 -0
- package/dist/contracts/interfaces/ILiquidityLayerRouter.js.map +1 -0
- package/dist/contracts/interfaces/IMailbox.d.ts +175 -0
- package/dist/contracts/interfaces/IMailbox.d.ts.map +1 -0
- package/dist/contracts/interfaces/IMailbox.js +4 -0
- package/dist/contracts/interfaces/IMailbox.js.map +1 -0
- package/dist/contracts/interfaces/IMessageRecipient.d.ts +51 -0
- package/dist/contracts/interfaces/IMessageRecipient.d.ts.map +1 -0
- package/dist/contracts/interfaces/IMessageRecipient.js +4 -0
- package/dist/contracts/interfaces/IMessageRecipient.js.map +1 -0
- package/dist/contracts/interfaces/IRouter.d.ts +83 -0
- package/dist/contracts/interfaces/IRouter.d.ts.map +1 -0
- package/dist/contracts/interfaces/IRouter.js +4 -0
- package/dist/contracts/interfaces/IRouter.js.map +1 -0
- package/dist/contracts/interfaces/IValidatorAnnounce.d.ts +83 -0
- package/dist/contracts/interfaces/IValidatorAnnounce.d.ts.map +1 -0
- package/dist/contracts/interfaces/IValidatorAnnounce.js +4 -0
- package/dist/contracts/interfaces/IValidatorAnnounce.js.map +1 -0
- package/dist/contracts/interfaces/index.d.ts +17 -0
- package/dist/contracts/interfaces/index.d.ts.map +1 -0
- package/dist/contracts/interfaces/index.js +4 -0
- package/dist/contracts/interfaces/index.js.map +1 -0
- package/dist/contracts/interfaces/isms/IMultisigIsm.d.ts +82 -0
- package/dist/contracts/interfaces/isms/IMultisigIsm.d.ts.map +1 -0
- package/dist/contracts/interfaces/isms/IMultisigIsm.js +4 -0
- package/dist/contracts/interfaces/isms/IMultisigIsm.js.map +1 -0
- package/dist/contracts/interfaces/isms/index.d.ts +2 -0
- package/dist/contracts/interfaces/isms/index.d.ts.map +1 -0
- package/dist/contracts/interfaces/isms/index.js +3 -0
- package/dist/contracts/interfaces/isms/index.js.map +1 -0
- package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.d.ts +127 -0
- package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.d.ts.map +1 -0
- package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.js +4 -0
- package/dist/contracts/interfaces/middleware/IInterchainAccountRouter.js.map +1 -0
- package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.d.ts +88 -0
- package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.d.ts.map +1 -0
- package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.js +4 -0
- package/dist/contracts/interfaces/middleware/IInterchainQueryRouter.js.map +1 -0
- package/dist/contracts/interfaces/middleware/index.d.ts +3 -0
- package/dist/contracts/interfaces/middleware/index.d.ts.map +1 -0
- package/dist/contracts/interfaces/middleware/index.js +3 -0
- package/dist/contracts/interfaces/middleware/index.js.map +1 -0
- package/dist/contracts/isms/aggregation/AbstractAggregationIsm.d.ts +67 -0
- package/dist/contracts/isms/aggregation/AbstractAggregationIsm.d.ts.map +1 -0
- package/dist/contracts/isms/aggregation/AbstractAggregationIsm.js +4 -0
- package/dist/contracts/isms/aggregation/AbstractAggregationIsm.js.map +1 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsm.d.ts +67 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsm.d.ts.map +1 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsm.js +4 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsm.js.map +1 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.d.ts +59 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.d.ts.map +1 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.js +4 -0
- package/dist/contracts/isms/aggregation/StaticAggregationIsmFactory.js.map +1 -0
- package/dist/contracts/isms/aggregation/index.d.ts +4 -0
- package/dist/contracts/isms/aggregation/index.d.ts.map +1 -0
- package/dist/contracts/isms/aggregation/index.js +3 -0
- package/dist/contracts/isms/aggregation/index.js.map +1 -0
- package/dist/contracts/isms/index.d.ts +4 -1
- package/dist/contracts/isms/index.d.ts.map +1 -1
- package/dist/contracts/isms/index.js +1 -0
- package/dist/contracts/isms/index.js.map +1 -1
- package/dist/contracts/isms/multisig/AbstractMultisigIsm.d.ts +59 -0
- package/dist/contracts/isms/multisig/AbstractMultisigIsm.d.ts.map +1 -0
- package/dist/contracts/isms/multisig/AbstractMultisigIsm.js +4 -0
- package/dist/contracts/isms/multisig/AbstractMultisigIsm.js.map +1 -0
- package/dist/contracts/isms/multisig/LegacyMultisigIsm.d.ts +290 -0
- package/dist/contracts/isms/multisig/LegacyMultisigIsm.d.ts.map +1 -0
- package/dist/contracts/isms/multisig/LegacyMultisigIsm.js +4 -0
- package/dist/contracts/isms/multisig/LegacyMultisigIsm.js.map +1 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsm.d.ts +59 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsm.d.ts.map +1 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsm.js +4 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsm.js.map +1 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.d.ts +59 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.d.ts.map +1 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.js +4 -0
- package/dist/contracts/isms/multisig/StaticMultisigIsmFactory.js.map +1 -0
- package/dist/contracts/isms/multisig/index.d.ts +5 -0
- package/dist/contracts/isms/multisig/index.d.ts.map +1 -0
- package/dist/contracts/isms/multisig/index.js +3 -0
- package/dist/contracts/isms/multisig/index.js.map +1 -0
- package/dist/contracts/libs/ImmutableOwnable.d.ts +43 -0
- package/dist/contracts/libs/ImmutableOwnable.d.ts.map +1 -0
- package/dist/contracts/libs/ImmutableOwnable.js +4 -0
- package/dist/contracts/libs/ImmutableOwnable.js.map +1 -0
- package/dist/contracts/libs/StaticMOfNAddressSetFactory.d.ts +59 -0
- package/dist/contracts/libs/StaticMOfNAddressSetFactory.d.ts.map +1 -0
- package/dist/contracts/libs/StaticMOfNAddressSetFactory.js +4 -0
- package/dist/contracts/libs/StaticMOfNAddressSetFactory.js.map +1 -0
- package/dist/contracts/libs/index.d.ts +2 -0
- package/dist/contracts/libs/index.d.ts.map +1 -0
- package/dist/contracts/libs/index.js +3 -0
- package/dist/contracts/libs/index.js.map +1 -0
- package/dist/contracts/middleware/InterchainAccountRouter.d.ts +170 -72
- package/dist/contracts/middleware/InterchainAccountRouter.d.ts.map +1 -1
- package/dist/contracts/middleware/InterchainQueryRouter.d.ts +32 -16
- package/dist/contracts/middleware/InterchainQueryRouter.d.ts.map +1 -1
- package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.d.ts +2 -2
- package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.d.ts.map +1 -1
- package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.d.ts +2 -2
- package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.d.ts.map +1 -1
- package/dist/contracts/middleware/liquidity-layer/adapters/PortalAdapter.d.ts +2 -2
- package/dist/contracts/middleware/liquidity-layer/adapters/PortalAdapter.d.ts.map +1 -1
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge.d.ts +78 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge.js.map +1 -0
- package/dist/contracts/mock/MockCircleBridge.d.ts +86 -0
- package/dist/contracts/mock/MockCircleBridge.d.ts.map +1 -0
- package/dist/contracts/mock/MockCircleBridge.js +4 -0
- package/dist/contracts/mock/MockCircleBridge.js.map +1 -0
- package/dist/contracts/mock/MockInterchainAccountRouter.d.ts +422 -0
- package/dist/contracts/mock/MockInterchainAccountRouter.d.ts.map +1 -0
- package/dist/contracts/mock/MockInterchainAccountRouter.js +4 -0
- package/dist/contracts/mock/MockInterchainAccountRouter.js.map +1 -0
- package/dist/contracts/test/LightTestRecipient.d.ts +54 -1
- package/dist/contracts/test/LightTestRecipient.d.ts.map +1 -1
- package/dist/contracts/test/TestGasRouter.d.ts +2 -2
- package/dist/contracts/test/TestGasRouter.d.ts.map +1 -1
- package/dist/contracts/test/TestLegacyMultisigIsm.d.ts +298 -0
- package/dist/contracts/test/TestLegacyMultisigIsm.d.ts.map +1 -0
- package/dist/contracts/test/TestLegacyMultisigIsm.js +4 -0
- package/dist/contracts/test/TestLegacyMultisigIsm.js.map +1 -0
- package/dist/contracts/test/TestRecipient.d.ts +54 -1
- package/dist/contracts/test/TestRecipient.d.ts.map +1 -1
- package/dist/contracts/test/TestRouter.d.ts +2 -2
- package/dist/contracts/test/TestRouter.d.ts.map +1 -1
- package/dist/contracts/test/index.d.ts +1 -1
- package/dist/contracts/test/index.d.ts.map +1 -1
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.d.ts +23 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.js +93 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/IERC20Permit__factory.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.d.ts +2 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.js +9 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol/index.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +2 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/index.js +31 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/extensions/index.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.d.ts +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.d.ts.map +1 -1
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.js +25 -1
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.js.map +1 -1
- package/dist/factories/contracts/GasRouter__factory.js +1 -1
- package/dist/factories/contracts/GasRouter__factory.js.map +1 -1
- package/dist/factories/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient__factory.d.ts +43 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient__factory.js +200 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/HyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/index.d.ts +2 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/index.d.ts.map +1 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/index.js +9 -0
- package/dist/factories/contracts/ImmutableConnectionClient.sol/index.js.map +1 -0
- package/dist/factories/contracts/InterchainGasPaymaster__factory.d.ts +62 -0
- package/dist/factories/contracts/InterchainGasPaymaster__factory.d.ts.map +1 -0
- package/dist/factories/contracts/InterchainGasPaymaster__factory.js +178 -0
- package/dist/factories/contracts/InterchainGasPaymaster__factory.js.map +1 -0
- package/dist/factories/contracts/Mailbox__factory.d.ts +1 -1
- package/dist/factories/contracts/Mailbox__factory.js +1 -1
- package/dist/factories/contracts/OwnableMulticall__factory.d.ts +10 -43
- package/dist/factories/contracts/OwnableMulticall__factory.d.ts.map +1 -1
- package/dist/factories/contracts/OwnableMulticall__factory.js +20 -80
- package/dist/factories/contracts/OwnableMulticall__factory.js.map +1 -1
- package/dist/factories/contracts/Router__factory.js +1 -1
- package/dist/factories/contracts/Router__factory.js.map +1 -1
- package/dist/factories/contracts/ValidatorAnnounce__factory.d.ts +1 -1
- package/dist/factories/contracts/ValidatorAnnounce__factory.js +1 -1
- package/dist/factories/contracts/igps/InterchainGasPaymaster__factory.d.ts +4 -15
- package/dist/factories/contracts/igps/InterchainGasPaymaster__factory.d.ts.map +1 -1
- package/dist/factories/contracts/igps/InterchainGasPaymaster__factory.js +5 -16
- package/dist/factories/contracts/igps/InterchainGasPaymaster__factory.js.map +1 -1
- package/dist/factories/contracts/igps/OverheadIgp__factory.d.ts +1 -1
- package/dist/factories/contracts/igps/OverheadIgp__factory.js +1 -1
- package/dist/factories/contracts/igps/gas-oracles/StorageGasOracle__factory.d.ts +1 -1
- package/dist/factories/contracts/igps/gas-oracles/StorageGasOracle__factory.js +1 -1
- package/dist/factories/contracts/index.d.ts +2 -1
- package/dist/factories/contracts/index.d.ts.map +1 -1
- package/dist/factories/contracts/index.js +3 -3
- package/dist/factories/contracts/index.js.map +1 -1
- package/dist/factories/contracts/interfaces/IAggregationIsm__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/IAggregationIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IAggregationIsm__factory.js +79 -0
- package/dist/factories/contracts/interfaces/IAggregationIsm__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IGasOracle__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/IGasOracle__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IGasOracle__factory.js +42 -0
- package/dist/factories/contracts/interfaces/IGasOracle__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts +29 -0
- package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.js +96 -0
- package/dist/factories/contracts/interfaces/IHyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts +36 -0
- package/dist/factories/contracts/interfaces/IInterchainGasPaymaster__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainGasPaymaster__factory.js +95 -0
- package/dist/factories/contracts/interfaces/IInterchainGasPaymaster__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +55 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +19 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +31 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/index.js +11 -0
- package/dist/factories/contracts/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerMessageRecipient__factory.d.ts +19 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerMessageRecipient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerMessageRecipient__factory.js +51 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerMessageRecipient__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerRouter__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerRouter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerRouter__factory.js +62 -0
- package/dist/factories/contracts/interfaces/ILiquidityLayerRouter__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IMailbox__factory.d.ts +36 -0
- package/dist/factories/contracts/interfaces/IMailbox__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IMailbox__factory.js +255 -0
- package/dist/factories/contracts/interfaces/IMailbox__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IMessageRecipient__factory.d.ts +19 -0
- package/dist/factories/contracts/interfaces/IMessageRecipient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IMessageRecipient__factory.js +41 -0
- package/dist/factories/contracts/interfaces/IMessageRecipient__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IRouter__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/IRouter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IRouter__factory.js +86 -0
- package/dist/factories/contracts/interfaces/IRouter__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/IValidatorAnnounce__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/IValidatorAnnounce__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/IValidatorAnnounce__factory.js +105 -0
- package/dist/factories/contracts/interfaces/IValidatorAnnounce__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/index.d.ts +14 -0
- package/dist/factories/contracts/interfaces/index.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/index.js +53 -0
- package/dist/factories/contracts/interfaces/index.js.map +1 -0
- package/dist/factories/contracts/interfaces/isms/IMultisigIsm__factory.d.ts +23 -0
- package/dist/factories/contracts/interfaces/isms/IMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/isms/IMultisigIsm__factory.js +79 -0
- package/dist/factories/contracts/interfaces/isms/IMultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/isms/index.d.ts +2 -0
- package/dist/factories/contracts/interfaces/isms/index.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/isms/index.js +9 -0
- package/dist/factories/contracts/interfaces/isms/index.js.map +1 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.d.ts +33 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.js +265 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainAccountRouter__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainQueryRouter__factory.d.ts +43 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainQueryRouter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainQueryRouter__factory.js +100 -0
- package/dist/factories/contracts/interfaces/middleware/IInterchainQueryRouter__factory.js.map +1 -0
- package/dist/factories/contracts/interfaces/middleware/index.d.ts +3 -0
- package/dist/factories/contracts/interfaces/middleware/index.d.ts.map +1 -0
- package/dist/factories/contracts/interfaces/middleware/index.js +11 -0
- package/dist/factories/contracts/interfaces/middleware/index.js.map +1 -0
- package/dist/factories/contracts/isms/MultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/MultisigIsm__factory.d.ts.map +1 -1
- package/dist/factories/contracts/isms/MultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/isms/MultisigIsm__factory.js.map +1 -1
- package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.d.ts +23 -0
- package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.js +79 -0
- package/dist/factories/contracts/isms/aggregation/AbstractAggregationIsm__factory.js.map +1 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.d.ts +35 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.js +89 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.js.map +1 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.d.ts +35 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.js +102 -0
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.js.map +1 -0
- package/dist/factories/contracts/isms/aggregation/index.d.ts +4 -0
- package/dist/factories/contracts/isms/aggregation/index.d.ts.map +1 -0
- package/dist/factories/contracts/isms/aggregation/index.js +13 -0
- package/dist/factories/contracts/isms/aggregation/index.js.map +1 -0
- package/dist/factories/contracts/isms/index.d.ts +2 -1
- package/dist/factories/contracts/isms/index.d.ts.map +1 -1
- package/dist/factories/contracts/isms/index.js +26 -3
- package/dist/factories/contracts/isms/index.js.map +1 -1
- package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.d.ts +23 -0
- package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.js +79 -0
- package/dist/factories/contracts/isms/multisig/AbstractMultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.d.ts +55 -0
- package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.js +437 -0
- package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.d.ts +35 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.js +89 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsmFactory__factory.js.map +1 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.d.ts +35 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.js +102 -0
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/isms/multisig/index.d.ts +5 -0
- package/dist/factories/contracts/isms/multisig/index.d.ts.map +1 -0
- package/dist/factories/contracts/isms/multisig/index.js +15 -0
- package/dist/factories/contracts/isms/multisig/index.js.map +1 -0
- package/dist/factories/contracts/libs/ImmutableOwnable__factory.d.ts +19 -0
- package/dist/factories/contracts/libs/ImmutableOwnable__factory.d.ts.map +1 -0
- package/dist/factories/contracts/libs/ImmutableOwnable__factory.js +31 -0
- package/dist/factories/contracts/libs/ImmutableOwnable__factory.js.map +1 -0
- package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.d.ts +23 -0
- package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.d.ts.map +1 -0
- package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.js +66 -0
- package/dist/factories/contracts/libs/StaticMOfNAddressSetFactory__factory.js.map +1 -0
- package/dist/factories/contracts/libs/index.d.ts +2 -0
- package/dist/factories/contracts/libs/index.d.ts.map +1 -0
- package/dist/factories/contracts/libs/index.js +9 -0
- package/dist/factories/contracts/libs/index.js.map +1 -0
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts +11 -17
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js +319 -39
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js +39 -5
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js +2 -2
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js +2 -2
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.js +2 -2
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge__factory.d.ts +36 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge__factory.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge__factory.js +104 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge__factory.js.map +1 -0
- package/dist/factories/contracts/mock/MockCircleBridge__factory.d.ts +59 -0
- package/dist/factories/contracts/mock/MockCircleBridge__factory.d.ts.map +1 -0
- package/dist/factories/contracts/mock/MockCircleBridge__factory.js +151 -0
- package/dist/factories/contracts/mock/MockCircleBridge__factory.js.map +1 -0
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts +1 -1
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts.map +1 -1
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js +1 -1
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js.map +1 -1
- package/dist/factories/contracts/mock/MockInterchainAccountRouter__factory.d.ts +69 -0
- package/dist/factories/contracts/mock/MockInterchainAccountRouter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/mock/MockInterchainAccountRouter__factory.js +556 -0
- package/dist/factories/contracts/mock/MockInterchainAccountRouter__factory.js.map +1 -0
- package/dist/factories/contracts/mock/MockMailbox__factory.d.ts +1 -1
- package/dist/factories/contracts/mock/MockMailbox__factory.js +1 -1
- package/dist/factories/contracts/mock/MockPortalBridge__factory.d.ts +1 -1
- package/dist/factories/contracts/mock/MockPortalBridge__factory.js +1 -1
- package/dist/factories/contracts/test/LightTestRecipient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/LightTestRecipient__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/LightTestRecipient__factory.js +53 -1
- package/dist/factories/contracts/test/LightTestRecipient__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestGasRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestGasRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestGasRouter__factory.js +2 -2
- package/dist/factories/contracts/test/TestGasRouter__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts +9 -2
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js +6 -1
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.js +1 -1
- package/dist/factories/contracts/test/TestInterchainGasPaymaster__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestIsm__factory.js +1 -1
- package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.d.ts +48 -0
- package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.js +456 -0
- package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.js +1 -1
- package/dist/factories/contracts/test/TestMailbox__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMailbox__factory.js +1 -1
- package/dist/factories/contracts/test/TestMessage__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMessage__factory.js +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestQuerySender__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestQuerySender__factory.js +1 -1
- package/dist/factories/contracts/test/TestQuery__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestQuery__factory.js +1 -1
- package/dist/factories/contracts/test/TestRecipient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestRecipient__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestRecipient__factory.js +53 -1
- package/dist/factories/contracts/test/TestRecipient__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestRouter__factory.js +2 -2
- package/dist/factories/contracts/test/TestRouter__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestSendReceiver__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestSendReceiver__factory.js +1 -1
- package/dist/factories/contracts/test/TestTokenRecipient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestTokenRecipient__factory.js +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient1__factory.d.ts +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient1__factory.js +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient3__factory.d.ts +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient3__factory.js +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient5__factory.d.ts +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient5__factory.js +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient6__factory.d.ts +1 -1
- package/dist/factories/contracts/test/bad-recipient/BadRecipient6__factory.js +1 -1
- package/dist/factories/contracts/test/index.d.ts +1 -1
- package/dist/factories/contracts/test/index.d.ts.map +1 -1
- package/dist/factories/contracts/test/index.js +3 -3
- package/dist/factories/contracts/test/index.js.map +1 -1
- package/dist/factories/index.d.ts +0 -1
- package/dist/factories/index.d.ts.map +1 -1
- package/dist/factories/index.js +1 -2
- package/dist/factories/index.js.map +1 -1
- package/dist/factories/interfaces/IAggregationIsm__factory.d.ts +23 -0
- package/dist/factories/interfaces/IAggregationIsm__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IAggregationIsm__factory.js +79 -0
- package/dist/factories/interfaces/IAggregationIsm__factory.js.map +1 -0
- package/dist/factories/interfaces/IHyperlaneConnectionClient__factory.d.ts +29 -0
- package/dist/factories/interfaces/IHyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IHyperlaneConnectionClient__factory.js +96 -0
- package/dist/factories/interfaces/IHyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.d.ts +2 -12
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.d.ts.map +1 -1
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.js +21 -28
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.js.map +1 -1
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.d.ts +3 -20
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.d.ts.map +1 -1
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.js +1 -50
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.js.map +1 -1
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.d.ts +2 -12
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.d.ts.map +1 -1
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.js +85 -17
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.js.map +1 -1
- package/dist/factories/interfaces/ILiquidityLayerRouter__factory.js +6 -6
- package/dist/factories/interfaces/ILiquidityLayerRouter__factory.js.map +1 -1
- package/dist/factories/interfaces/IRouter__factory.d.ts +23 -0
- package/dist/factories/interfaces/IRouter__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IRouter__factory.js +86 -0
- package/dist/factories/interfaces/IRouter__factory.js.map +1 -0
- package/dist/factories/interfaces/index.d.ts +0 -2
- package/dist/factories/interfaces/index.d.ts.map +1 -1
- package/dist/factories/interfaces/index.js +1 -5
- package/dist/factories/interfaces/index.js.map +1 -1
- package/dist/factories/interfaces/isms/IMultisigIsm__factory.d.ts +23 -0
- package/dist/factories/interfaces/isms/IMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/isms/IMultisigIsm__factory.js +79 -0
- package/dist/factories/interfaces/isms/IMultisigIsm__factory.js.map +1 -0
- package/dist/factories/interfaces/isms/index.d.ts +2 -0
- package/dist/factories/interfaces/isms/index.d.ts.map +1 -0
- package/dist/factories/interfaces/isms/index.js +9 -0
- package/dist/factories/interfaces/isms/index.js.map +1 -0
- package/dist/factories/interfaces/middleware/IInterchainAccountRouter__factory.d.ts +33 -0
- package/dist/factories/interfaces/middleware/IInterchainAccountRouter__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/middleware/IInterchainAccountRouter__factory.js +265 -0
- package/dist/factories/interfaces/middleware/IInterchainAccountRouter__factory.js.map +1 -0
- package/dist/factories/interfaces/middleware/IInterchainQueryRouter__factory.d.ts +43 -0
- package/dist/factories/interfaces/middleware/IInterchainQueryRouter__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/middleware/IInterchainQueryRouter__factory.js +100 -0
- package/dist/factories/interfaces/middleware/IInterchainQueryRouter__factory.js.map +1 -0
- package/dist/factories/interfaces/middleware/index.d.ts +3 -0
- package/dist/factories/interfaces/middleware/index.d.ts.map +1 -0
- package/dist/factories/interfaces/middleware/index.js +11 -0
- package/dist/factories/interfaces/middleware/index.js.map +1 -0
- package/dist/index.d.ts +50 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -32
- package/dist/index.js.map +1 -1
- package/dist/interfaces/IAggregationIsm.d.ts +76 -0
- package/dist/interfaces/IAggregationIsm.d.ts.map +1 -0
- package/dist/interfaces/IAggregationIsm.js +4 -0
- package/dist/interfaces/IAggregationIsm.js.map +1 -0
- package/dist/interfaces/IHyperlaneConnectionClient.d.ts +107 -0
- package/dist/interfaces/IHyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/interfaces/IHyperlaneConnectionClient.js +4 -0
- package/dist/interfaces/IHyperlaneConnectionClient.js.map +1 -0
- package/dist/interfaces/IInterchainAccountRouter.d.ts +40 -42
- package/dist/interfaces/IInterchainAccountRouter.d.ts.map +1 -1
- package/dist/interfaces/IInterchainGasPaymaster.d.ts +9 -34
- package/dist/interfaces/IInterchainGasPaymaster.d.ts.map +1 -1
- package/dist/interfaces/IInterchainQueryRouter.d.ts +49 -30
- package/dist/interfaces/IInterchainQueryRouter.d.ts.map +1 -1
- package/dist/interfaces/ILiquidityLayerRouter.d.ts +8 -8
- package/dist/interfaces/ILiquidityLayerRouter.d.ts.map +1 -1
- package/dist/interfaces/IRouter.d.ts +83 -0
- package/dist/interfaces/IRouter.d.ts.map +1 -0
- package/dist/interfaces/IRouter.js +4 -0
- package/dist/interfaces/IRouter.js.map +1 -0
- package/dist/interfaces/index.d.ts +0 -2
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/isms/IMultisigIsm.d.ts +82 -0
- package/dist/interfaces/isms/IMultisigIsm.d.ts.map +1 -0
- package/dist/interfaces/isms/IMultisigIsm.js +4 -0
- package/dist/interfaces/isms/IMultisigIsm.js.map +1 -0
- package/dist/interfaces/isms/index.d.ts +2 -0
- package/dist/interfaces/isms/index.d.ts.map +1 -0
- package/dist/interfaces/isms/index.js +3 -0
- package/dist/interfaces/isms/index.js.map +1 -0
- package/dist/interfaces/middleware/IInterchainAccountRouter.d.ts +127 -0
- package/dist/interfaces/middleware/IInterchainAccountRouter.d.ts.map +1 -0
- package/dist/interfaces/middleware/IInterchainAccountRouter.js +4 -0
- package/dist/interfaces/middleware/IInterchainAccountRouter.js.map +1 -0
- package/dist/interfaces/middleware/IInterchainQueryRouter.d.ts +88 -0
- package/dist/interfaces/middleware/IInterchainQueryRouter.d.ts.map +1 -0
- package/dist/interfaces/middleware/IInterchainQueryRouter.js +4 -0
- package/dist/interfaces/middleware/IInterchainQueryRouter.js.map +1 -0
- package/dist/interfaces/middleware/index.d.ts +3 -0
- package/dist/interfaces/middleware/index.d.ts.map +1 -0
- package/dist/interfaces/middleware/index.js +3 -0
- package/dist/interfaces/middleware/index.js.map +1 -0
- package/package.json +3 -3
- package/contracts/Create2Factory.sol +0 -114
- package/contracts/middleware/InterchainCallMessage.sol +0 -112
- package/contracts/test/TestMultisigIsm.sol +0 -23
- package/interfaces/IInterchainAccountRouter.sol +0 -20
- package/interfaces/IInterchainQueryRouter.sol +0 -11
- package/interfaces/IMailbox.sol +0 -28
- /package/{interfaces → contracts/interfaces}/IGasOracle.sol +0 -0
- /package/{interfaces → contracts/interfaces}/IInterchainGasPaymaster.sol +0 -0
- /package/{interfaces → contracts/interfaces}/ILiquidityLayerMessageRecipient.sol +0 -0
- /package/{interfaces → contracts/interfaces}/ILiquidityLayerRouter.sol +0 -0
- /package/{interfaces → contracts/interfaces}/IMessageRecipient.sol +0 -0
- /package/{interfaces → contracts/interfaces}/IValidatorAnnounce.sol +0 -0
|
@@ -3,12 +3,14 @@ pragma solidity ^0.8.13;
|
|
|
3
3
|
|
|
4
4
|
// ============ Internal Imports ============
|
|
5
5
|
import {OwnableMulticall} from "../OwnableMulticall.sol";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import {HyperlaneConnectionClient} from "../HyperlaneConnectionClient.sol";
|
|
7
|
+
import {IRouter} from "../interfaces/IRouter.sol";
|
|
8
|
+
import {IInterchainAccountRouter} from "../interfaces/middleware/IInterchainAccountRouter.sol";
|
|
9
|
+
import {InterchainAccountMessage} from "../libs/middleware/InterchainAccountMessage.sol";
|
|
9
10
|
import {MinimalProxy} from "../libs/MinimalProxy.sol";
|
|
10
11
|
import {CallLib} from "../libs/Call.sol";
|
|
11
12
|
import {TypeCasts} from "../libs/TypeCasts.sol";
|
|
13
|
+
import {EnumerableMapExtended} from "../libs/EnumerableMapExtended.sol";
|
|
12
14
|
|
|
13
15
|
// ============ External Imports ============
|
|
14
16
|
import {Create2} from "@openzeppelin/contracts/utils/Create2.sol";
|
|
@@ -16,44 +18,112 @@ import {Address} from "@openzeppelin/contracts/utils/Address.sol";
|
|
|
16
18
|
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
17
19
|
|
|
18
20
|
/*
|
|
19
|
-
* @title
|
|
20
|
-
*
|
|
21
|
+
* @title A contract that allows accounts on chain A to call contracts via a
|
|
22
|
+
* proxy contract on chain B.
|
|
21
23
|
*/
|
|
22
|
-
contract InterchainAccountRouter is
|
|
24
|
+
contract InterchainAccountRouter is
|
|
25
|
+
HyperlaneConnectionClient,
|
|
26
|
+
IRouter,
|
|
27
|
+
IInterchainAccountRouter
|
|
28
|
+
{
|
|
29
|
+
// ============ Libraries ============
|
|
30
|
+
|
|
23
31
|
using TypeCasts for address;
|
|
24
32
|
using TypeCasts for bytes32;
|
|
25
33
|
|
|
34
|
+
// ============ Constants ============
|
|
35
|
+
|
|
36
|
+
uint32 internal immutable localDomain;
|
|
26
37
|
address internal immutable implementation;
|
|
27
38
|
bytes32 internal immutable bytecodeHash;
|
|
28
39
|
|
|
40
|
+
// ============ Private Storage ============
|
|
41
|
+
uint32[] private _domains;
|
|
42
|
+
|
|
43
|
+
// ============ Public Storage ============
|
|
44
|
+
mapping(uint32 => bytes32) public routers;
|
|
45
|
+
mapping(uint32 => bytes32) public isms;
|
|
46
|
+
|
|
47
|
+
// ============ Upgrade Gap ============
|
|
48
|
+
|
|
49
|
+
// gap for upgrade safety
|
|
50
|
+
uint256[47] private __GAP;
|
|
51
|
+
|
|
52
|
+
// ============ Events ============
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @notice Emitted when a default router is set for a remote domain
|
|
56
|
+
* @param domain The remote domain
|
|
57
|
+
* @param router The address of the remote router
|
|
58
|
+
*/
|
|
59
|
+
event RemoteRouterEnrolled(uint32 indexed domain, bytes32 router);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @notice Emitted when a default ISM is set for a remote domain
|
|
63
|
+
* @param domain The remote domain
|
|
64
|
+
* @param ism The address of the remote ISM
|
|
65
|
+
*/
|
|
66
|
+
event RemoteIsmEnrolled(uint32 indexed domain, bytes32 ism);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @notice Emitted when an interchain call is dispatched to a remote domain
|
|
70
|
+
* @param destination The destination domain on which to make the call
|
|
71
|
+
* @param owner The local owner of the remote ICA
|
|
72
|
+
* @param router The address of the remote router
|
|
73
|
+
* @param ism The address of the remote ISM
|
|
74
|
+
*/
|
|
75
|
+
event RemoteCallDispatched(
|
|
76
|
+
uint32 indexed destination,
|
|
77
|
+
address indexed owner,
|
|
78
|
+
bytes32 router,
|
|
79
|
+
bytes32 ism
|
|
80
|
+
);
|
|
81
|
+
|
|
29
82
|
/**
|
|
30
|
-
* @notice Emitted when an interchain account
|
|
83
|
+
* @notice Emitted when an interchain account contract is deployed
|
|
31
84
|
* @param origin The domain of the chain where the message was sent from
|
|
32
|
-
* @param
|
|
85
|
+
* @param owner The address of the account that sent the message
|
|
86
|
+
* @param ism The address of the local ISM
|
|
33
87
|
* @param account The address of the proxy account that was created
|
|
34
88
|
*/
|
|
35
89
|
event InterchainAccountCreated(
|
|
36
90
|
uint32 indexed origin,
|
|
37
|
-
bytes32
|
|
91
|
+
bytes32 indexed owner,
|
|
92
|
+
address ism,
|
|
38
93
|
address account
|
|
39
94
|
);
|
|
40
95
|
|
|
96
|
+
// ============ Constructor ============
|
|
97
|
+
|
|
41
98
|
/**
|
|
42
|
-
* @notice Constructor deploys a relay (OwnableMulticall.sol) contract that
|
|
99
|
+
* @notice Constructor deploys a relay (OwnableMulticall.sol) contract that
|
|
100
|
+
* will be cloned for each interchain account.
|
|
101
|
+
* @param _localDomain The Hyperlane domain ID on which this contract is
|
|
102
|
+
* deployed.
|
|
103
|
+
* @param _proxy The address of a proxy contract that delegates calls to
|
|
104
|
+
* this contract. Used by OwnableMulticall for access control.
|
|
105
|
+
* @dev Set proxy to address(0) to use this contract without a proxy.
|
|
43
106
|
*/
|
|
44
|
-
constructor() {
|
|
45
|
-
|
|
107
|
+
constructor(uint32 _localDomain, address _proxy) {
|
|
108
|
+
localDomain = _localDomain;
|
|
109
|
+
// TODO: always proxy and remove this sentinel
|
|
110
|
+
if (_proxy == address(0)) {
|
|
111
|
+
_proxy = address(this);
|
|
112
|
+
}
|
|
113
|
+
implementation = address(new OwnableMulticall(_proxy));
|
|
46
114
|
// cannot be stored immutably because it is dynamically sized
|
|
47
|
-
bytes memory
|
|
48
|
-
bytecodeHash = keccak256(
|
|
115
|
+
bytes memory _bytecode = MinimalProxy.bytecode(implementation);
|
|
116
|
+
bytecodeHash = keccak256(_bytecode);
|
|
49
117
|
}
|
|
50
118
|
|
|
119
|
+
// ============ Initializers ============
|
|
120
|
+
|
|
51
121
|
/**
|
|
52
|
-
* @notice Initializes the
|
|
53
|
-
* @param _mailbox The address of the mailbox contract
|
|
54
|
-
* @param _interchainGasPaymaster
|
|
55
|
-
* @param _interchainSecurityModule The address of the
|
|
56
|
-
* @param _owner The address with owner privileges
|
|
122
|
+
* @notice Initializes the contract with HyperlaneConnectionClient contracts
|
|
123
|
+
* @param _mailbox The address of the mailbox contract
|
|
124
|
+
* @param _interchainGasPaymaster Unused but required by HyperlaneConnectionClient
|
|
125
|
+
* @param _interchainSecurityModule The address of the local ISM contract
|
|
126
|
+
* @param _owner The address with owner privileges
|
|
57
127
|
*/
|
|
58
128
|
function initialize(
|
|
59
129
|
address _mailbox,
|
|
@@ -67,121 +137,405 @@ contract InterchainAccountRouter is Router, IInterchainAccountRouter {
|
|
|
67
137
|
_interchainSecurityModule,
|
|
68
138
|
_owner
|
|
69
139
|
);
|
|
140
|
+
require(localDomain == mailbox.localDomain(), "domain mismatch");
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ============ External Functions ============
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @notice Registers the address of many remote InterchainAccountRouter
|
|
147
|
+
* contracts to use as a default when making interchain calls
|
|
148
|
+
* @param _destinations The remote domains
|
|
149
|
+
* @param _routers The addresses of the remote InterchainAccountRouters
|
|
150
|
+
*/
|
|
151
|
+
function enrollRemoteRouters(
|
|
152
|
+
uint32[] calldata _destinations,
|
|
153
|
+
bytes32[] calldata _routers
|
|
154
|
+
) external onlyOwner {
|
|
155
|
+
require(_destinations.length == _routers.length, "!length");
|
|
156
|
+
for (uint256 i = 0; i < _destinations.length; i += 1) {
|
|
157
|
+
_enrollRemoteRouterAndIsm(
|
|
158
|
+
_destinations[i],
|
|
159
|
+
_routers[i],
|
|
160
|
+
bytes32(0)
|
|
161
|
+
);
|
|
162
|
+
}
|
|
70
163
|
}
|
|
71
164
|
|
|
72
165
|
/**
|
|
73
|
-
* @notice Dispatches a
|
|
74
|
-
*
|
|
75
|
-
* @
|
|
166
|
+
* @notice Dispatches a single remote call to be made by an owner's
|
|
167
|
+
* interchain account on the destination domain
|
|
168
|
+
* @dev Uses the default router and ISM addresses for the destination
|
|
169
|
+
* domain, reverting if none have been configured
|
|
170
|
+
* @param _destination The remote domain of the chain to make calls on
|
|
171
|
+
* @param _to The address of the contract to call
|
|
172
|
+
* @param _value The value to include in the call
|
|
173
|
+
* @param _data The calldata
|
|
174
|
+
* @return The Hyperlane message ID
|
|
175
|
+
*/
|
|
176
|
+
function callRemote(
|
|
177
|
+
uint32 _destination,
|
|
178
|
+
address _to,
|
|
179
|
+
uint256 _value,
|
|
180
|
+
bytes memory _data
|
|
181
|
+
) external returns (bytes32) {
|
|
182
|
+
bytes32 _router = routers[_destination];
|
|
183
|
+
bytes32 _ism = isms[_destination];
|
|
184
|
+
bytes memory _body = InterchainAccountMessage.encode(
|
|
185
|
+
msg.sender,
|
|
186
|
+
_ism,
|
|
187
|
+
_to,
|
|
188
|
+
_value,
|
|
189
|
+
_data
|
|
190
|
+
);
|
|
191
|
+
return _dispatchMessage(_destination, _router, _ism, _body);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @notice Dispatches a sequence of remote calls to be made by an owner's
|
|
196
|
+
* interchain account on the destination domain
|
|
197
|
+
* @dev Uses the default router and ISM addresses for the destination
|
|
198
|
+
* domain, reverting if none have been configured
|
|
76
199
|
* @dev Recommend using CallLib.build to format the interchain calls.
|
|
200
|
+
* @param _destination The remote domain of the chain to make calls on
|
|
201
|
+
* @param _calls The sequence of calls to make
|
|
202
|
+
* @return The Hyperlane message ID
|
|
77
203
|
*/
|
|
78
|
-
function
|
|
204
|
+
function callRemote(uint32 _destination, CallLib.Call[] calldata _calls)
|
|
79
205
|
external
|
|
80
206
|
returns (bytes32)
|
|
81
207
|
{
|
|
208
|
+
bytes32 _router = routers[_destination];
|
|
209
|
+
bytes32 _ism = isms[_destination];
|
|
210
|
+
return callRemoteWithOverrides(_destination, _router, _ism, _calls);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @notice Handles dispatched messages by relaying calls to the interchain account
|
|
215
|
+
* @param _origin The origin domain of the interchain account
|
|
216
|
+
* @param _sender The sender of the interchain message
|
|
217
|
+
* @param _message The InterchainAccountMessage containing the account
|
|
218
|
+
* owner, ISM, and sequence of calls to be relayed
|
|
219
|
+
* @dev Does not need to be onlyRemoteRouter, as this application is designed
|
|
220
|
+
* to receive messages from untrusted remote contracts.
|
|
221
|
+
*/
|
|
222
|
+
function handle(
|
|
223
|
+
uint32 _origin,
|
|
224
|
+
bytes32 _sender,
|
|
225
|
+
bytes calldata _message
|
|
226
|
+
) external onlyMailbox {
|
|
227
|
+
(
|
|
228
|
+
bytes32 _owner,
|
|
229
|
+
bytes32 _ism,
|
|
230
|
+
CallLib.Call[] memory _calls
|
|
231
|
+
) = InterchainAccountMessage.decode(_message);
|
|
232
|
+
|
|
233
|
+
OwnableMulticall _interchainAccount = getDeployedInterchainAccount(
|
|
234
|
+
_origin,
|
|
235
|
+
_owner,
|
|
236
|
+
_sender,
|
|
237
|
+
TypeCasts.bytes32ToAddress(_ism)
|
|
238
|
+
);
|
|
239
|
+
_interchainAccount.multicall(_calls);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @notice Returns the local address of an interchain account
|
|
244
|
+
* @dev This interchain account is not guaranteed to have been deployed
|
|
245
|
+
* @param _origin The remote origin domain of the interchain account
|
|
246
|
+
* @param _router The remote origin InterchainAccountRouter
|
|
247
|
+
* @param _owner The remote owner of the interchain account
|
|
248
|
+
* @param _ism The local address of the ISM
|
|
249
|
+
* @return The local address of the interchain account
|
|
250
|
+
*/
|
|
251
|
+
function getLocalInterchainAccount(
|
|
252
|
+
uint32 _origin,
|
|
253
|
+
address _owner,
|
|
254
|
+
address _router,
|
|
255
|
+
address _ism
|
|
256
|
+
) external view returns (OwnableMulticall) {
|
|
257
|
+
bytes32 _routerAsBytes32 = TypeCasts.addressToBytes32(_router);
|
|
258
|
+
bytes32 _ownerAsBytes32 = TypeCasts.addressToBytes32(_owner);
|
|
82
259
|
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
)
|
|
260
|
+
getLocalInterchainAccount(
|
|
261
|
+
_origin,
|
|
262
|
+
_ownerAsBytes32,
|
|
263
|
+
_routerAsBytes32,
|
|
264
|
+
_ism
|
|
89
265
|
);
|
|
90
266
|
}
|
|
91
267
|
|
|
92
268
|
/**
|
|
93
|
-
* @notice Returns the address of
|
|
94
|
-
* @
|
|
95
|
-
* @
|
|
96
|
-
*
|
|
269
|
+
* @notice Returns the remote address of a locally owned interchain account
|
|
270
|
+
* @dev This interchain account is not guaranteed to have been deployed
|
|
271
|
+
* @dev This function will only work if the destination domain is
|
|
272
|
+
* EVM compatible
|
|
273
|
+
* @param _destination The remote destination domain of the interchain account
|
|
274
|
+
* @param _owner The local owner of the interchain account
|
|
275
|
+
* @return The remote address of the interchain account
|
|
97
276
|
*/
|
|
98
|
-
function
|
|
99
|
-
|
|
277
|
+
function getRemoteInterchainAccount(uint32 _destination, address _owner)
|
|
278
|
+
external
|
|
100
279
|
view
|
|
101
|
-
returns (address
|
|
280
|
+
returns (address)
|
|
102
281
|
{
|
|
103
|
-
|
|
282
|
+
address _router = TypeCasts.bytes32ToAddress(routers[_destination]);
|
|
283
|
+
address _ism = TypeCasts.bytes32ToAddress(isms[_destination]);
|
|
284
|
+
return getRemoteInterchainAccount(_owner, _router, _ism);
|
|
104
285
|
}
|
|
105
286
|
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
view
|
|
109
|
-
returns (address payable)
|
|
110
|
-
{
|
|
111
|
-
return getInterchainAccount(_origin, _sender.addressToBytes32());
|
|
287
|
+
function domains() external view returns (uint32[] memory) {
|
|
288
|
+
return _domains;
|
|
112
289
|
}
|
|
113
290
|
|
|
291
|
+
// ============ Public Functions ============
|
|
292
|
+
|
|
114
293
|
/**
|
|
115
|
-
* @notice
|
|
116
|
-
*
|
|
117
|
-
* @param
|
|
118
|
-
* @
|
|
294
|
+
* @notice Registers the address of a remote InterchainAccountRouter
|
|
295
|
+
* contract to use as a default when making interchain calls
|
|
296
|
+
* @param _destination The remote domain
|
|
297
|
+
* @param _router The address of the remote InterchainAccountRouter
|
|
119
298
|
*/
|
|
120
|
-
function
|
|
299
|
+
function enrollRemoteRouter(uint32 _destination, bytes32 _router)
|
|
121
300
|
public
|
|
122
|
-
|
|
301
|
+
onlyOwner
|
|
123
302
|
{
|
|
124
|
-
|
|
125
|
-
address payable interchainAccount = _getInterchainAccount(salt);
|
|
126
|
-
if (!Address.isContract(interchainAccount)) {
|
|
127
|
-
bytes memory bytecode = MinimalProxy.bytecode(implementation);
|
|
128
|
-
interchainAccount = payable(Create2.deploy(0, salt, bytecode));
|
|
129
|
-
emit InterchainAccountCreated(_origin, _sender, interchainAccount);
|
|
130
|
-
// transfers ownership to this contract
|
|
131
|
-
OwnableMulticall(interchainAccount).initialize();
|
|
132
|
-
}
|
|
133
|
-
return OwnableMulticall(interchainAccount);
|
|
303
|
+
_enrollRemoteRouterAndIsm(_destination, _router, bytes32(0));
|
|
134
304
|
}
|
|
135
305
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
306
|
+
/**
|
|
307
|
+
* @notice Registers the address of remote InterchainAccountRouter
|
|
308
|
+
* and ISM contracts to use as a default when making interchain calls
|
|
309
|
+
* @param _destination The remote domain
|
|
310
|
+
* @param _router The address of the remote InterchainAccountRouter
|
|
311
|
+
* @param _ism The address of the remote ISM
|
|
312
|
+
*/
|
|
313
|
+
function enrollRemoteRouterAndIsm(
|
|
314
|
+
uint32 _destination,
|
|
315
|
+
bytes32 _router,
|
|
316
|
+
bytes32 _ism
|
|
317
|
+
) public onlyOwner {
|
|
318
|
+
_enrollRemoteRouterAndIsm(_destination, _router, _ism);
|
|
142
319
|
}
|
|
143
320
|
|
|
144
321
|
/**
|
|
145
|
-
* @notice
|
|
146
|
-
*
|
|
147
|
-
* @
|
|
148
|
-
* @
|
|
322
|
+
* @notice Dispatches a sequence of remote calls to be made by an owner's
|
|
323
|
+
* interchain account on the destination domain
|
|
324
|
+
* @dev Recommend using CallLib.build to format the interchain calls
|
|
325
|
+
* @param _destination The remote domain of the chain to make calls on
|
|
326
|
+
* @param _router The remote router address
|
|
327
|
+
* @param _ism The remote ISM address
|
|
328
|
+
* @param _calls The sequence of calls to make
|
|
329
|
+
* @return The Hyperlane message ID
|
|
149
330
|
*/
|
|
150
|
-
function
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
331
|
+
function callRemoteWithOverrides(
|
|
332
|
+
uint32 _destination,
|
|
333
|
+
bytes32 _router,
|
|
334
|
+
bytes32 _ism,
|
|
335
|
+
CallLib.Call[] calldata _calls
|
|
336
|
+
) public returns (bytes32) {
|
|
337
|
+
bytes memory _body = InterchainAccountMessage.encode(
|
|
338
|
+
msg.sender,
|
|
339
|
+
_ism,
|
|
340
|
+
_calls
|
|
341
|
+
);
|
|
342
|
+
return _dispatchMessage(_destination, _router, _ism, _body);
|
|
156
343
|
}
|
|
157
344
|
|
|
158
345
|
/**
|
|
159
|
-
* @notice Returns
|
|
160
|
-
* @param
|
|
161
|
-
* @
|
|
346
|
+
* @notice Returns and deploys (if not already) an interchain account
|
|
347
|
+
* @param _origin The remote origin domain of the interchain account
|
|
348
|
+
* @param _owner The remote owner of the interchain account
|
|
349
|
+
* @param _router The remote origin InterchainAccountRouter
|
|
350
|
+
* @param _ism The local address of the ISM
|
|
351
|
+
* @return The address of the interchain account
|
|
162
352
|
*/
|
|
163
|
-
function
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
353
|
+
function getDeployedInterchainAccount(
|
|
354
|
+
uint32 _origin,
|
|
355
|
+
address _owner,
|
|
356
|
+
address _router,
|
|
357
|
+
address _ism
|
|
358
|
+
) public returns (OwnableMulticall) {
|
|
359
|
+
return
|
|
360
|
+
getDeployedInterchainAccount(
|
|
361
|
+
_origin,
|
|
362
|
+
TypeCasts.addressToBytes32(_owner),
|
|
363
|
+
TypeCasts.addressToBytes32(_router),
|
|
364
|
+
_ism
|
|
365
|
+
);
|
|
169
366
|
}
|
|
170
367
|
|
|
171
368
|
/**
|
|
172
|
-
* @notice
|
|
173
|
-
* @param _origin The origin domain of the interchain account
|
|
174
|
-
* @param
|
|
369
|
+
* @notice Returns and deploys (if not already) an interchain account
|
|
370
|
+
* @param _origin The remote origin domain of the interchain account
|
|
371
|
+
* @param _owner The remote owner of the interchain account
|
|
372
|
+
* @param _router The remote origin InterchainAccountRouter
|
|
373
|
+
* @param _ism The local address of the ISM
|
|
374
|
+
* @return The address of the interchain account
|
|
175
375
|
*/
|
|
176
|
-
function
|
|
376
|
+
function getDeployedInterchainAccount(
|
|
177
377
|
uint32 _origin,
|
|
178
|
-
bytes32,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
378
|
+
bytes32 _owner,
|
|
379
|
+
bytes32 _router,
|
|
380
|
+
address _ism
|
|
381
|
+
) public returns (OwnableMulticall) {
|
|
382
|
+
bytes32 _salt = _getSalt(
|
|
182
383
|
_origin,
|
|
183
|
-
|
|
384
|
+
_owner,
|
|
385
|
+
_router,
|
|
386
|
+
TypeCasts.addressToBytes32(_ism)
|
|
387
|
+
);
|
|
388
|
+
address payable _account = _getLocalInterchainAccount(_salt);
|
|
389
|
+
if (!Address.isContract(_account)) {
|
|
390
|
+
bytes memory _bytecode = MinimalProxy.bytecode(implementation);
|
|
391
|
+
_account = payable(Create2.deploy(0, _salt, _bytecode));
|
|
392
|
+
emit InterchainAccountCreated(_origin, _owner, _ism, _account);
|
|
393
|
+
}
|
|
394
|
+
return OwnableMulticall(_account);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @notice Returns the local address of a remotely owned interchain account
|
|
399
|
+
* @dev This interchain account is not guaranteed to have been deployed
|
|
400
|
+
* @param _origin The remote origin domain of the interchain account
|
|
401
|
+
* @param _owner The remote owner of the interchain account
|
|
402
|
+
* @param _router The remote InterchainAccountRouter
|
|
403
|
+
* @param _ism The local address of the ISM
|
|
404
|
+
* @return The local address of the interchain account
|
|
405
|
+
*/
|
|
406
|
+
function getLocalInterchainAccount(
|
|
407
|
+
uint32 _origin,
|
|
408
|
+
bytes32 _owner,
|
|
409
|
+
bytes32 _router,
|
|
410
|
+
address _ism
|
|
411
|
+
) public view returns (OwnableMulticall) {
|
|
412
|
+
return
|
|
413
|
+
OwnableMulticall(
|
|
414
|
+
_getLocalInterchainAccount(
|
|
415
|
+
_getSalt(
|
|
416
|
+
_origin,
|
|
417
|
+
_owner,
|
|
418
|
+
_router,
|
|
419
|
+
TypeCasts.addressToBytes32(_ism)
|
|
420
|
+
)
|
|
421
|
+
)
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @notice Returns the remote address of a locally owned interchain account
|
|
427
|
+
* @dev This interchain account is not guaranteed to have been deployed
|
|
428
|
+
* @dev This function will only work if the destination domain is
|
|
429
|
+
* EVM compatible
|
|
430
|
+
* @param _owner The local owner of the interchain account
|
|
431
|
+
* @param _router The remote InterchainAccountRouter
|
|
432
|
+
* @param _ism The remote address of the ISM
|
|
433
|
+
* @return The remote address of the interchain account
|
|
434
|
+
*/
|
|
435
|
+
function getRemoteInterchainAccount(
|
|
436
|
+
address _owner,
|
|
437
|
+
address _router,
|
|
438
|
+
address _ism
|
|
439
|
+
) public view returns (address) {
|
|
440
|
+
require(_router != address(0), "no router specified for destination");
|
|
441
|
+
// Derives the address of the first contract deployed by _router using
|
|
442
|
+
// the CREATE opcode.
|
|
443
|
+
address _implementation = address(
|
|
444
|
+
uint160(
|
|
445
|
+
uint256(
|
|
446
|
+
keccak256(
|
|
447
|
+
abi.encodePacked(
|
|
448
|
+
bytes1(0xd6),
|
|
449
|
+
bytes1(0x94),
|
|
450
|
+
_router,
|
|
451
|
+
bytes1(0x01)
|
|
452
|
+
)
|
|
453
|
+
)
|
|
454
|
+
)
|
|
455
|
+
)
|
|
456
|
+
);
|
|
457
|
+
bytes memory _proxyBytecode = MinimalProxy.bytecode(_implementation);
|
|
458
|
+
bytes32 _bytecodeHash = keccak256(_proxyBytecode);
|
|
459
|
+
bytes32 _salt = _getSalt(
|
|
460
|
+
localDomain,
|
|
461
|
+
TypeCasts.addressToBytes32(_owner),
|
|
462
|
+
TypeCasts.addressToBytes32(address(this)),
|
|
463
|
+
TypeCasts.addressToBytes32(_ism)
|
|
464
|
+
);
|
|
465
|
+
return Create2.computeAddress(_salt, _bytecodeHash, _router);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// ============ Private Functions ============
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* @notice Registers the address of remote InterchainAccountRouter
|
|
472
|
+
* and ISM contracts to use as a default when making interchain calls
|
|
473
|
+
* @param _destination The remote domain
|
|
474
|
+
* @param _router The address of the remote InterchainAccountRouter
|
|
475
|
+
* @param _ism The address of the remote ISM
|
|
476
|
+
*/
|
|
477
|
+
function _enrollRemoteRouterAndIsm(
|
|
478
|
+
uint32 _destination,
|
|
479
|
+
bytes32 _router,
|
|
480
|
+
bytes32 _ism
|
|
481
|
+
) private {
|
|
482
|
+
require(_router != bytes32(0), "invalid router address");
|
|
483
|
+
require(
|
|
484
|
+
routers[_destination] == bytes32(0),
|
|
485
|
+
"router and ISM defaults are immutable once set"
|
|
184
486
|
);
|
|
185
|
-
|
|
487
|
+
_domains.push(_destination);
|
|
488
|
+
routers[_destination] = _router;
|
|
489
|
+
isms[_destination] = _ism;
|
|
490
|
+
emit RemoteRouterEnrolled(_destination, _router);
|
|
491
|
+
emit RemoteIsmEnrolled(_destination, _ism);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* @notice Dispatches an InterchainAccountMessage to the remote router
|
|
496
|
+
* @param _destination The remote domain
|
|
497
|
+
* @param _router The address of the remote InterchainAccountRouter
|
|
498
|
+
* @param _ism The address of the remote ISM
|
|
499
|
+
* @param _body The InterchainAccountMessage body
|
|
500
|
+
*/
|
|
501
|
+
function _dispatchMessage(
|
|
502
|
+
uint32 _destination,
|
|
503
|
+
bytes32 _router,
|
|
504
|
+
bytes32 _ism,
|
|
505
|
+
bytes memory _body
|
|
506
|
+
) private returns (bytes32) {
|
|
507
|
+
require(_router != bytes32(0), "no router specified for destination");
|
|
508
|
+
emit RemoteCallDispatched(_destination, msg.sender, _router, _ism);
|
|
509
|
+
return mailbox.dispatch(_destination, _router, _body);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* @notice Returns the salt used to deploy an interchain account
|
|
514
|
+
* @param _origin The remote origin domain of the interchain account
|
|
515
|
+
* @param _owner The remote owner of the interchain account
|
|
516
|
+
* @param _router The remote origin InterchainAccountRouter
|
|
517
|
+
* @param _ism The local address of the ISM
|
|
518
|
+
* @return The CREATE2 salt used for deploying the interchain account
|
|
519
|
+
*/
|
|
520
|
+
function _getSalt(
|
|
521
|
+
uint32 _origin,
|
|
522
|
+
bytes32 _owner,
|
|
523
|
+
bytes32 _router,
|
|
524
|
+
bytes32 _ism
|
|
525
|
+
) private pure returns (bytes32) {
|
|
526
|
+
return keccak256(abi.encodePacked(_origin, _owner, _router, _ism));
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @notice Returns the address of the interchain account on the local chain
|
|
531
|
+
* @param _salt The CREATE2 salt used for deploying the interchain account
|
|
532
|
+
* @return The address of the interchain account
|
|
533
|
+
*/
|
|
534
|
+
function _getLocalInterchainAccount(bytes32 _salt)
|
|
535
|
+
private
|
|
536
|
+
view
|
|
537
|
+
returns (address payable)
|
|
538
|
+
{
|
|
539
|
+
return payable(Create2.computeAddress(_salt, bytecodeHash));
|
|
186
540
|
}
|
|
187
541
|
}
|