Skip to content

Commit

Permalink
chore: use constant from common instead of env
Browse files Browse the repository at this point in the history
  • Loading branch information
trungbach committed Dec 6, 2023
1 parent 172a2c6 commit 1bea6cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
5 changes: 0 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
PORT=2024
RPC_URL=https://rpc.orai.io
FACTORY_CONTACT_ADDRESS_V1="orai1hemdkz4xx9kukgrunxu3yw0nvpyxf34v82d2c8"
FACTORY_CONTACT_ADDRESS_V2="orai167r4ut7avvgpp3rlzksz6vw5spmykluzagvmj3ht845fjschwugqjsqhst"
ROUTER_CONTRACT_ADDRESS="orai1j0r67r9k8t34pnhy00x3ftuxuwg0r6r4p8p6rrc8az0ednzr8y9s3sj2sf"
MULTICALL_CONTRACT_ADDRESS="orai1q7x644gmf7h8u8y6y8t9z9nnwl8djkmspypr6mxavsk9ual7dj0sxpmgwd"
STAKING_CONTRACT="orai19p43y0tqnr5qlhfwnxft2u5unph5yn60y7tuvu"
LIMIT=1000
MAX_THREAD_LEVEL=3
DUCKDB_PROD_FILENAME="db_name"
Expand Down
2 changes: 1 addition & 1 deletion packages/oraidex-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-server",
"version": "1.0.31",
"version": "1.0.32",
"main": "dist/index.js",
"bin": "dist/index.js",
"license": "MIT",
Expand Down
17 changes: 12 additions & 5 deletions packages/oraidex-sync/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import {
FACTORY_CONTRACT,
FACTORY_V2_CONTRACT,
MULTICALL_CONTRACT,
ROUTER_V2_CONTRACT,
STAKING_CONTRACT
} from "@oraichain/oraidex-common";
import { AssetInfo } from "@oraichain/oraidex-contracts-sdk";

export const ORAI = "orai";
Expand Down Expand Up @@ -27,9 +34,9 @@ export const OCH_PRICE = 0.4; // usdt

export const SEC_PER_YEAR = 60 * 60 * 24 * 365;
export const network = {
factory: process.env.FACTORY_CONTACT_ADDRESS_V1,
factory_v2: process.env.FACTORY_CONTACT_ADDRESS_V2,
router: process.env.ROUTER_CONTRACT_ADDRESS,
staking: process.env.STAKING_CONTRACT,
multicall: process.env.MULTICALL_CONTRACT_ADDRESS
factory: FACTORY_CONTRACT,
factory_v2: FACTORY_V2_CONTRACT,
router: ROUTER_V2_CONTRACT,
staking: STAKING_CONTRACT,
multicall: MULTICALL_CONTRACT
};
4 changes: 0 additions & 4 deletions packages/oraidex-sync/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ export type TotalLiquidity = {
export type Env = {
PORT: number;
RPC_URL: string;
FACTORY_CONTACT_ADDRESS_V1: string;
FACTORY_CONTACT_ADDRESS_V2: string;
ROUTER_CONTRACT_ADDRESS: string;
MULTICALL_CONTRACT_ADDRESS: string;
LIMIT: number;
MAX_THREAD_LEVEL: number;
DUCKDB_PROD_FILENAME: string;
Expand Down

0 comments on commit 1bea6cf

Please sign in to comment.