Your First 90 DaysAcademy
The Grammar · Contracts Talking to Contracts · Week 8 · Checkpoint 18

A Contract in Bytes

Checkpoints sixteen and seventeen read a proxy and found the slot where it keeps the address it forwards to. This file goes one level down: a contract so small that its whole code is a hex literal in the source, assembled in memory and deployed while another contract is running.

14 steps~30 min3 nodes for your map
01 · Seventeen files written for people

Every contract you have read was source: words a compiler turns into something else before anything reaches the chain. The chain never sees `function` or `address`. It stores a string of bytes and runs them. Here is a file that writes those bytes out by hand.

Two hundred and ninety four lines, and the first sixty two hold a whole contract written as a literal. Not a contract that produces bytes. The bytes themselves, typed into a Solidity file and handed to an instruction that deploys them while another contract is running.

02 · An opening with nothing new in it

A licence, a release stamp naming the folder, a pragma with a ceiling. Then two imports, both of them files of helpers rather than contracts to call. Line 20 opens a `library`, which you read in checkpoint fourteen: no state, no constructor, nothing of its own on chain.

Line 21 declares one custom error, and it is the only one this file defines for itself. Everything else it throws comes out of the `Errors` file imported on line 7. You can read all seven of these lines at a glance, which is the point. The strange part is further down.

03 · The sentence that defines a clone

The doc comment quotes the standard it implements. A minimal bytecode implementation that delegates all calls to a known, fixed address. You have read both halves of that already: handing a call to another contract in checkpoint sixteen, and where a proxy keeps that address in checkpoint seventeen.

Now read `known, fixed` again with `minimal bytecode` sitting next to it. Something is different about where this one keeps its address, and that difference is the reason the file exists at all. Commit to an answer before you look at the code.

Checkpoint seventeen's proxy read its implementation address out of a storage slot every time a call arrived. This one calls the address `known, fixed` and describes the whole contract as minimal bytecode. Where would you expect a clone to keep the address it hands calls to?
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?
createcreate2deployed bytecode

Three new nodes on your map

create · create2 · deployed bytecode · +10 Lynx