I’m documenting my journey from Web Developer to Web3 Builder.
Currently learning:
- Solidity (smart contracts)
- Rust (for high-performance chains)
- Smart contract security
If you're into Web3, building, or earning on-chain — follow along 🚀
Are you forgetting solidity? Here is a modern cheatsheet that your brain won't forget.
→ constructor - Special Function
- Runs exactly once when the contract is deployed. Sets up the initial state and then disappears forever.
- - The one-night stand of Solidity. Shows up, does the job, never seen again.
→ payable - Function Modifier
- Allows a function (or address) to receive Ether. Without it, sending ETH throws an error.
- The function that actually has a Venmo. Everyone else is broke and refuses donations.
→ view - Function Modifier
- Promises to only READ the blockchain state, no writes, no side effects, no gas (when called externally).
- The creep at the party who just watches and swears they didn't touch anything.
→ pure - Function Modifier
- Doesn't read OR write to the blockchain. Only works with its input parameters. A total hermit.
- Doesn't touch state, doesn't read state. Basically, a monk living off the grid. Truly unbothered.
→ require - Error Handling
- Validates a condition. If it fails, reverts the entire transaction and refunds remaining gas.
- The bouncer at the club. "You're not on the list? The whole night is cancelled. Everyone go home."
→ revert - Error Handling
- Explicitly undoes all state changes and throws an error. More flexible than require.
- require's dramatic cousin who flips the table and storms out mid-conversation. Same result, more chaos.
→ modifier - Access Control
- A reusable chunk of code that wraps around functions. Used for access control and validation.
- The helicopter parent of functions. "Before you do ANYTHING, let me check a few things first...
→ event / emit - Logging
- Logs data to the blockchain for off-chain listeners. Cheap storage that smart contracts can't read.
- Sends a tweet that the contract itself can never read. Maximum announcements, zero self-awareness.
→ fallback - Special Function
- Called when no other function matches the call data. The contract's last resort.
- The function that picks up when nobody else does. The "sure, I'll cover your shift" of smart contracts.
→ receive - Special Function
- Called when ETH is sent with empty calldata. Exclusive ETH receiver, no logic allowed inside.
- Only shows up when there's money involved. Won't even say hello, just grabs the ETH and goes silent.
→ mapping - Data Structure
- A key-value store. Like a dictionary/hashmap, but you can never iterate it or check its length.
- A dictionary that forgot how many words it has and refuses to let you flip through pages. "Just ask me directly."
→ block.timestamp - Global Variable
- Returns the current block's timestamp in seconds. Can be slightly manipulated by miners/validators.
- The watch that validators can nudge by a few seconds. "What time is it?" Approximately now-ish.
→ msg.sender - Global Variable
- The address of whoever called the current function. Changes with every call context.
- The "who did this?" pointer. Always watching. Always knowing. There is no hiding from msg.sender.
→ immutable - Variable Type
- Set once in the constructor, then locked forever. Cheaper than storage, better than a constant.
- Got one chance to make a decision in the constructor. Now it's that decision forever. No take-backs. Ever.
→ constant - Variable Type
- Set at compile time. Never changes. Stored in bytecode, not on-chain storage.
- Decided before the contract even existed. Didn't even get a constructor speech. Just born stubborn.