-
Notifications
You must be signed in to change notification settings - Fork 7
/
transferSol.sh
35 lines (28 loc) · 963 Bytes
/
transferSol.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
# @Author: Cissoko420
# @Date: 2024-04-16 11:27:30
# @Last Modified by: Cissoko420
# @Last Modified time: 2024-04-16 11:30:15
#!/bin/bash
# Transfer all SOL from miners to single wallet
receiver_wallet="WALLET ADDRESS"
nr_wallets=11
clear
while true; do
for ((i=1;i<=nr_wallets;i++)); do
balance=$(solana balance --keypair ~/.config/solana/ids/id$i.json)
send_balance=$(echo "$balance" | awk '{print $1}')
if (( $(echo "$send_balance > 0" | bc -l) )); then
echo "ID$i balance: $balance SOL - To Transfer"
solana transfer "$receiver_wallet" "$send_balance" --from ~/.config/solana/ids/id$i.json --allow-unfunded-recipient --fee-payer ~/.config/solana/ids/claimed.json
echo ""
sleep 2
else
echo "ID$i balance: $balance SOL - No balance to send"
echo ""
fi
done
echo "Waiting to do next run"
echo ""
sleep 5
clear
done