Skip to content

Commit

Permalink
Removed env config
Browse files Browse the repository at this point in the history
  • Loading branch information
Segfaultd committed Feb 14, 2024
1 parent fd90380 commit d4e2213
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
9 changes: 0 additions & 9 deletions src/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@ import * as Joi from 'joi';
export const ConfigMap = {
ENV: Joi.string().optional().valid('development', 'mainnet', 'testnet').default('development'),
LUM_NETWORK_ENDPOINT: Joi.string().required(),
COSMOS_NETWORK_ENDPOINT: Joi.string().required(),
OSMOSIS_NETWORK_ENDPOINT: Joi.string().required(),
JUNO_NETWORK_ENDPOINT: Joi.string().required(),
EVMOS_NETWORK_ENDPOINT: Joi.string().required(),
STARGAZE_NETWORK_ENDPOINT: Joi.string().required(),
AKASH_NETWORK_ENDPOINT: Joi.string().required(),
COMDEX_NETWORK_ENDPOINT: Joi.string().required(),
SENTINEL_NETWORK_ENDPOINT: Joi.string().required(),
KICHAIN_NETWORK_ENDPOINT: Joi.string().required(),
DATABASE_URL: Joi.string().required(),
REDIS_URL: Joi.string().optional(),
INGEST_ENABLED: Joi.boolean().required(),
Expand Down
33 changes: 1 addition & 32 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
export const MODULE_NAMES = ['SyncConsumerModule', 'SyncSchedulerModule', 'ApiModule'];
export const TEN_EXPONENT_SIX = 1_000_000;
export const SIGNED_BLOCK_WINDOW = 10000;
export const PERCENTAGE = 100;

export const LUM_STAKING_ADDRESS = 'lum1euhszjasgkeskujz6zr42r3lsxv58mfgsmlps0';
export const EVMOS_STAKING_ADDRESS = 'evmos1evap49dune5ffh6w3h6ueqv9hyyyyeargtp6gw';

export enum BeamStatus {
UNSPECIFIED,
Expand Down Expand Up @@ -87,16 +82,9 @@ export enum NotificationEvents {
}

export enum ApiUrl {
GET_EVMOS_INFLATION = 'https://rest.bd.evmos.org:1317/evmos/inflation/v1/inflation_rate',
GET_EVMOS_SUPPLY = 'https://rest.bd.evmos.org:1317/evmos/inflation/v1/circulating_supply',
GET_EVMOS_INFLATION_PARAMS = 'https://rest.bd.evmos.org:1317/evmos/inflation/v1/params',
GET_CHAIN_TOKENS_MCAP = 'https://api-osmosis.imperator.co/tokens/v2/mcap',
GET_CHAIN_TOKENS_ALL = 'https://api-osmosis.imperator.co/tokens/v2/all',
GET_CHAIN_TOKENS = 'https://api-osmosis.imperator.co/tokens/v2',
GET_LUM_PRICE = 'https://api.coingecko.com/api/v3/coins/lum-network',
GET_JUNO_APY = 'https://supply-api.junonetwork.io/apr',
GET_OSMOSIS_APY = 'https://api-osmosis.imperator.co/apr/v2/staking',
GET_STARGAZE_APY = 'https://supply-api.publicawesome.dev/apr',
GET_LUM_PRICE = 'https://api.coingecko.com/api/v3/coins/lum-network'
}

export enum AssetSymbol {
Expand Down Expand Up @@ -179,22 +167,3 @@ export enum MillionsPoolState {
KILLED,
UNRECOGNIZED = -1,
}

// If we map the enums first, we encounter an error on the initialization onModuleInit
// Hence, we hardcod the endpoint env
export const CHAIN_ENV_CONFIG = [
'COSMOS_NETWORK_ENDPOINT',
'AKASH_NETWORK_ENDPOINT',
'COMDEX_NETWORK_ENDPOINT',
'SENTINEL_NETWORK_ENDPOINT',
'KICHAIN_NETWORK_ENDPOINT',
'OSMOSIS_NETWORK_ENDPOINT',
'JUNO_NETWORK_ENDPOINT',
'STARGAZE_NETWORK_ENDPOINT',
'EVMOS_NETWORK_ENDPOINT',
];

// Lum endpoint
export const LUM_ENV_CONFIG = 'LUM_NETWORK_ENDPOINT';

export const LUM_DFR_ALLOCATION_TYPE_URL = 'lum.network.dfract.WithdrawAndMintProposal';

0 comments on commit d4e2213

Please sign in to comment.