This README provides a comprehensive collection of Solidity programming problems, sample decentralized applications (DApps), and examples of vulnerable code. Each section includes solutions to help you understand and solve these issues effectively. The questions and examples are sourced from platforms like Alchemy University
, Calyptus
, Code Wars
, DappWorld
, Ethernaut
, and Ethereum Stack Exchange
.
Problem ID | Description | Solution |
---|---|---|
PP-01 | DataTypes of Solidity. |
Solution |
PP-02 | Constructors of Solidity. |
Solution |
PP-03 | Variables of Solidity. |
Solution |
PP-04 | Functions of Solidity. |
Solution |
PP-05 | Visibility of Solidity. |
Solution |
PP-06 | Pure View Functions of Solidity. |
Solution |
PP-07 | Function Modifiers of Solidity. |
Solution |
PP-08 | Arrays of Solidity. |
Solution |
PP-09 | Events of Solidity. |
Solution |
PP-10 | Error Handling of Solidity. |
Solution |
PP-11 | Value Types of Solidity. |
Solution |
PP-12 | Fallback Functions of Solidity. |
Solution |
PP-13 | For Loop of Solidity. |
Solution |
PP-14 | Mapping of Solidity. |
Solution |
PP-15 | Enum of Solidity. |
Solution |
PP-16 | Struct of Solidity. |
Solution |
PP-17 | Payable Modifier of Solidity. |
Solution |
PP-18 | Imports of Solidity. |
Solution |
PP-19 | Contract CleanUp of Solidity. |
Solution |
PP-20 | Memory & Storage of Solidity. |
Solution |
PP-21 | Inheritance of Solidity. |
Solution |
PP-22 | If Statement of Solidity. |
Solution |
PP-23 | Libraries of Solidity. |
Solution |
PP-24 | Interface of Solidity. |
Solution |
DApp ID | Description | Solution |
---|---|---|
SD-01 | Address book Solidity smart contract. | Solution |
SD-02 | An ERC721 Calyptus NFT contract. | Solution |
SD-03 | A dynamic pricing model for a decentralized storage contract. | Solution |
SD-04 | A transfer ownership of an in-game asset contract. | Solution |
SD-05 | A ERC721 safemint Token contract. | Solution |
SD-06 | A trustless escrow system contract contract. | Solution |
SD-07 | An ERC1155 Event ticket contract. | Solution |
SD-08 | A hotel room contract. | Solution |
SD-09 | A lottery, where users can buy tickets contract. | Solution |
SD-10 | A simple contract. | Solution |
SD-11 | An ERC20 token smart contract. | Solution |
SD-12 | A NFT ERC721 with alchemy contract. | Solution |
SD-13 | An users make payments to the owner smart contract. | Solution |
SD-14 | An users can rent storage space in exchange for tokens contract. | Solution |
SD-15 | A Shared Wallet contract. | Solution |
SD-16 | A function to implement a staking system, where users can earn rewards contract. | Solution |
SD-17 | OTT Subscription based on tiers and basic to annual pack contract. | Solution |
SD-18 | A time lock contract. | Solution |
SD-19 | A function to implement a voting system contract. | Solution |
SD-20 | A withdraw funds contract. | Solution |
SD-21 | A Delegate call to upgrade a solidity smart contract. | Solution |
Vulnerability ID | Description | Solution |
---|---|---|
VC-01 | Re-entrancy vulnerability. |
Solution |
VC-02 | tx.origin phishing vulnerability. |
Solution |
VC-03 | Arithmetic overflow/underflow vulnerability. |
Solution |
VC-04 | FrontRunning vulnerability. |
Solution |
VC-05 | DoS vulnerability. |
Solution |
VC-06 | Oracle Manipulation vulnerability. |
Solution |
VC-07 | TimeStamp Manipulation vulnerability. |
Solution |
- This repository contains Solidity solutions for various Codewars challenges focused on fundamentals, arrays, algorithms, and beginner-friendly smart contract implementations - README
Problem ID | Description | Solution |
---|---|---|
FND-01 | Is n Divisible by x and y? | Solution |
FND-02 | Grasshopper - Summation | Solution |
FND-03 | String Repeat | Solution |
FND-04 | Century From Year | Solution |
FND-05 | Multiply | Solution |
FND-06 | Sum of Odd Numbers | Solution |
FND-07 | Count by X | Solution |
FND-08 | Roman Numerals Encoder | Solution |
FND-09 | Expressions Matter | Solution |
FND-10 | Sum of Angles | Solution |
FND-11 | Maximum Multiple | Solution |
FND-12 | Grasshopper - Check for Factor | Solution |
FND-13 | Beginner Series #2 Clock | Solution |
FND-14 | Third Angle of a Triangle | Solution |
SC-01 | HelloWorld Smart Contract | Solution |
SC-02 | Rock, Paper, Scissors Smart Contract | Solution |
SC-03 | Grasshopper - Terminal Game Move Function | Solution |
SC-04 | Tic-Tac-Toe Checker | Solution |