{"id":27954110,"url":"https://github.com/pdoup/ethereum-vat","last_synced_at":"2026-04-29T00:31:49.273Z","repository":{"id":129337644,"uuid":"492284535","full_name":"pdoup/ethereum-vat","owner":"pdoup","description":"Create a smart contract in solidity to distribute funds","archived":false,"fork":false,"pushed_at":"2022-05-31T09:17:59.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"recipients","last_synced_at":"2025-05-07T17:21:31.975Z","etag":null,"topics":["ethereum","ethereum-contract","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/pdoup.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,"zenodo":null}},"created_at":"2022-05-14T17:38:26.000Z","updated_at":"2022-07-05T17:26:43.000Z","dependencies_parsed_at":"2023-04-16T20:47:50.316Z","dependency_job_id":null,"html_url":"https://github.com/pdoup/ethereum-vat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pdoup/ethereum-vat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdoup%2Fethereum-vat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdoup%2Fethereum-vat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdoup%2Fethereum-vat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdoup%2Fethereum-vat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdoup","download_url":"https://codeload.github.com/pdoup/ethereum-vat/tar.gz/refs/heads/recipients","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdoup%2Fethereum-vat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ethereum","ethereum-contract","solidity"],"created_at":"2025-05-07T17:20:10.158Z","updated_at":"2026-04-29T00:31:49.268Z","avatar_url":"https://github.com/pdoup.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ethereum-vat\n\n\u003cimg src=\"https://d33wubrfki0l68.cloudfront.net/fcd4ecd90386aeb50a235ddc4f0063cfbb8a7b66/4295e/static/bfc04ac72981166c740b189463e1f74c/40129/eth-diamond-black-white.jpg\" width=\"300\" height=\"250\"\u003e\n\n# Aristotle University of Thessaloniki\n## Data \u0026 Web Science MSc Program\n### ***Decentralized Technologies Course***\n#### Assignment 2, 2022 - Ethereum\n\n### For this assignment you will need to implement a smart contract in Solidity, using the Ethereum blockchain.Your government has decided to prohibit all blockchain transactions, unless they are conducted through a smart contract that will report all transactions to them. **Your task is to write this smart contract.**\n\n#### When a user wants to send some funds to another user, or any address for that matter,instead of sending them directly to the recipient, they will use the smart contract. A part of the funds that will be transferred will be withheld for VAT purposes. In order to accomplish that, you will need to code a contract that when deployed, will accept a list of (government controlled) addresses, where VAT proceeds will be transferredto. Each of the addresses will correspond to one of the different available levels of VAT (24%, 13%, 6%).\n\n#### For facilitating the transfer of funds, you will code three different variations of the same method. The users that would want to transfer funds, will then make their payments by sending funds to these methods.\n\n- [X] The first variation will facilitate transfers of small amounts between individuals. This\nshouldn't normally require a VAT transaction, such as a parent giving allowance to their\nchildren. These kinds of transactions should be limited to 0.05 ETH. The method will only\naccept a destination address. The method should redirect the total amount of the\ntransaction to the recipient's address, without making any VAT payments.\n- [X] In the second variation, the method that facilitates the payments, will accept a\ndestination address, the recipient's tax identification number, as well as an index number\ncorresponding to the appropriate VAT level (0 is the index for 24% VAT, 1 for 13% and 2 for\n6%). The method should redirect the appropriate amount of funds to the respective\ngovernment address, while transferring the rest to the destination address. The contract\nshould make appropriate checks if the user that originated the transfer has sufficient\nfunds and if the VAT index number that is provided is a valid one.\n- [X] In the third variation, the method will additionally accept a comment from the sender,\ncompared to the second variation. In addition to the checks that the previous variation\nperforms, in this case, it should also check that the provided comment is no longer than\n80 characters.\n- [X] The contract should keep track of the total amount gathered for each VAT level (in wei) and provide means for any interested party to access that information, for each VAT level separately, but also collectively.\n- [X] The contract should also keep track of who the recipient with the largest proceeds is, identified by their tax identification number and address, along with the total amount they received. This information should be available with a single call to one method in the contract. It should also be available only to the user that deployed the contract.\n- [X] When a fund transfer has been made through the contract, an event transmitting the\naddress of the recipient, the total amount transferred and the VAT level used, along with\nany provided comment (if applicable) should be emitted.\n- [X] You will also have to provide some means to destroy the contract and render it unusable.\nThis functionality should be available only to the user that deployed the contract.\n\n## TODO\n- [X] Add comments\n- [X] Remove check balance\n- [X] ~~Add check for tax ID's (ID = 0 not allowed)~~\n- [X] ~~Add struct for printing person with most proceeds~~\n\n*Notes*:\n\n● Use method overloading for providing the three different variations of the same\nmethod that facilitates the transfer of funds. \u003cbr\u003e\n● Use a modifier to restrict access to functionality. \u003cbr\u003e\n● The addresses that correspond to the different VAT levels should not be publicly\navailable. \u003cbr\u003e\n● Your submissions should include only the .sol file with the smart contract. \u003cbr\u003e\n● Comment your code detailing your design choices. \u003cbr\u003e\n● Submit only the .sol source code file inside a compressed archive (.zip, .tar.gz etc) \u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdoup%2Fethereum-vat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdoup%2Fethereum-vat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdoup%2Fethereum-vat/lists"}