Skip to content

Commit

Permalink
Merge pull request #322 from Switcheo/feat/trading-league-config
Browse files Browse the repository at this point in the history
Create Trading League configs
  • Loading branch information
andrewsoon authored Jan 22, 2025
2 parents 1f9d9ce + 209a470 commit e6e8b1d
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/markets/pr_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -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.<br /><br /> 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 |

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
34 changes: 34 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
18 changes: 17 additions & 1 deletion configs/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

0 comments on commit e6e8b1d

Please sign in to comment.