From b66cdfa243eaf980f20b0ad47250497b9b19563e Mon Sep 17 00:00:00 2001 From: ruslanglaznyov Date: Fri, 12 Jul 2024 13:00:40 +0300 Subject: [PATCH] feat: lava exp --- chains/README.md | 104 ------------------------ chains/mainnet/axelar.json | 74 ----------------- chains/mainnet/cosmos.json | 31 ------- chains/mainnet/lava.json | 26 ++++++ chains/mainnet/neutron.json | 30 ------- chains/mainnet/nolus.json | 27 ------ chains/mainnet/osmosis.json | 32 -------- chains/testnet/crossfi.json | 11 --- src/layouts/components/NavbarSearch.vue | 2 +- 9 files changed, 27 insertions(+), 310 deletions(-) delete mode 100644 chains/README.md delete mode 100644 chains/mainnet/axelar.json delete mode 100644 chains/mainnet/cosmos.json create mode 100644 chains/mainnet/lava.json delete mode 100644 chains/mainnet/neutron.json delete mode 100644 chains/mainnet/nolus.json delete mode 100644 chains/mainnet/osmosis.json delete mode 100644 chains/testnet/crossfi.json diff --git a/chains/README.md b/chains/README.md deleted file mode 100644 index dbb910de04..0000000000 --- a/chains/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Directory Layout - -** if you want to list your blockchain on ping.pub, please submit your configuration on https://github.com/ping-pub/ping.pub.git ** - -- 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, these configs will be enabled when you visit the domain that starts with `testnet.*`, for example `https://testnet.ping.pub` - -# 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 registry -- **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. - -# Token Unit conversion - -We have two methods to load token metadata for token unit conversion: - -## Loading from a REST endpoint (recommended). - -you can define the metadata in the `bank` -> `metadata` section of the blockchain's genesis file. if you don't define, the `[]` will return. - -```json -{ - "name": "atom", - "description": "The native staking token of the Cosmos Hub.", - "denom_units": [ - { - "denom": "uatom", - "exponent": 0, - "aliases": [ - "microatom" - ], - }, - { - "denom": "matom", - "exponent": 3, - "aliases": [ - "milliatom" - ] - }, - { - "denom": "atom", - "exponent": 6, - } - ], - "base": "uatom", - "display": "atom", -} -``` -you can see more details here: -https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-024-coin-metadata.md - -## Loading from Cosmos Registry: - -https://github.com/cosmos/chain-registry - -# 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. diff --git a/chains/mainnet/axelar.json b/chains/mainnet/axelar.json deleted file mode 100644 index 28bd6d986b..0000000000 --- a/chains/mainnet/axelar.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "chain_name": "axelar", - "api": [ - "https://rest.axelar.lava.build/lava-referer-97409c72-1a82-4861-8651-119c15151cbe" - ], - "rpc": [ - "https://tm.axelar.lava.build/lava-referer-97409c72-1a82-4861-8651-119c15151cbe" - ], - "snapshot_provider": "", - "sdk_version": "0.45.6", - "coin_type": "118", - "min_tx_fee": "800", - "addr_prefix": "axelar", - "logo": "/logos/axelar.svg", - "theme_color": "#161723", - "assets": [ - { - "base": "uaxl", - "symbol": "AXL", - "exponent": "6", - "coingecko_id": "axelar", - "logo": "/logos/axelar.svg" - }, - { - "base": "uusdc", - "symbol": "axlUSDC", - "exponent": "6", - "coingecko_id": "usd-coin", - "logo": "/logos/usdc.svg" - }, - { - "base": "uusdt", - "symbol": "axlUSDT", - "exponent": "6", - "coingecko_id": "tether", - "logo": "/logos/usdt.svg" - }, - { - "base": "dai-wei", - "symbol": "axlDAI", - "exponent": "18", - "coingecko_id": "dai", - "logo": "/logos/dai.svg" - }, - { - "base": "weth-wei", - "symbol": "axlWETH", - "exponent": "18", - "coingecko_id": "ethereum", - "logo": "/logos/weth.svg" - }, - { - "base": "wmatic-wei", - "symbol": "axlWMATIC", - "exponent": "18", - "coingecko_id": "matic-network", - "logo": "/logos/wmatic.svg" - }, - { - "base": "wavax-wei", - "symbol": "axlWAVAX", - "exponent": "18", - "coingecko_id": "avalanche-2", - "logo": "/logos/wavax.svg" - }, - { - "base": "dot-planck", - "symbol": "axlDOT", - "exponent": "10", - "coingecko_id": "polkadot", - "logo": "/logos/dot.svg" - } - ] -} diff --git a/chains/mainnet/cosmos.json b/chains/mainnet/cosmos.json deleted file mode 100644 index 2bd610640d..0000000000 --- a/chains/mainnet/cosmos.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "chain_name": "cosmos", - "registry_name": "cosmoshub", - "api": [ - {"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"} - ], - "sdk_version": "0.45.1", - "coin_type": "118", - "min_tx_fee": "800", - "addr_prefix": "cosmos", - "logo": "/logos/cosmos.svg", - "assets": [{ - "base": "uatom", - "symbol": "ATOM", - "exponent": "6", - "coingecko_id": "cosmos", - "logo": "/logos/cosmos.svg" - }] -} diff --git a/chains/mainnet/lava.json b/chains/mainnet/lava.json new file mode 100644 index 0000000000..aea2e4a593 --- /dev/null +++ b/chains/mainnet/lava.json @@ -0,0 +1,26 @@ +{ + "chain_name": "lava", + "api": [ + { + "address": "https://lava-mainnet-rest.mellifera.network", + "provider": "MELLIFERA" + } + ], + "rpc": [ + { + "address": "https://lava-mainnet-rpc.mellifera.network", + "provider": "MELLIFERA" + } + ], + "sdk_version": "0.37.4", + "coin_type": "118", + "min_tx_fee": "800", + "assets": [{ + "base": "ulava", + "symbol": "lava", + "exponent": "6" + }], + "addr_prefix": "lava@", + "theme_color": "#ce4747", + "logo": "https://services.mellifera.network/_next/image?url=/lava.png&w=64&q=75" +} diff --git a/chains/mainnet/neutron.json b/chains/mainnet/neutron.json deleted file mode 100644 index 864e67f10b..0000000000 --- a/chains/mainnet/neutron.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "chain_name": "neutron", - "api": [ - {"provider": "Polkachu", "address": "https://neutron-api.polkachu.com"}, - {"provider": "NodeStake", "address": "https://api.neutron.nodestake.top"}, - {"provider": "Allnodes", "address": "https://neutron-rest.publicnode.com"} - ], - "rpc": [ - {"provider": "Polkachu", "address": "https://neutron-rpc.polkachu.com"}, - {"provider": "NodeStake", "address": "https://rpc.neutron.nodestake.top"}, - {"provider": "Allnodes", "address": "https://neutron-rpc.publicnode.com:443"} - ], - "provider_chain": { - "api": ["https://api-cosmoshub-ia.cosmosia.notional.ventures"] - }, - "features": ["dashboard", "blocks", "ibc", "cosmwasm", "uptime", "parameters", "state-sync", "consensus", "supply", "widget"], - "sdk_version": "0.45.1", - "coin_type": "118", - "min_tx_fee": "8000", - "assets": [{ - "base": "untrn", - "symbol": "NTRN", - "exponent": "6", - "coingecko_id": "neutron", - "logo": "/logos/neutron.svg" - }], - "addr_prefix": "neutron", - "theme_color": "#161723", - "logo": "/logos/neutron.svg" -} diff --git a/chains/mainnet/nolus.json b/chains/mainnet/nolus.json deleted file mode 100644 index 81bdd48470..0000000000 --- a/chains/mainnet/nolus.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "chain_name": "nolus", - "coingecko": "nolus", - "api": [ - {"provider": "Nolus", "address": "https://pirin-cl.nolus.network:1317"}, - {"provider": "LavenderFive", "address": "https://nolus-api.lavenderfive.com:443"}, - {"provider": "Allnodes", "address": "https://nolus-rest.publicnode.com"} - ], - "rpc": [ - {"provider": "Nolus", "address": "https://pirin-cl.nolus.network:26657"}, - {"provider": "LavenderFive", "address": "https://nolus-rpc.lavenderfive.com:443"}, - {"provider": "Allnodes", "address": "https://nolus-rpc.publicnode.com:443"} - ], - "snapshot_provider": "", - "sdk_version": "v0.47.6", - "coin_type": "118", - "min_tx_fee": "0", - "addr_prefix": "nolus", - "logo": "/logos/nolus.svg", - "assets": [{ - "base": "unls", - "symbol": "NLS", - "exponent": "6", - "coingecko_id": "nolus", - "logo": "/logos/nolus.svg" - }] -} diff --git a/chains/mainnet/osmosis.json b/chains/mainnet/osmosis.json deleted file mode 100644 index 35669f39a9..0000000000 --- a/chains/mainnet/osmosis.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "chain_name": "osmosis", - "coingecko": "osmosis", - "api": ["https://lcd.osmosis.zone","https://api-osmosis-ia.cosmosia.notional.ventures", "https://osmosis-api.polkachu.com", "https://lcd-osmosis.blockapsis.com"], - "rpc": ["https://rpc.osmosis.zone", "https://rpc-osmosis-ia.cosmosia.notional.ventures:443", "https://osmosis-rpc.polkachu.com:443", "https://osmosis.validator.network:443", "https://rpc-osmosis.blockapsis.com:443"], - "snapshot_provider": "", - "sdk_version": "0.46.1", - "coin_type": "118", - "min_tx_fee": "800", - "addr_prefix": "osmo", - "logo": "/logos/osmosis.jpg", - "theme_color": "#812cd6", - "assets": [{ - "base": "uosmo", - "symbol": "OSMO", - "exponent": "6", - "coingecko_id": "osmosis", - "logo": "/logos/osmosis.jpg" - },{ - "base": "uion", - "symbol": "ION", - "exponent": "6", - "coingecko_id": "ion", - "logo": "/logos/osmosis.jpg" - },{ - "base": "usomm", - "symbol": "SOMM", - "exponent": "6", - "coingecko_id": "somm", - "logo": "" - }] -} diff --git a/chains/testnet/crossfi.json b/chains/testnet/crossfi.json deleted file mode 100644 index 5414f3f202..0000000000 --- a/chains/testnet/crossfi.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "chain_name": "crossfi-testnet-1", - "api": ["https://crossfi-testnet-api.forpeaky.xyz"], - "rpc": ["https://crossfi-testnet-rpc.forpeaky.xyz"], - "coingecko": "", - "snapshot_provider": "", - "sdk_version": "0.47.1", - "coin_type": "118", - "min_tx_fee": "500", - "addr_prefix": "crossfi" - } \ No newline at end of file diff --git a/src/layouts/components/NavbarSearch.vue b/src/layouts/components/NavbarSearch.vue index d4202878db..e0c9d2b9de 100644 --- a/src/layouts/components/NavbarSearch.vue +++ b/src/layouts/components/NavbarSearch.vue @@ -48,7 +48,7 @@ function confirm() { closeSearchModal(); }, 1000); // this.$router.push({ name: 'transaction', params: { chain: c.chain_name, hash: key } }) - } else if (addr.test(key)) { + } else if (key.startsWith('lava@')) { vueRouters.push({ path: `/${current}/account/${key}` }); setTimeout(() => { closeSearchModal();