Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generated markdown #42

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,90 @@
* [Quoting gas payments](sdks/building-applications/nodejs-sdk/gas.md)
* [App Abstraction](sdks/building-applications/nodejs-sdk/contract-interaction.md)

## Core Contracts Reference
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to move this further down on the side bar, IMO we can't have the protocol section and operators section this far down

* [Home](./apis-and-sdks/building-applications/core-solidity-sdk/contracts/README.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)
* [❱ 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)
* [❱ 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)
* [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)

## 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)

## Protocol

* [Overview](protocol/permissionless-interoperability.md)
Expand Down
15 changes: 15 additions & 0 deletions apis-and-sdks/building-applications/core-solidity-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Hyperlane Solidity

On-chain implementations of Hyperlane in Solidity.

## Setup

- `yarn install`

## Build

- `yarn build`

## Test

- `yarn test`
Original file line number Diff line number Diff line change
@@ -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;
}
```

Loading