๐Ÿงช Solidity Intensive

A complete language reference โ€” 18 contract modules covering every core Solidity concept from primitives to DeFi interactions.

Solidity ^0.8 Hardhat Tested 18 Modules DAPPU Bootcamp

๐Ÿ“– About This Reference

Each contract in this repo isolates a single Solidity concept with clean, commented code and corresponding Hardhat tests. Built during an intensive blockchain developer bootcamp โ€” think of it as a Solidity cookbook where every chapter is a standalone, copy-ready recipe.

๐Ÿ“‚ Contract Modules

Primitives

Types.sol

uint, int, bool, address, bytes โ€” the full value type system with examples.

Scope

Variables.sol

State, local, and global variables. Visibility modifiers: public, private, internal, external.

Logic

Functions.sol

Pure, view, payable. Return values, function modifiers, and overloading.

Control Flow

Conditionals.sol

if/else, ternary, require, revert, and custom error patterns.

Iteration

Loops.sol

for, while, do-while โ€” with gas cost considerations for unbounded loops.

Math

Operators.sol

Arithmetic, logical, bitwise, comparison, and assignment operators.

Data

Arrays.sol

Fixed and dynamic arrays, push/pop/delete, memory vs. storage location.

Data

Mappings.sol

Key-value stores, nested mappings, and enumeration limitations.

Data

Structs.sol

Custom data types, struct arrays, and efficient storage packing.

Patterns

Enums.sol

Enumerated types for state machines โ€” the clean way to track lifecycle states.

Lifecycle

Constructors.sol

Initialization, constructor arguments, ownership, and one-time setup patterns.

Events

Events.sol

Emitting events, indexed parameters, and frontend subscription patterns.

Safety

Errors.sol

Custom errors, require vs. revert, and the gas savings of custom error types.

OOP

Inheritance.sol

is keyword, virtual/override, multiple inheritance, and super.

Finance

Ether.sol

msg.value, payable, transfer/send/call โ€” and the receive/fallback function pair.

Time

Time.sol

block.timestamp, time-based access control, and expiry patterns.

DeFi

Token.sol

A manual ERC-20 implementation from scratch โ€” no OpenZeppelin, pure Solidity.

DeFi

Interactions.sol

Calling external contracts, interfaces, and low-level call patterns.

๐Ÿ›  Tech Stack

Solidity ^0.8 Hardhat ethers.js Node.js Mocha / Chai

๐Ÿš€ Get Started

View on GitHub Browse Contracts View Tests