diff --git a/.envrc b/.envrc new file mode 100644 index 0000000000..0753b38d41 --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +use flake +export DIRENV_WARN_TIMEOUT=1m diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 706da5d138..0000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,5 +0,0 @@ -# These are supported funding model platforms - -github: ping-pub -issuehunt: ping-pub # Replace with a single IssueHunt username - diff --git a/.github/workflows/config-check.yaml b/.github/workflows/config-check.yaml deleted file mode 100644 index a9bad362ac..0000000000 --- a/.github/workflows/config-check.yaml +++ /dev/null @@ -1,21 +0,0 @@ - -name: Config Checker - -on: - # push: - # branches: [ master ] - pull_request: - # branches: [ master ] - paths: - - 'chains/mainnet/**' - - 'chains/testnet/**' - -jobs: - deploy: - name: Check Blockchain Config - runs-on: ubuntu-latest - steps: - - name: Git Checkout Latest - uses: actions/checkout@v3 - - name: Check Chain Configs - uses: ping-pub/ping-dashboard-config-checker@v1.0 \ No newline at end of file diff --git a/.github/workflows/deploy-explorer.yml b/.github/workflows/deploy-explorer.yml new file mode 100644 index 0000000000..58684f71df --- /dev/null +++ b/.github/workflows/deploy-explorer.yml @@ -0,0 +1,115 @@ +name: Deploy Explorer + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +env: + NODE_OPTIONS: '--no-warnings' + +jobs: + garnix: + name: Wait on Garnix CI + runs-on: ubuntu-latest + steps: + - name: Wait on Garnix CI Check Suite + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + REF: ${{ github.head_ref }} + run: | + sleep 15 + + status='' + + while [[ $status != 'completed' ]]; do + check_suites=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$REPO/commits/$REF/check-suites") + + status=$(echo "$check_suites" | jq -r '.check_suites | .[] | select(.app.name == "Garnix CI") | .status') + sleep 15 + done + + conclusion=$(echo "$check_suites" | jq -r '.check_suites | .[] | select(.app.name == "Garnix CI") | .conclusion') + + case "$conclusion" in + failure | timed_out | action_required | stale | startup_failure) + echo "ERROR: Garnix CI concluded with $conclusion" + exit 1 + ;; + *) + echo "INFO: Garnix CI concluded with $conclusion" + ;; + esac + + deploy-preview: + runs-on: ['ubuntu-latest'] + needs: [garnix] + permissions: + contents: read + pull-requests: write + env: + npm_config_yes: true + environment: 'app-preview' + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v4 + with: + lfs: true + - uses: nixbuild/nix-quick-install-action@v28 + - name: Fetch from Cache + run: | + nix develop + nix build .#explorer + - name: '[preview] 🔶 Publish to Cloudflare Pages' + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} + run: npx --yes wrangler@latest pages --project-name="app" deploy result >> /tmp/app_deploy.txt + - name: Set Deploy Output + run: | + { + echo 'DEPLOY_OUTPUT<> $GITHUB_ENV + - name: Comment Site Deploy Results + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + # App 🤌 + ${{ env.DEPLOY_OUTPUT }} + + **${{ env.LAST_UPDATED_AT }}** + comment_tag: deploy-app-preview-result + + deploy-production: + runs-on: 'ubuntu-latest' + needs: [garnix] + env: + npm_config_yes: true + environment: 'explorer-production' + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v4 + with: + lfs: true + - uses: nixbuild/nix-quick-install-action@v28 + - name: Fetch from Cache + run: | + nix develop + nix build .#explorer + - name: '[production] 🔶 Publish to Cloudflare Pages' + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }} + run: npx --yes wrangler@latest pages --project-name="explorer" --branch="main" deploy result diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml deleted file mode 100644 index ce1e3034b7..0000000000 --- a/.github/workflows/docker.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: docker - -on: - push: - branches: - - 'master-backup' - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 -# - -# name: Set up QEMU -# uses: docker/setup-qemu-action@v1 -# - -# name: Set up Docker Buildx -# uses: docker/setup-buildx-action@v1 - - name: Install - run: yarn install - - name: Build - run: yarn run vue-cli-service build - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - # list of Docker images to use as base name for tags - images: | - yaoling/wallet - # generate Docker tags based on the following events/attributes - tags: | - type=sha - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/mainnet-deploy.yaml.disabled b/.github/workflows/mainnet-deploy.yaml.disabled deleted file mode 100644 index 0b69f65c88..0000000000 --- a/.github/workflows/mainnet-deploy.yaml.disabled +++ /dev/null @@ -1,28 +0,0 @@ - -name: Deploy to ping.pub - -on: - push: - branches: [ master2 ] - # pull_request: - # branches: [ master ] - -jobs: - deploy: - name: Ping deploy - runs-on: mainnet - steps: - - name: Environment - run: export NODE_OPTIONS="--max_old_space_size=4096" - - - name: Git Checkout Latest - uses: actions/checkout@v3 - - - name: Install - run: yarn install --ignore-engines - - - name: Build - run: yarn build - - - name: Deploy - run: cp -rf ./dist/* /var/www/html/ \ No newline at end of file diff --git a/.github/workflows/testnet-deploy.yaml b/.github/workflows/testnet-deploy.yaml deleted file mode 100644 index 55391d0122..0000000000 --- a/.github/workflows/testnet-deploy.yaml +++ /dev/null @@ -1,27 +0,0 @@ - -name: Testnet Deploy - -on: - push: - branches: [ testnet ] - pull_request: - branches: [ testnet ] - -jobs: - deploy: - name: Ping deploy - runs-on: testnet - steps: - - name: print - run: echo ${GITHUB_REF#refs/heads/} - - name: Git Checkout Latest - uses: actions/checkout@v2 - - - name: Install - run: yarn install - - - name: Build - run: yarn run vue-cli-service build - - - name: Deploy - run: cp -rf ./dist/* /var/www/html/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 212ccd26db..f07398572b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,10 @@ node_modules/ **/.vscode yarn-error.log dist -.idea \ No newline at end of file +.idea +._* +_ +result +.direnv +.eslintcache +.prettiercache diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..619eec87e4 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +enable-pre-post-scripts = false diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 1150b743e0..f67c6099e4 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -1,4 +1,8 @@ -// Generated by 'unplugin-auto-import' +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] @@ -20,7 +24,9 @@ declare global { const createPinia: typeof import('pinia')['createPinia'] const createProjection: typeof import('@vueuse/math')['createProjection'] const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn'] + const createReusableTemplate: typeof import('@vueuse/core')['createReusableTemplate'] const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable'] + const createTemplatePromise: typeof import('@vueuse/core')['createTemplatePromise'] const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn'] const customRef: typeof import('vue')['customRef'] const debouncedRef: typeof import('@vueuse/core')['debouncedRef'] @@ -37,6 +43,7 @@ declare global { const h: typeof import('vue')['h'] const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] const inject: typeof import('vue')['inject'] + const injectLocal: typeof import('@vueuse/core')['injectLocal'] const isDefined: typeof import('@vueuse/core')['isDefined'] const isProxy: typeof import('vue')['isProxy'] const isReactive: typeof import('vue')['isReactive'] @@ -74,6 +81,7 @@ declare global { const onUpdated: typeof import('vue')['onUpdated'] const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] const provide: typeof import('vue')['provide'] + const provideLocal: typeof import('@vueuse/core')['provideLocal'] const reactify: typeof import('@vueuse/core')['reactify'] const reactifyObject: typeof import('@vueuse/core')['reactifyObject'] const reactive: typeof import('vue')['reactive'] @@ -106,6 +114,7 @@ declare global { const toReactive: typeof import('@vueuse/core')['toReactive'] const toRef: typeof import('vue')['toRef'] const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] const triggerRef: typeof import('vue')['triggerRef'] const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount'] const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount'] @@ -117,11 +126,14 @@ declare global { const until: typeof import('@vueuse/core')['until'] const useAbs: typeof import('@vueuse/math')['useAbs'] const useActiveElement: typeof import('@vueuse/core')['useActiveElement'] + const useAnimate: typeof import('@vueuse/core')['useAnimate'] + const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference'] const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery'] const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter'] const useArrayFind: typeof import('@vueuse/core')['useArrayFind'] const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex'] const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast'] + const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes'] const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin'] const useArrayMap: typeof import('@vueuse/core')['useArrayMap'] const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce'] @@ -141,6 +153,7 @@ declare global { const useCeil: typeof import('@vueuse/math')['useCeil'] const useClamp: typeof import('@vueuse/math')['useClamp'] const useClipboard: typeof import('@vueuse/core')['useClipboard'] + const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems'] const useCloned: typeof import('@vueuse/core')['useCloned'] const useColorMode: typeof import('@vueuse/core')['useColorMode'] const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog'] @@ -216,6 +229,8 @@ declare global { const useOnline: typeof import('@vueuse/core')['useOnline'] const usePageLeave: typeof import('@vueuse/core')['usePageLeave'] const useParallax: typeof import('@vueuse/core')['useParallax'] + const useParentElement: typeof import('@vueuse/core')['useParentElement'] + const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver'] const usePermission: typeof import('@vueuse/core')['usePermission'] const usePointer: typeof import('@vueuse/core')['usePointer'] const usePointerLock: typeof import('@vueuse/core')['usePointerLock'] @@ -289,8 +304,10 @@ declare global { const watchArray: typeof import('@vueuse/core')['watchArray'] const watchAtMost: typeof import('@vueuse/core')['watchAtMost'] const watchDebounced: typeof import('@vueuse/core')['watchDebounced'] + const watchDeep: typeof import('@vueuse/core')['watchDeep'] const watchEffect: typeof import('vue')['watchEffect'] const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable'] + const watchImmediate: typeof import('@vueuse/core')['watchImmediate'] const watchOnce: typeof import('@vueuse/core')['watchOnce'] const watchPausable: typeof import('@vueuse/core')['watchPausable'] const watchPostEffect: typeof import('vue')['watchPostEffect'] @@ -300,9 +317,16 @@ declare global { const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter'] const whenever: typeof import('@vueuse/core')['whenever'] } +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + import('vue') +} // for vue template auto import import { UnwrapRef } from 'vue' declare module 'vue' { + interface GlobalComponents {} interface ComponentCustomProperties { readonly EffectScope: UnwrapRef readonly acceptHMRUpdate: UnwrapRef @@ -323,7 +347,9 @@ declare module 'vue' { readonly createPinia: UnwrapRef readonly createProjection: UnwrapRef readonly createReactiveFn: UnwrapRef + readonly createReusableTemplate: UnwrapRef readonly createSharedComposable: UnwrapRef + readonly createTemplatePromise: UnwrapRef readonly createUnrefFn: UnwrapRef readonly customRef: UnwrapRef readonly debouncedRef: UnwrapRef @@ -340,6 +366,7 @@ declare module 'vue' { readonly h: UnwrapRef readonly ignorableWatch: UnwrapRef readonly inject: UnwrapRef + readonly injectLocal: UnwrapRef readonly isDefined: UnwrapRef readonly isProxy: UnwrapRef readonly isReactive: UnwrapRef @@ -377,6 +404,7 @@ declare module 'vue' { readonly onUpdated: UnwrapRef readonly pausableWatch: UnwrapRef readonly provide: UnwrapRef + readonly provideLocal: UnwrapRef readonly reactify: UnwrapRef readonly reactifyObject: UnwrapRef readonly reactive: UnwrapRef @@ -391,7 +419,6 @@ declare module 'vue' { readonly refThrottled: UnwrapRef readonly refWithControl: UnwrapRef readonly resolveComponent: UnwrapRef - readonly resolveDirective: UnwrapRef readonly resolveRef: UnwrapRef readonly resolveUnref: UnwrapRef readonly setActivePinia: UnwrapRef @@ -409,6 +436,7 @@ declare module 'vue' { readonly toReactive: UnwrapRef readonly toRef: UnwrapRef readonly toRefs: UnwrapRef + readonly toValue: UnwrapRef readonly triggerRef: UnwrapRef readonly tryOnBeforeMount: UnwrapRef readonly tryOnBeforeUnmount: UnwrapRef @@ -420,11 +448,14 @@ declare module 'vue' { readonly until: UnwrapRef readonly useAbs: UnwrapRef readonly useActiveElement: UnwrapRef + readonly useAnimate: UnwrapRef + readonly useArrayDifference: UnwrapRef readonly useArrayEvery: UnwrapRef readonly useArrayFilter: UnwrapRef readonly useArrayFind: UnwrapRef readonly useArrayFindIndex: UnwrapRef readonly useArrayFindLast: UnwrapRef + readonly useArrayIncludes: UnwrapRef readonly useArrayJoin: UnwrapRef readonly useArrayMap: UnwrapRef readonly useArrayReduce: UnwrapRef @@ -444,6 +475,7 @@ declare module 'vue' { readonly useCeil: UnwrapRef readonly useClamp: UnwrapRef readonly useClipboard: UnwrapRef + readonly useClipboardItems: UnwrapRef readonly useCloned: UnwrapRef readonly useColorMode: UnwrapRef readonly useConfirmDialog: UnwrapRef @@ -519,6 +551,8 @@ declare module 'vue' { readonly useOnline: UnwrapRef readonly usePageLeave: UnwrapRef readonly useParallax: UnwrapRef + readonly useParentElement: UnwrapRef + readonly usePerformanceObserver: UnwrapRef readonly usePermission: UnwrapRef readonly usePointer: UnwrapRef readonly usePointerLock: UnwrapRef @@ -568,7 +602,6 @@ declare module 'vue' { readonly useTimeoutPoll: UnwrapRef readonly useTimestamp: UnwrapRef readonly useTitle: UnwrapRef - readonly useToFixed: UnwrapRef readonly useToNumber: UnwrapRef readonly useToString: UnwrapRef readonly useToggle: UnwrapRef @@ -592,8 +625,10 @@ declare module 'vue' { readonly watchArray: UnwrapRef readonly watchAtMost: UnwrapRef readonly watchDebounced: UnwrapRef + readonly watchDeep: UnwrapRef readonly watchEffect: UnwrapRef readonly watchIgnorable: UnwrapRef + readonly watchImmediate: UnwrapRef readonly watchOnce: UnwrapRef readonly watchPausable: UnwrapRef readonly watchPostEffect: UnwrapRef 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/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/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000..05e03752ad --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,73 @@ +import globals from 'globals'; +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import eslintPluginVue from 'eslint-plugin-vue'; +import eslintPrettierConfig from 'eslint-config-prettier'; +import eslintPluginPrettier from 'eslint-plugin-prettier/recommended'; + +export default tseslint.config( + { files: ['**/*.{js,mjs,cjs,ts,vue,html}'] }, + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...eslintPluginVue.configs['flat/recommended'], + { languageOptions: { globals: globals.browser } }, + { + files: ['**/*.vue', '*.vue'], + languageOptions: { + parserOptions: { + projectService: true, + extraFileExtensions: ['.vue'], + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + languageOptions: { + parserOptions: { + sourceType: 'module', + ecmaVersion: 'latest', + parser: tseslint.parser, + ecmaFeatures: { jsx: true }, + }, + }, + }, + { + rules: { + 'prettier/prettier': [ + 'error', + {}, + { usePrettierrc: true, fileInfoOptions: { withNodeModules: true } }, + ], + /** + * the following rules are all temporarily disabled + */ + 'no-empty': ['off'], + 'no-debugger': ['off'], + 'no-unsafe-optional-chaining': ['off'], + + '@typescript-eslint/ban-ts-comment': ['off'], + '@typescript-eslint/no-unused-vars': ['off'], + '@typescript-eslint/no-explicit-any': ['off'], + '@typescript-eslint/no-empty-object-type': ['off'], + '@typescript-eslint/no-unused-expressions': ['off'], + '@typescript-eslint/no-unsafe-function-type': ['off'], + + 'vue/valid-v-for': ['off'], + 'vue/valid-v-else': ['off'], + 'vue/no-dupe-keys': ['off'], + 'vue/no-unused-vars': ['off'], + 'vue/no-explicit-any': ['off'], + 'vue/no-parsing-error': ['off'], + 'vue/require-v-for-key': ['off'], + 'vue/require-prop-types': ['off'], + 'vue/no-use-v-if-with-v-for': ['off'], + 'vue/no-empty-component-block': ['off'], + 'vue/multi-word-component-names': ['off'], + 'vue/return-in-computed-property': ['off'], + 'vue/no-unsafe-optional-chaining': ['off'], + 'vue/no-async-in-computed-properties': ['off'], + }, + }, + eslintPrettierConfig, + eslintPluginPrettier, +); diff --git a/explorer.nix b/explorer.nix new file mode 100644 index 0000000000..96c5f93560 --- /dev/null +++ b/explorer.nix @@ -0,0 +1,52 @@ +{ ... }: { + perSystem = { pkgs, self', system, ... }: { + packages = { + explorer = + let + offlineCache = pkgs.fetchYarnDeps { + yarnLock = ./yarn.lock; + hash = "sha256-EKGuNjbLXLcKdNk6FgQXXYzH0iyUOuRxoddRjFNBFQY="; + }; + in + pkgs.stdenv.mkDerivation { + pname = "pingpub-explorer"; + version = "0.1.0"; + src = builtins.filterSource + (path: type: + type != "directory" || baseNameOf path != ".github") + (pkgs.lib.cleanSource ./.); + + nativeBuildInputs = with pkgs; [ + tree + fixup-yarn-lock + nodePackages_latest.yarn + nodePackages_latest.nodejs + ]; + + configurePhase = '' + runHook preConfigure + + export HOME=$(mktemp -d) + + yarn config --offline set yarn-offline-mirror "${offlineCache}" + fixup-yarn-lock yarn.lock + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + export PATH="$PATH:node_modules/vite/bin" + + patchShebangs node_modules/ + + runHook postConfigure + ''; + + buildPhase = '' + ./node_modules/vite/bin/vite.js build + ''; + + installPhase = '' + mkdir -p $out + mv dist/* $out/ + ''; + }; + }; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000000..752ee39d31 --- /dev/null +++ b/flake.lock @@ -0,0 +1,58 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1724479785, + "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000000..f4bbfcf07f --- /dev/null +++ b/flake.nix @@ -0,0 +1,45 @@ +{ + description = "Build the Union ping-pub explorer"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; + + outputs = inputs@{ self, nixpkgs, flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" "aarch64-linux" ]; + imports = [ + ./explorer.nix + ]; + perSystem = { config, self', inputs', system, pkgs, lib, ... }: { + _module.args = { + inherit nixpkgs; + + pkgs = import nixpkgs { + inherit system; + }; + }; + + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + tree + direnv + nodePackages_latest.yarn + nodePackages_latest.nodejs + ]; + }; + }; + }; + nixConfig = { + extra-substituters = [ + "https://union.cachix.org" + "https://cache.garnix.io" + ]; + extra-trusted-public-keys = [ + "union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M=" + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + ]; + accept-flake-config = true; + }; +} diff --git a/index.html b/index.html index 156b08af67..f5df891272 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Ping Dashboard - Cosmos Blockchain Explorer And Web Wallet + Union Dashboard - Union Blockchain Explorer And Web Wallet @@ -12,7 +12,31 @@
@@ -22,22 +46,7 @@
- - - + diff --git a/package.json b/package.json index e4f5021547..34ea036f83 100644 --- a/package.json +++ b/package.json @@ -2,78 +2,96 @@ "name": "ping.pub", "version": "3.0.0", "private": true, - "target": "", + "type": "module", "scripts": { "dev": "vite", "serve": "vite", - "build": "run-p type-check build-only", + "serve-dist": "npm_config_yes=true npx serve@latest ./dist/", "preview": "vite preview", - "build-only": "vite build", - "type-check": "vue-tsc --noEmit" + "prebuild": "yarn typecheck", + "build": "vite build", + "typecheck": "vue-tsc --noEmit", + "lint": "eslint --fix src --config eslint.config.mjs --cache", + "lint:check": "eslint src --config eslint.config.mjs --cache", + "format": "prettier --config prettier.config.mjs . --ignore-path .gitignore --write --ignore-unknown" }, "dependencies": { "@chenfengyuan/vue-countdown": "2", - "@cosmjs/crypto": "^0.32.3", - "@cosmjs/amino": "^0.32.3", - "@cosmjs/encoding": "^0.32.3", - "@cosmjs/stargate": "^0.32.3", - "@iconify/vue": "^4.1.0", - "@intlify/unplugin-vue-i18n": "^0.8.2", - "@leapwallet/cosmos-snap-provider": "^0.1.20", - "@leapwallet/name-matcha": "^1.1.0", - "@osmonauts/lcd": "^0.8.0", + "@cosmjs/amino": "^0.32.4", + "@cosmjs/crypto": "^0.32.4", + "@cosmjs/encoding": "^0.32.4", + "@cosmjs/stargate": "^0.32.4", + "@iconify/vue": "^4.1.2", + "@intlify/unplugin-vue-i18n": "^4.0.0", + "@leapwallet/cosmos-snap-provider": "^0.1.26", + "@leapwallet/name-matcha": "^1.11.0", + "@osmonauts/lcd": "^1.0.3", "@personaxyz/ad-sdk": "0.0.25", "@ping-pub/chain-registry-client": "^0.0.25", - "@vitejs/plugin-vue-jsx": "^3.0.0", - "@vueuse/core": "^9.12.0", - "@vueuse/integrations": "^10.1.2", - "@vueuse/math": "^9.12.0", - "apexcharts": "^3.37.1", - "autoprefixer": "^10.4.14", - "axios": "^1.3.2", + "@vitejs/plugin-vue-jsx": "^4.0.1", + "@vueuse/core": "^11.0.3", + "@vueuse/integrations": "^11.0.3", + "@vueuse/math": "^11.0.3", + "apexcharts": "^3.52.0", + "autoprefixer": "^10.4.20", + "axios": "^1.7.5", "buffer": "^6.0.3", "build": "^0.1.4", - "cross-fetch": "^3.1.5", - "daisyui": "^3.1.0", - "dayjs": "^1.11.7", - "lazy-load-vue3": "^1.3.0", - "long": "^5.2.1", - "md-editor-v3": "^2.8.1", + "cross-fetch": "^4.0.0", + "daisyui": "^4.12.10", + "dayjs": "^1.11.13", + "lazy-load-vue3": "^2.0.1", + "long": "^5.2.3", + "md-editor-v3": "^4.19.1", "numeral": "^2.0.6", - "osmojs": "^14.0.0-rc.0", - "pinia": "^2.0.28", - "postcss": "^8.4.23", - "qrcode": "^1.5.3", - "tailwindcss": "^3.3.1", + "osmojs": "^16.14.0", + "pinia": "^2.2.2", + "postcss": "^8.4.41", + "qrcode": "^1.5.4", + "tailwindcss": "^3.4.10", "theme-change": "^2.5.0", - "vite-plugin-vue-layouts": "^0.7.0", - "vue": "^3.2.45", - "vue-i18n": "^9.2.2", + "vite-plugin-vue-layouts": "^0.11.0", + "vue": "^3.4.38", + "vue-i18n": "^9.14.0", "vue-prism-component": "^2.0.0", - "vue-router": "^4.1.6", - "vue3-apexcharts": "^1.4.1", + "vue-router": "^4.4.3", + "vue3-apexcharts": "^1.5.3", "vue3-json-viewer": "^2.2.2", - "vue3-perfect-scrollbar": "^1.6.1" + "vue3-perfect-scrollbar": "^2.0.0" }, "devDependencies": { - "@osmonauts/telescope": "^0.88.2", - "@types/marked": "^4.0.8", - "@types/node": "^18.11.12", - "@types/numeral": "^2.0.2", - "@types/semver": "7.5.0", - "@vitejs/plugin-vue": "^4.0.0", - "@vue/tsconfig": "^0.1.3", - "npm-run-all": "^4.1.5", - "prettier": "^2.7.1", - "sass": "^1.58.0", - "shiki": "^1.0.0-beta.0", - "typescript": "~4.9.5", - "unplugin-auto-import": "^0.13.0", - "unplugin-vue-components": "^0.23.0", - "unplugin-vue-define-options": "1.1.4", - "vite": "^4.4.9", - "vite-plugin-pages": "^0.28.0", + "@eslint/js": "^9.9.1", + "@osmonauts/telescope": "^1.0.2", + "@types/eslint": "^9.6.1", + "@types/eslint-config-prettier": "^6.11.3", + "@types/eslint__js": "^8.42.3", + "@types/marked": "^6.0.0", + "@types/node": "^22.5.0", + "@types/numeral": "^2.0.5", + "@types/postcss-import": "^14.0.3", + "@types/semver": "7.5.8", + "@vitejs/plugin-vue": "^5.1.2", + "@vue/tsconfig": "^0.5.1", + "eslint": "^9.9.1", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-prettier-vue": "^5.0.0", + "eslint-plugin-vue": "^9.27.0", + "globals": "^15.9.0", + "postcss-import": "^16.1.0", + "postcss-load-config": "^6.0.1", + "prettier": "^3.3.3", + "sass": "^1.77.8", + "shiki": "^1.14.1", + "typescript": "^5.5.4", + "typescript-eslint": "^8.3.0", + "unplugin-auto-import": "^0.18.2", + "unplugin-vue-components": "^0.27.4", + "unplugin-vue-define-options": "1.4.9", + "vite": "5.4.2", + "vite-plugin-pages": "^0.32.3", + "vite-tsconfig-paths": "^5.0.1", "vue-json-viewer": "3", - "vue-tsc": "^1.0.12" + "vue-tsc": "^2.0.29" } } diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 0000000000..cce7ec28f8 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,15 @@ +const path = require('node:path'); +const tailwindcss = require('tailwindcss'); +const autoprefixer = require('autoprefixer'); +const postcssImport = require('postcss-import'); +const postcssNesting = require('tailwindcss/nesting'); + +/** @type {import('postcss-load-config').Config} */ +module.exports = { + plugins: [ + postcssImport, + postcssNesting, + tailwindcss(path.resolve(__dirname, './tailwind.config.ts')), + autoprefixer, + ], +}; diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index 33ad091d26..0000000000 --- a/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/.prettierrc.json b/prettier.config.mjs similarity index 67% rename from .prettierrc.json rename to prettier.config.mjs index 0ed67ee771..42ac3288bd 100644 --- a/.prettierrc.json +++ b/prettier.config.mjs @@ -1,5 +1,7 @@ -{ +/** @type {import('prettier').Options} */ +export default { "tabWidth": 2, + useTabs: false, "singleQuote": true, "semi": true, "endOfLine": "auto", diff --git a/public/favicon.ico b/public/favicon.ico index ef242a96ba..e91b65facf 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/fonts/InterVariable-Italic.woff2 b/public/fonts/InterVariable-Italic.woff2 new file mode 100644 index 0000000000..f22ec25549 Binary files /dev/null and b/public/fonts/InterVariable-Italic.woff2 differ diff --git a/public/fonts/InterVariable.woff2 b/public/fonts/InterVariable.woff2 new file mode 100644 index 0000000000..22a12b04e1 Binary files /dev/null and b/public/fonts/InterVariable.woff2 differ diff --git a/public/fonts/JetBrainsMono-Italic[wght].woff2 b/public/fonts/JetBrainsMono-Italic[wght].woff2 new file mode 100644 index 0000000000..ceb9552050 Binary files /dev/null and b/public/fonts/JetBrainsMono-Italic[wght].woff2 differ diff --git a/public/fonts/JetBrainsMono[wght].woff2 b/public/fonts/JetBrainsMono[wght].woff2 new file mode 100644 index 0000000000..12a10899a1 Binary files /dev/null and b/public/fonts/JetBrainsMono[wght].woff2 differ diff --git a/public/fonts/TT-Supermolot-Neue-Variable.ttf b/public/fonts/TT-Supermolot-Neue-Variable.ttf new file mode 100644 index 0000000000..9b943c5d67 Binary files /dev/null and b/public/fonts/TT-Supermolot-Neue-Variable.ttf differ diff --git a/chains/README.md b/src/assets/chains/README.md similarity index 93% rename from chains/README.md rename to src/assets/chains/README.md index 28c994e22d..a92924b449 100644 --- a/chains/README.md +++ b/src/assets/chains/README.md @@ -6,9 +6,9 @@ Remember to bear this behavior in mind when selecting a DNS host name for self h ** 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 mainnet, go to https://github.com/ping-pub/explorer/tree/master/src/assets/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` +- Submit configs for testnet, go to https://github.com/ping-pub/explorer/tree/master/src/assets/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 diff --git a/src/assets/chains/mainnet/union-testnet-8.json b/src/assets/chains/mainnet/union-testnet-8.json new file mode 100644 index 0000000000..f8624bbf49 --- /dev/null +++ b/src/assets/chains/mainnet/union-testnet-8.json @@ -0,0 +1,24 @@ +{ + "chain_name": "union", + "api": [ + "https://rest.testnet-8.union.build" + ], + "rpc": [ + "https://rpc.testnet-8.union.build" + ], + "sdk_version": "0.47.0", + "addr_prefix": "union", + "min_tx_fee": "0", + "coin_type": "1337", + "theme_color": "#A0ECFD", + "logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/testnets/uniontestnet/images/union.png", + "assets": [ + { + "symbol": "UNO", + "base": "uuno", + "exponent": 9, + "coingecko_id": "uno", + "logo": "https://raw.githubusercontent.com/Agoric/agoric-sdk/master/packages/wallet/ui/public/tokens/BLD.svg" + } + ] +} \ No newline at end of file diff --git a/src/assets/chains/testnet/union-testnet-8.json b/src/assets/chains/testnet/union-testnet-8.json new file mode 100644 index 0000000000..f8624bbf49 --- /dev/null +++ b/src/assets/chains/testnet/union-testnet-8.json @@ -0,0 +1,24 @@ +{ + "chain_name": "union", + "api": [ + "https://rest.testnet-8.union.build" + ], + "rpc": [ + "https://rpc.testnet-8.union.build" + ], + "sdk_version": "0.47.0", + "addr_prefix": "union", + "min_tx_fee": "0", + "coin_type": "1337", + "theme_color": "#A0ECFD", + "logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/testnets/uniontestnet/images/union.png", + "assets": [ + { + "symbol": "UNO", + "base": "uuno", + "exponent": 9, + "coingecko_id": "uno", + "logo": "https://raw.githubusercontent.com/Agoric/agoric-sdk/master/packages/wallet/ui/public/tokens/BLD.svg" + } + ] +} \ No newline at end of file diff --git a/src/components/CardParameter.vue b/src/components/CardParameter.vue index d157a5fd7c..39f5ea4eb8 100644 --- a/src/components/CardParameter.vue +++ b/src/components/CardParameter.vue @@ -34,7 +34,7 @@ function formatTitle(v: string) {