spb/coinexplorer Public MIT
Self-hosted, zero-API-key explorer for stablecoins and major crypto.
Python 60.3%
HTML 23.6%
JavaScript 8.1%
CSS 6.8%
SQL 1%
1<!doctype html>2<!-- Author: Simon-Pierre Boucher -->3<!-- Mail: contact@spboucher.ai -->4<html lang="en">5<head>6<meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">7<title>address — coinexplorer</title>8<link rel="stylesheet" href="/assets/style.css">9</head>10<body>11<main>12 <div class="pagehead"><h1>Address</h1><span class="sub mono" id="addr" style="max-width:none"></span></div>1314 <section class="card tile"><h2>Transfers indexed</h2><div class="big" id="tCount">—</div></section>15 <section class="card tile"><h2>Received</h2><div class="big up" id="tIn">—</div></section>16 <section class="card tile"><h2>Sent</h2><div class="big down" id="tOut">—</div></section>17 <section class="card tile"><h2>Chains seen</h2><div class="big" id="tChains">—</div><div class="note" id="tChainsN"></div></section>1819 <section class="card"><h2>Cross-chain transfer history <span class="sub">(within indexed window)</span></h2>20 <div class="scroll" style="max-height:65vh"><table>21 <thead><tr><th></th><th>chain</th><th>token</th><th class="num">amount</th><th>counterparty</th><th>tx</th><th>when</th></tr></thead>22 <tbody id="rows"></tbody></table></div></section>23</main>2425<script type="module">26import { $, qs, j, fmtUsd, fmtN, fmtAmt, mountNav, addrLink, txLink, chainLink, tokenLink, ago } from "/assets/app.js";27mountNav("Transfers");28const A = qs.get("a") || "";29$("addr").textContent = A || "no address given";30document.title = `${A.slice(0, 14)}… — coinexplorer`;3132async function load() {33 if (!A) return;34 const rows = await j(`/v1/address/${encodeURIComponent(A)}/transfers?limit=500`);35 const me = (x) => x === A || (A.startsWith("0x") && x === A.toLowerCase());36 let recv = 0, sent = 0;37 const chains = new Set();38 for (const r of rows) {39 chains.add(r.chain);40 if (me(r.to)) recv += (r.usd ?? parseFloat(r.value));41 if (me(r.from)) sent += (r.usd ?? parseFloat(r.value));42 }43 $("tCount").textContent = fmtN(rows.length) + (rows.length === 500 ? "+" : "");44 $("tIn").textContent = "+" + fmtUsd(recv);45 $("tOut").textContent = "−" + fmtUsd(sent);46 $("tChains").textContent = chains.size;47 $("tChainsN").textContent = [...chains].join(", ");48 $("rows").innerHTML = rows.map((r) => {49 const out = me(r.from);50 return `<tr><td class="${out ? "burn" : "mint"}">${out ? "↑ out" : "↓ in"}</td>51 <td>${chainLink(r.chain)}</td><td>${tokenLink(r.symbol)}</td>52 <td class="num">${fmtAmt(r)}</td>53 <td>${addrLink(out ? r.to : r.from)}</td><td>${txLink(r.chain, r.tx_hash)}</td>54 <td>${ago(r.timestamp)} ago</td></tr>`;55 }).join("") || `<tr><td colspan="7" class="empty">nothing indexed for this address (index covers the recent window only)</td></tr>`;56}57load();58</script>59</body>60</html>61