13. BG Labs: Solidity Tinkering
Overview
Section titled “Overview”This session closes the module with the fastest way to actually learn a language: change something small and watch what happens. Rather than introduce new theory, it is about building intuition by tinkering — adjusting a contract, redeploying, and observing how behavior shifts. Do it alongside the video with your own editor open, not just as a viewer.
Key concepts
Section titled “Key concepts”- The tight feedback loop — edit, compile, deploy to a local network, call, observe. Keeping this loop fast (seconds, not minutes) is the single biggest lever on how quickly you learn Solidity.
- Compiler feedback is your teacher — Solidity’s compiler is strict. Reading its errors and warnings carefully teaches you the type system and visibility rules faster than any reference doc.
- Small changes, clear cause and effect — change one thing at a time (a type, a
visibility keyword, a
requirecondition) so you can attribute each behavior change to a specific edit. - Connect syntax to the earlier lessons — as you tinker, tie what you see back to the concepts from 09 (state, mappings, events, modifiers) and the standards from 10. This is where those turn from vocabulary into working knowledge.
- Bridge to testing — every experiment you run by hand is a candidate for a written test. Turning “let me check this manually” into an automated assertion is the habit Lab 2 wants you to build.
Common pitfalls
Section titled “Common pitfalls”- Watching passively. Tinkering only works if you are the one changing the code.
- Changing several things at once, so a broken (or fixed) result can’t be traced to a cause.
- Ignoring compiler warnings because “it still deployed.” Warnings frequently flag exactly the bug you’ll hit later.
Check yourself
Section titled “Check yourself”- What’s the advantage of changing one variable at a time when experimenting?
- How can each manual experiment become a permanent test?
- Which concepts from lessons 09–10 did your tinkering make concrete?
Go deeper
Section titled “Go deeper”Once the basics click, the interesting part of “tinkering” is making contracts interact — with ETH, with other contracts, and with signed messages. Solidity by Example (maintained by Cyfrin) has a minimal contract for each pattern:
Sending ETH and interacting with contracts
- Payable and fallback / receive — how a contract accepts ETH.
- Sending Ether: transfer, send, call — why
callis now the recommended way, and the reentrancy risk it carries. - Calling other contracts and interfaces — the typed way to call another deployed contract.
- Low-level call and delegatecall — raw calls, and how
delegatecallruns another contract’s code in your storage. - Library — reusable, often stateless helper code.
Cryptography
- Hashing with keccak256 — the hash function from Module 1, used from Solidity.
- Verifying a signature — checking an off-chain signed message on-chain with
ecrecover, the basis of meta-transactions and allowlists.
Small, complete apps worth reading
- Ether Wallet — the smallest useful contract: deposit, owner-only withdraw.
- Multi-sig wallet — require N-of-M approvals before a transaction executes.
Source: Solidity by Example, maintained by Cyfrin. Code belongs to its authors.
Watch the Video
Section titled “Watch the Video”Video credit: Austin Griffith · Duration: 45 minutes
