forked from 0xrsydn/ore-miner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathore-manager.sh
45 lines (38 loc) · 887 Bytes
/
ore-manager.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
#!/bin/bash
# Default configuration
DEFAULT_THREADS=140
# Parse command line arguments
THREADS=${1:-$DEFAULT_THREADS}
# Function to check balance
check_balance() {
echo "Checking ORE balance..."
ore balance
}
# Function to check unclaimed balance
check_unclaimed() {
echo "Checking unclaimed balance..."
ore rewards
}
# Function to claim rewards
claim_rewards() {
echo "Claiming rewards..."
ore claim
}
# Function to start mining
start_mining() {
echo "Starting mining process..."
ore mine --cores "$THREADS" --dynamic-fee
}
# Main loop
while true; do
# Check current balance
check_balance
# Check and claim unclaimed rewards
check_unclaimed
# claim_rewards
# Start mining
start_mining
# If mining exits, wait 5 seconds before restarting
echo "Mining process exited. Restarting in 5 seconds..."
sleep 5
done