Roadmap › 6. Web3 & Blockchain › Step 56
Sol

Solidity & Smart Contract Development

Solidity syntax, data types and data locations, functions, visibility and modifiers, events, errors, inheritance and interfaces, ERC-20/721 with OpenZeppelin, payable and Ether transfers, upgradeable contracts, gas optimisation, testing with Hardhat/Foundry, deployment and security vulnerabilities.
Quick revision for interview day. Print it or save it as a PDF.

Skeleton

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract C is Parent {
    uint256 public x; address public immutable owner; uint256 constant MAX = 100;
    mapping(address => uint256) public bal;
    event Did(address indexed who, uint256 v);
    error Nope(uint256 code);
    modifier onlyOwner() { if (msg.sender != owner) revert Nope(1); _; }
    constructor() { owner = msg.sender; }
    function f(uint256 a) external payable onlyOwner returns (uint256) { emit Did(msg.sender, a); return a; }
    receive() external payable {}
}

Visibility & mutability

public · external · internal · private (still readable on-chain) · view · pure · payable.

Data locations

storage (persistent, costly) · memory (temporary) · calldata (read-only inputs, cheapest) · stack · transient (per-tx, 0.8.28).

Errors

require · revert CustomError() · assert (Panic) · try/catch for external calls · all state rolled back.

Security checklist

CEI + nonReentrant · msg.sender not tx.origin · access control on every admin function · SafeERC20 · no spot-price oracles · no unbounded loops · pull payments · nonces + chainid in signatures · Chainlink VRF for randomness · initializers + _disableInitializers for proxies · multisig + timelock · audits + fuzzing.

Gas tips

Fewer SSTOREs · cache reads · pack slots · constant/immutable · calldata · custom errors · unchecked loops · events over storage · optimizer.

Tooling

Remix · Foundry (forge/cast/anvil) · Hardhat · OpenZeppelin · Slither · Echidna · Tenderly · Etherscan verify · Sepolia.

Versions

0.5 explicit locations · 0.6 virtual/override, receive/fallback · 0.8 checked math · 0.8.4 custom errors · 0.8.28 transient storage · OpenZeppelin 5.x.