Stack POL: ViralAdSource program (live 2026-11-17, standing rule): programs.js 'vas' (/earn/viraladsource, join via LinkSpin nwvas src=stackpol), card image vas.jpg (VAS og image), netsites list + CODES nwvas, layout ref swap for viraladsource.com, indexer VASShop rows (Paid kind 1-6 incl. 20% resharer cut, RewardPaid pot rewards unless the push failed, Claimed; company/keeper/relay excluded, cache vas-chain.json)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 06:11:33 -06:00
parent b64c4cf72f
commit 00cb51f2b4
5 changed files with 32 additions and 9 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ function personalize(html, who, st) {
// it on as ?ref=); Earners Corner (nwec) takes none // 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 + '&amp;s1=' + who + '"'; if (/^https:\/\/linkspin\.app\/r\/nw[a-z]+\?/.test(h) && !/[?&](?:amp;)?s1=/.test(h)) return /\/r\/nwec\?/.test(h) ? m : 'href="' + h + '&amp;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:\/\/(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; return m;
}); });
} }
+1
View File
@@ -8,6 +8,7 @@ const FALLBACK = [
{ id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' }, { id: 'dlb', name: 'Downline Banners', url: 'https://downlinebanners.com' },
{ id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' }, { id: 'vbb', name: 'Viral Banner Blitz', url: 'https://viralbannerblitz.com' },
{ id: 'viraladblitz', name: 'ViralAdBlitz', url: 'https://viraladblitz.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: 'fivex', name: '5xYourTeam', url: 'https://5xyourteam.com' },
{ id: 'downlinehydra', name: 'DownlineHydra', url: 'https://downlinehydra.com' }, { id: 'downlinehydra', name: 'DownlineHydra', url: 'https://downlinehydra.com' },
{ id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' }, { id: 'stackpol', name: 'Stack POL', url: 'https://stackpol.com' },
+5
View File
@@ -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 }), { 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.', 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.' }, 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=<username>.
// 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=<username>. // 5xYourTeam The Draft (live 2026-11-15): join through the LinkSpin network link (nw5x, src=stackpol), landing on 5xyourteam.com/?ref=<username>.
// Facts from the 5x app (README, config) and the DraftPosition contract 0x83Bb...bc74 only. // 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 }), { 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 }),
Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

+25 -8
View File
@@ -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). 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. 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 - 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 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. 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. 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_START = 97364036 # deploy block (the app's SHOP_START_BLOCK)
DH_HOUSE = {DH_SHOP, '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0xf2f54cf271e8942ecb02176f408cc08a2a1d5bca'} # + company (Tangem), keeper DH_HOUSE = {DH_SHOP, '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0xf2f54cf271e8942ecb02176f408cc08a2a1d5bca'} # + company (Tangem), keeper
FX_HOUSE = {FX_SHOP, '0x7627fc78876948ac9d95c1c9eb061e7d6d647b70', '0x818daeedefbb33a1988b8b4ac76a8c1dd6e82c60', '0x196cfceb0229ee4b2f20a3350a5ec32b93b72ba8'} # + company, keeper, prize pot 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_CONFIRM = 30 # blocks behind head
VBB_SPAN = 1000 # blocks per eth_getLogs (public RPC limit) 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 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 '') 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'): 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) member payouts, read-only on chain (same scan as VBB, no prize wallet). Returns (rows, note).""" """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) cpath = os.path.join(HERE, cachefile)
cache = load(cpath, {}) or {} cache = load(cpath, {}) or {}
last = int(cache.get('lastBlock') or start - 1) 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 spans = 0
while last < head and spans < VBB_MAX_SPANS: while last < head and spans < VBB_MAX_SPANS:
frm, to = last + 1, min(head, last + VBB_SPAN) 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: if l.get('removed') or str(l.get('address', '')).lower() != shop:
continue 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)) key = (l['transactionHash'].lower(), int(l['logIndex'], 16))
if not kind or key in seen: if not kind or key in seen:
continue continue
n = int(l['blockNumber'], 16) n = int(l['blockNumber'], 16)
if kind == 'Paid': # data: amount, level, depth if kind in ('Paid', 'PaymentFailed'): # 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)} 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: else:
x = {'ev': 'Claimed', 'who': '0x' + t[1][-40:].lower(), 'to': '0x' + t[2][-40:].lower(), 'wei': str(int(data[2:66], 16))} 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)}) 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) json.dump({'lastBlock': last, 'logs': logs, 'at': int(time.time())}, f)
os.replace(tmp, cpath) os.replace(tmp, cpath)
rows = [] 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: 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: 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': ''}) 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') 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') hr, hnote = vab_rows(dry, 'dh', DH_SHOP, DH_START, DH_HOUSE, 'dh-chain.json')
rows += hr rows += hr
print(hnote) 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 # wallet -> username
wu = iap_wallet_users() wu = iap_wallet_users()
lsd = voldir(CHAINS['ls']) lsd = voldir(CHAINS['ls'])