klaim reward BP harian (claim service V32-V34) + kill-switch DISTRIBUTE_ENABLED (V35) + Telegram dua kanal komunitas/internal (V30/V36) + placement web/scan/dist/claim != server2U

This commit is contained in:
proitlab committed 2026-08-06 06:30:19 +07:00
1 parent d3a0e768a0
commit b1e6e93796
14 files changed
+878 -72

No files matched your search

+6 -2
View File
@@ -21,8 +21,8 @@ import requests
import db
import telegram
from config import (API_NODE, BP_PRIVATE_KEY, DATABISNIS_API,
DISTRIBUTE_MAX_ATTEMPTS, TARGET_BP, TOKEN_CONTRACT,
VEX_SYMBOL)
DISTRIBUTE_ENABLED, DISTRIBUTE_MAX_ATTEMPTS, TARGET_BP,
TOKEN_CONTRACT, VEX_SYMBOL)
VEX_PREC = Decimal('0.0001')
@@ -125,6 +125,10 @@ def run_distribution(dry_run=False):
kirim tiap transfer (retry dalam hari, guard anti-duplikat) → tutup run.
Dry-run berhenti sebelum menulis DB / tanda tangan.
"""
if not dry_run and not DISTRIBUTE_ENABLED:
print('Distribusi dinonaktifkan (DISTRIBUTE_ENABLED=false) — no-op.',
flush=True)
return 0
voters = db.query('SELECT owner, staked FROM voters')
if not voters:
print('Tidak ada pemilih segar tersimpan — no-op.', flush=True)