Modernize codebase: Update Solidity to 0.8.20, Web3.js to v4, and add…#80
Open
SukanyaByteSavy wants to merge 1 commit intoinoutcode:masterfrom
Open
Modernize codebase: Update Solidity to 0.8.20, Web3.js to v4, and add…#80SukanyaByteSavy wants to merge 1 commit intoinoutcode:masterfrom
SukanyaByteSavy wants to merge 1 commit intoinoutcode:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Codebase Modernization: Ethereum Book (2018 → 2024)
This significant repository update transforms code examples from ≈2018 standards (Solidity 0.4.x, Web3.js 1.0) to modern 2024 production standards.
✨ KEY CHANGES
Language Compliance: Updated all .sol files (Faucets, Tokens, Auction DApp) to the modern v0.8.20 compiler.
Security & Architecture: Refactored constructors, added explicit visibility modifiers, and implemented standard security practices (e.g., payable(addr).transfer).
Deprecation Handling: Replaced outdated patterns (like selfdestruct and anonymous fallback functions) with modern equivalents (receive()).
Web3.js v4: Auction DApp frontend updated to use the latest Web3.js v4, utilizing async/await and robust EIP-1193 provider handling (MetaMask).
Testing Network Transition: Updated standalone scripts to target the active Sepolia Testnet instead of the deprecated Kovan network.
RPC Endpoints: JSON-RPC examples now use current, public Sepolia RPC endpoints.
Book Text Synchronization: Embedded code blocks within AsciiDoc chapters (8, 9, 10, 12, 14) are now perfectly synchronized with the new, modernized Solidity files.
CI/CD Pipeline: Added a GitHub Actions workflow (.github/workflows/ci.yml) to automatically compile contracts and verify build integrity upon every change.
Config Fix: Renamed truffle.js to truffle-config.js to resolve command conflicts on Windows machines.