{"id":20270633,"url":"https://github.com/ac12644/crypto-charity","last_synced_at":"2025-08-01T23:44:20.776Z","repository":{"id":45447943,"uuid":"510720039","full_name":"ac12644/Crypto-Charity","owner":"ac12644","description":"🎓 Learn How to Build Your Own Fundraising Dapp for Non-Profits with Step-by-Step Tutorial on Creating Crypto Charity 📚","archived":false,"fork":false,"pushed_at":"2024-05-20T21:09:19.000Z","size":12453,"stargazers_count":27,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-27T04:58:19.688Z","etag":null,"topics":["charity","cryptocompare","dapp","fundraising","matic","polygon-network"],"latest_commit_sha":null,"homepage":"https://fundraising-dapp.vercel.app/","language":"JavaScript","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/ac12644.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-07-05T12:08:52.000Z","updated_at":"2025-02-07T03:28:49.000Z","dependencies_parsed_at":"2024-05-20T22:28:18.535Z","dependency_job_id":"88301eba-1010-4fac-93c4-bc7f4105d443","html_url":"https://github.com/ac12644/Crypto-Charity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ac12644/Crypto-Charity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FCrypto-Charity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FCrypto-Charity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FCrypto-Charity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FCrypto-Charity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ac12644","download_url":"https://codeload.github.com/ac12644/Crypto-Charity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac12644%2FCrypto-Charity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268314690,"owners_count":24231031,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["charity","cryptocompare","dapp","fundraising","matic","polygon-network"],"created_at":"2024-11-14T12:32:08.312Z","updated_at":"2025-08-01T23:44:20.750Z","avatar_url":"https://github.com/ac12644.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- PROJECT SHIELDS --\u003e\n\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"images/crypto-charity-dark.png\"\u003e\n  \u003cimg alt=\"Text changing depending on mode. Light: 'So light!' Dark: 'So dark!'\" src=\"images/crypto-charity-light.png\" width=\"240\" height=\"40\"\u003e\n\u003c/picture\u003e\n\n  \u003cp align=\"center\"\u003e\n    Be the change you want to see in the world.\n  \u003c/p\u003e\n  \n  \n  \u003ca href=\"https://medium.com/better-programming/building-crypto-charity-dapp-for-crowdfunding-using-next-js-solidity-ipfs-and-truffle-6a7d75d81ead\"\u003eRead full article on Medium\u003c/a\u003e \n\u003c/div\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n\u003cp align=\"left\"\u003e\n    Raise fund for social work in crypto built on polygon network. Create fundraising campaign, donate MATIC, generate a receipt, and withdraw the amount.\n\u003c/p\u003e\n\n#### Network\n\nContract is deployed on Polygon mumbai network\n\n```sh\n0x6e5bDb0E72597779b968C5Ff16Cc83D6C20C82D7\n```\n\nhttps://mumbai.polygonscan.com/address/0x6e5bDb0E72597779b968C5Ff16Cc83D6C20C82D7\n\n### ⚙️Functions:\n\n- create a fundraising campaign\n- users can donate in MATIC💰\n- beneficiary can withdraw the donated amount💲\n- donor can view last donations and generate receipt🧾\n\n\u003cimg src=\"images/Prev1.png\" width=\"45%\"\u003e\u003c/img\u003e\n\u003cimg src=\"images/Prev2.png\" width=\"45%\"\u003e\u003c/img\u003e\n\u003cimg src=\"images/Prev3.png\" width=\"45%\"\u003e\u003c/img\u003e\n\u003cimg src=\"images/Prev4.png\" width=\"45%\"\u003e\u003c/img\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Built With\n\n- [Next.js](https://nextjs.org/)\n- [Material UI](https://mui.com/)\n- [Truffle](https://trufflesuite.com/)\n- [Solidity](https://docs.soliditylang.org/)\n- [IPFS](https://ipfs.tech/)\n- [cryptocompare](https://github.com/exodusmovement/cryptocompare)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Installation\n\nBelow are instructions to get started:\n\n1. Clone the repo\n   ```sh\n   git clone https://github.com/ac12644/Crypto-Charity.git\n   ```\n2. Install packages\n   ```sh\n   yarn\n   ```\n3. Add environment variables, also you will require dedicated subdomain for IPFS from infura\n\n   ```sh\n   MNEMONIC_KEY=\n   INFURA_API_KEY=\n   INFURA_IPFS_ID=\n   INFURA_IPFS_SECRET=\n   ```\n\n4. Run application\n   ```sh\n   yarn run dev\n   ```\n\n### Specification\n\n#### Solidity Functions\n\n1. Create new fundraiser\n\n```solidity\nfunction createFundraiser(\n    string memory name,\n    string memory image,\n    string memory description,\n    uint256 goalAmount,\n    address payable beneficiary\n  ) public {\n    Fundraiser fundraiser = new Fundraiser(\n      name,\n      image,\n      description,\n      goalAmount,\n      beneficiary,\n      msg.sender\n    );\n    _fundraisers.push(fundraiser);\n    emit FundraiserCreated(fundraiser, msg.sender);\n  }\n```\n\n2. Set new beneficiary\n\n```solidity\n function setBeneficiary(address payable _beneficiary) public onlyOwner {\n    beneficiary = _beneficiary;\n  }\n```\n\n3. Return your donations\n\n```solidity\n  function myDonations() public view returns (\n      uint256[] memory values,\n      uint256[] memory dates\n  )\n\n  {\n    uint256 count = myDonationsCount();\n    values = new uint256[](count);\n    dates = new uint256[](count);\n    for (uint256 i = 0; i \u003c count; i++) {\n        Donation storage donation = _donations[msg.sender][i];\n        values[i] = donation.value;\n        dates[i] = donation.date;\n    }\n    return (values, dates);\n  }\n```\n\n4. Beneficiary can withdraw amount to beneficiary address defined when creating fundraiser\n\n```solidity\nfunction withdraw() public onlyOwner {\n      uint256 balance = address(this).balance;\n      beneficiary.transfer(balance);\n      emit Withdraw(balance);\n  }\n```\n\n5. Allow users to donate\n\n```solidity\nfunction donate() public payable {\n    Donation memory donation = Donation({\n      value: msg.value,\n      date: block.timestamp\n    });\n    _donations[msg.sender].push(donation);\n    totalDonations = totalDonations.add(msg.value);\n    donationsCount++;\n\n    emit DonationReceived(msg.sender, msg.value);\n  }\n\n```\n\n6. Return list of fundraisers with [limit] one can define number of fundraiser to be fetched\n\n```solidity\nfunction fundraisers(uint256 limit, uint256 offset)\n    public\n    view\n    returns (Fundraiser[] memory coll)\n  {\n    require(offset \u003c= fundraisersCount(), 'offset out of bounds');\n\n    uint256 size = fundraisersCount() - offset;\n    size = size \u003c limit ? size : limit;\n    size = size \u003c maxLimit ? size : maxLimit;\n    coll = new Fundraiser[](size);\n\n    for (uint256 i = 0; i \u003c size; i++) {\n      coll[i] = _fundraisers[offset + i];\n    }\n\n    return coll;\n  }\n```\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n \n \n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\n[forks-shield]: https://img.shields.io/github/forks/ac12644/Crypto-Charity?style=for-the-badge\n[forks-url]: https://github.com/ac12644/Crypto-Charity/network/members\n[stars-shield]: https://img.shields.io/github/stars/ac12644/Crypto-Charity?style=for-the-badge\n[stars-url]: https://github.com/ac12644/Crypto-Charity/stargazers\n[issues-shield]: https://img.shields.io/github/issues/ac12644/Crypto-Charity?style=for-the-badge\n[issues-url]: https://github.com/ac12644/Crypto-Charity/issues\n[license-shield]: https://img.shields.io/github/license/ac12644/Crypto-Charity?style=for-the-badge\n[license-url]: https://github.com/ac12644/Crypto-Charity/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://www.linkedin.com/in/ac12644/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac12644%2Fcrypto-charity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fac12644%2Fcrypto-charity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac12644%2Fcrypto-charity/lists"}