diff --git a/.github/markets/pr_template.md b/.github/markets/pr_template.md index b6bc4a2..14cb358 100644 --- a/.github/markets/pr_template.md +++ b/.github/markets/pr_template.md @@ -29,6 +29,7 @@ Each json file under the [configs](../../configs) folder correspond to their res |`spot_pool_config` |`SpotPoolConfig` |false |Object that contains the config parameters for the [Spot Pools](https://app.dem.exchange/pools/spot) page on Demex | |`quick_select_tokens` |`QuickSelectToken[]` |true |List of quick select tokens for deposit and withdrawal forms. | |`disabled_transfer_banner_config` |`DisabledTransferBannerConfig` |false |Config parameters for displaying banner to inform users that transfers for the relevant tokens are disabled | +|`chain_fee_token_map` |`{"ChainFeeTokenMap` |true |Map of blockchain to onchain fee token(carbon denom equivalent) and actual decimals | |`trading_leagues` |`TradingLeague[]` |false |Map of trading league config with their path. | |`lst_native_aprs` |`LSTNativeAPR[]` |false |List of LST native APR APIs. | |`nps_config` | `NPSConfig` | false | Config parameters for managing NPS survey | diff --git a/README.md b/README.md index 43b3073..237539a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Currently, each JSON file contain the following data on its corresponding networ - map of IBC channels for external IBC chains (such as Osmosis, Noble, etc.) - information about IBC tokens that are not added on chain or require packet forwarding - default quick select tokens in deposit/withdrawal forms +- map of blockchain to onchain fee token(carbon denom equivalent) and actual decimals - LSTs native apr config to show on Nitron markets Additionally, the JSON file for mainnet contains the following data to support ongoing campaigns/promotions: @@ -108,6 +109,16 @@ More metadata will be added in the future if required by the Demex frontend. Ple "src_channel": {}, // for ibcBridges "connectionId": {} // for axelarBridges } + }, + "chain_fee_token_map" :{ + "Blockchain_1": { + "denom": "denom_1", + "decimals": 1 + }, + "Blockchain_2": { + "denom": "Blockchain_2", + "decimals": 2 + }, } } ``` diff --git a/config.schema.json b/config.schema.json index f659da0..afaa9e9 100644 --- a/config.schema.json +++ b/config.schema.json @@ -12,7 +12,8 @@ "network_fees", "cross_selling_source_tokens", "external_chain_channels", - "additional_ibc_token_config" + "additional_ibc_token_config", + "chain_fee_token_map" ], "properties": { "network": { @@ -132,6 +133,11 @@ "items": { "$ref": "#/$defs/cross_selling_source_token" } + }, + "chain_fee_token_map": { + "type": "object", + "description": "Map of token denoms to their respective chain fee tokens", + "$ref": "#/$defs/chain_fee_token_map" } }, "typeform_widget_config": { @@ -533,7 +539,10 @@ "quick_select_token": { "type": "object", "description": "Token denom for quick select in transfer form", - "required": ["label_denom", "target_denom"], + "required": [ + "label_denom", + "target_denom" + ], "properties": { "label_denom": { "type": "string", @@ -602,7 +611,13 @@ "trading_league": { "type": "object", "description": "Trading League config", - "required": ["startDate", "endDate", "competitionId", "tradingLeague", "tradingLeagueTitle"], + "required": [ + "startDate", + "endDate", + "competitionId", + "tradingLeague", + "tradingLeagueTitle" + ], "properties": { "start_date": { "type": "string", @@ -636,7 +651,11 @@ "lst_native_apr": { "type": "object", "description": "API for query LST native APR show on Nitron", - "required": ["protocol", "api_url", "lst_denoms"], + "required": [ + "protocol", + "api_url", + "lst_denoms" + ], "properties": { "protocol": { "type": "string", @@ -662,7 +681,10 @@ "nps_config": { "type": "object", "description": "Config parameters for managing NPS survey", - "required": ["start", "end"], + "required": [ + "start", + "end" + ], "properties": { "start": { "$ref": "#/$defs/start" @@ -671,6 +693,28 @@ "$ref": "#/$defs/end" } } + }, + "chain_fee_token_map": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "required": [ + "denom", + "decimals" + ], + "properties": { + "denom": { + "type": "string", + "description": "The carbon denom of the token used to pay fees on the chain" + }, + "decimals": { + "type": "integer", + "description": "The number of decimal places for the denom token" + } + } + } + } } } -} +} \ No newline at end of file diff --git a/configs/devnet.json b/configs/devnet.json index 754c3ec..7ca7823 100644 --- a/configs/devnet.json +++ b/configs/devnet.json @@ -66,6 +66,7 @@ "target_denom" : "dai" } ], + "chain_fee_token_map": {}, "nps_config": { "start": "2025-02-02T12:00:00Z", "end": "2025-02-16T12:00:00Z" diff --git a/configs/mainnet.json b/configs/mainnet.json index 5c8a25e..853104c 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -1,8 +1,18 @@ { "network": "mainnet", "prelaunch_markets": [], - "blacklisted_markets": ["gm1_busd1", "SWTH_UST", "LUNA_SWTH"], - "blacklisted_pools": ["34", "43", "44", "74", "83"], + "blacklisted_markets": [ + "gm1_busd1", + "SWTH_UST", + "LUNA_SWTH" + ], + "blacklisted_pools": [ + "34", + "43", + "44", + "74", + "83" + ], "blacklisted_tokens": [ "swthb.1.6.d04123", "swth.1.18.94d5fe", @@ -269,7 +279,9 @@ "perpTradingBoost": 6 } }, - "cross_selling_source_tokens": ["swth"], + "cross_selling_source_tokens": [ + "swth" + ], "external_chain_channels": { "Archway": { "Noble": "channel-29" @@ -321,58 +333,94 @@ "additional_ibc_token_config": [ { "baseDenom": "uusdc", - "chainRoutes": ["Archway", "Noble"] + "chainRoutes": [ + "Archway", + "Noble" + ] }, { "baseDenom": "uusdc", - "chainRoutes": ["Cosmos Hub", "Noble"] + "chainRoutes": [ + "Cosmos Hub", + "Noble" + ] }, { "baseDenom": "uusdc", - "chainRoutes": ["DYDX", "Noble"] + "chainRoutes": [ + "DYDX", + "Noble" + ] }, { "baseDenom": "uusdc", - "chainRoutes": ["Kujira", "Noble"] + "chainRoutes": [ + "Kujira", + "Noble" + ] }, { "baseDenom": "swth", - "chainRoutes": ["Osmosis"] + "chainRoutes": [ + "Osmosis" + ] }, { "baseDenom": "swth", - "chainRoutes": ["Terra"] + "chainRoutes": [ + "Terra" + ] }, { "baseDenom": "uusdc", - "chainRoutes": ["Osmosis", "Noble"] + "chainRoutes": [ + "Osmosis", + "Noble" + ] }, { "baseDenom": "uusdc", - "chainRoutes": ["Stargaze", "Noble"] + "chainRoutes": [ + "Stargaze", + "Noble" + ] }, { "baseDenom": "uusdc", - "chainRoutes": ["Terra", "Noble"] + "chainRoutes": [ + "Terra", + "Noble" + ] }, { "baseDenom": "uatom", - "chainRoutes": ["Osmosis", "Cosmos Hub"], + "chainRoutes": [ + "Osmosis", + "Cosmos Hub" + ], "denomOnCarbon": "ibc/6CDD4663F2F09CD62285E2D45891FC149A3568E316CE3EBBE201A71A78A69388" }, { "baseDenom": "ustrd", - "chainRoutes": ["Osmosis", "Stride"], + "chainRoutes": [ + "Osmosis", + "Stride" + ], "denomOnCarbon": "ibc/FCFF8B19C61677F3B78E2A5AE3B4A34A8D23858D16905F253B8438B3AFD07FF8" }, { "baseDenom": "ustrd", - "chainRoutes": ["Cosmos Hub", "Stride"], + "chainRoutes": [ + "Cosmos Hub", + "Stride" + ], "denomOnCarbon": "ibc/B8D03406E060650ECE2D521287AC9A94D036C4C78B4AB871AC740A5FF2030D79" } ], "demex_trading_league_config": { - "promoMarkets": ["cmkt/201"], + "promoMarkets": [ + "cmkt/201" + ], "currentPrizeSymbol": "USDC", "currentCompPerpPoolId": 3 }, @@ -496,6 +544,120 @@ "target_denom": "brdg/a02afc2c1edf77cc023eefa25fc036c184612faf9365cda9c1daa3b1675ebf8f" } ], + "chain_fee_token_map": { + "Archway": { + "denom": "ibc/652218B355FBD814037EEF28505F3D91F0489325A64FA5D865EF425DD59317BC", + "decimals": 18 + }, + "Axelar": { + "denom": "ibc/062588846168EDFECF20F7681F2A0A131A53B9A3C8535BCA8F7D1A268246974B", + "decimals": 6 + }, + "DYDX": { + "denom": "ibc/9DC57FF60E125F9B976EB0DF4F2122C580AD1DB8E27BA71E6D2C1AA56A5FD312", + "decimals": 18 + }, + "Osmosis": { + "denom": "ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518", + "decimals": 6 + }, + "Cosmos Hub": { + "denom": "ibc/A4DB47A9D3CF9A068D454513891B526702455D3EF08FB9EB558C561F9DC2B701", + "decimals": 6 + }, + "Kujira": { + "denom": "ibc/662914D0C1CEBCB070C68F061D035E8B10A07C79AB286E7342C85F3BE74612C5", + "decimals": 6 + }, + "Noble": { + "denom": "ibc/43897B9739BD63E3A08A88191999C632E052724AB96BD4C74AE31375C991F48D", + "decimals": 6 + }, + "Stargaze": { + "denom": "ibc/C688EBE80ECC20865331A18D8D19654754F6B189977715FED00FBA2BE41F144F", + "decimals": 6 + }, + "Stride": { + "denom": "ibc/3552CECB7BCE1891DB6070D37EC6E954C972B1400141308FCD85FD148BD06DE5", + "decimals": 18 + }, + "Terra": { + "denom": "ibc/2B58B8C147E8718EECCB3713271DF46DEE8A3A00A27242628604E31C2F370EF5", + "decimals": 6 + }, + "Mantle": { + "denom": "bit.1.2.9d68c4", + "decimals": 18 + }, + "Base": { + "denom": "brdg/1299d2e94c483e72f64100088886b8a5b7c13595047e53e032c9938d07a98c20", + "decimals": 18 + }, + "Evmos": { + "denom": "ibc/35E771B8682D828173F4B795F6C307780F96DC64D6F914FAE4CC9B4666F66364", + "decimals": 6 + }, + "Juno": { + "denom": "ibc/9E3EB38E5E157AEBFF4A8EAC66E654BC8ECFCB1F758F4D1C0F2D65945E9E2935", + "decimals": 6 + }, + "Comdex": { + "denom": "ibc/5E60F861861B36902155FCADB0B3AD1D474376A6D4CFDBE1FC60E262016CEF7A", + "decimals": 6 + }, + "Stafihub": { + "denom": "ibc/0249D3BAB5191A1CB96C66F76DD5B54BBBE8A8391C38691C4B980E82F385086B", + "decimals": 6 + }, + "Persistence Core": { + "denom": "ibc/AAA241B0C1B237AA252F939C7CB7AB4C21A46BAA97464DDB8B5C92D4AF635E29", + "decimals": 6 + }, + "Canto": { + "denom": "ibc/92E974290AF9E2BC3AEEEC35305C8FD76AC5A22A74CF8D91270FDF5A1C41E861", + "decimals": 18 + }, + "Sommelier": { + "denom": "ibc/96BB9743B631E66525F13E5E944AF1A222AF928A4C870E457CDE932092F9528B", + "decimals": 18 + }, + "IRIS Hub": { + "denom": "ibc/4E06CF24FEBFB3F5AF645377DCC0B70AA6183BAF6B918B8B6243FCDEB7D38118", + "decimals": 6 + }, + "Ethereum": { + "denom": "brdg/e3877e2c8ed05e404e04417747e2f430285c11dc839663b943b39ff7cbb56377", + "decimals": 18 + }, + "Arbitrum": { + "denom": "brdg/1299d2e94c483e72f64100088886b8a5b7c13595047e53e032c9938d07a98c20", + "decimals": 18 + }, + "Polygon": { + "denom": "brdg/e2238fb8fc5f08299c1789177d6d89bb2853238a65f6e48a9ec3b67e289f5601", + "decimals": 18 + }, + "Binance Smart Chain": { + "denom": "brdg/1768794901f8a19c2ec795a5402653cef6cbfe6b3ec6398d39fc37de963cb667", + "decimals": 18 + }, + "Neo": { + "denom": "bneo.1.14.e2e5f6", + "decimals": 8 + }, + "Neo3": { + "denom": "bneo.1.14.e2e5f6", + "decimals": 8 + }, + "Optimism": { + "denom": "brdg/34a330df380acf4845e3c3341722a73cc62b57819a2e9960fbb0e040a5210423", + "decimals": 18 + }, + "Avalanche": { + "denom": "brdg/cc0027d68ecd0fcf2151a09070efa6d67efaf6541bd1625307d7057562ce2345", + "decimals": 18 + } + }, "trading_leagues": { "/rewards/mantle-trading-league": { "start_date": "2024-12-23T08:00:00Z", diff --git a/configs/testnet.json b/configs/testnet.json index dac2fae..a5b3d7a 100644 --- a/configs/testnet.json +++ b/configs/testnet.json @@ -18,7 +18,9 @@ "groupQuantity": 1000 } }, - "cross_selling_source_tokens": ["swth"], + "cross_selling_source_tokens": [ + "swth" + ], "external_chain_channels": {}, "additional_ibc_token_config": [], "demex_trading_league_config": { @@ -29,7 +31,9 @@ "perp_pools": { "incentives": { "proxy": "0x74261efC64caE332E912F5bc645e4A9dcaC5EFaa", - "distributors": ["0x0c1f4B22A2B86971ee8581684bBC500b2E824559"] + "distributors": [ + "0x0c1f4B22A2B86971ee8581684bBC500b2E824559" + ] }, "banners": [] }, @@ -62,8 +66,14 @@ "target_denom" : "swth" } ], + "chain_fee_token_map": { + "BSC testnet": { + "denom": "brdg/058df3a0734c28f905ea8a9ce7f8183a6f76fb10ed1b8cf70acb5f697f5d7009", + "decimals": 18 + } + }, "nps_config": { "start": "2025-02-02T12:00:00Z", "end": "2025-02-16T12:00:00Z" } -} +} \ No newline at end of file diff --git a/scripts/check_configs.ts b/scripts/check_configs.ts index c34b5cd..bdf8991 100644 --- a/scripts/check_configs.ts +++ b/scripts/check_configs.ts @@ -37,6 +37,7 @@ interface ConfigJSON { disabled_transfer_banner_config?: DisabledTransferBannerConfig; announcement_banner: AnnouncementBanner; quick_select_deposit_options?: QuickSelectToken[]; + chain_fee_token_map?: ChainFeeTokenMap; lst_native_aprs?: LstNativeAPR[]; nps_config?: NPSConfig; } @@ -157,6 +158,12 @@ interface QuickSelectToken { target_denom: string; } +interface ChainFeeTokenMap { + [chain: string]: { + denom: string; + decimals: number; + } +} interface LstNativeAPR { protocol: string; api_url: string;