This repository contains sample code originally from the book “Mastering Ethereum”,
rewritten and updated to the latest Solidity version (^0.8.x) for educational purposes.
The goal is to learn Ethereum smart contract design, structure, and security concepts through hands-on code examples.
- Basic Solidity examples
- NFT-related code (ERC721 / ERC1155)
- Examples of vulnerabilities (Reentrancy, Phishing, DoS, etc.)
- Updated syntax for modern Solidity (constructor, block.timestamp, call, etc.)
- This repository is for learning purposes only.
- Some code intentionally contains vulnerabilities to demonstrate common pitfalls.
- Examples: reentrancy attack,
tx.originmisuse, arithmetic overflow/underflow, etc.
- Examples: reentrancy attack,
- Do not use this code in production.
- I take no responsibility for any damages resulting from the use of this code.
git clone https://github.com/your-username/mastering-ethereum-learning.git
cd mastering-ethereum-learning
npm install