@hyperlane-xyz/core 0.5.2 → 0.5.4-0
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/Call.sol +7 -0
- package/contracts/{AbacusConnectionClient.sol → HyperlaneConnectionClient.sol} +69 -56
- package/contracts/InterchainGasPaymaster.sol +9 -11
- package/contracts/Mailbox.sol +179 -44
- package/contracts/OwnableMulticall.sol +1 -5
- package/contracts/Router.sol +21 -45
- package/contracts/isms/MultisigIsm.sol +340 -0
- package/contracts/libs/Message.sol +107 -66
- package/contracts/libs/MultisigIsmMetadata.sol +187 -0
- package/contracts/middleware/InterchainAccountRouter.sol +9 -6
- package/contracts/middleware/InterchainQueryRouter.sol +15 -9
- package/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol +134 -0
- package/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol +246 -0
- package/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol +18 -0
- package/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient.sol +12 -0
- package/contracts/middleware/liquidity-layer/interfaces/circle/ICircleBridge.sol +59 -0
- package/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol +38 -0
- package/contracts/mock/MockCircleBridge.sol +38 -0
- package/contracts/mock/MockCircleMessageTransmitter.sol +43 -0
- package/contracts/mock/MockHyperlaneEnvironment.sol +60 -0
- package/contracts/mock/MockInterchainAccountRouter.sol +98 -0
- package/contracts/mock/MockMailbox.sol +79 -0
- package/contracts/mock/MockToken.sol +14 -0
- package/contracts/test/TestHyperlaneConnectionClient.sol +14 -0
- package/contracts/test/TestIsm.sol +20 -0
- package/contracts/test/TestLiquidityLayerMessageRecipient.sol +24 -0
- package/contracts/test/TestMailbox.sol +34 -4
- package/contracts/test/TestMerkle.sol +9 -4
- package/contracts/test/TestMessage.sol +24 -12
- package/contracts/test/TestMultisigIsm.sol +23 -0
- package/contracts/test/TestQuerySender.sol +72 -0
- package/contracts/test/TestSendReceiver.sol +6 -15
- package/contracts/test/TestTokenRecipient.sol +44 -0
- package/dist/@openzeppelin/contracts/index.d.ts +2 -0
- package/dist/@openzeppelin/contracts/index.d.ts.map +1 -1
- package/dist/@openzeppelin/contracts/token/ERC20/IERC20.d.ts +139 -0
- package/dist/@openzeppelin/contracts/token/ERC20/IERC20.d.ts.map +1 -0
- package/dist/{contracts/Outbox.js → @openzeppelin/contracts/token/ERC20/IERC20.js} +1 -1
- package/dist/@openzeppelin/contracts/token/ERC20/IERC20.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 -0
- package/dist/@openzeppelin/contracts/token/ERC20/index.js +3 -0
- package/dist/@openzeppelin/contracts/token/ERC20/index.js.map +1 -0
- package/dist/@openzeppelin/contracts/token/index.d.ts +3 -0
- package/dist/@openzeppelin/contracts/token/index.d.ts.map +1 -0
- package/dist/{interfaces/IOutbox.js → @openzeppelin/contracts/token/index.js} +1 -1
- package/dist/@openzeppelin/contracts/token/index.js.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/index.d.ts +2 -0
- package/dist/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -1
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.d.ts +204 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.d.ts.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.js +4 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.js.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.d.ts +139 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.d.ts.map +1 -0
- package/dist/{contracts/MerkleTreeManager.js → @openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.js} +1 -1
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.js.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.d.ts +163 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.d.ts.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.js +4 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.js.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.d.ts +2 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.d.ts.map +1 -0
- package/dist/{contracts/validator-manager → @openzeppelin/contracts-upgradeable/token/ERC20/extensions}/index.js +0 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.js.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/index.d.ts +5 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/index.d.ts.map +1 -0
- package/dist/{contracts/Inbox.js → @openzeppelin/contracts-upgradeable/token/ERC20/index.js} +1 -1
- package/dist/@openzeppelin/contracts-upgradeable/token/ERC20/index.js.map +1 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/index.d.ts +3 -0
- package/dist/@openzeppelin/contracts-upgradeable/token/index.d.ts.map +1 -0
- package/dist/{interfaces/IInbox.js → @openzeppelin/contracts-upgradeable/token/index.js} +1 -1
- package/dist/@openzeppelin/contracts-upgradeable/token/index.js.map +1 -0
- package/dist/contracts/{AbacusConnectionClient.d.ts → HyperlaneConnectionClient.d.ts} +69 -36
- package/dist/contracts/HyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/contracts/HyperlaneConnectionClient.js +4 -0
- package/dist/contracts/HyperlaneConnectionClient.js.map +1 -0
- package/dist/contracts/InterchainGasPaymaster.d.ts +11 -13
- package/dist/contracts/InterchainGasPaymaster.d.ts.map +1 -1
- package/dist/contracts/Mailbox.d.ts +151 -28
- package/dist/contracts/Mailbox.d.ts.map +1 -1
- package/dist/contracts/OwnableSpecifiesISM.d.ts +134 -0
- package/dist/contracts/OwnableSpecifiesISM.d.ts.map +1 -0
- package/dist/contracts/OwnableSpecifiesISM.js +4 -0
- package/dist/contracts/OwnableSpecifiesISM.js.map +1 -0
- package/dist/contracts/Router.d.ts +65 -32
- package/dist/contracts/Router.d.ts.map +1 -1
- package/dist/contracts/index.d.ts +3 -7
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/isms/MultisigIsm.d.ts +235 -0
- package/dist/contracts/isms/MultisigIsm.d.ts.map +1 -0
- package/dist/contracts/{mock/MockOutbox.js → isms/MultisigIsm.js} +1 -1
- package/dist/contracts/isms/MultisigIsm.js.map +1 -0
- package/dist/contracts/isms/index.d.ts +2 -0
- package/dist/contracts/isms/index.d.ts.map +1 -0
- package/dist/contracts/isms/index.js +3 -0
- package/dist/contracts/isms/index.js.map +1 -0
- package/dist/contracts/middleware/InterchainAccountRouter.d.ts +71 -38
- package/dist/contracts/middleware/InterchainAccountRouter.d.ts.map +1 -1
- package/dist/contracts/middleware/InterchainQueryRouter.d.ts +72 -39
- package/dist/contracts/middleware/InterchainQueryRouter.d.ts.map +1 -1
- package/dist/contracts/middleware/index.d.ts +2 -0
- package/dist/contracts/middleware/index.d.ts.map +1 -1
- package/dist/contracts/middleware/index.js +1 -0
- package/dist/contracts/middleware/index.js.map +1 -1
- package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.d.ts +324 -0
- package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/LiquidityLayerRouter.js.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.d.ts +449 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.js.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/index.d.ts +2 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/index.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/index.js +3 -0
- package/dist/contracts/middleware/liquidity-layer/adapters/index.js.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/index.d.ts +6 -0
- package/dist/contracts/middleware/liquidity-layer/index.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/index.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/index.js.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.d.ts +67 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.d.ts.map +1 -0
- package/dist/contracts/{AbacusConnectionClient.js → middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.js} +1 -1
- package/dist/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.js.map +1 -0
- package/dist/contracts/{test/TestValidatorManager.d.ts → middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient.d.ts} +14 -21
- package/dist/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient.js.map +1 -0
- 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/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.d.ts +59 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.js.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/index.d.ts +3 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/index.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/index.js +3 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/circle/index.js.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/index.d.ts +5 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/index.d.ts.map +1 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/index.js +4 -0
- package/dist/contracts/middleware/liquidity-layer/interfaces/index.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/MockCircleMessageTransmitter.d.ts +77 -0
- package/dist/contracts/mock/MockCircleMessageTransmitter.d.ts.map +1 -0
- package/dist/contracts/mock/MockCircleMessageTransmitter.js +4 -0
- package/dist/contracts/mock/MockCircleMessageTransmitter.js.map +1 -0
- package/dist/contracts/mock/{MockInbox.d.ts → MockHyperlaneEnvironment.d.ts} +33 -17
- package/dist/contracts/mock/MockHyperlaneEnvironment.d.ts.map +1 -0
- package/dist/contracts/{AbacusConnectionManager.js → mock/MockHyperlaneEnvironment.js} +1 -1
- package/dist/contracts/mock/MockHyperlaneEnvironment.js.map +1 -0
- package/dist/contracts/mock/MockInterchainAccountRouter.d.ts +124 -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/mock/MockMailbox.d.ts +185 -0
- package/dist/contracts/mock/MockMailbox.d.ts.map +1 -0
- package/dist/contracts/mock/MockMailbox.js +4 -0
- package/dist/contracts/mock/MockMailbox.js.map +1 -0
- package/dist/contracts/mock/MockToken.d.ts +236 -0
- package/dist/contracts/mock/MockToken.d.ts.map +1 -0
- package/dist/contracts/mock/{MockInbox.js → MockToken.js} +1 -1
- package/dist/contracts/mock/MockToken.js.map +1 -0
- package/dist/contracts/mock/index.d.ts +6 -2
- package/dist/contracts/mock/index.d.ts.map +1 -1
- package/dist/contracts/test/{TestAbacusConnectionClient.d.ts → TestHyperlaneConnectionClient.d.ts} +69 -52
- package/dist/contracts/test/TestHyperlaneConnectionClient.d.ts.map +1 -0
- package/dist/contracts/test/TestHyperlaneConnectionClient.js +4 -0
- package/dist/contracts/test/TestHyperlaneConnectionClient.js.map +1 -0
- package/dist/contracts/test/TestIsm.d.ts +67 -0
- package/dist/contracts/test/TestIsm.d.ts.map +1 -0
- package/dist/contracts/test/TestIsm.js +4 -0
- package/dist/contracts/test/TestIsm.js.map +1 -0
- package/dist/contracts/test/TestLiquidityLayerMessageRecipient.d.ts +72 -0
- package/dist/contracts/test/TestLiquidityLayerMessageRecipient.d.ts.map +1 -0
- package/dist/contracts/test/TestLiquidityLayerMessageRecipient.js +4 -0
- package/dist/contracts/test/TestLiquidityLayerMessageRecipient.js.map +1 -0
- package/dist/contracts/test/TestMailbox.d.ts +164 -33
- package/dist/contracts/test/TestMailbox.d.ts.map +1 -1
- package/dist/contracts/test/TestMessage.d.ts +30 -10
- package/dist/contracts/test/TestMessage.d.ts.map +1 -1
- package/dist/contracts/test/TestMultisigIsm.d.ts +251 -0
- package/dist/contracts/test/TestMultisigIsm.d.ts.map +1 -0
- package/dist/contracts/test/TestMultisigIsm.js +4 -0
- package/dist/contracts/test/TestMultisigIsm.js.map +1 -0
- package/dist/contracts/test/TestQuerySender.d.ts +215 -0
- package/dist/contracts/test/TestQuerySender.d.ts.map +1 -0
- package/dist/contracts/test/TestQuerySender.js +4 -0
- package/dist/contracts/test/TestQuerySender.js.map +1 -0
- package/dist/contracts/test/TestRouter.d.ts +65 -32
- package/dist/contracts/test/TestRouter.d.ts.map +1 -1
- package/dist/contracts/test/TestTokenRecipient.d.ts +151 -0
- package/dist/contracts/test/TestTokenRecipient.d.ts.map +1 -0
- package/dist/contracts/test/TestTokenRecipient.js +4 -0
- package/dist/contracts/test/TestTokenRecipient.js.map +1 -0
- package/dist/contracts/test/index.d.ts +6 -5
- package/dist/contracts/test/index.d.ts.map +1 -1
- package/dist/factories/@openzeppelin/contracts/index.d.ts +1 -0
- package/dist/factories/@openzeppelin/contracts/index.d.ts.map +1 -1
- package/dist/factories/@openzeppelin/contracts/index.js +2 -1
- package/dist/factories/@openzeppelin/contracts/index.js.map +1 -1
- package/dist/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.d.ts +36 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.js +201 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.d.ts +2 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.js +9 -0
- package/dist/factories/@openzeppelin/contracts/token/ERC20/index.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/index.d.ts +2 -0
- package/dist/factories/@openzeppelin/contracts/token/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts/token/index.js +31 -0
- package/dist/factories/@openzeppelin/contracts/token/index.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/index.d.ts +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/index.d.ts.map +1 -1
- package/dist/factories/@openzeppelin/contracts-upgradeable/index.js +2 -1
- package/dist/factories/@openzeppelin/contracts-upgradeable/index.js.map +1 -1
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable__factory.d.ts +48 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable__factory.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable__factory.js +324 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable__factory.js.map +1 -0
- package/dist/factories/{contracts/validator-manager/MultisigValidatorManager__factory.d.ts → @openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable__factory.d.ts} +5 -5
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable__factory.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable__factory.js +201 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable__factory.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable__factory.d.ts +36 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable__factory.d.ts.map +1 -0
- package/dist/factories/{contracts/validator-manager/MultisigValidatorManager__factory.js → @openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable__factory.js} +76 -122
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable__factory.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.d.ts +2 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.js +9 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/index.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/index.d.ts +4 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/index.js +35 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/ERC20/index.js.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/index.d.ts +2 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/index.d.ts.map +1 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/index.js +31 -0
- package/dist/factories/@openzeppelin/contracts-upgradeable/token/index.js.map +1 -0
- package/dist/factories/contracts/{AbacusConnectionClient__factory.d.ts → HyperlaneConnectionClient__factory.d.ts} +5 -5
- package/dist/factories/contracts/HyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/{AbacusConnectionClient__factory.js → HyperlaneConnectionClient__factory.js} +61 -22
- package/dist/factories/contracts/HyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/factories/contracts/InterchainGasPaymaster__factory.d.ts +1 -1
- package/dist/factories/contracts/InterchainGasPaymaster__factory.d.ts.map +1 -1
- package/dist/factories/contracts/InterchainGasPaymaster__factory.js +7 -18
- package/dist/factories/contracts/InterchainGasPaymaster__factory.js.map +1 -1
- package/dist/factories/contracts/Mailbox__factory.d.ts +29 -13
- package/dist/factories/contracts/Mailbox__factory.d.ts.map +1 -1
- package/dist/factories/contracts/Mailbox__factory.js +239 -11
- package/dist/factories/contracts/Mailbox__factory.js.map +1 -1
- package/dist/factories/contracts/OwnableMulticall__factory.d.ts +1 -1
- package/dist/factories/contracts/OwnableMulticall__factory.js +1 -1
- package/dist/factories/contracts/OwnableSpecifiesISM__factory.d.ts +55 -0
- package/dist/factories/contracts/OwnableSpecifiesISM__factory.d.ts.map +1 -0
- package/dist/factories/contracts/OwnableSpecifiesISM__factory.js +145 -0
- package/dist/factories/contracts/OwnableSpecifiesISM__factory.js.map +1 -0
- package/dist/factories/contracts/Router__factory.d.ts.map +1 -1
- package/dist/factories/contracts/Router__factory.js +65 -26
- package/dist/factories/contracts/Router__factory.js.map +1 -1
- package/dist/factories/contracts/index.d.ts +2 -6
- package/dist/factories/contracts/index.d.ts.map +1 -1
- package/dist/factories/contracts/index.js +4 -12
- package/dist/factories/contracts/index.js.map +1 -1
- package/dist/factories/contracts/isms/MultisigIsm__factory.d.ts +55 -0
- package/dist/factories/contracts/isms/MultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/isms/MultisigIsm__factory.js +363 -0
- package/dist/factories/contracts/isms/MultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/isms/index.d.ts +2 -0
- package/dist/factories/contracts/isms/index.d.ts.map +1 -0
- package/dist/factories/contracts/isms/index.js +9 -0
- package/dist/factories/contracts/isms/index.js.map +1 -0
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts +1 -12
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js +78 -33
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts +1 -12
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js +81 -30
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js.map +1 -1
- package/dist/factories/contracts/middleware/index.d.ts +1 -0
- package/dist/factories/contracts/middleware/index.d.ts.map +1 -1
- package/dist/factories/contracts/middleware/index.js +25 -1
- package/dist/factories/contracts/middleware/index.js.map +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts +48 -0
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js +419 -0
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts +48 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js +623 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/index.d.ts +2 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/index.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/index.js +9 -0
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/index.js.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/index.d.ts +4 -0
- package/dist/factories/contracts/middleware/liquidity-layer/index.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/index.js +34 -0
- package/dist/factories/contracts/middleware/liquidity-layer/index.js.map +1 -0
- package/dist/factories/{interfaces/IAbacusConnectionManager__factory.d.ts → contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter__factory.d.ts} +5 -5
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter__factory.js +91 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter__factory.js.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient__factory.d.ts +19 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient__factory.js +51 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerMessageRecipient__factory.js.map +1 -0
- 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/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter__factory.d.ts +23 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter__factory.js +61 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter__factory.js.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/index.d.ts +3 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/index.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/index.js +11 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/circle/index.js.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/index.d.ts +4 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/index.d.ts.map +1 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/index.js +35 -0
- package/dist/factories/contracts/middleware/liquidity-layer/interfaces/index.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/MockCircleMessageTransmitter__factory.d.ts +45 -0
- package/dist/factories/contracts/mock/MockCircleMessageTransmitter__factory.d.ts.map +1 -0
- package/dist/factories/contracts/mock/MockCircleMessageTransmitter__factory.js +142 -0
- package/dist/factories/contracts/mock/MockCircleMessageTransmitter__factory.js.map +1 -0
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts +45 -0
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts.map +1 -0
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js +109 -0
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js.map +1 -0
- 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 +181 -0
- package/dist/factories/contracts/mock/MockInterchainAccountRouter__factory.js.map +1 -0
- package/dist/factories/contracts/mock/MockMailbox__factory.d.ts +45 -0
- package/dist/factories/contracts/mock/MockMailbox__factory.d.ts.map +1 -0
- package/dist/factories/contracts/mock/MockMailbox__factory.js +252 -0
- package/dist/factories/contracts/mock/MockMailbox__factory.js.map +1 -0
- package/dist/factories/contracts/mock/MockToken__factory.d.ts +48 -0
- package/dist/factories/contracts/mock/{MockInbox__factory.d.ts.map → MockToken__factory.d.ts.map} +1 -1
- package/dist/factories/contracts/mock/MockToken__factory.js +355 -0
- package/dist/factories/contracts/mock/MockToken__factory.js.map +1 -0
- package/dist/factories/contracts/mock/index.d.ts +6 -2
- package/dist/factories/contracts/mock/index.d.ts.map +1 -1
- package/dist/factories/contracts/mock/index.js +13 -5
- package/dist/factories/contracts/mock/index.js.map +1 -1
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts +55 -0
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js +249 -0
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js.map +1 -0
- package/dist/factories/contracts/test/TestIsm__factory.d.ts +35 -0
- package/dist/factories/contracts/test/TestIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestIsm__factory.js +91 -0
- package/dist/factories/contracts/test/TestIsm__factory.js.map +1 -0
- package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.d.ts +44 -0
- package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.js +111 -0
- package/dist/factories/contracts/test/TestLiquidityLayerMessageRecipient__factory.js.map +1 -0
- package/dist/factories/contracts/test/TestMailbox__factory.d.ts +1 -8
- package/dist/factories/contracts/test/TestMailbox__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestMailbox__factory.js +235 -13
- package/dist/factories/contracts/test/TestMailbox__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestMerkle__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMerkle__factory.js +1 -1
- package/dist/factories/contracts/test/TestMessage__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMessage__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestMessage__factory.js +40 -7
- package/dist/factories/contracts/test/TestMessage__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts +48 -0
- package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestMultisigIsm__factory.js +406 -0
- package/dist/factories/contracts/test/TestMultisigIsm__factory.js.map +1 -0
- package/dist/factories/contracts/test/TestQuerySender__factory.d.ts +55 -0
- package/dist/factories/contracts/test/TestQuerySender__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestQuerySender__factory.js +253 -0
- package/dist/factories/contracts/test/TestQuerySender__factory.js.map +1 -0
- package/dist/factories/contracts/test/TestQuery__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestQuery__factory.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestQuery__factory.js +1 -1
- package/dist/factories/contracts/test/TestQuery__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 +70 -31
- 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.d.ts.map +1 -1
- package/dist/factories/contracts/test/TestSendReceiver__factory.js +2 -2
- package/dist/factories/contracts/test/TestSendReceiver__factory.js.map +1 -1
- package/dist/factories/contracts/test/TestTokenRecipient__factory.d.ts +55 -0
- package/dist/factories/contracts/test/TestTokenRecipient__factory.d.ts.map +1 -0
- package/dist/factories/contracts/test/TestTokenRecipient__factory.js +232 -0
- package/dist/factories/contracts/test/TestTokenRecipient__factory.js.map +1 -0
- package/dist/factories/contracts/test/index.d.ts +6 -5
- package/dist/factories/contracts/test/index.d.ts.map +1 -1
- package/dist/factories/contracts/test/index.js +13 -11
- package/dist/factories/contracts/test/index.js.map +1 -1
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.d.ts +33 -0
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.js +78 -0
- package/dist/factories/interfaces/IInterchainAccountRouter__factory.js.map +1 -0
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.d.ts.map +1 -1
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.js +3 -8
- package/dist/factories/interfaces/IInterchainGasPaymaster__factory.js.map +1 -1
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.d.ts +33 -0
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.js +100 -0
- package/dist/factories/interfaces/IInterchainQueryRouter__factory.js.map +1 -0
- package/dist/factories/interfaces/{IInbox__factory.d.ts → IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts} +10 -16
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js +42 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule__factory.js.map +1 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts +19 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js +31 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule__factory.js.map +1 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/index.js +11 -0
- package/dist/factories/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
- package/dist/factories/interfaces/IMailbox__factory.d.ts +5 -1
- package/dist/factories/interfaces/IMailbox__factory.d.ts.map +1 -1
- package/dist/factories/interfaces/IMailbox__factory.js +81 -3
- package/dist/factories/interfaces/IMailbox__factory.js.map +1 -1
- package/dist/factories/interfaces/{IOutbox__factory.d.ts → IMultisigIsm__factory.d.ts} +5 -5
- package/dist/factories/interfaces/IMultisigIsm__factory.d.ts.map +1 -0
- package/dist/factories/interfaces/{IInbox__factory.js → IMultisigIsm__factory.js} +55 -41
- package/dist/factories/interfaces/IMultisigIsm__factory.js.map +1 -0
- package/dist/factories/interfaces/index.d.ts +4 -4
- package/dist/factories/interfaces/index.d.ts.map +1 -1
- package/dist/factories/interfaces/index.js +31 -9
- package/dist/factories/interfaces/index.js.map +1 -1
- package/dist/index.d.ts +58 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -40
- package/dist/index.js.map +1 -1
- package/dist/interfaces/IInterchainAccountRouter.d.ts +67 -0
- package/dist/interfaces/IInterchainAccountRouter.d.ts.map +1 -0
- package/dist/interfaces/IInterchainAccountRouter.js +4 -0
- package/dist/interfaces/IInterchainAccountRouter.js.map +1 -0
- package/dist/interfaces/IInterchainGasPaymaster.d.ts +7 -7
- package/dist/interfaces/IInterchainGasPaymaster.d.ts.map +1 -1
- package/dist/interfaces/IInterchainQueryRouter.d.ts +75 -0
- package/dist/interfaces/IInterchainQueryRouter.d.ts.map +1 -0
- package/dist/interfaces/IInterchainQueryRouter.js +4 -0
- package/dist/interfaces/IInterchainQueryRouter.js.map +1 -0
- package/dist/{contracts/mock/MockOutbox.d.ts → interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts} +14 -14
- package/dist/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.d.ts.map +1 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js +4 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/IInterchainSecurityModule.js.map +1 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts +43 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.d.ts.map +1 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js +4 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/ISpecifiesInterchainSecurityModule.js.map +1 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/index.d.ts +3 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/index.d.ts.map +1 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/index.js +3 -0
- package/dist/interfaces/IInterchainSecurityModule.sol/index.js.map +1 -0
- package/dist/interfaces/IMailbox.d.ts +58 -10
- package/dist/interfaces/IMailbox.d.ts.map +1 -1
- package/dist/interfaces/IMultisigIsm.d.ts +75 -0
- package/dist/interfaces/IMultisigIsm.d.ts.map +1 -0
- package/dist/interfaces/IMultisigIsm.js +4 -0
- package/dist/interfaces/IMultisigIsm.js.map +1 -0
- package/dist/interfaces/index.d.ts +5 -4
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/interfaces/IInterchainAccountRouter.sol +15 -0
- package/interfaces/IInterchainGasPaymaster.sol +3 -5
- package/interfaces/IInterchainQueryRouter.sol +18 -0
- package/interfaces/IInterchainSecurityModule.sol +16 -0
- package/interfaces/IMailbox.sol +15 -2
- package/interfaces/IMultisigIsm.sol +18 -0
- package/package.json +4 -3
- package/contracts/AbacusConnectionManager.sol +0 -145
- package/contracts/Inbox.sol +0 -148
- package/contracts/MerkleTreeManager.sol +0 -32
- package/contracts/Outbox.sol +0 -191
- package/contracts/mock/MockInbox.sol +0 -52
- package/contracts/mock/MockOutbox.sol +0 -30
- package/contracts/test/TestAbacusConnectionClient.sol +0 -23
- package/contracts/test/TestInbox.sol +0 -54
- package/contracts/test/TestMultisigValidatorManager.sol +0 -26
- package/contracts/test/TestOutbox.sol +0 -46
- package/contracts/test/TestValidatorManager.sol +0 -21
- package/contracts/validator-manager/InboxValidatorManager.sol +0 -58
- package/contracts/validator-manager/MultisigValidatorManager.sol +0 -271
- package/contracts/validator-manager/OutboxValidatorManager.sol +0 -244
- package/dist/contracts/AbacusConnectionClient.d.ts.map +0 -1
- package/dist/contracts/AbacusConnectionClient.js.map +0 -1
- package/dist/contracts/AbacusConnectionManager.d.ts +0 -213
- package/dist/contracts/AbacusConnectionManager.d.ts.map +0 -1
- package/dist/contracts/AbacusConnectionManager.js.map +0 -1
- package/dist/contracts/Inbox.d.ts +0 -207
- package/dist/contracts/Inbox.d.ts.map +0 -1
- package/dist/contracts/Inbox.js.map +0 -1
- package/dist/contracts/MerkleTreeManager.d.ts +0 -53
- package/dist/contracts/MerkleTreeManager.d.ts.map +0 -1
- package/dist/contracts/MerkleTreeManager.js.map +0 -1
- package/dist/contracts/Outbox.d.ts +0 -331
- package/dist/contracts/Outbox.d.ts.map +0 -1
- package/dist/contracts/Outbox.js.map +0 -1
- package/dist/contracts/mock/MockInbox.d.ts.map +0 -1
- package/dist/contracts/mock/MockInbox.js.map +0 -1
- package/dist/contracts/mock/MockOutbox.d.ts.map +0 -1
- package/dist/contracts/mock/MockOutbox.js.map +0 -1
- package/dist/contracts/test/TestAbacusConnectionClient.d.ts.map +0 -1
- package/dist/contracts/test/TestAbacusConnectionClient.js +0 -4
- package/dist/contracts/test/TestAbacusConnectionClient.js.map +0 -1
- package/dist/contracts/test/TestInbox.d.ts +0 -263
- package/dist/contracts/test/TestInbox.d.ts.map +0 -1
- package/dist/contracts/test/TestInbox.js +0 -4
- package/dist/contracts/test/TestInbox.js.map +0 -1
- package/dist/contracts/test/TestMultisigValidatorManager.d.ts +0 -247
- package/dist/contracts/test/TestMultisigValidatorManager.d.ts.map +0 -1
- package/dist/contracts/test/TestMultisigValidatorManager.js +0 -4
- package/dist/contracts/test/TestMultisigValidatorManager.js.map +0 -1
- package/dist/contracts/test/TestOutbox.d.ts +0 -371
- package/dist/contracts/test/TestOutbox.d.ts.map +0 -1
- package/dist/contracts/test/TestOutbox.js +0 -4
- package/dist/contracts/test/TestOutbox.js.map +0 -1
- package/dist/contracts/test/TestValidatorManager.d.ts.map +0 -1
- package/dist/contracts/test/TestValidatorManager.js +0 -4
- package/dist/contracts/test/TestValidatorManager.js.map +0 -1
- package/dist/contracts/validator-manager/InboxValidatorManager.d.ts +0 -263
- package/dist/contracts/validator-manager/InboxValidatorManager.d.ts.map +0 -1
- package/dist/contracts/validator-manager/InboxValidatorManager.js +0 -4
- package/dist/contracts/validator-manager/InboxValidatorManager.js.map +0 -1
- package/dist/contracts/validator-manager/MultisigValidatorManager.d.ts +0 -239
- package/dist/contracts/validator-manager/MultisigValidatorManager.d.ts.map +0 -1
- package/dist/contracts/validator-manager/MultisigValidatorManager.js +0 -4
- package/dist/contracts/validator-manager/MultisigValidatorManager.js.map +0 -1
- package/dist/contracts/validator-manager/OutboxValidatorManager.d.ts +0 -335
- package/dist/contracts/validator-manager/OutboxValidatorManager.d.ts.map +0 -1
- package/dist/contracts/validator-manager/OutboxValidatorManager.js +0 -4
- package/dist/contracts/validator-manager/OutboxValidatorManager.js.map +0 -1
- package/dist/contracts/validator-manager/index.d.ts +0 -4
- package/dist/contracts/validator-manager/index.d.ts.map +0 -1
- package/dist/contracts/validator-manager/index.js.map +0 -1
- package/dist/factories/contracts/AbacusConnectionClient__factory.d.ts.map +0 -1
- package/dist/factories/contracts/AbacusConnectionClient__factory.js.map +0 -1
- package/dist/factories/contracts/AbacusConnectionManager__factory.d.ts +0 -55
- package/dist/factories/contracts/AbacusConnectionManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/AbacusConnectionManager__factory.js +0 -276
- package/dist/factories/contracts/AbacusConnectionManager__factory.js.map +0 -1
- package/dist/factories/contracts/Inbox__factory.d.ts +0 -59
- package/dist/factories/contracts/Inbox__factory.d.ts.map +0 -1
- package/dist/factories/contracts/Inbox__factory.js +0 -278
- package/dist/factories/contracts/Inbox__factory.js.map +0 -1
- package/dist/factories/contracts/MerkleTreeManager__factory.d.ts +0 -31
- package/dist/factories/contracts/MerkleTreeManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/MerkleTreeManager__factory.js +0 -67
- package/dist/factories/contracts/MerkleTreeManager__factory.js.map +0 -1
- package/dist/factories/contracts/Outbox__factory.d.ts +0 -59
- package/dist/factories/contracts/Outbox__factory.d.ts.map +0 -1
- package/dist/factories/contracts/Outbox__factory.js +0 -415
- package/dist/factories/contracts/Outbox__factory.js.map +0 -1
- package/dist/factories/contracts/mock/MockInbox__factory.d.ts +0 -31
- package/dist/factories/contracts/mock/MockInbox__factory.js +0 -76
- package/dist/factories/contracts/mock/MockInbox__factory.js.map +0 -1
- package/dist/factories/contracts/mock/MockOutbox__factory.d.ts +0 -45
- package/dist/factories/contracts/mock/MockOutbox__factory.d.ts.map +0 -1
- package/dist/factories/contracts/mock/MockOutbox__factory.js +0 -86
- package/dist/factories/contracts/mock/MockOutbox__factory.js.map +0 -1
- package/dist/factories/contracts/test/TestAbacusConnectionClient__factory.d.ts +0 -48
- package/dist/factories/contracts/test/TestAbacusConnectionClient__factory.d.ts.map +0 -1
- package/dist/factories/contracts/test/TestAbacusConnectionClient__factory.js +0 -242
- package/dist/factories/contracts/test/TestAbacusConnectionClient__factory.js.map +0 -1
- package/dist/factories/contracts/test/TestInbox__factory.d.ts +0 -59
- package/dist/factories/contracts/test/TestInbox__factory.d.ts.map +0 -1
- package/dist/factories/contracts/test/TestInbox__factory.js +0 -371
- package/dist/factories/contracts/test/TestInbox__factory.js.map +0 -1
- package/dist/factories/contracts/test/TestMultisigValidatorManager__factory.d.ts +0 -59
- package/dist/factories/contracts/test/TestMultisigValidatorManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/test/TestMultisigValidatorManager__factory.js +0 -349
- package/dist/factories/contracts/test/TestMultisigValidatorManager__factory.js.map +0 -1
- package/dist/factories/contracts/test/TestOutbox__factory.d.ts +0 -59
- package/dist/factories/contracts/test/TestOutbox__factory.d.ts.map +0 -1
- package/dist/factories/contracts/test/TestOutbox__factory.js +0 -483
- package/dist/factories/contracts/test/TestOutbox__factory.js.map +0 -1
- package/dist/factories/contracts/test/TestValidatorManager__factory.d.ts +0 -31
- package/dist/factories/contracts/test/TestValidatorManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/test/TestValidatorManager__factory.js +0 -79
- package/dist/factories/contracts/test/TestValidatorManager__factory.js.map +0 -1
- package/dist/factories/contracts/validator-manager/InboxValidatorManager__factory.d.ts +0 -59
- package/dist/factories/contracts/validator-manager/InboxValidatorManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/validator-manager/InboxValidatorManager__factory.js +0 -373
- package/dist/factories/contracts/validator-manager/InboxValidatorManager__factory.js.map +0 -1
- package/dist/factories/contracts/validator-manager/MultisigValidatorManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/validator-manager/MultisigValidatorManager__factory.js.map +0 -1
- package/dist/factories/contracts/validator-manager/OutboxValidatorManager__factory.d.ts +0 -59
- package/dist/factories/contracts/validator-manager/OutboxValidatorManager__factory.d.ts.map +0 -1
- package/dist/factories/contracts/validator-manager/OutboxValidatorManager__factory.js +0 -560
- package/dist/factories/contracts/validator-manager/OutboxValidatorManager__factory.js.map +0 -1
- package/dist/factories/contracts/validator-manager/index.d.ts +0 -4
- package/dist/factories/contracts/validator-manager/index.d.ts.map +0 -1
- package/dist/factories/contracts/validator-manager/index.js +0 -13
- package/dist/factories/contracts/validator-manager/index.js.map +0 -1
- package/dist/factories/interfaces/IAbacusConnectionManager__factory.d.ts.map +0 -1
- package/dist/factories/interfaces/IAbacusConnectionManager__factory.js +0 -63
- package/dist/factories/interfaces/IAbacusConnectionManager__factory.js.map +0 -1
- package/dist/factories/interfaces/IInbox__factory.d.ts.map +0 -1
- package/dist/factories/interfaces/IInbox__factory.js.map +0 -1
- package/dist/factories/interfaces/IMultisigValidatorManager__factory.d.ts +0 -19
- package/dist/factories/interfaces/IMultisigValidatorManager__factory.d.ts.map +0 -1
- package/dist/factories/interfaces/IMultisigValidatorManager__factory.js +0 -57
- package/dist/factories/interfaces/IMultisigValidatorManager__factory.js.map +0 -1
- package/dist/factories/interfaces/IOutbox__factory.d.ts.map +0 -1
- package/dist/factories/interfaces/IOutbox__factory.js +0 -155
- package/dist/factories/interfaces/IOutbox__factory.js.map +0 -1
- package/dist/interfaces/IAbacusConnectionManager.d.ts +0 -59
- package/dist/interfaces/IAbacusConnectionManager.d.ts.map +0 -1
- package/dist/interfaces/IAbacusConnectionManager.js +0 -4
- package/dist/interfaces/IAbacusConnectionManager.js.map +0 -1
- package/dist/interfaces/IInbox.d.ts +0 -83
- package/dist/interfaces/IInbox.d.ts.map +0 -1
- package/dist/interfaces/IInbox.js.map +0 -1
- package/dist/interfaces/IMultisigValidatorManager.d.ts +0 -59
- package/dist/interfaces/IMultisigValidatorManager.d.ts.map +0 -1
- package/dist/interfaces/IMultisigValidatorManager.js +0 -4
- package/dist/interfaces/IMultisigValidatorManager.js.map +0 -1
- package/dist/interfaces/IOutbox.d.ts +0 -148
- package/dist/interfaces/IOutbox.d.ts.map +0 -1
- package/dist/interfaces/IOutbox.js.map +0 -1
- package/interfaces/IAbacusConnectionManager.sol +0 -12
- package/interfaces/IInbox.sol +0 -16
- package/interfaces/IMultisigValidatorManager.sol +0 -11
- package/interfaces/IOutbox.sol +0 -27
|
@@ -3,30 +3,35 @@ pragma solidity >=0.6.11;
|
|
|
3
3
|
|
|
4
4
|
// ============ Internal Imports ============
|
|
5
5
|
import {IInterchainGasPaymaster} from "../interfaces/IInterchainGasPaymaster.sol";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import {ISpecifiesInterchainSecurityModule, IInterchainSecurityModule} from "../interfaces/IInterchainSecurityModule.sol";
|
|
7
|
+
import {IMailbox} from "../interfaces/IMailbox.sol";
|
|
8
8
|
|
|
9
9
|
// ============ External Imports ============
|
|
10
10
|
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
|
|
11
|
+
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
|
|
11
12
|
|
|
12
|
-
abstract contract
|
|
13
|
+
abstract contract HyperlaneConnectionClient is
|
|
14
|
+
OwnableUpgradeable,
|
|
15
|
+
ISpecifiesInterchainSecurityModule
|
|
16
|
+
{
|
|
13
17
|
// ============ Mutable Storage ============
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
IMailbox public mailbox;
|
|
16
20
|
// Interchain Gas Paymaster contract. The relayer associated with this contract
|
|
17
21
|
// must be willing to relay messages dispatched from the current Outbox contract,
|
|
18
22
|
// otherwise payments made to the paymaster will not result in relayed messages.
|
|
19
23
|
IInterchainGasPaymaster public interchainGasPaymaster;
|
|
20
24
|
|
|
25
|
+
IInterchainSecurityModule public interchainSecurityModule;
|
|
26
|
+
|
|
21
27
|
uint256[48] private __GAP; // gap for upgrade safety
|
|
22
28
|
|
|
23
29
|
// ============ Events ============
|
|
24
|
-
|
|
25
30
|
/**
|
|
26
|
-
* @notice Emitted when a new
|
|
27
|
-
* @param
|
|
31
|
+
* @notice Emitted when a new mailbox is set.
|
|
32
|
+
* @param mailbox The address of the mailbox contract
|
|
28
33
|
*/
|
|
29
|
-
event
|
|
34
|
+
event MailboxSet(address indexed mailbox);
|
|
30
35
|
|
|
31
36
|
/**
|
|
32
37
|
* @notice Emitted when a new Interchain Gas Paymaster is set.
|
|
@@ -34,45 +39,64 @@ abstract contract AbacusConnectionClient is OwnableUpgradeable {
|
|
|
34
39
|
*/
|
|
35
40
|
event InterchainGasPaymasterSet(address indexed interchainGasPaymaster);
|
|
36
41
|
|
|
42
|
+
event InterchainSecurityModuleSet(address indexed module);
|
|
43
|
+
|
|
37
44
|
// ============ Modifiers ============
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
|
-
* @notice Only accept messages from an
|
|
47
|
+
* @notice Only accept messages from an Hyperlane Mailbox contract
|
|
41
48
|
*/
|
|
42
|
-
modifier
|
|
43
|
-
require(
|
|
49
|
+
modifier onlyMailbox() {
|
|
50
|
+
require(msg.sender == address(mailbox), "!mailbox");
|
|
51
|
+
_;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @notice Only accept addresses that at least have contract code
|
|
56
|
+
*/
|
|
57
|
+
modifier onlyContract(address _contract) {
|
|
58
|
+
require(Address.isContract(_contract), "!contract");
|
|
44
59
|
_;
|
|
45
60
|
}
|
|
46
61
|
|
|
47
62
|
// ======== Initializer =========
|
|
48
63
|
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
64
|
+
function __HyperlaneConnectionClient_initialize(address _mailbox)
|
|
65
|
+
internal
|
|
66
|
+
onlyInitializing
|
|
67
|
+
{
|
|
68
|
+
_setMailbox(_mailbox);
|
|
53
69
|
__Ownable_init();
|
|
54
70
|
}
|
|
55
71
|
|
|
56
|
-
function
|
|
57
|
-
address
|
|
72
|
+
function __HyperlaneConnectionClient_initialize(
|
|
73
|
+
address _mailbox,
|
|
58
74
|
address _interchainGasPaymaster
|
|
59
75
|
) internal onlyInitializing {
|
|
60
76
|
_setInterchainGasPaymaster(_interchainGasPaymaster);
|
|
61
|
-
|
|
77
|
+
__HyperlaneConnectionClient_initialize(_mailbox);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function __HyperlaneConnectionClient_initialize(
|
|
81
|
+
address _mailbox,
|
|
82
|
+
address _interchainGasPaymaster,
|
|
83
|
+
address _interchainSecurityModule
|
|
84
|
+
) internal onlyInitializing {
|
|
85
|
+
_setInterchainSecurityModule(_interchainSecurityModule);
|
|
86
|
+
__HyperlaneConnectionClient_initialize(
|
|
87
|
+
_mailbox,
|
|
88
|
+
_interchainGasPaymaster
|
|
89
|
+
);
|
|
62
90
|
}
|
|
63
91
|
|
|
64
92
|
// ============ External functions ============
|
|
65
93
|
|
|
66
94
|
/**
|
|
67
|
-
* @notice Sets the address of the application's
|
|
68
|
-
* @param
|
|
95
|
+
* @notice Sets the address of the application's Mailbox.
|
|
96
|
+
* @param _mailbox The address of the Mailbox contract.
|
|
69
97
|
*/
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
virtual
|
|
73
|
-
onlyOwner
|
|
74
|
-
{
|
|
75
|
-
_setAbacusConnectionManager(_abacusConnectionManager);
|
|
98
|
+
function setMailbox(address _mailbox) external virtual onlyOwner {
|
|
99
|
+
_setMailbox(_mailbox);
|
|
76
100
|
}
|
|
77
101
|
|
|
78
102
|
/**
|
|
@@ -87,6 +111,14 @@ abstract contract AbacusConnectionClient is OwnableUpgradeable {
|
|
|
87
111
|
_setInterchainGasPaymaster(_interchainGasPaymaster);
|
|
88
112
|
}
|
|
89
113
|
|
|
114
|
+
function setInterchainSecurityModule(address _module)
|
|
115
|
+
external
|
|
116
|
+
virtual
|
|
117
|
+
onlyOwner
|
|
118
|
+
{
|
|
119
|
+
_setInterchainSecurityModule(_module);
|
|
120
|
+
}
|
|
121
|
+
|
|
90
122
|
// ============ Internal functions ============
|
|
91
123
|
|
|
92
124
|
/**
|
|
@@ -95,6 +127,7 @@ abstract contract AbacusConnectionClient is OwnableUpgradeable {
|
|
|
95
127
|
*/
|
|
96
128
|
function _setInterchainGasPaymaster(address _interchainGasPaymaster)
|
|
97
129
|
internal
|
|
130
|
+
onlyContract(_interchainGasPaymaster)
|
|
98
131
|
{
|
|
99
132
|
interchainGasPaymaster = IInterchainGasPaymaster(
|
|
100
133
|
_interchainGasPaymaster
|
|
@@ -104,38 +137,18 @@ abstract contract AbacusConnectionClient is OwnableUpgradeable {
|
|
|
104
137
|
|
|
105
138
|
/**
|
|
106
139
|
* @notice Modify the contract the Application uses to validate Inbox contracts
|
|
107
|
-
* @param
|
|
108
|
-
*/
|
|
109
|
-
function _setAbacusConnectionManager(address _abacusConnectionManager)
|
|
110
|
-
internal
|
|
111
|
-
{
|
|
112
|
-
abacusConnectionManager = IAbacusConnectionManager(
|
|
113
|
-
_abacusConnectionManager
|
|
114
|
-
);
|
|
115
|
-
emit AbacusConnectionManagerSet(_abacusConnectionManager);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* @notice Get the local Outbox contract from the abacusConnectionManager
|
|
120
|
-
* @return The local Outbox contract
|
|
121
|
-
*/
|
|
122
|
-
function _outbox() internal view returns (IOutbox) {
|
|
123
|
-
return abacusConnectionManager.outbox();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @notice Determine whether _potentialInbox is an enrolled Inbox from the abacusConnectionManager
|
|
128
|
-
* @return True if _potentialInbox is an enrolled Inbox
|
|
140
|
+
* @param _mailbox The address of the mailbox contract
|
|
129
141
|
*/
|
|
130
|
-
function
|
|
131
|
-
|
|
142
|
+
function _setMailbox(address _mailbox) internal onlyContract(_mailbox) {
|
|
143
|
+
mailbox = IMailbox(_mailbox);
|
|
144
|
+
emit MailboxSet(_mailbox);
|
|
132
145
|
}
|
|
133
146
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
147
|
+
function _setInterchainSecurityModule(address _module)
|
|
148
|
+
internal
|
|
149
|
+
onlyContract(_module)
|
|
150
|
+
{
|
|
151
|
+
interchainSecurityModule = IInterchainSecurityModule(_module);
|
|
152
|
+
emit InterchainSecurityModuleSet(_module);
|
|
140
153
|
}
|
|
141
154
|
}
|
|
@@ -16,11 +16,10 @@ contract InterchainGasPaymaster is IInterchainGasPaymaster, OwnableUpgradeable {
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @notice Emitted when a payment is made for a message's gas costs.
|
|
19
|
-
* @param
|
|
20
|
-
* @param leafIndex The index of the message in the Outbox merkle tree.
|
|
19
|
+
* @param messageId The ID of the message to pay for.
|
|
21
20
|
* @param amount The amount of native tokens paid.
|
|
22
21
|
*/
|
|
23
|
-
event GasPayment(
|
|
22
|
+
event GasPayment(bytes32 indexed messageId, uint256 amount);
|
|
24
23
|
|
|
25
24
|
// ============ Constructor ============
|
|
26
25
|
|
|
@@ -38,21 +37,20 @@ contract InterchainGasPaymaster is IInterchainGasPaymaster, OwnableUpgradeable {
|
|
|
38
37
|
/**
|
|
39
38
|
* @notice Deposits msg.value as a payment for the relaying of a message
|
|
40
39
|
* to its destination chain.
|
|
41
|
-
* @param
|
|
42
|
-
* @param _leafIndex The index of the message in the Outbox merkle tree.
|
|
40
|
+
* @param _messageId The ID of the message to pay for.
|
|
43
41
|
* @param _destinationDomain The domain of the message's destination chain.
|
|
44
42
|
*/
|
|
45
|
-
function payGasFor(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
function payGasFor(bytes32 _messageId, uint32 _destinationDomain)
|
|
44
|
+
external
|
|
45
|
+
payable
|
|
46
|
+
override
|
|
47
|
+
{
|
|
50
48
|
// Silence compiler warning. The NatSpec @param requires the parameter to be named.
|
|
51
49
|
// While not used at the moment, future versions of the paymaster may conditionally
|
|
52
50
|
// forward payments depending on the destination domain.
|
|
53
51
|
_destinationDomain;
|
|
54
52
|
|
|
55
|
-
emit GasPayment(
|
|
53
|
+
emit GasPayment(_messageId, msg.value);
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
/**
|
package/contracts/Mailbox.sol
CHANGED
|
@@ -2,92 +2,227 @@
|
|
|
2
2
|
pragma solidity >=0.8.0;
|
|
3
3
|
|
|
4
4
|
// ============ Internal Imports ============
|
|
5
|
+
import {Versioned} from "./upgrade/Versioned.sol";
|
|
6
|
+
import {MerkleLib} from "./libs/Merkle.sol";
|
|
7
|
+
import {Message} from "./libs/Message.sol";
|
|
8
|
+
import {TypeCasts} from "./libs/TypeCasts.sol";
|
|
9
|
+
import {IMessageRecipient} from "../interfaces/IMessageRecipient.sol";
|
|
10
|
+
import {IInterchainSecurityModule, ISpecifiesInterchainSecurityModule} from "../interfaces/IInterchainSecurityModule.sol";
|
|
5
11
|
import {IMailbox} from "../interfaces/IMailbox.sol";
|
|
12
|
+
|
|
6
13
|
// ============ External Imports ============
|
|
7
|
-
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
|
|
8
14
|
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
|
|
15
|
+
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
|
|
16
|
+
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
|
|
9
17
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// ============
|
|
18
|
+
contract Mailbox is
|
|
19
|
+
IMailbox,
|
|
20
|
+
OwnableUpgradeable,
|
|
21
|
+
ReentrancyGuardUpgradeable,
|
|
22
|
+
Versioned
|
|
23
|
+
{
|
|
24
|
+
// ============ Libraries ============
|
|
17
25
|
|
|
26
|
+
using MerkleLib for MerkleLib.Tree;
|
|
27
|
+
using Message for bytes;
|
|
28
|
+
using TypeCasts for bytes32;
|
|
29
|
+
using TypeCasts for address;
|
|
30
|
+
|
|
31
|
+
// ============ Constants ============
|
|
32
|
+
|
|
33
|
+
// Maximum bytes per message = 2 KiB (somewhat arbitrarily set to begin)
|
|
34
|
+
uint256 public constant MAX_MESSAGE_BODY_BYTES = 2 * 2**10;
|
|
18
35
|
// Domain of chain on which the contract is deployed
|
|
19
|
-
uint32 public immutable
|
|
36
|
+
uint32 public immutable localDomain;
|
|
20
37
|
|
|
21
|
-
// ============ Public
|
|
38
|
+
// ============ Public Storage ============
|
|
22
39
|
|
|
23
|
-
//
|
|
24
|
-
|
|
40
|
+
// The default ISM, used if the recipient fails to specify one.
|
|
41
|
+
IInterchainSecurityModule public defaultIsm;
|
|
42
|
+
// An incremental merkle tree used to store outbound message IDs.
|
|
43
|
+
MerkleLib.Tree public tree;
|
|
44
|
+
// Mapping of message ID to whether or not that message has been delivered.
|
|
45
|
+
mapping(bytes32 => bool) public delivered;
|
|
25
46
|
|
|
26
47
|
// ============ Upgrade Gap ============
|
|
27
48
|
|
|
28
49
|
// gap for upgrade safety
|
|
29
|
-
uint256[
|
|
50
|
+
uint256[47] private __GAP;
|
|
30
51
|
|
|
31
52
|
// ============ Events ============
|
|
32
53
|
|
|
33
54
|
/**
|
|
34
|
-
* @notice Emitted when the
|
|
35
|
-
* @param
|
|
55
|
+
* @notice Emitted when the default ISM is updated
|
|
56
|
+
* @param module The new default ISM
|
|
36
57
|
*/
|
|
37
|
-
event
|
|
58
|
+
event DefaultIsmSet(address indexed module);
|
|
38
59
|
|
|
39
|
-
|
|
60
|
+
/**
|
|
61
|
+
* @notice Emitted when a new message is dispatched via Hyperlane
|
|
62
|
+
* @param messageId The unique message identifier
|
|
63
|
+
* @param message Raw bytes of message
|
|
64
|
+
*/
|
|
65
|
+
event Dispatch(bytes32 indexed messageId, bytes message);
|
|
40
66
|
|
|
41
67
|
/**
|
|
42
|
-
* @notice
|
|
68
|
+
* @notice Emitted when a Hyperlane message is delivered
|
|
69
|
+
* @param messageId The unique message identifier
|
|
43
70
|
*/
|
|
44
|
-
|
|
45
|
-
require(msg.sender == validatorManager, "!validatorManager");
|
|
46
|
-
_;
|
|
47
|
-
}
|
|
71
|
+
event Process(bytes32 indexed messageId);
|
|
48
72
|
|
|
49
73
|
// ============ Constructor ============
|
|
50
74
|
|
|
75
|
+
// solhint-disable-next-line no-empty-blocks
|
|
51
76
|
constructor(uint32 _localDomain) {
|
|
52
77
|
localDomain = _localDomain;
|
|
53
78
|
}
|
|
54
79
|
|
|
55
80
|
// ============ Initializer ============
|
|
56
81
|
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
onlyInitializing
|
|
60
|
-
{
|
|
61
|
-
// initialize owner
|
|
82
|
+
function initialize(address _defaultIsm) external initializer {
|
|
83
|
+
__ReentrancyGuard_init();
|
|
62
84
|
__Ownable_init();
|
|
63
|
-
|
|
85
|
+
_setDefaultIsm(_defaultIsm);
|
|
64
86
|
}
|
|
65
87
|
|
|
66
88
|
// ============ External Functions ============
|
|
67
89
|
|
|
68
90
|
/**
|
|
69
|
-
* @notice
|
|
70
|
-
* @
|
|
71
|
-
* we will progressively decentralize by swapping the trusted contract with a new implementation
|
|
72
|
-
* that implements Validator bonding & slashing, and rules for Validator selection & rotation
|
|
73
|
-
* @param _validatorManager the new validator manager contract
|
|
91
|
+
* @notice Sets the default ISM for the Mailbox.
|
|
92
|
+
* @param _module The new default ISM. Must be a contract.
|
|
74
93
|
*/
|
|
75
|
-
function
|
|
76
|
-
|
|
94
|
+
function setDefaultIsm(address _module) external onlyOwner {
|
|
95
|
+
_setDefaultIsm(_module);
|
|
77
96
|
}
|
|
78
97
|
|
|
79
|
-
|
|
98
|
+
/**
|
|
99
|
+
* @notice Dispatches a message to the destination domain & recipient.
|
|
100
|
+
* @param _destinationDomain Domain of destination chain
|
|
101
|
+
* @param _recipientAddress Address of recipient on destination chain as bytes32
|
|
102
|
+
* @param _messageBody Raw bytes content of message body
|
|
103
|
+
* @return The message ID inserted into the Mailbox's merkle tree
|
|
104
|
+
*/
|
|
105
|
+
function dispatch(
|
|
106
|
+
uint32 _destinationDomain,
|
|
107
|
+
bytes32 _recipientAddress,
|
|
108
|
+
bytes calldata _messageBody
|
|
109
|
+
) external override returns (bytes32) {
|
|
110
|
+
require(_messageBody.length <= MAX_MESSAGE_BODY_BYTES, "msg too long");
|
|
111
|
+
// Format the message into packed bytes.
|
|
112
|
+
bytes memory _message = Message.formatMessage(
|
|
113
|
+
VERSION,
|
|
114
|
+
count(),
|
|
115
|
+
localDomain,
|
|
116
|
+
msg.sender.addressToBytes32(),
|
|
117
|
+
_destinationDomain,
|
|
118
|
+
_recipientAddress,
|
|
119
|
+
_messageBody
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
// Insert the message ID into the merkle tree.
|
|
123
|
+
bytes32 _id = _message.id();
|
|
124
|
+
tree.insert(_id);
|
|
125
|
+
emit Dispatch(_id, _message);
|
|
126
|
+
return _id;
|
|
127
|
+
}
|
|
80
128
|
|
|
81
129
|
/**
|
|
82
|
-
* @notice
|
|
83
|
-
*
|
|
130
|
+
* @notice Attempts to deliver `_message` to its recipient. Verifies
|
|
131
|
+
* `_message` via the recipient's ISM using the provided `_metadata`.
|
|
132
|
+
* @param _metadata Metadata used by the ISM to verify `_message`.
|
|
133
|
+
* @param _message Formatted Hyperlane message (refer to Message.sol).
|
|
84
134
|
*/
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
135
|
+
function process(bytes calldata _metadata, bytes calldata _message)
|
|
136
|
+
external
|
|
137
|
+
override
|
|
138
|
+
nonReentrant
|
|
139
|
+
{
|
|
140
|
+
// Check that the message was intended for this mailbox.
|
|
141
|
+
require(_message.version() == VERSION, "!version");
|
|
142
|
+
require(_message.destination() == localDomain, "!destination");
|
|
143
|
+
|
|
144
|
+
// Check that the message hasn't already been delivered.
|
|
145
|
+
bytes32 _id = _message.id();
|
|
146
|
+
require(delivered[_id] == false, "delivered");
|
|
147
|
+
delivered[_id] = true;
|
|
148
|
+
|
|
149
|
+
// Verify the message via the ISM.
|
|
150
|
+
IInterchainSecurityModule _ism = _recipientIsm(
|
|
151
|
+
ISpecifiesInterchainSecurityModule(_message.recipientAddress())
|
|
89
152
|
);
|
|
90
|
-
|
|
91
|
-
|
|
153
|
+
require(_ism.verify(_metadata, _message), "!module");
|
|
154
|
+
|
|
155
|
+
// Deliver the message to the recipient.
|
|
156
|
+
uint32 _origin = _message.origin();
|
|
157
|
+
IMessageRecipient(_message.recipientAddress()).handle(
|
|
158
|
+
_origin,
|
|
159
|
+
_message.sender(),
|
|
160
|
+
_message.body()
|
|
161
|
+
);
|
|
162
|
+
emit Process(_id);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// ============ Public Functions ============
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* @notice Calculates and returns tree's current root
|
|
169
|
+
*/
|
|
170
|
+
function root() public view returns (bytes32) {
|
|
171
|
+
return tree.root();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @notice Returns the number of inserted leaves in the tree
|
|
176
|
+
*/
|
|
177
|
+
function count() public view returns (uint32) {
|
|
178
|
+
// count cannot exceed 2**TREE_DEPTH, see MerkleLib.sol
|
|
179
|
+
return uint32(tree.count);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @notice Returns a checkpoint representing the current merkle tree.
|
|
184
|
+
* @return root The root of the Outbox's merkle tree.
|
|
185
|
+
* @return index The index of the last element in the tree.
|
|
186
|
+
*/
|
|
187
|
+
function latestCheckpoint() public view returns (bytes32, uint32) {
|
|
188
|
+
return (root(), count() - 1);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// ============ Internal Functions ============
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @notice Sets the default ISM for the Mailbox.
|
|
195
|
+
* @param _module The new default ISM. Must be a contract.
|
|
196
|
+
*/
|
|
197
|
+
function _setDefaultIsm(address _module) internal {
|
|
198
|
+
require(Address.isContract(_module), "!contract");
|
|
199
|
+
defaultIsm = IInterchainSecurityModule(_module);
|
|
200
|
+
emit DefaultIsmSet(_module);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @notice Returns the ISM to use for the recipient, defaulting to the
|
|
205
|
+
* default ISM if none is specified.
|
|
206
|
+
* @param _recipient The message recipient whose ISM should be returned.
|
|
207
|
+
* @return The ISM to use for `_recipient`.
|
|
208
|
+
*/
|
|
209
|
+
function _recipientIsm(ISpecifiesInterchainSecurityModule _recipient)
|
|
210
|
+
internal
|
|
211
|
+
view
|
|
212
|
+
returns (IInterchainSecurityModule)
|
|
213
|
+
{
|
|
214
|
+
// Use a default interchainSecurityModule if one is not specified by the
|
|
215
|
+
// recipient.
|
|
216
|
+
// This is useful for backwards compatibility and for convenience as
|
|
217
|
+
// recipients are not mandated to specify an ISM.
|
|
218
|
+
try _recipient.interchainSecurityModule() returns (
|
|
219
|
+
IInterchainSecurityModule _val
|
|
220
|
+
) {
|
|
221
|
+
// TODO: reconsider
|
|
222
|
+
if (address(_val) != address(0)) {
|
|
223
|
+
return _val;
|
|
224
|
+
}
|
|
225
|
+
} catch {}
|
|
226
|
+
return defaultIsm;
|
|
92
227
|
}
|
|
93
228
|
}
|
|
@@ -4,11 +4,7 @@ pragma solidity ^0.8.13;
|
|
|
4
4
|
// ============ External Imports ============
|
|
5
5
|
|
|
6
6
|
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
|
|
7
|
-
|
|
8
|
-
struct Call {
|
|
9
|
-
address to;
|
|
10
|
-
bytes data;
|
|
11
|
-
}
|
|
7
|
+
import {Call} from "./Call.sol";
|
|
12
8
|
|
|
13
9
|
/*
|
|
14
10
|
* @title OwnableMulticall
|
package/contracts/Router.sol
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
pragma solidity >=0.6.11;
|
|
3
3
|
|
|
4
4
|
// ============ Internal Imports ============
|
|
5
|
-
import {
|
|
6
|
-
import {IAbacusConnectionManager} from "../interfaces/IAbacusConnectionManager.sol";
|
|
5
|
+
import {HyperlaneConnectionClient} from "./HyperlaneConnectionClient.sol";
|
|
7
6
|
import {IInterchainGasPaymaster} from "../interfaces/IInterchainGasPaymaster.sol";
|
|
8
7
|
import {IMessageRecipient} from "../interfaces/IMessageRecipient.sol";
|
|
9
|
-
import {
|
|
8
|
+
import {IMailbox} from "../interfaces/IMailbox.sol";
|
|
10
9
|
|
|
11
|
-
abstract contract Router is
|
|
10
|
+
abstract contract Router is HyperlaneConnectionClient, IMessageRecipient {
|
|
12
11
|
string constant NO_ROUTER_ENROLLED_REVERT_MESSAGE =
|
|
13
12
|
"No router enrolled for domain. Did you specify the right domain ID?";
|
|
14
13
|
|
|
@@ -41,19 +40,16 @@ abstract contract Router is AbacusConnectionClient, IMessageRecipient {
|
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
// ======== Initializer =========
|
|
44
|
-
function __Router_initialize(address
|
|
45
|
-
|
|
46
|
-
onlyInitializing
|
|
47
|
-
{
|
|
48
|
-
__AbacusConnectionClient_initialize(_abacusConnectionManager);
|
|
43
|
+
function __Router_initialize(address _mailbox) internal onlyInitializing {
|
|
44
|
+
__HyperlaneConnectionClient_initialize(_mailbox);
|
|
49
45
|
}
|
|
50
46
|
|
|
51
47
|
function __Router_initialize(
|
|
52
|
-
address
|
|
48
|
+
address _mailbox,
|
|
53
49
|
address _interchainGasPaymaster
|
|
54
50
|
) internal onlyInitializing {
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
__HyperlaneConnectionClient_initialize(
|
|
52
|
+
_mailbox,
|
|
57
53
|
_interchainGasPaymaster
|
|
58
54
|
);
|
|
59
55
|
}
|
|
@@ -83,7 +79,7 @@ abstract contract Router is AbacusConnectionClient, IMessageRecipient {
|
|
|
83
79
|
uint32 _origin,
|
|
84
80
|
bytes32 _sender,
|
|
85
81
|
bytes calldata _message
|
|
86
|
-
) external virtual override
|
|
82
|
+
) external virtual override onlyMailbox onlyRemoteRouter(_origin, _sender) {
|
|
87
83
|
// TODO: callbacks on success/failure
|
|
88
84
|
_handle(_origin, _sender, _message);
|
|
89
85
|
}
|
|
@@ -135,60 +131,40 @@ abstract contract Router is AbacusConnectionClient, IMessageRecipient {
|
|
|
135
131
|
}
|
|
136
132
|
|
|
137
133
|
/**
|
|
138
|
-
* @notice Dispatches a message to an enrolled router via the local router's
|
|
139
|
-
* @notice Does not pay interchain gas.
|
|
140
|
-
* @dev Reverts if there is no enrolled router for _destinationDomain.
|
|
141
|
-
* @param _destinationDomain The domain of the chain to which to send the message.
|
|
142
|
-
* @param _msg The message to dispatch.
|
|
143
|
-
*/
|
|
144
|
-
function _dispatch(uint32 _destinationDomain, bytes memory _msg)
|
|
145
|
-
internal
|
|
146
|
-
returns (uint256)
|
|
147
|
-
{
|
|
148
|
-
return _dispatch(_outbox(), _destinationDomain, _msg);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* @notice Dispatches a message to an enrolled router via the local router's Outbox
|
|
134
|
+
* @notice Dispatches a message to an enrolled router via the local router's Mailbox
|
|
153
135
|
* and pays for it to be relayed to the destination.
|
|
154
136
|
* @dev Reverts if there is no enrolled router for _destinationDomain.
|
|
155
137
|
* @param _destinationDomain The domain of the chain to which to send the message.
|
|
156
|
-
* @param
|
|
138
|
+
* @param _messageBody Raw bytes content of message.
|
|
157
139
|
* @param _gasPayment The amount of native tokens to pay for the message to be relayed.
|
|
158
140
|
*/
|
|
159
141
|
function _dispatchWithGas(
|
|
160
142
|
uint32 _destinationDomain,
|
|
161
|
-
bytes memory
|
|
143
|
+
bytes memory _messageBody,
|
|
162
144
|
uint256 _gasPayment
|
|
163
145
|
) internal {
|
|
164
|
-
|
|
165
|
-
uint256 _leafIndex = _dispatch(_outbox, _destinationDomain, _msg);
|
|
146
|
+
bytes32 _messageId = _dispatch(_destinationDomain, _messageBody);
|
|
166
147
|
if (_gasPayment > 0) {
|
|
167
148
|
interchainGasPaymaster.payGasFor{value: _gasPayment}(
|
|
168
|
-
|
|
169
|
-
_leafIndex,
|
|
149
|
+
_messageId,
|
|
170
150
|
_destinationDomain
|
|
171
151
|
);
|
|
172
152
|
}
|
|
173
153
|
}
|
|
174
154
|
|
|
175
|
-
// ============ Private functions ============
|
|
176
|
-
|
|
177
155
|
/**
|
|
178
|
-
* @notice Dispatches a message to an enrolled router via the provided
|
|
156
|
+
* @notice Dispatches a message to an enrolled router via the provided Mailbox.
|
|
179
157
|
* @dev Does not pay interchain gas.
|
|
180
158
|
* @dev Reverts if there is no enrolled router for _destinationDomain.
|
|
181
|
-
* @param _outbox The outbox contract to dispatch the message through.
|
|
182
159
|
* @param _destinationDomain The domain of the chain to which to send the message.
|
|
183
|
-
* @param
|
|
160
|
+
* @param _messageBody Raw bytes content of message.
|
|
184
161
|
*/
|
|
185
|
-
function _dispatch(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
) private returns (uint256) {
|
|
162
|
+
function _dispatch(uint32 _destinationDomain, bytes memory _messageBody)
|
|
163
|
+
internal
|
|
164
|
+
returns (bytes32)
|
|
165
|
+
{
|
|
190
166
|
// Ensure that destination chain has an enrolled router.
|
|
191
167
|
bytes32 _router = _mustHaveRemoteRouter(_destinationDomain);
|
|
192
|
-
return
|
|
168
|
+
return mailbox.dispatch(_destinationDomain, _router, _messageBody);
|
|
193
169
|
}
|
|
194
170
|
}
|