{"id":15664833,"url":"https://github.com/idouble/simple-vyper-erc-20-token-template","last_synced_at":"2025-05-05T23:52:03.341Z","repository":{"id":130708799,"uuid":"151946891","full_name":"IDouble/Simple-Vyper-ERC-20-Token-Template","owner":"IDouble","description":"🐍 Very Simple ERC-20 Smart Contract Template written in Vyper to create your own Cryptocurrency on the Ethereum Blockchain, with many customizable Options 📝","archived":false,"fork":false,"pushed_at":"2024-02-29T16:23:59.000Z","size":699,"stargazers_count":26,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-26T07:15:56.391Z","etag":null,"topics":["blockchain","cryptocurrency","customizable-options","erc20","ethereum","ethereum-blockchain","smart-contracts","solidity-compatibility","vyper","vyper-contracts"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IDouble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-10-07T13:55:31.000Z","updated_at":"2025-03-03T17:58:32.000Z","dependencies_parsed_at":"2024-04-08T23:02:36.255Z","dependency_job_id":"8564fb66-4613-470a-b892-6c17cddd809a","html_url":"https://github.com/IDouble/Simple-Vyper-ERC-20-Token-Template","commit_stats":null,"previous_names":["idouble/simple-vyper-erc-20-token-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FSimple-Vyper-ERC-20-Token-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FSimple-Vyper-ERC-20-Token-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FSimple-Vyper-ERC-20-Token-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDouble%2FSimple-Vyper-ERC-20-Token-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IDouble","download_url":"https://codeload.github.com/IDouble/Simple-Vyper-ERC-20-Token-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596375,"owners_count":21773844,"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","cryptocurrency","customizable-options","erc20","ethereum","ethereum-blockchain","smart-contracts","solidity-compatibility","vyper","vyper-contracts"],"created_at":"2024-10-03T13:44:18.421Z","updated_at":"2025-05-05T23:52:03.324Z","avatar_url":"https://github.com/IDouble.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐍 Simple Vyper ERC 20 Token Template 🐍\n🐍 Very Simple ERC-20 Smart Contract Template written in Vyper to create your own Cryptocurrency on the Ethereum Blockchain, with many customizable Options 📝\n\n***I want to remind the Reader that Vyper is still heavily under development, the code could become invalid in further versions, because of security reasons. I will try to keep the code updated with the newest Vyper version.***\n\n\u003cimg src=\"Images/vyper.svg\" width=\"100%\" height=\"144\"\u003e\n\n## DISCLAIMER: ⚠️⚠️⚠️\n\n**To achieve full Solidity compatibility, we use the low-level num256 datatype in Vyper. This is NOT recommended for contracts where either full Solidity compatibility is not required, or no other compelling usage for using num256 over num exists. Notably, num256 is not overflow protected and may not support all the automatic security features of num as the language evolves. As the code of this token shows, the use of num256 over num also significantly complicates the contract code.** ⚠️\n\n**THIS TOKEN HAS NOT BEEN AUDITED AND IS NOT RECOMMENDED FOR PRODUCTION FUNDS. While the authors have made every effort to ensure the security of the supplied code, funds loss is always a possibility, and both Vyper's compiler and language remain nascent and rapidly evolving.** ⚠️\n\n## 📝 SmartContractCode.vy 🐍 \n**⚠️ VYPER IS STILL UNDER DEVELOPMENT, THIS CODE SHOULD NOT BE USED IN PRODUCTION ⚠️**\n\n```\n\n# Solidity-Compatible EIP20/ERC20 Token\n# Implements https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md\n\n# The use of the uint256 datatype as in this token is not\n# recommended, as it can pose security risks.\n\n# This token is intended as a proof of concept towards\n# language interoperability and not for production use.\n\n# Events issued by the contract\nTransfer: event({_from: indexed(address), _to: indexed(address), _value: uint256(wei)})\nApproval: event({_owner: indexed(address), _spender: indexed(address), _value: uint256(wei)})\n\nbalances: uint256(wei)[address]\nallowances: (uint256(wei)[address])[address]\nnum_issued: uint256(wei)\n\n@public\n@payable\ndef deposit():\n    _value: uint256(wei) = msg.value\n    _sender: address = msg.sender\n    self.balances[_sender] = self.balances[_sender] + _value\n    self.num_issued = self.num_issued + _value\n    # Fire deposit event as transfer from 0x0\n    log.Transfer(0x0000000000000000000000000000000000000000, _sender, _value)\n\n@public\ndef withdraw(_value : uint256(wei)) -\u003e bool:\n    _sender: address = msg.sender\n    # Make sure sufficient funds are present, op will not underflow supply\n    # implicitly through overflow protection\n    self.balances[_sender] = self.balances[_sender] - _value\n    self.num_issued = self.num_issued - _value\n    send(_sender, _value)\n    # Fire withdraw event as transfer to 0x0\n    log.Transfer(_sender, 0x0000000000000000000000000000000000000000, _value)\n    return True\n\n@public\n@constant\ndef totalSupply() -\u003e uint256(wei):\n    return self.num_issued\n\n@public\n@constant\ndef balanceOf(_owner : address) -\u003e uint256(wei):\n    return self.balances[_owner]\n\n@public\ndef transfer(_to : address, _value : uint256(wei)) -\u003e bool:\n    _sender: address = msg.sender\n    # Make sure sufficient funds are present implicitly through overflow protection\n    self.balances[_sender] = self.balances[_sender] - _value\n    self.balances[_to] = self.balances[_to] + _value\n    # Fire transfer event\n    log.Transfer(_sender, _to, _value)\n    return True\n\n@public\ndef transferFrom(_from : address, _to : address, _value : uint256(wei)) -\u003e bool:\n    _sender: address = msg.sender\n    allowance: uint256(wei) = self.allowances[_from][_sender]\n    # Make sure sufficient funds/allowance are present implicitly through overflow protection\n    self.balances[_from] = self.balances[_from] - _value\n    self.balances[_to] = self.balances[_to] + _value\n    self.allowances[_from][_sender] = allowance - _value\n    # Fire transfer event\n    log.Transfer(_from, _to, _value)\n    return True\n\n@public\ndef approve(_spender : address, _value : uint256(wei)) -\u003e bool:\n    _sender: address = msg.sender\n    self.allowances[_sender][_spender] = _value\n    # Fire approval event\n    log.Approval(_sender, _spender, _value)\n    return True\n\n@public\n@constant\ndef allowance(_owner : address, _spender : address) -\u003e uint256(wei):\n    return self.allowances[_owner][_spender]\n\n```\n![Binance Ready to give crypto a try ? buy bitcoin and other cryptocurrencies on binance](Images/binance.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidouble%2Fsimple-vyper-erc-20-token-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidouble%2Fsimple-vyper-erc-20-token-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidouble%2Fsimple-vyper-erc-20-token-template/lists"}