Update configs for injective routes

pull/138/head
J M Rossy 8 months ago
parent cba660a6bc
commit 112ecfd60d
  1. 60
      src/consts/chains.ts
  2. 89
      src/consts/tokens.ts
  3. 21
      src/consts/tokens.yaml

@ -1,63 +1,7 @@
import { ChainMap, ChainMetadata, ExplorerFamily } from '@hyperlane-xyz/sdk';
import { ProtocolType } from '@hyperlane-xyz/utils';
import { ChainMap, ChainMetadata } from '@hyperlane-xyz/sdk';
// A map of chain names to ChainMetadata
// Chains can be defined here, in chains.json, or in chains.yaml
// Chains already in the SDK need not be included here unless you want to override some fields
// Schema here: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/metadata/chainMetadataTypes.ts
export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {
inevm: {
blockExplorers: [
{
apiUrl: 'https://inevm.calderaexplorer.xyz/api',
family: ExplorerFamily.Blockscout,
name: 'Caldera inEVM Explorer',
url: 'https://inevm.calderaexplorer.xyz',
},
],
blocks: {
confirmations: 1,
estimateBlockTime: 3,
reorgPeriod: 0,
},
chainId: 2525,
domainId: 2525,
displayName: 'Injective EVM',
displayNameShort: 'inEVM',
name: 'inevm',
nativeToken: {
decimals: 18,
name: 'Injective',
symbol: 'INJ',
},
protocol: ProtocolType.Ethereum,
rpcUrls: [{ http: 'https://inevm.calderachain.xyz/http' }],
logoURI: '/logos/inevm.svg',
},
injective: {
blockExplorers: [],
blocks: {
confirmations: 1,
estimateBlockTime: 3,
reorgPeriod: 1,
},
chainId: 'injective-1',
domainId: 6909546,
displayName: 'Injective',
displayNameShort: 'Injective',
name: 'injective',
nativeToken: {
decimals: 18,
name: 'Injective',
symbol: 'INJ',
},
protocol: ProtocolType.Cosmos,
slip44: 118,
bech32Prefix: 'inj',
grpcUrls: [{ http: 'grpc-injective-ia.cosmosia.notional.ventures:443' }],
rpcUrls: [{ http: 'https://rpc-injective-ia.cosmosia.notional.ventures' }],
restUrls: [{ http: 'https://injective-lcd.quickapi.com:443' }],
logoURI: '/logos/injective.svg',
},
};
export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {};

@ -1,9 +1,92 @@
import { WarpCoreConfig } from '@hyperlane-xyz/sdk';
import { Chains, TokenStandard, WarpCoreConfig } from '@hyperlane-xyz/sdk';
// A list of Warp UI token configs
// Tokens can be defined here, in tokens.json, or in tokens.yaml
// The input here is typically the output of the Hyperlane CLI warp deploy command
export const tokenConfigs: WarpCoreConfig = {
tokens: [],
options: {},
tokens: [
// INJ on Injective to inEVM
{
chainName: Chains.injective,
standard: TokenStandard.CwHypNative,
name: 'Injective Coin',
symbol: 'INJ',
decimals: 18,
addressOrDenom: 'inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k',
logoURI: '/logos/injective.svg',
connections: [{ token: 'ethereum|inevm|0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4' }],
},
// INJ on inEVM from Injective
{
chainName: Chains.inevm,
standard: TokenStandard.EvmHypNative,
name: 'Injective Coin',
symbol: 'INJ',
decimals: 18,
addressOrDenom: '0x26f32245fCF5Ad53159E875d5Cae62aEcf19c2d4',
logoURI: '/logos/injective.svg',
connections: [{ token: 'cosmos|injective|inj1mv9tjvkaw7x8w8y9vds8pkfq46g2vcfkjehc6k' }],
},
// USDC on Ethereum to inEVM
{
chainName: Chains.ethereum,
standard: TokenStandard.EvmHypCollateral,
name: 'USDC',
symbol: 'USDC',
decimals: 6,
addressOrDenom: '0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f',
collateralAddressOrDenom: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
logoURI: '/logos/usdc.svg',
connections: [{ token: 'ethereum|inevm|0x8358d8291e3bedb04804975eea0fe9fe0fafb147' }],
},
// USDC on inEVM from Ethereum
{
chainName: Chains.inevm,
standard: TokenStandard.EvmHypSynthetic,
name: 'USDC',
symbol: 'USDC',
decimals: 6,
addressOrDenom: '0x8358d8291e3bedb04804975eea0fe9fe0fafb147',
logoURI: '/logos/usdc.svg',
connections: [{ token: 'ethereum|ethereum|0xED56728fb977b0bBdacf65bCdD5e17Bb7e84504f' }],
},
// USDT on Ethereum to inEVM
{
chainName: Chains.ethereum,
standard: TokenStandard.EvmHypCollateral,
name: 'USDT',
symbol: 'USDT',
decimals: 6,
addressOrDenom: '0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19',
collateralAddressOrDenom: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
logoURI: '/logos/usdt.svg',
connections: [{ token: 'ethereum|inevm|0x97423a68bae94b5de52d767a17abcc54c157c0e5' }],
},
// USDT on inEVM to Ethereum
{
chainName: Chains.inevm,
standard: TokenStandard.EvmHypSynthetic,
name: 'USDT',
symbol: 'USDT',
decimals: 6,
addressOrDenom: '0x97423a68bae94b5de52d767a17abcc54c157c0e5',
logoURI: '/logos/usdt.svg',
connections: [{ token: 'ethereum|ethereum|0xab852e67bf03E74C89aF67C4BA97dd1088D3dA19' }],
},
],
options: {
igpQuoteConstants: [
{
origin: Chains.injective,
destination: Chains.inevm,
amount: '30000000000000000', // 0.03 INJ
addressOrDenom: 'inj',
},
],
},
};

@ -2,23 +2,4 @@
# Configs can be defined here, in tokens.json, or in tokens.ts
# The input here is typically the output of the Hyperlane CLI warp deploy command
---
tokens:
# Eth Mainnet HypNative token
- chainName: sepolia
standard: EvmHypNative
decimals: 18
symbol: ETH
name: Ether
addressOrDenom: '0x767C51a91CC9dEF2F24C35c340649411D6390320'
logoURI: '/logos/weth.png'
connections:
- { token: ethereum|alfajores|0x8bF6Ca2Dca1DF703Cb9144cef6A4d86abA7776C4 }
- chainName: alfajores
standard: EvmHypSynthetic
decimals: 18
symbol: ETH
name: Ether
addressOrDenom: '0x8bF6Ca2Dca1DF703Cb9144cef6A4d86abA7776C4'
logoURI: '/logos/weth.png'
connections:
- { token: ethereum|sepolia|0x767C51a91CC9dEF2F24C35c340649411D6390320 }
tokens: []

Loading…
Cancel
Save