Skip to content

Commit

Permalink
Merge branch 'master' into NDAN-bfca8e
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmultiversx authored Dec 30, 2024
2 parents efe4e7b + cebdd50 commit f408551
Show file tree
Hide file tree
Showing 1,214 changed files with 111,532 additions and 4,354 deletions.
12 changes: 12 additions & 0 deletions .github/schemas/accounts-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": true
}
4 changes: 4 additions & 0 deletions .github/schemas/identities-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "object",
"additionalProperties": true
}
1 change: 0 additions & 1 deletion schema.json → .github/schemas/tokens-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
}
},
"required": [
"website",
"description",
"status"
],
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
jobs:
automerge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- id: automerge
name: automerge
uses: "pascalgn/automerge-action@v0.16.4"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
25 changes: 21 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ jobs:
sudo apt install imagemagick-6.q16
- name: Collecting file paths
run: |
echo "FILE_PATHS=$(find ./tokens -type f -name '*info.json' -printf '%p,'| sed 's/,$//' )" >> $GITHUB_ENV
# Collect all JSON files in 'tokens' directories
echo "TOKENS_FILE_PATHS=$(find . -type f -path '*/tokens/*.json' ! -name 'ranks.json' -printf '%p,' | sed 's/,$//')" >> $GITHUB_ENV
# Collect all JSON files in 'accounts' directories
echo "ACCOUNTS_FILE_PATHS=$(find . -type f -path '*/accounts/*.json' -printf '%p,' | sed 's/,$//')" >> $GITHUB_ENV
# Collect all JSON files in 'identities' directories
echo "IDENTITIES_FILE_PATHS=$(find . -type f -path '*/identities/*.json' -printf '%p,' | sed 's/,$//')" >> $GITHUB_ENV
- id: files
uses: jitterbit/get-changed-files@v1
- name: Validate file size
Expand All @@ -35,8 +42,18 @@ jobs:
- name: Validate token existence
run: |
source .github/snippet.sh; validate_token_existence
- name: Validate JSON
- name: Validate tokens JSON
uses: docker://orrosenblatt/validate-json-action:latest
env:
INPUT_SCHEMA: ./.github/schemas/tokens-schema.json
INPUT_JSONS: ${{ env.TOKENS_FILE_PATHS }}
- name: Validate accounts JSON
uses: docker://orrosenblatt/validate-json-action:latest
env:
INPUT_SCHEMA: ./.github/schemas/accounts-schema.json
INPUT_JSONS: ${{ env.ACCOUNTS_FILE_PATHS }}
- name: Validate identities JSON
uses: docker://orrosenblatt/validate-json-action:latest
env:
INPUT_SCHEMA: ./schema.json
INPUT_JSONS: ${{ env.FILE_PATHS }}
INPUT_SCHEMA: ./.github/schemas/identities-schema.json
INPUT_JSONS: ${{ env.IDENTITIES_FILE_PATHS }}
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,49 @@ This is done via a message signature verification, where the message is the late
To do so, on the PR page, go to the `Commits` tab of the Pull Request and copy the latest commit hash (should look similar to `9c6164f1b195ce96bc5b65d6878ebe813e852550`). Then sign
that string by using the owner of the asset you are branding. The easiest way is to use our [Utils Dapp](https://utils.multiversx.com) where you should log in with the owner wallet
and then go to the 'Sign Message' tab and sign the commit hash previously copied. After that, leave a comment inside the Pull Request with the obtained signature.

# Custom token price fetching

By default, tokens issued on MultiversX will have their price displayed on frontend products (such as Explorer, Web Wallet, and so on) only if they have a pair listed on xExchange.

However, there is the possibility for tokens to provide a custom price source for tokens. Here's how:

Inside the `info.json` file corresponding to the token, add the following property:

```
"priceSource": {
"type": "customUrl",
"url": "https://your-api.com/your-token-price-endpoint",
"path": "0.usdPrice"
},
```

Using the above settings, your endpoint must return a response that follows this definition:

```json
[
{
"usdPrice": 0.05
}
]
```

The default `path`, also used when nothing is set (`0.usdPrice`), will assume that the object containing the `usdPrice` is the first entry of an array.

If you want to expose something different on your endpoint, such as:

```json
{
"myCustomPriceField": 0.05
}
```

you'll need to update the `path` field accordingly:

```
"priceSource": {
"type": "customUrl",
"url": "https://your-api.com/your-token-price-endpoint",
"path": "myCustomPriceField"
},
```
Binary file added accounts/bodcoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions accounts/bodcoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Kwak - Team Wallet",
"description": "",
"social": {
"website": "https://kwak.lol",
"telegram": "https://t.me/dakwakklub",
"twitter": "https://x.com/kwakdotlol"
},
"tags": ["kwak"],
"icon": "kwak"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Kwak - IRL Stuff",
"description": "",
"social": {
"website": "https://kwak.lol",
"telegram": "https://t.me/dakwakklub",
"twitter": "https://x.com/kwakdotlol"
},
"tags": ["kwak"],
"icon": "kwak"
}
Loading

0 comments on commit f408551

Please sign in to comment.