Skip to content

Commit

Permalink
endpoint list
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Feb 1, 2024
1 parent dc0fdd2 commit b6714b2
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 43 deletions.
20 changes: 3 additions & 17 deletions docs/reference/api.mdx
Original file line number Diff line number Diff line change
@@ -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.

<EndpointList />

Expand Down
15 changes: 15 additions & 0 deletions docs/reference/details.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 0
---

import NetworkDetails from "@site/src/components/NetworkDetails/NetworkDetails";

# Network Details

<NetworkDetails />

For additional EVM RPC endpoints, see the [API/RPC endpoints](/reference/api)
page.

For additional explorers, see the [Services and Providers](/reference/services)
page.
40 changes: 21 additions & 19 deletions docs/validators/cosmovisor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

Expand Down Expand Up @@ -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
Expand All @@ -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:

Expand All @@ -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

Expand Down Expand Up @@ -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)
7 changes: 4 additions & 3 deletions docs/validators/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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).
8 changes: 4 additions & 4 deletions docs/validators/requirements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
See more about your Validator Monitoring [here](/validators/monitoring).
84 changes: 84 additions & 0 deletions src/components/NetworkDetails/NetworkDetails.tsx
Original file line number Diff line number Diff line change
@@ -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) => (
<table>
<thead>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
{networkData.map((item, index) => (
<tr key={index}>
<td>{item.name}</td>
<td>{item.value}</td>
</tr>
))}
</tbody>
</table>
);

return (
<div>
<div style={{ marginBottom: "1rem", display: "flex", gap: "1rem" }}>
<button
style={activeTab === "testnet" ? active : inactive}
onClick={() => setActiveTab("testnet")}
>
Testnet
</button>
<button
style={activeTab === "mainnet" ? active : inactive}
onClick={() => setActiveTab("mainnet")}
>
Mainnet Beta
</button>
</div>
{activeTab === "testnet" && renderTable(networkDetails.testnet)}
{activeTab === "mainnet" && renderTable(networkDetails.mainnet)}
</div>
);
};

export default NetworkDetailsTabs;

0 comments on commit b6714b2

Please sign in to comment.