Approved launch numbers; members earn for free; Boost = a 7-day board spot (placement only)

- config: 5 sponsor levels x 10% (company 20%), approved numbers labelled as such, POT_DAILY_CENTS display (2500).
- Eligibility: a network member with a linked wallet earns a level or the resharer cut, Boost or not. /api/my/order drops line
  members with no wallet (compression); empty levels and the no-resharer cut go to the company.
- shop.js: VASShop ABI after the contract fix (Purchase.boardDays, skus().boardDays, potDailyMaxCents, potCentsToday); purchase days
  from the chain. wire.js keeps the on-chain days.
- Copy: removed "sponsor levels pay people who have bought a Boost / passed over / none qualified" and the proposal labels; Boost page,
  chatbot, contract page (split fixed forever, pot daily cap) say a Boost buys placement only. Assets ?v=2.
- qa/e2e.mjs: deploys the new VASShop (5 x 10%, pot cap 2500, SKU 7 days); a no-wallet hub member between buyer and sponsor is
  skipped and both sponsors get exactly 10% without a Boost. 61/61. Chatbot QA 108/108.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 05:19:56 -06:00
parent a6c72a4a40
commit 608ec6547b
29 changed files with 114 additions and 91 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
// Trust pack (Marty 2026-11-14, standing for every network site): live ledger, contract proof, toasts, a Telegram photo card per sale.
// - ledger(): every Boost (the Purchase events shop.js recorded) with its split read from the receipt: the resharer's cut (kind 6),
// each sponsor level (kinds 1..5, with the person's place in the line), who was passed over, the reward pot slice and the company;
// each sponsor level (kinds 1..5, with the person's place in the compressed line), the reward pot slice and the company;
// plus the sign-up rewards ledger (signup.js publicRows: name, amount, status, tx; never an email).
// - contract(): live facts for /contract (owner, company, keeper, paused, split, pot, reward rules), cached 5 minutes.
// - Telegram: one photo card per Boost to TG_CHAT / TG_PAY_TOPIC (off unless TG_TOKEN and TG_CHAT are set; staging leaves them empty).
@@ -56,7 +56,7 @@ async function contract() {
if (cCache && Date.now() - cCache.at < 300000) return cCache.v;
const v = { address: C.contractAddress || null, chainId: C.chainId, explorer: C.explorer, proposal: true,
split: { resharerBps: C.split.resharerBps, potBps: C.split.potBps, levelBps: C.split.levelBps, maxDepth: C.split.maxDepth },
reward: { cents: C.reward.cents, dailyCap: C.reward.dailyCap, payouts: C.reward.payouts }, boost: { usd: C.boost.usd, days: C.boost.days },
reward: { cents: C.reward.cents, dailyCap: C.reward.dailyCap, payouts: C.reward.payouts, potDailyCents: C.reward.potDailyCents }, boost: { usd: C.boost.usd, days: C.boost.days },
verified: { sourcify: process.env.VERIFIED_SOURCIFY === '1', polygonscan: process.env.VERIFIED_POLYGONSCAN === '1' }, ownerNote: "Marty's Tangem hardware wallet", live: false };
if (shop && shop.watching()) {
try {
@@ -65,7 +65,7 @@ async function contract() {
const r = await shop.liveRules();
Object.assign(v, { owner: lc(owner), company: lc(company), keeper: lc(keeper), paused: !!paused, totalOwedWei: totalOwed.toString(), orderCount: Number(orderCount),
pot: { balanceWei: potBalance.toString(), fundedWei: potFunded.toString(), paidWei: potPaid.toString() }, live: true, proposal: false, readAt: Date.now() });
if (r) { v.split = { resharerBps: r.resharerBps, potBps: r.potBps, levelBps: r.levelBps, maxDepth: 20 }; v.reward.maxCents = r.rewardMaxCents; v.reward.chainDailyCap = r.rewardDailyCap; }
if (r) { v.split = { resharerBps: r.resharerBps, potBps: r.potBps, levelBps: r.levelBps, maxDepth: 20 }; v.reward.maxCents = r.rewardMaxCents; v.reward.chainDailyCap = r.rewardDailyCap; if (r.potDailyCents) v.reward.potDailyCents = r.potDailyCents; }
} catch (e) { v.error = 'The chain did not answer just now. Try again in a minute.'; }
}
cCache = { at: Date.now(), v }; if (v.error) cCache.at = Date.now() - 240000;