This project is a simple decentralized application (DApp) that allows users to request donations and withdraw donations in ERC-20 standart tokens. The project uses the Celo blockchain (compatible with the Ethereum Virtual Machine).
To use this DApp, you will need a EVM-compatible wallet such as Metamask and some test Celo coins to interact with the smart contract.
To set up the project, follow these steps:
- Clone the repository to your local machine.
- Install the required dependencies by running
yarn install
. - Start the DApp by running
yarn start
.
Once you have the DApp running, you can stake your NFTs by following these steps:
- Connect your wallet to the DApp.
- Fill the request donation form.
- Withdraw donations made to you.
- Close donations whenever.
The smart contracts are written in Solidity and are based on OpenZeppelin contracts for increased security and reliability. The contract Donations
supports the following functions:
createCause(string memory name, address payable beneficiary, string memory description, uint256 goalAmount, string memory imageUrl)
- create donation request.donate(uint256 causeId)
- Donate a certain amount.requestDonation(uint256 causeId, uint256 amount)
- Withdraw available donations.closeCause(uint256 causeId)
- Close donations.getAllCauses()
-get all donation requestsupdateTopDonors()
- handles logic for specific top donors and overall top donorsgetTopDonors()
-get top donors for a specific campaigngetOverallTopDonors()
-get all top 10 donors
Contributions to this project are welcome. To contribute, please fork the repository, make your changes, and submit a pull request.