@hyperlane-xyz/core 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/docs/book.css +13 -0
  2. package/docs/book.toml +12 -0
  3. package/docs/solidity.min.js +74 -0
  4. package/docs/src/README.md +15 -0
  5. package/docs/src/SUMMARY.md +139 -0
  6. package/docs/src/contracts/GasRouter.sol/abstract.GasRouter.md +124 -0
  7. package/docs/src/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md +191 -0
  8. package/docs/src/contracts/Mailbox.sol/contract.Mailbox.md +251 -0
  9. package/docs/src/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md +41 -0
  10. package/docs/src/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md +100 -0
  11. package/docs/src/contracts/README.md +19 -0
  12. package/docs/src/contracts/Router.sol/abstract.Router.md +255 -0
  13. package/docs/src/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md +117 -0
  14. package/docs/src/contracts/hooks/ERC5164/ERC5164MessageHook.sol/contract.ERC5164MessageHook.md +64 -0
  15. package/docs/src/contracts/hooks/ERC5164/README.md +5 -0
  16. package/docs/src/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.sol/interface.IMessageDispatcher.md +25 -0
  17. package/docs/src/contracts/hooks/ERC5164/interfaces/README.md +4 -0
  18. package/docs/src/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md +71 -0
  19. package/docs/src/contracts/hooks/README.md +5 -0
  20. package/docs/src/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md +231 -0
  21. package/docs/src/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md +161 -0
  22. package/docs/src/contracts/igps/README.md +6 -0
  23. package/docs/src/contracts/igps/gas-oracles/README.md +4 -0
  24. package/docs/src/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md +114 -0
  25. package/docs/src/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md +25 -0
  26. package/docs/src/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md +43 -0
  27. package/docs/src/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md +33 -0
  28. package/docs/src/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md +55 -0
  29. package/docs/src/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md +12 -0
  30. package/docs/src/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md +13 -0
  31. package/docs/src/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md +19 -0
  32. package/docs/src/contracts/interfaces/IMailbox.sol/interface.IMailbox.md +103 -0
  33. package/docs/src/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md +12 -0
  34. package/docs/src/contracts/interfaces/IRouter.sol/interface.IRouter.md +33 -0
  35. package/docs/src/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md +78 -0
  36. package/docs/src/contracts/interfaces/README.md +17 -0
  37. package/docs/src/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md +12 -0
  38. package/docs/src/contracts/interfaces/hooks/README.md +4 -0
  39. package/docs/src/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md +36 -0
  40. package/docs/src/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md +36 -0
  41. package/docs/src/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md +31 -0
  42. package/docs/src/contracts/interfaces/isms/README.md +6 -0
  43. package/docs/src/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md +64 -0
  44. package/docs/src/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md +21 -0
  45. package/docs/src/contracts/interfaces/middleware/README.md +5 -0
  46. package/docs/src/contracts/isms/README.md +7 -0
  47. package/docs/src/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md +60 -0
  48. package/docs/src/contracts/isms/aggregation/README.md +6 -0
  49. package/docs/src/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md +30 -0
  50. package/docs/src/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md +15 -0
  51. package/docs/src/contracts/isms/hook/AbstractHookISM.sol/abstract.AbstractHookISM.md +44 -0
  52. package/docs/src/contracts/isms/hook/CrossChainEnabled.sol/abstract.CrossChainEnabled.md +74 -0
  53. package/docs/src/contracts/isms/hook/ERC5164ISM.sol/contract.ERC5164ISM.md +57 -0
  54. package/docs/src/contracts/isms/hook/README.md +7 -0
  55. package/docs/src/contracts/isms/hook/optimism/CrossChainEnabledOptimism.sol/abstract.CrossChainEnabledOptimism.md +53 -0
  56. package/docs/src/contracts/isms/hook/optimism/LibOptimism.sol/library.LibOptimism.md +39 -0
  57. package/docs/src/contracts/isms/hook/optimism/OptimismISM.sol/contract.OptimismISM.md +66 -0
  58. package/docs/src/contracts/isms/hook/optimism/README.md +6 -0
  59. package/docs/src/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md +78 -0
  60. package/docs/src/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md +69 -0
  61. package/docs/src/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md +102 -0
  62. package/docs/src/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md +355 -0
  63. package/docs/src/contracts/isms/multisig/README.md +12 -0
  64. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md +36 -0
  65. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md +11 -0
  66. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md +15 -0
  67. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md +10 -0
  68. package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md +15 -0
  69. package/docs/src/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md +55 -0
  70. package/docs/src/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md +112 -0
  71. package/docs/src/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md +47 -0
  72. package/docs/src/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md +44 -0
  73. package/docs/src/contracts/isms/routing/README.md +7 -0
  74. package/docs/src/contracts/libs/Call.sol/library.CallLib.md +124 -0
  75. package/docs/src/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md +61 -0
  76. package/docs/src/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md +63 -0
  77. package/docs/src/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md +55 -0
  78. package/docs/src/contracts/libs/Merkle.sol/library.MerkleLib.md +354 -0
  79. package/docs/src/contracts/libs/Message.sol/library.Message.md +304 -0
  80. package/docs/src/contracts/libs/MetaProxy.sol/library.MetaProxy.md +36 -0
  81. package/docs/src/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md +34 -0
  82. package/docs/src/contracts/libs/README.md +16 -0
  83. package/docs/src/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md +123 -0
  84. package/docs/src/contracts/libs/TypeCasts.sol/library.TypeCasts.md +19 -0
  85. package/docs/src/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md +31 -0
  86. package/docs/src/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md +97 -0
  87. package/docs/src/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md +296 -0
  88. package/docs/src/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md +177 -0
  89. package/docs/src/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md +109 -0
  90. package/docs/src/contracts/libs/isms/README.md +7 -0
  91. package/docs/src/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md +134 -0
  92. package/docs/src/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md +203 -0
  93. package/docs/src/contracts/libs/middleware/README.md +5 -0
  94. package/docs/src/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md +542 -0
  95. package/docs/src/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md +119 -0
  96. package/docs/src/contracts/middleware/README.md +6 -0
  97. package/docs/src/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md +81 -0
  98. package/docs/src/contracts/middleware/liquidity-layer/README.md +6 -0
  99. package/docs/src/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md +197 -0
  100. package/docs/src/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md +189 -0
  101. package/docs/src/contracts/middleware/liquidity-layer/adapters/README.md +5 -0
  102. package/docs/src/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md +23 -0
  103. package/docs/src/contracts/middleware/liquidity-layer/interfaces/README.md +6 -0
  104. package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md +54 -0
  105. package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md +92 -0
  106. package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/README.md +5 -0
  107. package/docs/src/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md +131 -0
  108. package/docs/src/contracts/middleware/liquidity-layer/interfaces/portal/README.md +4 -0
  109. package/docs/src/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md +58 -0
  110. package/docs/src/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md +44 -0
  111. package/docs/src/contracts/mock/MockERC5164.sol/contract.MockMessageDispatcher.md +15 -0
  112. package/docs/src/contracts/mock/MockERC5164.sol/contract.MockMessageExecutor.md +11 -0
  113. package/docs/src/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md +69 -0
  114. package/docs/src/contracts/mock/MockMailbox.sol/contract.MockMailbox.md +137 -0
  115. package/docs/src/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md +82 -0
  116. package/docs/src/contracts/mock/MockToken.sol/contract.MockToken.md +22 -0
  117. package/docs/src/contracts/mock/README.md +11 -0
  118. package/docs/src/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md +15 -0
  119. package/docs/src/contracts/test/README.md +20 -0
  120. package/docs/src/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md +27 -0
  121. package/docs/src/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md +29 -0
  122. package/docs/src/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md +30 -0
  123. package/docs/src/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md +15 -0
  124. package/docs/src/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md +23 -0
  125. package/docs/src/contracts/test/TestMailbox.sol/contract.TestMailbox.md +29 -0
  126. package/docs/src/contracts/test/TestMerkle.sol/contract.TestMerkle.md +50 -0
  127. package/docs/src/contracts/test/TestMessage.sol/contract.TestMessage.md +68 -0
  128. package/docs/src/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md +51 -0
  129. package/docs/src/contracts/test/TestQuery.sol/contract.TestQuery.md +45 -0
  130. package/docs/src/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md +128 -0
  131. package/docs/src/contracts/test/TestRecipient.sol/contract.TestRecipient.md +78 -0
  132. package/docs/src/contracts/test/TestRouter.sol/contract.TestRouter.md +63 -0
  133. package/docs/src/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md +49 -0
  134. package/docs/src/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md +80 -0
  135. package/docs/src/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md +15 -0
  136. package/docs/src/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md +12 -0
  137. package/docs/src/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md +15 -0
  138. package/docs/src/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md +15 -0
  139. package/docs/src/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md +15 -0
  140. package/docs/src/contracts/test/bad-recipient/README.md +8 -0
  141. package/docs/src/contracts/upgrade/README.md +4 -0
  142. package/docs/src/contracts/upgrade/Versioned.sol/contract.Versioned.md +14 -0
  143. package/package.json +3 -3
@@ -0,0 +1,6 @@
1
+
2
+
3
+ # Contents
4
+ - [IAggregationIsm](IAggregationIsm.sol/interface.IAggregationIsm.md)
5
+ - [IMultisigIsm](IMultisigIsm.sol/interface.IMultisigIsm.md)
6
+ - [IRoutingIsm](IRoutingIsm.sol/interface.IRoutingIsm.md)
@@ -0,0 +1,64 @@
1
+ # IInterchainAccountRouter
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/middleware/IInterchainAccountRouter.sol)
3
+
4
+
5
+ ## Functions
6
+ ### callRemote
7
+
8
+
9
+ ```solidity
10
+ function callRemote(uint32 _destination, address _to, uint256 _value, bytes calldata _data)
11
+ external
12
+ returns (bytes32);
13
+ ```
14
+
15
+ ### callRemote
16
+
17
+
18
+ ```solidity
19
+ function callRemote(uint32 _destination, CallLib.Call[] calldata calls) external returns (bytes32);
20
+ ```
21
+
22
+ ### callRemoteWithOverrides
23
+
24
+
25
+ ```solidity
26
+ function callRemoteWithOverrides(uint32 _destination, bytes32 _router, bytes32 _ism, CallLib.Call[] calldata calls)
27
+ external
28
+ returns (bytes32);
29
+ ```
30
+
31
+ ### getLocalInterchainAccount
32
+
33
+
34
+ ```solidity
35
+ function getLocalInterchainAccount(uint32 _origin, bytes32 _router, bytes32 _owner, address _ism)
36
+ external
37
+ view
38
+ returns (OwnableMulticall);
39
+ ```
40
+
41
+ ### getLocalInterchainAccount
42
+
43
+
44
+ ```solidity
45
+ function getLocalInterchainAccount(uint32 _origin, address _router, address _owner, address _ism)
46
+ external
47
+ view
48
+ returns (OwnableMulticall);
49
+ ```
50
+
51
+ ### getRemoteInterchainAccount
52
+
53
+
54
+ ```solidity
55
+ function getRemoteInterchainAccount(address _router, address _owner, address _ism) external view returns (address);
56
+ ```
57
+
58
+ ### getRemoteInterchainAccount
59
+
60
+
61
+ ```solidity
62
+ function getRemoteInterchainAccount(uint32 _destination, address _owner) external view returns (address);
63
+ ```
64
+
@@ -0,0 +1,21 @@
1
+ # IInterchainQueryRouter
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/middleware/IInterchainQueryRouter.sol)
3
+
4
+
5
+ ## Functions
6
+ ### query
7
+
8
+
9
+ ```solidity
10
+ function query(uint32 _destination, address _to, bytes memory _data, bytes memory _callback)
11
+ external
12
+ returns (bytes32);
13
+ ```
14
+
15
+ ### query
16
+
17
+
18
+ ```solidity
19
+ function query(uint32 _destination, CallLib.StaticCallWithCallback[] calldata calls) external returns (bytes32);
20
+ ```
21
+
@@ -0,0 +1,5 @@
1
+
2
+
3
+ # Contents
4
+ - [IInterchainAccountRouter](IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md)
5
+ - [IInterchainQueryRouter](IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md)
@@ -0,0 +1,7 @@
1
+
2
+
3
+ # Contents
4
+ - [aggregation](/contracts/isms/aggregation)
5
+ - [hook](/contracts/isms/hook)
6
+ - [multisig](/contracts/isms/multisig)
7
+ - [routing](/contracts/isms/routing)
@@ -0,0 +1,60 @@
1
+ # AbstractAggregationIsm
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/aggregation/AbstractAggregationIsm.sol)
3
+
4
+ **Inherits:**
5
+ [IAggregationIsm](/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md)
6
+
7
+ Manages per-domain m-of-n ISM sets that are used to verify
8
+ interchain messages.
9
+
10
+
11
+ ## State Variables
12
+ ### moduleType
13
+
14
+ ```solidity
15
+ uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.AGGREGATION);
16
+ ```
17
+
18
+
19
+ ## Functions
20
+ ### modulesAndThreshold
21
+
22
+ Returns the set of ISMs responsible for verifying _message
23
+ and the number of ISMs that must verify
24
+
25
+ *Can change based on the content of _message*
26
+
27
+
28
+ ```solidity
29
+ function modulesAndThreshold(bytes calldata _message) public view virtual returns (address[] memory, uint8);
30
+ ```
31
+ **Parameters**
32
+
33
+ |Name|Type|Description|
34
+ |----|----|-----------|
35
+ |`_message`|`bytes`|Hyperlane formatted interchain message|
36
+
37
+ **Returns**
38
+
39
+ |Name|Type|Description|
40
+ |----|----|-----------|
41
+ |`<none>`|`address[]`|modules The array of ISM addresses|
42
+ |`<none>`|`uint8`|threshold The number of ISMs needed to verify|
43
+
44
+
45
+ ### verify
46
+
47
+ Requires that m-of-n ISMs verify the provided interchain message.
48
+
49
+
50
+ ```solidity
51
+ function verify(bytes calldata _metadata, bytes calldata _message) public returns (bool);
52
+ ```
53
+ **Parameters**
54
+
55
+ |Name|Type|Description|
56
+ |----|----|-----------|
57
+ |`_metadata`|`bytes`|ABI encoded module metadata (see AggregationIsmMetadata.sol)|
58
+ |`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).|
59
+
60
+
@@ -0,0 +1,6 @@
1
+
2
+
3
+ # Contents
4
+ - [AbstractAggregationIsm](AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md)
5
+ - [StaticAggregationIsm](StaticAggregationIsm.sol/contract.StaticAggregationIsm.md)
6
+ - [StaticAggregationIsmFactory](StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md)
@@ -0,0 +1,30 @@
1
+ # StaticAggregationIsm
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/aggregation/StaticAggregationIsm.sol)
3
+
4
+ **Inherits:**
5
+ [AbstractAggregationIsm](/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md)
6
+
7
+ Manages per-domain m-of-n ISM sets that are used to verify
8
+ interchain messages.
9
+
10
+
11
+ ## Functions
12
+ ### modulesAndThreshold
13
+
14
+ Returns the set of ISMs responsible for verifying _message
15
+ and the number of ISMs that must verify
16
+
17
+ *Can change based on the content of _message*
18
+
19
+
20
+ ```solidity
21
+ function modulesAndThreshold(bytes calldata) public view virtual override returns (address[] memory, uint8);
22
+ ```
23
+ **Returns**
24
+
25
+ |Name|Type|Description|
26
+ |----|----|-----------|
27
+ |`<none>`|`address[]`|modules The array of ISM addresses|
28
+ |`<none>`|`uint8`|threshold The number of ISMs needed to verify|
29
+
30
+
@@ -0,0 +1,15 @@
1
+ # StaticAggregationIsmFactory
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/aggregation/StaticAggregationIsmFactory.sol)
3
+
4
+ **Inherits:**
5
+ [StaticMOfNAddressSetFactory](/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md)
6
+
7
+
8
+ ## Functions
9
+ ### _deployImplementation
10
+
11
+
12
+ ```solidity
13
+ function _deployImplementation() internal virtual override returns (address);
14
+ ```
15
+
@@ -0,0 +1,44 @@
1
+ # AbstractHookISM
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/hook/AbstractHookISM.sol)
3
+
4
+ **Inherits:**
5
+ [IInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md), Initializable
6
+
7
+ Uses the native bridges to verify interchain messages.
8
+
9
+ *In the future, the hook might be moved inside the Mailbox which doesn't require storage mappings for senders.
10
+ for more details see https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/2381*
11
+
12
+
13
+ ## State Variables
14
+ ### verifiedMessageIds
15
+
16
+ ```solidity
17
+ mapping(bytes32 => mapping(bytes32 => bool)) public verifiedMessageIds;
18
+ ```
19
+
20
+
21
+ ## Functions
22
+ ### verify
23
+
24
+ Verify a message was received by ISM.
25
+
26
+
27
+ ```solidity
28
+ function verify(bytes calldata, bytes calldata _message) external view returns (bool);
29
+ ```
30
+ **Parameters**
31
+
32
+ |Name|Type|Description|
33
+ |----|----|-----------|
34
+ |`<none>`|`bytes`||
35
+ |`_message`|`bytes`|Message to verify.|
36
+
37
+
38
+ ## Events
39
+ ### ReceivedMessage
40
+
41
+ ```solidity
42
+ event ReceivedMessage(bytes32 indexed sender, bytes32 indexed messageId);
43
+ ```
44
+
@@ -0,0 +1,74 @@
1
+ # CrossChainEnabled
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/hook/CrossChainEnabled.sol)
3
+
4
+ **Author:**
5
+ OpenZeppelin
6
+
7
+ *LibOptimism was removed from the OpenZeppelin Contracts library as of v4.7.0*
8
+
9
+ *Provides information for building cross-chain aware contracts. This
10
+ abstract contract provides accessors and modifiers to control the execution
11
+ flow when receiving cross-chain messages.
12
+ Actual implementations of cross-chain aware contracts, which are based on
13
+ this abstraction, will have to inherit from a bridge-specific
14
+ specialization. Such specializations are provided under
15
+ `crosschain/<chain>/CrossChainEnabled<chain>.sol`.
16
+ _Available since v4.6._*
17
+
18
+
19
+ ## Functions
20
+ ### onlyCrossChain
21
+
22
+ *Throws if the current function call is not the result of a
23
+ cross-chain execution.*
24
+
25
+
26
+ ```solidity
27
+ modifier onlyCrossChain();
28
+ ```
29
+
30
+ ### onlyCrossChainSender
31
+
32
+ *Throws if the current function call is not the result of a
33
+ cross-chain execution initiated by `account`.*
34
+
35
+
36
+ ```solidity
37
+ modifier onlyCrossChainSender(address expected);
38
+ ```
39
+
40
+ ### _isCrossChain
41
+
42
+ *Returns whether the current function call is the result of a
43
+ cross-chain message.*
44
+
45
+
46
+ ```solidity
47
+ function _isCrossChain() internal view virtual returns (bool);
48
+ ```
49
+
50
+ ### _crossChainSender
51
+
52
+ *Returns the address of the sender of the cross-chain message that
53
+ triggered the current function call.
54
+ IMPORTANT: Should revert with `NotCrossChainCall` if the current function
55
+ call is not the result of a cross-chain message.*
56
+
57
+
58
+ ```solidity
59
+ function _crossChainSender() internal view virtual returns (address);
60
+ ```
61
+
62
+ ## Errors
63
+ ### NotCrossChainCall
64
+
65
+ ```solidity
66
+ error NotCrossChainCall();
67
+ ```
68
+
69
+ ### InvalidCrossChainSender
70
+
71
+ ```solidity
72
+ error InvalidCrossChainSender(address actual, address expected);
73
+ ```
74
+
@@ -0,0 +1,57 @@
1
+ # ERC5164ISM
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/hook/ERC5164ISM.sol)
3
+
4
+ **Inherits:**
5
+ [AbstractHookISM](/contracts/isms/hook/AbstractHookISM.sol/abstract.AbstractHookISM.md)
6
+
7
+ Uses the generic eip-5164 standard to verify interchain messages.
8
+
9
+
10
+ ## State Variables
11
+ ### moduleType
12
+
13
+ ```solidity
14
+ uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.NULL);
15
+ ```
16
+
17
+
18
+ ### executor
19
+
20
+ ```solidity
21
+ address public immutable executor;
22
+ ```
23
+
24
+
25
+ ## Functions
26
+ ### isAuthorized
27
+
28
+ Check if sender is authorized to message `verifyMessageId`.
29
+
30
+
31
+ ```solidity
32
+ modifier isAuthorized();
33
+ ```
34
+
35
+ ### constructor
36
+
37
+
38
+ ```solidity
39
+ constructor(address _executor);
40
+ ```
41
+
42
+ ### verifyMessageId
43
+
44
+ Receive a message from the executor.
45
+
46
+
47
+ ```solidity
48
+ function verifyMessageId(bytes32 _sender, bytes32 _messageId) external isAuthorized;
49
+ ```
50
+ **Parameters**
51
+
52
+ |Name|Type|Description|
53
+ |----|----|-----------|
54
+ |`_sender`|`bytes32`|Left-padded address of the sender.|
55
+ |`_messageId`|`bytes32`|Hyperlane ID for the message.|
56
+
57
+
@@ -0,0 +1,7 @@
1
+
2
+
3
+ # Contents
4
+ - [optimism](/contracts/isms/hook/optimism)
5
+ - [AbstractHookISM](AbstractHookISM.sol/abstract.AbstractHookISM.md)
6
+ - [CrossChainEnabled](CrossChainEnabled.sol/abstract.CrossChainEnabled.md)
7
+ - [ERC5164ISM](ERC5164ISM.sol/contract.ERC5164ISM.md)
@@ -0,0 +1,53 @@
1
+ # CrossChainEnabledOptimism
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/hook/optimism/CrossChainEnabledOptimism.sol)
3
+
4
+ **Inherits:**
5
+ [CrossChainEnabled](/contracts/isms/hook/CrossChainEnabled.sol/abstract.CrossChainEnabled.md)
6
+
7
+ **Author:**
8
+ OpenZeppelin
9
+
10
+ *CrossChainEnabledOptimism was removed from the OpenZeppelin Contracts library as of v4.7.0*
11
+
12
+ *https://www.optimism.io/[Optimism] specialization or the
13
+ {CrossChainEnabled} abstraction.
14
+ The messenger (`CrossDomainMessenger`) contract is provided and maintained by
15
+ the optimism team. You can find the address of this contract on mainnet and
16
+ kovan in the https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/deployments[deployments section of Optimism monorepo].
17
+ _Available since v4.6._*
18
+
19
+
20
+ ## State Variables
21
+ ### _messenger
22
+
23
+ ```solidity
24
+ address private immutable _messenger;
25
+ ```
26
+
27
+
28
+ ## Functions
29
+ ### constructor
30
+
31
+
32
+ ```solidity
33
+ constructor(address messenger);
34
+ ```
35
+
36
+ ### _isCrossChain
37
+
38
+ *see {CrossChainEnabled-_isCrossChain}*
39
+
40
+
41
+ ```solidity
42
+ function _isCrossChain() internal view virtual override returns (bool);
43
+ ```
44
+
45
+ ### _crossChainSender
46
+
47
+ *see {CrossChainEnabled-_crossChainSender}*
48
+
49
+
50
+ ```solidity
51
+ function _crossChainSender() internal view virtual override onlyCrossChain returns (address);
52
+ ```
53
+
@@ -0,0 +1,39 @@
1
+ # LibOptimism
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/hook/optimism/LibOptimism.sol)
3
+
4
+ *Primitives for cross-chain aware contracts for https://www.optimism.io/[Optimism].
5
+ See the https://community.optimism.io/docs/developers/bridge/messaging/#accessing-msg-sender[documentation]
6
+ for the functionality used here.*
7
+
8
+
9
+ ## Functions
10
+ ### isCrossChain
11
+
12
+ *Returns whether the current function call is the result of a
13
+ cross-chain message relayed by `messenger`.*
14
+
15
+
16
+ ```solidity
17
+ function isCrossChain(address messenger) internal view returns (bool);
18
+ ```
19
+
20
+ ### crossChainSender
21
+
22
+ *Returns the address of the sender that triggered the current
23
+ cross-chain message through `messenger`.
24
+ NOTE: {isCrossChain} should be checked before trying to recover the
25
+ sender, as it will revert with `NotCrossChainCall` if the current
26
+ function call is not the result of a cross-chain message.*
27
+
28
+
29
+ ```solidity
30
+ function crossChainSender(address messenger) internal view returns (address);
31
+ ```
32
+
33
+ ## Errors
34
+ ### NotCrossChainCall
35
+
36
+ ```solidity
37
+ error NotCrossChainCall();
38
+ ```
39
+
@@ -0,0 +1,66 @@
1
+ # OptimismISM
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/hook/optimism/OptimismISM.sol)
3
+
4
+ **Inherits:**
5
+ [CrossChainEnabledOptimism](/contracts/isms/hook/optimism/CrossChainEnabledOptimism.sol/abstract.CrossChainEnabledOptimism.md), [AbstractHookISM](/contracts/isms/hook/AbstractHookISM.sol/abstract.AbstractHookISM.md)
6
+
7
+ Uses the native Optimism bridge to verify interchain messages.
8
+
9
+
10
+ ## State Variables
11
+ ### moduleType
12
+
13
+ ```solidity
14
+ uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.NULL);
15
+ ```
16
+
17
+
18
+ ### l1Hook
19
+
20
+ ```solidity
21
+ address public l1Hook;
22
+ ```
23
+
24
+
25
+ ## Functions
26
+ ### isAuthorized
27
+
28
+ Check if sender is authorized to message `verifyMessageId`.
29
+
30
+
31
+ ```solidity
32
+ modifier isAuthorized();
33
+ ```
34
+
35
+ ### constructor
36
+
37
+
38
+ ```solidity
39
+ constructor(address _l2Messenger) CrossChainEnabledOptimism(_l2Messenger);
40
+ ```
41
+
42
+ ### setOptimismHook
43
+
44
+
45
+ ```solidity
46
+ function setOptimismHook(address _l1Hook) external initializer;
47
+ ```
48
+
49
+ ### verifyMessageId
50
+
51
+ Receive a message from the L2 messenger.
52
+
53
+ *Only callable by the L2 messenger.*
54
+
55
+
56
+ ```solidity
57
+ function verifyMessageId(bytes32 _sender, bytes32 _messageId) external isAuthorized;
58
+ ```
59
+ **Parameters**
60
+
61
+ |Name|Type|Description|
62
+ |----|----|-----------|
63
+ |`_sender`|`bytes32`|Left-padded address of the sender.|
64
+ |`_messageId`|`bytes32`|Hyperlane ID for the message.|
65
+
66
+
@@ -0,0 +1,6 @@
1
+
2
+
3
+ # Contents
4
+ - [CrossChainEnabledOptimism](CrossChainEnabledOptimism.sol/abstract.CrossChainEnabledOptimism.md)
5
+ - [LibOptimism](LibOptimism.sol/library.LibOptimism.md)
6
+ - [OptimismISM](OptimismISM.sol/contract.OptimismISM.md)
@@ -0,0 +1,78 @@
1
+ # AbstractMerkleRootMultisigIsm
2
+ [Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol)
3
+
4
+ **Inherits:**
5
+ [AbstractMultisigIsm](/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md)
6
+
7
+ This ISM allows using a newer signed checkpoint (say #33) to prove existence of an older message (#22) in the validators' MerkleTree.
8
+ This guarantees censorship resistance as validators cannot hide a message
9
+ by refusing to sign its checkpoint but later signing a checkpoint for a newer message.
10
+ If validators decide to censor a message, they are left with only one option — to not produce checkpoints at all.
11
+ Otherwise, the very next signed checkpoint (#33) can be used by any relayer to prove the previous message inclusion using this ISM.
12
+ This is censorship resistance is missing in the sibling implementation `AbstractMessageIdMultisigIsm`,
13
+ since it can only verify messages having the corresponding checkpoints.
14
+
15
+ *Provides the default implementation of verifying signatures over a checkpoint and the message inclusion in that checkpoint.
16
+ This abstract contract can be overridden for customizing the `validatorsAndThreshold()` (static or dynamic).*
17
+
18
+ *May be adapted in future to support batch message verification against a single root.*
19
+
20
+
21
+ ## State Variables
22
+ ### moduleType
23
+
24
+ ```solidity
25
+ uint8 public constant moduleType = uint8(IInterchainSecurityModule.Types.MERKLE_ROOT_MULTISIG);
26
+ ```
27
+
28
+
29
+ ## Functions
30
+ ### digest
31
+
32
+ Returns the digest to be used for signature verification.
33
+
34
+
35
+ ```solidity
36
+ function digest(bytes calldata _metadata, bytes calldata _message) internal pure override returns (bytes32);
37
+ ```
38
+ **Parameters**
39
+
40
+ |Name|Type|Description|
41
+ |----|----|-----------|
42
+ |`_metadata`|`bytes`|ABI encoded module metadata|
43
+ |`_message`|`bytes`|Formatted Hyperlane message (see Message.sol).|
44
+
45
+ **Returns**
46
+
47
+ |Name|Type|Description|
48
+ |----|----|-----------|
49
+ |`<none>`|`bytes32`|digest The digest to be signed by validators|
50
+
51
+
52
+ ### signatureAt
53
+
54
+ Returns the signature at a given index from the metadata.
55
+
56
+
57
+ ```solidity
58
+ function signatureAt(bytes calldata _metadata, uint256 _index)
59
+ internal
60
+ pure
61
+ virtual
62
+ override
63
+ returns (bytes memory signature);
64
+ ```
65
+ **Parameters**
66
+
67
+ |Name|Type|Description|
68
+ |----|----|-----------|
69
+ |`_metadata`|`bytes`|ABI encoded module metadata|
70
+ |`_index`|`uint256`|The index of the signature to return|
71
+
72
+ **Returns**
73
+
74
+ |Name|Type|Description|
75
+ |----|----|-----------|
76
+ |`signature`|`bytes`|Packed encoding of signature (65 bytes)|
77
+
78
+