diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 77b01dc4..1b20a29b 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -29,7 +29,7 @@ jobs: run: npm install --global vercel@latest - name: Pull Vercel Environment Information - run: vercel env pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + run: vercel env pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build project run: EXPORT=true yarn build diff --git a/.github/workflows/reindex-embeddings.yaml b/.github/workflows/reindex-embeddings.yaml index 6f5900af..d4985989 100644 --- a/.github/workflows/reindex-embeddings.yaml +++ b/.github/workflows/reindex-embeddings.yaml @@ -4,7 +4,8 @@ env: VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: push: - branches: [main] + tags: + - "*" jobs: reindex-embeddings: runs-on: ubuntu-latest diff --git a/package.json b/package.json index 5af99f27..16c2fc83 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "author": "zetachain", "scripts": { - "build": "yarn clean && next build", + "build": "NODE_OPTIONS=--max-old-space-size=6144 yarn clean && next build", "postbuild": "next-sitemap", "dev": "next dev -p 3001", "lint:fix": "npx eslint --ext .js,.jsx,.ts,.tsx --fix ./src", @@ -46,6 +46,7 @@ "axios": "1.6.5", "bech32": "2.0.0", "clsx": "1.2.1", + "date-fns": "^3.6.0", "cmdk": "1.0.0", "dotenv": "16.3.1", "ethers": "5.7.2", @@ -54,7 +55,7 @@ "lodash-es": "4.17.21", "mdast-util-from-markdown": "2.0.1", "micromark-extension-mdxjs": "3.0.0", - "next": "14.0.4", + "next": "14.2.5", "next-redux-wrapper": "8.1.0", "next-seo": "6.0.0", "next-sitemap": "^4.2.3", @@ -88,6 +89,7 @@ "@emotion/babel-plugin": "11.11.0", "@emotion/babel-plugin-jsx-pragmatic": "0.2.1", "@next/eslint-plugin-next": "12.3.4", + "@types/date-fns": "^2.6.0", "@types/eslint": "8.56.2", "@types/lodash-es": "4.17.12", "@types/node": "17.0.45", diff --git a/public/img/icons/zetachain/horizontal/black-on-gray.png b/public/img/icons/zetachain/horizontal/black-on-gray.png new file mode 100644 index 00000000..a9e7efb8 Binary files /dev/null and b/public/img/icons/zetachain/horizontal/black-on-gray.png differ diff --git a/public/img/icons/zetachain/horizontal/black-on-gray.svg b/public/img/icons/zetachain/horizontal/black-on-gray.svg new file mode 100644 index 00000000..b406dfb8 --- /dev/null +++ b/public/img/icons/zetachain/horizontal/black-on-gray.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/horizontal/black-on-gray@4x.png b/public/img/icons/zetachain/horizontal/black-on-gray@4x.png new file mode 100644 index 00000000..40e35645 Binary files /dev/null and b/public/img/icons/zetachain/horizontal/black-on-gray@4x.png differ diff --git a/public/img/icons/zetachain/horizontal/black-on-white.png b/public/img/icons/zetachain/horizontal/black-on-white.png new file mode 100644 index 00000000..9f3c7a88 Binary files /dev/null and b/public/img/icons/zetachain/horizontal/black-on-white.png differ diff --git a/public/img/icons/zetachain/horizontal/black-on-white.svg b/public/img/icons/zetachain/horizontal/black-on-white.svg new file mode 100644 index 00000000..d1ee8569 --- /dev/null +++ b/public/img/icons/zetachain/horizontal/black-on-white.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/horizontal/black-on-white@4x.png b/public/img/icons/zetachain/horizontal/black-on-white@4x.png new file mode 100644 index 00000000..ec297b6b Binary files /dev/null and b/public/img/icons/zetachain/horizontal/black-on-white@4x.png differ diff --git a/public/img/icons/zetachain/horizontal/green-on-gray.png b/public/img/icons/zetachain/horizontal/green-on-gray.png new file mode 100644 index 00000000..d095854e Binary files /dev/null and b/public/img/icons/zetachain/horizontal/green-on-gray.png differ diff --git a/public/img/icons/zetachain/horizontal/green-on-gray.svg b/public/img/icons/zetachain/horizontal/green-on-gray.svg new file mode 100644 index 00000000..a154e22d --- /dev/null +++ b/public/img/icons/zetachain/horizontal/green-on-gray.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/horizontal/green-on-gray@4x.png b/public/img/icons/zetachain/horizontal/green-on-gray@4x.png new file mode 100644 index 00000000..cdc588ad Binary files /dev/null and b/public/img/icons/zetachain/horizontal/green-on-gray@4x.png differ diff --git a/public/img/icons/zetachain/horizontal/green-on-white.png b/public/img/icons/zetachain/horizontal/green-on-white.png new file mode 100644 index 00000000..0fc086d7 Binary files /dev/null and b/public/img/icons/zetachain/horizontal/green-on-white.png differ diff --git a/public/img/icons/zetachain/horizontal/green-on-white.svg b/public/img/icons/zetachain/horizontal/green-on-white.svg new file mode 100644 index 00000000..c0ece7ae --- /dev/null +++ b/public/img/icons/zetachain/horizontal/green-on-white.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/horizontal/green-on-white@4x.png b/public/img/icons/zetachain/horizontal/green-on-white@4x.png new file mode 100644 index 00000000..b12bccd7 Binary files /dev/null and b/public/img/icons/zetachain/horizontal/green-on-white@4x.png differ diff --git a/public/img/icons/zetachain/horizontal/white-on-green.png b/public/img/icons/zetachain/horizontal/white-on-green.png new file mode 100644 index 00000000..6da5465c Binary files /dev/null and b/public/img/icons/zetachain/horizontal/white-on-green.png differ diff --git a/public/img/icons/zetachain/horizontal/white-on-green.svg b/public/img/icons/zetachain/horizontal/white-on-green.svg new file mode 100644 index 00000000..4c63e507 --- /dev/null +++ b/public/img/icons/zetachain/horizontal/white-on-green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/horizontal/white-on-green@4x.png b/public/img/icons/zetachain/horizontal/white-on-green@4x.png new file mode 100644 index 00000000..31aa55a8 Binary files /dev/null and b/public/img/icons/zetachain/horizontal/white-on-green@4x.png differ diff --git a/public/img/icons/zetachain/round/black-on-white-1.png b/public/img/icons/zetachain/round/black-on-white-1.png new file mode 100644 index 00000000..52e78102 Binary files /dev/null and b/public/img/icons/zetachain/round/black-on-white-1.png differ diff --git a/public/img/icons/zetachain/round/black-on-white-1.svg b/public/img/icons/zetachain/round/black-on-white-1.svg new file mode 100644 index 00000000..00eb2df8 --- /dev/null +++ b/public/img/icons/zetachain/round/black-on-white-1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/round/black-on-white.png b/public/img/icons/zetachain/round/black-on-white.png new file mode 100644 index 00000000..5c1776d9 Binary files /dev/null and b/public/img/icons/zetachain/round/black-on-white.png differ diff --git a/public/img/icons/zetachain/round/black-on-white.svg b/public/img/icons/zetachain/round/black-on-white.svg new file mode 100644 index 00000000..fbf1d8b1 --- /dev/null +++ b/public/img/icons/zetachain/round/black-on-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/round/black-on-white@4x-1.png b/public/img/icons/zetachain/round/black-on-white@4x-1.png new file mode 100644 index 00000000..aa635536 Binary files /dev/null and b/public/img/icons/zetachain/round/black-on-white@4x-1.png differ diff --git a/public/img/icons/zetachain/round/black-on-white@4x.png b/public/img/icons/zetachain/round/black-on-white@4x.png new file mode 100644 index 00000000..17b8bea8 Binary files /dev/null and b/public/img/icons/zetachain/round/black-on-white@4x.png differ diff --git a/public/img/icons/zetachain/round/green-on-white-1.png b/public/img/icons/zetachain/round/green-on-white-1.png new file mode 100644 index 00000000..d882f12d Binary files /dev/null and b/public/img/icons/zetachain/round/green-on-white-1.png differ diff --git a/public/img/icons/zetachain/round/green-on-white-1.svg b/public/img/icons/zetachain/round/green-on-white-1.svg new file mode 100644 index 00000000..daa18c12 --- /dev/null +++ b/public/img/icons/zetachain/round/green-on-white-1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/round/green-on-white.png b/public/img/icons/zetachain/round/green-on-white.png new file mode 100644 index 00000000..598c7fd9 Binary files /dev/null and b/public/img/icons/zetachain/round/green-on-white.png differ diff --git a/public/img/icons/zetachain/round/green-on-white.svg b/public/img/icons/zetachain/round/green-on-white.svg new file mode 100644 index 00000000..c947bad5 --- /dev/null +++ b/public/img/icons/zetachain/round/green-on-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/round/green-on-white@4x-1.png b/public/img/icons/zetachain/round/green-on-white@4x-1.png new file mode 100644 index 00000000..1b3e53ec Binary files /dev/null and b/public/img/icons/zetachain/round/green-on-white@4x-1.png differ diff --git a/public/img/icons/zetachain/round/green-on-white@4x.png b/public/img/icons/zetachain/round/green-on-white@4x.png new file mode 100644 index 00000000..a6734bc3 Binary files /dev/null and b/public/img/icons/zetachain/round/green-on-white@4x.png differ diff --git a/public/img/icons/zetachain/round/white-on-green.png b/public/img/icons/zetachain/round/white-on-green.png new file mode 100644 index 00000000..cafdd139 Binary files /dev/null and b/public/img/icons/zetachain/round/white-on-green.png differ diff --git a/public/img/icons/zetachain/round/white-on-green.svg b/public/img/icons/zetachain/round/white-on-green.svg new file mode 100644 index 00000000..2aa5b534 --- /dev/null +++ b/public/img/icons/zetachain/round/white-on-green.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/round/white-on-green@4x.png b/public/img/icons/zetachain/round/white-on-green@4x.png new file mode 100644 index 00000000..a3b28c98 Binary files /dev/null and b/public/img/icons/zetachain/round/white-on-green@4x.png differ diff --git a/public/img/icons/zetachain/square/black-on-white-1.png b/public/img/icons/zetachain/square/black-on-white-1.png new file mode 100644 index 00000000..13cc635d Binary files /dev/null and b/public/img/icons/zetachain/square/black-on-white-1.png differ diff --git a/public/img/icons/zetachain/square/black-on-white-1.svg b/public/img/icons/zetachain/square/black-on-white-1.svg new file mode 100644 index 00000000..d69f9895 --- /dev/null +++ b/public/img/icons/zetachain/square/black-on-white-1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/square/black-on-white.png b/public/img/icons/zetachain/square/black-on-white.png new file mode 100644 index 00000000..d6b3de67 Binary files /dev/null and b/public/img/icons/zetachain/square/black-on-white.png differ diff --git a/public/img/icons/zetachain/square/black-on-white.svg b/public/img/icons/zetachain/square/black-on-white.svg new file mode 100644 index 00000000..c1091f78 --- /dev/null +++ b/public/img/icons/zetachain/square/black-on-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/square/black-on-white@4x-1.png b/public/img/icons/zetachain/square/black-on-white@4x-1.png new file mode 100644 index 00000000..7807a9f2 Binary files /dev/null and b/public/img/icons/zetachain/square/black-on-white@4x-1.png differ diff --git a/public/img/icons/zetachain/square/black-on-white@4x.png b/public/img/icons/zetachain/square/black-on-white@4x.png new file mode 100644 index 00000000..4d039050 Binary files /dev/null and b/public/img/icons/zetachain/square/black-on-white@4x.png differ diff --git a/public/img/icons/zetachain/square/green-on-white-1.png b/public/img/icons/zetachain/square/green-on-white-1.png new file mode 100644 index 00000000..e1227ac0 Binary files /dev/null and b/public/img/icons/zetachain/square/green-on-white-1.png differ diff --git a/public/img/icons/zetachain/square/green-on-white-1.svg b/public/img/icons/zetachain/square/green-on-white-1.svg new file mode 100644 index 00000000..501cadc3 --- /dev/null +++ b/public/img/icons/zetachain/square/green-on-white-1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/square/green-on-white.png b/public/img/icons/zetachain/square/green-on-white.png new file mode 100644 index 00000000..2c18cb5b Binary files /dev/null and b/public/img/icons/zetachain/square/green-on-white.png differ diff --git a/public/img/icons/zetachain/square/green-on-white.svg b/public/img/icons/zetachain/square/green-on-white.svg new file mode 100644 index 00000000..12cd8d30 --- /dev/null +++ b/public/img/icons/zetachain/square/green-on-white.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/square/green-on-white@4x-1.png b/public/img/icons/zetachain/square/green-on-white@4x-1.png new file mode 100644 index 00000000..63857299 Binary files /dev/null and b/public/img/icons/zetachain/square/green-on-white@4x-1.png differ diff --git a/public/img/icons/zetachain/square/green-on-white@4x.png b/public/img/icons/zetachain/square/green-on-white@4x.png new file mode 100644 index 00000000..b0644ff4 Binary files /dev/null and b/public/img/icons/zetachain/square/green-on-white@4x.png differ diff --git a/public/img/icons/zetachain/square/white-on-green.png b/public/img/icons/zetachain/square/white-on-green.png new file mode 100644 index 00000000..a0a848cf Binary files /dev/null and b/public/img/icons/zetachain/square/white-on-green.png differ diff --git a/public/img/icons/zetachain/square/white-on-green.svg b/public/img/icons/zetachain/square/white-on-green.svg new file mode 100644 index 00000000..cdc2737a --- /dev/null +++ b/public/img/icons/zetachain/square/white-on-green.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/img/icons/zetachain/square/white-on-green@4x.png b/public/img/icons/zetachain/square/white-on-green@4x.png new file mode 100644 index 00000000..ff9498eb Binary files /dev/null and b/public/img/icons/zetachain/square/white-on-green@4x.png differ diff --git a/public/img/icons/zetachain/vertical/black-on-gray.png b/public/img/icons/zetachain/vertical/black-on-gray.png new file mode 100644 index 00000000..229ed01e Binary files /dev/null and b/public/img/icons/zetachain/vertical/black-on-gray.png differ diff --git a/public/img/icons/zetachain/vertical/black-on-gray.svg b/public/img/icons/zetachain/vertical/black-on-gray.svg new file mode 100644 index 00000000..aa8a0e00 --- /dev/null +++ b/public/img/icons/zetachain/vertical/black-on-gray.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/vertical/black-on-gray@4x.png b/public/img/icons/zetachain/vertical/black-on-gray@4x.png new file mode 100644 index 00000000..4308e646 Binary files /dev/null and b/public/img/icons/zetachain/vertical/black-on-gray@4x.png differ diff --git a/public/img/icons/zetachain/vertical/black-on-white.png b/public/img/icons/zetachain/vertical/black-on-white.png new file mode 100644 index 00000000..8a2180d7 Binary files /dev/null and b/public/img/icons/zetachain/vertical/black-on-white.png differ diff --git a/public/img/icons/zetachain/vertical/black-on-white.svg b/public/img/icons/zetachain/vertical/black-on-white.svg new file mode 100644 index 00000000..245d8b13 --- /dev/null +++ b/public/img/icons/zetachain/vertical/black-on-white.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/vertical/black-on-white@4x.png b/public/img/icons/zetachain/vertical/black-on-white@4x.png new file mode 100644 index 00000000..257dc0b7 Binary files /dev/null and b/public/img/icons/zetachain/vertical/black-on-white@4x.png differ diff --git a/public/img/icons/zetachain/vertical/green-on-gray.png b/public/img/icons/zetachain/vertical/green-on-gray.png new file mode 100644 index 00000000..9fd4b964 Binary files /dev/null and b/public/img/icons/zetachain/vertical/green-on-gray.png differ diff --git a/public/img/icons/zetachain/vertical/green-on-gray.svg b/public/img/icons/zetachain/vertical/green-on-gray.svg new file mode 100644 index 00000000..49cd4293 --- /dev/null +++ b/public/img/icons/zetachain/vertical/green-on-gray.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/vertical/green-on-gray@4x.png b/public/img/icons/zetachain/vertical/green-on-gray@4x.png new file mode 100644 index 00000000..eb20362a Binary files /dev/null and b/public/img/icons/zetachain/vertical/green-on-gray@4x.png differ diff --git a/public/img/icons/zetachain/vertical/green-on-white.png b/public/img/icons/zetachain/vertical/green-on-white.png new file mode 100644 index 00000000..58e77726 Binary files /dev/null and b/public/img/icons/zetachain/vertical/green-on-white.png differ diff --git a/public/img/icons/zetachain/vertical/green-on-white.svg b/public/img/icons/zetachain/vertical/green-on-white.svg new file mode 100644 index 00000000..51c21c18 --- /dev/null +++ b/public/img/icons/zetachain/vertical/green-on-white.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/vertical/green-on-white@4x.png b/public/img/icons/zetachain/vertical/green-on-white@4x.png new file mode 100644 index 00000000..d2ba3d56 Binary files /dev/null and b/public/img/icons/zetachain/vertical/green-on-white@4x.png differ diff --git a/public/img/icons/zetachain/vertical/white-on-green.png b/public/img/icons/zetachain/vertical/white-on-green.png new file mode 100644 index 00000000..077e763c Binary files /dev/null and b/public/img/icons/zetachain/vertical/white-on-green.png differ diff --git a/public/img/icons/zetachain/vertical/white-on-green.svg b/public/img/icons/zetachain/vertical/white-on-green.svg new file mode 100644 index 00000000..9e540d53 --- /dev/null +++ b/public/img/icons/zetachain/vertical/white-on-green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/public/img/icons/zetachain/vertical/white-on-green@4x.png b/public/img/icons/zetachain/vertical/white-on-green@4x.png new file mode 100644 index 00000000..62cd0217 Binary files /dev/null and b/public/img/icons/zetachain/vertical/white-on-green@4x.png differ diff --git a/src/components/Cmdk/components/MarkdownMesage.tsx b/src/components/Cmdk/components/MarkdownMesage.tsx index 99117bf9..f178da78 100644 --- a/src/components/Cmdk/components/MarkdownMesage.tsx +++ b/src/components/Cmdk/components/MarkdownMesage.tsx @@ -31,12 +31,11 @@ export const MarkdownMessage: React.FC = ({ closeCmdk, mes ), a: ({ children, ref, ...args }) => { if (typeof args.href !== "string") return null; - const isAbsoluteHref = args.href?.startsWith("http"); return ( diff --git a/src/components/Docs/components/ContractAddresses.tsx b/src/components/Docs/components/ContractAddresses.tsx index 6f8cf912..e467acf8 100644 --- a/src/components/Docs/components/ContractAddresses.tsx +++ b/src/components/Docs/components/ContractAddresses.tsx @@ -15,8 +15,8 @@ type ContractAddressData = { type ContractAddressesByChain = Record; const addressesUrl: Record = { - testnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/data/addresses.testnet.json", - mainnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/data/addresses.mainnet.json", + testnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/v1/data/addresses.testnet.json", + mainnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/v1/data/addresses.mainnet.json", }; const groupDataByChain = (data: ContractAddressData[]) => diff --git a/src/components/Docs/components/NodeSnapshots.tsx b/src/components/Docs/components/NodeSnapshots.tsx new file mode 100644 index 00000000..4292fc16 --- /dev/null +++ b/src/components/Docs/components/NodeSnapshots.tsx @@ -0,0 +1,134 @@ +import axios from "axios"; +import { format } from "date-fns"; +import React, { useEffect, useMemo, useState } from "react"; + +import { LoadingTable, NetworkTypeTabs, networkTypeTabs } from "~/components/shared"; + +interface NodeSnapshotsProps { + apiUrl: string; +} + +interface Snapshot { + environment: string; + type: string; + networkVersion?: string; + height?: number; + creationDate?: string; + link?: string; +} + +const NodeSnapshots: React.FC = ({ apiUrl }) => { + const [mainnetSnapshots, setMainnetSnapshots] = useState([]); + const [testnetSnapshots, setTestnetSnapshots] = useState([]); + const [isLoading, setIsLoading] = useState(true); + const [activeTab, setActiveTab] = useState(networkTypeTabs[0]); + + useEffect(() => { + const fetchData = async () => { + const endpoints = [ + `${apiUrl}/testnet/fullnode/latest.json`, + `${apiUrl}/testnet/archive/latest.json`, + `${apiUrl}/mainnet/fullnode/latest.json`, + `${apiUrl}/mainnet/archive/latest.json`, + ]; + + const fetchEndpoint = async (endpoint: string) => { + try { + const response = await axios.get(endpoint); + if (response.config.url) { + const urlParts = response.config.url.split("/"); + const type = urlParts[urlParts.length - 2]; + const environment = urlParts[urlParts.length - 3]; + return response.data.snapshots.map((snapshot: any) => ({ + ...snapshot, + environment, + type, + })); + } + } catch (error) { + if (axios.isAxiosError(error) && error.response?.status === 404) { + const urlParts = endpoint.split("/"); + const type = urlParts[urlParts.length - 2]; + const environment = urlParts[urlParts.length - 3]; + return [ + { + environment, + type, + }, + ]; + } else { + console.error("Error fetching data", error); + } + } + return []; + }; + + const allData = await Promise.all(endpoints.map((endpoint) => fetchEndpoint(endpoint))); + const combinedData = allData.flat(); + + setMainnetSnapshots(combinedData.filter((snapshot) => snapshot.environment === "mainnet")); + setTestnetSnapshots(combinedData.filter((snapshot) => snapshot.environment === "testnet")); + setIsLoading(false); + }; + + fetchData(); + }, [apiUrl]); + + const formatDate = (dateString?: string) => { + if (!dateString) { + return ""; + } + const date = new Date(dateString); + if (Number.isNaN(date.getTime())) { + return "Invalid date"; + } + return format(date, "PPPpp"); + }; + + const snapshots = useMemo(() => { + return activeTab.networkType === "mainnet" ? mainnetSnapshots : testnetSnapshots; + }, [activeTab.networkType, mainnetSnapshots, testnetSnapshots]); + + return ( +
+ + + {isLoading ? ( + + ) : ( +
+ + + + + + + + + + + + {snapshots.map((snapshot, index) => ( + + + + + + + + ))} + +
TypeNetwork VersionHeightCreation DateDownload
{snapshot.type}{snapshot.networkVersion || ""}{snapshot.height || ""}{formatDate(snapshot.creationDate)} + {snapshot.link ? ( + + + + ) : null} +
+
+ )} +
+ ); +}; + +export default NodeSnapshots; diff --git a/src/components/Docs/components/ZetaTokenTable.tsx b/src/components/Docs/components/ZetaTokenTable.tsx index 25b4a187..9161f7d0 100644 --- a/src/components/Docs/components/ZetaTokenTable.tsx +++ b/src/components/Docs/components/ZetaTokenTable.tsx @@ -4,8 +4,8 @@ import { LoadingTable, NetworkTypeTabs, networkTypeTabs } from "~/components/sha import { NetworkType } from "~/lib/app.types"; const API: Record = { - mainnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/data/addresses.mainnet.json", - testnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/data/addresses.testnet.json", + mainnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/v1/data/addresses.mainnet.json", + testnet: "https://raw.githubusercontent.com/zeta-chain/protocol-contracts/main/v1/data/addresses.testnet.json", }; type AddressData = { diff --git a/src/components/Docs/index.ts b/src/components/Docs/index.ts index 14e9a09d..58ecac2c 100644 --- a/src/components/Docs/index.ts +++ b/src/components/Docs/index.ts @@ -8,6 +8,7 @@ export * from "./components/ForeignCoinsTable"; export * from "./components/GovParams"; export * from "./components/GovUpgradeProposals"; export * from "./components/NetworkDetails"; +export { default as NodeSnapshots } from "./components/NodeSnapshots"; export * from "./components/ObserverList"; export * from "./components/ObserverParams"; export * from "./components/OpenAPIBrowser"; diff --git a/src/pages/nodes/start-here/syncing.mdx b/src/pages/nodes/start-here/syncing.mdx index 1462b758..e62157a3 100644 --- a/src/pages/nodes/start-here/syncing.mdx +++ b/src/pages/nodes/start-here/syncing.mdx @@ -3,6 +3,7 @@ title: Syncing a Node --- import { Alert } from "~/components/shared"; +import { NodeSnapshots } from "~/components/Docs"; This guide assumes you've completed the [Setting Up Your Node](/nodes/start-here/setup) step. @@ -10,24 +11,23 @@ import { Alert } from "~/components/shared"; # Option 1: Snapshot method -Syncing with a snapshot downloads the data directory from an existing node. +Downloads the data directory backed up from an existing node. -Choose the network and the snapshot type, fetch the URL and follow instructions -returned in response. +Choose the network and snapshot type, download the snapshot and extract the snapshot +inside `~/.zetacored` directory. -| Network | Type | URL | -| ------- | ---------------- | ----------------------------------------------------------------------- | -| Mainnet | Snapshot | https://snapshots.zetachain.com/latest-snapshot?network=mainnet | -| Mainnet | Archive Snapshot | https://snapshots.zetachain.com/latest-archive-snapshot?network=mainnet | -| Testnet | Snapshot | https://snapshots.zetachain.com/latest-snapshot?network=athens3 | -| Testnet | Archive Snapshot | https://snapshots.zetachain.com/latest-archive-snapshot?network=athens3 | + -Untar the file inside `~/.zetacored` and start the node. + + Note: Our nodes database backend is `pebbledb`. Ensure that your node is configured to + use the same backend to utilize our snapshots. + #### Alternative snapshots - https://polkachu.com/tendermint_snapshots/zetachain - https://app.nodejumper.io/zetachain/sync +- https://app.nodejumper.io/zetachain-testnet/sync # Option 2: KYVE's KSYNC method @@ -71,7 +71,7 @@ https://github.com/BlockPILabs/cosmos-db. ### Sync the Node ``` -ksync state-sync --binary="/path/to/zetacored" --chain-id=kaon-1 --snapshot-pool-id=11 +ksync state-sync --binary="/path/to/zetacored" --chain-id=zetachain_7000-1 --snapshot-pool-id=11 ``` # Checking Node Health diff --git a/yarn.lock b/yarn.lock index cb8376b4..78044788 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2706,10 +2706,10 @@ dependencies: webpack-bundle-analyzer "4.7.0" -"@next/env@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/env/-/env-14.0.4.tgz#d5cda0c4a862d70ae760e58c0cd96a8899a2e49a" - integrity sha512-irQnbMLbUNQpP1wcE5NstJtbuA/69kRfzBrpAD7Gsn8zm/CY6YQYc3HQBz8QPxwISG26tIm5afvvVbu508oBeQ== +"@next/env@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.5.tgz#1d9328ab828711d3517d0a1d505acb55e5ef7ad0" + integrity sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA== "@next/env@^13.4.3": version "13.5.6" @@ -2730,50 +2730,50 @@ dependencies: glob "7.1.7" -"@next/swc-darwin-arm64@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.4.tgz#27b1854c2cd04eb1d5e75081a1a792ad91526618" - integrity sha512-mF05E/5uPthWzyYDyptcwHptucf/jj09i2SXBPwNzbgBNc+XnwzrL0U6BmPjQeOL+FiB+iG1gwBeq7mlDjSRPg== - -"@next/swc-darwin-x64@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.4.tgz#9940c449e757d0ee50bb9e792d2600cc08a3eb3b" - integrity sha512-IZQ3C7Bx0k2rYtrZZxKKiusMTM9WWcK5ajyhOZkYYTCc8xytmwSzR1skU7qLgVT/EY9xtXDG0WhY6fyujnI3rw== - -"@next/swc-linux-arm64-gnu@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.4.tgz#0eafd27c8587f68ace7b4fa80695711a8434de21" - integrity sha512-VwwZKrBQo/MGb1VOrxJ6LrKvbpo7UbROuyMRvQKTFKhNaXjUmKTu7wxVkIuCARAfiI8JpaWAnKR+D6tzpCcM4w== - -"@next/swc-linux-arm64-musl@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.4.tgz#2b0072adb213f36dada5394ea67d6e82069ae7dd" - integrity sha512-8QftwPEW37XxXoAwsn+nXlodKWHfpMaSvt81W43Wh8dv0gkheD+30ezWMcFGHLI71KiWmHK5PSQbTQGUiidvLQ== - -"@next/swc-linux-x64-gnu@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.4.tgz#68c67d20ebc8e3f6ced6ff23a4ba2a679dbcec32" - integrity sha512-/s/Pme3VKfZAfISlYVq2hzFS8AcAIOTnoKupc/j4WlvF6GQ0VouS2Q2KEgPuO1eMBwakWPB1aYFIA4VNVh667A== - -"@next/swc-linux-x64-musl@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.4.tgz#67cd81b42fb2caf313f7992fcf6d978af55a1247" - integrity sha512-m8z/6Fyal4L9Bnlxde5g2Mfa1Z7dasMQyhEhskDATpqr+Y0mjOBZcXQ7G5U+vgL22cI4T7MfvgtrM2jdopqWaw== - -"@next/swc-win32-arm64-msvc@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.4.tgz#be06585906b195d755ceda28f33c633e1443f1a3" - integrity sha512-7Wv4PRiWIAWbm5XrGz3D8HUkCVDMMz9igffZG4NB1p4u1KoItwx9qjATHz88kwCEal/HXmbShucaslXCQXUM5w== - -"@next/swc-win32-ia32-msvc@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.4.tgz#e76cabefa9f2d891599c3d85928475bd8d3f6600" - integrity sha512-zLeNEAPULsl0phfGb4kdzF/cAVIfaC7hY+kt0/d+y9mzcZHsMS3hAS829WbJ31DkSlVKQeHEjZHIdhN+Pg7Gyg== - -"@next/swc-win32-x64-msvc@14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.4.tgz#e74892f1a9ccf41d3bf5979ad6d3d77c07b9cba1" - integrity sha512-yEh2+R8qDlDCjxVpzOTEpBLQTEFAcP2A8fUFLaWNap9GitYKkKv1//y2S6XY6zsR4rCOPRpU7plYDR+az2n30A== +"@next/swc-darwin-arm64@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.5.tgz#d0a160cf78c18731c51cc0bff131c706b3e9bb05" + integrity sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ== + +"@next/swc-darwin-x64@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.5.tgz#eb832a992407f6e6352eed05a073379f1ce0589c" + integrity sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA== + +"@next/swc-linux-arm64-gnu@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.5.tgz#098fdab57a4664969bc905f5801ef5a89582c689" + integrity sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA== + +"@next/swc-linux-arm64-musl@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.5.tgz#243a1cc1087fb75481726dd289c7b219fa01f2b5" + integrity sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA== + +"@next/swc-linux-x64-gnu@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.5.tgz#b8a2e436387ee4a52aa9719b718992e0330c4953" + integrity sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ== + +"@next/swc-linux-x64-musl@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.5.tgz#cb8a9adad5fb8df86112cfbd363aab5c6d32757b" + integrity sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ== + +"@next/swc-win32-arm64-msvc@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.5.tgz#81f996c1c38ea0900d4e7719cc8814be8a835da0" + integrity sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw== + +"@next/swc-win32-ia32-msvc@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.5.tgz#f61c74ce823e10b2bc150e648fc192a7056422e0" + integrity sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg== + +"@next/swc-win32-x64-msvc@14.2.5": + version "14.2.5" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.5.tgz#ed199a920efb510cfe941cd75ed38a7be21e756f" + integrity sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g== "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" @@ -4707,11 +4707,17 @@ "@swagger-api/apidom-parser-adapter-workflows-yaml-1" "^0.99.2" "@swagger-api/apidom-parser-adapter-yaml-1-2" "^0.99.2" -"@swc/helpers@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d" - integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw== +"@swc/counter@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9" + integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== + +"@swc/helpers@0.5.5": + version "0.5.5" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.5.tgz#12689df71bfc9b21c4f4ca00ae55f2f16c8b77c0" + integrity sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A== dependencies: + "@swc/counter" "^0.1.3" tslib "^2.4.0" "@t3-oss/env-core@0.7.1": @@ -6132,11 +6138,16 @@ camelcase@^6.0.0, camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001587: +caniuse-lite@^1.0.30001538, caniuse-lite@^1.0.30001587: version "1.0.30001616" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz#4342712750d35f71ebba9fcac65e2cf8870013c3" integrity sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw== +caniuse-lite@^1.0.30001579: + version "1.0.30001645" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001645.tgz#4c4b7427683dea1170a152cd1654be8d0da7bd71" + integrity sha512-GFtY2+qt91kzyMk6j48dJcwJVq5uTkk71XxE3RtScx7XWRLsO7bU44LOFkOZYR8w9YMS0UhPSYpN/6rAMImmLw== + ccount@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" @@ -8508,11 +8519,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -11465,29 +11471,28 @@ next-themes@^0.2.1: resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.2.1.tgz#0c9f128e847979daf6c67f70b38e6b6567856e45" integrity sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A== -next@14.0.4: - version "14.0.4" - resolved "https://registry.yarnpkg.com/next/-/next-14.0.4.tgz#bf00b6f835b20d10a5057838fa2dfced1d0d84dc" - integrity sha512-qbwypnM7327SadwFtxXnQdGiKpkuhaRLE2uq62/nRul9cj9KhQ5LhHmlziTNqUidZotw/Q1I9OjirBROdUJNgA== +next@14.2.5: + version "14.2.5" + resolved "https://registry.yarnpkg.com/next/-/next-14.2.5.tgz#afe4022bb0b752962e2205836587a289270efbea" + integrity sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA== dependencies: - "@next/env" "14.0.4" - "@swc/helpers" "0.5.2" + "@next/env" "14.2.5" + "@swc/helpers" "0.5.5" busboy "1.6.0" - caniuse-lite "^1.0.30001406" + caniuse-lite "^1.0.30001579" graceful-fs "^4.2.11" postcss "8.4.31" styled-jsx "5.1.1" - watchpack "2.4.0" optionalDependencies: - "@next/swc-darwin-arm64" "14.0.4" - "@next/swc-darwin-x64" "14.0.4" - "@next/swc-linux-arm64-gnu" "14.0.4" - "@next/swc-linux-arm64-musl" "14.0.4" - "@next/swc-linux-x64-gnu" "14.0.4" - "@next/swc-linux-x64-musl" "14.0.4" - "@next/swc-win32-arm64-msvc" "14.0.4" - "@next/swc-win32-ia32-msvc" "14.0.4" - "@next/swc-win32-x64-msvc" "14.0.4" + "@next/swc-darwin-arm64" "14.2.5" + "@next/swc-darwin-x64" "14.2.5" + "@next/swc-linux-arm64-gnu" "14.2.5" + "@next/swc-linux-arm64-musl" "14.2.5" + "@next/swc-linux-x64-gnu" "14.2.5" + "@next/swc-linux-x64-musl" "14.2.5" + "@next/swc-win32-arm64-msvc" "14.2.5" + "@next/swc-win32-ia32-msvc" "14.2.5" + "@next/swc-win32-x64-msvc" "14.2.5" nextra-theme-docs@2.13.4: version "2.13.4" @@ -14461,14 +14466,6 @@ vscode-textmate@^8.0.0: resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== -watchpack@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"