{"id":25304449,"url":"https://github.com/immutal0/learning-solidity-examples","last_synced_at":"2025-04-07T03:36:12.361Z","repository":{"id":277262104,"uuid":"931416664","full_name":"Immutal0/learning-solidity-examples","owner":"Immutal0","description":"Basic Examples To Learning Solidity","archived":false,"fork":false,"pushed_at":"2025-02-12T08:41:22.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T02:26:23.058Z","etag":null,"topics":["example","learning","solidity","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Immutal0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-12T08:40:56.000Z","updated_at":"2025-02-12T08:58:52.000Z","dependencies_parsed_at":"2025-02-13T02:26:27.623Z","dependency_job_id":"e49f7c80-a70f-48ef-803c-3dbf6e18aa8d","html_url":"https://github.com/Immutal0/learning-solidity-examples","commit_stats":null,"previous_names":["immutal0/learning-solidity-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Immutal0%2Flearning-solidity-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Immutal0%2Flearning-solidity-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Immutal0%2Flearning-solidity-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Immutal0%2Flearning-solidity-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Immutal0","download_url":"https://codeload.github.com/Immutal0/learning-solidity-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238618234,"owners_count":19501998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example","learning","solidity","tutorial"],"created_at":"2025-02-13T08:20:52.103Z","updated_at":"2025-04-07T03:36:12.343Z","avatar_url":"https://github.com/Immutal0.png","language":"Solidity","readme":"# Ethereum Smart Contracts for Learning\n\nThis repository contains a collection of smart contract challenges designed to help you learn the fundamentals of Ethereum smart contract development. Each challenge provides a problem statement and a specific functionality that the smart contract should implement.\n\nBefore reviewing the solutions in the repository, try to implement the contract yourself to enhance your learning experience!\n\n---\n\n## Challenges\n\n### 01 - `say_hello.sol`\n- Set a greeting on contract creation, allowing the owner (creator) to change it.\n- Implement a `sayHello` method to return the greeting to anyone who calls it.\n- Return \"Hello Daddy\" specifically to the contract's creator.\n\n### 02 - `balance_address_checker.sol`\n- Return the contract's address.\n- Return the contract owner's address.\n- Return the sender's address.\n- Return the contract's balance.\n- If the caller is the owner, return the owner's balance.\n- Return the sender's balance.\n\n### 03 - `basic_random.sol`\n- Generate a random number between 0 and 99.\n- Ensure the computational cost is lower than the reward a miner would receive for mining a block.\n\n### 04 - `lottery_10_users.sol`\n- Limit the lottery to 10 users.\n- Each user must pay 0.1 ether to enter the lottery.\n- Each user can only enter once.\n- The contract owner is allowed to participate.\n- Once 10 users have entered, the winner is selected.\n- The winner receives the entire pot.\n- A new lottery starts after the winner is selected.\n\n### 05 - `lottery_no_limit.sol`\n- No limit on the number of users.\n- Each user must pay 0.1 ether to enter.\n- Users can enter multiple times.\n- The contract owner can participate as well.\n- The owner decides when to select a winner.\n- The winner receives the entire prize pool.\n- A new lottery begins once a winner is selected.\n\n### 06 - `lottery_multiple_winners.sol`\n- No limit on the number of users.\n- Users join by paying 0.1 ether and picking a number between 1 and 100.\n- The contract owner decides when to generate the random number.\n- Users who select the winning number(s) will receive a share of the prize pool.\n- The prize is distributed proportionally among all winners.\n\n### 07 - `fundraising.sol`\n- The fundraising contract has a target amount that must be reached.\n- A time limit is set upon contract creation.\n- Anyone can contribute any amount until the goal is reached or time expires.\n- After the time limit expires:\n  - If the goal was not met, contributors can withdraw their funds.\n  - If the goal is met, the contract owner can withdraw the full amount.\n\n### 08 - `basic_token.sol`\n- An initial token supply is set upon contract creation.\n- The contract creator receives the initial token supply.\n- Tokens can be transferred to any address.\n- Protection from overflow should be implemented.\n- Users can check balances.\n\n### 09 - `ERC20_token.sol`\n- Implement an ERC-20 token based on the [EIP-20 specification](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md).\n\n### 10 - `ERC20_usage.sol`\n- Create your own ERC-20 token using the OpenZeppelin implementation.\n- Inherit from `StandardToken`.\n- Add custom functionality such as name, symbol, decimals, and initial supply.\n\n### 11 - `ERC721_usage.sol`\n- Create your own ERC-721 token using the OpenZeppelin implementation.\n- Inherit from `ERC721Token`.\n- Add custom name and symbol for your token.\n\n---\n\n## Contribution Guidelines\n\nWe encourage contributions to this repository! If you'd like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Add your solution or new challenge to the appropriate directory.\n   - For example, if you want to add another implementation for a basic token contract, add it to the `07_basic_token` directory.\n3. Submit a pull request (PR).\n4. I will review your submission and merge it.\n5. Enjoy contributing to the project!\n\n---\n\n## How to Add a New Challenge\n\nIf you'd like to propose a new challenge, follow these steps:\n\n1. Fork the repository.\n2. Add a new challenge description in the `README.md`.\n3. Add your solution as a new contract file in the appropriate directory.\n4. Submit a pull request with your changes.\n\n---\n\n## Contact to me\n- **Telegram**: [@Immutal0](https://t.me/Immutal0)\n- **Twitter**: [@Immutal0_](https://x.com/Immutal0_)\n\nIf you like my repos give me start\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmutal0%2Flearning-solidity-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmutal0%2Flearning-solidity-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmutal0%2Flearning-solidity-examples/lists"}