forked from cerc-io/cosmos-explorer
add readme for config
This commit is contained in:
parent
b3b080b22c
commit
31011738d4
61
chains/README.md
Normal file
61
chains/README.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Directory Layout
|
||||||
|
|
||||||
|
**We accept all blockchains which have 10+ independent validators.**
|
||||||
|
|
||||||
|
- Submit configs for mainnet, go to https://github.com/ping-pub/explorer/tree/master/chains/mainnet
|
||||||
|
|
||||||
|
- Submit configs for testnet, go to https://github.com/ping-pub/explorer/tree/master/chains/testnet
|
||||||
|
|
||||||
|
# Sample of Config
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"chain_name": "cosmos",
|
||||||
|
"api": [
|
||||||
|
{
|
||||||
|
"address": "https://cosmos.api.ping.pub",
|
||||||
|
"provider": "Ping"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rpc": [
|
||||||
|
{
|
||||||
|
"address": "https://cosmos.api.ping.pub",
|
||||||
|
"provider": "Ping"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sdk_version": "0.42.6",
|
||||||
|
"coin_type": "118",
|
||||||
|
"min_tx_fee": "800",
|
||||||
|
"assets": [{
|
||||||
|
"base": "uatom",
|
||||||
|
"symbol": "ATOM",
|
||||||
|
"exponent": "6",
|
||||||
|
"coingecko_id": "cosmos",
|
||||||
|
"logo": "https://dl.airtable.com/.attachments/e54f814bba8c0f9af8a3056020210de0/2d1155fb/cosmos-hub.svg"
|
||||||
|
}],
|
||||||
|
"addr_prefix": "cosmos",
|
||||||
|
"theme_color": "#ce4747",
|
||||||
|
"logo": "https://dl.airtable.com/.attachments/e54f814bba8c0f9af8a3056020210de0/2d1155fb/cosmos-hub.svg"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- **chain_name** the name to identify the chain on ping.pub, would be better to use the same one as regitstry
|
||||||
|
- **api** the rest api endpoint.(make sure that CORS is enabled: `Allow-Control-Allow-Origin: *`)
|
||||||
|
- **rpc** the rpc endpoint, make sure that the port is added. rpc endpoint is only used for state sync. it's optional.
|
||||||
|
- **assets** Native Assets on blockchain.
|
||||||
|
|
||||||
|
Endpoint providers will be listed in the "Popular" tab of the staking.
|
||||||
|
|
||||||
|
# Test
|
||||||
|
|
||||||
|
please add these check points in comments with your PR, and adding your test result by clicking the checkbox of each line
|
||||||
|
```
|
||||||
|
Test Result:
|
||||||
|
- [ ] Connect wallet, check if address is correct?
|
||||||
|
- [ ] Transfer
|
||||||
|
- [ ] Delegate
|
||||||
|
- [ ] Redelegate
|
||||||
|
- [ ] Unbond
|
||||||
|
- [ ] withdraw Validator's Commission
|
||||||
|
- [ ] withdraw Rewards
|
||||||
|
```
|
||||||
|
Test is very important for us and our users.
|
@ -2,16 +2,20 @@
|
|||||||
"chain_name": "cosmos",
|
"chain_name": "cosmos",
|
||||||
"registry_name": "cosmoshub",
|
"registry_name": "cosmoshub",
|
||||||
"api": [
|
"api": [
|
||||||
"https://api-cosmoshub-ia.cosmosia.notional.ventures",
|
{"provider": "notional", "address": "https://api-cosmoshub-ia.cosmosia.notional.ventures"},
|
||||||
"https://lcd-cosmoshub.blockapsis.com:443",
|
{"provider": "blockapsis", "address": "https://lcd-cosmoshub.blockapsis.com:443"},
|
||||||
"https://lcd-cosmoshub.whispernode.com:443",
|
{"provider": "WhisperNode🤐", "address": "https://lcd-cosmoshub.whispernode.com:443"},
|
||||||
"https://api-cosmoshub.pupmos.network",
|
{"provider": "pupmos", "address": "https://api-cosmoshub.pupmos.network"},
|
||||||
"https://cosmos-rest.publicnode.com",
|
{"provider": "publicnode", "address": "https://cosmos-rest.publicnode.com"},
|
||||||
"https://cosmos-rest.staketab.org",
|
{"provider": "staketab", "address": "https://cosmos-rest.staketab.org"},
|
||||||
"https://api.cosmos.nodestake.top",
|
{"provider": "nodestake", "address": "https://api.cosmos.nodestake.top"},
|
||||||
"https://rest-cosmoshub.goldenratiostaking.net"
|
{"provider": "Golden Ratio Staking", "address": "https://rest-cosmoshub.goldenratiostaking.net"}
|
||||||
|
],
|
||||||
|
"rpc": [
|
||||||
|
{"provider": "icycro", "address": "https://cosmos-rpc.icycro.org"},
|
||||||
|
{"provider": "dragonstake", "address": "https://rpc.cosmos.dragonstake.io"},
|
||||||
|
{"provider": "Golden Ratio Staking", "address": "https://rpc-cosmoshub.goldenratiostaking.net"}
|
||||||
],
|
],
|
||||||
"rpc": ["https://rpc.cosmos.network:443", "https://cosmos-rpc.icycro.org", "https://rpc.cosmos.dragonstake.io", "https://rpc-cosmoshub.goldenratiostaking.net"],
|
|
||||||
"sdk_version": "0.45.1",
|
"sdk_version": "0.45.1",
|
||||||
"coin_type": "118",
|
"coin_type": "118",
|
||||||
"min_tx_fee": "800",
|
"min_tx_fee": "800",
|
||||||
|
@ -120,7 +120,7 @@ const calculateRank = function (position: number) {
|
|||||||
|
|
||||||
function isFeatured(endpoints: string[], who?: {website?: string, moniker: string }) {
|
function isFeatured(endpoints: string[], who?: {website?: string, moniker: string }) {
|
||||||
if(!endpoints || !who) return false
|
if(!endpoints || !who) return false
|
||||||
return endpoints.findIndex(x => who.website && who.website?.substring(0, who.website?.lastIndexOf('.')).endsWith(x) || who?.moniker?.toLowerCase().search(x) > -1) > -1
|
return endpoints.findIndex(x => who.website && who.website?.substring(0, who.website?.lastIndexOf('.')).endsWith(x) || who?.moniker?.toLowerCase().search(x.toLowerCase()) > -1) > -1
|
||||||
}
|
}
|
||||||
|
|
||||||
const list = computed(() => {
|
const list = computed(() => {
|
||||||
@ -128,6 +128,7 @@ const list = computed(() => {
|
|||||||
return staking.validators.map((x, i) => ({v: x, rank: calculateRank(i), logo: logo(x.description.identity)}));
|
return staking.validators.map((x, i) => ({v: x, rank: calculateRank(i), logo: logo(x.description.identity)}));
|
||||||
} else if (tab.value === 'featured') {
|
} else if (tab.value === 'featured') {
|
||||||
const endpoint = chainStore.current?.endpoints?.rest?.map(x => x.provider)
|
const endpoint = chainStore.current?.endpoints?.rest?.map(x => x.provider)
|
||||||
|
console.log(endpoint)
|
||||||
if(endpoint) {
|
if(endpoint) {
|
||||||
endpoint.push('ping')
|
endpoint.push('ping')
|
||||||
return staking.validators
|
return staking.validators
|
||||||
|
Loading…
Reference in New Issue
Block a user