2020-12-07 17:39:37 +00:00
<!--
order: 5
-->
2021-06-12 16:27:10 +00:00
# JoiningTestnet
2020-12-07 17:39:37 +00:00
2021-06-12 16:27:10 +00:00
This document outlines the steps to join the public testnet
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
## Steps
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
1. Install the Ethermint binaries (ethermintd & ethermint cli)
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
```bash
git clone https://github.com/cosmos/ethermint
cd ethermint
2021-03-02 19:41:12 +00:00
git checkout v0.4.1
2021-01-08 13:25:02 +00:00
make install
```
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
2. Create an Ethermint account
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
```bash
ethermintcli keys add < keyname >
```
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
3. Copy genesis file
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
Follow this [link ](https://gist.github.com/araskachoi/43f86f3edff23729b817e8b0bb86295a ) and copy it over to the directory ~/.ethermintd/config/genesis.json
2020-12-07 17:39:37 +00:00
2021-01-08 13:25:02 +00:00
4. Add peers
Edit the file located in ~/.ethermintd/config/config.toml and edit line 350 (persistent_peers) to the following
```toml
2021-03-02 19:41:12 +00:00
"05aa6587f07a0c6a9a8213f0138c4a76d476418a@18.204.206.179:26656,13d4a1c16d1f427988b7c499b6d150726aaf3aa0@3.86.104.251:26656,a00db749fa51e485c8376276d29d599258052f3e@54.210.246.165:26656"
2021-01-08 13:25:02 +00:00
```
5. Validate genesis and start the Ethermint network
```bash
ethermintd validate-genesis
ethermintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" --trace
```
(we recommend running the command in the background for convenience)
6. Start the RPC server
```bash
2021-03-02 19:41:12 +00:00
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key $KEY --chain-id etherminttestnet-777 --trace --rpc-api "web3,eth,net"
2021-01-08 13:25:02 +00:00
```
where `$KEY` is the key name that was used in step 2.
(we recommend running the command in the background for convenience)
7. Request funds from the faucet
You will need to know the Ethereum hex address, and it can be found with the following command:
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545
```
Using the output of the above command, you will then send the command with your valid Ethereum address
```bash
curl --header "Content-Type: application/json" --request POST --data '{"address":"0xYourEthereumHexAddress"}' 3.95.21.91:3000
```
2020-12-07 17:39:37 +00:00
## Public Testnet Node RPC Endpoints
2021-01-08 13:25:02 +00:00
- **Node0**: `54.210.246.165:8545`
- **Node1**: `3.86.104.251:8545`
- **Node2**: `18.204.206.179:8545`
2020-12-07 17:39:37 +00:00
example:
2021-01-08 13:25:02 +00:00
```bash
2020-12-07 17:39:37 +00:00
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' -H "Content-Type: application/json" 54.210.246.165:8545
2021-01-08 13:25:02 +00:00
```