Skip to content

Commit

Permalink
Merge pull request #157 from many-things/nexus
Browse files Browse the repository at this point in the history
feat: add Osmosis chain / warp definitions
  • Loading branch information
jmrossy authored May 14, 2024
2 parents 2ed89bc + 312ae29 commit 0b87b77
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/consts/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,38 @@ export const chains: ChainMap<ChainMetadata & { mailbox?: Address }> = {
// logoURI: '/logo.svg',
// },

osmosis: {
protocol: ProtocolType.Cosmos,
name: 'osmosis',
chainId: 'osmosis-1',
domainId: 875,
displayName: 'Osmosis',
displayNameShort: 'Osmosis',
slip44: 118,
bech32Prefix: 'osmo',
rpcUrls: [{ http: 'https://rpc.osmosis.zone:443' }],
restUrls: [{ http: 'https://rest.osmosis.zone:443' }],
grpcUrls: [{ http: 'https://grpc.osmosis.zone:443' }],
nativeToken: {
name: 'Osmosis',
denom: 'uosmo',
symbol: 'OSMO',
decimals: 6,
},
blockExplorers: [
{
name: 'Mintscan',
url: 'https://www.mintscan.io/osmosis',
// TODO API not supported, using url to meet validation requirements
apiUrl: 'https://www.mintscan.io/osmosis',
family: ExplorerFamily.Other,
},
],
transactionOverrides: {
gasPrice: 0.1,
},
},

ancient8: {
blockExplorers: [
{
Expand Down
68 changes: 68 additions & 0 deletions src/consts/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,61 @@ import { Chains, TokenConnectionType, TokenStandard, WarpCoreConfig } from '@hyp
// The input here is typically the output of the Hyperlane CLI warp deploy command
export const tokenConfigs: WarpCoreConfig = {
tokens: [
//#region OSMOSIS
// TIA Osmosis to Manta
{
chainName: 'osmosis',
standard: TokenStandard.CwHypCollateral,
decimals: 6,
symbol: 'TIA',
name: 'Celestia',
addressOrDenom: 'osmo1h4y9xjcvs8lrx4z8ha48uq9a338w74dpl2ly3tf74fzvugp2kj4q9l0jkw',
collateralAddressOrDenom:
'ibc/D79E7D83AB399BFFF93433E54FAA480C191248FC556924A2A8351AE2638B3877',
connections: [{ token: 'ethereum|mantapacific|0x88410F3D8135b4D23b98dC37C4652C6969a5B1a8' }],
},
// milkTIA Osmosis to Manta
{
chainName: 'osmosis',
standard: TokenStandard.CwHypCollateral,
decimals: 6,
symbol: 'milkTIA',
name: 'Celestia',
addressOrDenom: 'osmo17xuecsykqw2xcxwv8cau7uy4hgdwqt0u4qxflyc2yshhggpazfjs6kfqd3',
collateralAddressOrDenom:
'factory/osmo1f5vfcph2dvfeqcqkhetwv75fda69z7e5c2dldm3kvgj23crkv6wqcn47a0/umilkTIA',
connections: [{ token: 'ethereum|mantapacific|0x32474653127048d9fC20000e21dEd396b47968E8' }],
},
// TIA on Manta from Osmosis
{
chainName: 'mantapacific',
standard: TokenStandard.EvmHypSynthetic,
decimals: 6,
symbol: 'TIA',
name: 'Hyperlane Bridged TIA',
addressOrDenom: '0x88410F3D8135b4D23b98dC37C4652C6969a5B1a8',
connections: [
{
token: 'cosmos|osmosis|osmo1h4y9xjcvs8lrx4z8ha48uq9a338w74dpl2ly3tf74fzvugp2kj4q9l0jkw',
},
],
},
// milkTIA on Manta from Osmosis
{
chainName: 'mantapacific',
standard: TokenStandard.EvmHypSynthetic,
decimals: 6,
symbol: 'milkTIA',
name: 'Hyperlane Bridged milkTIA',
addressOrDenom: '0x32474653127048d9fC20000e21dEd396b47968E8',
connections: [
{
token: 'cosmos|osmosis|osmo17xuecsykqw2xcxwv8cau7uy4hgdwqt0u4qxflyc2yshhggpazfjs6kfqd3',
},
],
},

//#endregion OSMOSIS
//#region NEUTRON

// TIA Celestia to Neutron
Expand Down Expand Up @@ -353,6 +408,19 @@ export const tokenConfigs: WarpCoreConfig = {
],
options: {
interchainFeeConstants: [
{
origin: 'osmosis',
destination: Chains.mantapacific,
amount: 840000,
addressOrDenom: 'ibc/D79E7D83AB399BFFF93433E54FAA480C191248FC556924A2A8351AE2638B3877',
},
{
origin: 'osmosis',
destination: Chains.mantapacific,
amount: 840000,
addressOrDenom:
'factory/osmo1f5vfcph2dvfeqcqkhetwv75fda69z7e5c2dldm3kvgj23crkv6wqcn47a0/umilkTIA',
},
{
origin: Chains.neutron,
destination: Chains.arbitrum,
Expand Down

0 comments on commit 0b87b77

Please sign in to comment.