The reserve
How a box is logged
Buying a box leaves four records on-chain and one document off it. This is what each one holds.
1. The withdrawal
ETH leaves the reserve only through withdraw(to, amount, memo). Each call gets the next withdrawal number and is stored with its destination, amount and time. The memo names the set.
2. The acquisition
recordAcquisition appends the next box. Numbers start at 1 and are never reused.
| Field | What it holds |
|---|---|
setNumber | The LEGO set number, like 10307. |
acquiredAt | When the order was placed, as a unix time. |
costUsdCents | What the box cost, in US cents. |
withdrawalId | The withdrawal that paid for it, or 0 if it was paid another way. |
metadataURI | Where the receipt and photos document lives. |
metadataHash | keccak256 of that document's exact bytes. |
3. The metadata file
A small JSON file holds the receipt (personal details redacted), photos, merchant and payment transaction. Its hash is fixed on-chain, so if the file is ever swapped, the Proof page shows a mismatch.
proof/0001.json
{
"set": "10307",
"merchant": "LEGO.com",
"receipt": "https://bric.wtf/proof/0001-receipt.pdf",
"photos": ["https://bric.wtf/proof/0001-card.jpg"],
"paymentTx": "0x…"
}Terminal
# hash the file's exact bytes
$ cast keccak 0x$(xxd -p proof/0001.json | tr -d '\n')
0x3b1c…
4. Custody
updateCustody(n, status, evidenceURI) moves a box along. A new entry starts as Ordered.
- 1Orderedpaid, logged
- 2In transittracking number
- 3Vaultedon its shelf, photographed
The vault card
Every acquisition photo contains a printed card with the vault number and date. Its QR code opens that box's entry on the Acquisitions page, so a photo on X leads straight to the record.
Vault proof / 0001
2026-09-20
10307
Eiffel Tower