From b6714b2218b37158d0d59b7ca3fec11f9d974fa5 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Thu, 1 Feb 2024 17:15:10 +0400 Subject: [PATCH] endpoint list --- docs/reference/api.mdx | 20 +---- docs/reference/details.mdx | 15 ++++ docs/validators/cosmovisor.mdx | 40 ++++----- docs/validators/node.mdx | 7 +- docs/validators/requirements.mdx | 8 +- .../NetworkDetails/NetworkDetails.tsx | 84 +++++++++++++++++++ 6 files changed, 131 insertions(+), 43 deletions(-) create mode 100644 docs/reference/details.mdx create mode 100644 src/components/NetworkDetails/NetworkDetails.tsx diff --git a/docs/reference/api.mdx b/docs/reference/api.mdx index 236a00b2..9a9fc143 100644 --- a/docs/reference/api.mdx +++ b/docs/reference/api.mdx @@ -1,27 +1,13 @@ --- -sidebar_position: 0 +sidebar_position: 1 --- import EndpointList from "@site/src/components/EndpointList/EndpointList"; # API/RPC endpoints -Below is a list of public API endpoints that can be used to interact with the -ZetaChain testnet. - -Temporary table of mainnet beta API/RPC. Remove when endpoints are added to -`zeta-chain/networks` repo. - -| Name | Provider | URL | -| --------------------- | ------------- | --------------------------------------------------------------- | -| Cosmos SDK HTTP API | BlockPI | https://zetachain.blockpi.network:443/lcd/v1/public | -| Comet BFT HTTP API | BlockPI | https://zetachain.blockpi.network:443/rpc/v1/public | -| EVM RPC | BlockPI | https://zetachain-evm.blockpi.network:443/v1/rpc/public | -| EVM JSON RPC | All That Node | https://zetachain-mainnet-archive.allthatnode.com:8545 | -| EVM WebSocket | All That Node | wss://zetachain-mainnet-archive.allthatnode.com:8546 | -| Cosmos SDK HTTP API | All That Node | https://zetachain-mainnet-archive.allthatnode.com:1317 | -| Comet BFT JSON RPC | All That Node | https://zetachain-mainnet-archive.allthatnode.com:26657 | -| Tendermint WebSocket: | All That Node | wss://zetachain-mainnet-archive.allthatnode.com:26657/websocket | +Below is a list of public API endpoints that can be used to interact with +ZetaChain. diff --git a/docs/reference/details.mdx b/docs/reference/details.mdx new file mode 100644 index 00000000..a98566e3 --- /dev/null +++ b/docs/reference/details.mdx @@ -0,0 +1,15 @@ +--- +sidebar_position: 0 +--- + +import NetworkDetails from "@site/src/components/NetworkDetails/NetworkDetails"; + +# Network Details + + + +For additional EVM RPC endpoints, see the [API/RPC endpoints](/reference/api) +page. + +For additional explorers, see the [Services and Providers](/reference/services) +page. diff --git a/docs/validators/cosmovisor.mdx b/docs/validators/cosmovisor.mdx index a8902555..8d826c04 100644 --- a/docs/validators/cosmovisor.mdx +++ b/docs/validators/cosmovisor.mdx @@ -18,9 +18,10 @@ mv $GOPATH/bin/cosmovisor /usr/local/bin/cosmovisor ### Download Cosmovisor Binary Download the Binary for your system architecture from the following links and -place it in your $PATH -amd64: https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-amd64.tar.gz -arm64: https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-arm64.tar.gz +place it in your $PATH amd64: +https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-amd64.tar.gz +arm64: +https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2Fv1.5.0/cosmovisor-v1.5.0-linux-arm64.tar.gz This example assumes you are using amd64 architecture. If you are using arm64 replace amd64 with arm64 in the commands below. @@ -43,8 +44,8 @@ mkdir -p ~/.zetacored/cosmovisor/upgrades ### Setup `cosmovisor` systemd service -In this example we'll run Cosmovisor as a systemd service. You can also run it as -a docker container or as a standalone process. The environment variables are +In this example we'll run Cosmovisor as a systemd service. You can also run it +as a docker container or as a standalone process. The environment variables are explained in the [Environment Variables](#environment-variables) section at the end of this document. @@ -82,10 +83,10 @@ ExecStart=cosmovisor start --home /home/zetachain/.zetacored/ --log_format json ### Download `zetacored` Binary -Download the latest `zetacored` binary for your system architecture from the following -links and place it in the `cosmovisor/genesis/bin/` directory. This example -assumes you are using ubuntu 22 on amd64 architecture. You may need to make -adjustments for your system. +Download the latest `zetacored` binary for your system architecture from the +following links and place it in the `cosmovisor/genesis/bin/` directory. This +example assumes you are using ubuntu 22 on amd64 architecture. You may need to +make adjustments for your system. ```bash wget https://github.com/zeta-chain/node/releases/latest/download/zetacored-ubuntu-22-amd64 @@ -96,8 +97,8 @@ chmod +x ~/.zetacored/cosmovisor/genesis/bin/zetacored ### Install ZetaChain Configuration Files -ZetaChain configuration files for the Athens3 Testnet can be downloaded from the [Athens3 Github -Repo](https://github.com/zeta-chain/network-athens3/tree/main/network_files/config) +ZetaChain configuration files for the Athens3 Testnet can be downloaded from the +[Athens3 Github Repo](https://github.com/zeta-chain/network-athens3/tree/main/network_files/config) Install them as follows: @@ -112,8 +113,7 @@ cp network-athens3/network_files/config/* ~/.zetacored/config/ You may choose to sync the state of your node from a snapshot. This will speed up the time it takes to sync your node. Instructions for syncing from a snapshot -can be found -[here](/validators/running-a-full-node/#state-sync). +can be found [here](/validators/running-a-full-node/#state-sync). ### Start the `cosmovisor` Service @@ -142,16 +142,18 @@ load, Memory Usage, Disk usage and Disk IO) for any performance degradation. ZetaChain Core generates a log that can be monitored for errors and used for troubleshooting. If you install Zetacore as a Systemd service using the -instructions above you can view this log with `journalctl -o cat -f -u zetacored`. +instructions above you can view this log with +`journalctl -o cat -f -u zetacored`. Prometheus can be enabled to serve metrics which can be consumed by Prometheus collector(s). Telemetry include Prometheus metrics can be enabled in the -app.toml file. See the [CosmosSDK Telemetry -Documentation](https://docs.cosmos.network/v0.46/core/telemetry.html) for more -information. +app.toml file. See the +[CosmosSDK Telemetry Documentation](https://docs.cosmos.network/v0.46/core/telemetry.html) +for more information. -See more about your Validator Monitoring [here](/reference/validators-monitoring). +See more about your Validator Monitoring [here](/validators/monitoring). ## More Information About Cosmovisor -For more detailed information about Cosmosvisor you can visit the [Cosmos Documentation Here](https://docs.cosmos.network/main/build/tooling/cosmovisor) +For more detailed information about Cosmosvisor you can visit the +[Cosmos Documentation Here](https://docs.cosmos.network/main/build/tooling/cosmovisor) diff --git a/docs/validators/node.mdx b/docs/validators/node.mdx index e3159088..da4b8735 100644 --- a/docs/validators/node.mdx +++ b/docs/validators/node.mdx @@ -59,8 +59,9 @@ mkdir /home/zetachain/.zetacored/config ### Download and Install the zetacored binary -Binaries are built based on OS version and CPU architecture. You can download the latest binaries from our [ZetaChain Node GitHub Repo](https://github.com/zeta-chain/node/releases) - +Binaries are built based on OS version and CPU architecture. You can download +the latest binaries from our +[ZetaChain Node GitHub Repo](https://github.com/zeta-chain/node/releases) Install it in your PATH: @@ -135,4 +136,4 @@ app.toml file. See the [CosmosSDK Telemetry Documentation](https://docs.cosmos.network/v0.46/core/telemetry.html) for more information. -See more about your Validator Monitoring [here](/reference/validators-monitoring). +See more about your Validator Monitoring [here](/validators/monitoring). diff --git a/docs/validators/requirements.mdx b/docs/validators/requirements.mdx index 9d20aeef..c302d3d3 100644 --- a/docs/validators/requirements.mdx +++ b/docs/validators/requirements.mdx @@ -77,8 +77,8 @@ load, Memory Usage, Disk usage and Disk IO) for any performance degradation. Prometheus can optionally be enabled to serve metrics which can be consumed by Prometheus collector(s). Telemetry include Prometheus metrics can be enabled in -the app.toml file. See the [CosmosSDK Telemetry -Documentation](https://docs.cosmos.network/v0.46/core/telemetry.html) for more -information. +the app.toml file. See the +[CosmosSDK Telemetry Documentation](https://docs.cosmos.network/v0.46/core/telemetry.html) +for more information. -See more about your Validator Monitoring [here](/reference/validators-monitoring). \ No newline at end of file +See more about your Validator Monitoring [here](/validators/monitoring). diff --git a/src/components/NetworkDetails/NetworkDetails.tsx b/src/components/NetworkDetails/NetworkDetails.tsx new file mode 100644 index 00000000..a272bfbf --- /dev/null +++ b/src/components/NetworkDetails/NetworkDetails.tsx @@ -0,0 +1,84 @@ +import React, { useState } from "react"; + +// Static data for the tables +const networkDetails = { + testnet: [ + { name: "Chain ID (EVM)", value: "7001" }, + { name: "Chain ID (Cosmos)", value: "athens_7001-1" }, + { name: "Denom", value: "azeta" }, + { name: "Symbol", value: "tZETA" }, + { name: "Decimals", value: "18" }, + { name: "HD Path", value: "m/44'/60'/0'/0/0" }, + { name: "Bech32 prefix", value: "zeta" }, + { name: "Explorer", value: "https://athens.explorer.zetachain.com" }, + { + name: "EVM RPC", + value: "https://zetachain-athens-evm.blockpi.network/v1/rpc/public", + }, + ], + mainnet: [ + { name: "Chain ID (EVM)", value: "7000" }, + { name: "Chain ID (Cosmos)", value: "zetachain_7000-1" }, + { name: "Denom", value: "azeta" }, + { name: "Symbol", value: "ZETA" }, + { name: "Decimals", value: "18" }, + { name: "HD Path", value: "m/44'/60'/0'/0/0" }, + { name: "Bech32 prefix", value: "zeta" }, + { name: "Explorer", value: "https://explorer.zetachain.com" }, + { + name: "EVM RPC", + value: "https://zetachain-evm.blockpi.network/v1/rpc/public", + }, + ], +}; + +const NetworkDetailsTabs = () => { + const [activeTab, setActiveTab] = useState("testnet"); + + // Styles for active and inactive tabs + const active = { fontWeight: "bold", textDecoration: "underline" }; + const inactive = { fontWeight: "normal", textDecoration: "none" }; + + // Helper function to render a table for the active network + const renderTable = (networkData) => ( + + + + + + + + + {networkData.map((item, index) => ( + + + + + ))} + +
NameValue
{item.name}{item.value}
+ ); + + return ( +
+
+ + +
+ {activeTab === "testnet" && renderTable(networkDetails.testnet)} + {activeTab === "mainnet" && renderTable(networkDetails.mainnet)} +
+ ); +}; + +export default NetworkDetailsTabs;