Skip to content

how to delineate non-cosmos chains, or tag chain network types #4733

@pyramation

Description

@pyramation

I'm trying to figure out how to detect from the structure if a chain is a non-cosmos chain, but realizing it's purely based on the folder structure? Was there a discussion for how to delineate in the actual json if it's cosmos or not? If this is to ever live in a database or a chain, it should have some delineating field.

I attempted to look at all assetlist.json files and see if a sibling chain.json exists, only 2 chains not in non-cosmos showed up, you can test for yourself:

#!/bin/bash

# Find all assetlist.json files
find . -name "assetlist.json" | while read -r assetlist_path; do
  # Get the directory of the assetlist.json file
  dir=$(dirname "$assetlist_path")
  
  # Check if chain.json exists in the same directory
  if [[ ! -f "$dir/chain.json" ]]; then
    # If chain.json does not exist, print the directory path
    echo "$dir"
  fi
done
./testnets/ojotestnet
./testnets/_non-cosmos/polkadottestnet
./testnets/_non-cosmos/moonbeamtestnet
./testnets/_non-cosmos/fantomtestnet
./testnets/_non-cosmos/polygontestnet
./testnets/_non-cosmos/avalanchetestnet
./testnets/_non-cosmos/binancesmartchaintestnet
./testnets/_non-cosmos/ethereumtestnet
./_non-cosmos/0l
./_non-cosmos/comex
./_non-cosmos/sui
./_non-cosmos/moonbeam
./_non-cosmos/neo
./_non-cosmos/stellar
./_non-cosmos/picasso
./_non-cosmos/tinkernet
./_non-cosmos/arbitrum
./_non-cosmos/fantom
./_non-cosmos/binancesmartchain
./_non-cosmos/kusama
./_non-cosmos/forex
./_non-cosmos/solana
./_non-cosmos/polygon
./_non-cosmos/statemine
./_non-cosmos/filecoin
./_non-cosmos/bitcoin
./_non-cosmos/aptos
./_non-cosmos/penumbra
./_non-cosmos/avalanche
./_non-cosmos/xrpl
./_non-cosmos/polkadot
./_non-cosmos/ethereum
./_non-cosmos/zilliqa
./_non-cosmos/composablepolkadot
./mantrachain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions