Skip to content

Commit

Permalink
Merge pull request #267 from oraichain/feat/smart-router-osmosis-pool
Browse files Browse the repository at this point in the history
add config top token osmosis pool
  • Loading branch information
haunv3 authored May 21, 2024
2 parents 0e4791a + 9c1c1ed commit 3e4b938
Show file tree
Hide file tree
Showing 9 changed files with 868 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/oraidex-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-common",
"version": "1.0.86",
"version": "1.0.87",
"main": "build/index.js",
"files": [
"build/"
Expand Down
68 changes: 68 additions & 0 deletions packages/oraidex-common/src/alpha-network.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { BridgeAppCurrency } from "./network";

export const AtomOsmosisToken: BridgeAppCurrency = {
coinDenom: "ATOM",
coinMinimalDenom: "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2",
coinDecimals: 6,
coinGeckoId: "cosmos",
coinImageUrl: "https://dhj8dql1kzq2v.cloudfront.net/white/atom.png",
gasPriceStep: {
low: 0,
average: 0.025,
high: 0.04
}
};

export const UsdcOsmosisToken: BridgeAppCurrency = {
coinDenom: "USDC",
coinMinimalDenom: "ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4",
coinDecimals: 6,
coinGeckoId: "usd-coin",
coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/noble/images/USDCoin.png",
gasPriceStep: {
low: 0,
average: 0.025,
high: 0.04
}
};

export const OraiOsmosisToken: BridgeAppCurrency = {
coinDenom: "ORAI",
coinMinimalDenom: "ibc/161D7D62BAB3B9C39003334F1671208F43C06B643CC9EDBBE82B64793C857F1D",
coinDecimals: 6,
coinGeckoId: "oraichain-token",
coinImageUrl: "https://s2.coinmarketcap.com/static/img/coins/64x64/7533.png",
gasPriceStep: {
low: 0,
average: 0.025,
high: 0.04
}
};

export const TiaOsmosisToken: BridgeAppCurrency = {
coinDenom: "TIA",
coinMinimalDenom: "ibc/D79E7D83AB399BFFF93433E54FAA480C191248FC556924A2A8351AE2638B3877",
coinDecimals: 6,
coinGeckoId: "celestia",
coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/celestia/images/celestia.png",
gasPriceStep: {
low: 0,
average: 0.025,
high: 0.04
}
};

export const InjOsmosisToken: BridgeAppCurrency = {
coinDenom: "INJ",
coinMinimalDenom: "ibc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273",
coinDecimals: 6,
coinGeckoId: "injective-protocol",
coinImageUrl: "https://raw.githubusercontent.com/cosmos/chain-registry/master/injective/images/inj.png",
gasPriceStep: {
low: 0,
average: 0.025,
high: 0.04
}
};

export const listOsmosisToken = [AtomOsmosisToken, OraiOsmosisToken, TiaOsmosisToken, InjOsmosisToken];
3 changes: 3 additions & 0 deletions packages/oraidex-common/src/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export const MULTICALL_CONTRACT = "orai1q7x644gmf7h8u8y6y8t9z9nnwl8djkmspypr6mxa

export const BASE_API_URL = "https://api.oraidex.io";

// alpha smart router
export const OSMOSIS_ROUTER_CONTRACT = "osmo1qxydza7ctzh9fn7sq5gcf0run8c78wh0jj47f4t5dwc5302r2dnqsp4hu6";

// websocket consts
export const WEBSOCKET_RECONNECT_ATTEMPTS = 5;
export const WEBSOCKET_RECONNECT_INTERVAL = 20000;
Expand Down
7 changes: 5 additions & 2 deletions packages/oraidex-common/src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import {
ORAIDEX_BID_POOL_CONTRACT,
ORAIX_ETH_CONTRACT
} from "./constant";
import { listOsmosisToken } from "./alpha-network";

export type NetworkName =
| "Oraichain"
Expand Down Expand Up @@ -107,7 +108,8 @@ export type CoinGeckoId =
| "injective-protocol"
| "bitcoin"
| "neutaro"
| "och";
| "och"
| "celestia";

export type NetworkType = "cosmos" | "evm";
export interface NetworkConfig {
Expand Down Expand Up @@ -707,7 +709,8 @@ export const chainInfos: CustomChainInfo[] = [
{
...OsmoToken,
bridgeTo: ["Oraichain"]
}
},
...listOsmosisToken
]
},
/// popular networks already included
Expand Down
2 changes: 1 addition & 1 deletion packages/universal-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-universal-swap",
"version": "1.0.80",
"version": "1.0.81",
"main": "build/index.js",
"files": [
"build/"
Expand Down
Loading

0 comments on commit 3e4b938

Please sign in to comment.