From 08d46492c3671be71cd2afba3c13b2a5d402938a Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Wed, 5 Jul 2023 18:35:08 -0400 Subject: [PATCH 1/4] Add generated markdown --- .../core-solidity-sdk/README.md | 15 + .../core-solidity-sdk/SUMMARY.md | 128 ++++ .../GasRouter.sol/abstract.GasRouter.md | 124 ++++ .../abstract.HyperlaneConnectionClient.md | 191 ++++++ .../contracts/Mailbox.sol/contract.Mailbox.md | 251 ++++++++ .../contract.OwnableMulticall.md | 41 ++ ...ract.PausableReentrancyGuardUpgradeable.md | 100 ++++ .../core-solidity-sdk/contracts/README.md | 19 + .../contracts/Router.sol/abstract.Router.md | 255 ++++++++ .../contract.ValidatorAnnounce.md | 117 ++++ .../contract.OptimismMessageHook.md | 71 +++ .../contracts/hooks/README.md | 4 + .../contract.InterchainGasPaymaster.md | 231 ++++++++ .../OverheadIgp.sol/contract.OverheadIgp.md | 161 ++++++ .../contracts/igps/README.md | 6 + .../contracts/igps/gas-oracles/README.md | 4 + .../contract.StorageGasOracle.md | 114 ++++ .../IGasOracle.sol/interface.IGasOracle.md | 25 + .../interface.IHyperlaneConnectionClient.md | 43 ++ .../interface.IInterchainGasPaymaster.md | 33 ++ .../interface.IInterchainSecurityModule.md | 55 ++ ...face.ISpecifiesInterchainSecurityModule.md | 12 + ...terface.ILiquidityLayerMessageRecipient.md | 13 + .../interface.ILiquidityLayerRouter.md | 19 + .../IMailbox.sol/interface.IMailbox.md | 103 ++++ .../interface.IMessageRecipient.md | 12 + .../IRouter.sol/interface.IRouter.md | 33 ++ .../interface.IValidatorAnnounce.md | 78 +++ .../contracts/interfaces/README.md | 17 + .../interface.IMessageHook.md | 12 + .../contracts/interfaces/hooks/README.md | 4 + .../interface.IAggregationIsm.md | 36 ++ .../interface.IMultisigIsm.md | 36 ++ .../IRoutingIsm.sol/interface.IRoutingIsm.md | 31 + .../contracts/interfaces/isms/README.md | 6 + .../interface.IInterchainAccountRouter.md | 64 ++ .../interface.IInterchainQueryRouter.md | 21 + .../contracts/interfaces/middleware/README.md | 5 + .../contracts/isms/README.md | 7 + .../abstract.AbstractAggregationIsm.md | 60 ++ .../contracts/isms/aggregation/README.md | 6 + .../contract.StaticAggregationIsm.md | 30 + .../contract.StaticAggregationIsmFactory.md | 15 + .../abstract.AbstractMerkleRootMultisigIsm.md | 78 +++ .../abstract.AbstractMessageIdMultisigIsm.md | 69 +++ .../abstract.AbstractMultisigIsm.md | 102 ++++ .../contract.LegacyMultisigIsm.md | 355 ++++++++++++ .../contracts/isms/multisig/README.md | 12 + .../abstract.AbstractMetaProxyMultisigIsm.md | 36 ++ .../contract.StaticMerkleRootMultisigIsm.md | 11 + ...ract.StaticMerkleRootMultisigIsmFactory.md | 15 + .../contract.StaticMessageIdMultisigIsm.md | 10 + ...tract.StaticMessageIdMultisigIsmFactory.md | 15 + .../abstract.AbstractNativeISM.md | 44 ++ .../OptimismISM.sol/contract.OptimismISM.md | 66 +++ .../contracts/isms/native/README.md | 5 + .../abstract.AbstractRoutingIsm.md | 55 ++ .../contract.DomainRoutingIsm.md | 112 ++++ .../contract.DomainRoutingIsmFactory.md | 47 ++ .../contract.InterchainAccountIsm.md | 44 ++ .../contracts/isms/routing/README.md | 7 + .../libs/Call.sol/library.CallLib.md | 124 ++++ .../library.CheckpointLib.md | 61 ++ .../library.EnumerableMapExtended.md | 63 ++ .../library.LegacyCheckpointLib.md | 55 ++ .../libs/Merkle.sol/library.MerkleLib.md | 354 ++++++++++++ .../libs/Message.sol/library.Message.md | 304 ++++++++++ .../libs/MetaProxy.sol/library.MetaProxy.md | 36 ++ .../MinimalProxy.sol/library.MinimalProxy.md | 34 ++ .../contracts/libs/README.md | 16 + .../abstract.StaticMOfNAddressSetFactory.md | 123 ++++ .../TestMerkle.sol/contract.MerkleTree.md | 66 +++ .../libs/TypeCasts.sol/library.TypeCasts.md | 19 + .../library.ValidatorAnnouncements.md | 31 + .../library.AggregationIsmMetadata.md | 97 ++++ .../library.LegacyMultisigIsmMetadata.md | 296 ++++++++++ .../library.MerkleRootMultisigIsmMetadata.md | 177 ++++++ .../library.MessageIdMultisigIsmMetadata.md | 109 ++++ .../contracts/libs/isms/README.md | 7 + .../library.InterchainAccountMessage.md | 134 +++++ .../library.InterchainQueryMessage.md | 203 +++++++ .../contracts/libs/middleware/README.md | 5 + .../contract.InterchainAccountRouter.md | 545 ++++++++++++++++++ .../contract.InterchainQueryRouter.md | 119 ++++ .../contracts/middleware/README.md | 6 + .../contract.LiquidityLayerRouter.md | 81 +++ .../middleware/liquidity-layer/README.md | 6 + .../contract.CircleBridgeAdapter.md | 197 +++++++ .../contract.PortalAdapter.md | 189 ++++++ .../liquidity-layer/adapters/README.md | 5 + .../interface.ILiquidityLayerAdapter.md | 23 + .../liquidity-layer/interfaces/README.md | 6 + .../interface.ICircleMessageTransmitter.md | 54 ++ .../interface.ITokenMessenger.md | 92 +++ .../interfaces/circle/README.md | 5 + .../interface.IPortalTokenBridge.md | 131 +++++ .../interfaces/portal/README.md | 4 + .../contract.MockCircleMessageTransmitter.md | 58 ++ .../contract.MockCircleTokenMessenger.md | 44 ++ .../contract.MockHyperlaneEnvironment.md | 69 +++ .../MockMailbox.sol/contract.MockMailbox.md | 137 +++++ .../contract.MockPortalBridge.md | 82 +++ .../mock/MockToken.sol/contract.MockToken.md | 22 + .../contracts/mock/README.md | 9 + .../contract.LightTestRecipient.md | 15 + .../contracts/test/README.md | 20 + .../contract.TestGasRouter.md | 27 + .../contract.TestHyperlaneConnectionClient.md | 29 + .../contract.TestInterchainGasPaymaster.md | 30 + .../contract.TestLegacyMultisigIsm.md | 15 + ...ract.TestLiquidityLayerMessageRecipient.md | 23 + .../TestMailbox.sol/contract.TestMailbox.md | 29 + .../TestMerkle.sol/contract.TestMerkle.md | 50 ++ .../TestMessage.sol/contract.TestMessage.md | 68 +++ .../contract.TestMultisigIsm.md | 51 ++ .../test/TestQuery.sol/contract.TestQuery.md | 45 ++ .../contract.TestQuerySender.md | 128 ++++ .../contract.TestRecipient.md | 78 +++ .../TestRouter.sol/contract.TestRouter.md | 63 ++ .../contract.TestSendReceiver.md | 49 ++ .../contract.TestTokenRecipient.md | 80 +++ .../contract.BadRecipient1.md | 15 + .../contract.BadRecipient2.md | 12 + .../contract.BadRecipient3.md | 15 + .../contract.BadRecipient5.md | 15 + .../contract.BadRecipient6.md | 15 + .../contracts/test/bad-recipient/README.md | 8 + .../contracts/upgrade/README.md | 4 + .../Versioned.sol/contract.Versioned.md | 14 + .../token-solidity-sdk/README.md | 253 ++++++++ .../token-solidity-sdk/SUMMARY.md | 17 + .../HypERC20.sol/contract.HypERC20.md | 78 +++ .../contract.HypERC20Collateral.md | 75 +++ .../HypERC721.sol/contract.HypERC721.md | 54 ++ .../contract.HypERC721Collateral.md | 82 +++ .../HypNative.sol/contract.HypNative.md | 85 +++ .../token-solidity-sdk/contracts/README.md | 11 + .../contract.HypERC721URICollateral.md | 33 ++ .../contract.HypERC721URIStorage.md | 73 +++ .../contracts/extensions/README.md | 5 + .../libs/Message.sol/library.Message.md | 40 ++ .../contracts/libs/README.md | 5 + .../TokenRouter.sol/abstract.TokenRouter.md | 104 ++++ .../test/ERC20Test.sol/contract.ERC20Test.md | 15 + .../ERC721Test.sol/contract.ERC721Test.md | 22 + .../contracts/test/README.md | 5 + package.json | 10 +- sync.sh | 9 + yarn.lock | 86 +-- 149 files changed, 9785 insertions(+), 64 deletions(-) create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TestMerkle.sol/contract.MerkleTree.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md create mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/README.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md create mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md create mode 100755 sync.sh diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/README.md new file mode 100644 index 0000000..e1ab27f --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/README.md @@ -0,0 +1,15 @@ +# Hyperlane Solidity + +On-chain implementations of Hyperlane in Solidity. + +## Setup + +- `yarn install` + +## Build + +- `yarn build` + +## Test + +- `yarn test` diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md b/apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md new file mode 100644 index 0000000..3554af3 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md @@ -0,0 +1,128 @@ +# Summary +- [Home](README.md) +# contracts + - [❱ hooks](contracts/hooks/README.md) + - [OptimismMessageHook](contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md) + - [❱ igps](contracts/igps/README.md) + - [❱ gas-oracles](contracts/igps/gas-oracles/README.md) + - [StorageGasOracle](contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md) + - [InterchainGasPaymaster](contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) + - [OverheadIgp](contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md) + - [❱ interfaces](contracts/interfaces/README.md) + - [❱ hooks](contracts/interfaces/hooks/README.md) + - [IMessageHook](contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) + - [❱ isms](contracts/interfaces/isms/README.md) + - [IAggregationIsm](contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) + - [IMultisigIsm](contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) + - [IRoutingIsm](contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) + - [❱ middleware](contracts/interfaces/middleware/README.md) + - [IInterchainAccountRouter](contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) + - [IInterchainQueryRouter](contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) + - [IGasOracle](contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md) + - [IHyperlaneConnectionClient](contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) + - [IInterchainGasPaymaster](contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) + - [IInterchainSecurityModule](contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) + - [ISpecifiesInterchainSecurityModule](contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) + - [ILiquidityLayerMessageRecipient](contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) + - [ILiquidityLayerRouter](contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) + - [IMailbox](contracts/interfaces/IMailbox.sol/interface.IMailbox.md) + - [IMessageRecipient](contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + - [IRouter](contracts/interfaces/IRouter.sol/interface.IRouter.md) + - [IValidatorAnnounce](contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) + - [❱ isms](contracts/isms/README.md) + - [❱ aggregation](contracts/isms/aggregation/README.md) + - [AbstractAggregationIsm](contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) + - [StaticAggregationIsm](contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md) + - [StaticAggregationIsmFactory](contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md) + - [❱ multisig](contracts/isms/multisig/README.md) + - [AbstractMerkleRootMultisigIsm](contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md) + - [AbstractMessageIdMultisigIsm](contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md) + - [AbstractMultisigIsm](contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) + - [LegacyMultisigIsm](contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) + - [AbstractMetaProxyMultisigIsm](contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) + - [StaticMerkleRootMultisigIsm](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md) + - [StaticMessageIdMultisigIsm](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md) + - [StaticMerkleRootMultisigIsmFactory](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md) + - [StaticMessageIdMultisigIsmFactory](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md) + - [❱ native](contracts/isms/native/README.md) + - [AbstractNativeISM](contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md) + - [OptimismISM](contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md) + - [❱ routing](contracts/isms/routing/README.md) + - [AbstractRoutingIsm](contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) + - [DomainRoutingIsm](contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) + - [DomainRoutingIsmFactory](contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) + - [InterchainAccountIsm](contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) + - [❱ libs](contracts/libs/README.md) + - [❱ isms](contracts/libs/isms/README.md) + - [AggregationIsmMetadata](contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) + - [LegacyMultisigIsmMetadata](contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md) + - [MerkleRootMultisigIsmMetadata](contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md) + - [MessageIdMultisigIsmMetadata](contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md) + - [❱ middleware](contracts/libs/middleware/README.md) + - [InterchainAccountMessage](contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md) + - [InterchainQueryMessage](contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md) + - [CallLib](contracts/libs/Call.sol/library.CallLib.md) + - [CheckpointLib](contracts/libs/CheckpointLib.sol/library.CheckpointLib.md) + - [EnumerableMapExtended](contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md) + - [LegacyCheckpointLib](contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md) + - [MerkleLib](contracts/libs/Merkle.sol/library.MerkleLib.md) + - [Message](contracts/libs/Message.sol/library.Message.md) + - [MetaProxy](contracts/libs/MetaProxy.sol/library.MetaProxy.md) + - [MinimalProxy](contracts/libs/MinimalProxy.sol/library.MinimalProxy.md) + - [StaticMOfNAddressSetFactory](contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) + - [TypeCasts](contracts/libs/TypeCasts.sol/library.TypeCasts.md) + - [ValidatorAnnouncements](contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) + - [❱ middleware](contracts/middleware/README.md) + - [❱ liquidity-layer](contracts/middleware/liquidity-layer/README.md) + - [❱ adapters](contracts/middleware/liquidity-layer/adapters/README.md) + - [CircleBridgeAdapter](contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) + - [PortalAdapter](contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) + - [❱ interfaces](contracts/middleware/liquidity-layer/interfaces/README.md) + - [❱ circle](contracts/middleware/liquidity-layer/interfaces/circle/README.md) + - [ICircleMessageTransmitter](contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) + - [ITokenMessenger](contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) + - [❱ portal](contracts/middleware/liquidity-layer/interfaces/portal/README.md) + - [IPortalTokenBridge](contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) + - [ILiquidityLayerAdapter](contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) + - [LiquidityLayerRouter](contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) + - [InterchainAccountRouter](contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) + - [InterchainQueryRouter](contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) + - [❱ mock](contracts/mock/README.md) + - [MockCircleMessageTransmitter](contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) + - [MockCircleTokenMessenger](contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) + - [MockHyperlaneEnvironment](contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) + - [MockMailbox](contracts/mock/MockMailbox.sol/contract.MockMailbox.md) + - [MockPortalBridge](contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md) + - [MockToken](contracts/mock/MockToken.sol/contract.MockToken.md) + - [❱ test](contracts/test/README.md) + - [❱ bad-recipient](contracts/test/bad-recipient/README.md) + - [BadRecipient1](contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md) + - [BadRecipient2](contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md) + - [BadRecipient3](contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md) + - [BadRecipient5](contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md) + - [BadRecipient6](contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md) + - [LightTestRecipient](contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md) + - [TestGasRouter](contracts/test/TestGasRouter.sol/contract.TestGasRouter.md) + - [TestHyperlaneConnectionClient](contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) + - [TestInterchainGasPaymaster](contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) + - [TestLegacyMultisigIsm](contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) + - [TestLiquidityLayerMessageRecipient](contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) + - [TestMailbox](contracts/test/TestMailbox.sol/contract.TestMailbox.md) + - [TestMerkle](contracts/test/TestMerkle.sol/contract.TestMerkle.md) + - [TestMessage](contracts/test/TestMessage.sol/contract.TestMessage.md) + - [TestMultisigIsm](contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md) + - [TestQuery](contracts/test/TestQuery.sol/contract.TestQuery.md) + - [TestQuerySender](contracts/test/TestQuerySender.sol/contract.TestQuerySender.md) + - [TestRecipient](contracts/test/TestRecipient.sol/contract.TestRecipient.md) + - [TestRouter](contracts/test/TestRouter.sol/contract.TestRouter.md) + - [TestSendReceiver](contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md) + - [TestTokenRecipient](contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md) + - [❱ upgrade](contracts/upgrade/README.md) + - [Versioned](contracts/upgrade/Versioned.sol/contract.Versioned.md) + - [GasRouter](contracts/GasRouter.sol/abstract.GasRouter.md) + - [HyperlaneConnectionClient](contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) + - [Mailbox](contracts/Mailbox.sol/contract.Mailbox.md) + - [OwnableMulticall](contracts/OwnableMulticall.sol/contract.OwnableMulticall.md) + - [PausableReentrancyGuardUpgradeable](contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) + - [Router](contracts/Router.sol/abstract.Router.md) + - [ValidatorAnnounce](contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md new file mode 100644 index 0000000..df2bf84 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md @@ -0,0 +1,124 @@ +# GasRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/GasRouter.sol) + +**Inherits:** +[Router](/contracts/Router.sol/abstract.Router.md) + + +## State Variables +### destinationGas + +```solidity +mapping(uint32 => uint256) public destinationGas; +``` + + +## Functions +### setDestinationGas + +Sets the gas amount dispatched for each configured domain. + + +```solidity +function setDestinationGas(GasRouterConfig[] calldata gasConfigs) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`gasConfigs`|`GasRouterConfig[]`|The array of GasRouterConfig structs| + + +### quoteGasPayment + +Returns the gas payment required to dispatch a message to the given domain's router. + + +```solidity +function quoteGasPayment(uint32 _destinationDomain) external view returns (uint256 _gasPayment); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the router.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_gasPayment`|`uint256`|Payment computed by the registered InterchainGasPaymaster.| + + +### _setDestinationGas + + +```solidity +function _setDestinationGas(uint32 domain, uint256 gas) internal; +``` + +### _dispatchWithGas + +Dispatches a message to an enrolled router via the local router's Mailbox +and pays for it to be relayed to the destination. + +*Uses the destinationGas mapping to populate the gas amount for the message.* + +*Reverts if there is no enrolled router for _destinationDomain.* + + +```solidity +function _dispatchWithGas( + uint32 _destinationDomain, + bytes memory _messageBody, + uint256 _gasPayment, + address _gasPaymentRefundAddress +) internal returns (bytes32 _messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the chain to which to send the message.| +|`_messageBody`|`bytes`|Raw bytes content of message.| +|`_gasPayment`|`uint256`|The amount of native tokens to pay for the message to be relayed.| +|`_gasPaymentRefundAddress`|`address`|The address to refund any gas overpayment to.| + + +### _dispatchWithGas + +*Passes `msg.value` as gas payment and `msg.sender` as gas payment refund address.* + +*Uses the destinationGas mapping to populate the gas amount for the message.* + + +```solidity +function _dispatchWithGas(uint32 _destinationDomain, bytes memory _messageBody) internal returns (bytes32 _messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the chain to send the message.| +|`_messageBody`|`bytes`|Raw bytes content of message.| + + +## Events +### DestinationGasSet +Emitted when a domain's destination gas is set. + + +```solidity +event DestinationGasSet(uint32 indexed domain, uint256 gas); +``` + +## Structs +### GasRouterConfig + +```solidity +struct GasRouterConfig { + uint32 domain; + uint256 gas; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md new file mode 100644 index 0000000..78c6ba5 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md @@ -0,0 +1,191 @@ +# HyperlaneConnectionClient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/HyperlaneConnectionClient.sol) + +**Inherits:** +OwnableUpgradeable, [IHyperlaneConnectionClient](/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) + + +## State Variables +### mailbox + +```solidity +IMailbox public mailbox; +``` + + +### interchainGasPaymaster + +```solidity +IInterchainGasPaymaster public interchainGasPaymaster; +``` + + +### interchainSecurityModule + +```solidity +IInterchainSecurityModule public interchainSecurityModule; +``` + + +### __GAP + +```solidity +uint256[48] private __GAP; +``` + + +## Functions +### onlyMailbox + +Only accept messages from an Hyperlane Mailbox contract + + +```solidity +modifier onlyMailbox(); +``` + +### onlyContract + +Only accept addresses that at least have contract code + + +```solidity +modifier onlyContract(address _contract); +``` + +### __HyperlaneConnectionClient_initialize + + +```solidity +function __HyperlaneConnectionClient_initialize(address _mailbox) internal onlyInitializing; +``` + +### __HyperlaneConnectionClient_initialize + + +```solidity +function __HyperlaneConnectionClient_initialize(address _mailbox, address _interchainGasPaymaster) + internal + onlyInitializing; +``` + +### __HyperlaneConnectionClient_initialize + + +```solidity +function __HyperlaneConnectionClient_initialize( + address _mailbox, + address _interchainGasPaymaster, + address _interchainSecurityModule +) internal onlyInitializing; +``` + +### __HyperlaneConnectionClient_initialize + + +```solidity +function __HyperlaneConnectionClient_initialize( + address _mailbox, + address _interchainGasPaymaster, + address _interchainSecurityModule, + address _owner +) internal onlyInitializing; +``` + +### setMailbox + +Sets the address of the application's Mailbox. + + +```solidity +function setMailbox(address _mailbox) external virtual onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the Mailbox contract.| + + +### setInterchainGasPaymaster + +Sets the address of the application's InterchainGasPaymaster. + + +```solidity +function setInterchainGasPaymaster(address _interchainGasPaymaster) external virtual onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_interchainGasPaymaster`|`address`|The address of the InterchainGasPaymaster contract.| + + +### setInterchainSecurityModule + + +```solidity +function setInterchainSecurityModule(address _module) external virtual onlyOwner; +``` + +### _setInterchainGasPaymaster + +Sets the address of the application's InterchainGasPaymaster. + + +```solidity +function _setInterchainGasPaymaster(address _interchainGasPaymaster) internal onlyContract(_interchainGasPaymaster); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_interchainGasPaymaster`|`address`|The address of the InterchainGasPaymaster contract.| + + +### _setMailbox + +Modify the contract the Application uses to validate Mailbox contracts + + +```solidity +function _setMailbox(address _mailbox) internal onlyContract(_mailbox); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract| + + +### _setInterchainSecurityModule + + +```solidity +function _setInterchainSecurityModule(address _module) internal; +``` + +## Events +### MailboxSet +Emitted when a new mailbox is set. + + +```solidity +event MailboxSet(address indexed mailbox); +``` + +### InterchainGasPaymasterSet +Emitted when a new Interchain Gas Paymaster is set. + + +```solidity +event InterchainGasPaymasterSet(address indexed interchainGasPaymaster); +``` + +### InterchainSecurityModuleSet + +```solidity +event InterchainSecurityModuleSet(address indexed module); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md new file mode 100644 index 0000000..6490b7c --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md @@ -0,0 +1,251 @@ +# Mailbox +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/Mailbox.sol) + +**Inherits:** +[IMailbox](/contracts/interfaces/IMailbox.sol/interface.IMailbox.md), OwnableUpgradeable, [PausableReentrancyGuardUpgradeable](/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md), [Versioned](/contracts/upgrade/Versioned.sol/contract.Versioned.md) + + +## State Variables +### MAX_MESSAGE_BODY_BYTES + +```solidity +uint256 public constant MAX_MESSAGE_BODY_BYTES = 2 * 2 ** 10; +``` + + +### localDomain + +```solidity +uint32 public immutable localDomain; +``` + + +### defaultIsm + +```solidity +IInterchainSecurityModule public defaultIsm; +``` + + +### tree + +```solidity +MerkleLib.Tree public tree; +``` + + +### delivered + +```solidity +mapping(bytes32 => bool) public delivered; +``` + + +### __GAP + +```solidity +uint256[47] private __GAP; +``` + + +## Functions +### constructor + + +```solidity +constructor(uint32 _localDomain); +``` + +### initialize + + +```solidity +function initialize(address _owner, address _defaultIsm) external initializer; +``` + +### setDefaultIsm + +Sets the default ISM for the Mailbox. + + +```solidity +function setDefaultIsm(address _module) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_module`|`address`|The new default ISM. Must be a contract.| + + +### dispatch + +Dispatches a message to the destination domain & recipient. + + +```solidity +function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes calldata _messageBody) + external + override + notPaused + returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|Domain of destination chain| +|`_recipientAddress`|`bytes32`|Address of recipient on destination chain as bytes32| +|`_messageBody`|`bytes`|Raw bytes content of message body| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The message ID inserted into the Mailbox's merkle tree| + + +### process + +Attempts to deliver `_message` to its recipient. Verifies +`_message` via the recipient's ISM using the provided `_metadata`. + + +```solidity +function process(bytes calldata _metadata, bytes calldata _message) external override nonReentrantAndNotPaused; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|Metadata used by the ISM to verify `_message`.| +|`_message`|`bytes`|Formatted Hyperlane message (refer to Message.sol).| + + +### root + +Calculates and returns tree's current root + + +```solidity +function root() public view returns (bytes32); +``` + +### count + +Returns the number of inserted leaves in the tree + + +```solidity +function count() public view returns (uint32); +``` + +### latestCheckpoint + +Returns a checkpoint representing the current merkle tree. + + +```solidity +function latestCheckpoint() external view returns (bytes32, uint32); +``` +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|root The root of the Mailbox's merkle tree.| +|``|`uint32`|index The index of the last element in the tree.| + + +### pause + +Pauses mailbox and prevents further dispatch/process calls + +*Only `owner` can pause the mailbox.* + + +```solidity +function pause() external onlyOwner; +``` + +### unpause + +Unpauses mailbox and allows for message processing. + +*Only `owner` can unpause the mailbox.* + + +```solidity +function unpause() external onlyOwner; +``` + +### isPaused + +Returns whether mailbox is paused. + + +```solidity +function isPaused() external view returns (bool); +``` + +### recipientIsm + +Returns the ISM to use for the recipient, defaulting to the +default ISM if none is specified. + + +```solidity +function recipientIsm(address _recipient) public view returns (IInterchainSecurityModule); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_recipient`|`address`|The message recipient whose ISM should be returned.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`IInterchainSecurityModule`|The ISM to use for `_recipient`.| + + +### _setDefaultIsm + +Sets the default ISM for the Mailbox. + + +```solidity +function _setDefaultIsm(address _module) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_module`|`address`|The new default ISM. Must be a contract.| + + +## Events +### DefaultIsmSet +Emitted when the default ISM is updated + + +```solidity +event DefaultIsmSet(address indexed module); +``` + +### Paused +Emitted when Mailbox is paused + + +```solidity +event Paused(); +``` + +### Unpaused +Emitted when Mailbox is unpaused + + +```solidity +event Unpaused(); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md new file mode 100644 index 0000000..4eba0ae --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md @@ -0,0 +1,41 @@ +# OwnableMulticall +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/OwnableMulticall.sol) + + +## State Variables +### owner + +```solidity +address public immutable owner; +``` + + +## Functions +### constructor + + +```solidity +constructor(address _owner); +``` + +### onlyOwner + + +```solidity +modifier onlyOwner(); +``` + +### multicall + + +```solidity +function multicall(CallLib.Call[] calldata calls) external onlyOwner; +``` + +### receive + + +```solidity +receive() external payable; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md new file mode 100644 index 0000000..2b6ca16 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md @@ -0,0 +1,100 @@ +# PausableReentrancyGuardUpgradeable +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/PausableReentrancyGuard.sol) + +**Inherits:** +Initializable + + +## State Variables +### _ENTERED + +```solidity +uint256 private constant _ENTERED = 0; +``` + + +### _NOT_ENTERED + +```solidity +uint256 private constant _NOT_ENTERED = 1; +``` + + +### _PAUSED + +```solidity +uint256 private constant _PAUSED = 2; +``` + + +### _status + +```solidity +uint256 private _status; +``` + + +### __gap +*This empty reserved space is put in place to allow future versions to add new +variables without shifting down storage in the inheritance chain. +See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps* + + +```solidity +uint256[49] private __gap; +``` + + +## Functions +### __PausableReentrancyGuard_init + +*MUST be called for `nonReentrant` to not always revert* + + +```solidity +function __PausableReentrancyGuard_init() internal onlyInitializing; +``` + +### _isPaused + + +```solidity +function _isPaused() internal view returns (bool); +``` + +### _pause + + +```solidity +function _pause() internal notPaused; +``` + +### _unpause + + +```solidity +function _unpause() internal; +``` + +### notPaused + +*Prevents a contract from being entered when paused.* + + +```solidity +modifier notPaused(); +``` + +### nonReentrantAndNotPaused + +*Prevents a contract from calling itself, directly or indirectly. +Calling a `nonReentrant` function from another `nonReentrant` +function is not supported. It is possible to prevent this from happening +by making the `nonReentrant` function external, and making it call a +`private` function that does the actual work.* + + +```solidity +modifier nonReentrantAndNotPaused(); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md new file mode 100644 index 0000000..97665e9 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md @@ -0,0 +1,19 @@ + + +# Contents +- [hooks](/contracts/hooks) +- [igps](/contracts/igps) +- [interfaces](/contracts/interfaces) +- [isms](/contracts/isms) +- [libs](/contracts/libs) +- [middleware](/contracts/middleware) +- [mock](/contracts/mock) +- [test](/contracts/test) +- [upgrade](/contracts/upgrade) +- [GasRouter](GasRouter.sol/abstract.GasRouter.md) +- [HyperlaneConnectionClient](HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) +- [Mailbox](Mailbox.sol/contract.Mailbox.md) +- [OwnableMulticall](OwnableMulticall.sol/contract.OwnableMulticall.md) +- [PausableReentrancyGuardUpgradeable](PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) +- [Router](Router.sol/abstract.Router.md) +- [ValidatorAnnounce](ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md new file mode 100644 index 0000000..23c41e0 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md @@ -0,0 +1,255 @@ +# Router +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/Router.sol) + +**Inherits:** +[HyperlaneConnectionClient](/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md), [IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + + +## State Variables +### NO_ROUTER_ENROLLED_REVERT_MESSAGE + +```solidity +string private constant NO_ROUTER_ENROLLED_REVERT_MESSAGE = + "No router enrolled for domain. Did you specify the right domain ID?"; +``` + + +### _routers + +```solidity +EnumerableMapExtended.UintToBytes32Map internal _routers; +``` + + +### __GAP + +```solidity +uint256[49] private __GAP; +``` + + +## Functions +### onlyRemoteRouter + +Only accept messages from a remote Router contract + + +```solidity +modifier onlyRemoteRouter(uint32 _origin, bytes32 _router); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The domain the message is coming from| +|`_router`|`bytes32`|The address the message is coming from| + + +### __Router_initialize + + +```solidity +function __Router_initialize(address _mailbox) internal onlyInitializing; +``` + +### __Router_initialize + + +```solidity +function __Router_initialize(address _mailbox, address _interchainGasPaymaster) internal onlyInitializing; +``` + +### __Router_initialize + + +```solidity +function __Router_initialize(address _mailbox, address _interchainGasPaymaster, address _interchainSecurityModule) + internal + onlyInitializing; +``` + +### domains + + +```solidity +function domains() external view returns (uint32[] memory); +``` + +### routers + + +```solidity +function routers(uint32 _domain) public view returns (bytes32); +``` + +### enrollRemoteRouter + +Register the address of a Router contract for the same Application on a remote chain + + +```solidity +function enrollRemoteRouter(uint32 _domain, bytes32 _router) external virtual onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The domain of the remote Application Router| +|`_router`|`bytes32`|The address of the remote Application Router| + + +### enrollRemoteRouters + +Batch version of `enrollRemoteRouter` + + +```solidity +function enrollRemoteRouters(uint32[] calldata _domains, bytes32[] calldata _addresses) external virtual onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domains`|`uint32[]`|The domaisn of the remote Application Routers| +|`_addresses`|`bytes32[]`|The addresses of the remote Application Routers| + + +### handle + +Handles an incoming message + + +```solidity +function handle(uint32 _origin, bytes32 _sender, bytes calldata _message) + external + virtual + override + onlyMailbox + onlyRemoteRouter(_origin, _sender); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The origin domain| +|`_sender`|`bytes32`|The sender address| +|`_message`|`bytes`|The message| + + +### _handle + + +```solidity +function _handle(uint32 _origin, bytes32 _sender, bytes calldata _message) internal virtual; +``` + +### _enrollRemoteRouter + +Set the router for a given domain + + +```solidity +function _enrollRemoteRouter(uint32 _domain, bytes32 _address) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The domain| +|`_address`|`bytes32`|The new router| + + +### _isRemoteRouter + +Return true if the given domain / router is the address of a remote Application Router + + +```solidity +function _isRemoteRouter(uint32 _domain, bytes32 _address) internal view returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The domain of the potential remote Application Router| +|`_address`|`bytes32`|The address of the potential remote Application Router| + + +### _mustHaveRemoteRouter + +Assert that the given domain has a Application Router registered and return its address + + +```solidity +function _mustHaveRemoteRouter(uint32 _domain) internal view returns (bytes32 _router); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The domain of the chain for which to get the Application Router| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_router`|`bytes32`|The address of the remote Application Router on _domain| + + +### _dispatchWithGas + +Dispatches a message to an enrolled router via the local router's Mailbox +and pays for it to be relayed to the destination. + +*Reverts if there is no enrolled router for _destinationDomain.* + + +```solidity +function _dispatchWithGas( + uint32 _destinationDomain, + bytes memory _messageBody, + uint256 _gasAmount, + uint256 _gasPayment, + address _gasPaymentRefundAddress +) internal returns (bytes32 _messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the chain to which to send the message.| +|`_messageBody`|`bytes`|Raw bytes content of message.| +|`_gasAmount`|`uint256`|The amount of destination gas for the message that is requested via the InterchainGasPaymaster.| +|`_gasPayment`|`uint256`|The amount of native tokens to pay for the message to be relayed.| +|`_gasPaymentRefundAddress`|`address`|The address to refund any gas overpayment to.| + + +### _dispatch + +Dispatches a message to an enrolled router via the provided Mailbox. + +*Does not pay interchain gas.* + +*Reverts if there is no enrolled router for _destinationDomain.* + + +```solidity +function _dispatch(uint32 _destinationDomain, bytes memory _messageBody) internal virtual returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the chain to which to send the message.| +|`_messageBody`|`bytes`|Raw bytes content of message.| + + +## Events +### RemoteRouterEnrolled +Emitted when a router is set. + + +```solidity +event RemoteRouterEnrolled(uint32 indexed domain, bytes32 router); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md new file mode 100644 index 0000000..c36dd8d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md @@ -0,0 +1,117 @@ +# ValidatorAnnounce +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/ValidatorAnnounce.sol) + +**Inherits:** +[IValidatorAnnounce](/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) + +Stores the location(s) of validator signed checkpoints + + +## State Variables +### mailbox + +```solidity +address public immutable mailbox; +``` + + +### localDomain + +```solidity +uint32 public immutable localDomain; +``` + + +### validators + +```solidity +EnumerableSet.AddressSet private validators; +``` + + +### storageLocations + +```solidity +mapping(address => string[]) private storageLocations; +``` + + +### replayProtection + +```solidity +mapping(bytes32 => bool) private replayProtection; +``` + + +## Functions +### constructor + + +```solidity +constructor(address _mailbox); +``` + +### announce + +Announces a validator signature storage location + + +```solidity +function announce(address _validator, string calldata _storageLocation, bytes calldata _signature) + external + returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_validator`|`address`|| +|`_storageLocation`|`string`|Information encoding the location of signed checkpoints| +|`_signature`|`bytes`|The signed validator announcement| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bool`|True upon success| + + +### getAnnouncedStorageLocations + +Returns a list of all announced storage locations + + +```solidity +function getAnnouncedStorageLocations(address[] calldata _validators) external view returns (string[][] memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_validators`|`address[]`|The list of validators to get registrations for| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`string[][]`|A list of registered storage metadata| + + +### getAnnouncedValidators + +Returns a list of validators that have made announcements + + +```solidity +function getAnnouncedValidators() external view returns (address[] memory); +``` + +## Events +### ValidatorAnnouncement +Emitted when a new validator announcement is made + + +```solidity +event ValidatorAnnouncement(address indexed validator, string storageLocation); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md new file mode 100644 index 0000000..aaa5f31 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md @@ -0,0 +1,71 @@ +# OptimismMessageHook +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/hooks/OptimismMessageHook.sol) + +**Inherits:** +[IMessageHook](/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) + +Message hook to inform the Optimism ISM of messages published through +the native Optimism bridge. + + +## State Variables +### destinationDomain + +```solidity +uint32 public immutable destinationDomain; +``` + + +### l1Messenger + +```solidity +ICrossDomainMessenger public immutable l1Messenger; +``` + + +### ism + +```solidity +address public immutable ism; +``` + + +### GAS_LIMIT + +```solidity +uint32 internal constant GAS_LIMIT = 1_920_000; +``` + + +## Functions +### constructor + + +```solidity +constructor(uint32 _destinationDomain, address _messenger, address _ism); +``` + +### postDispatch + +Hook to inform the optimism ISM of messages published through. + +*anyone can call this function, that's why we need to send msg.sender* + + +```solidity +function postDispatch(uint32 _destination, bytes32 _messageId) public payable override returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The destination domain of the message.| +|`_messageId`|`bytes32`|The message ID.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|gasOverhead The gas overhead for the function call on L2.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md new file mode 100644 index 0000000..52621ff --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md @@ -0,0 +1,4 @@ + + +# Contents +- [OptimismMessageHook](OptimismMessageHook.sol/contract.OptimismMessageHook.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md new file mode 100644 index 0000000..542dd77 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md @@ -0,0 +1,231 @@ +# InterchainGasPaymaster +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/igps/InterchainGasPaymaster.sol) + +**Inherits:** +[IInterchainGasPaymaster](/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md), [IGasOracle](/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md), OwnableUpgradeable + +Manages payments on a source chain to cover gas costs of relaying +messages to destination chains. + + +## State Variables +### TOKEN_EXCHANGE_RATE_SCALE +The scale of gas oracle token exchange rates. + + +```solidity +uint256 internal constant TOKEN_EXCHANGE_RATE_SCALE = 1e10; +``` + + +### gasOracles +Keyed by remote domain, the gas oracle to use for the domain. + + +```solidity +mapping(uint32 => IGasOracle) public gasOracles; +``` + + +### beneficiary +The benficiary that can receive native tokens paid into this contract. + + +```solidity +address public beneficiary; +``` + + +## Functions +### initialize + + +```solidity +function initialize(address _owner, address _beneficiary) public initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The owner of the contract.| +|`_beneficiary`|`address`|The beneficiary.| + + +### payForGas + +Deposits msg.value as a payment for the relaying of a message +to its destination chain. + +*Overpayment will result in a refund of native tokens to the _refundAddress. +Callers should be aware that this may present reentrancy issues.* + + +```solidity +function payForGas(bytes32 _messageId, uint32 _destinationDomain, uint256 _gasAmount, address _refundAddress) + external + payable + override; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_messageId`|`bytes32`|The ID of the message to pay for.| +|`_destinationDomain`|`uint32`|The domain of the message's destination chain.| +|`_gasAmount`|`uint256`|The amount of destination gas to pay for.| +|`_refundAddress`|`address`|The address to refund any overpayment to.| + + +### claim + +Transfers the entire native token balance to the beneficiary. + +*The beneficiary must be able to receive native tokens.* + + +```solidity +function claim() external; +``` + +### setGasOracles + +Sets the gas oracles for remote domains specified in the config array. + + +```solidity +function setGasOracles(GasOracleConfig[] calldata _configs) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_configs`|`GasOracleConfig[]`|An array of configs including the remote domain and gas oracles to set.| + + +### setBeneficiary + +Sets the beneficiary. + + +```solidity +function setBeneficiary(address _beneficiary) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_beneficiary`|`address`|The new beneficiary.| + + +### quoteGasPayment + +Quotes the amount of native tokens to pay for interchain gas. + + +```solidity +function quoteGasPayment(uint32 _destinationDomain, uint256 _gasAmount) + public + view + virtual + override + returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the message's destination chain.| +|`_gasAmount`|`uint256`|The amount of destination gas to pay for.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|The amount of native tokens required to pay for interchain gas.| + + +### getExchangeRateAndGasPrice + +Gets the token exchange rate and gas price from the configured gas oracle +for a given destination domain. + + +```solidity +function getExchangeRateAndGasPrice(uint32 _destinationDomain) + public + view + override + returns (uint128 tokenExchangeRate, uint128 gasPrice); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The destination domain.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`tokenExchangeRate`|`uint128`|The exchange rate of the remote native token quoted in the local native token.| +|`gasPrice`|`uint128`|The gas price on the remote chain.| + + +### _setBeneficiary + +Sets the beneficiary. + + +```solidity +function _setBeneficiary(address _beneficiary) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_beneficiary`|`address`|The new beneficiary.| + + +### _setGasOracle + +Sets the gas oracle for a remote domain. + + +```solidity +function _setGasOracle(uint32 _remoteDomain, address _gasOracle) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_remoteDomain`|`uint32`|The remote domain.| +|`_gasOracle`|`address`|The gas oracle.| + + +## Events +### GasOracleSet +Emitted when the gas oracle for a remote domain is set. + + +```solidity +event GasOracleSet(uint32 indexed remoteDomain, address gasOracle); +``` + +### BeneficiarySet +Emitted when the beneficiary is set. + + +```solidity +event BeneficiarySet(address beneficiary); +``` + +## Structs +### GasOracleConfig + +```solidity +struct GasOracleConfig { + uint32 remoteDomain; + address gasOracle; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md new file mode 100644 index 0000000..7aa8bea --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md @@ -0,0 +1,161 @@ +# OverheadIgp +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/igps/OverheadIgp.sol) + +**Inherits:** +[IInterchainGasPaymaster](/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md), Ownable + +An IGP that adds configured gas overheads to gas amounts and forwards +calls to an "inner" IGP. + +*The intended use of this contract is to store overhead gas amounts for destination +domains, e.g. Mailbox and/or ISM gas usage, such that users of this IGP are only required +to specify the gas amount used by their own applications.* + + +## State Variables +### innerIgp +The IGP that is called when paying for or quoting gas +after applying overhead gas amounts. + + +```solidity +IInterchainGasPaymaster public immutable innerIgp; +``` + + +### destinationGasOverhead +Destination domain => overhead gas amount on that domain. + + +```solidity +mapping(uint32 => uint256) public destinationGasOverhead; +``` + + +## Functions +### constructor + + +```solidity +constructor(address _innerIgp); +``` + +### payForGas + +Adds the stored destinationGasOverhead to the _gasAmount and forwards the +call to the innerIgp's `payForGas` function. + + +```solidity +function payForGas(bytes32 _messageId, uint32 _destinationDomain, uint256 _gasAmount, address _refundAddress) + external + payable; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_messageId`|`bytes32`|The ID of the message to pay for.| +|`_destinationDomain`|`uint32`|The domain of the message's destination chain.| +|`_gasAmount`|`uint256`|The amount of destination gas to pay for. This should not consider any gas that is accounted for in the stored destinationGasOverhead.| +|`_refundAddress`|`address`|The address to refund any overpayment to.| + + +### setDestinationGasOverheads + +Sets destination gas overheads for multiple domains. + +*Only callable by the owner.* + + +```solidity +function setDestinationGasOverheads(DomainConfig[] calldata configs) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`configs`|`DomainConfig[]`|A list of destination domains and gas overheads.| + + +### quoteGasPayment + +Adds the stored destinationGasOverhead to the _gasAmount and forwards the +call to the innerIgp's `quoteGasPayment` function. + + +```solidity +function quoteGasPayment(uint32 _destinationDomain, uint256 _gasAmount) public view returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the message's destination chain.| +|`_gasAmount`|`uint256`|The amount of destination gas to pay for. This should not consider any gas that is accounted for in the stored destinationGasOverhead.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|The amount of native tokens required to pay for interchain gas.| + + +### destinationGasAmount + +Returns the stored destinationGasOverhead added to the _gasAmount. + +*If there is no stored destinationGasOverhead, 0 is used.* + + +```solidity +function destinationGasAmount(uint32 _destinationDomain, uint256 _gasAmount) public view returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The domain of the message's destination chain.| +|`_gasAmount`|`uint256`|The amount of destination gas to pay for. This should not consider any gas that is accounted for in the stored destinationGasOverhead.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|The stored destinationGasOverhead added to the _gasAmount.| + + +### _setDestinationGasOverhead + +Sets the destination gas overhead for a single domain. + + +```solidity +function _setDestinationGasOverhead(DomainConfig calldata config) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`config`|`DomainConfig`|The destination domain and gas overhead.| + + +## Events +### DestinationGasOverheadSet +Emitted when an entry in the destinationGasOverhead mapping is set. + + +```solidity +event DestinationGasOverheadSet(uint32 indexed domain, uint256 gasOverhead); +``` + +## Structs +### DomainConfig + +```solidity +struct DomainConfig { + uint32 domain; + uint256 gasOverhead; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md new file mode 100644 index 0000000..8824228 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md @@ -0,0 +1,6 @@ + + +# Contents +- [gas-oracles](/contracts/igps/gas-oracles) +- [InterchainGasPaymaster](InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) +- [OverheadIgp](OverheadIgp.sol/contract.OverheadIgp.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md new file mode 100644 index 0000000..37c94a4 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md @@ -0,0 +1,4 @@ + + +# Contents +- [StorageGasOracle](StorageGasOracle.sol/contract.StorageGasOracle.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md new file mode 100644 index 0000000..a65b5f4 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md @@ -0,0 +1,114 @@ +# StorageGasOracle +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/igps/gas-oracles/StorageGasOracle.sol) + +**Inherits:** +[IGasOracle](/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md), Ownable + +A gas oracle that uses data stored within the contract. + +*This contract is intended to be owned by an address that will +update the stored remote gas data.* + + +## State Variables +### remoteGasData +Keyed by remote domain, gas data on that remote domain. + + +```solidity +mapping(uint32 => IGasOracle.RemoteGasData) public remoteGasData; +``` + + +## Functions +### getExchangeRateAndGasPrice + +Returns the stored `remoteGasData` for the `_destinationDomain`. + + +```solidity +function getExchangeRateAndGasPrice(uint32 _destinationDomain) + external + view + override + returns (uint128 tokenExchangeRate, uint128 gasPrice); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The destination domain.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`tokenExchangeRate`|`uint128`|The exchange rate of the remote native token quoted in the local native token.| +|`gasPrice`|`uint128`|The gas price on the remote chain.| + + +### setRemoteGasDataConfigs + +Sets the remote gas data for many remotes at a time. + + +```solidity +function setRemoteGasDataConfigs(RemoteGasDataConfig[] calldata _configs) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_configs`|`RemoteGasDataConfig[]`|The configs to use when setting the remote gas data.| + + +### setRemoteGasData + +Sets the remote gas data using the values in `_config`. + + +```solidity +function setRemoteGasData(RemoteGasDataConfig calldata _config) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_config`|`RemoteGasDataConfig`|The config to use when setting the remote gas data.| + + +### _setRemoteGasData + +Sets the remote gas data using the values in `_config`. + + +```solidity +function _setRemoteGasData(RemoteGasDataConfig calldata _config) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_config`|`RemoteGasDataConfig`|The config to use when setting the remote gas data.| + + +## Events +### RemoteGasDataSet +Emitted when an entry in `remoteGasData` is set. + + +```solidity +event RemoteGasDataSet(uint32 indexed remoteDomain, uint128 tokenExchangeRate, uint128 gasPrice); +``` + +## Structs +### RemoteGasDataConfig + +```solidity +struct RemoteGasDataConfig { + uint32 remoteDomain; + uint128 tokenExchangeRate; + uint128 gasPrice; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md new file mode 100644 index 0000000..0a19ff3 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md @@ -0,0 +1,25 @@ +# IGasOracle +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IGasOracle.sol) + + +## Functions +### getExchangeRateAndGasPrice + + +```solidity +function getExchangeRateAndGasPrice(uint32 _destinationDomain) + external + view + returns (uint128 tokenExchangeRate, uint128 gasPrice); +``` + +## Structs +### RemoteGasData + +```solidity +struct RemoteGasData { + uint128 tokenExchangeRate; + uint128 gasPrice; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md new file mode 100644 index 0000000..6578757 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md @@ -0,0 +1,43 @@ +# IHyperlaneConnectionClient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IHyperlaneConnectionClient.sol) + +**Inherits:** +[ISpecifiesInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) + + +## Functions +### mailbox + + +```solidity +function mailbox() external view returns (IMailbox); +``` + +### interchainGasPaymaster + + +```solidity +function interchainGasPaymaster() external view returns (IInterchainGasPaymaster); +``` + +### setMailbox + + +```solidity +function setMailbox(address) external; +``` + +### setInterchainGasPaymaster + + +```solidity +function setInterchainGasPaymaster(address) external; +``` + +### setInterchainSecurityModule + + +```solidity +function setInterchainSecurityModule(address) external; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md new file mode 100644 index 0000000..e79fefa --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md @@ -0,0 +1,33 @@ +# IInterchainGasPaymaster +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IInterchainGasPaymaster.sol) + +Manages payments on a source chain to cover gas costs of relaying +messages to destination chains. + + +## Functions +### payForGas + + +```solidity +function payForGas(bytes32 _messageId, uint32 _destinationDomain, uint256 _gasAmount, address _refundAddress) + external + payable; +``` + +### quoteGasPayment + + +```solidity +function quoteGasPayment(uint32 _destinationDomain, uint256 _gasAmount) external view returns (uint256); +``` + +## Events +### GasPayment +Emitted when a payment is made for a message's gas costs. + + +```solidity +event GasPayment(bytes32 indexed messageId, uint256 gasAmount, uint256 payment); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md new file mode 100644 index 0000000..8c18b08 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md @@ -0,0 +1,55 @@ +# IInterchainSecurityModule +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IInterchainSecurityModule.sol) + + +## Functions +### moduleType + +Returns an enum that represents the type of security model +encoded by this ISM. + +*Relayers infer how to fetch and format metadata.* + + +```solidity +function moduleType() external view returns (uint8); +``` + +### verify + +Defines a security model responsible for verifying interchain +messages based on the provided metadata. + + +```solidity +function verify(bytes calldata _metadata, bytes calldata _message) external returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|Off-chain metadata provided by a relayer, specific to the security model encoded by the module (e.g. validator signatures)| +|`_message`|`bytes`|Hyperlane encoded interchain message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bool`|True if the message was verified| + + +## Enums +### Types + +```solidity +enum Types { + NULL, + ROUTING, + AGGREGATION, + LEGACY_MULTISIG, + MERKLE_ROOT_MULTISIG, + MESSAGE_ID_MULTISIG, + OPTIMISM +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md new file mode 100644 index 0000000..2f0ffe2 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md @@ -0,0 +1,12 @@ +# ISpecifiesInterchainSecurityModule +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IInterchainSecurityModule.sol) + + +## Functions +### interchainSecurityModule + + +```solidity +function interchainSecurityModule() external view returns (IInterchainSecurityModule); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md new file mode 100644 index 0000000..e4a3ae4 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md @@ -0,0 +1,13 @@ +# ILiquidityLayerMessageRecipient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/ILiquidityLayerMessageRecipient.sol) + + +## Functions +### handleWithTokens + + +```solidity +function handleWithTokens(uint32 _origin, bytes32 _sender, bytes calldata _message, address _token, uint256 _amount) + external; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md new file mode 100644 index 0000000..2c5d4df --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md @@ -0,0 +1,19 @@ +# ILiquidityLayerRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/ILiquidityLayerRouter.sol) + + +## Functions +### dispatchWithTokens + + +```solidity +function dispatchWithTokens( + uint32 _destinationDomain, + bytes32 _recipientAddress, + address _token, + uint256 _amount, + string calldata _bridge, + bytes calldata _messageBody +) external returns (bytes32); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md new file mode 100644 index 0000000..aca3082 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md @@ -0,0 +1,103 @@ +# IMailbox +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IMailbox.sol) + + +## Functions +### localDomain + + +```solidity +function localDomain() external view returns (uint32); +``` + +### delivered + + +```solidity +function delivered(bytes32 messageId) external view returns (bool); +``` + +### defaultIsm + + +```solidity +function defaultIsm() external view returns (IInterchainSecurityModule); +``` + +### dispatch + + +```solidity +function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes calldata _messageBody) + external + returns (bytes32); +``` + +### process + + +```solidity +function process(bytes calldata _metadata, bytes calldata _message) external; +``` + +### count + + +```solidity +function count() external view returns (uint32); +``` + +### root + + +```solidity +function root() external view returns (bytes32); +``` + +### latestCheckpoint + + +```solidity +function latestCheckpoint() external view returns (bytes32, uint32); +``` + +### recipientIsm + + +```solidity +function recipientIsm(address _recipient) external view returns (IInterchainSecurityModule); +``` + +## Events +### Dispatch +Emitted when a new message is dispatched via Hyperlane + + +```solidity +event Dispatch(address indexed sender, uint32 indexed destination, bytes32 indexed recipient, bytes message); +``` + +### DispatchId +Emitted when a new message is dispatched via Hyperlane + + +```solidity +event DispatchId(bytes32 indexed messageId); +``` + +### ProcessId +Emitted when a Hyperlane message is processed + + +```solidity +event ProcessId(bytes32 indexed messageId); +``` + +### Process +Emitted when a Hyperlane message is delivered + + +```solidity +event Process(uint32 indexed origin, bytes32 indexed sender, address indexed recipient); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md new file mode 100644 index 0000000..e2c0990 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md @@ -0,0 +1,12 @@ +# IMessageRecipient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IMessageRecipient.sol) + + +## Functions +### handle + + +```solidity +function handle(uint32 _origin, bytes32 _sender, bytes calldata _message) external; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md new file mode 100644 index 0000000..abdb1f6 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md @@ -0,0 +1,33 @@ +# IRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IRouter.sol) + + +## Functions +### domains + + +```solidity +function domains() external view returns (uint32[] memory); +``` + +### routers + + +```solidity +function routers(uint32 _domain) external view returns (bytes32); +``` + +### enrollRemoteRouter + + +```solidity +function enrollRemoteRouter(uint32 _domain, bytes32 _router) external; +``` + +### enrollRemoteRouters + + +```solidity +function enrollRemoteRouters(uint32[] calldata _domains, bytes32[] calldata _routers) external; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md new file mode 100644 index 0000000..5f173df --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md @@ -0,0 +1,78 @@ +# IValidatorAnnounce +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/IValidatorAnnounce.sol) + + +## Functions +### localDomain + +Returns the local domain for validator announcements + + +```solidity +function localDomain() external view returns (uint32); +``` + +### mailbox + +Returns the mailbox contract for validator announcements + + +```solidity +function mailbox() external view returns (address); +``` + +### getAnnouncedValidators + +Returns a list of validators that have made announcements + + +```solidity +function getAnnouncedValidators() external view returns (address[] memory); +``` + +### getAnnouncedStorageLocations + +Returns a list of all announced storage locations for `validators` + + +```solidity +function getAnnouncedStorageLocations(address[] calldata _validators) external view returns (string[][] memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_validators`|`address[]`|The list of validators to get storage locations for| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`string[][]`|A list of announced storage locations| + + +### announce + +Announces a validator signature storage location + + +```solidity +function announce(address _validator, string calldata _storageLocation, bytes calldata _signature) + external + returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_validator`|`address`|| +|`_storageLocation`|`string`|Information encoding the location of signed checkpoints| +|`_signature`|`bytes`|The signed validator announcement| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bool`|True upon success| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md new file mode 100644 index 0000000..c19ee51 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md @@ -0,0 +1,17 @@ + + +# Contents +- [hooks](/contracts/interfaces/hooks) +- [isms](/contracts/interfaces/isms) +- [middleware](/contracts/interfaces/middleware) +- [IGasOracle](IGasOracle.sol/interface.IGasOracle.md) +- [IHyperlaneConnectionClient](IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) +- [IInterchainGasPaymaster](IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) +- [IInterchainSecurityModule](IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) +- [ISpecifiesInterchainSecurityModule](IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) +- [ILiquidityLayerMessageRecipient](ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) +- [ILiquidityLayerRouter](ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) +- [IMailbox](IMailbox.sol/interface.IMailbox.md) +- [IMessageRecipient](IMessageRecipient.sol/interface.IMessageRecipient.md) +- [IRouter](IRouter.sol/interface.IRouter.md) +- [IValidatorAnnounce](IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md new file mode 100644 index 0000000..528565e --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md @@ -0,0 +1,12 @@ +# IMessageHook +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/hooks/IMessageHook.sol) + + +## Functions +### postDispatch + + +```solidity +function postDispatch(uint32 _destination, bytes32 _messageId) external payable returns (uint256); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md new file mode 100644 index 0000000..45e6695 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md @@ -0,0 +1,4 @@ + + +# Contents +- [IMessageHook](IMessageHook.sol/interface.IMessageHook.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md new file mode 100644 index 0000000..9b1903b --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md @@ -0,0 +1,36 @@ +# IAggregationIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/isms/IAggregationIsm.sol) + +**Inherits:** +[IInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) + + +## Functions +### modulesAndThreshold + +Returns the set of modules responsible for verifying _message +and the number of modules that must verify + +*Can change based on the content of _message* + + +```solidity +function modulesAndThreshold(bytes calldata _message) + external + view + returns (address[] memory modules, uint8 threshold); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Hyperlane formatted interchain message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`modules`|`address[]`|The array of ISM addresses| +|`threshold`|`uint8`|The number of modules needed to verify| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md new file mode 100644 index 0000000..c5bdc81 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md @@ -0,0 +1,36 @@ +# IMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/isms/IMultisigIsm.sol) + +**Inherits:** +[IInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) + + +## Functions +### validatorsAndThreshold + +Returns the set of validators responsible for verifying _message +and the number of signatures required + +*Can change based on the content of _message* + + +```solidity +function validatorsAndThreshold(bytes calldata _message) + external + view + returns (address[] memory validators, uint8 threshold); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Hyperlane formatted interchain message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`validators`|`address[]`|The array of validator addresses| +|`threshold`|`uint8`|The number of validator signatures needed| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md new file mode 100644 index 0000000..2c1cc4e --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md @@ -0,0 +1,31 @@ +# IRoutingIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/isms/IRoutingIsm.sol) + +**Inherits:** +[IInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) + + +## Functions +### route + +Returns the ISM responsible for verifying _message + +*Can change based on the content of _message* + + +```solidity +function route(bytes calldata _message) external view returns (IInterchainSecurityModule); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`IInterchainSecurityModule`|module The ISM to use to verify _message| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md new file mode 100644 index 0000000..19f73ae --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md @@ -0,0 +1,6 @@ + + +# Contents +- [IAggregationIsm](IAggregationIsm.sol/interface.IAggregationIsm.md) +- [IMultisigIsm](IMultisigIsm.sol/interface.IMultisigIsm.md) +- [IRoutingIsm](IRoutingIsm.sol/interface.IRoutingIsm.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md new file mode 100644 index 0000000..7aa1a8c --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md @@ -0,0 +1,64 @@ +# IInterchainAccountRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/middleware/IInterchainAccountRouter.sol) + + +## Functions +### callRemote + + +```solidity +function callRemote(uint32 _destination, address _to, uint256 _value, bytes calldata _data) + external + returns (bytes32); +``` + +### callRemote + + +```solidity +function callRemote(uint32 _destination, CallLib.Call[] calldata calls) external returns (bytes32); +``` + +### callRemoteWithOverrides + + +```solidity +function callRemoteWithOverrides(uint32 _destination, bytes32 _router, bytes32 _ism, CallLib.Call[] calldata calls) + external + returns (bytes32); +``` + +### getLocalInterchainAccount + + +```solidity +function getLocalInterchainAccount(uint32 _origin, bytes32 _router, bytes32 _owner, address _ism) + external + view + returns (OwnableMulticall); +``` + +### getLocalInterchainAccount + + +```solidity +function getLocalInterchainAccount(uint32 _origin, address _router, address _owner, address _ism) + external + view + returns (OwnableMulticall); +``` + +### getRemoteInterchainAccount + + +```solidity +function getRemoteInterchainAccount(address _router, address _owner, address _ism) external view returns (address); +``` + +### getRemoteInterchainAccount + + +```solidity +function getRemoteInterchainAccount(uint32 _destination, address _owner) external view returns (address); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md new file mode 100644 index 0000000..2680ca9 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md @@ -0,0 +1,21 @@ +# IInterchainQueryRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/interfaces/middleware/IInterchainQueryRouter.sol) + + +## Functions +### query + + +```solidity +function query(uint32 _destination, address _to, bytes memory _data, bytes memory _callback) + external + returns (bytes32); +``` + +### query + + +```solidity +function query(uint32 _destination, CallLib.StaticCallWithCallback[] calldata calls) external returns (bytes32); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md new file mode 100644 index 0000000..4ca3d27 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [IInterchainAccountRouter](IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) +- [IInterchainQueryRouter](IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md new file mode 100644 index 0000000..7f47031 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md @@ -0,0 +1,7 @@ + + +# Contents +- [aggregation](/contracts/isms/aggregation) +- [multisig](/contracts/isms/multisig) +- [native](/contracts/isms/native) +- [routing](/contracts/isms/routing) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md new file mode 100644 index 0000000..f77e558 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md @@ -0,0 +1,60 @@ +# AbstractAggregationIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/aggregation/AbstractAggregationIsm.sol) + +**Inherits:** +[IAggregationIsm](/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) + +Manages per-domain m-of-n ISM sets that are used to verify +interchain messages. + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.AGGREGATION); +``` + + +## Functions +### modulesAndThreshold + +Returns the set of ISMs responsible for verifying _message +and the number of ISMs that must verify + +*Can change based on the content of _message* + + +```solidity +function modulesAndThreshold(bytes calldata _message) public view virtual returns (address[] memory, uint8); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Hyperlane formatted interchain message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address[]`|modules The array of ISM addresses| +|``|`uint8`|threshold The number of ISMs needed to verify| + + +### verify + +Requires that m-of-n ISMs verify the provided interchain message. + + +```solidity +function verify(bytes calldata _metadata, bytes calldata _message) public returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata (see AggregationIsmMetadata.sol)| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md new file mode 100644 index 0000000..ec1a70f --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md @@ -0,0 +1,6 @@ + + +# Contents +- [AbstractAggregationIsm](AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) +- [StaticAggregationIsm](StaticAggregationIsm.sol/contract.StaticAggregationIsm.md) +- [StaticAggregationIsmFactory](StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md new file mode 100644 index 0000000..edcb471 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md @@ -0,0 +1,30 @@ +# StaticAggregationIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/aggregation/StaticAggregationIsm.sol) + +**Inherits:** +[AbstractAggregationIsm](/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) + +Manages per-domain m-of-n ISM sets that are used to verify +interchain messages. + + +## Functions +### modulesAndThreshold + +Returns the set of ISMs responsible for verifying _message +and the number of ISMs that must verify + +*Can change based on the content of _message* + + +```solidity +function modulesAndThreshold(bytes calldata) public view virtual override returns (address[] memory, uint8); +``` +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address[]`|modules The array of ISM addresses| +|``|`uint8`|threshold The number of ISMs needed to verify| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md new file mode 100644 index 0000000..5442ad0 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md @@ -0,0 +1,15 @@ +# StaticAggregationIsmFactory +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/aggregation/StaticAggregationIsmFactory.sol) + +**Inherits:** +[StaticMOfNAddressSetFactory](/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) + + +## Functions +### _deployImplementation + + +```solidity +function _deployImplementation() internal virtual override returns (address); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md new file mode 100644 index 0000000..7b06377 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md @@ -0,0 +1,78 @@ +# AbstractMerkleRootMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol) + +**Inherits:** +[AbstractMultisigIsm](/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) + +This ISM allows using a newer signed checkpoint (say #33) to prove existence of an older message (#22) in the validators' MerkleTree. +This guarantees censorship resistance as validators cannot hide a message +by refusing to sign its checkpoint but later signing a checkpoint for a newer message. +If validators decide to censor a message, they are left with only one option — to not produce checkpoints at all. +Otherwise, the very next signed checkpoint (#33) can be used by any relayer to prove the previous message inclusion using this ISM. +This is censorship resistance is missing in the sibling implementation `AbstractMessageIdMultisigIsm`, +since it can only verify messages having the corresponding checkpoints. + +*Provides the default implementation of verifying signatures over a checkpoint and the message inclusion in that checkpoint. +This abstract contract can be overridden for customizing the `validatorsAndThreshold()` (static or dynamic).* + +*May be adapted in future to support batch message verification against a single root.* + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.MERKLE_ROOT_MULTISIG); +``` + + +## Functions +### digest + +Returns the digest to be used for signature verification. + + +```solidity +function digest(bytes calldata _metadata, bytes calldata _message) internal pure override returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|digest The digest to be signed by validators| + + +### signatureAt + +Returns the signature at a given index from the metadata. + + +```solidity +function signatureAt(bytes calldata _metadata, uint256 _index) + internal + pure + virtual + override + returns (bytes memory signature); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_index`|`uint256`|The index of the signature to return| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`signature`|`bytes`|Packed encoding of signature (65 bytes)| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md new file mode 100644 index 0000000..8b5b554 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md @@ -0,0 +1,69 @@ +# AbstractMessageIdMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol) + +**Inherits:** +[AbstractMultisigIsm](/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) + +This ISM minimizes gas/performance overhead of the checkpoints verification by compromising on the censorship resistance. +For censorship resistance consider using `AbstractMerkleRootMultisigIsm`. +If the validators (`validatorsAndThreshold`) skip messages by not sign checkpoints for them, +the relayers will not be able to aggregate a quorum of signatures sufficient to deliver these messages via this ISM. +Integrations are free to choose the trade-off between the censorship resistance and the gas/processing overhead. + +*Provides the default implementation of verifying signatures over a checkpoint related to a specific message ID. +This abstract contract can be customized to change the `validatorsAndThreshold()` (static or dynamic).* + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.MESSAGE_ID_MULTISIG); +``` + + +## Functions +### digest + +Returns the digest to be used for signature verification. + + +```solidity +function digest(bytes calldata _metadata, bytes calldata _message) internal pure override returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|digest The digest to be signed by validators| + + +### signatureAt + +Returns the signature at a given index from the metadata. + + +```solidity +function signatureAt(bytes calldata _metadata, uint256 _index) internal pure virtual override returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_index`|`uint256`|The index of the signature to return| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|signature Packed encoding of signature (65 bytes)| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md new file mode 100644 index 0000000..2f2b1f3 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md @@ -0,0 +1,102 @@ +# AbstractMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/AbstractMultisigIsm.sol) + +**Inherits:** +[IMultisigIsm](/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) + +Manages per-domain m-of-n Validator sets that are used to verify +interchain messages. + +*See ./AbstractMerkleRootMultisigIsm.sol and ./AbstractMessageIdMultisigIsm.sol +for concrete implementations of `digest` and `signatureAt`.* + +*See ./StaticMultisigIsm.sol for concrete implementations.* + + +## Functions +### validatorsAndThreshold + +Returns the set of validators responsible for verifying _message +and the number of signatures required + +*Can change based on the content of _message* + + +```solidity +function validatorsAndThreshold(bytes calldata _message) public view virtual returns (address[] memory, uint8); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Hyperlane formatted interchain message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address[]`|validators The array of validator addresses| +|``|`uint8`|threshold The number of validator signatures needed| + + +### digest + +Returns the digest to be used for signature verification. + + +```solidity +function digest(bytes calldata _metadata, bytes calldata _message) internal view virtual returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|digest The digest to be signed by validators| + + +### signatureAt + +Returns the signature at a given index from the metadata. + + +```solidity +function signatureAt(bytes calldata _metadata, uint256 _index) internal pure virtual returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_index`|`uint256`|The index of the signature to return| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|signature Packed encoding of signature (65 bytes)| + + +### verify + +Requires that m-of-n validators verify a merkle root, +and verifies a me∑rkle proof of `_message` against that root. + + +```solidity +function verify(bytes calldata _metadata, bytes calldata _message) public view returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md new file mode 100644 index 0000000..9c3b12c --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md @@ -0,0 +1,355 @@ +# LegacyMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/LegacyMultisigIsm.sol) + +**Inherits:** +[IMultisigIsm](/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md), Ownable + +Manages an ownable set of validators that ECDSA sign checkpoints to +reach a quorum. + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.LEGACY_MULTISIG); +``` + + +### threshold +The validator threshold for each remote domain. + + +```solidity +mapping(uint32 => uint8) public threshold; +``` + + +### validatorSet +The validator set for each remote domain. + + +```solidity +mapping(uint32 => EnumerableSet.AddressSet) private validatorSet; +``` + + +### commitment +A succinct commitment to the validator set and threshold for each remote +domain. + + +```solidity +mapping(uint32 => bytes32) public commitment; +``` + + +## Functions +### constructor + + +```solidity +constructor() Ownable; +``` + +### enrollValidators + +Enrolls multiple validators into a validator set. + +*Reverts if `_validator` is already in the validator set.* + +*_validators[i] are the validators to enroll for _domains[i].* + + +```solidity +function enrollValidators(uint32[] calldata _domains, address[][] calldata _validators) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domains`|`uint32[]`|The remote domains of the validator sets.| +|`_validators`|`address[][]`|The validators to add to the validator sets.| + + +### enrollValidator + +Enrolls a validator into a validator set. + +*Reverts if `_validator` is already in the validator set.* + + +```solidity +function enrollValidator(uint32 _domain, address _validator) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| +|`_validator`|`address`|The validator to add to the validator set.| + + +### unenrollValidator + +Unenrolls a validator from a validator set. + +*Reverts if `_validator` is not in the validator set.* + + +```solidity +function unenrollValidator(uint32 _domain, address _validator) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| +|`_validator`|`address`|The validator to remove from the validator set.| + + +### setThresholds + +Sets the quorum threshold for multiple domains. + + +```solidity +function setThresholds(uint32[] calldata _domains, uint8[] calldata _thresholds) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domains`|`uint32[]`|The remote domains of the validator sets.| +|`_thresholds`|`uint8[]`|The new quorum thresholds.| + + +### isEnrolled + +Returns whether an address is enrolled in a validator set. + + +```solidity +function isEnrolled(uint32 _domain, address _address) external view returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| +|`_address`|`address`|The address to test for set membership.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bool`|True if the address is enrolled, false otherwise.| + + +### setThreshold + +Sets the quorum threshold. + + +```solidity +function setThreshold(uint32 _domain, uint8 _threshold) public onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| +|`_threshold`|`uint8`|The new quorum threshold.| + + +### verify + +Verifies that a quorum of the origin domain's validators signed +a checkpoint, and verifies the merkle proof of `_message` against that +checkpoint. + + +```solidity +function verify(bytes calldata _metadata, bytes calldata _message) external view returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata (see LegacyMultisigIsmMetadata.sol)| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + + +### validators + +Gets the current validator set + + +```solidity +function validators(uint32 _domain) public view returns (address[] memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address[]`|The addresses of the validator set.| + + +### validatorsAndThreshold + +Returns the set of validators responsible for verifying _message +and the number of signatures required + +*Can change based on the content of _message* + + +```solidity +function validatorsAndThreshold(bytes calldata _message) external view returns (address[] memory, uint8); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Hyperlane formatted interchain message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address[]`|validators The array of validator addresses| +|``|`uint8`|threshold The number of validator signatures needed| + + +### validatorCount + +Returns the number of validators enrolled in the validator set. + + +```solidity +function validatorCount(uint32 _domain) public view returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|The number of validators enrolled in the validator set.| + + +### _enrollValidator + +Enrolls a validator into a validator set. + +*Reverts if `_validator` is already in the validator set.* + + +```solidity +function _enrollValidator(uint32 _domain, address _validator) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| +|`_validator`|`address`|The validator to add to the validator set.| + + +### _updateCommitment + +Updates the commitment to the validator set for `_domain`. + + +```solidity +function _updateCommitment(uint32 _domain) internal returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The remote domain of the validator set.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The commitment to the validator set for `_domain`.| + + +### _verifyMerkleProof + +Verifies the merkle proof of `_message` against the provided +checkpoint. + + +```solidity +function _verifyMerkleProof(bytes calldata _metadata, bytes calldata _message) internal pure returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata (see LegacyMultisigIsmMetadata.sol)| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + + +### _verifyValidatorSignatures + +Verifies that a quorum of the origin domain's validators signed +the provided checkpoint. + + +```solidity +function _verifyValidatorSignatures(bytes calldata _metadata, bytes calldata _message) internal view returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata (see LegacyMultisigIsmMetadata.sol)| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + + +## Events +### ValidatorEnrolled +Emitted when a validator is enrolled in a validator set. + + +```solidity +event ValidatorEnrolled(uint32 indexed domain, address indexed validator, uint256 validatorCount); +``` + +### ValidatorUnenrolled +Emitted when a validator is unenrolled from a validator set. + + +```solidity +event ValidatorUnenrolled(uint32 indexed domain, address indexed validator, uint256 validatorCount); +``` + +### ThresholdSet +Emitted when the quorum threshold is set. + + +```solidity +event ThresholdSet(uint32 indexed domain, uint8 threshold); +``` + +### CommitmentUpdated +Emitted when the validator set or threshold changes. + + +```solidity +event CommitmentUpdated(uint32 domain, bytes32 commitment); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md new file mode 100644 index 0000000..58640e0 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md @@ -0,0 +1,12 @@ + + +# Contents +- [AbstractMerkleRootMultisigIsm](AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md) +- [AbstractMessageIdMultisigIsm](AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md) +- [AbstractMultisigIsm](AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) +- [LegacyMultisigIsm](LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) +- [AbstractMetaProxyMultisigIsm](StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) +- [StaticMerkleRootMultisigIsm](StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md) +- [StaticMessageIdMultisigIsm](StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md) +- [StaticMerkleRootMultisigIsmFactory](StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md) +- [StaticMessageIdMultisigIsmFactory](StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md new file mode 100644 index 0000000..b57e8f3 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md @@ -0,0 +1,36 @@ +# AbstractMetaProxyMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/StaticMultisigIsm.sol) + +**Inherits:** +[AbstractMultisigIsm](/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) + +Manages per-domain m-of-n Validator set that is used +to verify interchain messages. + + +## Functions +### validatorsAndThreshold + +Returns the set of validators responsible for verifying _message +and the number of signatures required + +*Can change based on the content of _message* + + +```solidity +function validatorsAndThreshold(bytes calldata) public pure override returns (address[] memory, uint8); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address[]`|validators The array of validator addresses| +|``|`uint8`|threshold The number of validator signatures needed| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md new file mode 100644 index 0000000..7bca9ec --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md @@ -0,0 +1,11 @@ +# StaticMerkleRootMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/StaticMultisigIsm.sol) + +**Inherits:** +[AbstractMerkleRootMultisigIsm](/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md), [AbstractMetaProxyMultisigIsm](/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) + +Manages per-domain m-of-n validator set that is used +to verify interchain messages using a merkle root signature quorum +and merkle proof of inclusion. + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md new file mode 100644 index 0000000..acd29ae --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md @@ -0,0 +1,15 @@ +# StaticMerkleRootMultisigIsmFactory +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/StaticMultisigIsm.sol) + +**Inherits:** +[StaticMOfNAddressSetFactory](/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) + + +## Functions +### _deployImplementation + + +```solidity +function _deployImplementation() internal override returns (address); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md new file mode 100644 index 0000000..8c58540 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md @@ -0,0 +1,10 @@ +# StaticMessageIdMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/StaticMultisigIsm.sol) + +**Inherits:** +[AbstractMessageIdMultisigIsm](/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md), [AbstractMetaProxyMultisigIsm](/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) + +Manages per-domain m-of-n validator set that is used +to verify interchain messages using a message ID signature quorum. + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md new file mode 100644 index 0000000..dbb3aa6 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md @@ -0,0 +1,15 @@ +# StaticMessageIdMultisigIsmFactory +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/multisig/StaticMultisigIsm.sol) + +**Inherits:** +[StaticMOfNAddressSetFactory](/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) + + +## Functions +### _deployImplementation + + +```solidity +function _deployImplementation() internal override returns (address); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md new file mode 100644 index 0000000..e9cafd7 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md @@ -0,0 +1,44 @@ +# AbstractNativeISM +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/native/AbstractNativeISM.sol) + +**Inherits:** +[IInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md), Initializable + +Uses the native bridges to verify interchain messages. + +*In the future, the hook might be moved inside the Mailbox which doesn't require storage mappings for senders. +for more details see https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/2381* + + +## State Variables +### verifiedMessageIds + +```solidity +mapping(bytes32 => mapping(address => bool)) public verifiedMessageIds; +``` + + +## Functions +### verify + +Verify a message was received by ISM. + + +```solidity +function verify(bytes calldata, bytes calldata _message) external view returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|| +|`_message`|`bytes`|Message to verify.| + + +## Events +### ReceivedMessage + +```solidity +event ReceivedMessage(address indexed sender, bytes32 indexed messageId); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md new file mode 100644 index 0000000..1814148 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md @@ -0,0 +1,66 @@ +# OptimismISM +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/native/OptimismISM.sol) + +**Inherits:** +CrossChainEnabledOptimism, [AbstractNativeISM](/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md) + +Uses the native Optimism bridge to verify interchain messages. + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.NULL); +``` + + +### l1Hook + +```solidity +address public l1Hook; +``` + + +## Functions +### isAuthorized + +Check if sender is authorized to message `verifyMessageId`. + + +```solidity +modifier isAuthorized(); +``` + +### constructor + + +```solidity +constructor(address _l2Messenger) CrossChainEnabledOptimism(_l2Messenger); +``` + +### setOptimismHook + + +```solidity +function setOptimismHook(address _l1Hook) external initializer; +``` + +### verifyMessageId + +Receive a message from the L2 messenger. + +*Only callable by the L2 messenger.* + + +```solidity +function verifyMessageId(address _sender, bytes32 _messageId) external isAuthorized; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_sender`|`address`|Address of the sender.| +|`_messageId`|`bytes32`|Hyperlane ID for the message.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md new file mode 100644 index 0000000..98ee366 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [AbstractNativeISM](AbstractNativeISM.sol/abstract.AbstractNativeISM.md) +- [OptimismISM](OptimismISM.sol/contract.OptimismISM.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md new file mode 100644 index 0000000..8a69d4b --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md @@ -0,0 +1,55 @@ +# AbstractRoutingIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/routing/AbstractRoutingIsm.sol) + +**Inherits:** +[IRoutingIsm](/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.ROUTING); +``` + + +## Functions +### route + +Returns the ISM responsible for verifying _message + +*Can change based on the content of _message* + + +```solidity +function route(bytes calldata _message) public view virtual returns (IInterchainSecurityModule); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`IInterchainSecurityModule`|module The ISM to use to verify _message| + + +### verify + +Routes _metadata and _message to the correct ISM + + +```solidity +function verify(bytes calldata _metadata, bytes calldata _message) public returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded module metadata| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md new file mode 100644 index 0000000..af59c0e --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md @@ -0,0 +1,112 @@ +# DomainRoutingIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/routing/DomainRoutingIsm.sol) + +**Inherits:** +[AbstractRoutingIsm](/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md), OwnableUpgradeable + + +## State Variables +### modules + +```solidity +mapping(uint32 => IInterchainSecurityModule) public modules; +``` + + +## Functions +### initialize + + +```solidity +function initialize(address _owner) public initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The owner of the contract.| + + +### initialize + +Sets the ISMs to be used for the specified origin domains + + +```solidity +function initialize(address _owner, uint32[] calldata _domains, IInterchainSecurityModule[] calldata _modules) + public + initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The owner of the contract.| +|`_domains`|`uint32[]`|The origin domains| +|`_modules`|`IInterchainSecurityModule[]`|The ISMs to use to verify messages| + + +### set + +Sets the ISM to be used for the specified origin domain + + +```solidity +function set(uint32 _domain, IInterchainSecurityModule _module) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The origin domain| +|`_module`|`IInterchainSecurityModule`|The ISM to use to verify messages| + + +### route + +Returns the ISM responsible for verifying _message + +*Can change based on the content of _message* + + +```solidity +function route(bytes calldata _message) public view virtual override returns (IInterchainSecurityModule); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`IInterchainSecurityModule`|module The ISM to use to verify _message| + + +### _set + +Sets the ISM to be used for the specified origin domain + + +```solidity +function _set(uint32 _domain, IInterchainSecurityModule _module) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domain`|`uint32`|The origin domain| +|`_module`|`IInterchainSecurityModule`|The ISM to use to verify messages| + + +## Events +### ModuleSet +Emitted when a module is set for a domain + + +```solidity +event ModuleSet(uint32 indexed domain, IInterchainSecurityModule module); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md new file mode 100644 index 0000000..e3236e1 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md @@ -0,0 +1,47 @@ +# DomainRoutingIsmFactory +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/routing/DomainRoutingIsmFactory.sol) + + +## State Variables +### _implementation + +```solidity +address private immutable _implementation; +``` + + +## Functions +### constructor + + +```solidity +constructor(); +``` + +### deploy + +Deploys and initializes a DomainRoutingIsm using a minimal proxy + + +```solidity +function deploy(uint32[] calldata _domains, IInterchainSecurityModule[] calldata _modules) + external + returns (DomainRoutingIsm); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_domains`|`uint32[]`|The origin domains| +|`_modules`|`IInterchainSecurityModule[]`|The ISMs to use to verify messages| + + +## Events +### ModuleDeployed +Emitted when a routing module is deployed + + +```solidity +event ModuleDeployed(DomainRoutingIsm module); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md new file mode 100644 index 0000000..fffd5be --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md @@ -0,0 +1,44 @@ +# InterchainAccountIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/isms/routing/InterchainAccountIsm.sol) + +**Inherits:** +[AbstractRoutingIsm](/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) + + +## State Variables +### mailbox + +```solidity +IMailbox private immutable mailbox; +``` + + +## Functions +### constructor + + +```solidity +constructor(address _mailbox); +``` + +### route + +Returns the ISM responsible for verifying _message + + +```solidity +function route(bytes calldata _message) public view virtual override returns (IInterchainSecurityModule); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`IInterchainSecurityModule`|module The ISM to use to verify _message| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md new file mode 100644 index 0000000..97abb3a --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md @@ -0,0 +1,7 @@ + + +# Contents +- [AbstractRoutingIsm](AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) +- [DomainRoutingIsm](DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) +- [DomainRoutingIsmFactory](DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) +- [InterchainAccountIsm](InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md new file mode 100644 index 0000000..ed4bad3 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md @@ -0,0 +1,124 @@ +# CallLib +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/Call.sol) + + +## Functions +### call + + +```solidity +function call(Call memory _call) internal returns (bytes memory returnData); +``` + +### staticcall + + +```solidity +function staticcall(StaticCall memory _call) private view returns (bytes memory); +``` + +### staticcall + + +```solidity +function staticcall(StaticCallWithCallback memory _call) internal view returns (bytes memory callback); +``` + +### multicall + + +```solidity +function multicall(Call[] memory calls) internal; +``` + +### multistaticcall + + +```solidity +function multistaticcall(StaticCallWithCallback[] memory _calls) internal view returns (bytes[] memory); +``` + +### multicallto + + +```solidity +function multicallto(address to, bytes[] memory calls) internal; +``` + +### build + + +```solidity +function build(bytes32 to, bytes memory data) internal pure returns (StaticCall memory); +``` + +### build + + +```solidity +function build(address to, bytes memory data) internal pure returns (StaticCall memory); +``` + +### build + + +```solidity +function build(bytes32 to, uint256 value, bytes memory data) internal pure returns (Call memory); +``` + +### build + + +```solidity +function build(address to, uint256 value, bytes memory data) internal pure returns (Call memory); +``` + +### build + + +```solidity +function build(bytes32 to, bytes memory data, bytes memory callback) + internal + pure + returns (StaticCallWithCallback memory); +``` + +### build + + +```solidity +function build(address to, bytes memory data, bytes memory callback) + internal + pure + returns (StaticCallWithCallback memory); +``` + +## Structs +### StaticCall + +```solidity +struct StaticCall { + bytes32 to; + bytes data; +} +``` + +### Call + +```solidity +struct Call { + bytes32 to; + uint256 value; + bytes data; +} +``` + +### StaticCallWithCallback + +```solidity +struct StaticCallWithCallback { + StaticCall _call; + bytes callback; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md new file mode 100644 index 0000000..919b18d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md @@ -0,0 +1,61 @@ +# CheckpointLib +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/CheckpointLib.sol) + + +## Functions +### digest + +Returns the digest validators are expected to sign when signing checkpoints. + +*Message ID must match leaf content of checkpoint root at index.* + + +```solidity +function digest( + uint32 _origin, + bytes32 _originMailbox, + bytes32 _checkpointRoot, + uint32 _checkpointIndex, + bytes32 _messageId +) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The origin domain of the checkpoint.| +|`_originMailbox`|`bytes32`|The address of the origin mailbox as bytes32.| +|`_checkpointRoot`|`bytes32`|The root of the checkpoint.| +|`_checkpointIndex`|`uint32`|The index of the checkpoint.| +|`_messageId`|`bytes32`|The message ID of the checkpoint.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The digest of the checkpoint.| + + +### domainHash + +Returns the domain hash that validators are expected to use +when signing checkpoints. + + +```solidity +function domainHash(uint32 _origin, bytes32 _originMailbox) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The origin domain of the checkpoint.| +|`_originMailbox`|`bytes32`|The address of the origin mailbox as bytes32.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The domain hash.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md new file mode 100644 index 0000000..083c322 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md @@ -0,0 +1,63 @@ +# EnumerableMapExtended +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/EnumerableMapExtended.sol) + + +## Functions +### keys + + +```solidity +function keys(UintToBytes32Map storage map) internal view returns (bytes32[] storage); +``` + +### set + + +```solidity +function set(UintToBytes32Map storage map, uint256 key, bytes32 value) internal; +``` + +### get + + +```solidity +function get(UintToBytes32Map storage map, uint256 key) internal view returns (bytes32); +``` + +### remove + + +```solidity +function remove(UintToBytes32Map storage map, uint256 key) internal returns (bool); +``` + +### contains + + +```solidity +function contains(UintToBytes32Map storage map, uint256 key) internal view returns (bool); +``` + +### length + + +```solidity +function length(UintToBytes32Map storage map) internal view returns (uint256); +``` + +### at + + +```solidity +function at(UintToBytes32Map storage map, uint256 index) internal view returns (uint256, bytes32); +``` + +## Structs +### UintToBytes32Map + +```solidity +struct UintToBytes32Map { + EnumerableMap.Bytes32ToBytes32Map _inner; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md new file mode 100644 index 0000000..1008e73 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md @@ -0,0 +1,55 @@ +# LegacyCheckpointLib +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/LegacyCheckpointLib.sol) + + +## Functions +### digest + +Returns the digest validators are expected to sign when signing legacy checkpoints. + + +```solidity +function digest(uint32 _origin, bytes32 _originMailbox, bytes32 _checkpointRoot, uint32 _checkpointIndex) + internal + pure + returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The origin domain of the checkpoint.| +|`_originMailbox`|`bytes32`|The address of the origin mailbox as bytes32.| +|`_checkpointRoot`|`bytes32`|| +|`_checkpointIndex`|`uint32`|| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The digest of the legacy checkpoint.| + + +### domainHash + +Returns the domain hash that validators are expected to use +when signing checkpoints. + + +```solidity +function domainHash(uint32 _origin, bytes32 _originMailbox) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The origin domain of the checkpoint.| +|`_originMailbox`|`bytes32`|The address of the origin mailbox as bytes32.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The domain hash.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md new file mode 100644 index 0000000..eb99d1d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md @@ -0,0 +1,354 @@ +# MerkleLib +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/Merkle.sol) + +**Author:** +Celo Labs Inc. + +An incremental merkle tree modeled on the eth2 deposit contract. + + +## State Variables +### TREE_DEPTH + +```solidity +uint256 internal constant TREE_DEPTH = 32; +``` + + +### MAX_LEAVES + +```solidity +uint256 internal constant MAX_LEAVES = 2 ** TREE_DEPTH - 1; +``` + + +### Z_0 + +```solidity +bytes32 internal constant Z_0 = hex"0000000000000000000000000000000000000000000000000000000000000000"; +``` + + +### Z_1 + +```solidity +bytes32 internal constant Z_1 = hex"ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5"; +``` + + +### Z_2 + +```solidity +bytes32 internal constant Z_2 = hex"b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d30"; +``` + + +### Z_3 + +```solidity +bytes32 internal constant Z_3 = hex"21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba85"; +``` + + +### Z_4 + +```solidity +bytes32 internal constant Z_4 = hex"e58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a19344"; +``` + + +### Z_5 + +```solidity +bytes32 internal constant Z_5 = hex"0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d"; +``` + + +### Z_6 + +```solidity +bytes32 internal constant Z_6 = hex"887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a1968"; +``` + + +### Z_7 + +```solidity +bytes32 internal constant Z_7 = hex"ffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f83"; +``` + + +### Z_8 + +```solidity +bytes32 internal constant Z_8 = hex"9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af"; +``` + + +### Z_9 + +```solidity +bytes32 internal constant Z_9 = hex"cefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e0"; +``` + + +### Z_10 + +```solidity +bytes32 internal constant Z_10 = hex"f9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a5"; +``` + + +### Z_11 + +```solidity +bytes32 internal constant Z_11 = hex"f8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf892"; +``` + + +### Z_12 + +```solidity +bytes32 internal constant Z_12 = hex"3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c"; +``` + + +### Z_13 + +```solidity +bytes32 internal constant Z_13 = hex"c1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb"; +``` + + +### Z_14 + +```solidity +bytes32 internal constant Z_14 = hex"5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc"; +``` + + +### Z_15 + +```solidity +bytes32 internal constant Z_15 = hex"da7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d2"; +``` + + +### Z_16 + +```solidity +bytes32 internal constant Z_16 = hex"2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f"; +``` + + +### Z_17 + +```solidity +bytes32 internal constant Z_17 = hex"e1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a"; +``` + + +### Z_18 + +```solidity +bytes32 internal constant Z_18 = hex"5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a0"; +``` + + +### Z_19 + +```solidity +bytes32 internal constant Z_19 = hex"b46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa0"; +``` + + +### Z_20 + +```solidity +bytes32 internal constant Z_20 = hex"c65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e2"; +``` + + +### Z_21 + +```solidity +bytes32 internal constant Z_21 = hex"f4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd9"; +``` + + +### Z_22 + +```solidity +bytes32 internal constant Z_22 = hex"5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e377"; +``` + + +### Z_23 + +```solidity +bytes32 internal constant Z_23 = hex"4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee652"; +``` + + +### Z_24 + +```solidity +bytes32 internal constant Z_24 = hex"cdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef"; +``` + + +### Z_25 + +```solidity +bytes32 internal constant Z_25 = hex"0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d"; +``` + + +### Z_26 + +```solidity +bytes32 internal constant Z_26 = hex"b8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d0"; +``` + + +### Z_27 + +```solidity +bytes32 internal constant Z_27 = hex"838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e"; +``` + + +### Z_28 + +```solidity +bytes32 internal constant Z_28 = hex"662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e"; +``` + + +### Z_29 + +```solidity +bytes32 internal constant Z_29 = hex"388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea322"; +``` + + +### Z_30 + +```solidity +bytes32 internal constant Z_30 = hex"93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d735"; +``` + + +### Z_31 + +```solidity +bytes32 internal constant Z_31 = hex"8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a9"; +``` + + +## Functions +### insert + +Inserts `_node` into merkle tree + +*Reverts if tree is full* + + +```solidity +function insert(Tree storage _tree, bytes32 _node) internal; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_tree`|`Tree`|| +|`_node`|`bytes32`|Element to insert into tree| + + +### rootWithCtx + +Calculates and returns`_tree`'s current root given array of zero +hashes + + +```solidity +function rootWithCtx(Tree storage _tree, bytes32[TREE_DEPTH] memory _zeroes) internal view returns (bytes32 _current); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_tree`|`Tree`|| +|`_zeroes`|`bytes32[TREE_DEPTH]`|Array of zero hashes| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_current`|`bytes32`|Calculated root of `_tree`| + + +### root + +Calculates and returns`_tree`'s current root + + +```solidity +function root(Tree storage _tree) internal view returns (bytes32); +``` + +### zeroHashes + +Returns array of TREE_DEPTH zero hashes + + +```solidity +function zeroHashes() internal pure returns (bytes32[TREE_DEPTH] memory _zeroes); +``` +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_zeroes`|`bytes32[TREE_DEPTH]`|Array of TREE_DEPTH zero hashes| + + +### branchRoot + +Calculates and returns the merkle root for the given leaf +`_item`, a merkle branch, and the index of `_item` in the tree. + + +```solidity +function branchRoot(bytes32 _item, bytes32[TREE_DEPTH] memory _branch, uint256 _index) + internal + pure + returns (bytes32 _current); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_item`|`bytes32`|Merkle leaf| +|`_branch`|`bytes32[TREE_DEPTH]`|Merkle proof| +|`_index`|`uint256`|Index of `_item` in tree| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_current`|`bytes32`|Calculated merkle root| + + +## Structs +### Tree +Struct representing incremental merkle tree. Contains current +branch and the number of inserted leaves in the tree. + + +```solidity +struct Tree { + bytes32[TREE_DEPTH] branch; + uint256 count; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md new file mode 100644 index 0000000..39c3e36 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md @@ -0,0 +1,304 @@ +# Message +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/Message.sol) + +Library for formatted messages used by Mailbox + + +## State Variables +### VERSION_OFFSET + +```solidity +uint256 private constant VERSION_OFFSET = 0; +``` + + +### NONCE_OFFSET + +```solidity +uint256 private constant NONCE_OFFSET = 1; +``` + + +### ORIGIN_OFFSET + +```solidity +uint256 private constant ORIGIN_OFFSET = 5; +``` + + +### SENDER_OFFSET + +```solidity +uint256 private constant SENDER_OFFSET = 9; +``` + + +### DESTINATION_OFFSET + +```solidity +uint256 private constant DESTINATION_OFFSET = 41; +``` + + +### RECIPIENT_OFFSET + +```solidity +uint256 private constant RECIPIENT_OFFSET = 45; +``` + + +### BODY_OFFSET + +```solidity +uint256 private constant BODY_OFFSET = 77; +``` + + +## Functions +### formatMessage + +Returns formatted (packed) Hyperlane message with provided fields + +*This function should only be used in memory message construction.* + + +```solidity +function formatMessage( + uint8 _version, + uint32 _nonce, + uint32 _originDomain, + bytes32 _sender, + uint32 _destinationDomain, + bytes32 _recipient, + bytes calldata _messageBody +) internal pure returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_version`|`uint8`|The version of the origin and destination Mailboxes| +|`_nonce`|`uint32`|A nonce to uniquely identify the message on its origin chain| +|`_originDomain`|`uint32`|Domain of origin chain| +|`_sender`|`bytes32`|Address of sender as bytes32| +|`_destinationDomain`|`uint32`|Domain of destination chain| +|`_recipient`|`bytes32`|Address of recipient on destination chain as bytes32| +|`_messageBody`|`bytes`|Raw bytes of message body| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message| + + +### id + +Returns the message ID. + + +```solidity +function id(bytes memory _message) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|ID of `_message`| + + +### version + +Returns the message version. + + +```solidity +function version(bytes calldata _message) internal pure returns (uint8); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint8`|Version of `_message`| + + +### nonce + +Returns the message nonce. + + +```solidity +function nonce(bytes calldata _message) internal pure returns (uint32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint32`|Nonce of `_message`| + + +### origin + +Returns the message origin domain. + + +```solidity +function origin(bytes calldata _message) internal pure returns (uint32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint32`|Origin domain of `_message`| + + +### sender + +Returns the message sender as bytes32. + + +```solidity +function sender(bytes calldata _message) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Sender of `_message` as bytes32| + + +### senderAddress + +Returns the message sender as address. + + +```solidity +function senderAddress(bytes calldata _message) internal pure returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|Sender of `_message` as address| + + +### destination + +Returns the message destination domain. + + +```solidity +function destination(bytes calldata _message) internal pure returns (uint32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint32`|Destination domain of `_message`| + + +### recipient + +Returns the message recipient as bytes32. + + +```solidity +function recipient(bytes calldata _message) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Recipient of `_message` as bytes32| + + +### recipientAddress + +Returns the message recipient as address. + + +```solidity +function recipientAddress(bytes calldata _message) internal pure returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|Recipient of `_message` as address| + + +### body + +Returns the message body. + + +```solidity +function body(bytes calldata _message) internal pure returns (bytes calldata); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|ABI encoded Hyperlane message.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Body of `_message`| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md new file mode 100644 index 0000000..b0a9171 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md @@ -0,0 +1,36 @@ +# MetaProxy +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/MetaProxy.sol) + +*Adapted from https://eips.ethereum.org/EIPS/eip-3448* + + +## State Variables +### PREFIX + +```solidity +bytes32 private constant PREFIX = hex"600b380380600b3d393df3363d3d373d3d3d3d60368038038091363936013d73"; +``` + + +### SUFFIX + +```solidity +bytes13 private constant SUFFIX = hex"5af43d3d93803e603457fd5bf3"; +``` + + +## Functions +### bytecode + + +```solidity +function bytecode(address _implementation, bytes memory _metadata) internal pure returns (bytes memory); +``` + +### metadata + + +```solidity +function metadata() internal pure returns (bytes memory); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md new file mode 100644 index 0000000..09ab5f2 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md @@ -0,0 +1,34 @@ +# MinimalProxy +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/MinimalProxy.sol) + + +## State Variables +### PREFIX + +```solidity +bytes20 private constant PREFIX = hex"3d602d80600a3d3981f3363d3d373d3d3d363d73"; +``` + + +### SUFFIX + +```solidity +bytes15 private constant SUFFIX = hex"5af43d82803e903d91602b57fd5bf3"; +``` + + +## Functions +### create + + +```solidity +function create(address implementation) internal returns (address proxy); +``` + +### bytecode + + +```solidity +function bytecode(address implementation) internal pure returns (bytes memory); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md new file mode 100644 index 0000000..99b0376 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md @@ -0,0 +1,16 @@ + + +# Contents +- [isms](/contracts/libs/isms) +- [middleware](/contracts/libs/middleware) +- [CallLib](Call.sol/library.CallLib.md) +- [CheckpointLib](CheckpointLib.sol/library.CheckpointLib.md) +- [EnumerableMapExtended](EnumerableMapExtended.sol/library.EnumerableMapExtended.md) +- [LegacyCheckpointLib](LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md) +- [MerkleLib](Merkle.sol/library.MerkleLib.md) +- [Message](Message.sol/library.Message.md) +- [MetaProxy](MetaProxy.sol/library.MetaProxy.md) +- [MinimalProxy](MinimalProxy.sol/library.MinimalProxy.md) +- [StaticMOfNAddressSetFactory](StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) +- [TypeCasts](TypeCasts.sol/library.TypeCasts.md) +- [ValidatorAnnouncements](ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md new file mode 100644 index 0000000..7df2dc2 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md @@ -0,0 +1,123 @@ +# StaticMOfNAddressSetFactory +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/StaticMOfNAddressSetFactory.sol) + + +## State Variables +### _implementation + +```solidity +address private immutable _implementation; +``` + + +## Functions +### constructor + + +```solidity +constructor(); +``` + +### _deployImplementation + + +```solidity +function _deployImplementation() internal virtual returns (address); +``` + +### deploy + +Deploys a StaticMOfNAddressSet contract address for the given +values + +*Consider sorting addresses to ensure contract reuse* + + +```solidity +function deploy(address[] calldata _values, uint8 _threshold) external returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_values`|`address[]`|An array of addresses| +|`_threshold`|`uint8`|The threshold value to use| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|set The contract address representing this StaticMOfNAddressSet| + + +### getAddress + +Returns the StaticMOfNAddressSet contract address for the given +values + +*Consider sorting addresses to ensure contract reuse* + + +```solidity +function getAddress(address[] calldata _values, uint8 _threshold) external view returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_values`|`address[]`|An array of addresses| +|`_threshold`|`uint8`|The threshold value to use| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|set The contract address representing this StaticMOfNAddressSet| + + +### _getAddress + +Returns the StaticMOfNAddressSet contract address for the given +values + + +```solidity +function _getAddress(bytes32 _salt, bytes memory _bytecode) private view returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_salt`|`bytes32`|The salt used in Create2| +|`_bytecode`|`bytes`|The metaproxy bytecode used in Create2| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|set The contract address representing this StaticMOfNAddressSet| + + +### _saltAndBytecode + +Returns the create2 salt and bytecode for the given values + + +```solidity +function _saltAndBytecode(address[] calldata _values, uint8 _threshold) private view returns (bytes32, bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_values`|`address[]`|An array of addresses| +|`_threshold`|`uint8`|The threshold value to use| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|_salt The salt used in Create2| +|``|`bytes`|_bytecode The metaproxy bytecode used in Create2| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TestMerkle.sol/contract.MerkleTree.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TestMerkle.sol/contract.MerkleTree.md new file mode 100644 index 0000000..d70c967 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TestMerkle.sol/contract.MerkleTree.md @@ -0,0 +1,66 @@ +# MerkleTree +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/TestMerkle.sol) + + +## Functions +### constructor + + +```solidity +constructor(); +``` + +### hashLeafPairs + + +```solidity +function hashLeafPairs(bytes32 left, bytes32 right) public pure returns (bytes32 _hash); +``` + +### getRoot + +PROOF GENERATION * + + +```solidity +function getRoot(bytes32[] memory data) public pure returns (bytes32); +``` + +### getProof + + +```solidity +function getProof(bytes32[] memory data, uint256 node) public pure returns (bytes32[] memory); +``` + +### hashLevel + +*function is private to prevent unsafe data from being passed* + + +```solidity +function hashLevel(bytes32[] memory data) private pure returns (bytes32[] memory); +``` + +### log2ceil + +MATH "LIBRARY" * + +*Note that x is assumed > 0* + + +```solidity +function log2ceil(uint256 x) public pure returns (uint256); +``` + +### log2ceilBitMagic + +Original bitmagic adapted from https://github.com/paulrberg/prb-math/blob/main/contracts/PRBMath.sol + +*Note that x assumed > 1* + + +```solidity +function log2ceilBitMagic(uint256 x) public pure returns (uint256); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md new file mode 100644 index 0000000..119b9fc --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md @@ -0,0 +1,19 @@ +# TypeCasts +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/TypeCasts.sol) + + +## Functions +### addressToBytes32 + + +```solidity +function addressToBytes32(address _addr) internal pure returns (bytes32); +``` + +### bytes32ToAddress + + +```solidity +function bytes32ToAddress(bytes32 _buf) internal pure returns (address); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md new file mode 100644 index 0000000..02f7a39 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md @@ -0,0 +1,31 @@ +# ValidatorAnnouncements +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/ValidatorAnnouncements.sol) + + +## Functions +### getAnnouncementDigest + +Returns the digest validators are expected to sign when signing announcements. + + +```solidity +function getAnnouncementDigest(address _mailbox, uint32 _localDomain, string memory _storageLocation) + internal + pure + returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|Address of the mailbox being validated| +|`_localDomain`|`uint32`|Domain of chain on which the contract is deployed| +|`_storageLocation`|`string`|Storage location string.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The digest of the announcement.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md new file mode 100644 index 0000000..fbea98a --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md @@ -0,0 +1,97 @@ +# AggregationIsmMetadata +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/isms/AggregationIsmMetadata.sol) + +Format of metadata: +[????:????] Metadata start/end uint32 ranges, packed as uint64 +[????:????] ISM metadata, packed encoding + + +## State Variables +### RANGE_SIZE + +```solidity +uint256 private constant RANGE_SIZE = 4; +``` + + +## Functions +### hasMetadata + +Returns whether or not metadata was provided for the ISM at +`_index` + +*Callers must ensure _index is less than the number of metadatas +provided* + + +```solidity +function hasMetadata(bytes calldata _metadata, uint8 _index) internal pure returns (bool); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|Encoded Aggregation ISM metadata| +|`_index`|`uint8`|The index of the ISM to check for metadata for| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bool`|Whether or not metadata was provided for the ISM at `_index`| + + +### metadataAt + +Returns the metadata provided for the ISM at `_index` + +*Callers must ensure _index is less than the number of metadatas +provided* + +*Callers must ensure `hasMetadata(_metadata, _index)`* + + +```solidity +function metadataAt(bytes calldata _metadata, uint8 _index) internal pure returns (bytes calldata); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|Encoded Aggregation ISM metadata| +|`_index`|`uint8`|The index of the ISM to return metadata for| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|The metadata provided for the ISM at `_index`| + + +### _metadataRange + +Returns the range of the metadata provided for the ISM at +`_index`, or zeroes if not provided + +*Callers must ensure _index is less than the number of metadatas +provided* + + +```solidity +function _metadataRange(bytes calldata _metadata, uint8 _index) private pure returns (uint32, uint32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|Encoded Aggregation ISM metadata| +|`_index`|`uint8`|The index of the ISM to return metadata range for| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint32`|The range of the metadata provided for the ISM at `_index`, or zeroes if not provided| +|``|`uint32`|| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md new file mode 100644 index 0000000..7444f4d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md @@ -0,0 +1,296 @@ +# LegacyMultisigIsmMetadata +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/isms/LegacyMultisigIsmMetadata.sol) + +Format of metadata: +[ 0: 32] Merkle root +[ 32: 36] Root index +[ 36: 68] Origin mailbox address +[ 68:1092] Merkle proof +[1092:1093] Threshold +[1093:????] Validator signatures, 65 bytes each, length == Threshold +[????:????] Addresses of the entire validator set, left padded to bytes32 + + +## State Variables +### MERKLE_ROOT_OFFSET + +```solidity +uint256 private constant MERKLE_ROOT_OFFSET = 0; +``` + + +### MERKLE_INDEX_OFFSET + +```solidity +uint256 private constant MERKLE_INDEX_OFFSET = 32; +``` + + +### ORIGIN_MAILBOX_OFFSET + +```solidity +uint256 private constant ORIGIN_MAILBOX_OFFSET = 36; +``` + + +### MERKLE_PROOF_OFFSET + +```solidity +uint256 private constant MERKLE_PROOF_OFFSET = 68; +``` + + +### THRESHOLD_OFFSET + +```solidity +uint256 private constant THRESHOLD_OFFSET = 1092; +``` + + +### SIGNATURES_OFFSET + +```solidity +uint256 private constant SIGNATURES_OFFSET = 1093; +``` + + +### SIGNATURE_LENGTH + +```solidity +uint256 private constant SIGNATURE_LENGTH = 65; +``` + + +## Functions +### root + +Returns the merkle root of the signed checkpoint. + + +```solidity +function root(bytes calldata _metadata) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Merkle root of the signed checkpoint| + + +### index + +Returns the index of the signed checkpoint. + + +```solidity +function index(bytes calldata _metadata) internal pure returns (uint32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint32`|Index of the signed checkpoint| + + +### originMailbox + +Returns the origin mailbox of the signed checkpoint as bytes32. + + +```solidity +function originMailbox(bytes calldata _metadata) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Origin mailbox of the signed checkpoint as bytes32| + + +### proof + +Returns the merkle proof branch of the message. + +*This appears to be more gas efficient than returning a calldata +slice and using that.* + + +```solidity +function proof(bytes calldata _metadata) internal pure returns (bytes32[32] memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32[32]`|Merkle proof branch of the message.| + + +### threshold + +Returns the number of required signatures. Verified against +the commitment stored in the module. + + +```solidity +function threshold(bytes calldata _metadata) internal pure returns (uint8); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint8`|The number of required signatures.| + + +### signatureAt + +Returns the validator ECDSA signature at `_index`. + +*Assumes signatures are sorted by validator* + +*Assumes `_metadata` encodes `threshold` signatures.* + +*Assumes `_index` is less than `threshold`* + + +```solidity +function signatureAt(bytes calldata _metadata, uint256 _index) internal pure returns (bytes calldata); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| +|`_index`|`uint256`|The index of the signature to return.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|The validator ECDSA signature at `_index`.| + + +### validatorAt + +Returns the validator address at `_index`. + +*Assumes `_index` is less than the number of validators* + + +```solidity +function validatorAt(bytes calldata _metadata, uint256 _index) internal pure returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| +|`_index`|`uint256`|The index of the validator to return.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|The validator address at `_index`.| + + +### validators + +Returns the validator set encoded as bytes. Verified against the +commitment stored in the module. + +*Validator addresses are encoded as tightly packed array of bytes32, +sorted to match the enumerable set stored by the module.* + + +```solidity +function validators(bytes calldata _metadata) internal pure returns (bytes calldata); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|The validator set encoded as bytes.| + + +### validatorCount + +Returns the size of the validator set encoded in the metadata + +*Validator addresses are encoded as tightly packed array of bytes32, +sorted to match the enumerable set stored by the module.* + + +```solidity +function validatorCount(bytes calldata _metadata) internal pure returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|The size of the validator set encoded in the metadata| + + +### _validatorsOffset + +Returns the offset in bytes of the list of validators within +`_metadata`. + + +```solidity +function _validatorsOffset(bytes calldata _metadata) private pure returns (uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint256`|The index at which the list of validators starts| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md new file mode 100644 index 0000000..57a9b9f --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md @@ -0,0 +1,177 @@ +# MerkleRootMultisigIsmMetadata +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol) + +Format of metadata: +[ 0: 32] Origin mailbox address +[ 32: 36] Signed checkpoint index +[ 36: 68] Signed checkpoint message ID +[ 68:1092] Merkle proof +[1092:????] Validator signatures (length := threshold * 65) + + +## State Variables +### ORIGIN_MAILBOX_OFFSET + +```solidity +uint8 private constant ORIGIN_MAILBOX_OFFSET = 0; +``` + + +### CHECKPOINT_INDEX_OFFSET + +```solidity +uint8 private constant CHECKPOINT_INDEX_OFFSET = 32; +``` + + +### CHECKPOINT_MESSAGE_ID_OFFSET + +```solidity +uint8 private constant CHECKPOINT_MESSAGE_ID_OFFSET = 36; +``` + + +### MERKLE_PROOF_OFFSET + +```solidity +uint8 private constant MERKLE_PROOF_OFFSET = 68; +``` + + +### MERKLE_PROOF_LENGTH + +```solidity +uint16 private constant MERKLE_PROOF_LENGTH = 32 * 32; +``` + + +### SIGNATURES_OFFSET + +```solidity +uint16 private constant SIGNATURES_OFFSET = 1092; +``` + + +### SIGNATURE_LENGTH + +```solidity +uint8 private constant SIGNATURE_LENGTH = 65; +``` + + +## Functions +### originMailbox + +Returns the origin mailbox of the signed checkpoint as bytes32. + + +```solidity +function originMailbox(bytes calldata _metadata) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Origin mailbox of the signed checkpoint as bytes32| + + +### index + +Returns the index of the signed checkpoint. + + +```solidity +function index(bytes calldata _metadata) internal pure returns (uint32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`uint32`|Index of the signed checkpoint| + + +### messageId + +Returns the message ID of the signed checkpoint. + + +```solidity +function messageId(bytes calldata _metadata) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Message ID of the signed checkpoint| + + +### proof + +Returns the merkle proof branch of the message. + +*This appears to be more gas efficient than returning a calldata +slice and using that.* + + +```solidity +function proof(bytes calldata _metadata) internal pure returns (bytes32[32] memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32[32]`|Merkle proof branch of the message.| + + +### signatureAt + +Returns the validator ECDSA signature at `_index`. + +*Assumes signatures are sorted by validator* + +*Assumes `_metadata` encodes `threshold` signatures.* + +*Assumes `_index` is less than `threshold`* + + +```solidity +function signatureAt(bytes calldata _metadata, uint256 _index) internal pure returns (bytes calldata); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| +|`_index`|`uint256`|The index of the signature to return.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|The validator ECDSA signature at `_index`.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md new file mode 100644 index 0000000..c5d93ba --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md @@ -0,0 +1,109 @@ +# MessageIdMultisigIsmMetadata +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol) + +Format of metadata: +[ 0: 32] Origin mailbox address +[ 32: 64] Signed checkpoint root +[ 64:????] Validator signatures (length := threshold * 65) + + +## State Variables +### ORIGIN_MAILBOX_OFFSET + +```solidity +uint8 private constant ORIGIN_MAILBOX_OFFSET = 0; +``` + + +### MERKLE_ROOT_OFFSET + +```solidity +uint8 private constant MERKLE_ROOT_OFFSET = 32; +``` + + +### SIGNATURES_OFFSET + +```solidity +uint8 private constant SIGNATURES_OFFSET = 64; +``` + + +### SIGNATURE_LENGTH + +```solidity +uint8 private constant SIGNATURE_LENGTH = 65; +``` + + +## Functions +### originMailbox + +Returns the origin mailbox of the signed checkpoint as bytes32. + + +```solidity +function originMailbox(bytes calldata _metadata) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Origin mailbox of the signed checkpoint as bytes32| + + +### root + +Returns the merkle root of the signed checkpoint. + + +```solidity +function root(bytes calldata _metadata) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|Merkle root of the signed checkpoint| + + +### signatureAt + +Returns the validator ECDSA signature at `_index`. + +*Assumes signatures are sorted by validator* + +*Assumes `_metadata` encodes `threshold` signatures.* + +*Assumes `_index` is less than `threshold`* + + +```solidity +function signatureAt(bytes calldata _metadata, uint256 _index) internal pure returns (bytes calldata); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_metadata`|`bytes`|ABI encoded Multisig ISM metadata.| +|`_index`|`uint256`|The index of the signature to return.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|The validator ECDSA signature at `_index`.| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md new file mode 100644 index 0000000..8b8766b --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md @@ -0,0 +1,7 @@ + + +# Contents +- [AggregationIsmMetadata](AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) +- [LegacyMultisigIsmMetadata](LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md) +- [MerkleRootMultisigIsmMetadata](MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md) +- [MessageIdMultisigIsmMetadata](MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md new file mode 100644 index 0000000..b35381e --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md @@ -0,0 +1,134 @@ +# InterchainAccountMessage +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/middleware/InterchainAccountMessage.sol) + +Format of message: +[ 0: 32] ICA owner +[ 32: 64] ICA ISM +[ 64:????] Calls, abi encoded + + +## Functions +### encode + +Returns formatted (packed) InterchainAccountMessage + +*This function should only be used in memory message construction.* + + +```solidity +function encode(address _owner, bytes32 _ism, address _to, uint256 _value, bytes memory _data) + internal + pure + returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The owner of the interchain account| +|`_ism`|`bytes32`|The address of the remote ISM| +|`_to`|`address`|The address of the contract to call| +|`_value`|`uint256`|The value to include in the call| +|`_data`|`bytes`|The calldata| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message body| + + +### encode + +Returns formatted (packed) InterchainAccountMessage + +*This function should only be used in memory message construction.* + + +```solidity +function encode(bytes32 _owner, bytes32 _ism, CallLib.Call[] calldata _calls) internal pure returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`bytes32`|The owner of the interchain account| +|`_ism`|`bytes32`|The address of the remote ISM| +|`_calls`|`CallLib.Call[]`|The sequence of calls to make| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message body| + + +### encode + +Returns formatted (packed) InterchainAccountMessage + +*This function should only be used in memory message construction.* + + +```solidity +function encode(address _owner, bytes32 _ism, CallLib.Call[] calldata _calls) internal pure returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The owner of the interchain account| +|`_ism`|`bytes32`|The address of the remote ISM| +|`_calls`|`CallLib.Call[]`|The sequence of calls to make| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message body| + + +### decode + +Parses and returns the calls from the provided message + + +```solidity +function decode(bytes calldata _message) internal pure returns (bytes32, bytes32, CallLib.Call[] memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|The interchain account message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The array of calls| +|``|`bytes32`|| +|``|`CallLib.Call[]`|| + + +### ism + +Parses and returns the ISM address from the provided message + + +```solidity +function ism(bytes calldata _message) internal pure returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|The interchain account message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|The ISM encoded in the message| + + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md new file mode 100644 index 0000000..a338682 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md @@ -0,0 +1,203 @@ +# InterchainQueryMessage +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/middleware/InterchainQueryMessage.sol) + +Format of message: +[ 0: 32] Sender address +[ 32: 64] Message type (left padded with zeroes) +[ 64:???] Encoded call array + + +## State Variables +### SENDER_OFFSET + +```solidity +uint256 private constant SENDER_OFFSET = 0; +``` + + +### TYPE_OFFSET + +```solidity +uint256 private constant TYPE_OFFSET = 32; +``` + + +### CALLS_OFFSET + +```solidity +uint256 private constant CALLS_OFFSET = 64; +``` + + +## Functions +### sender + +Parses and returns the query sender from the provided message + + +```solidity +function sender(bytes calldata _message) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|The interchain query message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The query sender as bytes32| + + +### messageType + +Parses and returns the message type from the provided message + + +```solidity +function messageType(bytes calldata _message) internal pure returns (MessageType); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|The interchain query message| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`MessageType`|The message type (query or response)| + + +### encode + +Returns formatted InterchainQueryMessage, type == QUERY + + +```solidity +function encode(bytes32 _sender, CallLib.StaticCallWithCallback[] calldata _calls) + internal + pure + returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_sender`|`bytes32`|The query sender as bytes32| +|`_calls`|`CallLib.StaticCallWithCallback[]`|The sequence of queries to make, with the corresponding response callbacks| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message body| + + +### encode + +Returns formatted InterchainQueryMessage, type == QUERY + + +```solidity +function encode(bytes32 _sender, address _to, bytes memory _data, bytes memory _callback) + internal + pure + returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_sender`|`bytes32`|The query sender as bytes32| +|`_to`|`address`|The address of the contract to query| +|`_data`|`bytes`|The calldata encoding the query| +|`_callback`|`bytes`|The calldata of the callback that will be made on the sender. The return value of the query will be appended.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message body| + + +### callsWithCallbacks + +Parses and returns the calls and callbacks from the message + + +```solidity +function callsWithCallbacks(bytes calldata _message) + internal + pure + returns (CallLib.StaticCallWithCallback[] memory _calls); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|The interchain query message, type == QUERY| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_calls`|`CallLib.StaticCallWithCallback[]`|The sequence of queries to make with the corresponding response callbacks| + + +### encode + +Returns formatted InterchainQueryMessage, type == RESPONSE + + +```solidity +function encode(bytes32 _sender, bytes[] memory _calls) internal pure returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_sender`|`bytes32`|The query sender as bytes32| +|`_calls`|`bytes[]`|The sequence of callbacks to make| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|Formatted message body| + + +### rawCalls + +Parses and returns the callbacks from the message + + +```solidity +function rawCalls(bytes calldata _message) internal pure returns (bytes[] memory _calls); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|The interchain query message, type == RESPONSE| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_calls`|`bytes[]`|The sequence of callbacks to make| + + +## Enums +### MessageType + +```solidity +enum MessageType { + QUERY, + RESPONSE +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md new file mode 100644 index 0000000..ad238a1 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [InterchainAccountMessage](InterchainAccountMessage.sol/library.InterchainAccountMessage.md) +- [InterchainQueryMessage](InterchainQueryMessage.sol/library.InterchainQueryMessage.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md new file mode 100644 index 0000000..d87d6a6 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md @@ -0,0 +1,545 @@ +# InterchainAccountRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/InterchainAccountRouter.sol) + +**Inherits:** +[HyperlaneConnectionClient](/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md), [IRouter](/contracts/interfaces/IRouter.sol/interface.IRouter.md), [IInterchainAccountRouter](/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) + + +## State Variables +### localDomain + +```solidity +uint32 internal immutable localDomain; +``` + + +### implementation + +```solidity +address internal immutable implementation; +``` + + +### bytecodeHash + +```solidity +bytes32 internal immutable bytecodeHash; +``` + + +### _domains + +```solidity +uint32[] private _domains; +``` + + +### routers + +```solidity +mapping(uint32 => bytes32) public routers; +``` + + +### isms + +```solidity +mapping(uint32 => bytes32) public isms; +``` + + +### __GAP + +```solidity +uint256[47] private __GAP; +``` + + +## Functions +### constructor + +Constructor deploys a relay (OwnableMulticall.sol) contract that +will be cloned for each interchain account. + +*Set proxy to address(0) to use this contract without a proxy.* + + +```solidity +constructor(uint32 _localDomain, address _proxy); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_localDomain`|`uint32`|The Hyperlane domain ID on which this contract is deployed.| +|`_proxy`|`address`|The address of a proxy contract that delegates calls to this contract. Used by OwnableMulticall for access control.| + + +### initialize + +Initializes the contract with HyperlaneConnectionClient contracts + + +```solidity +function initialize( + address _mailbox, + address _interchainGasPaymaster, + address _interchainSecurityModule, + address _owner +) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract| +|`_interchainGasPaymaster`|`address`|Unused but required by HyperlaneConnectionClient| +|`_interchainSecurityModule`|`address`|The address of the local ISM contract| +|`_owner`|`address`|The address with owner privileges| + + +### enrollRemoteRouters + +Registers the address of many remote InterchainAccountRouter +contracts to use as a default when making interchain calls + + +```solidity +function enrollRemoteRouters(uint32[] calldata _destinations, bytes32[] calldata _routers) external onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinations`|`uint32[]`|The remote domains| +|`_routers`|`bytes32[]`|The addresses of the remote InterchainAccountRouters| + + +### callRemote + +Dispatches a single remote call to be made by an owner's +interchain account on the destination domain + +*Uses the default router and ISM addresses for the destination +domain, reverting if none have been configured* + + +```solidity +function callRemote(uint32 _destination, address _to, uint256 _value, bytes memory _data) external returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain of the chain to make calls on| +|`_to`|`address`|The address of the contract to call| +|`_value`|`uint256`|The value to include in the call| +|`_data`|`bytes`|The calldata| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The Hyperlane message ID| + + +### callRemote + +Dispatches a sequence of remote calls to be made by an owner's +interchain account on the destination domain + +*Uses the default router and ISM addresses for the destination +domain, reverting if none have been configured* + +*Recommend using CallLib.build to format the interchain calls.* + + +```solidity +function callRemote(uint32 _destination, CallLib.Call[] calldata _calls) external returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain of the chain to make calls on| +|`_calls`|`CallLib.Call[]`|The sequence of calls to make| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The Hyperlane message ID| + + +### handle + +Handles dispatched messages by relaying calls to the interchain account + +*Does not need to be onlyRemoteRouter, as this application is designed +to receive messages from untrusted remote contracts.* + + +```solidity +function handle(uint32 _origin, bytes32 _sender, bytes calldata _message) external onlyMailbox; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The origin domain of the interchain account| +|`_sender`|`bytes32`|The sender of the interchain message| +|`_message`|`bytes`|The InterchainAccountMessage containing the account owner, ISM, and sequence of calls to be relayed| + + +### getLocalInterchainAccount + +Returns the local address of an interchain account + +*This interchain account is not guaranteed to have been deployed* + + +```solidity +function getLocalInterchainAccount(uint32 _origin, address _owner, address _router, address _ism) + external + view + returns (OwnableMulticall); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The remote origin domain of the interchain account| +|`_owner`|`address`|The remote owner of the interchain account| +|`_router`|`address`|The remote origin InterchainAccountRouter| +|`_ism`|`address`|The local address of the ISM| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`OwnableMulticall`|The local address of the interchain account| + + +### getRemoteInterchainAccount + +Returns the remote address of a locally owned interchain account + +*This interchain account is not guaranteed to have been deployed* + +*This function will only work if the destination domain is +EVM compatible* + + +```solidity +function getRemoteInterchainAccount(uint32 _destination, address _owner) external view returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote destination domain of the interchain account| +|`_owner`|`address`|The local owner of the interchain account| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|The remote address of the interchain account| + + +### domains + + +```solidity +function domains() external view returns (uint32[] memory); +``` + +### enrollRemoteRouter + +Registers the address of a remote InterchainAccountRouter +contract to use as a default when making interchain calls + + +```solidity +function enrollRemoteRouter(uint32 _destination, bytes32 _router) public onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain| +|`_router`|`bytes32`|The address of the remote InterchainAccountRouter| + + +### enrollRemoteRouterAndIsm + +Registers the address of remote InterchainAccountRouter +and ISM contracts to use as a default when making interchain calls + + +```solidity +function enrollRemoteRouterAndIsm(uint32 _destination, bytes32 _router, bytes32 _ism) public onlyOwner; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain| +|`_router`|`bytes32`|The address of the remote InterchainAccountRouter| +|`_ism`|`bytes32`|The address of the remote ISM| + + +### callRemoteWithOverrides + +Dispatches a sequence of remote calls to be made by an owner's +interchain account on the destination domain + +*Recommend using CallLib.build to format the interchain calls* + + +```solidity +function callRemoteWithOverrides(uint32 _destination, bytes32 _router, bytes32 _ism, CallLib.Call[] calldata _calls) + public + returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain of the chain to make calls on| +|`_router`|`bytes32`|The remote router address| +|`_ism`|`bytes32`|The remote ISM address| +|`_calls`|`CallLib.Call[]`|The sequence of calls to make| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The Hyperlane message ID| + + +### getDeployedInterchainAccount + +Returns and deploys (if not already) an interchain account + + +```solidity +function getDeployedInterchainAccount(uint32 _origin, address _owner, address _router, address _ism) + public + returns (OwnableMulticall); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The remote origin domain of the interchain account| +|`_owner`|`address`|The remote owner of the interchain account| +|`_router`|`address`|The remote origin InterchainAccountRouter| +|`_ism`|`address`|The local address of the ISM| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`OwnableMulticall`|The address of the interchain account| + + +### getDeployedInterchainAccount + +Returns and deploys (if not already) an interchain account + + +```solidity +function getDeployedInterchainAccount(uint32 _origin, bytes32 _owner, bytes32 _router, address _ism) + public + returns (OwnableMulticall); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The remote origin domain of the interchain account| +|`_owner`|`bytes32`|The remote owner of the interchain account| +|`_router`|`bytes32`|The remote origin InterchainAccountRouter| +|`_ism`|`address`|The local address of the ISM| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`OwnableMulticall`|The address of the interchain account| + + +### getLocalInterchainAccount + +Returns the local address of a remotely owned interchain account + +*This interchain account is not guaranteed to have been deployed* + + +```solidity +function getLocalInterchainAccount(uint32 _origin, bytes32 _owner, bytes32 _router, address _ism) + public + view + returns (OwnableMulticall); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The remote origin domain of the interchain account| +|`_owner`|`bytes32`|The remote owner of the interchain account| +|`_router`|`bytes32`|The remote InterchainAccountRouter| +|`_ism`|`address`|The local address of the ISM| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`OwnableMulticall`|The local address of the interchain account| + + +### getRemoteInterchainAccount + +Returns the remote address of a locally owned interchain account + +*This interchain account is not guaranteed to have been deployed* + +*This function will only work if the destination domain is +EVM compatible* + + +```solidity +function getRemoteInterchainAccount(address _owner, address _router, address _ism) public view returns (address); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The local owner of the interchain account| +|`_router`|`address`|The remote InterchainAccountRouter| +|`_ism`|`address`|The remote address of the ISM| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address`|The remote address of the interchain account| + + +### _enrollRemoteRouterAndIsm + +Registers the address of remote InterchainAccountRouter +and ISM contracts to use as a default when making interchain calls + + +```solidity +function _enrollRemoteRouterAndIsm(uint32 _destination, bytes32 _router, bytes32 _ism) private; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain| +|`_router`|`bytes32`|The address of the remote InterchainAccountRouter| +|`_ism`|`bytes32`|The address of the remote ISM| + + +### _dispatchMessage + +Dispatches an InterchainAccountMessage to the remote router + + +```solidity +function _dispatchMessage(uint32 _destination, bytes32 _router, bytes32 _ism, bytes memory _body) + private + returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The remote domain| +|`_router`|`bytes32`|The address of the remote InterchainAccountRouter| +|`_ism`|`bytes32`|The address of the remote ISM| +|`_body`|`bytes`|The InterchainAccountMessage body| + + +### _getSalt + +Returns the salt used to deploy an interchain account + + +```solidity +function _getSalt(uint32 _origin, bytes32 _owner, bytes32 _router, bytes32 _ism) private pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The remote origin domain of the interchain account| +|`_owner`|`bytes32`|The remote owner of the interchain account| +|`_router`|`bytes32`|The remote origin InterchainAccountRouter| +|`_ism`|`bytes32`|The local address of the ISM| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|The CREATE2 salt used for deploying the interchain account| + + +### _getLocalInterchainAccount + +Returns the address of the interchain account on the local chain + + +```solidity +function _getLocalInterchainAccount(bytes32 _salt) private view returns (address payable); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_salt`|`bytes32`|The CREATE2 salt used for deploying the interchain account| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`address payable`|The address of the interchain account| + + +## Events +### RemoteRouterEnrolled +Emitted when a default router is set for a remote domain + + +```solidity +event RemoteRouterEnrolled(uint32 indexed domain, bytes32 router); +``` + +### RemoteIsmEnrolled +Emitted when a default ISM is set for a remote domain + + +```solidity +event RemoteIsmEnrolled(uint32 indexed domain, bytes32 ism); +``` + +### RemoteCallDispatched +Emitted when an interchain call is dispatched to a remote domain + + +```solidity +event RemoteCallDispatched(uint32 indexed destination, address indexed owner, bytes32 router, bytes32 ism); +``` + +### InterchainAccountCreated +Emitted when an interchain account contract is deployed + + +```solidity +event InterchainAccountCreated(uint32 indexed origin, bytes32 indexed owner, address ism, address account); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md new file mode 100644 index 0000000..de0d01b --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md @@ -0,0 +1,119 @@ +# InterchainQueryRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/InterchainQueryRouter.sol) + +**Inherits:** +[Router](/contracts/Router.sol/abstract.Router.md), [IInterchainQueryRouter](/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) + +*Currently does not support Sovereign Consensus (user specified Interchain Security Modules).* + + +## Functions +### initialize + +Initializes the Router contract with Hyperlane core contracts and the address of the interchain security module. + + +```solidity +function initialize( + address _mailbox, + address _interchainGasPaymaster, + address _interchainSecurityModule, + address _owner +) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| +|`_interchainSecurityModule`|`address`|The address of the interchain security module contract.| +|`_owner`|`address`|The address with owner privileges.| + + +### query + +Dispatches a sequence of static calls (query) to the destination domain and set of callbacks to resolve the results on the dispatcher. + +*Callbacks must be returned to the `msg.sender` for security reasons. Require this contract is the `msg.sender` on callbacks.* + + +```solidity +function query(uint32 _destination, address _to, bytes memory _data, bytes memory _callback) + public + returns (bytes32 messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The domain of the chain to query.| +|`_to`|`address`|The address of the contract to query| +|`_data`|`bytes`|The calldata encoding the query| +|`_callback`|`bytes`|The calldata of the callback that will be made on the sender. The return value of the query will be appended.| + + +### query + +Dispatches a sequence of static calls (query) to the destination domain and set of callbacks to resolve the results on the dispatcher. + +*Recommend using CallLib.build to format the interchain calls.* + +*Callbacks must be returned to the `msg.sender` for security reasons. Require this contract is the `msg.sender` on callbacks.* + + +```solidity +function query(uint32 _destination, CallLib.StaticCallWithCallback[] calldata calls) + public + returns (bytes32 messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The domain of the chain to query.| +|`calls`|`CallLib.StaticCallWithCallback[]`|The sequence of static calls to dispatch and callbacks on the sender to resolve the results.| + + +### _handle + +Handles a message from remote enrolled Interchain Query Router. + + +```solidity +function _handle(uint32 _origin, bytes32, bytes calldata _message) internal override; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The domain of the chain that sent the message.| +|``|`bytes32`|| +|`_message`|`bytes`|The ABI-encoded interchain query.| + + +## Events +### QueryDispatched +Emitted when a query is dispatched to another chain. + + +```solidity +event QueryDispatched(uint32 indexed destination, address indexed sender); +``` + +### QueryExecuted +Emitted when a query is executed on the and callback dispatched to the origin chain. + + +```solidity +event QueryExecuted(uint32 indexed originDomain, bytes32 indexed sender); +``` + +### QueryResolved +Emitted when a query is resolved on the origin chain. + + +```solidity +event QueryResolved(uint32 indexed destination, address indexed sender); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md new file mode 100644 index 0000000..4e6dd38 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md @@ -0,0 +1,6 @@ + + +# Contents +- [liquidity-layer](/contracts/middleware/liquidity-layer) +- [InterchainAccountRouter](InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) +- [InterchainQueryRouter](InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md new file mode 100644 index 0000000..9a1891d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md @@ -0,0 +1,81 @@ +# LiquidityLayerRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol) + +**Inherits:** +[Router](/contracts/Router.sol/abstract.Router.md), [ILiquidityLayerRouter](/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) + + +## State Variables +### liquidityLayerAdapters + +```solidity +mapping(string => address) public liquidityLayerAdapters; +``` + + +## Functions +### initialize + +Initializes the Router contract with Hyperlane core contracts and the address of the interchain security module. + + +```solidity +function initialize( + address _mailbox, + address _interchainGasPaymaster, + address _interchainSecurityModule, + address _owner +) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| +|`_interchainSecurityModule`|`address`|The address of the interchain security module contract.| +|`_owner`|`address`|The address with owner privileges.| + + +### dispatchWithTokens + + +```solidity +function dispatchWithTokens( + uint32 _destinationDomain, + bytes32 _recipientAddress, + address _token, + uint256 _amount, + string calldata _bridge, + bytes calldata _messageBody +) external returns (bytes32); +``` + +### _handle + + +```solidity +function _handle(uint32 _origin, bytes32, bytes calldata _message) internal override; +``` + +### setLiquidityLayerAdapter + + +```solidity +function setLiquidityLayerAdapter(string calldata _bridge, address _adapter) external onlyOwner; +``` + +### _getAdapter + + +```solidity +function _getAdapter(string memory _bridge) internal view returns (ILiquidityLayerAdapter _adapter); +``` + +## Events +### LiquidityLayerAdapterSet + +```solidity +event LiquidityLayerAdapterSet(string indexed bridge, address adapter); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md new file mode 100644 index 0000000..ba353c8 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md @@ -0,0 +1,6 @@ + + +# Contents +- [adapters](/contracts/middleware/liquidity-layer/adapters) +- [interfaces](/contracts/middleware/liquidity-layer/interfaces) +- [LiquidityLayerRouter](LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md new file mode 100644 index 0000000..84e2fe6 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md @@ -0,0 +1,197 @@ +# CircleBridgeAdapter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol) + +**Inherits:** +[ILiquidityLayerAdapter](/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md), [Router](/contracts/Router.sol/abstract.Router.md) + + +## State Variables +### tokenMessenger +The TokenMessenger contract. + + +```solidity +ITokenMessenger public tokenMessenger; +``` + + +### circleMessageTransmitter +The Circle MessageTransmitter contract. + + +```solidity +ICircleMessageTransmitter public circleMessageTransmitter; +``` + + +### liquidityLayerRouter +The LiquidityLayerRouter contract. + + +```solidity +address public liquidityLayerRouter; +``` + + +### hyperlaneDomainToCircleDomain +Hyperlane domain => Circle domain. +ATM, known Circle domains are Ethereum = 0 and Avalanche = 1. +Note this could result in ambiguity between the Circle domain being +Ethereum or unknown. + + +```solidity +mapping(uint32 => uint32) public hyperlaneDomainToCircleDomain; +``` + + +### tokenSymbolToAddress +Token symbol => address of token on local chain. + + +```solidity +mapping(string => IERC20) public tokenSymbolToAddress; +``` + + +### tokenAddressToSymbol +Local chain token address => token symbol. + + +```solidity +mapping(address => string) public tokenAddressToSymbol; +``` + + +## Functions +### onlyLiquidityLayerRouter + + +```solidity +modifier onlyLiquidityLayerRouter(); +``` + +### initialize + + +```solidity +function initialize( + address _owner, + address _tokenMessenger, + address _circleMessageTransmitter, + address _liquidityLayerRouter +) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_owner`|`address`|The new owner.| +|`_tokenMessenger`|`address`|The TokenMessenger contract.| +|`_circleMessageTransmitter`|`address`|The Circle MessageTransmitter contract.| +|`_liquidityLayerRouter`|`address`|The LiquidityLayerRouter contract.| + + +### sendTokens + + +```solidity +function sendTokens(uint32 _destinationDomain, bytes32, address _token, uint256 _amount) + external + onlyLiquidityLayerRouter + returns (bytes memory); +``` + +### receiveTokens + + +```solidity +function receiveTokens(uint32 _originDomain, address _recipient, uint256 _amount, bytes calldata _adapterData) + external + onlyLiquidityLayerRouter + returns (address, uint256); +``` + +### _handle + + +```solidity +function _handle(uint32, bytes32, bytes calldata) internal pure override; +``` + +### addDomain + + +```solidity +function addDomain(uint32 _hyperlaneDomain, uint32 _circleDomain) external onlyOwner; +``` + +### addToken + + +```solidity +function addToken(address _token, string calldata _tokenSymbol) external onlyOwner; +``` + +### removeToken + + +```solidity +function removeToken(address _token, string calldata _tokenSymbol) external onlyOwner; +``` + +### _circleNonceId + +Gets the Circle nonce ID by hashing _originCircleDomain and _nonce. + + +```solidity +function _circleNonceId(uint32 _originCircleDomain, uint64 _nonce) internal pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_originCircleDomain`|`uint32`|Domain of chain where the transfer originated| +|`_nonce`|`uint64`|The unique identifier for the message from source to destination| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes32`|hash of source and nonce| + + +## Events +### BridgedToken +Emits the nonce of the Circle message when a token is bridged. + + +```solidity +event BridgedToken(uint64 nonce); +``` + +### DomainAdded +Emitted when the Hyperlane domain to Circle domain mapping is updated. + + +```solidity +event DomainAdded(uint32 indexed hyperlaneDomain, uint32 circleDomain); +``` + +### TokenAdded +Emitted when a local token and its token symbol have been added. + + +```solidity +event TokenAdded(address indexed token, string indexed symbol); +``` + +### TokenRemoved +Emitted when a local token and its token symbol have been removed. + + +```solidity +event TokenRemoved(address indexed token, string indexed symbol); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md new file mode 100644 index 0000000..f7b9585 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md @@ -0,0 +1,189 @@ +# PortalAdapter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol) + +**Inherits:** +[ILiquidityLayerAdapter](/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md), [Router](/contracts/Router.sol/abstract.Router.md) + + +## State Variables +### portalTokenBridge +The Portal TokenBridge contract. + + +```solidity +IPortalTokenBridge public portalTokenBridge; +``` + + +### liquidityLayerRouter +The LiquidityLayerRouter contract. + + +```solidity +address public liquidityLayerRouter; +``` + + +### hyperlaneDomainToWormholeDomain +Hyperlane domain => Wormhole domain. + + +```solidity +mapping(uint32 => uint16) public hyperlaneDomainToWormholeDomain; +``` + + +### portalTransfersProcessed +transferId => token address + + +```solidity +mapping(bytes32 => address) public portalTransfersProcessed; +``` + + +### localDomain + +```solidity +uint32 public localDomain; +``` + + +### nonce + +```solidity +uint224 public nonce = 0; +``` + + +## Functions +### onlyLiquidityLayerRouter + + +```solidity +modifier onlyLiquidityLayerRouter(); +``` + +### initialize + + +```solidity +function initialize(uint32 _localDomain, address _owner, address _portalTokenBridge, address _liquidityLayerRouter) + public + initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_localDomain`|`uint32`|The local hyperlane domain| +|`_owner`|`address`|The new owner.| +|`_portalTokenBridge`|`address`|The Portal TokenBridge contract.| +|`_liquidityLayerRouter`|`address`|The LiquidityLayerRouter contract.| + + +### sendTokens + +Sends tokens as requested by the router + + +```solidity +function sendTokens(uint32 _destinationDomain, bytes32, address _token, uint256 _amount) + external + onlyLiquidityLayerRouter + returns (bytes memory); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destinationDomain`|`uint32`|The hyperlane domain of the destination| +|``|`bytes32`|| +|`_token`|`address`|The token address| +|`_amount`|`uint256`|The amount of tokens to send| + + +### receiveTokens + +Sends the tokens to the recipient as requested by the router + + +```solidity +function receiveTokens(uint32 _originDomain, address _recipient, uint256 _amount, bytes calldata _adapterData) + external + onlyLiquidityLayerRouter + returns (address, uint256); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_originDomain`|`uint32`|The hyperlane domain of the origin| +|`_recipient`|`address`|The address of the recipient| +|`_amount`|`uint256`|The amount of tokens to send| +|`_adapterData`|`bytes`|The adapter data from the origin chain, containing the nonce| + + +### completeTransfer + +Completes the Portal transfer which sends the funds to this adapter. +The router can call receiveTokens to move those funds to the ultimate recipient. + + +```solidity +function completeTransfer(bytes memory encodedVm) public; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`encodedVm`|`bytes`|The VAA from the Wormhole Guardians| + + +### _handle + + +```solidity +function _handle(uint32, bytes32, bytes calldata) internal pure override; +``` + +### addDomain + + +```solidity +function addDomain(uint32 _hyperlaneDomain, uint16 _wormholeDomain) external onlyOwner; +``` + +### transferId + +The key that is used to track fulfilled Portal transfers + + +```solidity +function transferId(uint32 _hyperlaneDomain, uint224 _nonce) public pure returns (bytes32); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_hyperlaneDomain`|`uint32`|The hyperlane of the origin| +|`_nonce`|`uint224`|The nonce of the adapter on the origin| + + +## Events +### BridgedToken +Emits the nonce of the Portal message when a token is bridged. + + +```solidity +event BridgedToken(uint256 nonce, uint64 portalSequence, uint32 destination); +``` + +### DomainAdded +Emitted when the Hyperlane domain to Wormhole domain mapping is updated. + + +```solidity +event DomainAdded(uint32 indexed hyperlaneDomain, uint32 wormholeDomain); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md new file mode 100644 index 0000000..ef9dc9e --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [CircleBridgeAdapter](CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) +- [PortalAdapter](PortalAdapter.sol/contract.PortalAdapter.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md new file mode 100644 index 0000000..3faa468 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md @@ -0,0 +1,23 @@ +# ILiquidityLayerAdapter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol) + + +## Functions +### sendTokens + + +```solidity +function sendTokens(uint32 _destinationDomain, bytes32 _recipientAddress, address _token, uint256 _amount) + external + returns (bytes memory _adapterData); +``` + +### receiveTokens + + +```solidity +function receiveTokens(uint32 _originDomain, address _recipientAddress, uint256 _amount, bytes calldata _adapterData) + external + returns (address, uint256); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md new file mode 100644 index 0000000..43e5502 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md @@ -0,0 +1,6 @@ + + +# Contents +- [circle](/contracts/middleware/liquidity-layer/interfaces/circle) +- [portal](/contracts/middleware/liquidity-layer/interfaces/portal) +- [ILiquidityLayerAdapter](ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md new file mode 100644 index 0000000..091e79d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md @@ -0,0 +1,54 @@ +# ICircleMessageTransmitter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol) + + +## Functions +### receiveMessage + +Receive a message. Messages with a given nonce +can only be broadcast once for a (sourceDomain, destinationDomain) +pair. The message body of a valid message is passed to the +specified recipient for further processing. + +*Attestation format: +A valid attestation is the concatenated 65-byte signature(s) of exactly +`thresholdSignature` signatures, in increasing order of attester address. +If the attester addresses recovered from signatures are not in +increasing order, signature verification will fail.*** +If incorrect number of signatures or duplicate signatures are supplied, +signature verification will fail. +Message format: +Field Bytes Type Index +version 4 uint32 0 +sourceDomain 4 uint32 4 +destinationDomain 4 uint32 8 +nonce 8 uint64 12 +sender 32 bytes32 20 +recipient 32 bytes32 52 +messageBody dynamic bytes 84* + + +```solidity +function receiveMessage(bytes memory _message, bytes calldata _attestation) external returns (bool success); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_message`|`bytes`|Message bytes| +|`_attestation`|`bytes`|Concatenated 65-byte signature(s) of `_message`, in increasing order of the attester address recovered from signatures.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`success`|`bool`|bool, true if successful| + + +### usedNonces + + +```solidity +function usedNonces(bytes32 _nonceId) external view returns (bool); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md new file mode 100644 index 0000000..c45e131 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md @@ -0,0 +1,92 @@ +# ITokenMessenger +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol) + + +## Functions +### depositForBurn + +Deposits and burns tokens from sender to be minted on destination domain. +Emits a `DepositForBurn` event. + +*reverts if: +- given burnToken is not supported +- given destinationDomain has no TokenMessenger registered +- transferFrom() reverts. For example, if sender's burnToken balance or approved allowance +to this contract is less than `amount`. +- burn() reverts. For example, if `amount` is 0. +- MessageTransmitter returns false or reverts.* + + +```solidity +function depositForBurn(uint256 _amount, uint32 _destinationDomain, bytes32 _mintRecipient, address _burnToken) + external + returns (uint64 _nonce); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_amount`|`uint256`|amount of tokens to burn| +|`_destinationDomain`|`uint32`|destination domain (ETH = 0, AVAX = 1)| +|`_mintRecipient`|`bytes32`|address of mint recipient on destination domain| +|`_burnToken`|`address`|address of contract to burn deposited tokens, on local domain| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_nonce`|`uint64`|unique nonce reserved by message| + + +### depositForBurnWithCaller + +Deposits and burns tokens from sender to be minted on destination domain. The mint +on the destination domain must be called by `_destinationCaller`. +WARNING: if the `_destinationCaller` does not represent a valid address as bytes32, then it will not be possible +to broadcast the message on the destination domain. This is an advanced feature, and the standard +depositForBurn() should be preferred for use cases where a specific destination caller is not required. +Emits a `DepositForBurn` event. + +*reverts if: +- given destinationCaller is zero address +- given burnToken is not supported +- given destinationDomain has no TokenMessenger registered +- transferFrom() reverts. For example, if sender's burnToken balance or approved allowance +to this contract is less than `amount`. +- burn() reverts. For example, if `amount` is 0. +- MessageTransmitter returns false or reverts.* + + +```solidity +function depositForBurnWithCaller( + uint256 _amount, + uint32 _destinationDomain, + bytes32 _mintRecipient, + address _burnToken, + bytes32 _destinationCaller +) external returns (uint64 _nonce); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_amount`|`uint256`|amount of tokens to burn| +|`_destinationDomain`|`uint32`|destination domain| +|`_mintRecipient`|`bytes32`|address of mint recipient on destination domain| +|`_burnToken`|`address`|address of contract to burn deposited tokens, on local domain| +|`_destinationCaller`|`bytes32`|caller on the destination domain, as bytes32| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_nonce`|`uint64`|unique nonce reserved by message| + + +## Events +### MessageSent + +```solidity +event MessageSent(bytes message); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md new file mode 100644 index 0000000..44a75ec --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [ICircleMessageTransmitter](ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) +- [ITokenMessenger](ITokenMessenger.sol/interface.ITokenMessenger.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md new file mode 100644 index 0000000..2a88171 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md @@ -0,0 +1,131 @@ +# IPortalTokenBridge +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol) + + +## Functions +### transferTokensWithPayload + + +```solidity +function transferTokensWithPayload( + address token, + uint256 amount, + uint16 recipientChain, + bytes32 recipient, + uint32 nonce, + bytes memory payload +) external payable returns (uint64 sequence); +``` + +### completeTransferWithPayload + + +```solidity +function completeTransferWithPayload(bytes memory encodedVm) external returns (bytes memory); +``` + +### parseTransferWithPayload + + +```solidity +function parseTransferWithPayload(bytes memory encoded) external pure returns (TransferWithPayload memory transfer); +``` + +### wrappedAsset + + +```solidity +function wrappedAsset(uint16 tokenChainId, bytes32 tokenAddress) external view returns (address); +``` + +### isWrappedAsset + + +```solidity +function isWrappedAsset(address token) external view returns (bool); +``` + +## Events +### ContractUpgraded + +```solidity +event ContractUpgraded(address indexed oldContract, address indexed newContract); +``` + +## Structs +### Transfer + +```solidity +struct Transfer { + uint8 payloadID; + uint256 amount; + bytes32 tokenAddress; + uint16 tokenChain; + bytes32 to; + uint16 toChain; + uint256 fee; +} +``` + +### TransferWithPayload + +```solidity +struct TransferWithPayload { + uint8 payloadID; + uint256 amount; + bytes32 tokenAddress; + uint16 tokenChain; + bytes32 to; + uint16 toChain; + bytes32 fromAddress; + bytes payload; +} +``` + +### AssetMeta + +```solidity +struct AssetMeta { + uint8 payloadID; + bytes32 tokenAddress; + uint16 tokenChain; + uint8 decimals; + bytes32 symbol; + bytes32 name; +} +``` + +### RegisterChain + +```solidity +struct RegisterChain { + bytes32 module; + uint8 action; + uint16 chainId; + uint16 emitterChainID; + bytes32 emitterAddress; +} +``` + +### UpgradeContract + +```solidity +struct UpgradeContract { + bytes32 module; + uint8 action; + uint16 chainId; + bytes32 newContract; +} +``` + +### RecoverChainId + +```solidity +struct RecoverChainId { + bytes32 module; + uint8 action; + uint256 evmChainId; + uint16 newChainId; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md new file mode 100644 index 0000000..7fda4b7 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md @@ -0,0 +1,4 @@ + + +# Contents +- [IPortalTokenBridge](IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md new file mode 100644 index 0000000..000fbaa --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md @@ -0,0 +1,58 @@ +# MockCircleMessageTransmitter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/mock/MockCircleMessageTransmitter.sol) + +**Inherits:** +[ICircleMessageTransmitter](/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) + + +## State Variables +### processedNonces + +```solidity +mapping(bytes32 => bool) processedNonces; +``` + + +### token + +```solidity +MockToken token; +``` + + +## Functions +### constructor + + +```solidity +constructor(MockToken _token); +``` + +### receiveMessage + + +```solidity +function receiveMessage(bytes memory, bytes calldata) external pure returns (bool success); +``` + +### hashSourceAndNonce + + +```solidity +function hashSourceAndNonce(uint32 _source, uint64 _nonce) public pure returns (bytes32); +``` + +### process + + +```solidity +function process(bytes32 _nonceId, address _recipient, uint256 _amount) public; +``` + +### usedNonces + + +```solidity +function usedNonces(bytes32 _nonceId) external view returns (bool); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md new file mode 100644 index 0000000..137f532 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md @@ -0,0 +1,44 @@ +# MockCircleTokenMessenger +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/mock/MockCircleTokenMessenger.sol) + +**Inherits:** +[ITokenMessenger](/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) + + +## State Variables +### nextNonce + +```solidity +uint64 public nextNonce = 0; +``` + + +### token + +```solidity +MockToken token; +``` + + +## Functions +### constructor + + +```solidity +constructor(MockToken _token); +``` + +### depositForBurn + + +```solidity +function depositForBurn(uint256 _amount, uint32, bytes32, address _burnToken) external returns (uint64 _nonce); +``` + +### depositForBurnWithCaller + + +```solidity +function depositForBurnWithCaller(uint256, uint32, bytes32, address, bytes32) external returns (uint64 _nonce); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md new file mode 100644 index 0000000..54dcd2a --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md @@ -0,0 +1,69 @@ +# MockHyperlaneEnvironment +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/mock/MockHyperlaneEnvironment.sol) + + +## State Variables +### originDomain + +```solidity +uint32 originDomain; +``` + + +### destinationDomain + +```solidity +uint32 destinationDomain; +``` + + +### mailboxes + +```solidity +mapping(uint32 => MockMailbox) public mailboxes; +``` + + +### igps + +```solidity +mapping(uint32 => TestInterchainGasPaymaster) public igps; +``` + + +### isms + +```solidity +mapping(uint32 => IInterchainSecurityModule) public isms; +``` + + +### queryRouters + +```solidity +mapping(uint32 => InterchainQueryRouter) public queryRouters; +``` + + +## Functions +### constructor + + +```solidity +constructor(uint32 _originDomain, uint32 _destinationDomain); +``` + +### processNextPendingMessage + + +```solidity +function processNextPendingMessage() public; +``` + +### processNextPendingMessageFromDestination + + +```solidity +function processNextPendingMessageFromDestination() public; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md new file mode 100644 index 0000000..49ca55f --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md @@ -0,0 +1,137 @@ +# MockMailbox +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/mock/MockMailbox.sol) + +**Inherits:** +[Versioned](/contracts/upgrade/Versioned.sol/contract.Versioned.md) + + +## State Variables +### localDomain + +```solidity +uint32 public immutable localDomain; +``` + + +### MAX_MESSAGE_BODY_BYTES + +```solidity +uint256 public constant MAX_MESSAGE_BODY_BYTES = 2 * 2 ** 10; +``` + + +### outboundNonce + +```solidity +uint32 public outboundNonce = 0; +``` + + +### inboundUnprocessedNonce + +```solidity +uint32 public inboundUnprocessedNonce = 0; +``` + + +### inboundProcessedNonce + +```solidity +uint32 public inboundProcessedNonce = 0; +``` + + +### defaultIsm + +```solidity +IInterchainSecurityModule public defaultIsm; +``` + + +### remoteMailboxes + +```solidity +mapping(uint32 => MockMailbox) public remoteMailboxes; +``` + + +### inboundMessages + +```solidity +mapping(uint256 => MockMessage) public inboundMessages; +``` + + +## Functions +### constructor + + +```solidity +constructor(uint32 _domain); +``` + +### setDefaultIsm + + +```solidity +function setDefaultIsm(IInterchainSecurityModule _module) external; +``` + +### addRemoteMailbox + + +```solidity +function addRemoteMailbox(uint32 _domain, MockMailbox _mailbox) external; +``` + +### dispatch + + +```solidity +function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes calldata _messageBody) + external + returns (bytes32); +``` + +### addInboundMessage + + +```solidity +function addInboundMessage(uint32 _nonce, uint32 _origin, address _sender, address _recipient, bytes calldata _body) + external; +``` + +### processNextInboundMessage + + +```solidity +function processNextInboundMessage() public; +``` + +### _encode + + +```solidity +function _encode(MockMessage memory _message) private view returns (bytes memory); +``` + +### _recipientIsm + + +```solidity +function _recipientIsm(address _recipient) private view returns (IInterchainSecurityModule); +``` + +## Structs +### MockMessage + +```solidity +struct MockMessage { + uint32 nonce; + uint32 origin; + address sender; + address recipient; + bytes body; +} +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md new file mode 100644 index 0000000..36ce994 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md @@ -0,0 +1,82 @@ +# MockPortalBridge +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/mock/MockPortalBridge.sol) + +**Inherits:** +[IPortalTokenBridge](/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) + + +## State Variables +### nextNonce + +```solidity +uint256 nextNonce = 0; +``` + + +### token + +```solidity +MockToken token; +``` + + +## Functions +### constructor + + +```solidity +constructor(MockToken _token); +``` + +### transferTokensWithPayload + + +```solidity +function transferTokensWithPayload(address, uint256 amount, uint16, bytes32, uint32, bytes memory) + external + payable + returns (uint64 sequence); +``` + +### wrappedAsset + + +```solidity +function wrappedAsset(uint16, bytes32) external view returns (address); +``` + +### isWrappedAsset + + +```solidity +function isWrappedAsset(address) external pure returns (bool); +``` + +### completeTransferWithPayload + + +```solidity +function completeTransferWithPayload(bytes memory encodedVm) external returns (bytes memory); +``` + +### parseTransferWithPayload + + +```solidity +function parseTransferWithPayload(bytes memory encoded) external pure returns (TransferWithPayload memory transfer); +``` + +### adapterData + + +```solidity +function adapterData(uint32 _originDomain, uint224 _nonce, address _token) public pure returns (bytes memory); +``` + +### mockPortalVaa + + +```solidity +function mockPortalVaa(uint32 _originDomain, uint224 _nonce, uint256 _amount) public pure returns (bytes memory); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md new file mode 100644 index 0000000..8eaebe4 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md @@ -0,0 +1,22 @@ +# MockToken +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/mock/MockToken.sol) + +**Inherits:** +ERC20Upgradeable + + +## Functions +### mint + + +```solidity +function mint(address account, uint256 amount) external; +``` + +### burn + + +```solidity +function burn(uint256 _amount) external; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md new file mode 100644 index 0000000..622d657 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md @@ -0,0 +1,9 @@ + + +# Contents +- [MockCircleMessageTransmitter](MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) +- [MockCircleTokenMessenger](MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) +- [MockHyperlaneEnvironment](MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) +- [MockMailbox](MockMailbox.sol/contract.MockMailbox.md) +- [MockPortalBridge](MockPortalBridge.sol/contract.MockPortalBridge.md) +- [MockToken](MockToken.sol/contract.MockToken.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md new file mode 100644 index 0000000..6e474ac --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md @@ -0,0 +1,15 @@ +# LightTestRecipient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/LightTestRecipient.sol) + +**Inherits:** +[TestRecipient](/contracts/test/TestRecipient.sol/contract.TestRecipient.md) + + +## Functions +### handle + + +```solidity +function handle(uint32 _origin, bytes32 _sender, bytes calldata _data) external override; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md new file mode 100644 index 0000000..10c7842 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md @@ -0,0 +1,20 @@ + + +# Contents +- [bad-recipient](/contracts/test/bad-recipient) +- [LightTestRecipient](LightTestRecipient.sol/contract.LightTestRecipient.md) +- [TestGasRouter](TestGasRouter.sol/contract.TestGasRouter.md) +- [TestHyperlaneConnectionClient](TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) +- [TestInterchainGasPaymaster](TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) +- [TestLegacyMultisigIsm](TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) +- [TestLiquidityLayerMessageRecipient](TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) +- [TestMailbox](TestMailbox.sol/contract.TestMailbox.md) +- [TestMerkle](TestMerkle.sol/contract.TestMerkle.md) +- [TestMessage](TestMessage.sol/contract.TestMessage.md) +- [TestMultisigIsm](TestMultisigIsm.sol/contract.TestMultisigIsm.md) +- [TestQuery](TestQuery.sol/contract.TestQuery.md) +- [TestQuerySender](TestQuerySender.sol/contract.TestQuerySender.md) +- [TestRecipient](TestRecipient.sol/contract.TestRecipient.md) +- [TestRouter](TestRouter.sol/contract.TestRouter.md) +- [TestSendReceiver](TestSendReceiver.sol/contract.TestSendReceiver.md) +- [TestTokenRecipient](TestTokenRecipient.sol/contract.TestTokenRecipient.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md new file mode 100644 index 0000000..28ba982 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md @@ -0,0 +1,27 @@ +# TestGasRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestGasRouter.sol) + +**Inherits:** +[TestRouter](/contracts/test/TestRouter.sol/contract.TestRouter.md), [GasRouter](/contracts/GasRouter.sol/abstract.GasRouter.md) + + +## Functions +### dispatchWithGas + + +```solidity +function dispatchWithGas( + uint32 _destinationDomain, + bytes memory _messageBody, + uint256 _gasPayment, + address _gasPaymentRefundAddress +) external payable; +``` + +### dispatchWithGas + + +```solidity +function dispatchWithGas(uint32 _destinationDomain, bytes memory _messageBody) external payable; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md new file mode 100644 index 0000000..7cad100 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md @@ -0,0 +1,29 @@ +# TestHyperlaneConnectionClient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestHyperlaneConnectionClient.sol) + +**Inherits:** +[HyperlaneConnectionClient](/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) + + +## Functions +### constructor + + +```solidity +constructor(); +``` + +### initialize + + +```solidity +function initialize(address _mailbox) external initializer; +``` + +### localDomain + + +```solidity +function localDomain() external view returns (uint32); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md new file mode 100644 index 0000000..168b0c8 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md @@ -0,0 +1,30 @@ +# TestInterchainGasPaymaster +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestInterchainGasPaymaster.sol) + +**Inherits:** +[InterchainGasPaymaster](/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) + + +## State Variables +### gasPrice + +```solidity +uint256 public constant gasPrice = 10; +``` + + +## Functions +### constructor + + +```solidity +constructor(address _beneficiary); +``` + +### quoteGasPayment + + +```solidity +function quoteGasPayment(uint32, uint256 gasAmount) public pure override returns (uint256); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md new file mode 100644 index 0000000..c686e55 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md @@ -0,0 +1,15 @@ +# TestLegacyMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestLegacyMultisigIsm.sol) + +**Inherits:** +[LegacyMultisigIsm](/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) + + +## Functions +### getDomainHash + + +```solidity +function getDomainHash(uint32 _origin, bytes32 _originMailbox) external pure returns (bytes32); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md new file mode 100644 index 0000000..c7c06e9 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md @@ -0,0 +1,23 @@ +# TestLiquidityLayerMessageRecipient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestLiquidityLayerMessageRecipient.sol) + +**Inherits:** +[ILiquidityLayerMessageRecipient](/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) + + +## Functions +### handleWithTokens + + +```solidity +function handleWithTokens(uint32 _origin, bytes32 _sender, bytes calldata _message, address _token, uint256 _amount) + external; +``` + +## Events +### HandledWithTokens + +```solidity +event HandledWithTokens(uint32 origin, bytes32 sender, bytes message, address token, uint256 amount); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md new file mode 100644 index 0000000..d5b95bb --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md @@ -0,0 +1,29 @@ +# TestMailbox +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestMailbox.sol) + +**Inherits:** +[Mailbox](/contracts/Mailbox.sol/contract.Mailbox.md) + + +## Functions +### constructor + + +```solidity +constructor(uint32 _localDomain) Mailbox(_localDomain); +``` + +### proof + + +```solidity +function proof() external view returns (bytes32[32] memory); +``` + +### testHandle + + +```solidity +function testHandle(uint32 _origin, bytes32 _sender, bytes32 _recipient, bytes calldata _body) external; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md new file mode 100644 index 0000000..bb3a8fd --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md @@ -0,0 +1,50 @@ +# TestMerkle +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestMerkle.sol) + + +## State Variables +### tree + +```solidity +MerkleLib.Tree public tree; +``` + + +## Functions +### constructor + + +```solidity +constructor(); +``` + +### insert + + +```solidity +function insert(bytes32 _node) external; +``` + +### branchRoot + + +```solidity +function branchRoot(bytes32 _leaf, bytes32[32] calldata _proof, uint256 _index) external pure returns (bytes32 _node); +``` + +### count + +Returns the number of inserted leaves in the tree + + +```solidity +function count() public view returns (uint256); +``` + +### root + + +```solidity +function root() public view returns (bytes32); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md new file mode 100644 index 0000000..90e6b98 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md @@ -0,0 +1,68 @@ +# TestMessage +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestMessage.sol) + + +## Functions +### version + + +```solidity +function version(bytes calldata _message) external pure returns (uint32 _version); +``` + +### nonce + + +```solidity +function nonce(bytes calldata _message) external pure returns (uint256 _nonce); +``` + +### body + + +```solidity +function body(bytes calldata _message) external pure returns (bytes calldata _body); +``` + +### origin + + +```solidity +function origin(bytes calldata _message) external pure returns (uint32 _origin); +``` + +### sender + + +```solidity +function sender(bytes calldata _message) external pure returns (bytes32 _sender); +``` + +### destination + + +```solidity +function destination(bytes calldata _message) external pure returns (uint32 _destination); +``` + +### recipient + + +```solidity +function recipient(bytes calldata _message) external pure returns (bytes32 _recipient); +``` + +### recipientAddress + + +```solidity +function recipientAddress(bytes calldata _message) external pure returns (address _recipient); +``` + +### id + + +```solidity +function id(bytes calldata _message) external pure returns (bytes32); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md new file mode 100644 index 0000000..f3fe902 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md @@ -0,0 +1,51 @@ +# TestMultisigIsm +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestMultisigIsm.sol) + +**Inherits:** +[IMultisigIsm](/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) + + +## State Variables +### moduleType + +```solidity +uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.MERKLE_ROOT_MULTISIG); +``` + + +### accept + +```solidity +bool public accept; +``` + + +## Functions +### constructor + + +```solidity +constructor(); +``` + +### validatorsAndThreshold + + +```solidity +function validatorsAndThreshold(bytes calldata) external pure returns (address[] memory, uint8); +``` + +### setAccept + + +```solidity +function setAccept(bool _val) external; +``` + +### verify + + +```solidity +function verify(bytes calldata, bytes calldata) external view returns (bool); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md new file mode 100644 index 0000000..483d097 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md @@ -0,0 +1,45 @@ +# TestQuery +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestQuery.sol) + + +## State Variables +### router + +```solidity +InterchainQueryRouter public router; +``` + + +## Functions +### constructor + + +```solidity +constructor(address _router); +``` + +### queryRouterOwner + +*Fetches owner of InterchainQueryRouter on provided domain and passes along with provided secret to `this.receiveRouterOwner`* + + +```solidity +function queryRouterOwner(uint32 domain, uint256 secret) external; +``` + +### receiveRouterOwner + +*`msg.sender` must be restricted to `this.router` to prevent any local account from spoofing query data.* + + +```solidity +function receiveRouterOwner(uint256 secret, address owner) external; +``` + +## Events +### Owner + +```solidity +event Owner(uint256, address); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md new file mode 100644 index 0000000..109dcfa --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md @@ -0,0 +1,128 @@ +# TestQuerySender +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestQuerySender.sol) + + +## State Variables +### queryRouter + +```solidity +IInterchainQueryRouter queryRouter; +``` + + +### interchainGasPaymaster + +```solidity +IInterchainGasPaymaster interchainGasPaymaster; +``` + + +### lastAddressResult + +```solidity +address public lastAddressResult; +``` + + +### lastUint256Result + +```solidity +uint256 public lastUint256Result; +``` + + +### lastBytes32Result + +```solidity +bytes32 public lastBytes32Result; +``` + + +## Functions +### initialize + + +```solidity +function initialize(address _queryRouterAddress, address _interchainGasPaymaster) external; +``` + +### queryAddress + + +```solidity +function queryAddress(uint32 _destinationDomain, address _target, bytes calldata _targetData, uint256 _gasAmount) + external + payable; +``` + +### handleQueryAddressResult + + +```solidity +function handleQueryAddressResult(address _result) external; +``` + +### queryUint256 + + +```solidity +function queryUint256(uint32 _destinationDomain, address _target, bytes calldata _targetData, uint256 _gasAmount) + external + payable; +``` + +### handleQueryUint256Result + + +```solidity +function handleQueryUint256Result(uint256 _result) external; +``` + +### queryBytes32 + + +```solidity +function queryBytes32(uint32 _destinationDomain, address _target, bytes calldata _targetData, uint256 _gasAmount) + external + payable; +``` + +### handleQueryBytes32Result + + +```solidity +function handleQueryBytes32Result(bytes32 _result) external; +``` + +### queryAndPayFor + + +```solidity +function queryAndPayFor( + uint32 _destinationDomain, + address _target, + bytes calldata _targetData, + bytes4 _callbackSelector, + uint256 _gasAmount +) internal; +``` + +## Events +### ReceivedAddressResult + +```solidity +event ReceivedAddressResult(address result); +``` + +### ReceivedUint256Result + +```solidity +event ReceivedUint256Result(uint256 result); +``` + +### ReceivedBytes32Result + +```solidity +event ReceivedBytes32Result(bytes32 result); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md new file mode 100644 index 0000000..fad27cb --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md @@ -0,0 +1,78 @@ +# TestRecipient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestRecipient.sol) + +**Inherits:** +Ownable, [IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md), [ISpecifiesInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) + + +## State Variables +### interchainSecurityModule + +```solidity +IInterchainSecurityModule public interchainSecurityModule; +``` + + +### lastSender + +```solidity +bytes32 public lastSender; +``` + + +### lastData + +```solidity +bytes public lastData; +``` + + +### lastCaller + +```solidity +address public lastCaller; +``` + + +### lastCallMessage + +```solidity +string public lastCallMessage; +``` + + +## Functions +### handle + + +```solidity +function handle(uint32 _origin, bytes32 _sender, bytes calldata _data) external virtual override; +``` + +### fooBar + + +```solidity +function fooBar(uint256 amount, string calldata message) external; +``` + +### setInterchainSecurityModule + + +```solidity +function setInterchainSecurityModule(address _ism) external onlyOwner; +``` + +## Events +### ReceivedMessage + +```solidity +event ReceivedMessage(uint32 indexed origin, bytes32 indexed sender, string message); +``` + +### ReceivedCall + +```solidity +event ReceivedCall(address indexed caller, uint256 amount, string message); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md new file mode 100644 index 0000000..7290664 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md @@ -0,0 +1,63 @@ +# TestRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestRouter.sol) + +**Inherits:** +[Router](/contracts/Router.sol/abstract.Router.md) + + +## Functions +### initialize + + +```solidity +function initialize(address _mailbox, address _interchainGasPaymaster) external initializer; +``` + +### _handle + + +```solidity +function _handle(uint32, bytes32, bytes calldata) internal pure override; +``` + +### isRemoteRouter + + +```solidity +function isRemoteRouter(uint32 _domain, bytes32 _potentialRemoteRouter) external view returns (bool); +``` + +### mustHaveRemoteRouter + + +```solidity +function mustHaveRemoteRouter(uint32 _domain) external view returns (bytes32); +``` + +### dispatch + + +```solidity +function dispatch(uint32 _destination, bytes memory _msg) external; +``` + +### dispatchWithGas + + +```solidity +function dispatchWithGas( + uint32 _destinationDomain, + bytes memory _messageBody, + uint256 _gasAmount, + uint256 _gasPayment, + address _gasPaymentRefundAddress +) external payable; +``` + +## Events +### InitializeOverload + +```solidity +event InitializeOverload(); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md new file mode 100644 index 0000000..395791d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md @@ -0,0 +1,49 @@ +# TestSendReceiver +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestSendReceiver.sol) + +**Inherits:** +[IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + + +## State Variables +### HANDLE_GAS_AMOUNT + +```solidity +uint256 public constant HANDLE_GAS_AMOUNT = 50_000; +``` + + +## Functions +### dispatchToSelf + + +```solidity +function dispatchToSelf( + IMailbox _mailbox, + IInterchainGasPaymaster _paymaster, + uint32 _destinationDomain, + bytes calldata _messageBody +) external payable; +``` + +### handle + + +```solidity +function handle(uint32, bytes32, bytes calldata) external override; +``` + +### previousBlockHash + + +```solidity +function previousBlockHash() internal view returns (bytes32); +``` + +## Events +### Handled + +```solidity +event Handled(bytes32 blockHash); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md new file mode 100644 index 0000000..19a73bd --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md @@ -0,0 +1,80 @@ +# TestTokenRecipient +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/TestTokenRecipient.sol) + +**Inherits:** +[ILiquidityLayerMessageRecipient](/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) + + +## State Variables +### lastSender + +```solidity +bytes32 public lastSender; +``` + + +### lastData + +```solidity +bytes public lastData; +``` + + +### lastToken + +```solidity +address public lastToken; +``` + + +### lastAmount + +```solidity +uint256 public lastAmount; +``` + + +### lastCaller + +```solidity +address public lastCaller; +``` + + +### lastCallMessage + +```solidity +string public lastCallMessage; +``` + + +## Functions +### handleWithTokens + + +```solidity +function handleWithTokens(uint32 _origin, bytes32 _sender, bytes calldata _data, address _token, uint256 _amount) + external + override; +``` + +### fooBar + + +```solidity +function fooBar(uint256 amount, string calldata message) external; +``` + +## Events +### ReceivedMessage + +```solidity +event ReceivedMessage(uint32 indexed origin, bytes32 indexed sender, string message, address token, uint256 amount); +``` + +### ReceivedCall + +```solidity +event ReceivedCall(address indexed caller, uint256 amount, string message); +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md new file mode 100644 index 0000000..a733458 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md @@ -0,0 +1,15 @@ +# BadRecipient1 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/bad-recipient/BadRecipient1.sol) + +**Inherits:** +[IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + + +## Functions +### handle + + +```solidity +function handle(uint32, bytes32, bytes calldata) external pure override; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md new file mode 100644 index 0000000..d6b66cb --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md @@ -0,0 +1,12 @@ +# BadRecipient2 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/bad-recipient/BadRecipient2.sol) + + +## Functions +### handle + + +```solidity +function handle(uint32, bytes32) external pure; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md new file mode 100644 index 0000000..ba22f4d --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md @@ -0,0 +1,15 @@ +# BadRecipient3 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/bad-recipient/BadRecipient3.sol) + +**Inherits:** +[IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + + +## Functions +### handle + + +```solidity +function handle(uint32, bytes32, bytes calldata) external pure override; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md new file mode 100644 index 0000000..4a2b4c4 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md @@ -0,0 +1,15 @@ +# BadRecipient5 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/bad-recipient/BadRecipient5.sol) + +**Inherits:** +[IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + + +## Functions +### handle + + +```solidity +function handle(uint32, bytes32, bytes calldata) external pure override; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md new file mode 100644 index 0000000..b3ec4a7 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md @@ -0,0 +1,15 @@ +# BadRecipient6 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/bad-recipient/BadRecipient6.sol) + +**Inherits:** +[IMessageRecipient](/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + + +## Functions +### handle + + +```solidity +function handle(uint32, bytes32, bytes calldata) external pure override; +``` + diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md new file mode 100644 index 0000000..e3c3b58 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md @@ -0,0 +1,8 @@ + + +# Contents +- [BadRecipient1](BadRecipient1.sol/contract.BadRecipient1.md) +- [BadRecipient2](BadRecipient2.sol/contract.BadRecipient2.md) +- [BadRecipient3](BadRecipient3.sol/contract.BadRecipient3.md) +- [BadRecipient5](BadRecipient5.sol/contract.BadRecipient5.md) +- [BadRecipient6](BadRecipient6.sol/contract.BadRecipient6.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md new file mode 100644 index 0000000..fb91b75 --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md @@ -0,0 +1,4 @@ + + +# Contents +- [Versioned](Versioned.sol/contract.Versioned.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md new file mode 100644 index 0000000..f01c01a --- /dev/null +++ b/apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md @@ -0,0 +1,14 @@ +# Versioned +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/upgrade/Versioned.sol) + +Version getter for contracts + + +## State Variables +### VERSION + +```solidity +uint8 public constant VERSION = 0; +``` + + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/README.md b/apis-and-sdks/building-applications/token-solidity-sdk/README.md new file mode 100644 index 0000000..4f54a7a --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/README.md @@ -0,0 +1,253 @@ +# Hyperlane Tokens and Warp Routes + +This repo contains contracts and SDK tooling for Hyperlane-connected ERC20 and ERC721 tokens. The contracts herein can be used to create [Hyperlane Warp Routes](https://docs.hyperlane.xyz/docs/deploy/deploy-warp-route) across different chains. + +For instructions on deploying Warp Routes, see [the deployment documentation](https://docs.hyperlane.xyz/docs/deploy/deploy-warp-route/deploy-a-warp-route) and the [Hyperlane-Deploy repository](https://github.com/hyperlane-xyz/hyperlane-deploy). + +## Warp Route Architecture + +A Warp Route is a collection of [`TokenRouter`](./contracts/libs/TokenRouter.sol) contracts deployed across a set of Hyperlane chains. These contracts leverage the `Router` pattern to implement access control and routing logic for remote token transfers. These contracts send and receive [`Messages`](./contracts/libs/Message.sol) which encode payloads containing a transfer `amount` and `recipient` address. + +```mermaid +%%{ init: { + "theme": "neutral", + "themeVariables": { + "mainBkg": "#025AA1", + "textColor": "white", + "clusterBkg": "white" + }, + "themeCSS": ".edgeLabel { color: black }" +}}%% + +graph LR + subgraph "Ethereum" + HYP_E[TokenRouter] + style HYP_E fill:orange + Mailbox_E[(Mailbox)] + end + + subgraph "Polygon" + HYP_P[TokenRouter] + style HYP_P fill:orange + Mailbox_P[(Mailbox)] + end + + + subgraph "Gnosis" + HYP_G[TokenRouter] + style HYP_G fill:orange + Mailbox_G[(Mailbox)] + end + + HYP_E -. "router" .- HYP_P -. "router" .- HYP_G + +``` + +The Token Router contract comes in several flavors and a warp route can be composed of a combination of these flavors. + +- [`Native`](./contracts/HypNative.sol) - for warping native assets (e.g. ETH) from the canonical chain +- [`Collateral`](./contracts/HypERC20Collateral.sol) - for warping tokens, ERC20 or ERC721, from the canonical chain +- [`Synthetic`](./contracts/HypERC20.sol) - for representing tokens, Native/ERC20 or ERC721, on a non-canonical chain + +## Interchain Security Models + +Warp routes are unique amongst token bridging solutions because they provide modular security. Because the `TokenRouter` implements the `IMessageRecipient` interface, it can be configured with a custom interchain security module. Please refer to the relevant guide to specifying interchain security modules on the [Messaging API receive docs](https://docs.hyperlane.xyz/docs/apis/messaging-api/receive#interchain-security-modules). + +## Remote Transfer Lifecycle Diagrams + +To initiate a remote transfer, users call the `TokenRouter.transferRemote` function with the `destination` chain ID, `recipient` address, and transfer `amount`. + +```solidity +interface TokenRouter { + function transferRemote( + uint32 destination, + bytes32 recipient, + uint256 amount + ) public returns (bytes32 messageId); +} + +``` + +**NOTE:** The [Relayer](https://docs.hyperlane.xyz/docs/protocol/agents/relayer) shown below must be compensated. Please refer to the relevant guide on [paying for interchain gas](https://docs.hyperlane.xyz/docs/build-with-hyperlane/guides/paying-for-interchain-gas) on the `messageID` returned from the `transferRemote` call. + +Depending on the flavor of TokenRouter on the source and destination chain, this flow looks slightly different. The following diagrams illustrate these differences. + +### Transfer Alice's `amount` native ETH from Ethereum to Bob on Polygon + +```mermaid +%%{ init: { + "theme": "neutral", + "themeVariables": { + "mainBkg": "#025AA1", + "textColor": "white", + "clusterBkg": "white" + }, + "themeCSS": ".edgeLabel { color: black }" +}}%% + +graph TB + Bob((Bob)) + style Bob fill:black + Alice((Alice)) + style Alice fill:black + + Relayer([Relayer]) + + subgraph "Ethereum" + HYP_E[NativeTokenRouter] + style HYP_E fill:orange + Mailbox_E[(Mailbox)] + end + + Alice == "transferRemote(Polygon, Bob, amount)\n{value: amount}" ==> HYP_E + linkStyle 0 color:green; + HYP_E -- "dispatch(Polygon, (Bob, amount))" --> Mailbox_E + + subgraph "Polygon" + HYP_P[SyntheticTokenRouter] + style HYP_P fill:orange + Mailbox_P[(Mailbox)] + end + + Mailbox_E -. "indexing" .-> Relayer + + Relayer == "process(Ethereum, (Bob, amount))" ==> Mailbox_P + Mailbox_P -- "handle(Ethereum, (Bob, amount))" --> HYP_P + + HYP_E -. "router" .- HYP_P + + HYP_P -- "mint(Bob, amount)" --> Bob + linkStyle 6 color:green; +``` + +### Transfer Alice's ERC20 `amount` from Ethereum to Bob on Polygon + +```mermaid +%%{ init: { + "theme": "neutral", + "themeVariables": { + "mainBkg": "#025AA1", + "textColor": "white", + "clusterBkg": "white" + }, + "themeCSS": ".edgeLabel { color: black }" +}}%% + +graph TB + Alice((Alice)) + Bob((Bob)) + style Alice fill:black + style Bob fill:black + + Relayer([Relayer]) + + subgraph "Ethereum" + Token_E[ERC20] + style Token_E fill:green + HYP_E[CollateralTokenRouter] + style HYP_E fill:orange + Mailbox_E[(Mailbox)] + end + + Alice == "approve(CollateralTokenRouter, infinity)" ==> Token_E + Alice == "transferRemote(Polygon, Bob, amount)" ==> HYP_E + Token_E -- "transferFrom(Alice, amount)" --> HYP_E + linkStyle 2 color:green; + HYP_E -- "dispatch(Polygon, (Bob, amount))" --> Mailbox_E + + subgraph "Polygon" + HYP_P[SyntheticRouter] + style HYP_P fill:orange + Mailbox_P[(Mailbox)] + end + + Mailbox_E -. "indexing" .-> Relayer + + Relayer == "process(Ethereum, (Bob, amount))" ==> Mailbox_P + Mailbox_P -- "handle(Ethereum, (Bob, amount))" --> HYP_P + + HYP_E -. "router" .- HYP_P + HYP_P -- "mint(Bob, amount)" --> Bob + linkStyle 8 color:green; +``` + +### Transfer Alice's `amount` synthetic MATIC from Ethereum back to Bob as native MATIC on Polygon + +```mermaid +%%{ init: { + "theme": "neutral", + "themeVariables": { + "mainBkg": "#025AA1", + "textColor": "white", + "clusterBkg": "white" + }, + "themeCSS": ".edgeLabel { color: black }" +}}%% + +graph TB + Bob((Bob)) + style Bob fill:black + Alice((Alice)) + style Alice fill:black + + Relayer([Relayer]) + + subgraph "Ethereum" + HYP_E[SyntheticTokenRouter] + style HYP_E fill:orange + Mailbox_E[(Mailbox)] + end + + Alice == "transferRemote(Polygon, Bob, amount)" ==> HYP_E + Alice -- "burn(Alice, amount)" --> HYP_E + linkStyle 1 color:green; + HYP_E -- "dispatch(Polygon, (Bob, amount))" --> Mailbox_E + + subgraph "Polygon" + HYP_P[NativeTokenRouter] + style HYP_P fill:orange + Mailbox_P[(Mailbox)] + end + + Mailbox_E -. "indexing" .-> Relayer + + Relayer == "process(Ethereum, (Bob, amount))" ==> Mailbox_P + Mailbox_P -- "handle(Ethereum, (Bob, amount))" --> HYP_P + + HYP_E -. "router" .- HYP_P + HYP_P -- "transfer(){value: amount}" --> Bob + linkStyle 7 color:green; +``` + +**NOTE:** ERC721 collateral variants are assumed to [enumerable](https://docs.openzeppelin.com/contracts/4.x/api/token/erc721#IERC721Enumerable) and [metadata](https://docs.openzeppelin.com/contracts/4.x/api/token/erc721#IERC721Metadata) compliant. + +## Versions + +| Git Ref | Release Date | Notes | +| ------------------------ | ------------ | ------------------------------ | +| [audit-v2-remediation]() | 2023-02-15 | Hyperlane V2 Audit remediation | +| [main]() | ~ | Bleeding edge | + +## Setup for local development + +```sh +# Install dependencies +yarn + +# Build source and generate types +yarn build:dev +``` + +## Unit testing + +```sh +# Run all unit tests +yarn test + +# Lint check code +yarn lint +``` + +## Learn more + +For more information, see the [Hyperlane introduction documentation](https://docs.hyperlane.xyz/docs/introduction/readme) or the [details about Warp Routes](https://docs.hyperlane.xyz/docs/deploy/deploy-warp-route). diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md b/apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md new file mode 100644 index 0000000..e3f2a35 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md @@ -0,0 +1,17 @@ +# Summary +- [Home](README.md) +# contracts + - [❱ extensions](contracts/extensions/README.md) + - [HypERC721URICollateral](contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) + - [HypERC721URIStorage](contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) + - [❱ libs](contracts/libs/README.md) + - [Message](contracts/libs/Message.sol/library.Message.md) + - [TokenRouter](contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + - [❱ test](contracts/test/README.md) + - [ERC20Test](contracts/test/ERC20Test.sol/contract.ERC20Test.md) + - [ERC721Test](contracts/test/ERC721Test.sol/contract.ERC721Test.md) + - [HypERC20](contracts/HypERC20.sol/contract.HypERC20.md) + - [HypERC20Collateral](contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) + - [HypERC721](contracts/HypERC721.sol/contract.HypERC721.md) + - [HypERC721Collateral](contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) + - [HypNative](contracts/HypNative.sol/contract.HypNative.md) diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md new file mode 100644 index 0000000..8e701a6 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md @@ -0,0 +1,78 @@ +# HypERC20 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/HypERC20.sol) + +**Inherits:** +ERC20Upgradeable, [TokenRouter](/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + +**Author:** +Abacus Works + +*Supply on each chain is not constant but the aggregate supply across all chains is.* + + +## State Variables +### _decimals + +```solidity +uint8 private immutable _decimals; +``` + + +## Functions +### constructor + + +```solidity +constructor(uint8 __decimals); +``` + +### initialize + +Initializes the Hyperlane router, ERC20 metadata, and mints initial supply to deployer. + + +```solidity +function initialize( + address _mailbox, + address _interchainGasPaymaster, + uint256 _totalSupply, + string memory _name, + string memory _symbol +) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| +|`_totalSupply`|`uint256`|The initial supply of the token.| +|`_name`|`string`|The name of the token.| +|`_symbol`|`string`|The symbol of the token.| + + +### decimals + + +```solidity +function decimals() public view override returns (uint8); +``` + +### _transferFromSender + +*Burns `_amount` of token from `msg.sender` balance.* + + +```solidity +function _transferFromSender(uint256 _amount) internal override returns (bytes memory); +``` + +### _transferTo + +*Mints `_amount` of token to `_recipient` balance.* + + +```solidity +function _transferTo(address _recipient, uint256 _amount, bytes calldata) internal override; +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md new file mode 100644 index 0000000..4ab6aa1 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md @@ -0,0 +1,75 @@ +# HypERC20Collateral +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/HypERC20Collateral.sol) + +**Inherits:** +[TokenRouter](/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + +**Author:** +Abacus Works + + +## State Variables +### wrappedToken + +```solidity +IERC20 public immutable wrappedToken; +``` + + +## Functions +### constructor + +Constructor + + +```solidity +constructor(address erc20); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`erc20`|`address`|Address of the token to keep as collateral| + + +### initialize + +Initializes the Hyperlane router. + + +```solidity +function initialize(address _mailbox, address _interchainGasPaymaster) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| + + +### balanceOf + + +```solidity +function balanceOf(address _account) external view returns (uint256); +``` + +### _transferFromSender + +*Transfers `_amount` of `wrappedToken` from `msg.sender` to this contract.* + + +```solidity +function _transferFromSender(uint256 _amount) internal override returns (bytes memory); +``` + +### _transferTo + +*Transfers `_amount` of `wrappedToken` from this contract to `_recipient`.* + + +```solidity +function _transferTo(address _recipient, uint256 _amount, bytes calldata) internal override; +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md new file mode 100644 index 0000000..d71362a --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md @@ -0,0 +1,54 @@ +# HypERC721 +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/HypERC721.sol) + +**Inherits:** +ERC721EnumerableUpgradeable, [TokenRouter](/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + +**Author:** +Abacus Works + + +## Functions +### initialize + +Initializes the Hyperlane router, ERC721 metadata, and mints initial supply to deployer. + + +```solidity +function initialize( + address _mailbox, + address _interchainGasPaymaster, + uint256 _mintAmount, + string memory _name, + string memory _symbol +) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| +|`_mintAmount`|`uint256`|The amount of NFTs to mint to `msg.sender`.| +|`_name`|`string`|The name of the token.| +|`_symbol`|`string`|The symbol of the token.| + + +### _transferFromSender + +*Asserts `msg.sender` is owner and burns `_tokenId`.* + + +```solidity +function _transferFromSender(uint256 _tokenId) internal virtual override returns (bytes memory); +``` + +### _transferTo + +*Mints `_tokenId` to `_recipient`.* + + +```solidity +function _transferTo(address _recipient, uint256 _tokenId, bytes calldata) internal virtual override; +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md new file mode 100644 index 0000000..664e7d2 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md @@ -0,0 +1,82 @@ +# HypERC721Collateral +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/HypERC721Collateral.sol) + +**Inherits:** +[TokenRouter](/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + +**Author:** +Abacus Works + + +## State Variables +### wrappedToken + +```solidity +IERC721 public immutable wrappedToken; +``` + + +## Functions +### constructor + +Constructor + + +```solidity +constructor(address erc721); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`erc721`|`address`|Address of the token to keep as collateral| + + +### ownerOf + + +```solidity +function ownerOf(uint256 _tokenId) external view returns (address); +``` + +### initialize + +Initializes the Hyperlane router. + + +```solidity +function initialize(address _mailbox, address _interchainGasPaymaster) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| + + +### balanceOf + + +```solidity +function balanceOf(address _account) external view returns (uint256); +``` + +### _transferFromSender + +*Transfers `_tokenId` of `wrappedToken` from `msg.sender` to this contract.* + + +```solidity +function _transferFromSender(uint256 _tokenId) internal virtual override returns (bytes memory); +``` + +### _transferTo + +*Transfers `_tokenId` of `wrappedToken` from this contract to `_recipient`.* + + +```solidity +function _transferTo(address _recipient, uint256 _tokenId, bytes calldata) internal override; +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md new file mode 100644 index 0000000..d75f4cd --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md @@ -0,0 +1,85 @@ +# HypNative +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/HypNative.sol) + +**Inherits:** +[TokenRouter](/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + +**Author:** +Abacus Works + +*Supply on each chain is not constant but the aggregate supply across all chains is.* + + +## Functions +### initialize + +Initializes the Hyperlane router, ERC20 metadata, and mints initial supply to deployer. + + +```solidity +function initialize(address _mailbox, address _interchainGasPaymaster) external initializer; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_mailbox`|`address`|The address of the mailbox contract.| +|`_interchainGasPaymaster`|`address`|The address of the interchain gas paymaster contract.| + + +### transferRemote + +Transfers `_amountOrId` token to `_recipient` on `_destination` domain. + +*uses (`msg.value` - `_amount`) as interchain gas payment and `msg.sender` as refund address.* + + +```solidity +function transferRemote(uint32 _destination, bytes32 _recipient, uint256 _amount) + public + payable + override + returns (bytes32 messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The identifier of the destination chain.| +|`_recipient`|`bytes32`|The address of the recipient on the destination chain.| +|`_amount`|`uint256`|| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`messageId`|`bytes32`|The identifier of the dispatched message.| + + +### balanceOf + + +```solidity +function balanceOf(address _account) external view returns (uint256); +``` + +### _transferFromSender + +*No-op because native amount is transferred in `msg.value`* + +*Compiler will not include this in the bytecode.* + + +```solidity +function _transferFromSender(uint256) internal pure override returns (bytes memory); +``` + +### _transferTo + +*Sends `_amount` of native token to `_recipient` balance.* + + +```solidity +function _transferTo(address _recipient, uint256 _amount, bytes calldata) internal override; +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md new file mode 100644 index 0000000..ef9d5d8 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md @@ -0,0 +1,11 @@ + + +# Contents +- [extensions](/contracts/extensions) +- [libs](/contracts/libs) +- [test](/contracts/test) +- [HypERC20](HypERC20.sol/contract.HypERC20.md) +- [HypERC20Collateral](HypERC20Collateral.sol/contract.HypERC20Collateral.md) +- [HypERC721](HypERC721.sol/contract.HypERC721.md) +- [HypERC721Collateral](HypERC721Collateral.sol/contract.HypERC721Collateral.md) +- [HypNative](HypNative.sol/contract.HypNative.md) diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md new file mode 100644 index 0000000..01b0312 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md @@ -0,0 +1,33 @@ +# HypERC721URICollateral +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/extensions/HypERC721URICollateral.sol) + +**Inherits:** +[HypERC721Collateral](/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) + +**Author:** +Abacus Works + + +## Functions +### constructor + + +```solidity +constructor(address erc721) HypERC721Collateral(erc721); +``` + +### _transferFromSender + +*Transfers `_tokenId` of `wrappedToken` from `msg.sender` to this contract.* + + +```solidity +function _transferFromSender(uint256 _tokenId) internal override returns (bytes memory); +``` +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|``|`bytes`|The URI of `_tokenId` on `wrappedToken`.| + + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md new file mode 100644 index 0000000..c87da79 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md @@ -0,0 +1,73 @@ +# HypERC721URIStorage +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/extensions/HypERC721URIStorage.sol) + +**Inherits:** +[HypERC721](/contracts/HypERC721.sol/contract.HypERC721.md), ERC721URIStorageUpgradeable + +**Author:** +Abacus Works + + +## Functions +### _transferFromSender + +*Asserts `msg.sender` is owner and burns `_tokenId`.* + + +```solidity +function _transferFromSender(uint256 _tokenId) internal override returns (bytes memory _tokenURI); +``` +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`_tokenURI`|`bytes`|The URI of `_tokenId`.| + + +### _transferTo + +*Sets the URI for `_tokenId` to `_tokenURI`.* + + +```solidity +function _transferTo(address _recipient, uint256 _tokenId, bytes calldata _tokenURI) internal override; +``` + +### tokenURI + + +```solidity +function tokenURI(uint256 tokenId) + public + view + override(ERC721Upgradeable, ERC721URIStorageUpgradeable) + returns (string memory); +``` + +### _beforeTokenTransfer + + +```solidity +function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) + internal + override(ERC721EnumerableUpgradeable, ERC721Upgradeable); +``` + +### supportsInterface + + +```solidity +function supportsInterface(bytes4 interfaceId) + public + view + override(ERC721EnumerableUpgradeable, ERC721Upgradeable) + returns (bool); +``` + +### _burn + + +```solidity +function _burn(uint256 tokenId) internal override(ERC721URIStorageUpgradeable, ERC721Upgradeable); +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md new file mode 100644 index 0000000..e44ccaa --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [HypERC721URICollateral](HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) +- [HypERC721URIStorage](HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md new file mode 100644 index 0000000..7856354 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md @@ -0,0 +1,40 @@ +# Message +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/Message.sol) + + +## Functions +### format + + +```solidity +function format(bytes32 _recipient, uint256 _amount, bytes memory _metadata) internal pure returns (bytes memory); +``` + +### recipient + + +```solidity +function recipient(bytes calldata message) internal pure returns (bytes32); +``` + +### amount + + +```solidity +function amount(bytes calldata message) internal pure returns (uint256); +``` + +### tokenId + + +```solidity +function tokenId(bytes calldata message) internal pure returns (uint256); +``` + +### metadata + + +```solidity +function metadata(bytes calldata message) internal pure returns (bytes calldata); +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md new file mode 100644 index 0000000..269b793 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [Message](Message.sol/library.Message.md) +- [TokenRouter](TokenRouter.sol/abstract.TokenRouter.md) diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md new file mode 100644 index 0000000..dac7494 --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md @@ -0,0 +1,104 @@ +# TokenRouter +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/libs/TokenRouter.sol) + +**Inherits:** +GasRouter + +**Author:** +Abacus Works + + +## Functions +### transferRemote + +Transfers `_amountOrId` token to `_recipient` on `_destination` domain. + +*Delegates transfer logic to `_transferFromSender` implementation.* + +*Emits `SentTransferRemote` event on the origin chain.* + + +```solidity +function transferRemote(uint32 _destination, bytes32 _recipient, uint256 _amountOrId) + public + payable + virtual + returns (bytes32 messageId); +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_destination`|`uint32`|The identifier of the destination chain.| +|`_recipient`|`bytes32`|The address of the recipient on the destination chain.| +|`_amountOrId`|`uint256`|The amount or identifier of tokens to be sent to the remote recipient.| + +**Returns** + +|Name|Type|Description| +|----|----|-----------| +|`messageId`|`bytes32`|The identifier of the dispatched message.| + + +### _transferFromSender + +*Should transfer `_amountOrId` of tokens from `msg.sender` to this token router.* + +*Called by `transferRemote` before message dispatch.* + +*Optionally returns `metadata` associated with the transfer to be passed in message.* + + +```solidity +function _transferFromSender(uint256 _amountOrId) internal virtual returns (bytes memory metadata); +``` + +### _handle + +*Mints tokens to recipient when router receives transfer message.* + +*Emits `ReceivedTransferRemote` event on the destination chain.* + + +```solidity +function _handle(uint32 _origin, bytes32, bytes calldata _message) internal override; +``` +**Parameters** + +|Name|Type|Description| +|----|----|-----------| +|`_origin`|`uint32`|The identifier of the origin chain.| +|``|`bytes32`|| +|`_message`|`bytes`|The encoded remote transfer message containing the recipient address and amount.| + + +### _transferTo + +*Should transfer `_amountOrId` of tokens from this token router to `_recipient`.* + +*Called by `handle` after message decoding.* + +*Optionally handles `metadata` associated with transfer passed in message.* + + +```solidity +function _transferTo(address _recipient, uint256 _amountOrId, bytes calldata metadata) internal virtual; +``` + +## Events +### SentTransferRemote +*Emitted on `transferRemote` when a transfer message is dispatched.* + + +```solidity +event SentTransferRemote(uint32 indexed destination, bytes32 indexed recipient, uint256 amount); +``` + +### ReceivedTransferRemote +*Emitted on `_handle` when a transfer message is processed.* + + +```solidity +event ReceivedTransferRemote(uint32 indexed origin, bytes32 indexed recipient, uint256 amount); +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md new file mode 100644 index 0000000..26be71a --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md @@ -0,0 +1,15 @@ +# ERC20Test +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/ERC20Test.sol) + +**Inherits:** +ERC20 + + +## Functions +### constructor + + +```solidity +constructor(string memory name, string memory symbol, uint256 totalSupply) ERC20(name, symbol); +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md new file mode 100644 index 0000000..0b7b8db --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md @@ -0,0 +1,22 @@ +# ERC721Test +[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/60f321f452052881dce4e22999022e11fc117456/contracts/test/ERC721Test.sol) + +**Inherits:** +ERC721Enumerable + + +## Functions +### constructor + + +```solidity +constructor(string memory name, string memory symbol, uint256 _mintAmount) ERC721(name, symbol); +``` + +### _baseURI + + +```solidity +function _baseURI() internal pure override returns (string memory); +``` + diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md new file mode 100644 index 0000000..96fd11d --- /dev/null +++ b/apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md @@ -0,0 +1,5 @@ + + +# Contents +- [ERC20Test](ERC20Test.sol/contract.ERC20Test.md) +- [ERC721Test](ERC721Test.sol/contract.ERC721Test.md) diff --git a/package.json b/package.json index 5d189a0..f5ec1f7 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,10 @@ "description": "Private docs package", "version": "0.0.0", "devDependencies": { - "@hyperlane-xyz/core": "^1.3.2", - "@hyperlane-xyz/sdk": "^1.3.2", - "@hyperlane-xyz/hyperlane-token": "^1.3.1", - "@hyperlane-xyz/helloworld": "^1.3.1", + "@hyperlane-xyz/core": "^1.3.8-beta0", + "@hyperlane-xyz/sdk": "^1.3.8-beta0", + "@hyperlane-xyz/token": "^1.3.8-beta0", + "@hyperlane-xyz/helloworld": "^1.3.8-beta0", "@types/node": "^18.11.18", "glob": "^8.1.0", "markdown-table": "^3.0.3", @@ -19,7 +19,7 @@ "private": true, "type": "module", "scripts": { - "sync": "node sync-addresses.js > ./resources/addresses.md && node sync-partials.js && node sync-config.js > resources/security.md", + "sync": "./sync.sh", "lint": "remark . --quiet --frail" }, "remarkConfig": { diff --git a/sync.sh b/sync.sh new file mode 100755 index 0000000..6507858 --- /dev/null +++ b/sync.sh @@ -0,0 +1,9 @@ +# node sync-addresses.js > ./resources/addresses.md + +# node sync-partials.js + +# node sync-config.js > ./resources/security.md + +cp -r ./node_modules/@hyperlane-xyz/core/docs/src/ ./apis-and-sdks/building-applications/core-solidity-sdk + +cp -r ./node_modules/@hyperlane-xyz/hyperlane-token/docs/src/ ./apis-and-sdks/building-applications/token-solidity-sdk diff --git a/yarn.lock b/yarn.lock index c82c843..f0d45c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -365,51 +365,42 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@hyperlane-xyz/core@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/core/-/core-1.3.1.tgz#d67636b6557835a1f91cf738b0ff9b997f70fbaa" - integrity sha512-/ahpo2ZsDHz4sPE6kbeWmbyMyAQcq+lje4bbYLwW4WNhw4K4HVYmyI2h2M9KDVKLg82OzpEnvclxQARqIShSgA== +"@hyperlane-xyz/core@1.3.8-beta0", "@hyperlane-xyz/core@^1.3.8-beta0": + version "1.3.8-beta0" + resolved "https://registry.yarnpkg.com/@hyperlane-xyz/core/-/core-1.3.8-beta0.tgz#1c07b5a3147148e150af07558ca0e263a78c8fd5" + integrity sha512-xR6MgeCJT7ZebXX+YOG6dxBZHcHm65dqreLUqot0NummTReDm4IVHz/JTROdcHbjPAgM5f9WZJjzzzpGcZREJQ== dependencies: - "@hyperlane-xyz/utils" "1.3.1" + "@hyperlane-xyz/utils" "1.3.8-beta0" "@openzeppelin/contracts" "^4.8.0" "@openzeppelin/contracts-upgradeable" "^4.8.0" -"@hyperlane-xyz/core@1.3.2", "@hyperlane-xyz/core@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/core/-/core-1.3.2.tgz#167e3b4f2dff18917d8283a371c63829e6613e78" - integrity sha512-gATJkN2RBm7qn8rcNWwvlDr2bQZ3fipon07nwO7FAbaXEGDteVXGtOIzMyCqU8v9Jo+uZKZYf83+mPWmANOhdg== - dependencies: - "@hyperlane-xyz/utils" "1.3.2" - "@openzeppelin/contracts" "^4.8.0" - "@openzeppelin/contracts-upgradeable" "^4.8.0" - -"@hyperlane-xyz/helloworld@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/helloworld/-/helloworld-1.3.1.tgz#e452c316bd4cb2d1d8d3d1976a90c289a3f84b4e" - integrity sha512-H8jTZu9UuGtTzd82PfrvBDjMY7A5fMFAAUf2afK7GgCj0K8T83gtMYxB6EgSsz5JG08YQW0UCb5SYj9+lccJDQ== +"@hyperlane-xyz/helloworld@^1.3.8-beta0": + version "1.3.8-beta0" + resolved "https://registry.yarnpkg.com/@hyperlane-xyz/helloworld/-/helloworld-1.3.8-beta0.tgz#d1a2ea971f80aca0940028bfb15980049ce26b75" + integrity sha512-ICEdj9BukN7Em2OxtmpVRRmOQ+j1oxzVXrMLSbHeV8GuLf9aJAAVGZDXBUwmydCKqLeuZU7HG8ekR7FXro8Gpw== dependencies: - "@hyperlane-xyz/sdk" "1.3.1" + "@hyperlane-xyz/sdk" "1.3.8-beta0" "@openzeppelin/contracts-upgradeable" "^4.8.0" ethers "^5.7.2" -"@hyperlane-xyz/hyperlane-token@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/hyperlane-token/-/hyperlane-token-1.3.1.tgz#317f729fd29b7eac6b73cd94887e94efafd6fab6" - integrity sha512-T5GiSne1bTx4ZEo4rbcOLInBJmNdyEIX/RSroDGG/LO3t4RMoW2VDtv3wEatf1yPITiYli99P/uuFPzcr2s8fw== +"@hyperlane-xyz/hyperlane-token@^1.3.8-beta0": + version "1.3.8-beta0" + resolved "https://registry.yarnpkg.com/@hyperlane-xyz/hyperlane-token/-/hyperlane-token-1.3.8-beta0.tgz#04c5f7515fdc75ddee09c71b57c24c5b68234a6a" + integrity sha512-D71yZ1RfgVN6ophKy/IGAca908dCQQ5cXNnjjCDsxx2PhjXlYThi9epYCdV+NDIYEHiEmvMosoEKYWv19HHf8g== dependencies: - "@hyperlane-xyz/core" "1.3.1" - "@hyperlane-xyz/sdk" "1.3.1" - "@hyperlane-xyz/utils" "1.3.1" + "@hyperlane-xyz/core" "1.3.8-beta0" + "@hyperlane-xyz/sdk" "1.3.8-beta0" + "@hyperlane-xyz/utils" "1.3.8-beta0" "@openzeppelin/contracts-upgradeable" "^4.8.0" ethers "^5.7.2" -"@hyperlane-xyz/sdk@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/sdk/-/sdk-1.3.1.tgz#bdfb2664b4b3a509598c412734837910ecceec88" - integrity sha512-aXLEk0IACWUWd/e9uiDvcJRxSGC5O8hZ4gl0Zz5nGkq7GeDMJuZN1D//KBSh4224nFsYLmzTfh5Agk6OtVkJAA== +"@hyperlane-xyz/sdk@1.3.8-beta0", "@hyperlane-xyz/sdk@^1.3.8-beta0": + version "1.3.8-beta0" + resolved "https://registry.yarnpkg.com/@hyperlane-xyz/sdk/-/sdk-1.3.8-beta0.tgz#87afac7e9a91c7f5ea82a6cecf35067550be4668" + integrity sha512-XWJBVFKKefrCkxdgmB/7tG0++c0QniA+6zmD95RhZ8GSUF4f3AAlieaanMMCI+LMaFE9mH75MAvpKqtZdgT6dA== dependencies: - "@hyperlane-xyz/core" "1.3.1" - "@hyperlane-xyz/utils" "1.3.1" + "@hyperlane-xyz/core" "1.3.8-beta0" + "@hyperlane-xyz/utils" "1.3.8-beta0" "@types/coingecko-api" "^1.0.10" "@types/debug" "^4.1.7" "@wagmi/chains" "^0.2.6" @@ -419,33 +410,10 @@ ethers "^5.7.2" zod "^3.21.2" -"@hyperlane-xyz/sdk@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/sdk/-/sdk-1.3.2.tgz#e3512de1ca73adb56331693f7222f11e112f0fa8" - integrity sha512-Ro2SSxQqbjBL90qbbcf+HRUcxS8dgn4aQMlWS7K6GyDMGbNHwakOFoLFnLqS2eYZLPSuBtCMdoGceJ+MCd9fTg== - dependencies: - "@hyperlane-xyz/core" "1.3.2" - "@hyperlane-xyz/utils" "1.3.2" - "@types/coingecko-api" "^1.0.10" - "@types/debug" "^4.1.7" - "@wagmi/chains" "^0.2.6" - coingecko-api "^1.0.10" - cross-fetch "^3.1.5" - debug "^4.3.4" - ethers "^5.7.2" - zod "^3.21.2" - -"@hyperlane-xyz/utils@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/utils/-/utils-1.3.1.tgz#acb8fbe9030fe0504720fc3d8410b6f9b65715af" - integrity sha512-I+TxITmatsYNQ9pSkxvcd5rtvKb04wRU96H5pwQKzb8nDjzEV/lheJN0W1zumyV101KVV3cNyTlb+nBog0Fu9w== - dependencies: - ethers "^5.7.2" - -"@hyperlane-xyz/utils@1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@hyperlane-xyz/utils/-/utils-1.3.2.tgz#ff1dd51f4748476ebb44b49566d101d655aea418" - integrity sha512-EmVa6egF9nlBG2MVIYnyWrK18aPe67cipU01BVnKN5DXSofB/13LA7WKaXnVH4eXwrbeefTWOqsDNBe7aDfKTw== +"@hyperlane-xyz/utils@1.3.8-beta0": + version "1.3.8-beta0" + resolved "https://registry.yarnpkg.com/@hyperlane-xyz/utils/-/utils-1.3.8-beta0.tgz#a8f2840fcb2619842d6f215c6ec8a03e471f56d9" + integrity sha512-y38K9AWd4+Qu8QurrOXfgANujPFtR42zat57U7l997VzkigfcjI/Shis0OQJVz+c9Jca79Yn0B52BpHbzHOvvw== dependencies: ethers "^5.7.2" From e7baa061266e88d72588d22c623cbeaf43ca36b4 Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Wed, 5 Jul 2023 18:42:38 -0400 Subject: [PATCH 2/4] Add pages to SUMMARY --- SUMMARY.md | 145 ++++++++++++++++++ .../core-solidity-sdk/SUMMARY.md | 128 ---------------- .../token-solidity-sdk/SUMMARY.md | 17 -- sync.sh | 6 +- 4 files changed, 148 insertions(+), 148 deletions(-) delete mode 100644 apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md delete mode 100644 apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md diff --git a/SUMMARY.md b/SUMMARY.md index 77086f0..9b28332 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -63,6 +63,151 @@ * [Quoting gas payments](sdks/building-applications/nodejs-sdk/gas.md) * [App Abstraction](sdks/building-applications/nodejs-sdk/contract-interaction.md) +## Core Contracts Reference +* [Home](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md) +* [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md) + * [OptimismMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md) +* [❱ igps](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md) + * [❱ gas-oracles](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md) + * [StorageGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md) + * [InterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) + * [OverheadIgp](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md) +* [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md) + * [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md) + * [IMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) + * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md) + * [IAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) + * [IMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) + * [IRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) + * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md) + * [IInterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) + * [IInterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) + * [IGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md) + * [IHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) + * [IInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) + * [IInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) + * [ISpecifiesInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) + * [ILiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) + * [ILiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) + * [IMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md) + * [IMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + * [IRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md) + * [IValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) +* [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md) + * [❱ aggregation](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md) + * [AbstractAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) + * [StaticAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md) + * [StaticAggregationIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md) + * [❱ multisig](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md) + * [AbstractMerkleRootMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md) + * [AbstractMessageIdMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md) + * [AbstractMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) + * [LegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) + * [AbstractMetaProxyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) + * [StaticMerkleRootMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md) + * [StaticMessageIdMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md) + * [StaticMerkleRootMultisigIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md) + * [StaticMessageIdMultisigIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md) + * [❱ native](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md) + * [AbstractNativeISM](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md) + * [OptimismISM](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md) + * [❱ routing](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md) + * [AbstractRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) + * [DomainRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) + * [DomainRoutingIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) + * [InterchainAccountIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) +* [❱ libs](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md) + * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md) + * [AggregationIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) + * [LegacyMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md) + * [MerkleRootMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md) + * [MessageIdMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md) + * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md) + * [InterchainAccountMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md) + * [InterchainQueryMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md) + * [CallLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md) + * [CheckpointLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md) + * [EnumerableMapExtended](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md) + * [LegacyCheckpointLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md) + * [MerkleLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md) + * [Message](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md) + * [MetaProxy](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md) + * [MinimalProxy](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md) + * [StaticMOfNAddressSetFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) + * [TypeCasts](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md) + * [ValidatorAnnouncements](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) +* [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md) + * [❱ liquidity-layer](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md) + * [❱ adapters](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md) + * [CircleBridgeAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) + * [PortalAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) + * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md) + * [❱ circle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md) + * [ICircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) + * [ITokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) + * [❱ portal](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md) + * [IPortalTokenBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) + * [ILiquidityLayerAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) + * [LiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) + * [InterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) + * [InterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) +* [❱ mock](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md) + * [MockCircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) + * [MockCircleTokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) + * [MockHyperlaneEnvironment](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) + * [MockMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md) + * [MockPortalBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md) + * [MockToken](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md) +* [❱ test](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md) + * [❱ bad-recipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md) + * [BadRecipient1](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md) + * [BadRecipient2](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md) + * [BadRecipient3](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md) + * [BadRecipient5](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md) + * [BadRecipient6](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md) + * [LightTestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md) + * [TestGasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md) + * [TestHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) + * [TestInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) + * [TestLegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) + * [TestLiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) + * [TestMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md) + * [TestMerkle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md) + * [TestMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md) + * [TestMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md) + * [TestQuery](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md) + * [TestQuerySender](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md) + * [TestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md) + * [TestRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md) + * [TestSendReceiver](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md) + * [TestTokenRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md) +* [❱ upgrade](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md) + * [Versioned](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md) +* [GasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md) +* [HyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) +* [Mailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md) +* [OwnableMulticall](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md) +* [PausableReentrancyGuardUpgradeable](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) +* [Router](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md) +* [ValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) + +## Token Contracts Reference +* [Home](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md) +* [❱ extensions](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md) + * [HypERC721URICollateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) + * [HypERC721URIStorage](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) +* [❱ libs](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md) + * [Message](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md) + * [TokenRouter](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) +* [❱ test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md) + * [ERC20Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md) + * [ERC721Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md) +* [HypERC20](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md) +* [HypERC20Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) +* [HypERC721](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md) +* [HypERC721Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) +* [HypNative](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md) + ## Protocol * [Overview](protocol/permissionless-interoperability.md) diff --git a/apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md b/apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md deleted file mode 100644 index 3554af3..0000000 --- a/apis-and-sdks/building-applications/core-solidity-sdk/SUMMARY.md +++ /dev/null @@ -1,128 +0,0 @@ -# Summary -- [Home](README.md) -# contracts - - [❱ hooks](contracts/hooks/README.md) - - [OptimismMessageHook](contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md) - - [❱ igps](contracts/igps/README.md) - - [❱ gas-oracles](contracts/igps/gas-oracles/README.md) - - [StorageGasOracle](contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md) - - [InterchainGasPaymaster](contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) - - [OverheadIgp](contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md) - - [❱ interfaces](contracts/interfaces/README.md) - - [❱ hooks](contracts/interfaces/hooks/README.md) - - [IMessageHook](contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) - - [❱ isms](contracts/interfaces/isms/README.md) - - [IAggregationIsm](contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) - - [IMultisigIsm](contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) - - [IRoutingIsm](contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) - - [❱ middleware](contracts/interfaces/middleware/README.md) - - [IInterchainAccountRouter](contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) - - [IInterchainQueryRouter](contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) - - [IGasOracle](contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md) - - [IHyperlaneConnectionClient](contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) - - [IInterchainGasPaymaster](contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) - - [IInterchainSecurityModule](contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) - - [ISpecifiesInterchainSecurityModule](contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) - - [ILiquidityLayerMessageRecipient](contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) - - [ILiquidityLayerRouter](contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) - - [IMailbox](contracts/interfaces/IMailbox.sol/interface.IMailbox.md) - - [IMessageRecipient](contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) - - [IRouter](contracts/interfaces/IRouter.sol/interface.IRouter.md) - - [IValidatorAnnounce](contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) - - [❱ isms](contracts/isms/README.md) - - [❱ aggregation](contracts/isms/aggregation/README.md) - - [AbstractAggregationIsm](contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) - - [StaticAggregationIsm](contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md) - - [StaticAggregationIsmFactory](contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md) - - [❱ multisig](contracts/isms/multisig/README.md) - - [AbstractMerkleRootMultisigIsm](contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md) - - [AbstractMessageIdMultisigIsm](contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md) - - [AbstractMultisigIsm](contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) - - [LegacyMultisigIsm](contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) - - [AbstractMetaProxyMultisigIsm](contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) - - [StaticMerkleRootMultisigIsm](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md) - - [StaticMessageIdMultisigIsm](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md) - - [StaticMerkleRootMultisigIsmFactory](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md) - - [StaticMessageIdMultisigIsmFactory](contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md) - - [❱ native](contracts/isms/native/README.md) - - [AbstractNativeISM](contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md) - - [OptimismISM](contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md) - - [❱ routing](contracts/isms/routing/README.md) - - [AbstractRoutingIsm](contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) - - [DomainRoutingIsm](contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) - - [DomainRoutingIsmFactory](contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) - - [InterchainAccountIsm](contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) - - [❱ libs](contracts/libs/README.md) - - [❱ isms](contracts/libs/isms/README.md) - - [AggregationIsmMetadata](contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) - - [LegacyMultisigIsmMetadata](contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md) - - [MerkleRootMultisigIsmMetadata](contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md) - - [MessageIdMultisigIsmMetadata](contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md) - - [❱ middleware](contracts/libs/middleware/README.md) - - [InterchainAccountMessage](contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md) - - [InterchainQueryMessage](contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md) - - [CallLib](contracts/libs/Call.sol/library.CallLib.md) - - [CheckpointLib](contracts/libs/CheckpointLib.sol/library.CheckpointLib.md) - - [EnumerableMapExtended](contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md) - - [LegacyCheckpointLib](contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md) - - [MerkleLib](contracts/libs/Merkle.sol/library.MerkleLib.md) - - [Message](contracts/libs/Message.sol/library.Message.md) - - [MetaProxy](contracts/libs/MetaProxy.sol/library.MetaProxy.md) - - [MinimalProxy](contracts/libs/MinimalProxy.sol/library.MinimalProxy.md) - - [StaticMOfNAddressSetFactory](contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) - - [TypeCasts](contracts/libs/TypeCasts.sol/library.TypeCasts.md) - - [ValidatorAnnouncements](contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) - - [❱ middleware](contracts/middleware/README.md) - - [❱ liquidity-layer](contracts/middleware/liquidity-layer/README.md) - - [❱ adapters](contracts/middleware/liquidity-layer/adapters/README.md) - - [CircleBridgeAdapter](contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) - - [PortalAdapter](contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) - - [❱ interfaces](contracts/middleware/liquidity-layer/interfaces/README.md) - - [❱ circle](contracts/middleware/liquidity-layer/interfaces/circle/README.md) - - [ICircleMessageTransmitter](contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) - - [ITokenMessenger](contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) - - [❱ portal](contracts/middleware/liquidity-layer/interfaces/portal/README.md) - - [IPortalTokenBridge](contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) - - [ILiquidityLayerAdapter](contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) - - [LiquidityLayerRouter](contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) - - [InterchainAccountRouter](contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) - - [InterchainQueryRouter](contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) - - [❱ mock](contracts/mock/README.md) - - [MockCircleMessageTransmitter](contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) - - [MockCircleTokenMessenger](contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) - - [MockHyperlaneEnvironment](contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) - - [MockMailbox](contracts/mock/MockMailbox.sol/contract.MockMailbox.md) - - [MockPortalBridge](contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md) - - [MockToken](contracts/mock/MockToken.sol/contract.MockToken.md) - - [❱ test](contracts/test/README.md) - - [❱ bad-recipient](contracts/test/bad-recipient/README.md) - - [BadRecipient1](contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md) - - [BadRecipient2](contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md) - - [BadRecipient3](contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md) - - [BadRecipient5](contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md) - - [BadRecipient6](contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md) - - [LightTestRecipient](contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md) - - [TestGasRouter](contracts/test/TestGasRouter.sol/contract.TestGasRouter.md) - - [TestHyperlaneConnectionClient](contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) - - [TestInterchainGasPaymaster](contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) - - [TestLegacyMultisigIsm](contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) - - [TestLiquidityLayerMessageRecipient](contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) - - [TestMailbox](contracts/test/TestMailbox.sol/contract.TestMailbox.md) - - [TestMerkle](contracts/test/TestMerkle.sol/contract.TestMerkle.md) - - [TestMessage](contracts/test/TestMessage.sol/contract.TestMessage.md) - - [TestMultisigIsm](contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md) - - [TestQuery](contracts/test/TestQuery.sol/contract.TestQuery.md) - - [TestQuerySender](contracts/test/TestQuerySender.sol/contract.TestQuerySender.md) - - [TestRecipient](contracts/test/TestRecipient.sol/contract.TestRecipient.md) - - [TestRouter](contracts/test/TestRouter.sol/contract.TestRouter.md) - - [TestSendReceiver](contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md) - - [TestTokenRecipient](contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md) - - [❱ upgrade](contracts/upgrade/README.md) - - [Versioned](contracts/upgrade/Versioned.sol/contract.Versioned.md) - - [GasRouter](contracts/GasRouter.sol/abstract.GasRouter.md) - - [HyperlaneConnectionClient](contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) - - [Mailbox](contracts/Mailbox.sol/contract.Mailbox.md) - - [OwnableMulticall](contracts/OwnableMulticall.sol/contract.OwnableMulticall.md) - - [PausableReentrancyGuardUpgradeable](contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) - - [Router](contracts/Router.sol/abstract.Router.md) - - [ValidatorAnnounce](contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) diff --git a/apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md b/apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md deleted file mode 100644 index e3f2a35..0000000 --- a/apis-and-sdks/building-applications/token-solidity-sdk/SUMMARY.md +++ /dev/null @@ -1,17 +0,0 @@ -# Summary -- [Home](README.md) -# contracts - - [❱ extensions](contracts/extensions/README.md) - - [HypERC721URICollateral](contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) - - [HypERC721URIStorage](contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) - - [❱ libs](contracts/libs/README.md) - - [Message](contracts/libs/Message.sol/library.Message.md) - - [TokenRouter](contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) - - [❱ test](contracts/test/README.md) - - [ERC20Test](contracts/test/ERC20Test.sol/contract.ERC20Test.md) - - [ERC721Test](contracts/test/ERC721Test.sol/contract.ERC721Test.md) - - [HypERC20](contracts/HypERC20.sol/contract.HypERC20.md) - - [HypERC20Collateral](contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) - - [HypERC721](contracts/HypERC721.sol/contract.HypERC721.md) - - [HypERC721Collateral](contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) - - [HypNative](contracts/HypNative.sol/contract.HypNative.md) diff --git a/sync.sh b/sync.sh index 6507858..206530e 100755 --- a/sync.sh +++ b/sync.sh @@ -1,8 +1,8 @@ -# node sync-addresses.js > ./resources/addresses.md +node sync-addresses.js > ./resources/addresses.md -# node sync-partials.js +node sync-partials.js -# node sync-config.js > ./resources/security.md +node sync-config.js > ./resources/security.md cp -r ./node_modules/@hyperlane-xyz/core/docs/src/ ./apis-and-sdks/building-applications/core-solidity-sdk From 1145d0e5ea7f1369790118e3e80a9b364784ae6b Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Wed, 5 Jul 2023 18:45:16 -0400 Subject: [PATCH 3/4] Try indenting reference --- SUMMARY.md | 278 ++++++++++++++++++++++++++--------------------------- 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/SUMMARY.md b/SUMMARY.md index 9b28332..bc9a28e 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -65,148 +65,148 @@ ## Core Contracts Reference * [Home](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md) -* [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md) - * [OptimismMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md) -* [❱ igps](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md) - * [❱ gas-oracles](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md) - * [StorageGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md) - * [InterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) - * [OverheadIgp](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md) -* [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md) - * [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md) - * [IMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) - * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md) - * [IAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) - * [IMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) - * [IRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) - * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md) - * [IInterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) - * [IInterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) - * [IGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md) - * [IHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) - * [IInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) - * [IInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) - * [ISpecifiesInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) - * [ILiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) - * [ILiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) - * [IMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md) - * [IMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) - * [IRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md) - * [IValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) -* [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md) - * [❱ aggregation](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md) - * [AbstractAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) - * [StaticAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md) - * [StaticAggregationIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md) - * [❱ multisig](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md) - * [AbstractMerkleRootMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md) - * [AbstractMessageIdMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md) - * [AbstractMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) - * [LegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) - * [AbstractMetaProxyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) - * [StaticMerkleRootMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md) - * [StaticMessageIdMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md) - * [StaticMerkleRootMultisigIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md) - * [StaticMessageIdMultisigIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md) - * [❱ native](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md) - * [AbstractNativeISM](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md) - * [OptimismISM](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md) - * [❱ routing](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md) - * [AbstractRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) - * [DomainRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) - * [DomainRoutingIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) - * [InterchainAccountIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) -* [❱ libs](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md) - * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md) - * [AggregationIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) - * [LegacyMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md) - * [MerkleRootMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md) - * [MessageIdMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md) - * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md) - * [InterchainAccountMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md) - * [InterchainQueryMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md) - * [CallLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md) - * [CheckpointLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md) - * [EnumerableMapExtended](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md) - * [LegacyCheckpointLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md) - * [MerkleLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md) - * [Message](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md) - * [MetaProxy](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md) - * [MinimalProxy](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md) - * [StaticMOfNAddressSetFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) - * [TypeCasts](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md) - * [ValidatorAnnouncements](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) -* [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md) - * [❱ liquidity-layer](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md) - * [❱ adapters](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md) - * [CircleBridgeAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) - * [PortalAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) - * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md) - * [❱ circle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md) - * [ICircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) - * [ITokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) - * [❱ portal](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md) - * [IPortalTokenBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) - * [ILiquidityLayerAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) - * [LiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) - * [InterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) - * [InterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) -* [❱ mock](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md) - * [MockCircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) - * [MockCircleTokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) - * [MockHyperlaneEnvironment](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) - * [MockMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md) - * [MockPortalBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md) - * [MockToken](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md) -* [❱ test](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md) - * [❱ bad-recipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md) - * [BadRecipient1](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md) - * [BadRecipient2](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md) - * [BadRecipient3](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md) - * [BadRecipient5](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md) - * [BadRecipient6](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md) - * [LightTestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md) - * [TestGasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md) - * [TestHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) - * [TestInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) - * [TestLegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) - * [TestLiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) - * [TestMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md) - * [TestMerkle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md) - * [TestMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md) - * [TestMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md) - * [TestQuery](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md) - * [TestQuerySender](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md) - * [TestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md) - * [TestRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md) - * [TestSendReceiver](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md) - * [TestTokenRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md) -* [❱ upgrade](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md) - * [Versioned](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md) -* [GasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md) -* [HyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) -* [Mailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md) -* [OwnableMulticall](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md) -* [PausableReentrancyGuardUpgradeable](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) -* [Router](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md) -* [ValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) + * [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md) + * [OptimismMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md) + * [❱ igps](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md) + * [❱ gas-oracles](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md) + * [StorageGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md) + * [InterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) + * [OverheadIgp](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md) + * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md) + * [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md) + * [IMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) + * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md) + * [IAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) + * [IMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) + * [IRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) + * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md) + * [IInterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) + * [IInterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) + * [IGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md) + * [IHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) + * [IInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) + * [IInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) + * [ISpecifiesInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) + * [ILiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) + * [ILiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) + * [IMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md) + * [IMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) + * [IRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md) + * [IValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) + * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md) + * [❱ aggregation](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md) + * [AbstractAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) + * [StaticAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md) + * [StaticAggregationIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md) + * [❱ multisig](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/README.md) + * [AbstractMerkleRootMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md) + * [AbstractMessageIdMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md) + * [AbstractMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md) + * [LegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md) + * [AbstractMetaProxyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md) + * [StaticMerkleRootMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md) + * [StaticMessageIdMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md) + * [StaticMerkleRootMultisigIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md) + * [StaticMessageIdMultisigIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md) + * [❱ native](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/README.md) + * [AbstractNativeISM](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/AbstractNativeISM.sol/abstract.AbstractNativeISM.md) + * [OptimismISM](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/native/OptimismISM.sol/contract.OptimismISM.md) + * [❱ routing](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/README.md) + * [AbstractRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md) + * [DomainRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) + * [DomainRoutingIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) + * [InterchainAccountIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) + * [❱ libs](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md) + * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md) + * [AggregationIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) + * [LegacyMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md) + * [MerkleRootMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md) + * [MessageIdMultisigIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md) + * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/README.md) + * [InterchainAccountMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md) + * [InterchainQueryMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md) + * [CallLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Call.sol/library.CallLib.md) + * [CheckpointLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md) + * [EnumerableMapExtended](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md) + * [LegacyCheckpointLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md) + * [MerkleLib](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Merkle.sol/library.MerkleLib.md) + * [Message](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/Message.sol/library.Message.md) + * [MetaProxy](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MetaProxy.sol/library.MetaProxy.md) + * [MinimalProxy](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md) + * [StaticMOfNAddressSetFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) + * [TypeCasts](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md) + * [ValidatorAnnouncements](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) + * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md) + * [❱ liquidity-layer](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md) + * [❱ adapters](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md) + * [CircleBridgeAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) + * [PortalAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) + * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md) + * [❱ circle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md) + * [ICircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) + * [ITokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) + * [❱ portal](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md) + * [IPortalTokenBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) + * [ILiquidityLayerAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) + * [LiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) + * [InterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) + * [InterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) + * [❱ mock](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md) + * [MockCircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) + * [MockCircleTokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) + * [MockHyperlaneEnvironment](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) + * [MockMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md) + * [MockPortalBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md) + * [MockToken](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md) + * [❱ test](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md) + * [❱ bad-recipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md) + * [BadRecipient1](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md) + * [BadRecipient2](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md) + * [BadRecipient3](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md) + * [BadRecipient5](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md) + * [BadRecipient6](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md) + * [LightTestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md) + * [TestGasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md) + * [TestHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) + * [TestInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) + * [TestLegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) + * [TestLiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) + * [TestMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md) + * [TestMerkle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md) + * [TestMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md) + * [TestMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md) + * [TestQuery](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md) + * [TestQuerySender](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md) + * [TestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md) + * [TestRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md) + * [TestSendReceiver](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md) + * [TestTokenRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md) + * [❱ upgrade](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md) + * [Versioned](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md) + * [GasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md) + * [HyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) + * [Mailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md) + * [OwnableMulticall](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md) + * [PausableReentrancyGuardUpgradeable](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) + * [Router](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md) + * [ValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) ## Token Contracts Reference * [Home](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md) -* [❱ extensions](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md) - * [HypERC721URICollateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) - * [HypERC721URIStorage](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) -* [❱ libs](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md) - * [Message](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md) - * [TokenRouter](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) -* [❱ test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md) - * [ERC20Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md) - * [ERC721Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md) -* [HypERC20](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md) -* [HypERC20Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) -* [HypERC721](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md) -* [HypERC721Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) -* [HypNative](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md) + * [❱ extensions](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md) + * [HypERC721URICollateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) + * [HypERC721URIStorage](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) + * [❱ libs](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md) + * [Message](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md) + * [TokenRouter](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) + * [❱ test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md) + * [ERC20Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md) + * [ERC721Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md) + * [HypERC20](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md) + * [HypERC20Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) + * [HypERC721](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md) + * [HypERC721Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) + * [HypNative](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md) ## Protocol From 9ad3573a41ba8b6b7478a7a8543add807b2bfccd Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Wed, 5 Jul 2023 18:49:58 -0400 Subject: [PATCH 4/4] Prune SUMMARY.md --- SUMMARY.md | 109 ++++++++++++----------------------------------------- 1 file changed, 24 insertions(+), 85 deletions(-) diff --git a/SUMMARY.md b/SUMMARY.md index bc9a28e..667a038 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -65,34 +65,12 @@ ## Core Contracts Reference * [Home](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.md) - * [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/README.md) - * [OptimismMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md) + * [Mailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md) * [❱ igps](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/README.md) * [❱ gas-oracles](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/README.md) * [StorageGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md) * [InterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md) * [OverheadIgp](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md) - * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/README.md) - * [❱ hooks](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/README.md) - * [IMessageHook](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md) - * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/README.md) - * [IAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md) - * [IMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md) - * [IRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md) - * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/README.md) - * [IInterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md) - * [IInterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md) - * [IGasOracle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md) - * [IHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md) - * [IInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md) - * [IInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md) - * [ISpecifiesInterchainSecurityModule](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md) - * [ILiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md) - * [ILiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md) - * [IMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMailbox.sol/interface.IMailbox.md) - * [IMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md) - * [IRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IRouter.sol/interface.IRouter.md) - * [IValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md) * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/README.md) * [❱ aggregation](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/README.md) * [AbstractAggregationIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md) @@ -116,6 +94,24 @@ * [DomainRoutingIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md) * [DomainRoutingIsmFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md) * [InterchainAccountIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md) + * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md) + * [❱ liquidity-layer](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md) + * [❱ adapters](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md) + * [CircleBridgeAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) + * [PortalAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) + * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md) + * [❱ circle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md) + * [ICircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) + * [ITokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) + * [❱ portal](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md) + * [IPortalTokenBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) + * [ILiquidityLayerAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) + * [LiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) + * [InterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) + * [InterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) + * [ValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) + * [HyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) + * [Router](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md) * [❱ libs](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/README.md) * [❱ isms](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/README.md) * [AggregationIsmMetadata](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md) @@ -136,77 +132,20 @@ * [StaticMOfNAddressSetFactory](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md) * [TypeCasts](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/TypeCasts.sol/library.TypeCasts.md) * [ValidatorAnnouncements](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md) - * [❱ middleware](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/README.md) - * [❱ liquidity-layer](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/README.md) - * [❱ adapters](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/README.md) - * [CircleBridgeAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md) - * [PortalAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md) - * [❱ interfaces](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/README.md) - * [❱ circle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/README.md) - * [ICircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md) - * [ITokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md) - * [❱ portal](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/README.md) - * [IPortalTokenBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md) - * [ILiquidityLayerAdapter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md) - * [LiquidityLayerRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md) - * [InterchainAccountRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md) - * [InterchainQueryRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md) - * [❱ mock](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/README.md) - * [MockCircleMessageTransmitter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md) - * [MockCircleTokenMessenger](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md) - * [MockHyperlaneEnvironment](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md) - * [MockMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockMailbox.sol/contract.MockMailbox.md) - * [MockPortalBridge](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md) - * [MockToken](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/mock/MockToken.sol/contract.MockToken.md) - * [❱ test](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/README.md) - * [❱ bad-recipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/README.md) - * [BadRecipient1](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md) - * [BadRecipient2](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md) - * [BadRecipient3](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md) - * [BadRecipient5](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md) - * [BadRecipient6](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md) - * [LightTestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md) - * [TestGasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md) - * [TestHyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md) - * [TestInterchainGasPaymaster](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md) - * [TestLegacyMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md) - * [TestLiquidityLayerMessageRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md) - * [TestMailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMailbox.sol/contract.TestMailbox.md) - * [TestMerkle](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMerkle.sol/contract.TestMerkle.md) - * [TestMessage](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMessage.sol/contract.TestMessage.md) - * [TestMultisigIsm](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md) - * [TestQuery](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuery.sol/contract.TestQuery.md) - * [TestQuerySender](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md) - * [TestRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRecipient.sol/contract.TestRecipient.md) - * [TestRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestRouter.sol/contract.TestRouter.md) - * [TestSendReceiver](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md) - * [TestTokenRecipient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md) - * [❱ upgrade](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/README.md) - * [Versioned](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/upgrade/Versioned.sol/contract.Versioned.md) - * [GasRouter](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/GasRouter.sol/abstract.GasRouter.md) - * [HyperlaneConnectionClient](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md) - * [Mailbox](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Mailbox.sol/contract.Mailbox.md) - * [OwnableMulticall](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md) - * [PausableReentrancyGuardUpgradeable](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md) - * [Router](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/Router.sol/abstract.Router.md) - * [ValidatorAnnounce](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md) ## Token Contracts Reference * [Home](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/README.md) + * [HypERC20](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md) + * [HypERC20Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) + * [HypERC721](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md) + * [HypERC721Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) + * [HypNative](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md) * [❱ extensions](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/README.md) * [HypERC721URICollateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URICollateral.sol/contract.HypERC721URICollateral.md) * [HypERC721URIStorage](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/extensions/HypERC721URIStorage.sol/contract.HypERC721URIStorage.md) * [❱ libs](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/README.md) * [Message](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/Message.sol/library.Message.md) * [TokenRouter](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/libs/TokenRouter.sol/abstract.TokenRouter.md) - * [❱ test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/README.md) - * [ERC20Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC20Test.sol/contract.ERC20Test.md) - * [ERC721Test](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/test/ERC721Test.sol/contract.ERC721Test.md) - * [HypERC20](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20.sol/contract.HypERC20.md) - * [HypERC20Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC20Collateral.sol/contract.HypERC20Collateral.md) - * [HypERC721](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721.sol/contract.HypERC721.md) - * [HypERC721Collateral](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypERC721Collateral.sol/contract.HypERC721Collateral.md) - * [HypNative](./apis-and-sdks/building-applications/token-solidity-sdk/contracts/HypNative.sol/contract.HypNative.md) ## Protocol