Your First 90 DaysAcademy
The Grammar · Contracts Talking to Contracts · Week 9 · Checkpoint 20

at Once Everything

Two hundred and six lines of production OpenZeppelin, and not one word in them you have not already read. The act closes on a file assembled entirely out of parts you own: a record under a hashed key, a modifier taking an argument, a custom error, an interface announced with an OR.

16 steps~30 min3 nodes for your map
01 · Two hundred and six lines, nothing new

Two hundred and six lines, and this is the last file of the act. Read the whole of it and you will not meet one word you have not already read somewhere behind you. That is not a coincidence, and it is the reason this particular file is here at the end.

So read it for recognition rather than for vocabulary. What it keeps is a table of which addresses may call which functions, and every part of that table arrived in a checkpoint you have finished. Several steps below will name the one each piece came from.

02 · Three names after is

Line 49 opens the contract and three names follow `is`. Context came past in checkpoint twelve, the file holding one function that answers who is calling. ERC165 you read whole in checkpoint thirteen, and IAccessControl is the same shape as the interface you read beside it that day.

`abstract` on line 49 means what it meant then: this file never deploys by itself. Lines 6 to 8 say where each parent lives, and the third of them is where this file's events and errors are declared, so names will appear below that were never written here.

03 · A record under a hashed key

Lines 50 to 53 declare a struct and line 55 puts it behind a mapping. That is checkpoint ten arriving again: a `bytes32` key, and a record rather than a number underneath it. This record has two fields, and the first of them is a mapping of its own.

Line 51 takes an address and answers with a `bool`, so a role is a set of yes and no. Line 52 holds another `bytes32`. Line 57 is `constant`, checkpoint three, and the value it fixes is thirty two bytes of zero. Decide what that zero is actually doing.

Line 55 keys records by `bytes32`, and line 57 fixes `DEFAULT_ADMIN_ROLE` at thirty two zeros. What does that particular value buy the file?
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?
role tablesadmin rolesreading whole

Three new nodes on your map

role tables · admin roles · reading whole · +10 Lynx