stxmap-rank-shell 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cspell.json +16 -0
- package/README.md +17 -0
- package/js-script/backpack-oooooyoung.js +70 -0
- package/js-script/lava-oooooyoung.js +5072 -0
- package/js-script/test.js +10 -0
- package/other/MyToken.sol +37 -0
- package/package.json +34 -0
- package/pw-script/atommint-oooooyoung.ps1 +165 -0
- package/pw-script/iercpow-oooooyoung.ps1 +110 -0
- package/pw-script/lava-oooooyoung.ps1 +96 -0
- package/shell-script/aleo-damominer-oooooyoung.sh +74 -0
- package/shell-script/aleo-oooooyoung copy.sh +150 -0
- package/shell-script/aleo-oooooyoung.sh +150 -0
- package/shell-script/babylon-oooooyoung.sh +180 -0
- package/shell-script/btcfullnode-oooooyoung.sh +116 -0
- package/shell-script/celestia-oooooyoung.sh +151 -0
- package/shell-script/chainflip-oooooyoung.sh +157 -0
- package/shell-script/dusknetwork-oooooyoung.sh +84 -0
- package/shell-script/dymension-oooooyoung.sh +124 -0
- package/shell-script/install_var.sh +45 -0
- package/shell-script/massa-oooooyoung.sh +72 -0
- package/shell-script/nibiru-oooooyoung.sh +102 -0
- package/shell-script/qtestnet-oooooyoung.sh +75 -0
- package/shell-script/ziesha-oooooyoung.sh +60 -0
@@ -0,0 +1,157 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
check_root() {
|
11
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
12
|
+
}
|
13
|
+
|
14
|
+
install_validator_software() {
|
15
|
+
check_root
|
16
|
+
sudo apt install curl
|
17
|
+
sudo mkdir -p /etc/apt/keyrings
|
18
|
+
curl -fsSL repo.chainflip.io/keys/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/chainflip.gpg
|
19
|
+
gpg --show-keys /etc/apt/keyrings/chainflip.gpg
|
20
|
+
echo "deb [signed-by=/etc/apt/keyrings/chainflip.gpg] https://repo.chainflip.io/perseverance/ focal main" | sudo tee /etc/apt/sources.list.d/chainflip.list
|
21
|
+
|
22
|
+
sudo apt update
|
23
|
+
sudo apt install -y chainflip-cli chainflip-node chainflip-engine
|
24
|
+
}
|
25
|
+
|
26
|
+
get_generating_keys() {
|
27
|
+
read -e -p "请粘贴验证钱包的私钥private key: " YOUR_VALIDATOR_WALLET_PRIVATE_KEY
|
28
|
+
sudo mkdir -p /etc/chainflip/keys
|
29
|
+
echo -n "请确认您输入的private key为:"
|
30
|
+
echo -n "$YOUR_VALIDATOR_WALLET_PRIVATE_KEY" | sudo tee /etc/chainflip/keys/ethereum_key_file
|
31
|
+
echo -e "\n请保存好以下的私钥及各种地址------"
|
32
|
+
chainflip-node key generate 2>&1 | tee user_save_key
|
33
|
+
pattern=`cat user_save_key | grep "Secret seed:"`
|
34
|
+
secret_seed=${pattern#*:}
|
35
|
+
secret_seed=${secret_seed// /}
|
36
|
+
echo -e -n "\nsigning_key_file:"
|
37
|
+
echo -n "${secret_seed:2}" | sudo tee /etc/chainflip/keys/signing_key_file
|
38
|
+
echo -e -n "\nchainflip_key:"
|
39
|
+
sudo chainflip-node key generate-node-key --file /etc/chainflip/keys/node_key_file
|
40
|
+
echo -e -n "node_key_file:"
|
41
|
+
cat /etc/chainflip/keys/node_key_file
|
42
|
+
echo -e "\n"
|
43
|
+
}
|
44
|
+
|
45
|
+
start_chainflip_node() {
|
46
|
+
read -e -p "请输入你的服务器ip: " IP_ADDRESS_OF_YOUR_NODE
|
47
|
+
read -e -p "请输入你的alchemy RPC WEBSOCKETS地址: " WSS_ENDPOINT_FROM_ETHEREUM_CLIENT
|
48
|
+
read -e -p "请输入你的alchemy RPC HTTPS地址: " HTTPS_ENDPOINT_FROM_ETHEREUM_CLIENT
|
49
|
+
sudo mkdir -p /etc/chainflip/config
|
50
|
+
echo "# Default configurations for the CFE
|
51
|
+
[node_p2p]
|
52
|
+
node_key_file = \"/etc/chainflip/keys/node_key_file\"
|
53
|
+
ip_address=\"$IP_ADDRESS_OF_YOUR_NODE\"
|
54
|
+
port = \"8078\"
|
55
|
+
|
56
|
+
[state_chain]
|
57
|
+
ws_endpoint = \"ws://127.0.0.1:9944\"
|
58
|
+
signing_key_file = \"/etc/chainflip/keys/signing_key_file\"
|
59
|
+
|
60
|
+
[eth]
|
61
|
+
# Ethereum RPC endpoints (websocket and http for redundancy).
|
62
|
+
ws_node_endpoint = \"$WSS_ENDPOINT_FROM_ETHEREUM_CLIENT\"
|
63
|
+
http_node_endpoint = \"$HTTPS_ENDPOINT_FROM_ETHEREUM_CLIENT\"
|
64
|
+
|
65
|
+
# Ethereum private key file path. This file should contain a hex-encoded private key.
|
66
|
+
private_key_file = \"/etc/chainflip/keys/ethereum_key_file\"
|
67
|
+
|
68
|
+
[signing]
|
69
|
+
db_file = \"/etc/chainflip/data.db\"" > /etc/chainflip/config/Default.toml
|
70
|
+
sudo systemctl start chainflip-node
|
71
|
+
tail -f /var/log/chainflip-node.log
|
72
|
+
}
|
73
|
+
|
74
|
+
start_chainflip_engine() {
|
75
|
+
sudo systemctl start chainflip-engine
|
76
|
+
sudo systemctl enable chainflip-node
|
77
|
+
sudo systemctl enable chainflip-engine
|
78
|
+
tail -f /var/log/chainflip-engine.log
|
79
|
+
}
|
80
|
+
|
81
|
+
registering_validator_keys() {
|
82
|
+
read -e -p "请取一个Staking页面中验证者的别名: " validator_nickname
|
83
|
+
sudo systemctl restart chainflip-engine
|
84
|
+
sudo chainflip-cli \
|
85
|
+
--config-path /etc/chainflip/config/Default.toml \
|
86
|
+
register-account-role Validator
|
87
|
+
|
88
|
+
sudo chainflip-cli \
|
89
|
+
--config-path /etc/chainflip/config/Default.toml \
|
90
|
+
activate
|
91
|
+
|
92
|
+
sudo chainflip-cli \
|
93
|
+
--config-path /etc/chainflip/config/Default.toml rotate
|
94
|
+
|
95
|
+
sudo chainflip-cli \
|
96
|
+
--config-path /etc/chainflip/config/Default.toml \
|
97
|
+
vanity-name $validator_nickname
|
98
|
+
}
|
99
|
+
|
100
|
+
restart_node_and_engine() {
|
101
|
+
sudo systemctl restart chainflip-node
|
102
|
+
sudo systemctl restart chainflip-engine
|
103
|
+
tail -f /var/log/chainflip-engine.log
|
104
|
+
}
|
105
|
+
|
106
|
+
out_staking() {
|
107
|
+
read -e -p "输入接收tflip的主钱包ETH地址:" ETH_ADDRESS
|
108
|
+
read -e -p "输入解除质押的tflip数量:" FLIP_AMOUNT
|
109
|
+
sudo chainflip-cli \
|
110
|
+
--config-path /etc/chainflip/config/Default.toml \
|
111
|
+
retire
|
112
|
+
|
113
|
+
sudo chainflip-cli \
|
114
|
+
--config-path /etc/chainflip/config/Default.toml \
|
115
|
+
claim $FLIP_AMOUNT $ETH_ADDRESS
|
116
|
+
}
|
117
|
+
|
118
|
+
echo && echo -e " ${Red_font_prefix}Chainflip 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
119
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
120
|
+
欢迎关注, 如有收费请勿上当受骗。
|
121
|
+
———————————————————————
|
122
|
+
${Green_font_prefix} 1.安装 chainflip validator software ${Font_color_suffix}
|
123
|
+
${Green_font_prefix} 2.获取节点的秘钥及地址 ${Font_color_suffix}
|
124
|
+
${Green_font_prefix} 3.启动Chainflip node ${Font_color_suffix}
|
125
|
+
${Green_font_prefix} 4.启动Chainflip engine ${Font_color_suffix}
|
126
|
+
${Green_font_prefix} 5.注册Chainflip Stake验证者帐号 ${Font_color_suffix}
|
127
|
+
${Green_font_prefix} 6.重启Chainflip node和engine(服务出错或停止时才选择此步,正常搭建请忽略此项) ${Font_color_suffix}
|
128
|
+
${Green_font_prefix} 7.解除质押tflip ${Font_color_suffix}
|
129
|
+
———————————————————————" && echo
|
130
|
+
read -e -p " 请参照教程依次执行前面五个步骤(后面两步按需使用),请输入数字 [1-7]:" num
|
131
|
+
case "$num" in
|
132
|
+
1)
|
133
|
+
install_validator_software
|
134
|
+
;;
|
135
|
+
2)
|
136
|
+
get_generating_keys
|
137
|
+
;;
|
138
|
+
3)
|
139
|
+
start_chainflip_node
|
140
|
+
;;
|
141
|
+
4)
|
142
|
+
start_chainflip_engine
|
143
|
+
;;
|
144
|
+
5)
|
145
|
+
registering_validator_keys
|
146
|
+
;;
|
147
|
+
6)
|
148
|
+
restart_node_and_engine
|
149
|
+
;;
|
150
|
+
7)
|
151
|
+
out_staking
|
152
|
+
;;
|
153
|
+
*)
|
154
|
+
echo
|
155
|
+
echo -e " ${Error} 请输入正确的数字"
|
156
|
+
;;
|
157
|
+
esac
|
@@ -0,0 +1,84 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
check_root() {
|
11
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
12
|
+
}
|
13
|
+
|
14
|
+
install_dusk_wallet_and_run() {
|
15
|
+
check_root
|
16
|
+
sudo apt install wget
|
17
|
+
sudo apt install curl
|
18
|
+
sudo apt install lrzsz
|
19
|
+
mkdir /root/wallet
|
20
|
+
cd ~ && wget -O /root/wallet/ruskwallet0.12.0-linux-x64.tar.gz https://github.com/dusk-network/wallet-cli/releases/download/v0.12.0/ruskwallet0.12.0-linux-x64.tar.gz && chmod +x ruskwallet0.12.0-linux-x64.tar.gz
|
21
|
+
tar -xv -f /root/wallet/ruskwallet0.12.0-linux-x64.tar.gz -C /root/wallet/
|
22
|
+
cd wallet/rusk-wallet0.12.0-linux-x64
|
23
|
+
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb && sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
|
24
|
+
./rusk-wallet
|
25
|
+
}
|
26
|
+
|
27
|
+
get_wallet_key_in_windows() {
|
28
|
+
cd ~
|
29
|
+
read -e -p "请输入你刚刚生成的dusk钱包地址adress: " DUSK_ADDRESS
|
30
|
+
mv .dusk/rusk-wallet/$DUSK_ADDRESS.key .dusk/rusk-wallet/consensus.keys
|
31
|
+
sz .dusk/rusk-wallet/$DUSK_ADDRESS.cpk
|
32
|
+
}
|
33
|
+
|
34
|
+
get_and_start_dusk_node() {
|
35
|
+
curl --proto '=https' --tlsv1.2 -sSf https://dusk-infra.ams3.digitaloceanspaces.com/rusk/itn-installer.sh | sh
|
36
|
+
mv -f .dusk/rusk-wallet/consensus.keys /opt/dusk/conf/
|
37
|
+
echo 'DUSK_CONSENSUS_KEYS_PASS=' > /opt/dusk/services/dusk.conf
|
38
|
+
service rusk start
|
39
|
+
service dusk start
|
40
|
+
tail -f /var/log/dusk.log
|
41
|
+
}
|
42
|
+
|
43
|
+
start_rusk_wallet() {
|
44
|
+
wallet/rusk-wallet0.12.0-linux-x64/rusk-wallet
|
45
|
+
}
|
46
|
+
|
47
|
+
restart_dusk_node() {
|
48
|
+
service rusk restart
|
49
|
+
service dusk restart
|
50
|
+
tail -f /var/log/dusk.log
|
51
|
+
}
|
52
|
+
|
53
|
+
echo && echo -e " ${Red_font_prefix}dusk_network 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
54
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
55
|
+
欢迎关注, 如有收费请勿上当受骗。
|
56
|
+
———————————————————————
|
57
|
+
${Green_font_prefix} 1.安装 dusk 钱包并运行 ${Font_color_suffix}
|
58
|
+
${Green_font_prefix} 2.保存dusk验证者节点公钥cpk文件到windows ${Font_color_suffix}
|
59
|
+
${Green_font_prefix} 3.获取并启动dusk节点 ${Font_color_suffix}
|
60
|
+
${Green_font_prefix} 4.运行dusk钱包(钱包内可进行质押..等操作) ${Font_color_suffix}
|
61
|
+
${Green_font_prefix} 5.重启dusk节点(服务出错或停止时才选择此步,正常搭建请忽略此项) ${Font_color_suffix}
|
62
|
+
———————————————————————" && echo
|
63
|
+
read -e -p " 请参照教程依次执行以上五个步骤,请输入数字 [1-5]:" num
|
64
|
+
case "$num" in
|
65
|
+
1)
|
66
|
+
install_dusk_wallet_and_run
|
67
|
+
;;
|
68
|
+
2)
|
69
|
+
get_wallet_key_in_windows
|
70
|
+
;;
|
71
|
+
3)
|
72
|
+
get_and_start_dusk_node
|
73
|
+
;;
|
74
|
+
4)
|
75
|
+
start_rusk_wallet
|
76
|
+
;;
|
77
|
+
5)
|
78
|
+
restart_dusk_node
|
79
|
+
;;
|
80
|
+
*)
|
81
|
+
echo
|
82
|
+
echo -e " ${Error} 请输入正确的数字"
|
83
|
+
;;
|
84
|
+
esac
|
@@ -0,0 +1,124 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
|
11
|
+
PRI_KEYWORDS="123456"
|
12
|
+
|
13
|
+
# doc: https://docs.dymension.xyz/validate/dymension-hub/build-dymd
|
14
|
+
|
15
|
+
check_root() {
|
16
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
17
|
+
}
|
18
|
+
|
19
|
+
install_go() {
|
20
|
+
check_root
|
21
|
+
sudo apt update && sudo apt upgrade -y
|
22
|
+
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu unzip zip -y
|
23
|
+
ver="1.21.0"
|
24
|
+
cd $HOME
|
25
|
+
wget "https://go.dev/dl/go$ver.linux-amd64.tar.gz"
|
26
|
+
sudo rm -rf /usr/local/go
|
27
|
+
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
|
28
|
+
rm "go$ver.linux-amd64.tar.gz"
|
29
|
+
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
|
30
|
+
source $HOME/.bash_profile
|
31
|
+
}
|
32
|
+
|
33
|
+
install_dymension_env_and_generate_wallet() {
|
34
|
+
check_root
|
35
|
+
ufw allow 26656
|
36
|
+
ufw allow 20556
|
37
|
+
ufw allow 26657
|
38
|
+
install_go
|
39
|
+
rm -rf ~/dymension
|
40
|
+
rm -rf ~/.dymension
|
41
|
+
rm ~/account.txt
|
42
|
+
git clone https://github.com/dymensionxyz/dymension.git --branch v1.0.2-beta
|
43
|
+
cd ~/dymension
|
44
|
+
make install
|
45
|
+
dymd config chain-id froopyland_100-1
|
46
|
+
dymd config keyring-backend test
|
47
|
+
read -e -p "请输入你的节点名称: " MONIKER_NAME
|
48
|
+
read -e -p "请输入你的钱包名称以生成钱包: " WALLET_NAME
|
49
|
+
dymd init $MONIKER_NAME --chain-id froopyland_100-1
|
50
|
+
sed -i 's/minimum-gas-prices = "0udym"/minimum-gas-prices = "0.25udym"/' ~/.dymension/config/app.toml
|
51
|
+
sed -i -e 's/external_address = \"\"/external_address = \"'$(curl httpbin.org/ip | jq -r .origin)':26656\"/g' ~/.dymension/config/config.toml
|
52
|
+
sed -i 's/seed_mode = false/seed_mode = true/' ~/.dymension/config/config.toml
|
53
|
+
sed -i 's/seeds = \"\"/seeds = \"284313184f63d9f06b218a67a0e2de126b64258d@seeds.silknodes.io:26157\"/' ~/.dymension/config/config.toml
|
54
|
+
sed -i 's/persistent_peers = \"\"/persistent_peers = \"e7857b8ed09bd0101af72e30425555efa8f4a242@148.251.177.108:20556,cb120ed9625771d57e06f8d449cb10ab99a58225@57.128.114.155:26656\"/' ~/.dymension/config/config.toml
|
55
|
+
|
56
|
+
dymd tendermint unsafe-reset-all --home $HOME/.dymension --keep-addr-book
|
57
|
+
curl -L https://snapshots.kjnodes.com/dymension-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.dymension
|
58
|
+
|
59
|
+
# download genesis and addrbook
|
60
|
+
wget -O $HOME/.dymension/config/genesis.json "https://raw.githubusercontent.com/dymensionxyz/testnets/main/dymension-hub/froopyland/genesis.json"
|
61
|
+
wget -O $HOME/.dymension/config/addrbook.json "https://share101.utsa.tech/dymension/addrbook.json"
|
62
|
+
echo "moniker: $MONIKER_NAME" >> ~/account.txt
|
63
|
+
dymd keys add $WALLET_NAME >> ~/account.txt
|
64
|
+
WALLET_ADDRESS=$(grep -oP '(?<=address: ).*' ~/account.txt)
|
65
|
+
WALLET_NAME=$(grep -oP '(?<=name: ).*' ~/account.txt)
|
66
|
+
dymd add-genesis-account $WALLET_ADDRESS 600000000000udym
|
67
|
+
dymd gentx $WALLET_NAME 500000000000udym --chain-id=froopyland_100-1
|
68
|
+
dymd collect-gentxs
|
69
|
+
echo -e "\n"
|
70
|
+
echo -e "\n"
|
71
|
+
cat ~/account.txt
|
72
|
+
echo -e "\n请保存好上面的钱包账号信息..."
|
73
|
+
}
|
74
|
+
|
75
|
+
start_dymension_full_node() {
|
76
|
+
cd ~/dymension
|
77
|
+
source $HOME/.bash_profile
|
78
|
+
dymd start
|
79
|
+
}
|
80
|
+
|
81
|
+
start_dymension_validator_node() {
|
82
|
+
cd ~/dymension
|
83
|
+
source $HOME/.bash_profile
|
84
|
+
|
85
|
+
MONIKER_NAME=$(grep -oP '(?<=moniker: ).*' ~/account.txt)
|
86
|
+
WALLET_ADDRESS=$(grep -oP '(?<=address: ).*' ~/account.txt)
|
87
|
+
WALLET_NAME=$(grep -oP '(?<=name: ).*' ~/account.txt)
|
88
|
+
dymd tx staking create-validator \
|
89
|
+
--amount=1000000udym \
|
90
|
+
--pubkey=$(dymd tendermint show-validator) \
|
91
|
+
--moniker="$MONIKER_NAME" \
|
92
|
+
--chain-id=froopyland_100-1 \
|
93
|
+
--from=$WALLET_NAME \
|
94
|
+
--commission-rate="0.10" \
|
95
|
+
--commission-max-rate="0.20" \
|
96
|
+
--commission-max-change-rate="0.01" \
|
97
|
+
--min-self-delegation="1" \
|
98
|
+
-y
|
99
|
+
}
|
100
|
+
|
101
|
+
echo && echo -e " ${Red_font_prefix}Dymension节点 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
102
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
103
|
+
欢迎关注, 如有收费请勿上当受骗。
|
104
|
+
———————————————————————
|
105
|
+
${Green_font_prefix} 1.安装Dymension节点环境并生成钱包私钥导出 ${Font_color_suffix}
|
106
|
+
${Green_font_prefix} 2.运行Dymension全节点 ${Font_color_suffix}
|
107
|
+
${Green_font_prefix} 3.运行Dymension验证者节点 ${Font_color_suffix}
|
108
|
+
———————————————————————" && echo
|
109
|
+
read -e -p " 请参照教程执行以上步骤,请输入数字 [1-3]:" num
|
110
|
+
case "$num" in
|
111
|
+
1)
|
112
|
+
install_dymension_env_and_generate_wallet
|
113
|
+
;;
|
114
|
+
2)
|
115
|
+
start_dymension_full_node
|
116
|
+
;;
|
117
|
+
3)
|
118
|
+
start_dymension_validator_node
|
119
|
+
;;
|
120
|
+
*)
|
121
|
+
echo
|
122
|
+
echo -e " ${Error} 请输入正确的数字"
|
123
|
+
;;
|
124
|
+
esac
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
|
11
|
+
check_root() {
|
12
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
13
|
+
}
|
14
|
+
|
15
|
+
install_golang() {
|
16
|
+
check_root
|
17
|
+
sudo apt update && sudo apt upgrade -y
|
18
|
+
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu unzip zip -y
|
19
|
+
ver="1.21.0"
|
20
|
+
cd $HOME
|
21
|
+
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
|
22
|
+
sudo rm -rf /usr/local/go
|
23
|
+
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
|
24
|
+
rm "go$ver.linux-amd64.tar.gz"
|
25
|
+
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
|
26
|
+
source $HOME/.bash_profile
|
27
|
+
|
28
|
+
}
|
29
|
+
|
30
|
+
echo && echo -e " ${Red_font_prefix}dusk_network 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
31
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
32
|
+
欢迎关注, 如有收费请勿上当受骗。
|
33
|
+
———————————————————————
|
34
|
+
${Green_font_prefix} 1.安装依赖go环境 ${Font_color_suffix}
|
35
|
+
———————————————————————" && echo
|
36
|
+
read -e -p " 请参照上面的步骤,请输入数字:" num
|
37
|
+
case "$num" in
|
38
|
+
1)
|
39
|
+
install_go
|
40
|
+
;;
|
41
|
+
*)
|
42
|
+
echo
|
43
|
+
echo -e " ${Error} 请输入正确的数字"
|
44
|
+
;;
|
45
|
+
esac
|
@@ -0,0 +1,72 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
NODE_WALLET_PASSWORD="123456"
|
11
|
+
|
12
|
+
|
13
|
+
check_root() {
|
14
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
15
|
+
}
|
16
|
+
|
17
|
+
install_massa_node_and_start() {
|
18
|
+
check_root
|
19
|
+
sudo apt install screen pkg-config curl git build-essential libssl-dev libclang-dev -y
|
20
|
+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
21
|
+
source $HOME/.cargo/env
|
22
|
+
rustup toolchain install nightly-2022-11-14
|
23
|
+
rustup default nightly-2022-11-14
|
24
|
+
git clone --branch testnet https://github.com/massalabs/massa.git --depth 1 /root/massa
|
25
|
+
ufw allow 33034
|
26
|
+
ufw allow 33035
|
27
|
+
ufw allow 31244
|
28
|
+
ufw allow 31245
|
29
|
+
|
30
|
+
read -e -p "请输入你的服务器公网ip地址: " IP_ADDRESS
|
31
|
+
echo "[network]
|
32
|
+
routable_ip = \"$IP_ADDRESS\"" >/root/massa/massa-node/config/config.toml
|
33
|
+
|
34
|
+
sudo apt update && sudo apt upgrade -y
|
35
|
+
cd /root/massa/massa-node/
|
36
|
+
RUST_BACKTRACE=full cargo run --release -- -p $NODE_WALLET_PASSWORD |& tee logs.txt
|
37
|
+
}
|
38
|
+
|
39
|
+
start_massa_wallet_client() {
|
40
|
+
cd /root/massa/massa-client/
|
41
|
+
cargo run --release -- -p $NODE_WALLET_PASSWORD
|
42
|
+
}
|
43
|
+
|
44
|
+
restart_massa_node() {
|
45
|
+
cd /root/massa/massa-node/
|
46
|
+
cargo run --release -- -p $NODE_WALLET_PASSWORD |& tee logs.txt
|
47
|
+
}
|
48
|
+
|
49
|
+
echo && echo -e " ${Red_font_prefix}massa 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
50
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
51
|
+
欢迎关注, 如有收费请勿上当受骗。
|
52
|
+
———————————————————————
|
53
|
+
${Green_font_prefix} 1.安装massa环境并运行节点 ${Font_color_suffix}
|
54
|
+
${Green_font_prefix} 2.运行massa客户端 ${Font_color_suffix}
|
55
|
+
${Green_font_prefix} 3.重新运行massa节点(请在节点运行有问题时再执行此步) ${Font_color_suffix}
|
56
|
+
———————————————————————" && echo
|
57
|
+
read -e -p " 请参照教程执行以上三个步骤,请输入数字 [1-3]:" num
|
58
|
+
case "$num" in
|
59
|
+
1)
|
60
|
+
install_massa_node_and_start
|
61
|
+
;;
|
62
|
+
2)
|
63
|
+
start_massa_wallet_client
|
64
|
+
;;
|
65
|
+
3)
|
66
|
+
restart_massa_node
|
67
|
+
;;
|
68
|
+
*)
|
69
|
+
echo
|
70
|
+
echo -e " ${Error} 请输入正确的数字"
|
71
|
+
;;
|
72
|
+
esac
|
@@ -0,0 +1,102 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
|
11
|
+
NETWORK=nibiru-itn-1
|
12
|
+
|
13
|
+
check_root() {
|
14
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
15
|
+
}
|
16
|
+
|
17
|
+
install_nibiru_node_and_run() {
|
18
|
+
check_root
|
19
|
+
sudo apt install -y curl git wget
|
20
|
+
sudo apt update && sudo apt upgrade --yes
|
21
|
+
curl -s https://get.nibiru.fi/@v0.19.2! | bash
|
22
|
+
read -e -p "请输入你的验证者名称:" MONIKER_NAME
|
23
|
+
nibid init $MONIKER_NAME --chain-id=$NETWORK --home $HOME/.nibid
|
24
|
+
nibid keys add "$MONIKER_NAME-key"
|
25
|
+
echo -e '请存储上面的地址及私钥后按回车继续启动节点...\n'
|
26
|
+
curl -s https://networks.itn.nibiru.fi/$NETWORK/genesis > $HOME/.nibid/config/genesis.json
|
27
|
+
sed -i 's|seeds =.*|seeds = "'$(curl -s https://networks.itn.nibiru.fi/$NETWORK/seeds)'"|g' $HOME/.nibid/config/config.toml
|
28
|
+
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.025unibi"/g' $HOME/.nibid/config/app.toml
|
29
|
+
sed -i 's|enable =.*|enable = true|g' $HOME/.nibid/config/config.toml
|
30
|
+
sed -i 's|rpc_servers =.*|rpc_servers = "'$(curl -s https://networks.itn.nibiru.fi/$NETWORK/rpc_servers)'"|g' $HOME/.nibid/config/config.toml
|
31
|
+
sed -i 's|trust_height =.*|trust_height = "'$(curl -s https://networks.itn.nibiru.fi/$NETWORK/trust_height)'"|g' $HOME/.nibid/config/config.toml
|
32
|
+
sed -i 's|trust_hash =.*|trust_hash = "'$(curl -s https://networks.itn.nibiru.fi/$NETWORK/trust_hash)'"|g' $HOME/.nibid/config/config.toml
|
33
|
+
nibid config chain-id nibiru-itn-1
|
34
|
+
nohup nibid start >> /root/.nibid/nibid.log 2>&1 &
|
35
|
+
tail -f /root/.nibid/nibid.log
|
36
|
+
}
|
37
|
+
|
38
|
+
request_faucet_nibi() {
|
39
|
+
read -e -p "请输入你的nibi钱包地址:" WALLET_ADDRESS
|
40
|
+
FAUCET_URL="https://faucet.itn-1.nibiru.fi/"
|
41
|
+
curl -X POST -d '{"address": "'"$ADDR"'", "coins": ["11000000unibi","100000000unusd","100000000uusdt"]}' $FAUCET_URL
|
42
|
+
}
|
43
|
+
|
44
|
+
create_validator_staking() {
|
45
|
+
read -e -p "请输入你之前设置的验证者名称:" MONIKER_NAME
|
46
|
+
nibid tx staking create-validator \
|
47
|
+
--amount 9500000unibi \
|
48
|
+
--commission-max-change-rate "0.1" \
|
49
|
+
--commission-max-rate "0.20" \
|
50
|
+
--commission-rate "0.1" \
|
51
|
+
--min-self-delegation "1" \
|
52
|
+
--details "$MONIKER_NAME validator" \
|
53
|
+
--pubkey=$(nibid tendermint show-validator) \
|
54
|
+
--moniker $MONIKER_NAME \
|
55
|
+
--chain-id nibiru-itn-1 \
|
56
|
+
--gas-prices 0.025unibi \
|
57
|
+
--from "$MONIKER_NAME-key"
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
staking_more_nibi() {
|
62
|
+
read -e -p "请输入你的nibi钱包地址:" WALLET_ADDRESS
|
63
|
+
nibid tx staking delegate $WALLET_ADDRESS 9800000unibi --chain-id=nibiru-itn-1 --from wallet --fees 5000unibi
|
64
|
+
}
|
65
|
+
|
66
|
+
restart_nibiru_node() {
|
67
|
+
nohup nibid start >> /root/.nibid/nibid.log 2>&1 &
|
68
|
+
tail -f /root/.nibid/nibid.log
|
69
|
+
}
|
70
|
+
|
71
|
+
echo && echo -e " ${Red_font_prefix}NibiruChain 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
72
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
73
|
+
欢迎关注, 如有收费请勿上当受骗。
|
74
|
+
———————————————————————
|
75
|
+
${Green_font_prefix} 1.安装nibiru测试网环境并启动节点 ${Font_color_suffix}
|
76
|
+
${Green_font_prefix} 2.从Faucet获取测试NIBI代币${Font_color_suffix}
|
77
|
+
${Green_font_prefix} 3.创建验证者质押并验证交易${Font_color_suffix}
|
78
|
+
${Green_font_prefix} 4.质押nibiru代币(除开第一次启动节点,之后每次从Faucet获取测试NIBI代币后可以执行一次) ${Font_color_suffix}
|
79
|
+
${Green_font_prefix} 5.重启nibiru节点 ${Font_color_suffix}
|
80
|
+
———————————————————————" && echo
|
81
|
+
read -e -p " 请参照教程执行以上步骤,请输入数字 [1-5]:" num
|
82
|
+
case "$num" in
|
83
|
+
1)
|
84
|
+
install_nibiru_node_and_run
|
85
|
+
;;
|
86
|
+
2)
|
87
|
+
request_faucet_nibi
|
88
|
+
;;
|
89
|
+
3)
|
90
|
+
create_validator_staking
|
91
|
+
;;
|
92
|
+
4)
|
93
|
+
staking_more_nibi
|
94
|
+
;;
|
95
|
+
5)
|
96
|
+
restart_nibiru_node
|
97
|
+
;;
|
98
|
+
*)
|
99
|
+
echo
|
100
|
+
echo -e " ${Error} 请输入正确的数字"
|
101
|
+
;;
|
102
|
+
esac
|
@@ -0,0 +1,75 @@
|
|
1
|
+
Crontab_file="/usr/bin/crontab"
|
2
|
+
Green_font_prefix="\033[32m"
|
3
|
+
Red_font_prefix="\033[31m"
|
4
|
+
Green_background_prefix="\033[42;37m"
|
5
|
+
Red_background_prefix="\033[41;37m"
|
6
|
+
Font_color_suffix="\033[0m"
|
7
|
+
Info="[${Green_font_prefix}信息${Font_color_suffix}]"
|
8
|
+
Error="[${Red_font_prefix}错误${Font_color_suffix}]"
|
9
|
+
Tip="[${Green_font_prefix}注意${Font_color_suffix}]"
|
10
|
+
|
11
|
+
PRI_KEYWORDS="123456"
|
12
|
+
|
13
|
+
check_root() {
|
14
|
+
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限), 无法继续操作, 请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
|
15
|
+
}
|
16
|
+
|
17
|
+
install_q_validator_node_and_export_key() {
|
18
|
+
check_root
|
19
|
+
ufw allow 30313
|
20
|
+
sudo apt install -y curl git wget lrzsz docker docker-compose
|
21
|
+
git clone https://gitlab.com/q-dev/testnet-public-tools --depth 1
|
22
|
+
cd /root/testnet-public-tools/testnet-validator
|
23
|
+
sudo mkdir -p /root/testnet-public-tools/testnet-validator/keystore/
|
24
|
+
echo "$PRI_KEYWORDS" > /root/testnet-public-tools/testnet-validator/keystore/pwd.txt
|
25
|
+
docker-compose run --rm --entrypoint "geth account new --datadir=/data --password=/data/keystore/pwd.txt" testnet-validator-node > /root/testnet-public-tools/testnet-validator/q_address.txt
|
26
|
+
cat /root/testnet-public-tools/testnet-validator/q_address.txt
|
27
|
+
sz /root/testnet-public-tools/testnet-validator/keystore/UTC--*
|
28
|
+
}
|
29
|
+
|
30
|
+
config_and_run_q_validator_node() {
|
31
|
+
read -e -p "请输入你的服务器公共地址ip:" IP_ADDRESS
|
32
|
+
read -e -p "请输入你的验证者名称:" VALIDATOR_NAME
|
33
|
+
cd /root/testnet-public-tools/testnet-validator
|
34
|
+
QADDRESS=$(cat /root/testnet-public-tools/testnet-validator/q_address.txt | grep 'Public address of the key:' | awk '{print $6}')
|
35
|
+
QADDRESSWITHOUT0x=${QADDRESS:2}
|
36
|
+
sed -i "s/0000000000000000000000000000000000000000/$QADDRESSWITHOUT0x/g" /root/testnet-public-tools/testnet-validator/.env
|
37
|
+
sed -i "s/192.0.0.0/$IP_ADDRESS/g" /root/testnet-public-tools/testnet-validator/.env
|
38
|
+
sed -i "s/0000000000000000000000000000000000000000/$QADDRESSWITHOUT0x/g" /root/testnet-public-tools/testnet-validator/config.json
|
39
|
+
sed -i "s/supersecurepassword/$PRI_KEYWORDS/g" /root/testnet-public-tools/testnet-validator/config.json
|
40
|
+
sed -i "s/\"geth\",/\"geth\", \"--ethstats=$VALIDATOR_NAME:qstats-testnet@stats.qtestnet.org\",/g" /root/testnet-public-tools/testnet-validator/docker-compose.yaml
|
41
|
+
docker-compose up -d
|
42
|
+
docker-compose logs -f --tail "100"
|
43
|
+
}
|
44
|
+
|
45
|
+
restart_q_validator_node() {
|
46
|
+
cd /root/testnet-public-tools/testnet-validator
|
47
|
+
docker-compose down
|
48
|
+
docker-compose up -d
|
49
|
+
docker-compose logs -f --tail "100"
|
50
|
+
}
|
51
|
+
|
52
|
+
echo && echo -e " ${Red_font_prefix}q_blockchain 一键安装脚本${Font_color_suffix} by \033[1;35moooooyoung\033[0m
|
53
|
+
此脚本完全免费开源, 由推特用户 ${Green_font_prefix}@ouyoung11开发${Font_color_suffix},
|
54
|
+
欢迎关注, 如有收费请勿上当受骗。
|
55
|
+
———————————————————————
|
56
|
+
${Green_font_prefix} 1.安装q验证节点环境并生成钱包私钥导出 ${Font_color_suffix}
|
57
|
+
${Green_font_prefix} 2.配置文件并运行q验证者节点 ${Font_color_suffix}
|
58
|
+
${Green_font_prefix} 3.重启q验证者节点 ${Font_color_suffix}
|
59
|
+
———————————————————————" && echo
|
60
|
+
read -e -p " 请参照教程执行以上步骤,请输入数字 [1-3]:" num
|
61
|
+
case "$num" in
|
62
|
+
1)
|
63
|
+
install_q_validator_node_and_export_key
|
64
|
+
;;
|
65
|
+
2)
|
66
|
+
config_and_run_q_validator_node
|
67
|
+
;;
|
68
|
+
3)
|
69
|
+
restart_q_validator_node
|
70
|
+
;;
|
71
|
+
*)
|
72
|
+
echo
|
73
|
+
echo -e " ${Error} 请输入正确的数字"
|
74
|
+
;;
|
75
|
+
esac
|