StealThis .dev

Web3 — Gas / Network Fee Selector

A glassy, dark-mode gas and network-fee selector for an EIP-1559 style chain, built as a pure UI simulation. Three speed presets — Slow, Normal, Fast — render as selectable cards showing live gwei, estimated confirm time and fiat cost, while a Custom tab exposes max base fee and priority fee inputs with a computed total. A current base-fee ticker drifts every couple of seconds, recomputing every preset, the running summary and the signed-fee figure with smoothly animated monospace numbers.

Buka di Lab
html css vanilla-js
Targets: JS HTML

Code

Gas / Network Fee Selector

A compact fee-picker card for the fictional Lumen Chain, dressed in the Web3 visual language: a gradient-bordered glassy surface, neon accents, soft glow on the primary action, and monospace numerals for every gwei value, amount and address. A header ticker shows the live base fee and flashes red or green as it moves; addresses like 0x7a3f…c41d are truncated in mono.

The body switches between two modes. Presets offers Slow, Normal and Fast cards — each surfaces its gwei rate, an estimated confirm time (~3 min / ~45 s / ~15 s) and the fiat cost, with the selected card lit by a neon accent and an active-edge marker. The cards form a keyboard-navigable radiogroup, so arrow keys move the selection. Custom swaps in max-base-fee and priority-fee inputs, quick priority chips, a one-tap Sync button that snaps the cap to the live base fee plus headroom, and an inline warning when the cap drops below the current base fee.

Everything feeds a running summary — effective gwei, gas limit, estimated confirmation and a max-network-fee total in LUM plus its fiat estimate — which also drives the Confirm & sign button. A simulated base fee drifts every couple of seconds via a mean-reverting random walk, re-pricing all presets and the summary with animated numbers, and signing runs a mock awaiting-signature state that resolves to a fake transaction hash via a toast. No real wallet, RPC or signing is involved.

UI-only simulation — no real wallet, RPC, or on-chain calls. Mock data, fictional tokens.