Add on-chain payment proof: live payout feed, ID verification, admin lineage tools
New chain.js reads the RM Circle contract (0x33Bd…2DAF, Polygon) via free public RPCs — no API keys. Daily snapshot rebuilds complete payout history from getIncomeHistory (log providers prune old history), and a 60s eth_getLogs tail catches new payouts with tx hashes, upgrade context, and passed-over upline IDs. - Bridge page: "Live payment proof" feed + timed toast pop-ups for payouts seen in the last 15 min, every row linking to Polygonscan. - /start: same toasts; ID submissions are now verified against the contract (result shown to the member, in Telegram notify, and in admin). - Admin: on-chain member lookup (lineage to root, directs, matrix children, full income history) and a collapsible full matrix tree view. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -40,7 +40,10 @@ document.getElementById('idSubmitForm').addEventListener('submit',async e=>{
|
||||
if(!r.ok)throw new Error(d.error||'Submission failed');
|
||||
form.classList.add('hidden');
|
||||
msg.style.color='var(--ok)';
|
||||
msg.innerHTML=d.duplicate?`✓ ID <strong>${newId}</strong> was already submitted — you're on the list.`:`✓ Got it! ID <strong>${newId}</strong> is submitted under sponsor ID <strong>${sponsorId}</strong>. The team has been notified and you'll be added to the rotation.`;
|
||||
let chainNote='';
|
||||
if(d.onchain&&d.onchain.registered)chainNote=`<br><span style="color:var(--teal)">✓ Verified on the blockchain: ${d.onchain.tier} tier, ${d.onchain.level} level, referred by ID ${d.onchain.referrerId}.</span>`;
|
||||
else if(d.onchain&&d.onchain.registered===false)chainNote=`<br><span style="color:var(--danger)">⚠ We couldn't find this ID on the smart contract yet — double-check the number. The team will verify it manually.</span>`;
|
||||
msg.innerHTML=d.duplicate?`✓ ID <strong>${newId}</strong> was already submitted — you're on the list.`:`✓ Got it! ID <strong>${newId}</strong> is submitted under sponsor ID <strong>${sponsorId}</strong>. The team has been notified and you'll be added to the rotation.${chainNote}`;
|
||||
}catch(x){msg.style.color='var(--danger)';msg.textContent=x.message}
|
||||
});
|
||||
document.getElementById('copyButton').addEventListener('click',async()=>{
|
||||
|
||||
Reference in New Issue
Block a user