diff --git a/.github/workflows/dependency-build.yml b/.github/workflows/dependency-build.yml index ae5d36af5bfd..a817c5bc6469 100644 --- a/.github/workflows/dependency-build.yml +++ b/.github/workflows/dependency-build.yml @@ -15,7 +15,6 @@ on: - "docker/oldUI.Dockerfile" - "docker-compose/envs/common-blockscout-mainnet.env" - "docker-compose/envs/common-blockscout-testnet.env" - - "docker-compose/token-lists/**" - ".github/workflows/dependency-build.yml" workflow_dispatch: @@ -33,47 +32,40 @@ env: jobs: token-lists: - name: Validate DOS Chain token lists + name: Validate DOS Chain token list reference runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Validate schema, networks, assets, and environment URLs + - name: Validate hosted list, WDOS metadata, asset, and environment URL run: | set -euo pipefail - schema_url="https://raw.githubusercontent.com/Uniswap/token-lists/01705f94a307270b6c0fe5f55c7e66f7b92373cc/src/tokenlist.schema.json" - curl --fail --silent --show-error "${schema_url}" > "$RUNNER_TEMP/tokenlist.schema.json" - npx --yes ajv-cli@5.0.0 validate \ - --spec=draft7 \ - --strict=false \ - -s "$RUNNER_TEMP/tokenlist.schema.json" \ - -d docker-compose/token-lists/mainnet.json - + token_list_url="https://raw.githubusercontent.com/DOS/DOScan-Frontend-Configs/main/configs/token-lists/mainnet.json" + expected_icon_url="https://raw.githubusercontent.com/DOS/DOScan-Frontend-Configs/main/configs/token-icons/WDOS.svg" + curl --fail --silent --show-error --location \ + "${token_list_url}" --output "${RUNNER_TEMP}/dos-mainnet-token-list.json" jq --exit-status \ + --arg icon "${expected_icon_url}" \ ' - (.timestamp | fromdateiso8601 > 0) and - (.tokens | length > 0) and - (.tokens | all( + any(.tokens[]; (.chainId == 7979) and - (.logoURI | test("^https://raw\\.githubusercontent\\.com/DOS/DOScan/main/docker-compose/token-lists/assets/[a-z0-9._-]+\\.(svg|png)$")) - )) and - (([.tokens[].address | ascii_downcase] | unique | length) == (.tokens | length)) - ' \ - docker-compose/token-lists/mainnet.json >/dev/null - - while IFS= read -r logo_url; do - asset_path="${logo_url#https://raw.githubusercontent.com/DOS/DOScan/main/}" - test -s "${asset_path}" - if grep -Eqi '/dev/null + icon_type="$( + curl --fail --silent --show-error --location --output /dev/null \ + --write-out "%{content_type}" "${expected_icon_url}" + )" + [ "${icon_type%%;*}" = "image/svg+xml" ] grep -Fxq \ - 'TOKEN_LIST_URL=https://raw.githubusercontent.com/DOS/DOScan/main/docker-compose/token-lists/mainnet.json' \ + "TOKEN_LIST_URL=${token_list_url}" \ docker-compose/envs/common-blockscout-mainnet.env - name: Validate Mainnet and Testnet environment parity diff --git a/.github/workflows/deploy-config.yml b/.github/workflows/deploy-config.yml index 99dc50979eb5..e422d399aa21 100644 --- a/.github/workflows/deploy-config.yml +++ b/.github/workflows/deploy-config.yml @@ -524,7 +524,7 @@ jobs: curl --fail --silent --show-error --retry 6 --retry-delay 5 https://doscan.io/api/v2/stats >/dev/null curl --fail --silent --show-error --retry 6 --retry-delay 5 https://doscan.io/public-metrics >/dev/null - expected_token_icon="https://raw.githubusercontent.com/DOS/DOScan/main/docker-compose/token-lists/assets/wdos.svg" + expected_token_icon="https://raw.githubusercontent.com/DOS/DOScan-Frontend-Configs/main/configs/token-icons/WDOS.svg" token_icon_type="$( curl --fail --silent --show-error --output /dev/null --write-out "%{content_type}" \ --retry 6 --retry-delay 5 \ diff --git a/docker-compose/envs/common-blockscout-mainnet.env b/docker-compose/envs/common-blockscout-mainnet.env index b8397a95b669..f8e951ce8371 100644 --- a/docker-compose/envs/common-blockscout-mainnet.env +++ b/docker-compose/envs/common-blockscout-mainnet.env @@ -8,7 +8,7 @@ ETHEREUM_JSONRPC_PENDING_TRANSACTIONS_TYPE=geth BLOCKSCOUT_HOST=doscan.io CHAIN_ID=7979 SUBNETWORK=Mainnet -TOKEN_LIST_URL=https://raw.githubusercontent.com/DOS/DOScan/main/docker-compose/token-lists/mainnet.json +TOKEN_LIST_URL=https://raw.githubusercontent.com/DOS/DOScan-Frontend-Configs/main/configs/token-lists/mainnet.json INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER=false INDEXER_INTERNAL_TRANSACTIONS_TRACER_TYPE=call_tracer diff --git a/docker-compose/token-lists/README.md b/docker-compose/token-lists/README.md deleted file mode 100644 index e2d54b095aa8..000000000000 --- a/docker-compose/token-lists/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# DOS Chain token lists - -This directory is the source of truth for curated ERC-20 metadata imported by the -DOScan backend. - -Blockscout reads the environment-specific list through `TOKEN_LIST_URL` when -the backend starts and refreshes it every 24 hours. Entries use the Token Lists -schema and may provide: - -Blockscout does not ship per-chain token-list files in its `docker-compose` -directory. Each deployment owns and hosts its list at any stable HTTP(S) URL; -this repository keeps the DOS Chain list beside its deployment configuration. - -- `chainId` -- `address` -- `name` -- `symbol` -- `decimals` -- `logoURI` - -The backend imports the logo, name, symbol, and decimals for tokens that match -the configured chain ID. Existing on-chain name, symbol, and decimals are not -overwritten by the list. - -Project descriptions, websites, support links, and social links do not belong -in this list. Those fields are served by the separate Contract Info/Metadata -Service endpoint consumed by the frontend. - -## Adding a token - -1. Add a permanent SVG or PNG under `assets/`. -2. Add the token to the matching network JSON file. Do not configure an empty - token list for a network without a verified token deployment. -3. Use the checksummed contract address and the network's exact chain ID. -4. Increment the list version and timestamp. -5. Confirm the token contract exists and its on-chain metadata matches the list. diff --git a/docker-compose/token-lists/assets/wdos.svg b/docker-compose/token-lists/assets/wdos.svg deleted file mode 100644 index 21d8ababc643..000000000000 --- a/docker-compose/token-lists/assets/wdos.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docker-compose/token-lists/mainnet.json b/docker-compose/token-lists/mainnet.json deleted file mode 100644 index 656ccae8c7bc..000000000000 --- a/docker-compose/token-lists/mainnet.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "DOS Chain Token List", - "timestamp": "2026-07-29T00:00:00Z", - "version": { - "major": 1, - "minor": 0, - "patch": 0 - }, - "tokens": [ - { - "chainId": 7979, - "address": "0x1111111111111111111111111111111111111111", - "name": "Wrapped DOS", - "symbol": "WDOS", - "decimals": 18, - "logoURI": "https://raw.githubusercontent.com/DOS/DOScan/main/docker-compose/token-lists/assets/wdos.svg" - } - ] -} diff --git a/scripts/validate-blockscout-env-parity.py b/scripts/validate-blockscout-env-parity.py index d789195b0b00..75f15bc12a3e 100644 --- a/scripts/validate-blockscout-env-parity.py +++ b/scripts/validate-blockscout-env-parity.py @@ -183,8 +183,8 @@ def main() -> int: ) expected_mainnet_token_list_url = ( - "https://raw.githubusercontent.com/DOS/DOScan/main/" - "docker-compose/token-lists/mainnet.json" + "https://raw.githubusercontent.com/DOS/DOScan-Frontend-Configs/main/" + "configs/token-lists/mainnet.json" ) actual_mainnet_token_list_url = mainnet_override.get("TOKEN_LIST_URL") if actual_mainnet_token_list_url != expected_mainnet_token_list_url: