Earners Corner on Stack POL (Marty 2026-11-10): program card + /earn/earners-corner (join via instantadpay.com/forum/join/<member>), indexer reads the forum reward service's /payouts over WireGuard (10.100.0.2:18950, Stack POL ingest key), attribution by wallet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-10 11:10:57 -06:00
parent 137dc6a09a
commit 8abd442984
3 changed files with 13 additions and 0 deletions
+10
View File
@@ -24,6 +24,7 @@ GAMES = { # key: (volume dir glob, file)
'pw': ('kq67q1d59m31uqfx1txyr18q-polywarriors-data', 'polpayouts.json'),
'td': ('eo4tqkuwcvny0oqo2dfck9fe-turkeydrop-data', 'polpayouts.json'),
}
EC_PAYOUTS = 'http://10.100.0.2:18950/payouts'
PD_VOL = 'w94d6qjry9wjp0pwqzxheora-passivedrip-engine-data'
CHAINS = {'iap': 'h8jd2hmt9y3c1gco9ed5nmva-instantadpay-data', 'ls': 'c10c6soppcsowxsgbrufqb01-*linkspin-prod-data'}
IAP_UUID = 'h8jd2hmt9y3c1gco9ed5nmva'
@@ -101,6 +102,15 @@ def main():
continue
if pol > 0:
rows.append({'k': 'pd', 'pol': pol, 'tx': x['tx'], 'ts': ms(x.get('paidAt') or x.get('at')), 'w': str(x.get('to') or '').lower(), 'gu': ''})
# Earners Corner welcome rewards (Marty 2026-11-10): the forum's reward service on core2 lists every reward paid on chain, over
# WireGuard, keyed with the Stack POL ingest key. Attribution by wallet like the games.
try:
rq = urllib.request.Request(EC_PAYOUTS, headers={'x-key': open('/root/.stackpol-ingest-key').read().strip()})
for x in json.load(urllib.request.urlopen(rq, timeout=15)):
if x.get('tx') and float(x.get('pol') or 0) > 0:
rows.append({'k': 'ec', 'pol': float(x['pol']), 'tx': x['tx'], 'ts': ms(x.get('at')), 'w': str(x.get('wallet') or '').lower(), 'gu': ''})
except Exception as e:
print('earners corner payouts unavailable:', e)
for k, pat in CHAINS.items():
d = voldir(pat)
ci = load(os.path.join(d, 'chain-index.json'), {}) if d else {}