Learning Solidity smart contract development through practical examples and implementations.
Sol-Learning is a repository containing Solidity smart contract examples and learning materials. It includes various contract implementations from basic to advanced concepts, perfect for blockchain developers learning Ethereum smart contract development.
What makes it unique:
- Practical, runnable examples
- Well-commented code
- Progressive difficulty levels
- Gas-optimized implementations
- Smart Contract Examples – Various Solidity contract implementations
- Factorial Calculator – Mathematical operations on-chain
- Gas Optimization – Efficient contract patterns
- Security Practices – Safe coding examples
- Educational Comments – Detailed code explanations
Blockchain
- Solidity ^0.8.0
- Ethereum
Development Tools
- Remix IDE
- Hardhat
- Truffle
Solidity Code → Compilation → Deployment → Testing → Ethereum Network
# Clone the repository
git clone https://github.com/DevRanbir/Sol-Learning. git
# Navigate to project
cd Sol-Learning
# Install dependencies (if using Hardhat)
npm install
# Compile contracts
npx hardhat compileCreate a .env file and add:
PRIVATE_KEY=your_wallet_private_key
INFURA_API_KEY=your_infura_api_key- Step 1: Open contract in Remix IDE
- Step 2: Compile with Solidity ^0.8.0
- Step 3: Deploy to test network
- Step 4: Test functions with different inputs
Sol-Learning/
├── contracts/
│ ├── fac. sol
│ └── other_contracts/
├── tests/
└── README.md
- Add more complex DeFi examples
- Implement ERC-20 token standards
- Add NFT contract examples
- Include gas optimization guides
- Add comprehensive test suite
- Name: DevRanbir
- GitHub: https://github.com/DevRanbir
This project is licensed under the MIT License.