diff --git a/layout.js b/layout.js index 7b59365..0fd6de3 100644 --- a/layout.js +++ b/layout.js @@ -150,7 +150,7 @@ function personalize(html, who, st) { // it on as ?ref=); Earners Corner (nwec) takes none if (/^https:\/\/linkspin\.app\/r\/nw[a-z]+\?/.test(h) && !/[?&](?:amp;)?s1=/.test(h)) return /\/r\/nwec\?/.test(h) ? m : 'href="' + h + '&s1=' + who + '"'; if (/^https:\/\/(instantadpay\.com|linkspin\.app)\//.test(h)) return 'href="' + h.replace(/\/join\/martbost\b/, '/join/' + who).replace(/([?&](?:amp;)?ref=)martbost\b/, '$1' + who).replace(/([?&](?:amp;)?s1=)martbost\b/, '$1' + who) + '"'; // s1 = the member on a LinkSpin network link (nwvbb, 2026-11-15) - if (/^https:\/\/(downlinebanners\.com|viralbannerblitz\.com|viraladblitz\.com|5xyourteam\.com|downlinehydra\.com)\//.test(h)) return 'href="' + h.replace(/([?&](?:amp;)?ref=)martbost\b/, '$1' + who) + '"'; + if (/^https:\/\/(downlinebanners\.com|viralbannerblitz\.com|viraladblitz\.com|viraladsource\.com|5xyourteam\.com|downlinehydra\.com)\//.test(h)) return 'href="' + h.replace(/([?&](?:amp;)?ref=)martbost\b/, '$1' + who) + '"'; return m; }); } diff --git a/netsites.js b/netsites.js index c2880d0..d77564b 100644 --- a/netsites.js +++ b/netsites.js @@ -8,6 +8,7 @@ const FALLBACK = [ { id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' }, { id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' }, { id: 'viraladblitz', name: 'ViralAdBlitz', url: 'https://viraladblitz.com' }, + { id: 'viraladsource', name: 'ViralAdSource', url: 'https://viraladsource.com' }, { id: 'fivex', name: '5xYourTeam', url: 'https://5xyourteam.com' }, { id: 'downlinehydra', name: 'DownlineHydra', url: 'https://downlinehydra.com' }, { id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' }, diff --git a/programs.js b/programs.js index 212769c..d519de0 100644 --- a/programs.js +++ b/programs.js @@ -24,6 +24,11 @@ const PROGRAMS = [ { k: 'vab', slug: 'viraladblitz', n: 'ViralAdBlitz', c: '#0a2fa8', kind: 'Viral text ads', verb: 'Join', app: true, site: 'https://viraladblitz.com', join: u => tracked('viraladblitz', 'stackpol', { s1: u }), d: 'The network\'s home for text ads. Network members post one text ad free; your member page shows your ad and the ads of the five people above you, so every person you bring in shows your ad on their page, five levels deep. A $5 Boost is a one-time purchase of 500 guaranteed network views, paid with SafePal or any other crypto wallet, never a subscription. The contract pays 10% of each Boost to each of five levels up the buyer\'s line in the same transaction. Nothing is promised.', how: 'Payouts here are the level shares the ViralAdBlitz smart contract pays to five people up the buyer\'s line (10% each, to people who have bought a Boost themselves) in the same transaction as each Boost. The company share is not counted.' }, + // ViralAdSource (live 2026-11-17): join through the LinkSpin network link (nwvas, src=stackpol), landing on viraladsource.com/?ref=. + // Facts from the VAS app (approved launch numbers) and the VASShop contract 0x7EFe...4f24 only. + { k: 'vas', slug: 'viraladsource', n: 'ViralAdSource', c: '#c4371b', kind: 'Reshared text ads', verb: 'Join', app: true, site: 'https://viraladsource.com', join: u => tracked('viraladsource', 'stackpol', { s1: u }), + d: 'Free text ads that travel by reshares. Network members post a text ad free; anyone can reshare it with their own link, and every reshare shows as a branch on the ad\'s family tree. A $5 Boost is a one-time purchase that puts an ad on top of the reshare board for 7 days, paid with SafePal or any other crypto wallet, never a subscription. The contract splits each Boost in the same transaction: 20% to the resharer whose link it came through, 10% to each of five levels up the buyer\'s line and 10% to a capped reward pot. No Boost is needed to receive a share. Nothing is promised.', + how: 'Payouts here are what the ViralAdSource smart contract pays members in the same transaction as each Boost (the 20% resharer cut and the 10% level shares, five levels up the buyer\'s line), plus the small new-member rewards paid from its reward pot. The company share is not counted.' }, // 5xYourTeam The Draft (live 2026-11-15): join through the LinkSpin network link (nw5x, src=stackpol), landing on 5xyourteam.com/?ref=. // Facts from the 5x app (README, config) and the DraftPosition contract 0x83Bb...bc74 only. { k: 'fx', slug: '5xyourteam', n: '5xYourTeam', c: '#ffc93c', kind: 'Team draft', verb: 'Join', app: true, site: 'https://5xyourteam.com', join: u => tracked('fivex', 'stackpol', { s1: u }), diff --git a/public/img/vas.jpg b/public/img/vas.jpg new file mode 100644 index 0000000..2cf4de3 Binary files /dev/null and b/public/img/vas.jpg differ diff --git a/tools/indexer.py b/tools/indexer.py index 2e8c12e..03dc2ad 100644 --- a/tools/indexer.py +++ b/tools/indexer.py @@ -9,7 +9,7 @@ weekly prize transfers listed in VBB's prizes.json, each checked on chain (sent by the prize wallet, to that winner, succeeded). The scan position and the checked prize transfers are cached in /root/stackpol-indexer/vbb-chain.json. - ViralAdBlitz (2026-11-15): VABShop Paid (level 1-5 shares) and Claimed logs read from Polygon the same way, cached in - /root/stackpol-indexer/vab-chain.json. These two caches are the only files it writes. + /root/stackpol-indexer/vab-chain.json (ViralAdSource 2026-11-17: + resharer cut and pot rewards, vas-chain.json). These caches are the only files it writes. It builds one snapshot (network totals, per-program totals, last 7 days, latest 300 payouts, a stack per opted-in member) and POSTs it to https://stackpol.com/api/ingest with the key in /root/.stackpol-ingest-key. Nothing is written anywhere else. The ledger shows each payout's username (Marty 2026-11-09); only opted-in members get a public stack page. @@ -63,6 +63,14 @@ DH_SHOP = '0xed07ad7150ecba62689cf2480729753f2fa44e90' # DownlineHydra HydraPro DH_START = 97364036 # deploy block (the app's SHOP_START_BLOCK) DH_HOUSE = {DH_SHOP, '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0xf2f54cf271e8942ecb02176f408cc08a2a1d5bca'} # + company (Tangem), keeper FX_HOUSE = {FX_SHOP, '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0x818daeedefbb33a1988b8b4ac76a8c1dd6e82c60', '0x196cfceb0229ee4b2f20a3350a5ec32b93b72ba8'} # + company, keeper, prize pot +# ViralAdSource (2026-11-17): VASShop on Polygon, read-only; same Paid/Claimed events as VABShop plus the reward pot. Member payouts = +# Paid kind 1-5 (10% level shares) and kind 6 (the 20% resharer cut), RewardPaid (a new-member reward from the pot, unless its push +# failed in that tx: then the later Claimed counts it), and Claimed by a member. Kind 0 = company; contract, company, keeper and relay excluded. +VAS_SHOP = '0x7efe7b6ac1e666555f70d005e2cf1637804c4f24' +VAS_START = 97473297 # deploy block (the app's SHOP_START_BLOCK) +VAS_HOUSE = {VAS_SHOP, '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0xc76ca7dd499338299c2b4bde2dc5c61bf2a97aae', '0x2fe1afedc6ba13fea4e820e7f4c67e6ea40dd9d6'} # + company (Tangem), keeper, relay +VAS_TOPICS = {'0xd1c8a663b78b68951e43495fb4824e0454105c7043f5fa8d570d140b5a73d48e': 'RewardPaid', # RewardPaid(uint256,address,uint256,uint256,uint256) + '0x8518389ba90468cb21477807ccd9bf28d0f41f2b3affa2f77a779786efa2cc04': 'PaymentFailed'} # PaymentFailed(uint256,address,uint256,uint8,uint8) VBB_CONFIRM = 30 # blocks behind head VBB_SPAN = 1000 # blocks per eth_getLogs (public RPC limit) VBB_MAX_SPANS = 400 # per run; a long gap catches up over a few runs @@ -207,8 +215,11 @@ def vbb_rows(dry=False): last, len(logs), allwei / 1e18, len(prizes), len(rows), sum(r['pol'] for r in rows), ('; ' + note) if note else '') -def vab_rows(dry=False, k='vab', shop=VAB_SHOP, start=VAB_START, house=VAB_HOUSE, cachefile='vab-chain.json'): - """ViralAdBlitz (and, same events, 5xYourTeam) member payouts, read-only on chain (same scan as VBB, no prize wallet). Returns (rows, note).""" +def vab_rows(dry=False, k='vab', shop=VAB_SHOP, start=VAB_START, house=VAB_HOUSE, cachefile='vab-chain.json', maxlevel=5, extra=None): + """ViralAdBlitz (and, same events, 5xYourTeam, DownlineHydra, ViralAdSource) member payouts, read-only on chain (same scan as VBB, + no prize wallet). maxlevel = highest Paid level/kind counted (ViralAdSource 6 = resharer); extra = more topics (ViralAdSource + RewardPaid + PaymentFailed). Returns (rows, note).""" + topics = dict(VAB_TOPICS, **(extra or {})) cpath = os.path.join(HERE, cachefile) cache = load(cpath, {}) or {} last = int(cache.get('lastBlock') or start - 1) @@ -227,16 +238,18 @@ def vab_rows(dry=False, k='vab', shop=VAB_SHOP, start=VAB_START, house=VAB_HOUSE spans = 0 while last < head and spans < VBB_MAX_SPANS: frm, to = last + 1, min(head, last + VBB_SPAN) - for l in rpc('eth_getLogs', [{'address': shop, 'topics': [list(VAB_TOPICS)], 'fromBlock': hex(frm), 'toBlock': hex(to)}]) or []: + for l in rpc('eth_getLogs', [{'address': shop, 'topics': [list(topics)], 'fromBlock': hex(frm), 'toBlock': hex(to)}]) or []: if l.get('removed') or str(l.get('address', '')).lower() != shop: continue - kind, t, data = VAB_TOPICS.get(l['topics'][0]), l['topics'], l.get('data') or '0x' + kind, t, data = topics.get(l['topics'][0]), l['topics'], l.get('data') or '0x' key = (l['transactionHash'].lower(), int(l['logIndex'], 16)) if not kind or key in seen: continue n = int(l['blockNumber'], 16) - if kind == 'Paid': # data: amount, level, depth - x = {'ev': 'Paid', 'to': '0x' + t[2][-40:].lower(), 'wei': str(int(data[2:66], 16)), 'level': int(data[66:130], 16), 'depth': int(data[130:194], 16)} + if kind in ('Paid', 'PaymentFailed'): # data: amount, level, depth + x = {'ev': kind, 'to': '0x' + t[2][-40:].lower(), 'wei': str(int(data[2:66], 16)), 'level': int(data[66:130], 16), 'depth': int(data[130:194], 16)} + elif kind == 'RewardPaid': # topics: nonce, to; data: usdCents, weiPaid, day + x = {'ev': 'RewardPaid', 'to': '0x' + t[2][-40:].lower(), 'wei': str(int(data[66:130], 16)), 'cents': int(data[2:66], 16)} else: x = {'ev': 'Claimed', 'who': '0x' + t[1][-40:].lower(), 'to': '0x' + t[2][-40:].lower(), 'wei': str(int(data[2:66], 16))} x.update({'tx': key[0], 'li': key[1], 'block': n, 'ts': btime(n)}) @@ -254,8 +267,9 @@ def vab_rows(dry=False, k='vab', shop=VAB_SHOP, start=VAB_START, house=VAB_HOUSE json.dump({'lastBlock': last, 'logs': logs, 'at': int(time.time())}, f) os.replace(tmp, cpath) rows = [] + failed = {(x['tx'], x['to']) for x in logs if x['ev'] == 'PaymentFailed'} # a reward whose push failed is counted when Claimed for x in logs: - member = (x['ev'] == 'Paid' and 1 <= int(x.get('level') or 0) <= 5) or (x['ev'] == 'Claimed' and x.get('who') not in house) + member = (x['ev'] == 'Paid' and 1 <= int(x.get('level') or 0) <= maxlevel) or (x['ev'] == 'Claimed' and x.get('who') not in house) or (x['ev'] == 'RewardPaid' and (x['tx'], x['to']) not in failed) if member and x['to'] not in house and int(x['wei']) > 0: rows.append({'k': k, 'pol': int(x['wei']) / 1e18, 'tx': x['tx'], 'ts': ms(x['ts']), 'w': x['to'], 'gu': ''}) allwei = sum(int(x['wei']) for x in logs if x['ev'] == 'Paid') @@ -354,6 +368,9 @@ def main(): hr, hnote = vab_rows(dry, 'dh', DH_SHOP, DH_START, DH_HOUSE, 'dh-chain.json') rows += hr print(hnote) + sr, snote = vab_rows(dry, 'vas', VAS_SHOP, VAS_START, VAS_HOUSE, 'vas-chain.json', 6, VAS_TOPICS) + rows += sr + print(snote) # wallet -> username wu = iap_wallet_users() lsd = voldir(CHAINS['ls'])