{"id":15065139,"url":"https://github.com/seanpm2001/learn-solidity","last_synced_at":"2026-01-30T18:32:40.031Z","repository":{"id":134858103,"uuid":"483816177","full_name":"seanpm2001/Learn-Solidity","owner":"seanpm2001","description":"A repository for showcasing my knowledge of the Solidity programming language, and continuing to learn the language.","archived":false,"fork":false,"pushed_at":"2022-07-05T01:20:52.000Z","size":556,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"Learn-Solidity","last_synced_at":"2025-06-08T05:27:13.158Z","etag":null,"topics":["article","collection","education","gpl3","gplv3","learn-solidity","learn-solidity-lang","learn-solidity-language","md","seanpm2001","seanpm2001-education","seanpm2001-life-archive","solidity","solidity-collection","solidity-lang","solidity-language","txt"],"latest_commit_sha":null,"homepage":"https://github.com/seanpm2001/Learn/","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seanpm2001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYINGL","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY/OldVersions/SECURITY_V1.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-20T21:18:17.000Z","updated_at":"2022-11-06T01:42:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"6db36495-1b49-48da-b9b7-b0333250562e","html_url":"https://github.com/seanpm2001/Learn-Solidity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"seanpm2001/Git-Template_V8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Solidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Solidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Solidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Solidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seanpm2001","download_url":"https://codeload.github.com/seanpm2001/Learn-Solidity/tar.gz/refs/heads/Learn-Solidity","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seanpm2001%2FLearn-Solidity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259132518,"owners_count":22810505,"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":["article","collection","education","gpl3","gplv3","learn-solidity","learn-solidity-lang","learn-solidity-language","md","seanpm2001","seanpm2001-education","seanpm2001-life-archive","solidity","solidity-collection","solidity-lang","solidity-language","txt"],"created_at":"2024-09-25T00:34:40.501Z","updated_at":"2026-01-30T18:32:39.988Z","avatar_url":"https://github.com/seanpm2001.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n***\n\n![/Solidity_logo.svg](/Solidity_logo.svg)\n\n### Learning Solidity\n\nI am not too experienced with Solidity at the moment, and I do not intend to go further with it. This document will go over my knowledge of the Solidity language.\n\nThis document used version 0.8.4 of the Solidity programming language.\n\n#### Comments in Solidity\n\nComments in Solidity are the same as comments in languages like C, C++, Java, C#, etc.\n\n```solidity\n// This is a single line comment\n/* This is\na multi-\nline comment */\n/* This is\n* also\n* a multi-line\n* comment */\n```\n\n#### Break keyword in Solidity\n\n```solidity\nbreak;\n```\n\nTo this day, I am still not entirely sure what the `break` keyword does, but most languages support it.\n\n_/!\\ This example has not been tested yet, and may not work_\n\n#### Hello World in Solidity\n\nA hello world program in Solidity is pretty simple. It is not similar to any language I am currently familiar with.\n\n```solidity\npragma solidity ^0.8.4;\n\ncontract HelloWorld {\n    function render () public pure returns (string memory) {\n        return 'Hello World';\n    }\n}\n```\n\n#### Contracts in Solidity\n\nThis example is taken from [Wikipedia: Solidity (revision 1094734727)](https://en.wikipedia.org/w/index.php?title=Solidity\u0026oldid=1094734727)\n\nI am only including it as an example, I don't know what it does, or how it works 100% of the way.\n\n```solidity\n// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.4;\n\ncontract Coin {\n    // The keyword \"public\" makes variables\n    // accessible from other contracts\n    address public minter;\n    mapping (address =\u003e uint) public balances;\n\n    // Events allow clients to react to specific\n    // contract changes you declare\n    event Sent(address from, address to, uint amount);\n\n    // Constructor code is only run when the contract\n    // is created\n    constructor() {\n        minter = msg.sender;\n    }\n\n    // Sends an amount of newly created coins to an address\n    // Can only be called by the contract creator\n    function mint(address receiver, uint amount) public {\n        require(msg.sender == minter);\n        balances[receiver] += amount;\n    }\n\n    // Errors allow you to provide information about\n    // why an operation failed. They are returned\n    // to the caller of the function.\n    error InsufficientBalance(uint requested, uint available);\n\n    // Sends an amount of existing coins\n    // from any caller to an address\n    function send(address receiver, uint amount) public {\n        if (amount \u003e balances[msg.sender])\n            revert InsufficientBalance({\n                requested: amount,\n                available: balances[msg.sender]\n            });\n\n        balances[msg.sender] -= amount;\n        balances[receiver] += amount;\n        emit Sent(msg.sender, receiver, amount);\n    }\n}\n```\n\n_/!\\ This example has not been tested yet, and may not work_\n\n#### Source\n\nThe majority of my Soliity knowledge comes from Wikipedia, and [this repository](https://github.com/leachim6/hello-world)\n\n#### Other knowledge of Solidity\n\n1. Solidity is a curly bracket language and semicolon language\n\n2. Solidity is a contract-based language, designed for blockchain contracts. This is the reason why I don't plan to use the language anymore: it is platform-dependant, and bad for the environment.\n\n3. Solidity uses the `.sol` file extension (side comment: GitHub is recognizing most of the source code so far as `Gerber Image` source code)\n\n4. Solidity is a language recognized by GitHub\n\n5. Solidity is owned by Etherium\n\n6. Solidity is a \"web3\" language\n\n7. No other knowledge of Solidity at the moment.\n\n***\n\n### File info\n\n\u003cdetails open\u003e\u003csummary\u003e\u003cp lang=\"en\"\u003e\u003cb\u003e\u003cu\u003eClick/tap here to expand/collapse this section\u003c/u\u003e\u003c/b\u003e\u003c/p\u003e\u003c/summary\u003e\n\n**File type:** `Markdown (*.md *.mkd *.mdown *.markdown)`\n\n**File version:** `1 (2022, Monday, July 4th at 6:12 pm PST)`\n\n**Line count (including blank lines and compiler line):** `182`\n\n**Current article language:** `English (EN_USA)` / `Markdown (CommonMark)` / `Solidity 0.8.9` / `HTML5 (HyperText Markup Language 5.3)`\n\n**Encoding:** `UTF-8`\n\n**All times are UTC-7 (PDT/Pacific Time)** `(Please also account for DST (Daylight Savings Time) for older/newer entries up until it is abolished/no longer followed)`\n\n_Note that on 2022, Sunday, March 13th at 2:00 am PST, the time jumped ahead 1 hour to 3:00 am._\n\n**You may need special rendering support for the `\u003cdetails\u003e` HTML tag being used in this document**\n\n\u003c/details\u003e\n\n***\n\n## File history\n\n\u003cdetails\u003e\u003csummary\u003e\u003cp lang=\"en\"\u003e\u003cb\u003eClick/tap here to expand/collapse the file history section for this project\u003c/b\u003e\u003c/p\u003e\u003c/summary\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cp lang=\"en\"\u003e\u003cb\u003eVersion 1 (2022, Monday, July 4th at 6:12 pm PST)\u003c/b\u003e\u003c/p\u003e\u003c/summary\u003e\n\n**This version was made by:** [`@seanpm2001`](https://github.com/seanpm2001/)\n\n\u003e Changes:\n\n- [x] Started the file\n- [x] Added the title section\n- [X] Added the `Learning solidity` section\n- - [x] Added the `Comments in Solidity` section\n- - [x] Added the `Break keyword in Solidity` section\n- - [x] Added the `Hello World in Solidity` section\n- - [x] Added the `Contracts in Solidity` section\n- [x] Added the `Source` section\n- [x] Added the `Other knowledge of Solidity` section\n- [x] Added the `file info` section\n- [x] Added the `file history` section\n- [ ] No other changes in version 1\n\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n***\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanpm2001%2Flearn-solidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanpm2001%2Flearn-solidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanpm2001%2Flearn-solidity/lists"}