diff --git a/config.live.example.json b/config.live.example.json index 873dfa1e..9cf81932 100644 --- a/config.live.example.json +++ b/config.live.example.json @@ -1,8 +1,8 @@ { "mode": "live", "_comment": "Live-test config, SECRET-FREE and committed. The Fly live worker (wwf-copybot-live, COPYBOT_ROLE=live) reads THIS file and takes secrets from env (LIVE_PRIVATE_KEY/LIVE_FUNDER_ADDRESS + LIVE_CONFIRM to arm). Mac use: cp -> config.live.json and fill live.*. RULES: bankroll_usd MUST equal the actual USDC deposit at arm time (the 1.4 cash-anchor checks state cash vs chain); risk caps are LIVE_ROLLOUT rule 0.6 \u2014 never raise before Phase 6; follow set mirrors copybot.paper.json (Set E) so paper and live books stay comparable.", - "bankroll_usd": 32.0, - "bankroll_pct": 0.15625, + "bankroll_usd": 24.73, + "bankroll_pct": 0.2022, "price_guard_pct": 0.05, "taker_fee_rate": 0.03, "discord_webhook": "", @@ -21,8 +21,8 @@ "min_entry": 0.0, "max_entry": 0.95, "class_pct": { - "volume": 0.15625, - "whale": 0.15625 + "volume": 0.2022, + "whale": 0.2022 } }, "risk": { @@ -44,7 +44,7 @@ "auto_redeem": true, "rpc_url": "" }, - "stake_cap_usd": 32.0, + "stake_cap_usd": 24.73, "wallets": [ { "wallet": "0x41558102a796ba971c7567cad41c307e59f8fa41", diff --git a/copybot.py b/copybot.py index ee453dd2..4cf7f1ed 100644 --- a/copybot.py +++ b/copybot.py @@ -1365,8 +1365,8 @@ def load_cfg(path): for env, key in (("LIVE_PRIVATE_KEY", "private_key"), ("LIVE_FUNDER_ADDRESS", "funder_address"), ("LIVE_SIGNATURE_TYPE", "signature_type")): - v = os.environ.get(env) - if v: + v = (os.environ.get(env) or "").strip() # secrets often arrive with a + if v: # trailing newline from paste cfg["live"][key] = int(v) if key == "signature_type" else v cfg["follow"] = {**FOLLOW_DEFAULT, **cfg.get("follow", {})} normalize_follow_config(cfg) diff --git a/preflight_live.py b/preflight_live.py index 24926e19..568fd6fe 100644 --- a/preflight_live.py +++ b/preflight_live.py @@ -52,8 +52,8 @@ def main(): ("LIVE_FUNDER_ADDRESS", "funder_address"), ("LIVE_SIGNATURE_TYPE", "signature_type"), ("ALCHEMY_RPC_URL", "rpc_url")): - if os.environ.get(env): - live[key] = os.environ[env] + if (os.environ.get(env) or "").strip(): + live[key] = os.environ[env].strip() # tolerate pasted newlines if "watchlist" not in cfg and cfg.get("wallets"): cfg["watchlist"] = [w["wallet"] for w in cfg["wallets"]] pk, funder = live.get("private_key"), live.get("funder_address")