Skip to content

Commit

Permalink
Warp Route add support (#21)
Browse files Browse the repository at this point in the history
- Convert warp route artifacts to yaml
- Add addWarpRoute method to IRegistry
  • Loading branch information
jmrossy authored Apr 30, 2024
1 parent 7a48bde commit 8cbdff9
Show file tree
Hide file tree
Showing 41 changed files with 665 additions and 112 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-donuts-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/registry': patch
---

Warp Route add support
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
schema.json
53 changes: 43 additions & 10 deletions chains/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
},
"protocol": {
"type": "string",
"enum": ["ethereum", "sealevel", "fuel", "cosmos"],
"enum": [
"ethereum",
"sealevel",
"fuel",
"cosmos"
],
"description": "The type of protocol used by this chain. See ProtocolType for valid values."
},
"chainId": {
Expand Down Expand Up @@ -40,7 +45,10 @@
},
"technicalStack": {
"type": "string",
"enum": ["arbitrumnitro", "other"],
"enum": [
"arbitrumnitro",
"other"
],
"description": "The technical stack of the chain. See ChainTechnicalStack for valid values."
},
"logoURI": {
Expand All @@ -65,7 +73,11 @@
"type": "string"
}
},
"required": ["name", "symbol", "decimals"],
"required": [
"name",
"symbol",
"decimals"
],
"additionalProperties": false,
"description": "The metadata of the native token of the chain (e.g. ETH for Ethereum)."
},
Expand Down Expand Up @@ -117,12 +129,17 @@
"description": "The base retry delay in milliseconds."
}
},
"required": ["maxRequests", "baseRetryMs"],
"required": [
"maxRequests",
"baseRetryMs"
],
"additionalProperties": false,
"description": "Default retry settings to be used by a provider such as MultiProvider."
}
},
"required": ["http"],
"required": [
"http"
],
"additionalProperties": false
},
"minItems": 1,
Expand Down Expand Up @@ -171,11 +188,20 @@
},
"family": {
"type": "string",
"enum": ["etherscan", "blockscout", "routescan", "other"],
"enum": [
"etherscan",
"blockscout",
"routescan",
"other"
],
"description": "The type of the block explorer. See ExplorerFamily for valid values."
}
},
"required": ["name", "url", "apiUrl"],
"required": [
"name",
"url",
"apiUrl"
],
"additionalProperties": false
},
"description": "A list of block explorers with data for this chain"
Expand All @@ -198,7 +224,9 @@
"description": "Rough estimate of time per block in seconds."
}
},
"required": ["confirmations"],
"required": [
"confirmations"
],
"additionalProperties": false,
"description": "Block settings for the chain/deployment."
},
Expand Down Expand Up @@ -228,9 +256,14 @@
"description": "Whether the chain is considered a testnet or a mainnet."
}
},
"required": ["name", "protocol", "chainId", "rpcUrls"],
"required": [
"name",
"protocol",
"chainId",
"rpcUrls"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
4 changes: 4 additions & 0 deletions deployments/warp_routes/ECLIP/arbitrum-neutron-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
neutron:
collateral: neutron1dvzvf870mx9uf65uqhx40yzx9gu4xlqqq2pnx362a0ndmustww3smumrf5
arbitrum:
synthetic: "0x93ca0d85837FF83158Cd14D65B169CdB223b1921"
21 changes: 21 additions & 0 deletions deployments/warp_routes/ECLIP/arbitrum-neutron-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: neutron
standard: CwHypCollateral
decimals: 6
symbol: ECLIP
name: Eclipse Fi
addressOrDenom: neutron1dvzvf870mx9uf65uqhx40yzx9gu4xlqqq2pnx362a0ndmustww3smumrf5
collateralAddressOrDenom: factory/neutron10sr06r3qkhn7xzpw3339wuj77hu06mzna6uht0/eclip
igpTokenAddressOrDenom: ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7
connections:
- token: ethereum|arbitrum|0x93ca0d85837FF83158Cd14D65B169CdB223b1921
- chainName: arbitrum
standard: EvmHypSynthetic
decimals: 6
symbol: ECLIP
name: Eclipse Fi
addressOrDenom: "0x93ca0d85837FF83158Cd14D65B169CdB223b1921"
logoURI: /logos/ECLIP.png
connections:
- token: cosmos|neutron|neutron1dvzvf870mx9uf65uqhx40yzx9gu4xlqqq2pnx362a0ndmustww3smumrf5
4 changes: 4 additions & 0 deletions deployments/warp_routes/ETH/ethereum-viction-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ethereum:
native: "0x15b5D6B614242B118AA404528A7f3E2Ad241e4A4"
viction:
synthetic: "0x182e8d7c5f1b06201b102123fc7df0eaeb445a7b"
18 changes: 18 additions & 0 deletions deployments/warp_routes/ETH/ethereum-viction-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: ethereum
standard: EvmHypNative
decimals: 18
symbol: ETH
name: Ethereum
addressOrDenom: "0x15b5D6B614242B118AA404528A7f3E2Ad241e4A4"
connections:
- token: ethereum|viction|0x182e8d7c5f1b06201b102123fc7df0eaeb445a7b
- chainName: viction
standard: EvmHypSynthetic
decimals: 18
symbol: ETH
name: Ethereum
addressOrDenom: "0x182e8d7c5f1b06201b102123fc7df0eaeb445a7b"
connections:
- token: ethereum|ethereum|0x15b5D6B614242B118AA404528A7f3E2Ad241e4A4
8 changes: 0 additions & 8 deletions deployments/warp_routes/ETH/viction/addresses.json

This file was deleted.

8 changes: 0 additions & 8 deletions deployments/warp_routes/INJ/inevm/addresses.json

This file was deleted.

4 changes: 4 additions & 0 deletions deployments/warp_routes/INJ/injective-inevm-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
injective:
native: inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k
inevm:
native: "0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4"
29 changes: 29 additions & 0 deletions deployments/warp_routes/INJ/injective-inevm-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: injective
standard: CwHypNative
decimals: 18
symbol: INJ
name: Injective Coin
addressOrDenom: inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k
connections:
- token: ethereum|inevm|0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4
- chainName: inevm
standard: EvmHypNative
decimals: 18
symbol: INJ
name: Injective Coin
addressOrDenom: "0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4"
connections:
- token: cosmos|injective|inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k
options:
localFeeConstants:
- origin: injective
destination: inevm
amount: "1000000000000000"
addressOrDenom: inj
interchainFeeConstants:
- origin: injective
destination: inevm
amount: "30000000000000000"
addressOrDenom: inj
26 changes: 14 additions & 12 deletions deployments/warp_routes/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Directory structure is as follows:
# Hyperlane Warp Routes

```
<ASSET_SYMBOL>/<ORIGIN_CHAIN>/<DESTINATION_CHAIN>/addresses.json
```
This directory contains a list of Warp Route configs. They can be used to interact with warp routes in the [Warp UI](https://github.com/hyperlane-xyz/hyperlane-warp-ui-template) or [CLI](https://www.npmjs.com/package/@hyperlane-xyz/cli).

Addresses are keyed by their token router type:
## Structure

```typescript
enum TokenType {
synthetic,
collateral,
native,
}
```
Warp Routes are organized here by asset symbol.
Configs are named based on the names of the chains involved, organized alphabetically.
For example, a route between `ethereum` and `inevm` would be called `ethereum-inevm.yaml`

## Schema

These configs use the WarpCore schema as defined in the [Hyperlane SDK here](https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/warp/types.ts).

## Contributing

New routes can be added manually or via the CLI's `hyperlane deploy warp` command.
4 changes: 4 additions & 0 deletions deployments/warp_routes/TIA/arbitrum-neutron-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
neutron:
collateral: neutron1jyyjd3x0jhgswgm6nnctxvzla8ypx50tew3ayxxwkrjfxhvje6kqzvzudq
arbitrum:
synthetic: "0xD56734d7f9979dD94FAE3d67C7e928234e71cD4C"
25 changes: 25 additions & 0 deletions deployments/warp_routes/TIA/arbitrum-neutron-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: neutron
standard: CwHypCollateral
decimals: 6
symbol: TIA.n
name: TIA.n
addressOrDenom: neutron1jyyjd3x0jhgswgm6nnctxvzla8ypx50tew3ayxxwkrjfxhvje6kqzvzudq
collateralAddressOrDenom: ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7
connections:
- token: ethereum|arbitrum|0xD56734d7f9979dD94FAE3d67C7e928234e71cD4C
- chainName: arbitrum
standard: EvmHypSynthetic
decimals: 6
symbol: TIA.n
name: TIA.n
addressOrDenom: "0xD56734d7f9979dD94FAE3d67C7e928234e71cD4C"
connections:
- token: cosmos|neutron|neutron1jyyjd3x0jhgswgm6nnctxvzla8ypx50tew3ayxxwkrjfxhvje6kqzvzudq
options:
interchainFeeConstants:
- origin: neutron
destination: arbitrum
amount: 270000
addressOrDenom: ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7
4 changes: 4 additions & 0 deletions deployments/warp_routes/TIA/manta-neutron-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
neutron:
collateral: neutron1ch7x3xgpnj62weyes8vfada35zff6z59kt2psqhnx9gjnt2ttqdqtva3pa
mantapacific:
synthetic: "0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa"
25 changes: 25 additions & 0 deletions deployments/warp_routes/TIA/manta-neutron-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: neutron
standard: CwHypCollateral
decimals: 6
symbol: TIA.n
name: TIA.n
addressOrDenom: neutron1ch7x3xgpnj62weyes8vfada35zff6z59kt2psqhnx9gjnt2ttqdqtva3pa
collateralAddressOrDenom: ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7
connections:
- token: ethereum|mantapacific|0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa
- chainName: mantapacific
standard: EvmHypSynthetic
decimals: 6
symbol: TIA.n
name: TIA.n
addressOrDenom: "0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa"
connections:
- token: cosmos|neutron|neutron1jyyjd3x0jhgswgm6nnctxvzla8ypx50tew3ayxxwkrjfxhvje6kqzvzudq
options:
interchainFeeConstants:
- origin: neutron
destination: mantapacific
amount: 270000
addressOrDenom: ibc/773B4D0A3CD667B2275D5A4A7A2F0909C0BA0F4059C0B9181E680DDF4965DCC7
8 changes: 0 additions & 8 deletions deployments/warp_routes/TIA/neutron/arbitrum/addresses.json

This file was deleted.

8 changes: 0 additions & 8 deletions deployments/warp_routes/TIA/neutron/manta/addresses.json

This file was deleted.

11 changes: 0 additions & 11 deletions deployments/warp_routes/USDC/ancient8/addresses.json

This file was deleted.

4 changes: 4 additions & 0 deletions deployments/warp_routes/USDC/ethereum-ancient8-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ethereum:
collateral: "0x8b4192B9Ad1fCa440A5808641261e5289e6de95D"
ancient8:
synthetic: "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5"
19 changes: 19 additions & 0 deletions deployments/warp_routes/USDC/ethereum-ancient8-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: ethereum
standard: EvmHypCollateral
decimals: 6
symbol: USDC
name: USD Coin
addressOrDenom: "0x8b4192B9Ad1fCa440A5808641261e5289e6de95D"
collateralAddressOrDenom: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
connections:
- token: ethereum|ancient8|0x97423A68BAe94b5De52d767a17aBCc54c157c0E5
- chainName: ancient8
standard: EvmHypSynthetic
decimals: 6
symbol: USDC
name: USD Coin
addressOrDenom: "0x97423A68BAe94b5De52d767a17aBCc54c157c0E5"
connections:
- token: ethereum|ethereum|0x8b4192B9Ad1fCa440A5808641261e5289e6de95D
4 changes: 4 additions & 0 deletions deployments/warp_routes/USDC/ethereum-inevm-addresses.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ethereum:
collateral: "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f"
inevm:
synthetic: "0x8358d8291e3bedb04804975eea0fe9fe0fafb147"
19 changes: 19 additions & 0 deletions deployments/warp_routes/USDC/ethereum-inevm-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# yaml-language-server: $schema=../schema.json
tokens:
- chainName: ethereum
standard: EvmHypCollateral
decimals: 6
symbol: USDC
name: USDC
addressOrDenom: "0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f"
collateralAddressOrDenom: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
connections:
- token: ethereum|inevm|0x8358d8291e3bedb04804975eea0fe9fe0fafb147
- chainName: inevm
standard: EvmHypSynthetic
decimals: 6
symbol: USDC
name: USDC
addressOrDenom: "0x8358d8291e3bedb04804975eea0fe9fe0fafb147"
connections:
- token: ethereum|ethereum|0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f
Loading

0 comments on commit 8cbdff9

Please sign in to comment.