# ZetaChain

## **Public Endpoints**

> RPC : <https://zetachain-rpc.validator247.com>
>
> API : <https://zetachain-api.validator247.com>

## Explorer

> > Explorer<https://explorer.zetachain.com/address/0xa3380F6a8D73a281e37E7752F67e1BEbd428ce0e>
> >
> > Name :Validator247
> >
> > Hex Address: 0xa3380f6a8d73a281e37e7752f67e1bebd428ce0e
> >
> > Validator Address: zeta15vuq765dww3grcm7waf0vlsma02z3nsw3gxjgr
> >
> > Operator Address: zetavaloper15vuq765dww3grcm7waf0vlsma02z3nsw4g7w94

## Update system

```
sudo apt update
sudo apt-get install git curl build-essential make jq gcc snapd chrony lz4 tmux unzip bc -y
```

Go Install&#x20;

```
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.22.1.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
```

## Install Binary&#x20;

```
cd $HOME
wget https://github.com/zeta-chain/node/releases/download/v18.0.0/zetacored-linux-amd64
chmod +x $HOME/zetacored-linux-amd64
mv $HOME/zetacored-linux-amd64 $HOME/go/bin/zetacored
```

## Initialize Node

```

zetacored init <monike> --chain-id zetachain_7000-1

wget -O $HOME/.zetacored/config/app.toml  https://raw.githubusercontent.com/zeta-chain/network-mainnet/main/network_files/config/app.toml
wget -O $HOME/.zetacored/config/client.toml https://raw.githubusercontent.com/zeta-chain/network-mainnet/main/network_files/config/client.toml
wget -O $HOME/.zetacored/config/config.toml https://raw.githubusercontent.com/zeta-chain/network-mainnet/main/network_files/config/config.toml
wget -O $HOME/.zetacored/config/genesis.json https://raw.githubusercontent.com/zeta-chain/network-mainnet/main/network_files/config/genesis.json
```

## Download gennesis and Addrbook

```
curl -L -o addrbook.json https://github.com/Validator247/Zetachain-mainnet/raw/main/addrbook.json
curl -L -o genesis.json https://github.com/Validator247/Zetachain-mainnet/raw/main/genesis.json
```

PEER

```
PEERS=5282a547c8df5b9a852ddf5f499e0319913a5a2e@190.92.241.52:26656,49041b42e5ae5b0ef3560af156856efb8147818a@54.179.7.12:26656,2ef45628981e3bdf157ea5125a0224f38d1b8e00@141.95.65.179:26656,1d888c5985a536b53e528ad276b20294edb93592@208.91.106.110:26656,eea4892699aa8d0d54491fd2164720687d7ffc93@141.95.66.226:17600
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.zetacored/config/config.toml

```

## Create Services

```
sudo tee /etc/systemd/system/zetacored.service > /dev/null <<EOF
[Unit]
Description=Zetachain node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.zetacored
ExecStart=$(which zetacored) start --home $HOME/.zetacored
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

enable and start service
sudo systemctl daemon-reload

```

## State Sync&#x20;

```
sudo systemctl stop zetacored

cp $HOME/.zetacored/data/priv_validator_state.json $HOME/.zetacored/priv_validator_state.json.backup
zetacored tendermint unsafe-reset-all --home $HOME/.zetacored

PEERS=5282a547c8df5b9a852ddf5f499e0319913a5a2e@190.92.241.52:26656,49041b42e5ae5b0ef3560af156856efb8147818a@54.179.7.12:26656,2ef45628981e3bdf157ea5125a0224f38d1b8e00@141.95.65.179:26656,1d888c5985a536b53e528ad276b20294edb93592@208.91.106.110:26656,eea4892699aa8d0d54491fd2164720687d7ffc93@141.95.66.226:17600
SNAP_RPC="https://zetachain-rpc.validator247.com:443"

sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.zetacored/config/config.toml 

LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000));
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) 

echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH && sleep 2

sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.zetacored/config/config.toml

mv $HOME/.zetacored/priv_validator_state.json.backup $HOME/.zetacored/data/priv_validator_state.json

sudo systemctl restart zetacored && sudo journalctl -u zetacored -f -o cat
```

## Check Sync&#x20;

```
zetacored status 2>&1 | jq 
```

### Create wallet <a href="#create-wallet" id="create-wallet"></a>

```bash
zetacored keys add wallet
```

Restore wallet

```
zetacored keys add wallet --recover
```

Check Banlance

```
zetacored q bank balances <your_wallet>
```

### Create validator <a href="#create-validator" id="create-validator"></a>

```
zetacored tx staking create-validator \
--amount 1000000000000000000azeta \
--from wallet \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.02 \
--min-self-delegation 1 \
--pubkey $(zetacored tendermint show-validator) \
--moniker  Nodename" \
--identity “keybase> \
--website “Your_website>  \
--details “I love validator247 " \
--chain-id zetachain_7000-1 \
--fees 30311410000000000azeta \
-y \
```

Note:  Add to App.toml

```
app-db-backend = "pebbledb"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.validator247.com/mainnet/zetachain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
