diff --git a/chain138-snap/packages/site/src/components/Footer.tsx b/chain138-snap/packages/site/src/components/Footer.tsx index 7f7cd74..3d0850e 100644 --- a/chain138-snap/packages/site/src/components/Footer.tsx +++ b/chain138-snap/packages/site/src/components/Footer.tsx @@ -83,16 +83,16 @@ export const Footer = () => { Explorer - + Documentation - + Privacy Policy - + Terms of Service - + Acknowledgments @@ -100,7 +100,7 @@ export const Footer = () => { - © {currentYear} Solace Bank Group PLC + © {currentYear} DBIS / Defi Oracle {buildVersion ? ( v{buildVersion} diff --git a/chain138-snap/packages/site/src/components/Header.tsx b/chain138-snap/packages/site/src/components/Header.tsx index bea5e13..49bee7d 100644 --- a/chain138-snap/packages/site/src/components/Header.tsx +++ b/chain138-snap/packages/site/src/components/Header.tsx @@ -129,7 +129,7 @@ export const Header = ({ Chain 138 Snap - The Defi Oracle Meta Explorer + Chain 138 Explorer by DBIS diff --git a/chain138-snap/packages/site/src/config/index.ts b/chain138-snap/packages/site/src/config/index.ts index 45ac26f..b6657ac 100644 --- a/chain138-snap/packages/site/src/config/index.ts +++ b/chain138-snap/packages/site/src/config/index.ts @@ -9,7 +9,8 @@ export const getSnapApiBaseUrl = (): string => ''; /** - * Public origin of the Snap companion site (e.g. https://explorer.d-bis.org). + * Public origin of the Snap companion site (e.g. https://blockscout.defi-oracle.io + * or https://explorer.d-bis.org). * Set GATSBY_SNAP_SITE_URL so "Send on Chain 138" link is absolute HTTPS and never redirects to HTTP. */ export const getSnapSiteUrl = (): string => diff --git a/chain138-snap/packages/site/src/pages/send.tsx b/chain138-snap/packages/site/src/pages/send.tsx index 03f6c10..099f3d2 100644 --- a/chain138-snap/packages/site/src/pages/send.tsx +++ b/chain138-snap/packages/site/src/pages/send.tsx @@ -18,7 +18,7 @@ const CHAIN_138_PARAMS = { chainName: 'DeFi Oracle Meta Mainnet', nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, rpcUrls: ['https://rpc-http-pub.d-bis.org'], - blockExplorerUrls: ['https://explorer.d-bis.org'], + blockExplorerUrls: ['https://explorer.d-bis.org', 'https://blockscout.defi-oracle.io'], }; const Container = styled.div` diff --git a/chain138-snap/packages/site/static/version.json b/chain138-snap/packages/site/static/version.json index c663ba3..5f6a10b 100644 --- a/chain138-snap/packages/site/static/version.json +++ b/chain138-snap/packages/site/static/version.json @@ -1 +1 @@ -{"version":"dev","buildTime":"2026-03-25T23:54:26.711Z"} \ No newline at end of file +{"version":"dev","buildTime":"2026-04-10T08:39:18.051Z"} \ No newline at end of file diff --git a/chain138-snap/scripts/build-snap-site-for-explorer.sh b/chain138-snap/scripts/build-snap-site-for-explorer.sh index 5c5406c..659160b 100644 --- a/chain138-snap/scripts/build-snap-site-for-explorer.sh +++ b/chain138-snap/scripts/build-snap-site-for-explorer.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Build the Snap companion site for https://explorer.d-bis.org/snap/ -# Uses GATSBY_SNAP_API_BASE_URL=https://explorer.d-bis.org so Market data, Bridge, Swap cards work. -# For that to work, explorer.d-bis.org must serve the token-aggregation API at /api/v1/... (deploy +# Build the Snap companion site for https://blockscout.defi-oracle.io/snap/ +# Uses GATSBY_SNAP_API_BASE_URL=https://blockscout.defi-oracle.io so Market data, Bridge, Swap cards work. +# For that to work, blockscout.defi-oracle.io must serve the token-aggregation API at /api/v1/... (deploy # smom-dbis-138/services/token-aggregation and proxy it, or set GATSBY_SNAP_API_BASE_URL to the API host). # Output: packages/site/public/ (upload to /var/www/html/snap/ on VMID 5000). set -euo pipefail @@ -9,9 +9,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" cd "$ROOT" export GATSBY_PATH_PREFIX=/snap -export GATSBY_SNAP_API_BASE_URL="${GATSBY_SNAP_API_BASE_URL:-https://explorer.d-bis.org}" +export GATSBY_SNAP_API_BASE_URL="${GATSBY_SNAP_API_BASE_URL:-https://blockscout.defi-oracle.io}" # So "Send on Chain 138" link is absolute HTTPS (avoids redirect to http and mixed-content). -export GATSBY_SNAP_SITE_URL="${GATSBY_SNAP_SITE_URL:-https://explorer.d-bis.org}" +export GATSBY_SNAP_SITE_URL="${GATSBY_SNAP_SITE_URL:-https://blockscout.defi-oracle.io}" # Production: use npm snap so MetaMask does not try to fetch localhost:8080 (GATSBY_* is inlined into client bundle). export GATSBY_SNAP_ORIGIN="${GATSBY_SNAP_ORIGIN:-npm:chain138-snap}" # Required for Gatsby to apply pathPrefix to script/asset URLs (see path prefix docs). diff --git a/provider/chains.js b/provider/chains.js index f926503..a0a3992 100644 --- a/provider/chains.js +++ b/provider/chains.js @@ -26,7 +26,7 @@ export const CHAINS = [ 'https://rpc2.d-bis.org', 'https://rpc.defi-oracle.io', ], - blockExplorerUrls: ['https://explorer.d-bis.org'], + blockExplorerUrls: ['https://explorer.d-bis.org', 'https://blockscout.defi-oracle.io'], iconUrls: [ 'https://raw.githubusercontent.com/ethereum/ethereum.org/main/static/images/eth-diamond-black.png', ], diff --git a/provider/config/DUAL_CHAIN_NETWORKS.json b/provider/config/DUAL_CHAIN_NETWORKS.json index 60e9c04..3799fc3 100644 --- a/provider/config/DUAL_CHAIN_NETWORKS.json +++ b/provider/config/DUAL_CHAIN_NETWORKS.json @@ -4,9 +4,9 @@ "defaultChainId": 138, "explorerUrl": "https://explorer.d-bis.org", "tokenListUrl": "https://explorer.d-bis.org/api/config/token-list", - "generatedBy": "SolaceScanScout", + "generatedBy": "SolaceScan", "chains": [ - {"chainId":"0x8a","chainIdDecimal":138,"chainName":"DeFi Oracle Meta Mainnet","shortName":"dbis","rpcUrls":["https://rpc-http-pub.d-bis.org","https://rpc.d-bis.org","https://rpc2.d-bis.org","https://rpc.defi-oracle.io"],"nativeCurrency":{"name":"Ether","symbol":"ETH","decimals":18},"blockExplorerUrls":["https://explorer.d-bis.org"],"iconUrls":["https://raw.githubusercontent.com/ethereum/ethereum.org/main/static/images/eth-diamond-black.png"],"infoURL":"https://explorer.d-bis.org","explorerApiUrl":"https://explorer.d-bis.org/api/v2","testnet":false}, + {"chainId":"0x8a","chainIdDecimal":138,"chainName":"DeFi Oracle Meta Mainnet","shortName":"dbis","rpcUrls":["https://rpc-http-pub.d-bis.org","https://rpc.d-bis.org","https://rpc2.d-bis.org","https://rpc.defi-oracle.io"],"nativeCurrency":{"name":"Ether","symbol":"ETH","decimals":18},"blockExplorerUrls":["https://explorer.d-bis.org","https://blockscout.defi-oracle.io"],"iconUrls":["https://raw.githubusercontent.com/ethereum/ethereum.org/main/static/images/eth-diamond-black.png"],"infoURL":"https://explorer.d-bis.org","explorerApiUrl":"https://explorer.d-bis.org/api/v2","testnet":false}, {"chainId":"0x1","chainIdDecimal":1,"chainName":"Ethereum Mainnet","shortName":"eth","rpcUrls":["https://eth.llamarpc.com","https://rpc.ankr.com/eth","https://ethereum.publicnode.com","https://1rpc.io/eth"],"nativeCurrency":{"name":"Ether","symbol":"ETH","decimals":18},"blockExplorerUrls":["https://etherscan.io"],"iconUrls":["https://raw.githubusercontent.com/ethereum/ethereum.org/main/static/images/eth-diamond-black.png"],"infoURL":"https://ethereum.org","testnet":false}, {"chainId":"0x9f2c4","chainIdDecimal":651940,"chainName":"ALL Mainnet","shortName":"all","rpcUrls":["https://mainnet-rpc.alltra.global"],"nativeCurrency":{"name":"Ether","symbol":"ETH","decimals":18},"blockExplorerUrls":["https://alltra.global"],"iconUrls":["https://raw.githubusercontent.com/ethereum/ethereum.org/main/static/images/eth-diamond-black.png"],"infoURL":"https://alltra.global","testnet":false}, {"chainId":"0x19","chainIdDecimal":25,"chainName":"Cronos Mainnet","rpcUrls":["https://evm.cronos.org","https://cronos-rpc.publicnode.com"],"nativeCurrency":{"name":"CRO","symbol":"CRO","decimals":18},"blockExplorerUrls":["https://cronos.org/explorer"],"iconUrls":["https://ipfs.io/ipfs/Qma3FKtLce9MjgJgWbtyCxBiPjJ6xi8jGWUSKNS5Jc2ong"]}, diff --git a/scripts/deploy-to-explorer.sh b/scripts/deploy-to-explorer.sh old mode 100755 new mode 100644 index 48a48ea..3bda99e --- a/scripts/deploy-to-explorer.sh +++ b/scripts/deploy-to-explorer.sh @@ -1,309 +1,24 @@ #!/usr/bin/env bash -# Deploy all MetaMask integration changes to explorer.d-bis.org (VMID 5000) -# Phases: 1) Backend API, 2) Frontend, 3) Verify, 4) Optional enhancements +# Deprecated shim for the old monolithic explorer deployment path. set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" -# VMID 5000 connection -VMID=5000 -VMID_IP="192.168.11.140" -PROXMOX_HOST="192.168.11.12" # r630-02 -PROXMOX_USER="${PROXMOX_USER:-root}" +cat </dev/null; then - log_fail "Cannot access VMID $VMID via $PROXMOX_HOST. Check SSH keys and network." - exit 1 - fi - log_ok "Access confirmed" -} - -# Phase 1: Deploy backend API with config routes -deploy_backend_api() { - log_info "=========================================" - log_info "PHASE 1: Deploy backend API (config routes)" - log_info "=========================================" - - # Build Go API - log_info "Building Go API..." - (cd "$REPO_ROOT/explorer-monorepo/backend" && go build -o bin/api-server ./api/rest/cmd/) - log_ok "Go API built: explorer-monorepo/backend/bin/api-server" - - # Copy to VMID 5000 - log_info "Copying API server to VMID $VMID..." - scp -o ConnectTimeout=10 "$REPO_ROOT/explorer-monorepo/backend/bin/api-server" \ - "$PROXMOX_USER@$PROXMOX_HOST:/tmp/api-server-config" - - ssh "$PROXMOX_USER@$PROXMOX_HOST" "pct push $VMID /tmp/api-server-config /usr/local/bin/explorer-config-api && \ - pct exec $VMID -- chmod +x /usr/local/bin/explorer-config-api" - log_ok "API server copied to VMID $VMID:/usr/local/bin/explorer-config-api" - - # Create systemd service - log_info "Creating systemd service for config API..." - ssh "$PROXMOX_USER@$PROXMOX_HOST" "pct exec $VMID -- bash -c 'cat > /etc/systemd/system/explorer-config-api.service < .env.production && \ - echo "NEXT_PUBLIC_CHAIN_ID=138" >> .env.production && \ - pnpm run build) - log_ok "Frontend built" - - # Create deployment tarball - log_info "Creating deployment package..." - (cd "$REPO_ROOT/explorer-monorepo/frontend" && \ - tar czf /tmp/explorer-frontend.tar.gz .next public src package.json next.config.js) - - # Copy to VMID 5000 - log_info "Copying frontend to VMID $VMID..." - scp -o ConnectTimeout=10 /tmp/explorer-frontend.tar.gz \ - "$PROXMOX_USER@$PROXMOX_HOST:/tmp/explorer-frontend.tar.gz" - - ssh "$PROXMOX_USER@$PROXMOX_HOST" "pct push $VMID /tmp/explorer-frontend.tar.gz /tmp/explorer-frontend.tar.gz && \ - pct exec $VMID -- bash -c ' - mkdir -p /opt/explorer-frontend - cd /opt/explorer-frontend - tar xzf /tmp/explorer-frontend.tar.gz - rm /tmp/explorer-frontend.tar.gz - - # Install deps if needed - if ! command -v node &>/dev/null; then - curl -fsSL https://deb.nodesource.com/setup_20.x | bash - - apt-get install -y nodejs - fi - - # Install pnpm if needed - if ! command -v pnpm &>/dev/null; then - npm install -g pnpm@10 - fi - - # Install production deps - pnpm install --prod - '" - - # Create systemd service for Next.js - log_info "Creating Next.js systemd service..." - ssh "$PROXMOX_USER@$PROXMOX_HOST" "pct exec $VMID -- bash -c 'cat > /etc/systemd/system/explorer-frontend.service <