{"id":13712040,"url":"https://github.com/pbrudny/learning-solidity-2018","last_synced_at":"2025-05-06T21:33:02.622Z","repository":{"id":75128966,"uuid":"132931768","full_name":"pbrudny/learning-solidity-2018","owner":"pbrudny","description":"Basic examples of Solidity smart contracts","archived":false,"fork":false,"pushed_at":"2024-06-19T10:25:14.000Z","size":41,"stargazers_count":96,"open_issues_count":1,"forks_count":41,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-13T22:35:27.082Z","etag":null,"topics":["blockchain","ethereum","smart-contracts","solidity"],"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/pbrudny.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":"2018-05-10T17:14:57.000Z","updated_at":"2024-06-19T10:25:18.000Z","dependencies_parsed_at":"2024-06-19T19:40:28.433Z","dependency_job_id":"82274eb7-907b-4f5a-9363-12e3cfb238bf","html_url":"https://github.com/pbrudny/learning-solidity-2018","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrudny%2Flearning-solidity-2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrudny%2Flearning-solidity-2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrudny%2Flearning-solidity-2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pbrudny%2Flearning-solidity-2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pbrudny","download_url":"https://codeload.github.com/pbrudny/learning-solidity-2018/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772273,"owners_count":21801895,"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":["blockchain","ethereum","smart-contracts","solidity"],"created_at":"2024-08-02T23:01:14.313Z","updated_at":"2025-05-06T21:33:02.347Z","avatar_url":"https://github.com/pbrudny.png","language":"Solidity","funding_links":[],"categories":["GitHub Repositories"],"sub_categories":[],"readme":"# learning solidity ~~2018~~ [We are updating this project in 2024 😎]\n\n\nThese examples are part of my guide [The best way to become Ethereum Developer in 2018](https://medium.com/@pbrudny/the-best-way-to-become-ethereum-solidity-developer-in-2018-5606e54646e6)\n\nand `30/30 challenge` on [polish ethereum programming](https://www.facebook.com/groups/531936723867447/?ref=bookmarks) FB group (members write one contract a day to improve Solidity skills).\n\nIn Ethereum world everything is changing dynamically.\nI decided to make a set of Smart Contracts for learning purposes.\n\nI know it's funny to name a repo this way but I am quite convinced that in 2019 these examples may not work with the latest Solidity.\n\nTry to write a contract yourself before checking the code in the repo!\n\n## Challenges\n\n### 01_say_hello.sol\n* set greeting on creation and allow to change it by the owner (creator of the contract)\n* return greeting to everyone who calls `sayHello` method\n* return `Hello Daddy` to the creator\n\n### 02_balance_address_checker.sol\n* return address of the contract\n* return address of the contract's owner\n* return address of the sender\n* return balance of the contract\n* return balance of the contract's owner (ONLY if you are the owner)\n* return balance of the sender\n\n### 03_basic_random.sol\n* return random number 0-99\n* the \"financial importance\" of this calculation is less than miner would get for mining single block\n* https://ethereum.stackexchange.com/questions/419/when-can-blockhash-be-safely-used-for-a-random-number-when-would-it-be-unsafe?noredirect=1\u0026lq=1\n\n### 04_lottery_10_users.sol\n* 10 users limit\n* user has to pay 0.1 ether to join the lottery\n* same user can join once\n* owner of the contract can join the lottery\n* when 10 users join then the winner is picked\n* winner receives all the money\n* new lottery starts when the winner is pickecd\n\n### 05_lottery_no_limit.sol\n* user has to pay 0.1 ether to join the lottery\n* no limit for users number   \n* same user can join multiple times\n* owner of the contract can join too\n* owner decides when to pick the winner\n* winner receives all the money\n* new lottery starts when the winner is pickecd\n\n### 06_lottery_muliple_winners\n* no limit for users\n* user joins paying 0.1 eth and picking number 1-100\n* owner decides when to generate random number (1-100) \n* users who picked generated numbers win\n* total prize is distributed to all winners\n\n### 07_fundraising\n* fundraising has the goal to reach (amount is set on creation)\n* fundraising has the time limit (time is set on creation)\n* anyone can add any amount until time is up or the goal is reached\n* when the time is up but the goal is not reached users can withdraw their funds\n* when the goal is reached owner can withdraw all the money\n\n### 08_basic_token\n* intial supply of tokens is set on creation\n* contract creator gets initial tokens\n* tokens can be transferred to any account\n* there is a protection from overflow\n* everyone can check balances\n\n### 09_ERC_20_token\n* implement ERC20 token based on [the EIP specification]( https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md)\n\n### 10_ERC20_usage\n* create your own ERC20 token using Open Zeppelin implementation\n* inherit from \"StandardToken\"\n* add custom name, symbol, decimals and initial supply\n\n### 11_ERC_721_usage\n* create your own ERC721 token using Open Zeppelin implementation\n* inherit from \"ERC721Token\"\n* add custom name and symbol\n\n## Other challenges\n* [Truffle challenges: 12-29](https://github.com/pbrudny/truffle-challanges)\n* [Web3 deploy challenge: 30](https://github.com/pbrudny/web3-deploy-example)\n\n## Contribution\n* feel to free to add new challenges in the README.\n* feel free to add your solution to any challenge (of course if it's different than the existing one)\n\n### Example: \nIf you want to add another Basic Token contract:\n1. Fork the repo\n2. Add `basic_token_b.sol` to the `07_basic_token` directory\n3. Make a PR\n4. Let me review it and merge it\n5. Enjoy having a nice contribution to the great project :)\n\n## Like it?\nIf you like it please share it with others :)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbrudny%2Flearning-solidity-2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpbrudny%2Flearning-solidity-2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpbrudny%2Flearning-solidity-2018/lists"}