diff --git a/Makefile b/Makefile index 12cab45..d2008d7 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,8 @@ help: @echo "WALLET MANAGEMENT:" @echo " make sweep-check - Check hot wallet balances (dry run)" @echo " make sweep - Sweep funds to cold storage" - @echo " make sweep-all - Sweep ALL wallet funds to cold storage (dust collection)" + @echo " make sweep-all - Sweep ALL Monero wallet funds to cold storage (dust collection)" + @echo " make sweep-all-doge - Sweep ALL Dogecoin wallet funds to cold storage (dust collection)" @echo " make monero-transactions - View recent wallet transactions" @echo "" @echo "CLEANUP:" @@ -209,7 +210,7 @@ monero-transactions: # Sweep ALL wallet funds to cold storage (dust collection) sweep-all: venv config - @echo "=== SWEEPING ALL WALLET FUNDS TO COLD STORAGE ===" + @echo "=== SWEEPING ALL MONERO WALLET FUNDS TO COLD STORAGE ===" @echo "CAUTION: This will send ALL unlocked balance from ALL accounts!" @echo "" @if [ -z "$${COLD_WALLET_ADDRESS}" ]; then \ @@ -253,6 +254,55 @@ sweep-all: venv config echo ""; \ echo "All account sweep operations completed!" +# Sweep ALL Dogecoin wallet funds to cold storage (dust collection) +sweep-all-doge: check-dogecoin + @echo "=== SWEEPING ALL DOGECOIN WALLET FUNDS TO COLD STORAGE ===" + @echo "CAUTION: This will send ALL unlocked balance from wallet!" + @echo "" + @if [ -z "$${COLD_WALLET_ADDRESS}" ]; then \ + echo "ERROR: COLD_WALLET_ADDRESS environment variable not set!"; \ + echo "Usage: COLD_WALLET_ADDRESS= make sweep-all-doge"; \ + exit 1; \ + fi + @echo "Checking wallet balance..." + @if ! dogecoin-cli getwalletinfo >/dev/null 2>&1; then \ + echo "❌ Dogecoin wallet not accessible. Is dogecoind running?"; \ + echo "Start with: make dogecoin-node"; \ + exit 1; \ + fi + @balance=$$(dogecoin-cli getbalance); \ + unconfirmed=$$(dogecoin-cli getunconfirmedbalance || echo "0"); \ + if [ "$$(echo "$$balance == 0" | bc -l)" = "1" ]; then \ + echo "No spendable balance to sweep!"; \ + echo "Balance: $$balance DOGE"; \ + echo "Unconfirmed: $$unconfirmed DOGE"; \ + exit 1; \ + fi; \ + echo "Spendable balance: $$balance DOGE"; \ + echo "Unconfirmed: $$unconfirmed DOGE"; \ + echo ""; \ + echo "Target address: $${COLD_WALLET_ADDRESS}"; \ + echo ""; \ + read -p "Are you sure you want to sweep ALL spendable funds? (yes/no): " confirm; \ + if [ "$$confirm" != "yes" ]; then \ + echo "Cancelled."; \ + exit 0; \ + fi; \ + echo ""; \ + echo "Sweeping $$balance DOGE to cold storage..."; \ + txid=$$(dogecoin-cli sendtoaddress "$${COLD_WALLET_ADDRESS}" $$balance "" "" true); \ + if [ $$? -eq 0 ]; then \ + echo "✓ Sweep successful!"; \ + echo "Amount: $$balance DOGE"; \ + echo "Transaction ID: $$txid"; \ + echo ""; \ + echo "New wallet balance:"; \ + dogecoin-cli getbalance; \ + else \ + echo "❌ Sweep failed!"; \ + exit 1; \ + fi + # ----------------------------------------------------------------------------- # Monero Infrastructure Targets # -----------------------------------------------------------------------------