Skip to content

Commit

Permalink
Merge branch 'master' into XTW-78700a-assets-1697460181293
Browse files Browse the repository at this point in the history
  • Loading branch information
Azerus972 authored Sep 15, 2024
2 parents c87689f + c98e11c commit b2289db
Show file tree
Hide file tree
Showing 2,483 changed files with 94,718 additions and 57,413 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
}
File renamed without changes.
24 changes: 13 additions & 11 deletions .github/snippet.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DIR=""

validate_filenames() {
ADDED_FILES=$@
for file in $ADDED_FILES; do
for file in "$@"; do
echo "Checking filename for $file"
if [[ ${file} != *"/info.json"* && ${file} != *"/logo.png"* && ${file} != *"/logo.svg"* && ${file} != *"accounts/"* && ${file} != *".github/"* && ${file} != *"/ranks.json"* && ${file} != *"README.md"* ]]; then
echo "Filename ${file} isn't expected!"
exit 1
Expand All @@ -13,9 +13,9 @@ validate_filenames() {
}

validate_file_size() {
ADDED_FILES=$@
SIZE_LIMIT=100
for file in $ADDED_FILES; do
for file in "$@"; do
echo "Checking file size for $file"
if [[ ${file} == *"/logo.svg"* || ${file} == *"/logo.svg"* ]]; then
file_size_blocks=$(ls -sh ${file} | grep -o -E '^[0-9]+')
file_size_kb=$(expr ${file_size_blocks} / 2)
Expand All @@ -29,9 +29,8 @@ validate_file_size() {
}

validate_svg_square() {
ADDED_FILES=$@

for file in $ADDED_FILES; do
for file in "$@"; do
echo "Checking if SVG is square for $file"
if [[ ${file} == *"/logo.svg"* ]]; then
view_box=$(cat $file | grep -E " viewBox" | grep -E -o "(([0-9]*\.[0-9]+|[0-9]+) ){3,3}([0-9]*\.[0-9]+|[0-9]+)" | head -1)

Expand All @@ -56,11 +55,14 @@ validate_svg_square() {
}

validate_png_dimensions() {
ADDED_FILES=$@
EXPECTED_PNG_DIMENSIONS="200 x 200"
for file in "$@"; do
echo "Checking PNG dimensions for $file"
logo_in_tokens="*tokens/*/logo.png"
logo_in_identities="*identities/*/logo.png"
png_in_accounts="*accounts/*/*.png"

for file in $ADDED_FILES; do
if [[ ${file} == *"/logo.png"* && ${file} == *"tokens/"* ]]; then
if [[ ${file} == ${logo_in_tokens} || ${file} == ${logo_in_identities} || ${file} == ${png_in_accounts} ]]; then
png_dimensions=$(file $file | grep -E -o "[0-9]+ x [0-9]+" | head -1)

echo "PNG dimensions: $png_dimensions"
Expand All @@ -76,7 +78,7 @@ validate_png_dimensions() {
}

validate_token_existence() {
urls=( "https://api.elrond.com/" "https://testnet-api.elrond.com/" "https://devnet-api.elrond.com/")
urls=( "https://api.multiversx.com/" "https://testnet-api.multiversx.com/" "https://devnet-api.multiversx.com/")
for url in ${urls[@]}; do
API_TOKEN_URL="$url"
API_TOKEN_URL+="tokens/"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/check-signature-rerun-on-comment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check signature rerun on comment
name: Check assets ownership on comment

permissions:
contents: read
Expand All @@ -14,6 +14,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
REGEX: '[0-9a-fA-F]{64}$|^[0-9a-fA-F]{128}'
NAME: 'Check identities signature'


NAME: 'Check assets ownership'
4 changes: 1 addition & 3 deletions .github/workflows/check-signature.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check identities signature
name: Check assets ownership

permissions:
contents: read
Expand All @@ -14,5 +14,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADMIN_ADDRESS: ${{ secrets.ADMIN_ADDRESS }}


40 changes: 30 additions & 10 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,47 @@ jobs:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt install imagemagick-6.q16
shell: bash
- name: Collecting file paths
run: |
echo "FILE_PATHS=$(find ./tokens -type f -name '*info.json' -printf '%p,'| sed 's/,$//' )" >> $GITHUB_ENV
shell: bash
# 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
name: Validate files
uses: jitterbit/get-changed-files@v1
- run: |
- name: Validate file size
run: |
source .github/snippet.sh ; validate_file_size ${{ steps.files.outputs.added_modified }}
- name: Validate filenames
run: |
source .github/snippet.sh ; validate_filenames ${{ steps.files.outputs.added_modified }}
- name: Validate png dimensions
run: |
source .github/snippet.sh ; validate_png_dimensions ${{ steps.files.outputs.added_modified }}
- name: Validate svg square
run: |
source .github/snippet.sh ; validate_svg_square ${{ steps.files.outputs.added_modified }}
shell: bash
- name: Validate token existence
run: |
source .github/snippet.sh; validate_token_existence
shell: bash
- 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 }}
122 changes: 113 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Introduction

This repository holds a list of whitelisted tokens in the MultiversX web tools. A whitelisted token can have website and socials URLs, a logo or a description, that will be displayed on MultiversX products, such as the MultiversX Explorer or the Web Wallet. The logos are also used in the xPortal App.
This repository holds a list of branded assets in the MultiversX web tools. Branded assets (can be a token, an account, or a staking identity) can have website and socials URLS, a logo or a description, that will be displayed on MultiversX products, such as the MultiversX Explorer, Web Wallet, and xPortal App.

# Custom ESDT logo & description
Amplify your brand via the MultiversX Network web tools & the Mobile Wallet.
# Tokens branding

Amplify your token brand via the MultiversX Network web tools & the Mobile Wallet.

Add a logo, description & socials for your ESDT token.

Project owners can create a PR to this repo. Create a folder named exactly as your ESDT ID or NFT Collection ID, i.e. TOKEN-abcc123. Add 2 files for the logo: logo.png and logo.svg. Also add an info.json file containing all the relevant information, as following:
Project owners can create a PR against this repo. Create a folder named exactly as your ESDT ID or NFT Collection ID, i.e. TOKEN-abcc123. Add 2 files for the logo: `logo.png` and `logo.svg`. Also, add an `info.json` file containing all the relevant information.

Alternatively, a token owner can use our dApp that facilitates the token branding: https://assets.multiversx.com

| :exclamation: Be aware of the repository's [environments](#environments) and [ownership checks](#ownership-checks). |
|----------------------------------------------------------------------------------------------------------------------|

## info.json

Expand Down Expand Up @@ -38,17 +44,14 @@ Here’s a prefilled template for the .json file to get you started:
}
```

- `ledgerSignature` will be generated by MultiversX. It will give your token “whitelist” status on the Ledger app and enable a more data rich flow for users storing your token on their Ledger hardware wallets. If one wants to set a Ledger signature, request it when opening a PR.
- `ledgerSignature` will be generated by MultiversX. It will give your token “whitelist” status on the Ledger app and enable a more data-rich flow for users storing your token on their Ledger hardware wallets. If one wants to set a Ledger signature, request it when opening a PR.
- `lockedAccounts` defines accounts that do not actively transfer tokens, which will be subtracted from the supply to determine the circulating supply of the token
- `extraTokens` defines tokens / MetaESDT collection identifiers that are part of the token itself (LP tokens, Farm tokens, Metastaking tokens, etc). These extra tokens will be also taken into consideration when calculating distinct `accounts` & total number of `transactions` in the token details API endpoint

## Guidelines:
- logo does not resemble MultiversX/Mobile Wallet logos, or other trademarked visual identities
- logo does not resemble MultiversX/Mobile Wallet logos or other trademarked visual identities
- PR files need to be named info.json, logo.svg and logo.png
- the PR title has to be the token name + identifier (ex: TOKEN-abc123)
- projects need to have a minimum of 1000 token holders and token transactions
- projects need to have a minimum of 1000+ Twitter, Discord or TG official channel followers
- projects need to have a working website
- max pic size 100kb (.png)

## Logos general requirements
Expand All @@ -74,3 +77,104 @@ Here’s a prefilled template for the .json file to get you started:
| ![RIDE svg](https://github.com/multiversx/mx-assets/blob/master/tokens/RIDE-7d18e9/logo.svg?raw=true) |
| :---------------------------------------------------------------------------------------------------: |
| *Example* |

# Identities branding

Amplify your staking brand via the MultiversX Network web tools & the Mobile Wallet.

Add a logo, description & socials for your staking identity.

Project owners can create a PR to this repo. Create a folder named as your identity (lowercase, dash-separated. Example: my-staking-identity). Add a logo.png file, sized 200x200. Also, add an info.json file containing all the relevant information.

| :exclamation: Be aware of the repository's [environments](#environments) and [ownership checks](#ownership-checks). |
|----------------------------------------------------------------------------------------------------------------------|

## info.json

```JSON
{
"description": "Description of the Staking provider.",
"name": "My Staking Provider",
"website": "https://www.mywebsite.com/",
"twitter": "MyStakingProvider",
"owners": [
"erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th",
"erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqpq8llllskj52rl"
]
}
```

Inside the `owners` array, depending on your needs, you should include:
- if you'd like to brand directly staked nodes (no staking provider), then add the owner address
- if you'd like to brand a staking provider, then add the staking provider's address
- both if you'd like to brand directly staked nodes and a staking provider under the same identity

## logo.png

- must be 200x200
- must look good also when cropped as a circle
- must define a transparent background
- must have sufficiently good contrast both when rendered on a light background, as well as a dark background

# Accounts branding

Amplify your project via the MultiversX Network web tools & the Mobile Wallet.

Add a description, an icon & socials for your Smart Contract or address.

Addresses owners can create a PR to this repo. Create a file named as your address with a `json` extension (Example: `erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th.json`).

| :exclamation: Be aware of the repository's [environments](#environments) and [ownership checks](#ownership-checks). |
|----------------------------------------------------------------------------------------------------------------------|

## address.json

Example:

`erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th.json`

```JSON
{
"name": "My branded address or SC",
"description": "",
"social": {
"website": "https://dapp.com",
"twitter": "https://twitter.com/intent/user?screen_name=dapp",
"telegram": "https://t.me/Dapp",
"youtube": "https://youtube.com/@Dapp",
"github": "https://github.com/Dapp"
},
"tags": [
"dapp",
"smartcontract"
],
"icon": "mydapp"
}
```

## icon

If you also want to include an icon that will be displayed near your address, you must add a PNG and an SVG icon in the nearby `icons` directory that will be named exactly as the `icon` field value inside the JSON file + the `png` and `svg` extensions.

Example: If one wants to brand a devnet account, then an `<address>.json` file needs to be added inside `devnet/accounts` directory. For example, if the `icon` value is `myaddress` then `myaddress.png` + `myaddress.svg` files must be added inside `devnet/accounts/icons` directory.

The same logo guidelines used for tokens/identities apply here as well.

# Environments

This repository enables users to brand their assets on any of our environments (Mainnet, Testnet, and Devnet).

Therefore, here are the directories that one needs to use depending on the environment:
- for a mainnet asset, refer to the `tokens`, `accounts`, or `identities` directory.
- for a testnet asset, refer to the `testnet/tokens`, `testnet/accounts`, or `testnet/identities` directory.
- for a devnet asset, refer to the `devnet/tokens`, `devnet/accounts`, or `devnet/identities` directory.

# Ownership checks

To make sure that assets can only be branded by real owners, we introduced a GitHub action that requires that an ownership check is successful before allowing the PR to be merged.

This is done via a message signature verification, where the message is the latest commit sha of the PR (to avoid multiple signs in case of intermediary merges, if one of the signatures is verified, it is enough).

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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "PLΛTΛ",
"description": "Project Cold Wallet",
"social": {
"website": "https://plata.network",
"twitter": "https://twitter.com/plataNetwork"
},
"tags": [
"plata",
"drivers"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Ofero.me: Referral",
"description": "The ofero.me Referral Wallet",
"social": {
"website": "https://www.ofero.network",
"email": "contact@ofero.network",
"twitter": "https://twitter.com/oferonetwork",
"whitepaper": "https://ofero.network/documents/whitepaper.pdf",
"coinmarketcap": "https://coinmarketcap.com/currencies/ofero-network",
"coingecko": "https://www.coingecko.com/en/coins/ofero",
"telegram": "https://t.me/oferonetwork",
"youtube": "https://www.youtube.com/@oferonetwork",
"facebook": "https://www.facebook.com/oferonetwork",
"instagram": "http://instagram.com/oferonetwork",
"linkedin": "https://www.linkedin.com/company/oferonetwork",
"linktree": "https://linktr.ee/oferonetwork",
"discord": "https://discord.gg/PrKZpqbwk4",
"blog": "https://medium.com/@oferonetwork",
"reddit": "https://www.reddit.com/r/ofero_network"
},
"tags": [
"ofero",
"ofero network",
"ofero.me",
"referral",
"community"
],
"icon": "oferonetwork"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "ShibaX Gang Bank",
"description": "ShibaX Gang Bank",
"social": {
"website": "https://www.shibaxnft.com/",
"twitter": "https://twitter.com/ShibaXSHIB"
},
"tags": [
"shibax",
"xshib",
"gang",
"bank"
],
"icon": "xshib"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "PLΛTΛ",
"description": "Legacy BOT Wallet",
"social": {
"website": "https://plata.network",
"twitter": "https://twitter.com/plataNetwork"
},
"tags": [
"plata",
"drivers"
]
}
Loading

0 comments on commit b2289db

Please sign in to comment.