From 209a470c147f656e22c3df79666824c27e729e81 Mon Sep 17 00:00:00 2001 From: thanhpn Date: Tue, 21 Jan 2025 14:03:35 +0700 Subject: [PATCH] Create Trading League configs --- .github/markets/pr_template.md | 11 +++++++++++ README.md | 1 + config.schema.json | 34 ++++++++++++++++++++++++++++++++++ configs/mainnet.json | 18 +++++++++++++++++- 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/.github/markets/pr_template.md b/.github/markets/pr_template.md index 47ea528..8db1a39 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 | +|`trading_leagues` |`TradingLeague[]` |false |Map of trading league config with their path. | ## Maintenance Data Structure |Field |Type |Required |Description |Notes | @@ -136,3 +137,13 @@ Each json file under the [configs](../../configs) folder correspond to their res |`unsupported_tokens` |`string[]` |false |List of tokens that are no longer supported | The token denoms listed here **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000) | |`temp_disabled_transfer_tokens` |`object` |false |List of tokens for which deposits and withdrawals have been temporarily disabled | The token denoms listed in this object **MUST** match the token denoms listed under the Carbon [Tokens API](https://api.carbon.network/carbon/coin/v1/tokens?pagination.limit=10000) | |`temp_disabled_bridges` |`object` |false |List of bridges for which deposits and withdrawals have been temporarily disabled | Blockchain network listed here **MUST** match the valid chainName of the bridges listed under BridgeAll RPC call.

To view the values of BridgeAll RPC call, simply run yarn get-bridges [network]on the command line. Sample for mainnet:yarn get-bridges mainnet`` | + +## TradingLeague Data Structure +|Field |Type |Required |Description |Notes | +|---|---|---|---|---| +|`start_date` |`string` |true |The start date of the trading league | +|`end_date` |`string` |true |The end date of the trading league | +|`competition_id` |`string` |true |The competition id of the trading league | +|`trading_league` |`string` |true |The trading league name | +|`trading_league_title` |`string` |true |The trading league title | + diff --git a/README.md b/README.md index 1ff08bd..5913721 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Additionally, the JSON file for mainnet contains the following data to support o - typeform survey parameters - market banner parameters for information banners to be displayed on the TradingView charts on Trade UI - market promo parameters for showing boosted tag on market select on Trade UI +- trading league parameters for showing trading league More metadata will be added in the future if required by the Demex frontend. Please see below the structure of the JSON file: diff --git a/config.schema.json b/config.schema.json index f17194e..2b6c97d 100644 --- a/config.schema.json +++ b/config.schema.json @@ -598,6 +598,40 @@ } } } + }, + "trading_league": { + "type": "object", + "description": "Trading League config", + "required": ["startDate", "endDate", "competitionId", "tradingLeague", "tradingLeagueTitle"], + "properties": { + "start_date": { + "type": "string", + "description": "The start date of the trading league" + }, + "end_date": { + "type": "string", + "description": "The end date of the trading league" + }, + "competition_id": { + "type": "string", + "description": "The competition id of the trading league" + }, + "trading_teague": { + "type": "string", + "description": "The trading league name" + }, + "trading_league_title": { + "type": "string", + "description": "The trading league title" + } + } + }, + "trading_leagues": { + "type": "object", + "description": "Map of trading league with their paths", + "items": { + "$ref": "#/$defs/trading_league" + } } } } \ No newline at end of file diff --git a/configs/mainnet.json b/configs/mainnet.json index 63ce8e2..e4def39 100644 --- a/configs/mainnet.json +++ b/configs/mainnet.json @@ -488,5 +488,21 @@ "label_denom": "brdg/a02afc2c1edf77cc023eefa25fc036c184612faf9365cda9c1daa3b1675ebf8f", "target_denom": "brdg/a02afc2c1edf77cc023eefa25fc036c184612faf9365cda9c1daa3b1675ebf8f" } - ] + ], + "trading_leagues": { + "/rewards/mantle-trading-league": { + "start_date": "2024-12-23T08:00:00Z", + "end_date": "2025-01-17T08:00:00Z", + "competition_id": "tradingcomp27", + "trading_league": "Mantle", + "trading_league_title": "Mantle Trading League" + }, + "/rewards/base-trading-league": { + "start_date": "2025-01-20T08:00:00Z", + "end_date": "2025-02-20T08:00:00Z", + "competition_id": "tradingcomp28", + "trading_league": "Base", + "trading_league_title": "Base Trading League" + } + } }