File size: 796 Bytes
d4c51f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
"""Step 1 — build a list of candidate wallets to analyze.

    python scripts/01_discover_wallets.py

Writes data/candidates.json (a list of 0x addresses).
"""
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parents[1]))

from pmct.client import PolymarketClient
from pmct.discover import discover
from pmct.util import load_config, cache_path, write_json


def main():
    cfg = load_config()
    client = PolymarketClient(sleep_sec=cfg["analyze"]["request_sleep_sec"])
    print("Discovering candidate wallets...")
    wallets = discover(client, cfg["discover"])
    out = cache_path(cfg, "candidates.json")
    write_json(out, wallets)
    print(f"Saved {len(wallets)} candidates -> {out}")


if __name__ == "__main__":
    main()