The negative test is the only reason I would have known.
Both times I put the code back, ran the suite, and got green. The
suite told the truth both times.
What I Would Build Next
The counter account in this program lives at a random keypair's
address. That means the client has to remember which keypair holds
which user's counter — messy in practice. The natural next step is
Program Derived Addresses (PDAs): deterministic addresses derived
from the user's wallet and a seed string, so any client can find any
user's counter without storing a keypair.
After that: a decrement instruction, a reset instruction, and
then connecting the program to a TypeScript client so it can run
on devnet with a real wallet.
Resources
This post is part of *#100DaysOfSolana*. Building on Solana every
day — follow along or jump in any time.