Skip to content

Commit

Permalink
Merge pull request #159 from oraichain/feat/add-neutaro
Browse files Browse the repository at this point in the history
Feat/add neutaro
  • Loading branch information
haunv3 authored Feb 17, 2024
2 parents 3bf6a34 + 3ae56ab commit 2067f95
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 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.64",
"version": "1.0.65",
"main": "build/index.js",
"files": [
"build/"
Expand Down
2 changes: 2 additions & 0 deletions packages/oraidex-common/src/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ export const KWT_ORAICHAIN_CHANNELS = "channel-0 channel-21";
export const INJECTIVE_ORAICHAIN_CHANNELS = "channel-147 channel-146";
export const NOBLE_ORAICHAIN_CHANNELS = "channel-34 channel-147";
export const NOBLE_ORAICHAIN_CHANNELS_TEST = "channel-35 channel-148";
export const NEUTARO_ORAICHAIN_CHANNELS = "channel-189 channel-1";

// config for ibc denom
export const ATOM_ORAICHAIN_DENOM = "ibc/A2E2EEC9057A4A1C2C0A6A4C78B0239118DF5F278830F50B4A6BDD7A66506B78";
export const NEUTARO_ORAICHAIN_DENOM = "ibc/576B1D63E401B6A9A071C78A1D1316D016EC9333D2FEB14AD503FAC4B8731CD1";
export const OSMOSIS_ORAICHAIN_DENOM = "ibc/9C4DCD21B48231D0BC2AC3D1B74A864746B37E4292694C93C617324250D002FC";
export const AIRIBSC_ORAICHAIN_DENOM = "ibc/C458B4CC4F5581388B9ACB40774FDFBCEDC77A7F7CDFB112B469794AF86C4A69";
export const USDTBSC_ORAICHAIN_DENOM = "ibc/E8B5509BE79025DD7A572430204271D3061A535CC66A3A28FDEC4573E473F32F";
Expand Down
18 changes: 16 additions & 2 deletions packages/oraidex-common/src/ibc-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
ORAIB_ORAICHAIN_CHANNELS,
ORAIB_ORAICHAIN_CHANNELS_OLD,
ORAIB_ORAICHAIN_CHANNELS_TEST,
OSMOSIS_ORAICHAIN_CHANNELS
OSMOSIS_ORAICHAIN_CHANNELS,
NEUTARO_ORAICHAIN_CHANNELS
} from "./constant";
import { CosmosChainId, NetworkChainId } from "./network";

Expand All @@ -28,6 +29,7 @@ export type IBCInfoMap = { [key in CosmosChainId]: { [key in NetworkChainId]?: I
// ibc constants

export const [atom2oraichain, oraichain2atom] = ATOM_ORAICHAIN_CHANNELS.split(/\s+/);
export const [neutaro2oraichain, oraichain2neutaro] = NEUTARO_ORAICHAIN_CHANNELS.split(/\s+/);
export const [inj2oraichain, oraichain2inj] = INJECTIVE_ORAICHAIN_CHANNELS.split(/\s+/);
export const [osmosis2oraichain, oraichain2osmosis] = OSMOSIS_ORAICHAIN_CHANNELS.split(/\s+/);
export const [oraib2oraichain, oraichain2oraib] = ORAIB_ORAICHAIN_CHANNELS.split(/\s+/);
Expand All @@ -47,6 +49,13 @@ export const ibcInfos: IBCInfoMap = {
timeout: IBC_TRANSFER_TIMEOUT
}
},
"Neutaro-1": {
Oraichain: {
source: "transfer",
channel: neutaro2oraichain,
timeout: IBC_TRANSFER_TIMEOUT
}
},
"injective-1": {
Oraichain: {
source: "transfer",
Expand Down Expand Up @@ -86,6 +95,11 @@ export const ibcInfos: IBCInfoMap = {
channel: oraichain2atom,
timeout: IBC_TRANSFER_TIMEOUT
},
"Neutaro-1": {
source: "transfer",
channel: oraichain2neutaro,
timeout: IBC_TRANSFER_TIMEOUT
},
"injective-1": {
source: "transfer",
channel: oraichain2inj,
Expand Down Expand Up @@ -151,7 +165,7 @@ export const ibcInfos: IBCInfoMap = {
}
};

export const ibcInfosOld: Omit<IBCInfoMap, "osmosis-1" | "cosmoshub-4" | "injective-1" | "noble-1"> = {
export const ibcInfosOld: Omit<IBCInfoMap, "osmosis-1" | "cosmoshub-4" | "injective-1" | "noble-1" | "Neutaro-1"> = {
Oraichain: {
"oraibridge-subnet-2": {
source: "transfer",
Expand Down
19 changes: 17 additions & 2 deletions packages/oraidex-common/src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export type CosmosChainId =
| "cosmoshub-4" // cosmos hub
| "injective-1" // injective network
| "kawaii_6886-1" // kawaii subnetwork
| "noble-1";
| "noble-1" // noble network
| "Neutaro-1"; //neutaro network;

export type EvmChainId =
| "0x38" // bsc
Expand Down Expand Up @@ -98,7 +99,8 @@ export type CoinGeckoId =
| "wbnb"
| "scatom"
| "injective-protocol"
| "bitcoin";
| "bitcoin"
| "neutaro";

export type NetworkType = "cosmos" | "evm";
export interface NetworkConfig {
Expand Down Expand Up @@ -239,6 +241,19 @@ export const AtomToken: BridgeAppCurrency = {
}
};

export const NeutaroToken: BridgeAppCurrency = {
coinDenom: "NEUTARO",
coinMinimalDenom: "uneutaro",
coinDecimals: 6,
coinGeckoId: "neutaro",
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/Neutaro/chain.png",
gasPriceStep: {
low: 0.01,
average: 0.025,
high: 0.03
}
};

export const NativeUsdcNobleToken: BridgeAppCurrency = {
coinDenom: "USDC",
coinMinimalDenom: "uusdc",
Expand Down

0 comments on commit 2067f95

Please sign in to comment.