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

feat: add Osmosis chain / warp definitions #158

Open
wants to merge 3 commits into
base: nexus
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
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
Loading