> For the complete documentation index, see [llms.txt](https://docs.validator247.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validator247.com/testnet/mantrachain-dukong.md).

# MantraChain-Dukong

> [https://twitter.com/MANTRA\_Chain\
> \
> https://www.mantrachain.io/](<https://twitter.com/MANTRA_Chain&#xA;&#xA;https://www.mantrachain.io/>)

**Public Endpoints**

> RPC : <https://MANTRA-Dukong-testnet-rpc.validator247.com>&#x20;
>
> API  : <https://MANTRA-Dukong-testnet-api.validator247.com>&#x20;

## # Explorer

> <https://explorer.mantrachain.io/MANTRA-Dukong/staking/mantravaloper1q80heee98nyt47mlz69nyjj8ymm2r5858lnzrj>

## installation

**Preparing the server**

```
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
```

#### GO 1.21.6 <a href="#go-1.21.6" id="go-1.21.6"></a>

```
ver="1.21.6"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

### Build Binary <a href="#build-07.10.24" id="build-07.10.24"></a>

```
cd $HOME && mkdir -p go/bin/
git clone https://github.com/MANTRA-Chain/mantrachain
cd mantrachain
git checkout v5.0.0-rc4
make install
```

### Initiation <a href="#initiation" id="initiation"></a>

```
mantrachaind init <your_mokniker> --chain-id=mantra-dukong-1
mantrachaind config chain-id mantra-dukong-1
```

#### Download Genesis <a href="#download-genesis" id="download-genesis"></a>

```
wget https://raw.githubusercontent.com/Validator247/MANTRA-DuKong/main/genesis.json
```

#### Download addrbook <a href="#download-addrbook" id="download-addrbook"></a>

```
wget https://raw.githubusercontent.com/Validator247/MANTRA-DuKong/main/addrbook.json
```

#### Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers <a href="#set-up-the-minimum-gas-price-and-peers-seeds-filter-peers-maxpeers" id="set-up-the-minimum-gas-price-and-peers-seeds-filter-peers-maxpeers"></a>

```
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0002uom\"/;" ~/.mantrachain/config/app.toml
external_address=$(wget -qO- eth0.me) 
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.mantrachain/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.mantrachain/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.mantrachain/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.mantrachain/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 50/g' $HOME/.mantrachain/config/config.toml
```

**Pruning (optional)**

```
pruning="custom"
pruning_keep_recent="1000"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.mantrachain/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.mantrachain/config/app.toml
```

**Indexer (optional)**

```
indexer="null" &&
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.mantrachain/config/config.toml
```

#### &#x20;<a href="#download-addrbook" id="download-addrbook"></a>

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

```
sudo tee /etc/systemd/system/mantrachaind.service > /dev/null <<EOF
[Unit]
Description=mantrachaind
After=network-online.target

[Service]
User=$USER
ExecStart=$(which mantrachaind) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

#### Start <a href="#start" id="start"></a>

```
sudo systemctl daemon-reload
sudo systemctl enable mantrachaind
sudo systemctl restart mantrachaind && sudo journalctl -fu mantrachaind -o cat
```

## Starting, stoping and restarting service

```
#reload, enable and start
sudo systemctl daemon-reload
sudo systemctl enable mantrachaind
sudo systemctl start mantrachaind

#stop
sudo systemctl stop mantrachaind

#restart
sudo systemctl restart mantrachaind

#logs
journalctl -u mantrachaind -f -o cat

#logs - filtered on block height lines
sudo journalctl -xefu mantrachaind -g ".*txindex"
```

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

Generate a new public key with mnemonic phrase

Create a key file.

```
mantrachaind config keyring-backend file
```

Add New Wallet Key

```
mantrachaind keys add $WALLET
```

Import keys ( if using an existing wallet )

```
mantrachaind keys add $WALLET --recover
```

**Create validator**

```
#pubkey
mantrachaind tendermint show-validator --home /root/.mantrachain
nano $HOME/.mantrachain/validator.json
{
  "pubkey": {"#pubkey"},
  "amount": "1000000uom",
  "moniker": "",
  "identity": "",
  "website": "",
  "security": "",
  "details": "",
  "commission-rate": "0.05",
  "commission-max-rate": "0.2",
  "commission-max-change-rate": "0.2",
  "min-self-delegation": "1"
}
mantrachaind tx staking create-validator $HOME/.mantrachain/validator.json --from=WalletName  --chain-id=mantra-dukong-1 --fees 3500uom -y --gas 350000
```

### &#x20;Delete Node <a href="#services-and-tools" id="services-and-tools"></a>

```
sudo systemctl stop mantrachaind
sudo systemctl disable mantrachaind
rm /etc/systemd/system/mantrachaind.service
sudo systemctl daemon-reload
cd $HOME
rm -rf .mantrachain
rm -rf $(which mantrachaind)
```

## &#x20;Vote

```
mantrachaind tx gov vote 3 yes --from=wallet --chain-id=mantra-dukong-1 --fees 3500uom --gas 350000 --node http://localhost:33657 -y
```

##

##

## MAINNET

Binary

```
git clone https://github.com/MANTRA-Chain/mantrachain/ mantra
cd mantra
git checkout v1.0.0
make install
```

**Public Endpoints**

> RPC URL: <https://mantra-1-rpc.validator247.com>&#x20;
>
> API URL: <https://mantra-1-api.validator247.com>&#x20;

Done Done


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/testnet/mantrachain-dukong.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.
