Your First 90 DaysAcademy
Writing With a Machine · Solidity, and the Tool That Writes It · Week 12 · Checkpoint 26

What You Want Saying

Two drafts of the same contract, from two different requests. One of them settles the interface, the units, the refusals, the absences and the assumptions. The other decides all five for you and mentions none of them.

14 steps~26 min3 nodes for your map
01 · The half of the loop that is yours

Four acts of reading, and here is what they were for. From here on a machine writes the first draft and you read it, which makes the reading the fast part and the asking the part nobody ever taught you. This checkpoint is the asking.

This board is the real thing: OpenZeppelin's `IERC20`, pinned at a commit, the same file you read in week four. Two of the boards ahead are not real code. They have no upstream, they were written for this lesson, and you will be told before each one.

02 · One sentence, and what came back

This board is not deployed code and belongs to no repository. It was written for this lesson as the answer to one sentence: write me a contract where people can deposit tokens. Thirty five lines came back, and they compile, and nothing in them is wrong.

Read it the way you read the last four acts. An interface, a state block, a constructor, three functions. It answers a question that was never asked, and the four boards after this one are about which questions those were.

03 · An interface it wrote for itself

The sentence said tokens and named no standard, so lines 4 to 7 are the file deciding for itself what a token is. Two declarations, written from recollection, under a name of its own choosing, with nothing on the board saying where the shape came from.

Now hold line 5 against line 41 of the real board. `IERC20` declares `transfer` as returning a `bool`, and this one declares it returning nothing at all. Both compile and both call the same token. The file chose, because the sentence did not.

04 · A mapping two keys deep

Line 13 is the whole of the accounting, and it carries two keys rather than one. Line 24 takes a token address as its first argument, line 27 writes under both keys, and line 30 asks for a token back again. Read those four lines together.

The sentence that produced this file said tokens and said nothing whatever about how many. Line 13 is an answer to a question nobody put. Say what that answer is before you scroll.

Lines 13, 24 and 30 all carry a token address. Reading only this file, what has it settled about how many tokens the contract holds?
your balance2,400
BANK_DBowner: the bank
you2,400
what the app is actually showing you
BANK_DBowner: the bank
you2,400their pen
you hold a claim. they hold the pen.
your digital life
BANK · you2,400the bank ✍
INSTAGRAM · you2.1M followersMeta ✍
STEAM · you134 gamesValve ✍
AIRLINE · you58,200 milesthe airline ✍
four tables. zero pens that are yours.
BANK_DBowner: the bank
you2,400
DENIED
try both pens
PLATFORM_DBowner: the platform
her · 8 years2,000,000 followers
one automated decision away
BANK_DB · you · 2,400intentcompetencecontinuity
your row stands on all three
FTX_DBowner: FTX
you5 BTC
the backing vault●●●●●
the row stayed. the backing did not.
CARD_DBowner: your bank ✍
TV you never bought−1,100
fraud reversal+1,100
someone holds the pen, so someone can fix it
?_DBowner: nobody
youstill yours?
?
can a table exist that nobody owns?
?
?_DBowner: ̶n̶o̶b̶o̶d̶y̶
you100
no owner, no pen, no trust?
keeper 1
you100
keeper 2
you100
keeper 3
you100
keeper 4
you100
keeper 5
you100
no THE copy, only copies.
keeper 2
you100
keeper 3
you100
keeper 4
you100
keeper 5
you100
your copy
you100
five copies. one of them is yours.
one attacker
one attacker, ten thousand faces.
real machinesburned wattsnext page, sealed
writing costs watts. faking voters buys nothing.
cost paid OUTSIDE: hardware and power
proof of work, burn energy to vote.
page 1you · 100page 2you · 100page 3you · 100page 4you · 100
rewrite one line, break every lock after it.
office lunchtrusted keeperconsensusfive keepers, real cost
the price buys trustlessness. the office already has trust.
?
ownerless ledger
you?
a key, not a login?
nobody owns the table. so who owns your row?
requests as specificationspointing at a filesilent defaults

Three new nodes on your map

requests as specifications · pointing at a file · silent defaults · +10 Lynx