-
Notifications
You must be signed in to change notification settings - Fork 0
/
orek-tempe.sh
49 lines (35 loc) · 1.14 KB
/
orek-tempe.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
#!/bin/bash
# Add Solana CLI and Cargo to PATH
export PATH="/home/codespace/.local/share/solana/install/active_release/bin:$PATH"
. "$HOME/.cargo/env"
# Create Codespace Configuration File
mkdir -p /home/codespace/.config/fish/conf.d/
# Install Rust and Cargo
curl https://sh.rustup.rs -sSf | sh
# Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/v1.18.4/install)"
# Create a New Solana Wallet
solana-keygen new
# Display wallet address and ask user to deposit 0.01 SOL
echo "Please deposit 0.01 SOL to your wallet address and press Enter to continue..."
SOLANA_PUBKEY=$(solana-keygen pubkey)
echo "Wallet Address: $SOLANA_PUBKEY"
read -p "Press Enter to continue after depositing 0.01 SOL..."
# Check Balance
solana balance
# Install the Ore CLI
cargo install ore-cli
# Prompt user for Alchemy RPC URL
read -p "Enter Alchemy RPC URL: " ALCHEMY_RPC_URL
# Create HTTP Miner Script
cat <<EOF > oreminer.sh
#!/bin/bash
while true; do
echo "Running"
ore --rpc $ALCHEMY_RPC_URL --keypair ~/.config/solana/id.json --priority-fee 10 mine --threads 4
echo "Exited"
done
EOF
# Make Script Executable
chmod +x oreminer.sh
./oreminer.sh