Live blocks feed
The page polls a public Ethereum node every few seconds, and each new block is added to the top of the table with rows.apply. The row is highlighted for a moment as it arrives, and blocks older than fifty are dropped. Stream live updates.
async function addBlock(n) {
const b = await rpc('eth_getBlockByNumber', ['0x' + n.toString(16), false]);
await mapReady;
const row = { number: n, time: utc(parseInt(b.timestamp, 16)), txs: b.transactions.length, gasUsed: BigInt(b.gasUsed).toString(),
baseFee: BigInt(b.baseFeePerGas || 0).toString(), miner: b.miner, fresh: seeded };
row.builder = builderName(b.extraData || '0x', b.miner);
row.minerKey = row.builder ? row.builder + ' ' + b.miner : b.miner;
blocks.rows.apply({ add: [row], at: 0 });
Exact token amounts
A token amount is a whole number of base units. The bigint column keeps every digit and shows it scaled by six decimals, so the cells, the sort, the filters and the total row are exact, with no rounding. Grand total row.
columns: [
{ field: 'time', title: 'Time (UTC)', type: 'text', layout: { width: 170, flex: 1 }, filter: true, total: () => 'Total' },
hash('address', 'from', 'From'), hash('address', 'to', 'To'),
{ field: 'amount', title: `Amount (${d.token.symbol})`, type: 'bigint', typeOptions: { scale: d.token.decimals }, layout: { width: 170, flex: 1 }, filter: true, total: 'sum', sort: true },
{ field: 'block', title: 'Block', type: 'number', format: { grouping: false, decimals: 0 }, layout: { width: 110, flex: 1 } },
Top senders, derived
This grid holds no data of its own. It is worked out from the transfers grid: group by sender, add up the exact amounts, rank, keep twenty. Filter the transfers and the ranking updates at once. API reference.
window.sendersGrid = createGrid($('senders'), {
source: { mode: 'derived', from: grid, groupBy: 'from', select: { total: { of: 'amount', fn: 'sum' }, count: {} }, sort: [{ col: 'total', dir: 'desc' }], limit: 20 },
columns: [
hash('address', 'from', 'Sender'),
{ field: 'total', title: `Total sent (${d.token.symbol})`, type: 'bigint', typeOptions: { scale: d.token.decimals }, layout: { width: 190, flex: 1 } },
{ field: 'count', title: 'Transfers', type: 'number', layout: { width: 120, flex: 1 } },
],
});
A chart that follows the grid
The chart reads the same transfers grid, so it shows exactly the rows the table shows. Filter by time, address or amount and the hourly bars change with it. A chart that follows the grid.
// Same rows as the table (so its filter applies), oldest first so time reads left to right.
const byTime = (g) => { const a = []; g.rows.forEach((r) => a.push(r)); return a.sort((p, q) => p.data.block - q.data.block); };
createChart({
grid, container: '#chart', type: 'bar', rows: byTime, x: 'hour', y: { col: 'amount', fn: 'sum' }, legend: false, height: 340,
axis: { x: { title: 'Day · hour (UTC), oldest to newest' }, y: { title: `${d.token.symbol} per hour`, format: usd } },
tooltip: { format: (pt) => `${pt.x ?? pt.label}: ${usd(pt.y ?? pt.value)}` },
});
The address cell
Addresses and hashes are shortened to fit a column. The full value is on hover, one button copies it and one link opens it in a public explorer. The same cell is used in all three grids.
const hashCell = (kind, named) => ({ value, text, data }) => {
const full = named ? String(data.miner) : String(value);
if (!/^0x[0-9a-f]{40,64}$/.test(full)) return text ?? '';
const name = named && data.builder ? data.builder.replace(/[<>&"]/g, '') + ' (' + short(full) + ')' : short(full);
const el = document.createElement('span');
el.innerHTML = `<span class="addr" title="${full}">${name}</span><span class="tools">` +
`<button type="button" title="Copy" aria-label="Copy ${full}">⧉</button>` +
`<a href="${EXPLORER}${kind}/${full}" target="_blank" rel="noopener" title="Open in explorer" aria-label="Open in explorer">↗</a></span>`;
el.querySelector('button').onclick = (e) => { const b = e.currentTarget; e.stopPropagation(); navigator.clipboard?.writeText(full); b.textContent = '✓'; setTimeout(() => (b.textContent = '⧉'), 1200); };
return el;
};
Naming the block builders
Each block row gets a builder field when it arrives, so the Miner column sorts and filters by name (try “titan”). The name is read from the block’s own extra data; if that is empty, a small map of builder addresses in data/builders.json fills it in. Unknown addresses stay shortened.
const builderName = (extraData, miner) => {
const text = hexText(extraData).replace(/[^\x20-\x7e]/g, ' ').replace(/\s+/g, ' ').trim();
const name = text.replace(/\s*\(.*?\)/g, '').replace(/\s+(?:www\.|docs\.|https?:)\S*/gi, '').replace(/\.(org|xyz|build|com|money)$/i, '').replace(/^builder\./i, '').replace(/[()]/g, '').trim();
return /[a-z]{3}/i.test(name) && !CLIENT.test(text) ? name : builderMap[miner.toLowerCase()] || '';
};