Merge branch 'master' of https://github.com/ping-pub/explorer
This commit is contained in:
commit
7ad04e2c68
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.
|
@ -3,12 +3,13 @@
|
||||
"coingecko": "",
|
||||
"api": [
|
||||
"https://rest.8ball.info",
|
||||
"https://api-8ball.nodeist.net"
|
||||
|
||||
"https://api-8ball.nodeist.net",
|
||||
"https://api.8ball.nodestake.top"
|
||||
],
|
||||
"rpc": [
|
||||
"https://rpc.8ball.info",
|
||||
"https://rpc-8ball.nodeist.net"
|
||||
"https://rpc-8ball.nodeist.net",
|
||||
"https://rpc.8ball.nodestake.top"
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"coin_type": "118",
|
||||
|
@ -1,11 +1,15 @@
|
||||
{
|
||||
"chain_name": "aura",
|
||||
"coingecko": "aura-network",
|
||||
"api": ["https://lcd.aura.network"],
|
||||
"api": [
|
||||
"https://lcd.aura.network",
|
||||
"https://api.aura.nodestake.top"
|
||||
],
|
||||
"rpc": [
|
||||
"https://rpc.aura.network:443",
|
||||
"https://snapshot-1.aura.network:443",
|
||||
"https://snapshot-2.aura.network:443"
|
||||
"https://snapshot-2.aura.network:443",
|
||||
"https://rpc.aura.nodestake.top"
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.45.11",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "chain4energy",
|
||||
"api": ["https://lcd.c4e.io"],
|
||||
"rpc": ["https://rpc.c4e.io:443", "https://rpc.c4e.io:443"],
|
||||
"api": ["https://lcd.c4e.io","https://api.c4e.nodestake.top"],
|
||||
"rpc": ["https://rpc.c4e.io:443", "https://rpc.c4e.io:443","https://rpc.c4e.nodestake.top"],
|
||||
"sdk_version": "0.45.5",
|
||||
"coin_type": "4444",
|
||||
"min_tx_fee": "3000",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "Composable",
|
||||
"api": ["https://composable-api.polkachu.com"],
|
||||
"rpc": ["https://composable-rpc.polkachu.com"],
|
||||
"api": ["https://composable-api.polkachu.com","https://api.composable.nodestake.top"],
|
||||
"rpc": ["https://composable-rpc.polkachu.com","https://rpc.composable.nodestake.top"],
|
||||
"coingecko": "",
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.47.1",
|
||||
|
@ -2,16 +2,20 @@
|
||||
"chain_name": "cosmos",
|
||||
"registry_name": "cosmoshub",
|
||||
"api": [
|
||||
"https://api-cosmoshub-ia.cosmosia.notional.ventures",
|
||||
"https://lcd-cosmoshub.blockapsis.com:443",
|
||||
"https://lcd-cosmoshub.whispernode.com:443",
|
||||
"https://api-cosmoshub.pupmos.network",
|
||||
"https://cosmos-rest.publicnode.com",
|
||||
"https://cosmos-rest.staketab.org",
|
||||
"https://api.cosmos.nodestake.top",
|
||||
"https://rest-cosmoshub.goldenratiostaking.net"
|
||||
{"provider": "notional", "address": "https://api-cosmoshub-ia.cosmosia.notional.ventures"},
|
||||
{"provider": "blockapsis", "address": "https://lcd-cosmoshub.blockapsis.com:443"},
|
||||
{"provider": "WhisperNode🤐", "address": "https://lcd-cosmoshub.whispernode.com:443"},
|
||||
{"provider": "pupmos", "address": "https://api-cosmoshub.pupmos.network"},
|
||||
{"provider": "publicnode", "address": "https://cosmos-rest.publicnode.com"},
|
||||
{"provider": "staketab", "address": "https://cosmos-rest.staketab.org"},
|
||||
{"provider": "nodestake", "address": "https://api.cosmos.nodestake.top"},
|
||||
{"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",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
|
35
chains/mainnet/fxcore.json
Normal file
35
chains/mainnet/fxcore.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"chain_name": "fxcore",
|
||||
"api": [
|
||||
"https://fx-rest.functionx.io"
|
||||
],
|
||||
"rpc": [
|
||||
"https://fx-json.functionx.io:26657"
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "v0.46.13",
|
||||
"coin_type": "60",
|
||||
"min_tx_fee": "500000000000000000",
|
||||
"assets": [
|
||||
{
|
||||
"base": "FX",
|
||||
"symbol": "FX",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "fx-coin",
|
||||
"logo": "/logos/fxcore.svg"
|
||||
}
|
||||
],
|
||||
"addr_prefix": "fx",
|
||||
"logo": "/logos/fxcore.svg",
|
||||
"keplr_price_step": {
|
||||
"low": 4000000000000,
|
||||
"average": 4000000000000,
|
||||
"high": 4100000000000
|
||||
},
|
||||
"keplr_features": [
|
||||
"ibc-transfer",
|
||||
"ibc-go",
|
||||
"eth-address-gen",
|
||||
"eth-key-sign"
|
||||
]
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "gitopia",
|
||||
"coingecko": "",
|
||||
"api": ["https://gitopia-api.polkachu.com"],
|
||||
"rpc": ["https://gitopia-rpc.polkachu.com"],
|
||||
"api": ["https://gitopia-api.polkachu.com","https://api.gitopia.nodestake.top"],
|
||||
"rpc": ["https://gitopia-rpc.polkachu.com","https://rpc.gitopia.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.12",
|
||||
"coin_type": "118",
|
||||
@ -16,4 +16,4 @@
|
||||
"coingecko_id": "",
|
||||
"logo": "/logos/gitopia.png"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "haqq",
|
||||
"coingecko": "",
|
||||
"api": ["https://rest.cosmos.haqq.network/", "https://m-s1-sdk.haqq.sh"],
|
||||
"rpc": ["https://rpc.tm.haqq.network/", "https://m-s1-tm.haqq.sh"],
|
||||
"api": ["https://rest.cosmos.haqq.network/", "https://m-s1-sdk.haqq.sh","https://api.haqq.nodestake.top"],
|
||||
"rpc": ["https://rpc.tm.haqq.network/", "https://m-s1-tm.haqq.sh","https://rpc.haqq.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.10",
|
||||
"coin_type": "60",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "humans",
|
||||
"api":["https://api.humans-mainnet.stake-take.com"],
|
||||
"rpc":["https://rpc.humans-mainnet.stake-take.com"],
|
||||
"api":["https://api.humans-mainnet.stake-take.com","https://api.humans.nodestake.top"],
|
||||
"rpc":["https://rpc.humans-mainnet.stake-take.com","https://rpc.humans.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.3",
|
||||
"coin_type": 60,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "kyve",
|
||||
"api": ["https://api-explorer.kyve.network:443"],
|
||||
"rpc": ["https://rpc-eu-1.kyve.network:443","https://rpc-us-1.kyve.network:443"],
|
||||
"api": ["https://api-explorer.kyve.network:443","https://api.kyve.nodestake.top"],
|
||||
"rpc": ["https://rpc-eu-1.kyve.network:443","https://rpc-us-1.kyve.network:443","https://rpc.kyve.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.10",
|
||||
"coin_type": "118",
|
||||
@ -15,4 +15,4 @@
|
||||
}],
|
||||
"addr_prefix": "kyve",
|
||||
"logo": "/logos/kyve.svg"
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,13 @@
|
||||
"coingecko": "white-whale",
|
||||
"api": [
|
||||
"https://migaloo-api.polkachu.com",
|
||||
"https://api.migaloo.silknodes.io"
|
||||
"https://api.migaloo.silknodes.io",
|
||||
"https://api.whitewhale.nodestake.top"
|
||||
],
|
||||
"rpc": [
|
||||
"https://migaloo-rpc.polkachu.com/:443",
|
||||
"https://rpc.migaloo.silknodes.io"
|
||||
"https://rpc.migaloo.silknodes.io",
|
||||
"https://rpc.whitewhale.nodestake.top"
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"coin_type": 118,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "neutron",
|
||||
"api": ["https://neutron-api.polkachu.com/"],
|
||||
"rpc": ["https://neutron-rpc.polkachu.com/"],
|
||||
"api": ["https://neutron-api.polkachu.com/","https://api.neutron.nodestake.top"],
|
||||
"rpc": ["https://neutron-rpc.polkachu.com/","https://rpc.neutron.nodestake.top"],
|
||||
"provider_chain": {
|
||||
"api": ["https://api-cosmoshub-ia.cosmosia.notional.ventures"]
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "nois",
|
||||
"api": ["https://nois-api.polkachu.com"],
|
||||
"rpc": ["https://nois-rpc.polkachu.com"],
|
||||
"api": ["https://nois-api.polkachu.com","https://api.nois.nodestake.top"],
|
||||
"rpc": ["https://nois-rpc.polkachu.com","https://rpc.nois.nodestake.top"],
|
||||
"sdk_version": "0.45.14",
|
||||
"addr_prefix": "nois",
|
||||
"min_tx_fee": "5000",
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "Quasar",
|
||||
"coingecko": "",
|
||||
"api": ["https://quasar-api.polkachu.com"],
|
||||
"rpc": ["https://quasar-rpc.polkachu.com"],
|
||||
"api": ["https://quasar-api.polkachu.com","https://api.quasar.nodestake.top"],
|
||||
"rpc": ["https://quasar-rpc.polkachu.com","https://rpc.quasar.nodestake.top"],
|
||||
"sdk_version": "0.45.14",
|
||||
"coin_type": 118,
|
||||
"min_tx_fee": "8000",
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "tenet",
|
||||
"coingecko": "tenet",
|
||||
"api": ["https://app.rpc.tenet.org","https://tenet-api.lavenderfive.com"],
|
||||
"rpc": ["https://tendermint-1.rpc.tenet.org:443","https://tendermint-2.rpc.tenet.org:443","https://tenet-rpc.lavenderfive.com"],
|
||||
"api": ["https://app.rpc.tenet.org","https://tenet-api.lavenderfive.com","https://api.tenet.nodestake.top"],
|
||||
"rpc": ["https://tendermint-1.rpc.tenet.org:443","https://tendermint-2.rpc.tenet.org:443","https://tenet-rpc.lavenderfive.com","https://rpc.tenet.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.9-ledger",
|
||||
"coin_type": "60",
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "terp",
|
||||
"coingecko": "",
|
||||
"api": ["https://lcd.terpnetwork.hexnodes.co"],
|
||||
"rpc": ["https://rpc.terpnetwork.hexnodes.co"],
|
||||
"api": ["https://lcd.terpnetwork.hexnodes.co","https://api.terp.nodestake.top"],
|
||||
"rpc": ["https://rpc.terpnetwork.hexnodes.co","https://rpc.terp.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.47.1",
|
||||
"coin_type": "118",
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"chain_id":"uptick_117-1",
|
||||
"chain_name": "uptick-network-mainnet",
|
||||
"api": "https://rest.uptick.network",
|
||||
"chain_name": "uptick",
|
||||
"api": ["https://rest.uptick.network", "https://api.uptick.nodestake.top" ],
|
||||
"rpc": ["https://rpc.uptick.nodestake.top"],
|
||||
"sdk_version": "v0.46.0",
|
||||
"coin_type": "60",
|
||||
"min_tx_fee": "40000",
|
||||
@ -16,4 +17,4 @@
|
||||
"logo": "https://file.uptick.network/file/image/dNOLswid7dGe29CFhPp3Ow.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"chain_name": "whitewhale",
|
||||
"api": ["https://whitewhale-api.polkachu.com:443"],
|
||||
"rpc": ["https://whitewhale-rpc.polkachu.com:443"],
|
||||
"api": ["https://whitewhale-api.polkachu.com:443","https://api.whitewhale.nodestake.top"],
|
||||
"rpc": ["https://whitewhale-rpc.polkachu.com:443","https://rpc.whitewhale.nodestake.top"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.9",
|
||||
"coin_type": "118",
|
||||
|
35
chains/testnet/fxcore.json
Normal file
35
chains/testnet/fxcore.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"chain_name": "fxcore",
|
||||
"api": [
|
||||
"https://testnet-fx-rest.functionx.io:1317"
|
||||
],
|
||||
"rpc": [
|
||||
"https://testnet-fx-json.functionx.io:26657"
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "v0.46.13",
|
||||
"coin_type": "60",
|
||||
"min_tx_fee": "500000000000000000",
|
||||
"assets": [
|
||||
{
|
||||
"base": "FX",
|
||||
"symbol": "FX",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "fx-coin",
|
||||
"logo": "/logos/fxcore.svg"
|
||||
}
|
||||
],
|
||||
"addr_prefix": "fx",
|
||||
"logo": "/logos/fxcore.svg",
|
||||
"keplr_price_step": {
|
||||
"low": 4000000000000,
|
||||
"average": 4000000000000,
|
||||
"high": 4100000000000
|
||||
},
|
||||
"keplr_features": [
|
||||
"ibc-transfer",
|
||||
"ibc-go",
|
||||
"eth-address-gen",
|
||||
"eth-key-sign"
|
||||
]
|
||||
}
|
17
public/logos/fxcore.svg
Normal file
17
public/logos/fxcore.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<rect id="logolbf-a" width="32" height="32" x="0" y="0"/>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<mask id="logolbf-b" fill="#fff">
|
||||
<use xlink:href="#logolbf-a"/>
|
||||
</mask>
|
||||
<use fill="#181818" xlink:href="#logolbf-a"/>
|
||||
<g mask="url(#logolbf-b)">
|
||||
<g transform="translate(6 8.75)">
|
||||
<path fill="#FFF" fill-rule="nonzero" d="M2.25556529,6.08641543 L0,6.08641543 L0,4.73567047 L2.25556529,4.73567047 C2.25556529,4.69868537 2.25556529,4.66801051 2.25556529,4.63733567 C2.26134969,4.24312008 2.25153375,3.8485539 2.2762489,3.45503943 C2.3237511,2.69938651 2.51709027,1.98737949 2.971078,1.36617003 C3.44645049,0.715687992 4.10166522,0.343558282 4.87291849,0.157756354 C5.50131463,0.00666082384 6.13829975,-0.0087642419 6.77931639,0.0457493427 C7.44299733,0.103466848 8.09535159,0.253678837 8.71744084,0.492024539 C8.7524978,0.505346188 8.78755478,0.520245398 8.830149,0.537598598 L8.44872918,1.7572305 C8.35828222,1.72217353 8.27344435,1.68711656 8.18702892,1.65521472 C7.36459247,1.34899211 6.515688,1.26958808 5.65328659,1.40385627 C4.67169149,1.55617879 4.07905347,2.17510955 3.91796669,3.15933392 C3.85977214,3.51638914 3.86450482,3.87484663 3.86432953,4.23400525 C3.86432953,4.39684488 3.86432953,4.55985976 3.86432953,4.73146363 L7.85977214,4.73146363 L7.85977214,6.07817704 L3.87099035,6.07817704 L3.87099035,14.4217353 L2.25556529,14.4217353 L2.25556529,6.08641543 Z"/>
|
||||
<path fill="#F7D509" fill-rule="nonzero" d="M15.1740578,10.280631 C15.1707635,10.2750362 15.1679488,10.2691724 15.1656442,10.2631025 C15.1679854,10.2570484 15.1707985,10.2511875 15.1740578,10.2455741 C15.5666959,9.53724802 15.9744084,8.79246275 16.3659947,8.08308502 C16.5167397,7.80946537 16.6797546,7.53041192 16.8392638,7.2394391 L15.3142857,7.2394391 C15.3142857,7.2394391 14.6397897,8.74688869 14.3326906,9.41928133 L14.2976336,9.41928133 C13.9584575,8.74250657 13.2283961,7.2394391 13.2283961,7.2394391 L11.6236635,7.23067484 C11.6460999,7.27309378 12.7884312,9.31779141 13.3160386,10.2455741 C13.3197195,10.2520596 13.3228747,10.257844 13.3256792,10.2631025 L13.3160386,10.280631 C12.7884312,11.195092 11.6285714,13.2802805 11.606135,13.3219983 L13.2283961,13.3134093 C13.2283961,13.3134093 13.9584575,11.8317265 14.2976336,11.1656442 L14.3326906,11.1656442 C14.6397897,11.8282209 15.3142857,13.3142857 15.3142857,13.3142857 L16.8567923,13.3142857 C16.6965819,13.026468 15.5666959,10.9787905 15.1740578,10.280631 Z M11.0499562,13.7964943 C10.7842244,14.0113935 10.5053462,14.2359334 10.2485539,14.4438212 C7.99929886,12.3982472 7.74916739,8.46836108 10.2396144,6.09009641 C10.4995618,6.29886065 10.7766871,6.52620508 11.0429448,6.74127959 C10.9728308,6.82173531 10.9063979,6.89780894 10.8408414,6.97475898 C10.2974584,7.61297108 9.92094653,8.31673971 9.76213847,9.14478527 C9.66205082,9.66678353 9.64364592,10.192638 9.68045575,10.7223488 C9.72199825,11.3183173 9.85924627,11.8900964 10.1149869,12.4317265 C10.337745,12.8976324 10.6270708,13.3286689 10.9738826,13.7113059 C10.9964943,13.7353199 11.0173532,13.7598598 11.0499562,13.7964943 Z M17.4057844,13.7964943 C17.6713409,14.0113935 17.9502191,14.2359334 18.2070114,14.4438212 C20.4562665,12.3982472 20.7065731,8.46836108 18.2161262,6.09009641 C17.9568799,6.29886065 17.6788782,6.52620508 17.4120946,6.74127959 C17.4822086,6.82173531 17.5484663,6.89780894 17.6141981,6.97475898 C18.1575811,7.61297108 18.5340929,8.31673971 18.6927257,9.14478527 C18.7928133,9.66678353 18.8112182,10.192638 18.7744084,10.7223488 C18.7328659,11.3183173 18.5957932,11.8900964 18.3400526,12.4317265 C18.1172232,12.8975917 17.8279039,13.3286183 17.4811569,13.7113059 C17.4583698,13.7353199 17.437511,13.7598598 17.4057844,13.7964943 Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.8 KiB |
@ -37,7 +37,7 @@ function gotoPage(pageNum: number) {
|
||||
|
||||
</script>
|
||||
<template>
|
||||
<div class="my-5">
|
||||
<div class="my-5 text-center">
|
||||
<div v-if="total && limit" class="btn-group">
|
||||
<button v-for="{ page, color } in pages" :key="page"
|
||||
class="btn bg-gray-100 text-gray-500 hover:text-white border-none dark:bg-gray-800 dark:text-white" :class="{
|
||||
|
@ -62,6 +62,7 @@ const proposalInfo = ref();
|
||||
{{ item?.content?.title }}
|
||||
</RouterLink>
|
||||
<div
|
||||
v-if="item.content"
|
||||
class="bg-[#f6f2ff] text-[#9c6cff] dark:bg-gray-600 dark:text-gray-300 inline-block rounded-full px-2 py-[1px] text-xs mb-1"
|
||||
>
|
||||
{{ showType(item.content['@type']) }}
|
||||
@ -157,6 +158,7 @@ const proposalInfo = ref();
|
||||
<div class="grid grid-cols-4 mt-2 mb-2">
|
||||
<div class="col-span-2">
|
||||
<div
|
||||
v-if="item.content"
|
||||
class="bg-[#f6f2ff] text-[#9c6cff] dark:bg-gray-600 dark:text-gray-300 inline-block rounded-full px-2 py-[1px] text-xs mb-1"
|
||||
>
|
||||
{{ showType(item.content['@type']) }}
|
||||
|
@ -6,11 +6,12 @@ import {
|
||||
type RequestRegistry,
|
||||
type AbstractRegistry,
|
||||
findApiProfileByChain,
|
||||
findApiProfileBySDKVersion,
|
||||
registryChainProfile,
|
||||
registryVersionProfile,
|
||||
withCustomRequest,
|
||||
} from './registry';
|
||||
import { PageRequest,type Coin } from '@/types';
|
||||
import { CUSTOM } from './custom_api/evmos'
|
||||
|
||||
export class BaseRestClient<R extends AbstractRegistry> {
|
||||
endpoint: string;
|
||||
@ -28,15 +29,37 @@ export class BaseRestClient<R extends AbstractRegistry> {
|
||||
}
|
||||
}
|
||||
|
||||
// dynamic all custom request implementations
|
||||
function registeCustomRequest() {
|
||||
const extensions: Record<string, any> = import.meta.glob('./clients/*.ts', { eager: true });
|
||||
Object.values(extensions).forEach(m => {
|
||||
if(m.store === 'version') {
|
||||
registryVersionProfile(m.name, withCustomRequest(DEFAULT, m.requests))
|
||||
} else {
|
||||
registryChainProfile(m.name, withCustomRequest(DEFAULT, m.requests));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
registeCustomRequest()
|
||||
|
||||
export class CosmosRestClient extends BaseRestClient<RequestRegistry> {
|
||||
static newDefault(endpoint: string) {
|
||||
return new CosmosRestClient(endpoint, DEFAULT)
|
||||
}
|
||||
|
||||
static newStrategy(endpoint: string, chain: any) {
|
||||
registryChainProfile('evmos', withCustomRequest(DEFAULT, CUSTOM))
|
||||
const re = findApiProfileByChain(chain.chainName)
|
||||
return new CosmosRestClient(endpoint, re || DEFAULT)
|
||||
|
||||
let req
|
||||
if(chain) {
|
||||
// find by name first
|
||||
req = findApiProfileByChain(chain.chainName)
|
||||
// if not found. try sdk version
|
||||
if(!req && chain.versions?.cosmosSdk) {
|
||||
req = findApiProfileBySDKVersion(chain.versions?.cosmosSdk)
|
||||
}
|
||||
}
|
||||
return new CosmosRestClient(endpoint, req || DEFAULT)
|
||||
}
|
||||
|
||||
// Auth Module
|
||||
|
@ -1,5 +1,9 @@
|
||||
import type{ RequestRegistry } from '@/libs/registry'
|
||||
import { DEFAULT } from '@/libs'
|
||||
export const CUSTOM: Partial<RequestRegistry> = {
|
||||
|
||||
// which registry is store
|
||||
export const store = 'name' // name or version
|
||||
// Blockchain Name
|
||||
export const name = 'evmos'
|
||||
export const requests: Partial<RequestRegistry> = {
|
||||
mint_inflation: { url: '/evmos/inflation/v1/inflation_rate', adapter: (data: any) => ({inflation: (Number(data.inflation_rate || 0)/ 100 ).toFixed(2)}) },
|
||||
}
|
67
src/libs/clients/v0.46.0.ts
Normal file
67
src/libs/clients/v0.46.0.ts
Normal file
@ -0,0 +1,67 @@
|
||||
import type { RequestRegistry } from '@/libs/registry'
|
||||
import { adapter } from '@/libs/registry'
|
||||
import type {
|
||||
GovParams,
|
||||
GovProposal,
|
||||
GovVote,
|
||||
PaginatedProposalDeposit,
|
||||
PaginatedProposalVotes,
|
||||
PaginatedProposals,
|
||||
Tally,
|
||||
} from '@/types/';
|
||||
|
||||
// which registry is store
|
||||
export const store = 'version' // name or version
|
||||
// Blockchain Name
|
||||
export const name = 'v0.46.7'
|
||||
|
||||
function proposalAdapter(p: any): GovProposal {
|
||||
if(p) {
|
||||
if(p.messages) p.content = p.messages[0].content
|
||||
p.proposal_id = p.id
|
||||
p.final_tally_result = {
|
||||
yes: p.final_tally_result?.yes_count,
|
||||
no: p.final_tally_result?.no_count,
|
||||
no_with_veto: p.final_tally_result?.no_with_veto_count,
|
||||
abstain: p.final_tally_result?.abstain_count,
|
||||
}
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
export const requests: Partial<RequestRegistry> = {
|
||||
gov_params_voting: { url: '/cosmos/gov/v1/params/voting', adapter },
|
||||
gov_params_tally: { url: '/cosmos/gov/v1/params/tallying', adapter },
|
||||
gov_params_deposit: { url: '/cosmos/gov/v1/params/deposit', adapter },
|
||||
gov_proposals: { url: '/cosmos/gov/v1/proposals', adapter: (source: any): PaginatedProposals => {
|
||||
const proposals = source.proposals.map((p:any) => proposalAdapter(p))
|
||||
return {
|
||||
proposals,
|
||||
pagination: source.pagination
|
||||
}
|
||||
}},
|
||||
gov_proposals_proposal_id: {
|
||||
url: '/cosmos/gov/v1/proposals/{proposal_id}',
|
||||
adapter: (source: any): {proposal: GovProposal} => {
|
||||
return {
|
||||
proposal: proposalAdapter(source.proposal)
|
||||
}
|
||||
},
|
||||
},
|
||||
gov_proposals_deposits: {
|
||||
url: '/cosmos/gov/v1/proposals/{proposal_id}/deposits',
|
||||
adapter,
|
||||
},
|
||||
gov_proposals_tally: {
|
||||
url: '/cosmos/gov/v1/proposals/{proposal_id}/tally',
|
||||
adapter,
|
||||
},
|
||||
gov_proposals_votes: {
|
||||
url: '/cosmos/gov/v1/proposals/{proposal_id}/votes',
|
||||
adapter,
|
||||
},
|
||||
gov_proposals_votes_voter: {
|
||||
url: '/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}',
|
||||
adapter,
|
||||
},
|
||||
}
|
@ -185,28 +185,26 @@ export function findApiProfileByChain(
|
||||
// if (!url) {
|
||||
// throw new Error(`Unsupported version or name: ${name}`);
|
||||
// }
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
export function findApiProfileBySDKVersion(
|
||||
version: string,
|
||||
): RequestRegistry {
|
||||
): RequestRegistry | undefined {
|
||||
let closestVersion: string | null = null;
|
||||
|
||||
for (const key in VERSION_REGISTRY) {
|
||||
if (semver.satisfies(key, version)) {
|
||||
for (const k in VERSION_REGISTRY) {
|
||||
const key = k.replace('v', "")
|
||||
// console.log(semver.gt(key, version), semver.gte(version, key), key, version)
|
||||
if (semver.lte(key, version)) {
|
||||
if (!closestVersion || semver.gt(key, closestVersion)) {
|
||||
closestVersion = key;
|
||||
closestVersion = k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(`Closest version to ${version}: ${closestVersion}`, VERSION_REGISTRY);
|
||||
if (!closestVersion) {
|
||||
throw new Error(`Unsupported version: ${version}`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
console.log(`Closest version to ${version}: ${closestVersion}`);
|
||||
|
||||
return VERSION_REGISTRY[closestVersion];
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
import {
|
||||
useBaseStore,
|
||||
useBlockchain,
|
||||
useDistributionStore,
|
||||
useFormatter,
|
||||
useMintStore,
|
||||
useStakingStore,
|
||||
@ -120,7 +119,7 @@ const calculateRank = function (position: number) {
|
||||
|
||||
function isFeatured(endpoints: string[], who?: {website?: string, moniker: string }) {
|
||||
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(() => {
|
||||
@ -307,7 +306,7 @@ loadAvatars();
|
||||
<td>
|
||||
<div
|
||||
class="flex items-center overflow-hidden"
|
||||
style="max-width: 400px"
|
||||
style="max-width: 300px"
|
||||
>
|
||||
<div
|
||||
class="avatar mr-4 relative w-8 h-8 rounded-full overflow-hidden"
|
||||
@ -331,7 +330,7 @@ loadAvatars();
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<h6 class="text-sm text-primary dark:invert">
|
||||
<span class="text-sm text-primary dark:invert whitespace-nowrap overflow-hidden">
|
||||
<RouterLink
|
||||
:to="{
|
||||
name: 'chain-staking-validator',
|
||||
@ -340,11 +339,11 @@ loadAvatars();
|
||||
v.operator_address,
|
||||
},
|
||||
}"
|
||||
class="font-weight-medium user-list-name"
|
||||
class="font-weight-medium"
|
||||
>
|
||||
{{ v.description?.moniker }}
|
||||
</RouterLink>
|
||||
</h6>
|
||||
</span>
|
||||
<span class="text-xs">{{
|
||||
v.description?.website ||
|
||||
v.description?.identity ||
|
||||
@ -357,7 +356,7 @@ loadAvatars();
|
||||
<!-- 👉 Voting Power -->
|
||||
<td class="text-right">
|
||||
<div class="flex flex-col">
|
||||
<h6 class="text-sm font-weight-medium">
|
||||
<h6 class="text-sm font-weight-medium whitespace-nowrap ">
|
||||
{{
|
||||
format.formatToken(
|
||||
{
|
||||
|
@ -179,7 +179,9 @@ function color(v: string) {
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<label for="add-validator" class="btn btn-primary mt-5">Add Validators</label>
|
||||
<div class="text-center">
|
||||
<label for="add-validator" class="btn btn-primary mt-5">Add Validators</label>
|
||||
</div>
|
||||
|
||||
<!-- Put this part before </body> tag -->
|
||||
<input type="checkbox" id="add-validator" class="modal-toggle" @change="initial" />
|
||||
@ -212,7 +214,7 @@ function color(v: string) {
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-action">
|
||||
<label for="add-validator" class="btn" @click="add">add</label>
|
||||
<label class="btn btn-primary" @click="add">add</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -228,7 +228,7 @@ async function loadBalances(endpoint: string, address: string) {
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div class="overflow-x-auto w-full rounded-lg">
|
||||
<div class="overflow-x-auto w-full rounded-md">
|
||||
<div class="flex flex-wrap justify-between bg-base-100 p-5">
|
||||
<div class="min-w-0">
|
||||
<h2 class="text-2xl font-bold leading-7 sm:!truncate sm:!text-3xl sm:!tracking-tight">
|
||||
@ -258,9 +258,9 @@ async function loadBalances(endpoint: string, address: string) {
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<div v-for="{ key, subaccounts } in accounts" class="bg-base-100 rounded-xl my-5 py-5 px-2">
|
||||
<div v-for="{ key, subaccounts } in accounts" class="bg-base-100 rounded-md my-5 py-5">
|
||||
<div class="flex justify-self-center">
|
||||
<div class="mr-2 p-2">
|
||||
<div class="mx-2 p-2">
|
||||
<svg :fill="chainStore.current?.themeColor || '#666CFF'" height="28px" width="28px" version="1.1" id="Capa_1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 487.5 487.5"
|
||||
xml:space="preserve">
|
||||
@ -340,7 +340,7 @@ async function loadBalances(endpoint: string, address: string) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" text-center bg-base-100 rounded-xl my-4 p-4">
|
||||
<div class=" text-center bg-base-100 rounded-md my-4 p-4">
|
||||
<a href="#address-modal"
|
||||
class="inline-flex items-center ml-3 rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50">
|
||||
<svg class="-ml-0.5 mr-1.5 h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
|
@ -213,7 +213,7 @@ const currencySign = computed(() => {
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<div class="overflow-x-auto w-full rounded-lg">
|
||||
<div class="overflow-x-auto w-full rounded-md">
|
||||
<div class="flex flex-wrap justify-between bg-base-100 p-5">
|
||||
<div class="min-w-0">
|
||||
<h2 class="text-2xl font-bold leading-7 sm:!truncate sm:!text-3xl sm:!tracking-tight">
|
||||
|
@ -149,6 +149,9 @@ export function fromLocal(lc: LocalConfig): ChainConfig {
|
||||
{ denom: x.symbol.toLowerCase(), exponent: Number(x.exponent) },
|
||||
],
|
||||
}));
|
||||
conf.versions = {
|
||||
cosmosSdk: lc.sdk_version
|
||||
}
|
||||
conf.bech32Prefix = lc.addr_prefix;
|
||||
conf.chainName = lc.chain_name;
|
||||
conf.coinType = lc.coin_type;
|
||||
|
@ -350,7 +350,7 @@ export const useFormatter = defineStore('formatter', {
|
||||
}
|
||||
},
|
||||
multiLine(v: string) {
|
||||
return v ? v.replaceAll('\\n', '\n') : '';
|
||||
return v ? v.replace(/\\n|\\r/g, '\n') : '';
|
||||
},
|
||||
hexToString(hex: string) {
|
||||
if (hex) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
"extends": "@vue/tsconfig/tsconfig.json",
|
||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||
"compilerOptions": {
|
||||
"ignoreDeprecations": "5.0",
|
||||
// "ignoreDeprecations": "5.0",
|
||||
"lib": [
|
||||
"es2022",
|
||||
"dom"
|
||||
|
Loading…
Reference in New Issue
Block a user