Compare commits

...
11 Commits
Author SHA1 Message Date
prathameshandnabarun 5a3a297c27 Sync main with dev (#8)
Build / Build (push) Successful in 2m2s
Publish cosmos-explorer docker image on release / Run docker build and publish (release) Successful in 3m44s
Part of https://plan.wireit.in/deepstack/browse/VUL-329

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Reviewed-on: #8
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2026-02-19 06:40:14 +00:00
nabarunandpranav f28cba9e82 Handle network errors for cosmos-sdk modules that are not enabled (#4)
Publish cosmos-explorer docker image on release / Run docker build and publish (release) Successful in 5m51s
Part of https://plan.wireit.in/deepstack/browse/VUL-61/

Co-authored-by: Pranav <jadhavpranav89@gmail.com>
Reviewed-on: #4
2025-11-07 08:26:12 +00:00
nabarunandpranav b5a4a60759 Update UI for zenithd (#2)
Part of https://plan.wireit.in/deepstack/browse/VUL-61/

Co-authored-by: Pranav <jadhavpranav89@gmail.com>
Reviewed-on: #2
2025-11-05 16:14:10 +05:30
nabarunandpranav e06ccc8576 Add CI to publish docker image (#1)
Part of https://plan.wireit.in/deepstack/browse/VUL-61/

Co-authored-by: Pranav <jadhavpranav89@gmail.com>
Reviewed-on: #1
2025-11-05 16:11:49 +05:30
dboreham 82452079a6 Merge pull request 'Change page title' (#3) from dboreham/change-page-title into master
Reviewed-on: cerc-io/cosmos-explorer#3
2025-11-05 16:11:30 +05:30
dboreham acf1eaeae8 Change page title 2025-11-05 16:10:59 +05:30
dboreham 94715d2501 Merge pull request 'Basic re-skin' (#2) from dboreham/basic-re-skin into master
Reviewed-on: cerc-io/cosmos-explorer#2
2025-11-05 16:09:44 +05:30
dboreham 2eb0f38742 Add missing file 2025-11-05 16:04:53 +05:30
dboreham 369a688981 Some simple re-skinning changes 2025-11-05 16:04:30 +05:30
dboreham 222078790b Merge pull request 'Reduce block polling interval' (#1) from dboreham/fix-missing-blocks into master
Reviewed-on: cerc-io/cosmos-explorer#1
2025-11-05 15:41:33 +05:30
dboreham 83e5ed7eb3 Reduce block polling interval 2025-11-05 15:33:47 +05:30
19 changed files with 272 additions and 84 deletions
+33
View File
@@ -0,0 +1,33 @@
name: Build
on:
push:
branches: [master, dev]
paths:
- 'src/**'
pull_request:
branches: [master, dev]
paths:
- 'src/**'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Enable corepack and yarn
run: corepack enable
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build project
run: yarn build
+29
View File
@@ -0,0 +1,29 @@
name: Publish cosmos-explorer docker image on release
on:
release:
types: [published]
jobs:
build:
name: Run docker build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run docker build
run: docker build -t cerc/cosmos-explorer -f Dockerfile .
- name: Get the version
id: vars
run: |
echo "sha=$(echo ${GITHUB_SHA:0:7})" >> $GITHUB_OUTPUT
echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT
- name: Tag docker image with SHA
run: docker tag cerc/cosmos-explorer git.vdb.to/laconicnetwork/cerc/cosmos-explorer:${{steps.vars.outputs.sha}}
- name: Tag docker image with release tag
run: docker tag git.vdb.to/laconicnetwork/cerc/cosmos-explorer:${{steps.vars.outputs.sha}} git.vdb.to/laconicnetwork/cerc/cosmos-explorer:${{steps.vars.outputs.tag}}
- name: Docker Login
run: echo ${{ secrets.CICD_PUBLISH_TOKEN }} | docker login https://git.vdb.to -u laconiccicd --password-stdin
- name: Docker Push SHA
run: docker push git.vdb.to/laconicnetwork/cerc/cosmos-explorer:${{steps.vars.outputs.sha}}
- name: Docker Push TAGGED
run: docker push git.vdb.to/laconicnetwork/cerc/cosmos-explorer:${{steps.vars.outputs.tag}}
+14
View File
@@ -0,0 +1,14 @@
# Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=20-bullseye
FROM node:${VARIANT}
WORKDIR /app
COPY . .
RUN yarn install
# Expose port for http
EXPOSE 4173
+6 -9
View File
@@ -1,15 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ping Dashboard - Cosmos Blockchain Explorer And Web Wallet</title>
<meta
name="description"
content="Ping Dashboard is a block explorer/web wallet for blockchains built on Cosmos SDK, Cosmoshub, Osmosis, Juno, Evmos, Injective, Canto and 70+ blockchains listed on ping.pub"
/>
<link rel="stylesheet" type="text/css" href="/loader.css" />
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zenith Blockchain Explorer And Web Wallet</title>
<meta name="description" content="Zenith Explorer is a block explorer/web wallet for zenithd blockchain" />
<link rel="stylesheet" type="text/css" href="/loader.css" />
</head>
<body>
<div id="app">
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ping.pub",
"version": "3.0.0",
"version": "3.0.1-zenith-0.2.1",
"private": true,
"target": "",
"scripts": {
+6 -1
View File
@@ -46,7 +46,12 @@ const chain = useBlockchain();
<tr v-for="item in txs">
<td>{{ item.injected }}</td>
<td>
<span v-if="item.injected === 'Injected'">{{ item.hash }}</span>
<RouterLink
v-if="item.injected === 'Injected'"
:to="`/${chain.chainName}/tx/${item.hash}?type=injected`"
class="text-primary dark:invert">
{{ item.hash }}
</RouterLink>
<RouterLink v-else :to="`/${chain.chainName}/tx/${item.hash}`" class="text-primary dark:invert">{{
item.hash
}}</RouterLink>
+23 -23
View File
@@ -93,7 +93,9 @@ const show_ad = computed(() => {
<div class="flex justify-between mt-1 pl-4 py-4 mb-1">
<RouterLink to="/" class="flex items-center">
<img class="w-10 h-10" src="../../assets/logo.svg" />
<h1 class="flex-1 ml-3 text-2xl font-semibold dark:text-white">Ping.pub</h1>
<h1 class="flex-1 ml-3 text-2xl font-semibold dark:text-white">
Zenith Explorer
</h1>
</RouterLink>
<div
class="pr-4 cursor-pointer xl:!hidden"
@@ -230,24 +232,26 @@ const show_ad = computed(() => {
</div>
</div>
<div class="px-2">
<div class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase">Tools</div>
<RouterLink
to="/wallet/suggest"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]"
<div class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase">
Tools
</div>
<RouterLink to="/wallet/suggest"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
<Icon icon="mdi:frequently-asked-questions" class="text-xl mr-2" />
<div class="text-base capitalize flex-1 text-gray-600 dark:text-gray-200">Wallet Helper</div>
<div
class="text-base capitalize flex-1 text-gray-600 dark:text-gray-200"
>
Wallet Helper
</div>
</RouterLink>
<div
v-if="showDiscord"
class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase"
>
<!-- <div class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase">
{{ $t('module.sponsors') }}
</div>
<Sponsors v-if="showDiscord" />
<div class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase">{{ $t('module.links') }}</div>
<Sponsors /> -->
<!-- <div class="px-4 text-sm pt-2 text-gray-400 pb-2 uppercase">{{ $t('module.links') }}</div>
<a
href="https://twitter.com/ping_pub"
href="https://x.com/laconicnetwork"
target="_blank"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
@@ -261,16 +265,12 @@ const show_ad = computed(() => {
class="py-2 px-4 flex items-center rounded-lg cursor-pointer hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
<Icon icon="mdi:discord" class="text-xl mr-2" />
<div class="text-base capitalize flex-1 text-gray-600 dark:text-gray-200">Discord</div>
</a>
<a
href="https://github.com/ping-pub/explorer/discussions"
target="_blank"
class="py-2 px-4 flex items-center rounded-lg cursor-pointer hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
<Icon icon="mdi:frequently-asked-questions" class="text-xl mr-2" />
<div class="text-base capitalize flex-1 text-gray-600 dark:text-gray-200">FAQ</div>
</a>
<div
class="text-base capitalize flex-1 text-gray-600 dark:text-gray-200"
>
Discord
</div>
</a> -->
</div>
</div>
<div class="xl:!ml-64 px-3 pt-4">
+6 -3
View File
@@ -11,12 +11,15 @@
<div class="hidden md:!block">
<a
class="link link-primary no-underline mr-4"
href="https://github.com/ping-pub/explorer/blob/master/LICENSE"
href="https://git.vdb.to/cerc-io/cosmos-explorer/src/branch/master/LICENSE"
target="noopener noreferrer"
>License</a
>
<a class="link link-primary no-underline" href="https://github.com/ping-pub/explorer" target="noopener noreferrer"
>Github</a
<a
class="link link-primary no-underline"
href="https://git.vdb.to/cerc-io/cosmos-explorer"
target="noopener noreferrer"
>Source</a
>
</div>
</footer>
+11 -26
View File
@@ -1,28 +1,13 @@
<template>
<div>
<a
href="https://cosmos.network"
target="_blank"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
<img src="https://ping.pub/logos/cosmos.svg" class="w-6 h-6 rounded-full mr-3" />
<div class="text-sm capitalize flex-1 text-gray-600 dark:text-gray-200">Cosmos Hub</div>
</a>
<a
href="https://osmosis.zone"
target="_blank"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
<img src="https://ping.pub/logos/osmosis.jpg" class="w-6 h-6 rounded-full mr-3" />
<div class="text-sm capitalize flex-1 text-gray-600 dark:text-gray-200">Osmosis</div>
</a>
<a
href="https://celestia.org"
target="_blank"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]"
>
<img src="https://ping.pub/logos/celestia.png" class="w-6 h-6 rounded-full mr-3" />
<div class="text-sm capitalize flex-1 text-gray-600 dark:text-gray-200">Celestia</div>
</a>
</div>
<div>
<a href="https://www.laconic.com" target="_blank"
class="py-2 px-4 flex items-center cursor-pointer rounded-lg hover:bg-gray-100 dark:hover:bg-[#373f59]">
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.05 12.623A15.378 15.378 0 0 0 8.57 1.714C8.573 1.136 8.54.564 8.477 0H0v16.287c0 1.974.752 3.949 2.258 5.454A7.69 7.69 0 0 0 7.714 24L24 24v-8.477a15.636 15.636 0 0 0-1.715-.095c-4.258 0-8.115 1.73-10.908 4.523-2.032 1.981-5.291 1.982-7.299-.026-2.006-2.006-2.007-5.266-.029-7.302Zm18.192-10.86a6.004 6.004 0 0 0-8.485 0 6.003 6.003 0 0 0 0 8.484 6.003 6.003 0 0 0 8.485 0 6.002 6.002 0 0 0 0-8.485Z" fill="var(--color-white)"></path>
</svg>
<div class="text-sm capitalize flex-1 text-gray-600 dark:text-gray-200">
Zenith Network
</div>
</a>
</div>
</template>
+6 -2
View File
@@ -19,7 +19,11 @@ app.use(LazyLoad, { component: true });
// Mount vue app
app.mount('#app');
const REFRESH_INTERVAL = import.meta.env.VITE_REFRESH_INTERVAL || 6000; // 6 seconds
// fetch new block(s) on this interval, specified in miliseconds
// note that the design of the block fetching code is such that it
// will MISS BLOCKS if this interval is longer than the block time
// TODO: make this configurable
const blockFetchInterval = 2 * 1000;
// fetch latest block every 6s
const blockStore = useBaseStore();
@@ -30,4 +34,4 @@ setInterval(() => {
// max allowed request
blockStore.fetchLatest().finally(() => (requestCounter.value -= 1));
}
}, REFRESH_INTERVAL);
}, blockFetchInterval);
+3 -2
View File
@@ -185,13 +185,14 @@ export const useIndexModule = defineStore('module-index', {
}),
change: 0,
},
{
// Only show Inflation if mint module is enabled
...(mintStore.mintModuleEnabled ? [{
title: 'Inflation',
color: 'success',
icon: 'mdi-chart-multiple',
stats: formatter.formatDecimalToPercent(mintStore.inflation),
change: 0,
},
}] : []),
{
title: 'Community Pool',
color: 'primary',
+117 -6
View File
@@ -1,27 +1,78 @@
<script lang="ts" setup>
import { onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { JsonViewer } from 'vue3-json-viewer';
import { useBaseStore, useBlockchain, useFormatter } from '@/stores';
import DynamicComponent from '@/components/dynamic/DynamicComponent.vue';
import { computed, ref } from '@vue/reactivity';
import type { Tx, TxResponse } from '@/types';
import { JsonViewer } from 'vue3-json-viewer';
// if you used v1.0.5 or latster ,you should add import "vue3-json-viewer/dist/index.css"
import 'vue3-json-viewer/dist/index.css';
const props = defineProps(['hash', 'chain']);
const route = useRoute();
const blockchain = useBlockchain();
const baseStore = useBaseStore();
const chainStore = useBlockchain();
const format = useFormatter();
const rpcList = ref(chainStore.current?.endpoints?.rpc || [{ address: '', provider: '' }]);
let rpc = ref('');
const tx = ref(
{} as {
tx: Tx;
tx_response: TxResponse;
}
);
if (props.hash) {
blockchain.rpc.getTx(props.hash).then((x) => (tx.value = x));
const voteExtension = ref(null as any);
const bundleTx = ref(null as any);
const isInjected = computed(() => route.query.type === 'injected');
onMounted(async () => {
rpc.value = rpcList.value[0].address;
if (props.hash) {
if (isInjected.value) {
getTxFromRPC(props.hash).then((data) => {
if (data.result) {
const txBytes = new Uint8Array(atob(data.result.tx).split('').map((c: string) => c.charCodeAt(0)));
const decoded = new TextDecoder().decode(txBytes);
// Check if it's a bundle tx
if (decoded.startsWith('INCLUDE_BUNDLE_TX:')) {
const bundleJson = decoded.replace('INCLUDE_BUNDLE_TX:', '');
bundleTx.value = {
...data.result,
decoded: JSON.parse(bundleJson)
};
} else {
// It's a vote extension
voteExtension.value = {
...data.result,
decoded: JSON.parse(decoded)
};
}
}
});
} else {
blockchain.rpc.getTx(props.hash).then((x) => (tx.value = x));
}
}
})
async function getTxFromRPC(hash: string) {
const response = await fetch(rpc.value + `/tx?hash=0x${hash}`);
if (!response.ok) {
throw new Error(`HTTP error: ${response.status}`);
}
const data = await response.json();
return data;
}
const messages = computed(() => {
return (
tx.value.tx?.body?.messages.map((x) => {
@@ -33,6 +84,22 @@ const messages = computed(() => {
}) || []
);
});
const jsonData = computed(() => {
if (tx.value.tx_response) {
return tx.value;
}
if (voteExtension.value) {
return voteExtension.value.decoded
}
if (bundleTx.value) {
return bundleTx.value.decoded
}
return undefined;
});
</script>
<template>
<div>
@@ -44,6 +111,50 @@ const messages = computed(() => {
<a class="tab text-gray-400 uppercase tab-active">Transaction</a>
</div>
<div v-if="bundleTx" class="bg-base-100 px-4 pt-3 pb-4 rounded shadow mb-4">
<h2 class="card-title truncate mb-2">Bundle Transaction</h2>
<div class="overflow-hidden">
<table class="table text-sm">
<tbody>
<tr>
<td>Tx Hash</td>
<td class="overflow-hidden">{{ bundleTx.hash }}</td>
</tr>
<tr>
<td>Height</td>
<td>
<RouterLink :to="`/${props.chain}/block/${bundleTx.height}`" class="text-primary dark:invert"
>{{ bundleTx.height }}
</RouterLink>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div v-if="voteExtension" class="bg-base-100 px-4 pt-3 pb-4 rounded shadow mb-4">
<h2 class="card-title truncate mb-2">Vote Extension</h2>
<div class="overflow-hidden">
<table class="table text-sm">
<tbody>
<tr>
<td>Tx Hash</td>
<td class="overflow-hidden">{{ voteExtension.hash }}</td>
</tr>
<tr>
<td>Height</td>
<td>
<RouterLink :to="`/${props.chain}/block/${voteExtension.height}`" class="text-primary dark:invert"
>{{ voteExtension.height }}
</RouterLink>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div v-if="tx.tx_response" class="bg-base-100 px-4 pt-3 pb-4 rounded shadow mb-4">
<h2 class="card-title truncate mb-2">{{ $t('tx.title') }}</h2>
<div class="overflow-hidden">
@@ -116,16 +227,16 @@ const messages = computed(() => {
<div v-if="messages.length === 0">{{ $t('tx.no_messages') }}</div>
</div>
<div v-if="tx.tx_response" class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
<div v-if="jsonData" class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
<h2 class="card-title truncate mb-2">JSON</h2>
<JsonViewer
:value="tx"
:value="jsonData"
:theme="baseStore.theme"
style="background: transparent"
copyable
boxed
sort
expand-depth="5"
:expand-depth="5"
/>
</div>
</div>
+1 -1
View File
@@ -23,7 +23,7 @@
"links": "Links"
},
"pages": {
"title": "Ping Dashboard",
"title": "Zenith Dashboard",
"title_all": "404",
"tag": "Beta",
"tag_all": "Seite nicht gefunden",
+1 -1
View File
@@ -23,7 +23,7 @@
"links": "Links"
},
"pages": {
"title": "Ping Dashboard",
"title": "Zenith Explorer",
"title_all": "404",
"tag": "Beta",
"tag_all": "Page Not Found",
+1 -1
View File
@@ -21,7 +21,7 @@
"links": "Tautan"
},
"pages": {
"title": "Ping Dashboard",
"title": "Zenith Explorer",
"title_all": "404",
"tag": "Beta",
"tag_all": "Halaman Tidak Ditemukan",
+1 -1
View File
@@ -23,7 +23,7 @@
"links": "リンク"
},
"pages": {
"title": "Ping ダッシュボード",
"title": "Zenith ダッシュボード",
"title_all": "404",
"tag": "ベータ",
"tag_all": "ページが見つかりません",
+1 -1
View File
@@ -23,7 +23,7 @@
"links": "링크"
},
"pages": {
"title": " 대시보드",
"title": "제니스 대시보드",
"title_all": "404",
"tag": "베타",
"tag_all": "페이지를 찾을 수 없습니다",
+1 -1
View File
@@ -22,7 +22,7 @@
"links": "链接"
},
"pages": {
"title": "Ping Dashboard",
"title": "Zenith Explorer",
"slogan": "Ping Dashboard 是一个区块链浏览器,也是一个网页钱包,还有更多 ... 🛠",
"description": "Cosmos Ecosystem Blockchains 🚀",
"search_placeholder": "搜索区块链",
+11 -5
View File
@@ -5,6 +5,7 @@ export const useMintStore = defineStore('mintStore', {
state: () => {
return {
inflation: '0',
mintModuleEnabled: false,
};
},
getters: {
@@ -18,14 +19,19 @@ export const useMintStore = defineStore('mintStore', {
},
async fetchInflation() {
try {
const res = await this.blockchain?.rpc?.getMintInflation().catch(() => {
this.inflation = '0';
});
const res = await this.blockchain?.rpc?.getMintInflation();
if (res) {
this.inflation = res.inflation;
this.mintModuleEnabled = true;
}
} catch (e: any) {
// Check if module is not implemented/enabled
if (e?.status === 501) {
// Module not enabled
this.mintModuleEnabled = false;
} else {
console.error(e);
}
} catch (e) {
console.log(e);
}
},
},