@hyperlane-xyz/core 1.4.0 → 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.
- package/contracts/interfaces/IInterchainSecurityModule.sol +2 -2
- package/dist/factories/contracts/Mailbox__factory.d.ts +1 -1
- package/dist/factories/contracts/Mailbox__factory.js +1 -1
- package/dist/factories/contracts/ValidatorAnnounce__factory.d.ts +1 -1
- package/dist/factories/contracts/ValidatorAnnounce__factory.js +1 -1
- package/dist/factories/contracts/hooks/ERC5164/ERC5164MessageHook__factory.d.ts +1 -1
- package/dist/factories/contracts/hooks/ERC5164/ERC5164MessageHook__factory.js +1 -1
- package/dist/factories/contracts/hooks/OptimismMessageHook__factory.d.ts +1 -1
- package/dist/factories/contracts/hooks/OptimismMessageHook__factory.js +1 -1
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsmFactory__factory.js +1 -1
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/aggregation/StaticAggregationIsm__factory.js +1 -1
- package/dist/factories/contracts/isms/hook/ERC5164ISM__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/hook/ERC5164ISM__factory.js +1 -1
- package/dist/factories/contracts/isms/hook/optimism/OptimismISM__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/hook/optimism/OptimismISM__factory.js +1 -1
- package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/multisig/LegacyMultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsmFactory__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsmFactory__factory.js +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMerkleRootMultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsmFactory__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsmFactory__factory.js +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/multisig/StaticMultisigIsm.sol/StaticMessageIdMultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/isms/routing/DomainRoutingIsmFactory__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/routing/DomainRoutingIsmFactory__factory.js +1 -1
- package/dist/factories/contracts/isms/routing/DomainRoutingIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/routing/DomainRoutingIsm__factory.js +1 -1
- package/dist/factories/contracts/isms/routing/InterchainAccountIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/isms/routing/InterchainAccountIsm__factory.js +1 -1
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/InterchainAccountRouter__factory.js +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/InterchainQueryRouter__factory.js +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/LiquidityLayerRouter__factory.js +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter__factory.js +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.d.ts +1 -1
- package/dist/factories/contracts/middleware/liquidity-layer/adapters/PortalAdapter__factory.js +1 -1
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.d.ts +1 -1
- package/dist/factories/contracts/mock/MockHyperlaneEnvironment__factory.js +1 -1
- package/dist/factories/contracts/mock/MockMailbox__factory.d.ts +1 -1
- package/dist/factories/contracts/mock/MockMailbox__factory.js +1 -1
- package/dist/factories/contracts/test/LightTestRecipient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/LightTestRecipient__factory.js +1 -1
- package/dist/factories/contracts/test/TestGasRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestGasRouter__factory.js +1 -1
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestHyperlaneConnectionClient__factory.js +1 -1
- package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestLegacyMultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/test/TestMailbox__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMailbox__factory.js +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestMultisigIsm__factory.js +1 -1
- package/dist/factories/contracts/test/TestQuery__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestQuery__factory.js +1 -1
- package/dist/factories/contracts/test/TestRecipient__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestRecipient__factory.js +1 -1
- package/dist/factories/contracts/test/TestRouter__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestRouter__factory.js +1 -1
- package/dist/factories/contracts/test/TestSendReceiver__factory.d.ts +1 -1
- package/dist/factories/contracts/test/TestSendReceiver__factory.js +1 -1
- package/docs/book.css +13 -0
- package/docs/book.toml +12 -0
- package/docs/solidity.min.js +74 -0
- package/docs/src/README.md +15 -0
- package/docs/src/SUMMARY.md +139 -0
- package/docs/src/contracts/GasRouter.sol/abstract.GasRouter.md +124 -0
- package/docs/src/contracts/HyperlaneConnectionClient.sol/abstract.HyperlaneConnectionClient.md +191 -0
- package/docs/src/contracts/Mailbox.sol/contract.Mailbox.md +251 -0
- package/docs/src/contracts/OwnableMulticall.sol/contract.OwnableMulticall.md +41 -0
- package/docs/src/contracts/PausableReentrancyGuard.sol/abstract.PausableReentrancyGuardUpgradeable.md +100 -0
- package/docs/src/contracts/README.md +19 -0
- package/docs/src/contracts/Router.sol/abstract.Router.md +255 -0
- package/docs/src/contracts/ValidatorAnnounce.sol/contract.ValidatorAnnounce.md +117 -0
- package/docs/src/contracts/hooks/ERC5164/ERC5164MessageHook.sol/contract.ERC5164MessageHook.md +64 -0
- package/docs/src/contracts/hooks/ERC5164/README.md +5 -0
- package/docs/src/contracts/hooks/ERC5164/interfaces/IMessageDispatcher.sol/interface.IMessageDispatcher.md +25 -0
- package/docs/src/contracts/hooks/ERC5164/interfaces/README.md +4 -0
- package/docs/src/contracts/hooks/OptimismMessageHook.sol/contract.OptimismMessageHook.md +71 -0
- package/docs/src/contracts/hooks/README.md +5 -0
- package/docs/src/contracts/igps/InterchainGasPaymaster.sol/contract.InterchainGasPaymaster.md +231 -0
- package/docs/src/contracts/igps/OverheadIgp.sol/contract.OverheadIgp.md +161 -0
- package/docs/src/contracts/igps/README.md +6 -0
- package/docs/src/contracts/igps/gas-oracles/README.md +4 -0
- package/docs/src/contracts/igps/gas-oracles/StorageGasOracle.sol/contract.StorageGasOracle.md +114 -0
- package/docs/src/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md +25 -0
- package/docs/src/contracts/interfaces/IHyperlaneConnectionClient.sol/interface.IHyperlaneConnectionClient.md +43 -0
- package/docs/src/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md +33 -0
- package/docs/src/contracts/interfaces/IInterchainSecurityModule.sol/interface.IInterchainSecurityModule.md +55 -0
- package/docs/src/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md +12 -0
- package/docs/src/contracts/interfaces/ILiquidityLayerMessageRecipient.sol/interface.ILiquidityLayerMessageRecipient.md +13 -0
- package/docs/src/contracts/interfaces/ILiquidityLayerRouter.sol/interface.ILiquidityLayerRouter.md +19 -0
- package/docs/src/contracts/interfaces/IMailbox.sol/interface.IMailbox.md +103 -0
- package/docs/src/contracts/interfaces/IMessageRecipient.sol/interface.IMessageRecipient.md +12 -0
- package/docs/src/contracts/interfaces/IRouter.sol/interface.IRouter.md +33 -0
- package/docs/src/contracts/interfaces/IValidatorAnnounce.sol/interface.IValidatorAnnounce.md +78 -0
- package/docs/src/contracts/interfaces/README.md +17 -0
- package/docs/src/contracts/interfaces/hooks/IMessageHook.sol/interface.IMessageHook.md +12 -0
- package/docs/src/contracts/interfaces/hooks/README.md +4 -0
- package/docs/src/contracts/interfaces/isms/IAggregationIsm.sol/interface.IAggregationIsm.md +36 -0
- package/docs/src/contracts/interfaces/isms/IMultisigIsm.sol/interface.IMultisigIsm.md +36 -0
- package/docs/src/contracts/interfaces/isms/IRoutingIsm.sol/interface.IRoutingIsm.md +31 -0
- package/docs/src/contracts/interfaces/isms/README.md +6 -0
- package/docs/src/contracts/interfaces/middleware/IInterchainAccountRouter.sol/interface.IInterchainAccountRouter.md +64 -0
- package/docs/src/contracts/interfaces/middleware/IInterchainQueryRouter.sol/interface.IInterchainQueryRouter.md +21 -0
- package/docs/src/contracts/interfaces/middleware/README.md +5 -0
- package/docs/src/contracts/isms/README.md +7 -0
- package/docs/src/contracts/isms/aggregation/AbstractAggregationIsm.sol/abstract.AbstractAggregationIsm.md +60 -0
- package/docs/src/contracts/isms/aggregation/README.md +6 -0
- package/docs/src/contracts/isms/aggregation/StaticAggregationIsm.sol/contract.StaticAggregationIsm.md +30 -0
- package/docs/src/contracts/isms/aggregation/StaticAggregationIsmFactory.sol/contract.StaticAggregationIsmFactory.md +15 -0
- package/docs/src/contracts/isms/hook/AbstractHookISM.sol/abstract.AbstractHookISM.md +44 -0
- package/docs/src/contracts/isms/hook/CrossChainEnabled.sol/abstract.CrossChainEnabled.md +74 -0
- package/docs/src/contracts/isms/hook/ERC5164ISM.sol/contract.ERC5164ISM.md +57 -0
- package/docs/src/contracts/isms/hook/README.md +7 -0
- package/docs/src/contracts/isms/hook/optimism/CrossChainEnabledOptimism.sol/abstract.CrossChainEnabledOptimism.md +53 -0
- package/docs/src/contracts/isms/hook/optimism/LibOptimism.sol/library.LibOptimism.md +39 -0
- package/docs/src/contracts/isms/hook/optimism/OptimismISM.sol/contract.OptimismISM.md +66 -0
- package/docs/src/contracts/isms/hook/optimism/README.md +6 -0
- package/docs/src/contracts/isms/multisig/AbstractMerkleRootMultisigIsm.sol/abstract.AbstractMerkleRootMultisigIsm.md +78 -0
- package/docs/src/contracts/isms/multisig/AbstractMessageIdMultisigIsm.sol/abstract.AbstractMessageIdMultisigIsm.md +69 -0
- package/docs/src/contracts/isms/multisig/AbstractMultisigIsm.sol/abstract.AbstractMultisigIsm.md +102 -0
- package/docs/src/contracts/isms/multisig/LegacyMultisigIsm.sol/contract.LegacyMultisigIsm.md +355 -0
- package/docs/src/contracts/isms/multisig/README.md +12 -0
- package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/abstract.AbstractMetaProxyMultisigIsm.md +36 -0
- package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsm.md +11 -0
- package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMerkleRootMultisigIsmFactory.md +15 -0
- package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsm.md +10 -0
- package/docs/src/contracts/isms/multisig/StaticMultisigIsm.sol/contract.StaticMessageIdMultisigIsmFactory.md +15 -0
- package/docs/src/contracts/isms/routing/AbstractRoutingIsm.sol/abstract.AbstractRoutingIsm.md +55 -0
- package/docs/src/contracts/isms/routing/DomainRoutingIsm.sol/contract.DomainRoutingIsm.md +112 -0
- package/docs/src/contracts/isms/routing/DomainRoutingIsmFactory.sol/contract.DomainRoutingIsmFactory.md +47 -0
- package/docs/src/contracts/isms/routing/InterchainAccountIsm.sol/contract.InterchainAccountIsm.md +44 -0
- package/docs/src/contracts/isms/routing/README.md +7 -0
- package/docs/src/contracts/libs/Call.sol/library.CallLib.md +124 -0
- package/docs/src/contracts/libs/CheckpointLib.sol/library.CheckpointLib.md +61 -0
- package/docs/src/contracts/libs/EnumerableMapExtended.sol/library.EnumerableMapExtended.md +63 -0
- package/docs/src/contracts/libs/LegacyCheckpointLib.sol/library.LegacyCheckpointLib.md +55 -0
- package/docs/src/contracts/libs/Merkle.sol/library.MerkleLib.md +354 -0
- package/docs/src/contracts/libs/Message.sol/library.Message.md +304 -0
- package/docs/src/contracts/libs/MetaProxy.sol/library.MetaProxy.md +36 -0
- package/docs/src/contracts/libs/MinimalProxy.sol/library.MinimalProxy.md +34 -0
- package/docs/src/contracts/libs/README.md +16 -0
- package/docs/src/contracts/libs/StaticMOfNAddressSetFactory.sol/abstract.StaticMOfNAddressSetFactory.md +123 -0
- package/docs/src/contracts/libs/TypeCasts.sol/library.TypeCasts.md +19 -0
- package/docs/src/contracts/libs/ValidatorAnnouncements.sol/library.ValidatorAnnouncements.md +31 -0
- package/docs/src/contracts/libs/isms/AggregationIsmMetadata.sol/library.AggregationIsmMetadata.md +97 -0
- package/docs/src/contracts/libs/isms/LegacyMultisigIsmMetadata.sol/library.LegacyMultisigIsmMetadata.md +296 -0
- package/docs/src/contracts/libs/isms/MerkleRootMultisigIsmMetadata.sol/library.MerkleRootMultisigIsmMetadata.md +177 -0
- package/docs/src/contracts/libs/isms/MessageIdMultisigIsmMetadata.sol/library.MessageIdMultisigIsmMetadata.md +109 -0
- package/docs/src/contracts/libs/isms/README.md +7 -0
- package/docs/src/contracts/libs/middleware/InterchainAccountMessage.sol/library.InterchainAccountMessage.md +134 -0
- package/docs/src/contracts/libs/middleware/InterchainQueryMessage.sol/library.InterchainQueryMessage.md +203 -0
- package/docs/src/contracts/libs/middleware/README.md +5 -0
- package/docs/src/contracts/middleware/InterchainAccountRouter.sol/contract.InterchainAccountRouter.md +542 -0
- package/docs/src/contracts/middleware/InterchainQueryRouter.sol/contract.InterchainQueryRouter.md +119 -0
- package/docs/src/contracts/middleware/README.md +6 -0
- package/docs/src/contracts/middleware/liquidity-layer/LiquidityLayerRouter.sol/contract.LiquidityLayerRouter.md +81 -0
- package/docs/src/contracts/middleware/liquidity-layer/README.md +6 -0
- package/docs/src/contracts/middleware/liquidity-layer/adapters/CircleBridgeAdapter.sol/contract.CircleBridgeAdapter.md +197 -0
- package/docs/src/contracts/middleware/liquidity-layer/adapters/PortalAdapter.sol/contract.PortalAdapter.md +189 -0
- package/docs/src/contracts/middleware/liquidity-layer/adapters/README.md +5 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/ILiquidityLayerAdapter.sol/interface.ILiquidityLayerAdapter.md +23 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/README.md +6 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/ICircleMessageTransmitter.sol/interface.ICircleMessageTransmitter.md +54 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/ITokenMessenger.sol/interface.ITokenMessenger.md +92 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/circle/README.md +5 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/portal/IPortalTokenBridge.sol/interface.IPortalTokenBridge.md +131 -0
- package/docs/src/contracts/middleware/liquidity-layer/interfaces/portal/README.md +4 -0
- package/docs/src/contracts/mock/MockCircleMessageTransmitter.sol/contract.MockCircleMessageTransmitter.md +58 -0
- package/docs/src/contracts/mock/MockCircleTokenMessenger.sol/contract.MockCircleTokenMessenger.md +44 -0
- package/docs/src/contracts/mock/MockERC5164.sol/contract.MockMessageDispatcher.md +15 -0
- package/docs/src/contracts/mock/MockERC5164.sol/contract.MockMessageExecutor.md +11 -0
- package/docs/src/contracts/mock/MockHyperlaneEnvironment.sol/contract.MockHyperlaneEnvironment.md +69 -0
- package/docs/src/contracts/mock/MockMailbox.sol/contract.MockMailbox.md +137 -0
- package/docs/src/contracts/mock/MockPortalBridge.sol/contract.MockPortalBridge.md +82 -0
- package/docs/src/contracts/mock/MockToken.sol/contract.MockToken.md +22 -0
- package/docs/src/contracts/mock/README.md +11 -0
- package/docs/src/contracts/test/LightTestRecipient.sol/contract.LightTestRecipient.md +15 -0
- package/docs/src/contracts/test/README.md +20 -0
- package/docs/src/contracts/test/TestGasRouter.sol/contract.TestGasRouter.md +27 -0
- package/docs/src/contracts/test/TestHyperlaneConnectionClient.sol/contract.TestHyperlaneConnectionClient.md +29 -0
- package/docs/src/contracts/test/TestInterchainGasPaymaster.sol/contract.TestInterchainGasPaymaster.md +30 -0
- package/docs/src/contracts/test/TestLegacyMultisigIsm.sol/contract.TestLegacyMultisigIsm.md +15 -0
- package/docs/src/contracts/test/TestLiquidityLayerMessageRecipient.sol/contract.TestLiquidityLayerMessageRecipient.md +23 -0
- package/docs/src/contracts/test/TestMailbox.sol/contract.TestMailbox.md +29 -0
- package/docs/src/contracts/test/TestMerkle.sol/contract.TestMerkle.md +50 -0
- package/docs/src/contracts/test/TestMessage.sol/contract.TestMessage.md +68 -0
- package/docs/src/contracts/test/TestMultisigIsm.sol/contract.TestMultisigIsm.md +51 -0
- package/docs/src/contracts/test/TestQuery.sol/contract.TestQuery.md +45 -0
- package/docs/src/contracts/test/TestQuerySender.sol/contract.TestQuerySender.md +128 -0
- package/docs/src/contracts/test/TestRecipient.sol/contract.TestRecipient.md +78 -0
- package/docs/src/contracts/test/TestRouter.sol/contract.TestRouter.md +63 -0
- package/docs/src/contracts/test/TestSendReceiver.sol/contract.TestSendReceiver.md +49 -0
- package/docs/src/contracts/test/TestTokenRecipient.sol/contract.TestTokenRecipient.md +80 -0
- package/docs/src/contracts/test/bad-recipient/BadRecipient1.sol/contract.BadRecipient1.md +15 -0
- package/docs/src/contracts/test/bad-recipient/BadRecipient2.sol/contract.BadRecipient2.md +12 -0
- package/docs/src/contracts/test/bad-recipient/BadRecipient3.sol/contract.BadRecipient3.md +15 -0
- package/docs/src/contracts/test/bad-recipient/BadRecipient5.sol/contract.BadRecipient5.md +15 -0
- package/docs/src/contracts/test/bad-recipient/BadRecipient6.sol/contract.BadRecipient6.md +15 -0
- package/docs/src/contracts/test/bad-recipient/README.md +8 -0
- package/docs/src/contracts/upgrade/README.md +4 -0
- package/docs/src/contracts/upgrade/Versioned.sol/contract.Versioned.md +14 -0
- package/package.json +3 -3
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# InterchainGasPaymaster
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/igps/InterchainGasPaymaster.sol)
|
|
3
|
+
|
|
4
|
+
**Inherits:**
|
|
5
|
+
[IInterchainGasPaymaster](/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md), [IGasOracle](/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md), OwnableUpgradeable
|
|
6
|
+
|
|
7
|
+
Manages payments on a source chain to cover gas costs of relaying
|
|
8
|
+
messages to destination chains.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## State Variables
|
|
12
|
+
### TOKEN_EXCHANGE_RATE_SCALE
|
|
13
|
+
The scale of gas oracle token exchange rates.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
```solidity
|
|
17
|
+
uint256 internal constant TOKEN_EXCHANGE_RATE_SCALE = 1e10;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### gasOracles
|
|
22
|
+
Keyed by remote domain, the gas oracle to use for the domain.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
```solidity
|
|
26
|
+
mapping(uint32 => IGasOracle) public gasOracles;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### beneficiary
|
|
31
|
+
The benficiary that can receive native tokens paid into this contract.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
```solidity
|
|
35
|
+
address public beneficiary;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Functions
|
|
40
|
+
### initialize
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
```solidity
|
|
44
|
+
function initialize(address _owner, address _beneficiary) public initializer;
|
|
45
|
+
```
|
|
46
|
+
**Parameters**
|
|
47
|
+
|
|
48
|
+
|Name|Type|Description|
|
|
49
|
+
|----|----|-----------|
|
|
50
|
+
|`_owner`|`address`|The owner of the contract.|
|
|
51
|
+
|`_beneficiary`|`address`|The beneficiary.|
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### payForGas
|
|
55
|
+
|
|
56
|
+
Deposits msg.value as a payment for the relaying of a message
|
|
57
|
+
to its destination chain.
|
|
58
|
+
|
|
59
|
+
*Overpayment will result in a refund of native tokens to the _refundAddress.
|
|
60
|
+
Callers should be aware that this may present reentrancy issues.*
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
```solidity
|
|
64
|
+
function payForGas(bytes32 _messageId, uint32 _destinationDomain, uint256 _gasAmount, address _refundAddress)
|
|
65
|
+
external
|
|
66
|
+
payable
|
|
67
|
+
override;
|
|
68
|
+
```
|
|
69
|
+
**Parameters**
|
|
70
|
+
|
|
71
|
+
|Name|Type|Description|
|
|
72
|
+
|----|----|-----------|
|
|
73
|
+
|`_messageId`|`bytes32`|The ID of the message to pay for.|
|
|
74
|
+
|`_destinationDomain`|`uint32`|The domain of the message's destination chain.|
|
|
75
|
+
|`_gasAmount`|`uint256`|The amount of destination gas to pay for.|
|
|
76
|
+
|`_refundAddress`|`address`|The address to refund any overpayment to.|
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### claim
|
|
80
|
+
|
|
81
|
+
Transfers the entire native token balance to the beneficiary.
|
|
82
|
+
|
|
83
|
+
*The beneficiary must be able to receive native tokens.*
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
```solidity
|
|
87
|
+
function claim() external;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### setGasOracles
|
|
91
|
+
|
|
92
|
+
Sets the gas oracles for remote domains specified in the config array.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
```solidity
|
|
96
|
+
function setGasOracles(GasOracleConfig[] calldata _configs) external onlyOwner;
|
|
97
|
+
```
|
|
98
|
+
**Parameters**
|
|
99
|
+
|
|
100
|
+
|Name|Type|Description|
|
|
101
|
+
|----|----|-----------|
|
|
102
|
+
|`_configs`|`GasOracleConfig[]`|An array of configs including the remote domain and gas oracles to set.|
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### setBeneficiary
|
|
106
|
+
|
|
107
|
+
Sets the beneficiary.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
```solidity
|
|
111
|
+
function setBeneficiary(address _beneficiary) external onlyOwner;
|
|
112
|
+
```
|
|
113
|
+
**Parameters**
|
|
114
|
+
|
|
115
|
+
|Name|Type|Description|
|
|
116
|
+
|----|----|-----------|
|
|
117
|
+
|`_beneficiary`|`address`|The new beneficiary.|
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### quoteGasPayment
|
|
121
|
+
|
|
122
|
+
Quotes the amount of native tokens to pay for interchain gas.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
```solidity
|
|
126
|
+
function quoteGasPayment(uint32 _destinationDomain, uint256 _gasAmount)
|
|
127
|
+
public
|
|
128
|
+
view
|
|
129
|
+
virtual
|
|
130
|
+
override
|
|
131
|
+
returns (uint256);
|
|
132
|
+
```
|
|
133
|
+
**Parameters**
|
|
134
|
+
|
|
135
|
+
|Name|Type|Description|
|
|
136
|
+
|----|----|-----------|
|
|
137
|
+
|`_destinationDomain`|`uint32`|The domain of the message's destination chain.|
|
|
138
|
+
|`_gasAmount`|`uint256`|The amount of destination gas to pay for.|
|
|
139
|
+
|
|
140
|
+
**Returns**
|
|
141
|
+
|
|
142
|
+
|Name|Type|Description|
|
|
143
|
+
|----|----|-----------|
|
|
144
|
+
|`<none>`|`uint256`|The amount of native tokens required to pay for interchain gas.|
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### getExchangeRateAndGasPrice
|
|
148
|
+
|
|
149
|
+
Gets the token exchange rate and gas price from the configured gas oracle
|
|
150
|
+
for a given destination domain.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
```solidity
|
|
154
|
+
function getExchangeRateAndGasPrice(uint32 _destinationDomain)
|
|
155
|
+
public
|
|
156
|
+
view
|
|
157
|
+
override
|
|
158
|
+
returns (uint128 tokenExchangeRate, uint128 gasPrice);
|
|
159
|
+
```
|
|
160
|
+
**Parameters**
|
|
161
|
+
|
|
162
|
+
|Name|Type|Description|
|
|
163
|
+
|----|----|-----------|
|
|
164
|
+
|`_destinationDomain`|`uint32`|The destination domain.|
|
|
165
|
+
|
|
166
|
+
**Returns**
|
|
167
|
+
|
|
168
|
+
|Name|Type|Description|
|
|
169
|
+
|----|----|-----------|
|
|
170
|
+
|`tokenExchangeRate`|`uint128`|The exchange rate of the remote native token quoted in the local native token.|
|
|
171
|
+
|`gasPrice`|`uint128`|The gas price on the remote chain.|
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
### _setBeneficiary
|
|
175
|
+
|
|
176
|
+
Sets the beneficiary.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
```solidity
|
|
180
|
+
function _setBeneficiary(address _beneficiary) internal;
|
|
181
|
+
```
|
|
182
|
+
**Parameters**
|
|
183
|
+
|
|
184
|
+
|Name|Type|Description|
|
|
185
|
+
|----|----|-----------|
|
|
186
|
+
|`_beneficiary`|`address`|The new beneficiary.|
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### _setGasOracle
|
|
190
|
+
|
|
191
|
+
Sets the gas oracle for a remote domain.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
```solidity
|
|
195
|
+
function _setGasOracle(uint32 _remoteDomain, address _gasOracle) internal;
|
|
196
|
+
```
|
|
197
|
+
**Parameters**
|
|
198
|
+
|
|
199
|
+
|Name|Type|Description|
|
|
200
|
+
|----|----|-----------|
|
|
201
|
+
|`_remoteDomain`|`uint32`|The remote domain.|
|
|
202
|
+
|`_gasOracle`|`address`|The gas oracle.|
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## Events
|
|
206
|
+
### GasOracleSet
|
|
207
|
+
Emitted when the gas oracle for a remote domain is set.
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
```solidity
|
|
211
|
+
event GasOracleSet(uint32 indexed remoteDomain, address gasOracle);
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### BeneficiarySet
|
|
215
|
+
Emitted when the beneficiary is set.
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
```solidity
|
|
219
|
+
event BeneficiarySet(address beneficiary);
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Structs
|
|
223
|
+
### GasOracleConfig
|
|
224
|
+
|
|
225
|
+
```solidity
|
|
226
|
+
struct GasOracleConfig {
|
|
227
|
+
uint32 remoteDomain;
|
|
228
|
+
address gasOracle;
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# OverheadIgp
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/igps/OverheadIgp.sol)
|
|
3
|
+
|
|
4
|
+
**Inherits:**
|
|
5
|
+
[IInterchainGasPaymaster](/contracts/interfaces/IInterchainGasPaymaster.sol/interface.IInterchainGasPaymaster.md), Ownable
|
|
6
|
+
|
|
7
|
+
An IGP that adds configured gas overheads to gas amounts and forwards
|
|
8
|
+
calls to an "inner" IGP.
|
|
9
|
+
|
|
10
|
+
*The intended use of this contract is to store overhead gas amounts for destination
|
|
11
|
+
domains, e.g. Mailbox and/or ISM gas usage, such that users of this IGP are only required
|
|
12
|
+
to specify the gas amount used by their own applications.*
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## State Variables
|
|
16
|
+
### innerIgp
|
|
17
|
+
The IGP that is called when paying for or quoting gas
|
|
18
|
+
after applying overhead gas amounts.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```solidity
|
|
22
|
+
IInterchainGasPaymaster public immutable innerIgp;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### destinationGasOverhead
|
|
27
|
+
Destination domain => overhead gas amount on that domain.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
```solidity
|
|
31
|
+
mapping(uint32 => uint256) public destinationGasOverhead;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Functions
|
|
36
|
+
### constructor
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
```solidity
|
|
40
|
+
constructor(address _innerIgp);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### payForGas
|
|
44
|
+
|
|
45
|
+
Adds the stored destinationGasOverhead to the _gasAmount and forwards the
|
|
46
|
+
call to the innerIgp's `payForGas` function.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
```solidity
|
|
50
|
+
function payForGas(bytes32 _messageId, uint32 _destinationDomain, uint256 _gasAmount, address _refundAddress)
|
|
51
|
+
external
|
|
52
|
+
payable;
|
|
53
|
+
```
|
|
54
|
+
**Parameters**
|
|
55
|
+
|
|
56
|
+
|Name|Type|Description|
|
|
57
|
+
|----|----|-----------|
|
|
58
|
+
|`_messageId`|`bytes32`|The ID of the message to pay for.|
|
|
59
|
+
|`_destinationDomain`|`uint32`|The domain of the message's destination chain.|
|
|
60
|
+
|`_gasAmount`|`uint256`|The amount of destination gas to pay for. This should not consider any gas that is accounted for in the stored destinationGasOverhead.|
|
|
61
|
+
|`_refundAddress`|`address`|The address to refund any overpayment to.|
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### setDestinationGasOverheads
|
|
65
|
+
|
|
66
|
+
Sets destination gas overheads for multiple domains.
|
|
67
|
+
|
|
68
|
+
*Only callable by the owner.*
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
```solidity
|
|
72
|
+
function setDestinationGasOverheads(DomainConfig[] calldata configs) external onlyOwner;
|
|
73
|
+
```
|
|
74
|
+
**Parameters**
|
|
75
|
+
|
|
76
|
+
|Name|Type|Description|
|
|
77
|
+
|----|----|-----------|
|
|
78
|
+
|`configs`|`DomainConfig[]`|A list of destination domains and gas overheads.|
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### quoteGasPayment
|
|
82
|
+
|
|
83
|
+
Adds the stored destinationGasOverhead to the _gasAmount and forwards the
|
|
84
|
+
call to the innerIgp's `quoteGasPayment` function.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
```solidity
|
|
88
|
+
function quoteGasPayment(uint32 _destinationDomain, uint256 _gasAmount) public view returns (uint256);
|
|
89
|
+
```
|
|
90
|
+
**Parameters**
|
|
91
|
+
|
|
92
|
+
|Name|Type|Description|
|
|
93
|
+
|----|----|-----------|
|
|
94
|
+
|`_destinationDomain`|`uint32`|The domain of the message's destination chain.|
|
|
95
|
+
|`_gasAmount`|`uint256`|The amount of destination gas to pay for. This should not consider any gas that is accounted for in the stored destinationGasOverhead.|
|
|
96
|
+
|
|
97
|
+
**Returns**
|
|
98
|
+
|
|
99
|
+
|Name|Type|Description|
|
|
100
|
+
|----|----|-----------|
|
|
101
|
+
|`<none>`|`uint256`|The amount of native tokens required to pay for interchain gas.|
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### destinationGasAmount
|
|
105
|
+
|
|
106
|
+
Returns the stored destinationGasOverhead added to the _gasAmount.
|
|
107
|
+
|
|
108
|
+
*If there is no stored destinationGasOverhead, 0 is used.*
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
```solidity
|
|
112
|
+
function destinationGasAmount(uint32 _destinationDomain, uint256 _gasAmount) public view returns (uint256);
|
|
113
|
+
```
|
|
114
|
+
**Parameters**
|
|
115
|
+
|
|
116
|
+
|Name|Type|Description|
|
|
117
|
+
|----|----|-----------|
|
|
118
|
+
|`_destinationDomain`|`uint32`|The domain of the message's destination chain.|
|
|
119
|
+
|`_gasAmount`|`uint256`|The amount of destination gas to pay for. This should not consider any gas that is accounted for in the stored destinationGasOverhead.|
|
|
120
|
+
|
|
121
|
+
**Returns**
|
|
122
|
+
|
|
123
|
+
|Name|Type|Description|
|
|
124
|
+
|----|----|-----------|
|
|
125
|
+
|`<none>`|`uint256`|The stored destinationGasOverhead added to the _gasAmount.|
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### _setDestinationGasOverhead
|
|
129
|
+
|
|
130
|
+
Sets the destination gas overhead for a single domain.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
```solidity
|
|
134
|
+
function _setDestinationGasOverhead(DomainConfig calldata config) internal;
|
|
135
|
+
```
|
|
136
|
+
**Parameters**
|
|
137
|
+
|
|
138
|
+
|Name|Type|Description|
|
|
139
|
+
|----|----|-----------|
|
|
140
|
+
|`config`|`DomainConfig`|The destination domain and gas overhead.|
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
## Events
|
|
144
|
+
### DestinationGasOverheadSet
|
|
145
|
+
Emitted when an entry in the destinationGasOverhead mapping is set.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
```solidity
|
|
149
|
+
event DestinationGasOverheadSet(uint32 indexed domain, uint256 gasOverhead);
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Structs
|
|
153
|
+
### DomainConfig
|
|
154
|
+
|
|
155
|
+
```solidity
|
|
156
|
+
struct DomainConfig {
|
|
157
|
+
uint32 domain;
|
|
158
|
+
uint256 gasOverhead;
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# StorageGasOracle
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/igps/gas-oracles/StorageGasOracle.sol)
|
|
3
|
+
|
|
4
|
+
**Inherits:**
|
|
5
|
+
[IGasOracle](/contracts/interfaces/IGasOracle.sol/interface.IGasOracle.md), Ownable
|
|
6
|
+
|
|
7
|
+
A gas oracle that uses data stored within the contract.
|
|
8
|
+
|
|
9
|
+
*This contract is intended to be owned by an address that will
|
|
10
|
+
update the stored remote gas data.*
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## State Variables
|
|
14
|
+
### remoteGasData
|
|
15
|
+
Keyed by remote domain, gas data on that remote domain.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
```solidity
|
|
19
|
+
mapping(uint32 => IGasOracle.RemoteGasData) public remoteGasData;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Functions
|
|
24
|
+
### getExchangeRateAndGasPrice
|
|
25
|
+
|
|
26
|
+
Returns the stored `remoteGasData` for the `_destinationDomain`.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
```solidity
|
|
30
|
+
function getExchangeRateAndGasPrice(uint32 _destinationDomain)
|
|
31
|
+
external
|
|
32
|
+
view
|
|
33
|
+
override
|
|
34
|
+
returns (uint128 tokenExchangeRate, uint128 gasPrice);
|
|
35
|
+
```
|
|
36
|
+
**Parameters**
|
|
37
|
+
|
|
38
|
+
|Name|Type|Description|
|
|
39
|
+
|----|----|-----------|
|
|
40
|
+
|`_destinationDomain`|`uint32`|The destination domain.|
|
|
41
|
+
|
|
42
|
+
**Returns**
|
|
43
|
+
|
|
44
|
+
|Name|Type|Description|
|
|
45
|
+
|----|----|-----------|
|
|
46
|
+
|`tokenExchangeRate`|`uint128`|The exchange rate of the remote native token quoted in the local native token.|
|
|
47
|
+
|`gasPrice`|`uint128`|The gas price on the remote chain.|
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### setRemoteGasDataConfigs
|
|
51
|
+
|
|
52
|
+
Sets the remote gas data for many remotes at a time.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
```solidity
|
|
56
|
+
function setRemoteGasDataConfigs(RemoteGasDataConfig[] calldata _configs) external onlyOwner;
|
|
57
|
+
```
|
|
58
|
+
**Parameters**
|
|
59
|
+
|
|
60
|
+
|Name|Type|Description|
|
|
61
|
+
|----|----|-----------|
|
|
62
|
+
|`_configs`|`RemoteGasDataConfig[]`|The configs to use when setting the remote gas data.|
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### setRemoteGasData
|
|
66
|
+
|
|
67
|
+
Sets the remote gas data using the values in `_config`.
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
```solidity
|
|
71
|
+
function setRemoteGasData(RemoteGasDataConfig calldata _config) external onlyOwner;
|
|
72
|
+
```
|
|
73
|
+
**Parameters**
|
|
74
|
+
|
|
75
|
+
|Name|Type|Description|
|
|
76
|
+
|----|----|-----------|
|
|
77
|
+
|`_config`|`RemoteGasDataConfig`|The config to use when setting the remote gas data.|
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### _setRemoteGasData
|
|
81
|
+
|
|
82
|
+
Sets the remote gas data using the values in `_config`.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
```solidity
|
|
86
|
+
function _setRemoteGasData(RemoteGasDataConfig calldata _config) internal;
|
|
87
|
+
```
|
|
88
|
+
**Parameters**
|
|
89
|
+
|
|
90
|
+
|Name|Type|Description|
|
|
91
|
+
|----|----|-----------|
|
|
92
|
+
|`_config`|`RemoteGasDataConfig`|The config to use when setting the remote gas data.|
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Events
|
|
96
|
+
### RemoteGasDataSet
|
|
97
|
+
Emitted when an entry in `remoteGasData` is set.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
```solidity
|
|
101
|
+
event RemoteGasDataSet(uint32 indexed remoteDomain, uint128 tokenExchangeRate, uint128 gasPrice);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Structs
|
|
105
|
+
### RemoteGasDataConfig
|
|
106
|
+
|
|
107
|
+
```solidity
|
|
108
|
+
struct RemoteGasDataConfig {
|
|
109
|
+
uint32 remoteDomain;
|
|
110
|
+
uint128 tokenExchangeRate;
|
|
111
|
+
uint128 gasPrice;
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# IGasOracle
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/IGasOracle.sol)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Functions
|
|
6
|
+
### getExchangeRateAndGasPrice
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```solidity
|
|
10
|
+
function getExchangeRateAndGasPrice(uint32 _destinationDomain)
|
|
11
|
+
external
|
|
12
|
+
view
|
|
13
|
+
returns (uint128 tokenExchangeRate, uint128 gasPrice);
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Structs
|
|
17
|
+
### RemoteGasData
|
|
18
|
+
|
|
19
|
+
```solidity
|
|
20
|
+
struct RemoteGasData {
|
|
21
|
+
uint128 tokenExchangeRate;
|
|
22
|
+
uint128 gasPrice;
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# IHyperlaneConnectionClient
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/IHyperlaneConnectionClient.sol)
|
|
3
|
+
|
|
4
|
+
**Inherits:**
|
|
5
|
+
[ISpecifiesInterchainSecurityModule](/contracts/interfaces/IInterchainSecurityModule.sol/interface.ISpecifiesInterchainSecurityModule.md)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Functions
|
|
9
|
+
### mailbox
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
```solidity
|
|
13
|
+
function mailbox() external view returns (IMailbox);
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### interchainGasPaymaster
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
```solidity
|
|
20
|
+
function interchainGasPaymaster() external view returns (IInterchainGasPaymaster);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### setMailbox
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
```solidity
|
|
27
|
+
function setMailbox(address) external;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### setInterchainGasPaymaster
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
```solidity
|
|
34
|
+
function setInterchainGasPaymaster(address) external;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### setInterchainSecurityModule
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
```solidity
|
|
41
|
+
function setInterchainSecurityModule(address) external;
|
|
42
|
+
```
|
|
43
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# IInterchainGasPaymaster
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/IInterchainGasPaymaster.sol)
|
|
3
|
+
|
|
4
|
+
Manages payments on a source chain to cover gas costs of relaying
|
|
5
|
+
messages to destination chains.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Functions
|
|
9
|
+
### payForGas
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
```solidity
|
|
13
|
+
function payForGas(bytes32 _messageId, uint32 _destinationDomain, uint256 _gasAmount, address _refundAddress)
|
|
14
|
+
external
|
|
15
|
+
payable;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### quoteGasPayment
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
```solidity
|
|
22
|
+
function quoteGasPayment(uint32 _destinationDomain, uint256 _gasAmount) external view returns (uint256);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Events
|
|
26
|
+
### GasPayment
|
|
27
|
+
Emitted when a payment is made for a message's gas costs.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
```solidity
|
|
31
|
+
event GasPayment(bytes32 indexed messageId, uint256 gasAmount, uint256 payment);
|
|
32
|
+
```
|
|
33
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# IInterchainSecurityModule
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/IInterchainSecurityModule.sol)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Functions
|
|
6
|
+
### moduleType
|
|
7
|
+
|
|
8
|
+
Returns an enum that represents the type of security model
|
|
9
|
+
encoded by this ISM.
|
|
10
|
+
|
|
11
|
+
*Relayers infer how to fetch and format metadata.*
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
```solidity
|
|
15
|
+
function moduleType() external view returns (uint8);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### verify
|
|
19
|
+
|
|
20
|
+
Defines a security model responsible for verifying interchain
|
|
21
|
+
messages based on the provided metadata.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
```solidity
|
|
25
|
+
function verify(bytes calldata _metadata, bytes calldata _message) external returns (bool);
|
|
26
|
+
```
|
|
27
|
+
**Parameters**
|
|
28
|
+
|
|
29
|
+
|Name|Type|Description|
|
|
30
|
+
|----|----|-----------|
|
|
31
|
+
|`_metadata`|`bytes`|Off-chain metadata provided by a relayer, specific to the security model encoded by the module (e.g. validator signatures)|
|
|
32
|
+
|`_message`|`bytes`|Hyperlane encoded interchain message|
|
|
33
|
+
|
|
34
|
+
**Returns**
|
|
35
|
+
|
|
36
|
+
|Name|Type|Description|
|
|
37
|
+
|----|----|-----------|
|
|
38
|
+
|`<none>`|`bool`|True if the message was verified|
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Enums
|
|
42
|
+
### Types
|
|
43
|
+
|
|
44
|
+
```solidity
|
|
45
|
+
enum Types {
|
|
46
|
+
UNUSED,
|
|
47
|
+
ROUTING,
|
|
48
|
+
AGGREGATION,
|
|
49
|
+
LEGACY_MULTISIG,
|
|
50
|
+
MERKLE_ROOT_MULTISIG,
|
|
51
|
+
MESSAGE_ID_MULTISIG,
|
|
52
|
+
NULL
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# ISpecifiesInterchainSecurityModule
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/IInterchainSecurityModule.sol)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Functions
|
|
6
|
+
### interchainSecurityModule
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```solidity
|
|
10
|
+
function interchainSecurityModule() external view returns (IInterchainSecurityModule);
|
|
11
|
+
```
|
|
12
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# ILiquidityLayerMessageRecipient
|
|
2
|
+
[Git Source](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/a5209dbd9b0f5eb34e0bc9df2ba157dda2b454d3/contracts/interfaces/ILiquidityLayerMessageRecipient.sol)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Functions
|
|
6
|
+
### handleWithTokens
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```solidity
|
|
10
|
+
function handleWithTokens(uint32 _origin, bytes32 _sender, bytes calldata _message, address _token, uint256 _amount)
|
|
11
|
+
external;
|
|
12
|
+
```
|
|
13
|
+
|