-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jayden Teoh
authored and
Jayden Teoh
committed
Nov 29, 2022
1 parent
9fbf45f
commit 98827a5
Showing
7 changed files
with
1,148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# New Feature Market Template | ||
|
||
Please update the below configurations carefully. Each featured markets json file under the [configs](../../configs) folder correspond to their respective networks. For example, [configs/mainnet.json](../../configs/mainnet.json) is for adding maerkets to feature in the `mainnet`. As such, please check which network you would like to feature your market at and add to the correct `configs/<network>.json` file. | ||
|
||
Please make sure to add to the **bottom** of the array. | ||
|
||
## Feature Market Data Structure | ||
|Field |Type |Required |Description |Notes | | ||
|---|---|---|---|---| | ||
|`name` |`string` |true |The denom of the market which is used to generate the list of featured markets in Demex |Name **MUST** match the name of the market in the Carbon markets api. Please refer to the [api](https://api.carbon.network/carbon/market/v1/markets?pagination.limit=10000) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
-master | ||
name: Pull request workflow | ||
jobs: | ||
validate_markets: | ||
name: Validate Markets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Dependencies | ||
uses: borales/[email protected] | ||
with: | ||
cmd: install --ignore-engines # will run `yarn install` command | ||
|
||
- name: Validate nodes schema | ||
uses: borales/[email protected] | ||
with: | ||
cmd: validate # validate using json schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"title": "Demex Webapp Config", | ||
"description": "demex-webapp-config is a repository to allow frontends to fetch metadata associated with Demex", | ||
"type": "object", | ||
"required": [ | ||
"network", | ||
"featured_markets" | ||
], | ||
"properties": { | ||
"network": { | ||
"type": "string", | ||
"enum": [ | ||
"mainnet", | ||
"testnet", | ||
"devnet" | ||
] | ||
}, | ||
"featured_markets": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/featured_market" | ||
} | ||
} | ||
}, | ||
"$defs": { | ||
"featured_market": { | ||
"type": "object", | ||
"required": [ | ||
"name" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The denom of the market which is used to generate the list of featured markets in Demex" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"network": "mainnet", | ||
"featured_markets": [ | ||
{ | ||
"name": "ETHUSDC_PERP" | ||
}, | ||
{ | ||
"name": "WBTCUSDC_PERP" | ||
}, | ||
{ | ||
"name": "busd1_usdc1" | ||
}, | ||
{ | ||
"name": "zwap.1.18.393529_swth" | ||
}, | ||
{ | ||
"name": "lkt1_usdc1" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "demex-webapp-config", | ||
"version": "1.0.0", | ||
"description": "demex-webapp-config is a repository to allow frontends to fetch metadata associated with Demex", | ||
"repository": "https://github.com/Switcheo/demex-webapp-config", | ||
"author": "Switcheo <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"validate": "pajv validate -s config.schema.json -d configs/markets.json --verbose" | ||
}, | ||
"dependencies": { | ||
"@types/node": "^18.11.9", | ||
"pajv": "^1.2.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.3" | ||
} | ||
} |
Oops, something went wrong.