-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdydx.sh
62 lines (53 loc) · 2.96 KB
/
dydx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /bin/bash
echo -e '\e[0m'
echo -e '@@@ @@@ @@@@@@ @@@@@@@ @@@@@@@@ @@@ @@@@@@@@ @@@'
echo -e '@@@@ @@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@ @@@@@@@@@@ @@@@'
echo -e '@@!@!@@@ @@! @@@ @@! @@@ @@! @@@!! @@! @@@@ @@@!!'
echo -e '!@!!@!@! !@! @!@ !@! @!@ !@! !@! !@! @!@!@ !@!'
echo -e '@!@ !!@! @!@ !@! @!@ !@! @!!!:!: @!@ @!@ @! !@! @!@'
echo -e '!@! !!! !@! !!! !@! !!! !!!!!:: !@! !@!!! !!! !@!'
echo -e '!!: !!! !!: !!! !!: !!! !!: !!: !!:! !!! !!:'
echo -e ':!: !:! :!: !:! :!: !:! :!: :!: :!: !:! :!:'
echo -e '::: :: :::::: ::::::: ::::::: ::: :::::::: :::'
echo -e '\e[0m'
# Updates
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 && sudo apt install make clang pkg-config libssl-dev build-essential git jq ncdu bsdmainutils htop net-tools lsof -y < "/dev/null" && sudo apt-get update -y && sudo apt-get install wget liblz4-tool aria2 -y && sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y
# Install Git
sudo apt-get install -y git
# Install Go
wget https://golang.org/dl/go1.20.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
rm go1.20.5.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bash_profile
source ~/.bash_profile
go version
# Install cosmovisor
echo "Installing Cosmovisor..."
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
# Initialize node and setup validator
export BINARY_VERSION="v0.0.1-rc1"
export DYDX_PLATFORM="linux-amd64"
export DYDX_MONIKER="node101"
export DYDX_KEY_NAME="wallet101"
git clone [email protected]:dydxprotocol/networks.git
cd networks
git checkout main
git pull origin main
tar -xvzf dydx-testnet-1/binaries/$BINARY_VERSION/dydxprotocold-$BINARY_VERSION-${DYDX_PLATFORM}.tar.gz
mkdir -p "${HOME}/local/bin"
export PATH="${HOME}/local/bin:$PATH"
cp build/dydxprotocold-$BINARY_VERSION-${DYDX_PLATFORM} "${HOME}/local/bin/dydxprotocold"
rm -R build
dydxprotocold version --long
dydxprotocold config chain-id dydx-testnet-1
rm -rf $HOME/.dydxprotocol
dydxprotocold init --chain-id=dydx-testnet-1 $DYDX_MONIKER
dydxprotocold keys add $DYDX_KEY_NAME --keyring-backend test
MY_VALIDATOR_ADDRESS=$(dydxprotocold keys show $DYDX_KEY_NAME -a --keyring-backend test)
dydxprotocold add-genesis-account $MY_VALIDATOR_ADDRESS 100000000000dv4tnt
dydxprotocold gentx $DYDX_KEY_NAME 50000000000dv4tnt --chain-id dydx-testnet-1 --moniker $DYDX_MONIKER --keyring-backend test
Starting the Node
git checkout main
git pull origin main
cp dydx-testnet-1/genesis.json $HOME/.dydxprotocol/config/genesis.json
dydxprotocold start --p2p.seeds="[email protected]:26656"