From 2765f91299f4a843cab86855c337b41947b6910d Mon Sep 17 00:00:00 2001 From: JSHan94 Date: Fri, 12 Apr 2024 10:33:49 +0900 Subject: [PATCH] docs: update readme --- README.md | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 373 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d0f6029..8af31f3 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,376 @@ This repo contains a `chain.json` and `assetlist.json` for a number of chains in Initia ecosystem. A `chain.json` contains data that makes it easy to start running or interacting with a node. -Schema files containing the recommended metadata structure can be found in the `*.schema.json` files located in the root directory. Schemas are still undergoing revision as user needs are surfaced. Optional fields may be added beyond what is contained in the schema files. \ No newline at end of file +Schema files containing the recommended metadata structure can be found in the `*.schema.json` files located in the root directory. Schemas are still undergoing revision as user needs are surfaced. Optional fields may be added beyond what is contained in the schema files. + +# How to add Minitia to registry + +1. Fork this repo +2. Add a new directory with the name of the chain you want to add +3. Add a `chain.json` file with the metadata of the chain +4. Add an `assetlist.json` file with the metadata of the assets on the chain +5. Add an `initia-minitia.json` file with the metadata of the IBC connections and channels. The file name should be in alphabetical order of the chain names. Ex: `Achain-Bchain.json`. +6. Create a pull request + +## chain.json + +A sample chain.json includes the following information. + +```json +{ + "$schema": "../../chain.schema.json", + "chain_name": "initia", + "chain_id": "mahalo-2", + "website": "https://initia.xyz", + "pretty_name": "Initia", + "status": "live", + "network_type": "devnet", + "bech32_prefix": "init", + "daemon_name": "initiad", + "node_home": "$HOME/.initia", + "key_algos": ["secp256k1"], + "slip44": 118, + "fees": { + "fee_tokens": [ + { + "denom": "uinit", + "fixed_min_gas_price": 0.15, + "low_gas_price": 0.15, + "average_gas_price": 0.15, + "high_gas_price": 0.4 + }, + { + "denom": "ueth" + }, + { + "denom": "uusdc" + } + ] + }, + "staking": { + "staking_tokens": [ + { + "denom": "uinit" + }, + { + "denom": "move/dbf06c48af3984ec6d9ae8a9aa7dbb0bb1e784aa9b8c4a5681af660cf8558d7d" + }, + { + "denom": "move/a2b0d3c8e53e379ede31f3a361ff02716d50ec53c6b65b8c48a81d5b06548200" + } + ] + }, + "codebase": { + "git_repo": "https://github.com/initia-labs/initia", + "recommended_version": "v0.2.3", + "compatible_versions": ["v0.2.3"], + "binaries": { + "linux/amd64": "https://initia.s3.ap-southeast-1.amazonaws.com/mahalo-2/initia_v0.2.3_Linux_x86_64.tar.gz", + "linux/arm64": "https://initia.s3.ap-southeast-1.amazonaws.com/mahalo-2/initia_v0.2.3_Linux_aarch64.tar.gz", + "darwin/amd64": "https://initia.s3.ap-southeast-1.amazonaws.com/mahalo-2/initia_v0.2.3_Darwin_x86_64.tar.gz", + "darwin/arm64": "https://initia.s3.ap-southeast-1.amazonaws.com/mahalo-2/initia_v0.2.3_Darwin_aarch64.tar.gz" + }, + "genesis": { + "genesis_url": "https://initia.s3.ap-southeast-1.amazonaws.com/mahalo-2/genesis.json" + }, + "versions": [] + }, + "description": "Initia Closed Devnet", + "peers": { + "seeds": [], + "persistent_peers": [] + }, + "apis": { + "rpc": [ + { + "address": "https://rpc.mahalo-2.initia.xyz", + "provider": "Foundation" + } + ], + "rest": [ + { + "address": "https://lcd.mahalo-2.initia.xyz", + "provider": "Foundation" + } + ], + "api": [ + { + "address": "https://api.mahalo-2.initia.xyz", + "provider": "Foundation" + } + ], + "grpc": [ + { + "address": "grpc://34.87.121.251:9090", + "provider": "Foundation" + } + ] + }, + "explorers": [ + { + "kind": "explorer", + "url": "https://explorer.mahalo-2.initia.xyz/?layer=l1%2520testnet", + "tx_page": "https://explorer.mahalo-2.initia.xyz/tx/${txHash}?layer=l1%20testnet", + "account_page": "https://explorer.mahalo-2.initia.xyz/address/${accountAddress}?layer=l1%20testnet" + }, + { + "kind": "initia scan", + "url": "https://scan.initia.xyz/mahalo-2", + "tx_page": "https://scan.initia.xyz/mahalo-2/txs/${txHash}", + "account_page": "https://scan.initia.xyz/mahalo-2/accounts/${accountAddress}" + } + ], + "faucets": [ + { + "kind": "faucet", + "url": "https://faucet.mahalo-2.initia.xyz/" + } + ], + "images": [ + { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.svg" + } + ], + "logo_URIs": { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.svg" + }, + "metadata": { + "is_l1": true, + "ibc_channels": [ + { + "chain_id": "minimove-2", + "port_id": "transfer", + "channel_id": "channel-0", + "version": "ics20-1" + }, + { + "chain_id": "minimove-2", + "port_id": "nft-transfer", + "channel_id": "channel-2", + "version": "ics721-1" + }, + + { + "chain_id": "miniwasm-2", + "port_id": "transfer", + "channel_id": "channel-1", + "version": "ics20-1" + }, + { + "chain_id": "miniwasm-2", + "port_id": "nft-transfer", + "channel_id": "channel-3", + "version": "ics721-1" + } + ], + "assetlist": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/assetlist.json" + } +} +``` + +## Assetlists + +Asset Lists are inspired by the [Token Lists](https://tokenlists.org/) project on Ethereum which helps discoverability of ERC20 tokens by providing a mapping between erc20 contract addresses and their associated metadata. + +Asset lists are a similar mechanism to allow frontends and other UIs to fetch metadata associated with Cosmos SDK denoms, especially for assets sent over IBC. + +This standard is a work in progress. You'll notice that the format of assets in the assetlist.json structure is a strict superset json representation of the banktypes.DenomMetadata from the Cosmos SDK. This is purposefully done so that this standard may eventually be migrated into a Cosmos SDK module in the future, so it can be easily maintained on chain instead of on Github. + +The assetlist JSON Schema can be found here. + +An example assetlist json contains the following structure: + +```json +{ + "$schema": "../../assetlist.schema.json", + "chain_name": "initia", + "assets": [ + { + "description": "The native token of Initia", + "denom_units": [ + { + "denom": "uinit", + "exponent": 0 + }, + { + "denom": "INIT", + "exponent": 6 + } + ], + "base": "uinit", + "display": "INIT", + "name": "Initia Native Token", + "symbol": "INIT", + "coingecko_id": "", + "images": [ + { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.svg" + } + ], + "logo_URIs": { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/INIT.svg" + } + }, + { + "description": "The fake ETH", + "denom_units": [ + { + "denom": "ueth", + "exponent": 0 + }, + { + "denom": "ETH", + "exponent": 6 + } + ], + "base": "ueth", + "display": "ETH", + "name": "Fake ETH Token", + "symbol": "ETH", + "coingecko_id": "", + "images": [ + { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH.svg" + } + ], + "logo_URIs": { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH.svg" + } + }, + { + "description": "The fake USDC", + "denom_units": [ + { + "denom": "uusdc", + "exponent": 0 + }, + { + "denom": "USDC", + "exponent": 6 + } + ], + "base": "uusdc", + "display": "USDC", + "name": "Fake USDC Token", + "symbol": "USDC", + "coingecko_id": "", + "images": [ + { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC.svg" + } + ], + "logo_URIs": { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC.svg" + } + }, + { + "description": "The LP token of USDC-INIT", + "denom_units": [ + { + "denom": "move/dbf06c48af3984ec6d9ae8a9aa7dbb0bb1e784aa9b8c4a5681af660cf8558d7d", + "exponent": 0 + }, + { + "denom": "USDC-INIT LP", + "exponent": 6 + } + ], + "base": "move/dbf06c48af3984ec6d9ae8a9aa7dbb0bb1e784aa9b8c4a5681af660cf8558d7d", + "display": "USDC-INIT LP", + "name": "USDC-INIT LP Token", + "symbol": "USDC-INIT LP", + "coingecko_id": "", + "images": [ + { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC-INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC-INIT.svg" + } + ], + "logo_URIs": { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC-INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/USDC-INIT.svg" + } + }, + { + "description": "The LP token of ETH-INIT", + "denom_units": [ + { + "denom": "move/a2b0d3c8e53e379ede31f3a361ff02716d50ec53c6b65b8c48a81d5b06548200", + "exponent": 0 + }, + { + "denom": "ETH-INIT LP", + "exponent": 6 + } + ], + "base": "move/a2b0d3c8e53e379ede31f3a361ff02716d50ec53c6b65b8c48a81d5b06548200", + "display": "ETH-INIT LP", + "name": "ETH-INIT LP Token", + "symbol": "ETH-INIT LP", + "coingecko_id": "", + "images": [ + { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH-INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH-INIT.svg" + } + ], + "logo_URIs": { + "png": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH-INIT.png", + "svg": "https://raw.githubusercontent.com/initia-labs/initia-registry/main/devnets/initia/images/ETH-INIT.svg" + } + } + ] +} +``` + +## IBC Data + +The metadata contained in these files represents a path abstraction between two IBC-connected networks. This information is particularly useful when relaying packets and acknowledgments across chains. + +This schema also allows us to provide helpful info to describe open channels. + +Note: when creating these files, please ensure the chains in both the file name and the references of `chain-1` and `chain-2` in the json file are in alphabetical order. Ex: `Achain-Zchain.json`. The chain names used must match name of the chain's directory here in the chain-registry. + +An example ibc metadata file contains the following structure: + +```json +{ + "$schema": "../../ibc_data.schema.json", + "chain_1": { + "chain_name": "initia", + "client_id": "07-tendermint-0", + "connection_id": "connection-0" + }, + "chain_2": { + "chain_name": "minimove", + "client_id": "07-tendermint-0", + "connection_id": "connection-0" + }, + "channels": [ + { + "chain_1": { + "channel_id": "channel-0", + "port_id": "transfer" + }, + "chain_2": { + "channel_id": "channel-0", + "port_id": "transfer" + }, + "ordering": "unordered", + "version": "ics20-1", + "tags": { + "status": "live", + "preferred": true + } + } + ] +} +``` \ No newline at end of file