Skip to content

wesleymassine/solidity-reference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Solidity Complete Reference

From Zero to Professional Developer

Solidity License Status

The most comprehensive Solidity learning resource - 17 complete files covering 100% of professional development skills


๐Ÿ“– About This Repository

This repository contains a complete, professional-grade Solidity reference covering everything from basic syntax to advanced optimization techniques. Each file is extensively commented in English with real-world examples, security warnings, and professional best practices.

Perfect for:

  • ๐ŸŽ“ Complete beginners starting their blockchain journey
  • ๐Ÿ’ป Intermediate developers wanting to fill knowledge gaps
  • ๐Ÿ† Professional developers seeking advanced optimization techniques
  • ๐Ÿ‘จโ€๐Ÿซ Educators looking for comprehensive teaching materials

๐Ÿ“š Complete File List

# File Topics Covered Level
1 DataTypes.sol All Solidity data types with examples Beginner
2 Functions.sol Complete function reference Beginner
3 Inheritance.sol Inheritance, abstracts, interfaces Intermediate
4 Libraries.sol Library patterns and usage Intermediate
5 ControlFlow.sol Loops, conditionals, error handling Beginner
6 Globals.sol Global variables, units, time Beginner
7 Operators.sol All operators and expressions Beginner
8 EtherTransfer.sol transfer/send/call methods Intermediate
9 DataLocation.sol storage/memory/calldata Intermediate
10 Cryptography.sol Hashing, signatures, verification Advanced
11 Assembly.sol Inline assembly (Yul) Advanced
12 Patterns.sol Design patterns Advanced
13 Security.sol Security & vulnerabilities Advanced
14 GasOptimization.sol Gas optimization techniques Advanced
15 Standards.sol ERC20, ERC721, ERC1155, ERC2981 Advanced
16 Imports.sol Project organization Intermediate
17 BestPractices.sol โญ Bad vs Good code patterns (Senior) Professional

๐Ÿ“‹ See README_ROADMAP.md for detailed learning path

โšก See QUICK_REFERENCE.md for commands, patterns & quick lookup

๐Ÿ—๏ธ See PROJECTS.md for hands-on practical projects

๐Ÿ‡ง๐Ÿ‡ท See BRASIL.md for Brazilian developers guide (Portuguese)


๐ŸŽฏ Quick Start

1. Clone the Repository

git clone https://github.com/wesleymassine/solidity-reference.git
cd solidity-reference

2. Choose Your Learning Path

Beginner Path (4 weeks):

DataTypes.sol โ†’ Operators.sol โ†’ ControlFlow.sol โ†’ Functions.sol โ†’ Globals.sol

Intermediate Path (4 weeks):

DataLocation.sol โ†’ Inheritance.sol โ†’ Libraries.sol โ†’ EtherTransfer.sol โ†’ Cryptography.sol

Advanced Path (4 weeks):

Assembly.sol โ†’ Patterns.sol โ†’ Security.sol โ†’ GasOptimization.sol โ†’ Standards.sol โ†’ BestPractices.sol

3. Study & Practice

  • Open files in VS Code, Remix, or your favorite editor
  • Read comments thoroughly
  • Run examples in Remix IDE
  • Modify code and experiment
  • Build small projects using each concept

๐Ÿ‡ง๐Ÿ‡ท Brazilian Community

This project now includes complete resources for Brazilian developers:

  • ๐Ÿ’ผ Job boards for Web3 positions in Brazil
  • ๐Ÿค Portuguese-speaking communities
  • ๐Ÿ’ฐ Bounty & freelancing opportunities
  • ๐ŸŽ“ Learning resources in Portuguese
  • ๐Ÿ† Brazilian hackathons calendar

See BRASIL.md for complete guide in Portuguese


๐ŸŒŸ What Makes This Special

โœจ Comprehensive Coverage

  • 17 complete reference files covering all Solidity concepts
  • Over 10,000 lines of extensively commented code
  • 150+ practical examples demonstrating best practices
  • NEW: Bad vs Good code comparisons for professional development

๐Ÿ”’ Security-First Approach

  • Vulnerable vs secure code comparisons
  • Real-world attack vectors explained
  • Prevention techniques for all common vulnerabilities

โšก Gas Optimization Focus

  • Professional optimization techniques
  • Before/after comparisons
  • Gas cost analysis

๐Ÿ“ Professional Quality

  • Production-ready code patterns
  • Industry standard practices
  • Real-world use cases

๐Ÿ› ๏ธ Development Tools

Tool Purpose Link
Remix IDE Quick testing & learning remix.ethereum.org
Hardhat Professional development hardhat.org
Foundry Fast Solidity testing getfoundry.sh
VS Code Code editing code.visualstudio.com
Metamask Wallet for testing metamask.io

๐Ÿ” Security & Audit Tools

Tool Purpose Link
Slither Static analysis & vulnerability detection github.com/crytic/slither
Mythril Security analysis tool github.com/ConsenSys/mythril
Echidna Fuzzing & property testing github.com/crytic/echidna
Manticore Symbolic execution tool github.com/trailofbits/manticore
Tenderly Real-time monitoring & debugging tenderly.co
OpenZeppelin Defender Security operations platform openzeppelin.com/defender

โšก Gas Optimization Tools

Tool Purpose Link
hardhat-gas-reporter Track gas usage in tests npm: hardhat-gas-reporter
Foundry Gas Snapshots Compare gas usage across versions Built into Foundry
eth-gas-reporter Mocha reporter for gas costs npm: eth-gas-reporter

๐Ÿ“– Learning Resources

๐Ÿ“š Official Documentation

๐ŸŽฎ Interactive Learning & Challenges

๐ŸŽฅ Video Courses (Professional Level)

๐Ÿ“ฐ Newsletters & Blogs

๐Ÿ” Security Resources

๐Ÿ’ผ Professional Development

๐Ÿข Audit Firms & Research

๐Ÿ‘ฅ Communities

๐ŸŽฏ Next Steps After This Repository

  1. Build Real Projects: Token, NFT marketplace, DAO, DeFi protocol
  2. Participate in Audits: Code4rena, Sherlock, Immunefi
  3. Read Audit Reports: Study how professionals find vulnerabilities
  4. Contribute to Open Source: OpenZeppelin, Aave, Uniswap
  5. Stay Updated: Follow Ethereum Improvement Proposals (EIPs)
  6. Network: Join Discord/Telegram groups, attend ETHGlobal hackathons

๐ŸŽ“ Topics Covered

Data Types & Basics
  • Boolean, integers, addresses
  • Fixed-size arrays, dynamic arrays
  • Strings, bytes
  • Mappings, structs, enums
  • Constants, immutables
Functions & Control Flow
  • Function visibility (public, private, external, internal)
  • State mutability (pure, view, payable)
  • Modifiers, events, errors
  • Loops, conditionals
  • Error handling (require, assert, revert, try-catch)
Advanced Concepts
  • Inheritance patterns
  • Abstract contracts & interfaces
  • Libraries & using for
  • Storage, memory, calldata
  • Inline assembly (Yul)
Security & Best Practices
  • Reentrancy protection
  • Access control patterns
  • Front-running prevention
  • Signature verification
  • Common vulnerabilities
Gas Optimization
  • Storage packing
  • Calldata optimization
  • Loop techniques
  • Batch operations
  • Assembly optimization
Standards & Patterns
  • ERC20, ERC721, ERC1155
  • Factory pattern
  • Proxy/Upgradeable contracts
  • Design patterns
  • Project organization

๐Ÿ’ก Professional Checklist

After completing this reference, you will be able to:

  • โœ… Write secure, production-ready smart contracts
  • โœ… Implement all major token standards (ERC20, ERC721, ERC1155)
  • โœ… Optimize contracts for minimal gas costs
  • โœ… Prevent common security vulnerabilities
  • โœ… Use advanced patterns (proxy, factory, etc.)
  • โœ… Write comprehensive tests
  • โœ… Deploy to mainnet confidently
  • โœ… Perform code reviews
  • โœ… Read and understand complex protocols

๐Ÿค Contributing

Contributions are welcome! If you find any issues or have suggestions:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -m 'Add some improvement')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • OpenZeppelin for security patterns
  • Solidity documentation team
  • Ethereum developer community
  • All contributors to this repository

๐Ÿ“Š Stats

  • 17 Complete Files (NEW: BestPractices.sol added!)
  • 10,000+ Lines of Code
  • 150+ Examples
  • 15+ Design Patterns
  • 20+ Security Topics
  • 50+ Gas Optimization Techniques
  • 15+ Bad vs Good Pattern Comparisons
  • 15+ Practical Projects (Beginner to Professional)
  • Brazilian Community Resources ๐Ÿ‡ง๐Ÿ‡ท

๐ŸŒ Connect


โญ If this repository helps you, please give it a star! โญ

Made with โค๏ธ for the Ethereum developer community ๐Ÿ‡ง๐Ÿ‡ท


โ€œThis repo is a learning/reference resource (not audited production contracts).

About

Complete Solidity reference with 17 educational files covering beginner to professional level. Includes security patterns, gas optimization, design patterns, and Brazilian community resources. MIT licensed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors