← The Journal Build Notes

The badge you can paste anywhere, and the one read behind it

Published August 2, 2026 · Buy One Second

Most of what this project makes lives at one address on the clock. But there is a smaller thing that travels: a badge you can drop onto your own page, sized like a bumper sticker, that shows a second and links back here. It is served at /widget, and if you have ever wondered what that little card is actually doing, the answer is short. It reads one second off Base and draws it. That is close to the whole story, and the parts that are not are worth spelling out.

As with the other build notes, I am describing what the widget's source does, not what I wish it did. You can open it yourself; there is nothing hidden behind it.

One iframe, and why it is an iframe

The embed snippet the home page hands you is a plain <iframe> pointed at buyonesecond.com/widget, fixed at 420 by 92 pixels with rounded corners. An iframe is a small sealed window: the widget runs in its own frame, on this project's domain, and cannot reach into the page hosting it. That containment is the point. You are pasting a link to a page we serve, not a script that runs inside your site. If you have ever hesitated before embedding a third-party badge, that distinction is the reassuring one. The worst a framed page can do to its host is sit there.

The widget page also carries a noindex instruction, so search engines skip it. It is furniture, not a destination. The destination is the home page it links back to.

The single call it makes

Inside the frame, the widget knows exactly one function. Its entire contract interface is a single line: getSecondData(uint256) view returns (bool minted, uint256 tokenId, address owner_, string url). It talks to Base through a public RPC endpoint, asks that one question about one second, and gets back four values. No wallet connects. No signature is requested. A view call is a read, and a read is free to anyone.

That narrowness is deliberate. The main site loads a fat ABI because it does a lot: minting, batch reads, the jackpot, referral totals. The badge does one thing, so it carries one function. If you audited the widget for what it could possibly do to a visitor's wallet, the answer falls out of the code immediately: nothing, because it never asks for one.

The widget reads a second and renders it. It has no mint button that spends money, no wallet connection, and no write access to anything. The only action it offers is a link back to the main site, where any actual minting happens in the open.

Two modes from one page

The same page behaves two different ways depending on one URL parameter. Without a second in the query string, it runs in live mode: it reads the clock, works out the current second of the day, and shows that. If that second is already minted, it displays the owner's link; if it is free, it shows a Claim it → button pointing at the home page with that second pre-selected. It is a small rotating window onto whatever second the world is passing through right now.

Add ?second= with a number you own, and it switches to badge mode. Now it pins to that one second, reads it once, and renders a static card that says I own this second above your link, with a quiet get your own → underneath. This is the mode the home page generates for you once you own a second and connect a wallet. If the pinned second turns out not to be minted, the badge quietly falls back to the live clock rather than showing an empty boast. The code checks before it brags.

The address that rides along

Both modes can carry a ref= parameter, and this is where the badge stops being only decoration. When the home page builds your snippet, it sets that parameter to your connected wallet address. Every link the badge draws back to this site, the claim button in live mode and the get your own link in badge mode, keeps your address in the query string. So the same card that shows off the second you own also hands your referral address to anyone who clicks through and mints. The badge is a referral link wearing a nicer outfit.

I wrote a whole primer on how that referral address works once it reaches the contract, so I will not repeat it here beyond the honest caveat: the address travels in a URL, and a URL can be edited or stripped by whoever is clicking. The badge is a courtesy that credits you by default, not a lock that guarantees credit. If you want the mechanics of what the chain records, that is the referrals note.

Untrusted strings, again

There is one subtlety that connects the badge to the rest of the site's plumbing. The URL a badge displays is a string an owner stored on chain, which means it is attacker-controlled input in the strict sense: someone could have put anything in there. So the widget treats it the way the main site does. Before any stored link is shown, it is escaped so it cannot smuggle in markup that runs. Before any link becomes clickable, it is checked against a plain rule that allows only http and https addresses, which quietly refuses the old javascript: trick. Outbound links carry rel="noopener nofollow" so the page you open cannot reach back into the frame.

None of that makes a stranger's link safe to follow. It means the badge itself will not be the thing that hurts a visitor, and the judgment about where a link goes stays with the person clicking it. That is the same posture the editable-link note describes, applied to a card small enough to fit in a sidebar.

What it proves, and what it does not

A badge showing I own this second is only as true as the read behind it, and the read is honest: it pulls current ownership from the contract at load time, so it reflects the chain, not a screenshot. If you sell the second, the badge stops claiming it the next time it loads, because it re-reads rather than trusting a cached boast. That is the good part.

The limits are the ones worth naming plainly. The badge does not prove the second is worth anything; it is not a price tag, and nothing here says its value goes anywhere. Clicking through and minting still costs a real fee on Base, transactions are irreversible, lost keys stay lost, and phishing pages that imitate the real site are a standing hazard whenever a wallet is involved. This is not financial advice, and a second is not an investment. The badge is a way to point at a moment you claimed and invite someone to claim one of their own. That is all it is trying to be, and there is something clean about a thing that does exactly what it says.

Grab your badge on the home page · How referrals work onchain · The site has no database

Project references