Relief Finance is a decentralized crowdfunding platform that facilitates cryptocurrency donations for humanitarian campaigns, ensuring transparency, security, and efficiency through blockchain technology.
- Introduction
- Features
- Tech Stack
- Smart Contract Details
- Installation
- Usage
- Contribution Guidelines
- License
Relief Finance is a decentralized platform built to support humanitarian efforts through crypto donations. It allows users to create, approve, and contribute to campaigns using Web3 wallets such as MetaMask. The platform ensures transparent fundraising by utilizing blockchain-based smart contracts.
- Decentralized Campaign Funding: Users can fund and track humanitarian campaigns in real-time.
- Multi-Wallet Support: Integrates popular wallets like MetaMask, TrustWallet, WalletConnect, etc.
- Transparent Contributions: All transactions and campaign details are recorded on the blockchain.
- Campaign Approval Mechanism: Campaigns can be reviewed and approved for legitimacy.
- Cross-Chain Support: Works across Ethereum, Polygon, AssetChain, and more.
- Frontend: React, Next.js
- Blockchain: Ethereum, Polygon, AssetChain
- Wallet Integration: MetaMask, WalletConnect, Rainbowkit
- State Management: React Context, Wagmi
- UI Framework: Tailwind CSS
- Smart Contract: Solidity-based contracts
The smart contract defines several functions that allow for campaign creation, contribution, and management.
- allCampaigns: Fetches all created campaigns.
- approvedCampaigns: Lists all approved campaigns.
- campaignContributors: Retrieves contributors of a specific campaign.
- campaignCount: Total number of campaigns.
- campaigns: Fetches details of a specific campaign.
- contributions: Retrieves contribution details for a specific campaign.
- getAllCampaigns: Fetches all campaigns with more detailed data.
- getAllCampaignsWithContributorCount: Fetches campaigns with contributor count.
- getCampaign: Fetches a specific campaign by ID.
- getCampaignWithContributors: Retrieves campaign details with contributor data.
- getCampaignsByCreator: Lists campaigns created by a specific user.
- getCampaignsByCreatorWithApprovalStatus: Fetches campaigns by creator and their approval status.
- getContributors: Retrieves contributor details of a campaign.
- getLatestCampaigns: Fetches the latest campaigns.
- getPaginatedCampaigns: Fetches campaigns in paginated format.
- isApproved: Checks if a campaign is approved.
- owner: Retrieves the contract owner.
- approveCampaign: Approves a campaign for public listing.
- completeCampaign: Marks a campaign as completed once the goal is reached.
- contribute: Allows users to contribute to a specific campaign.
- createCampaign: Enables users to create a new campaign.
- getRefund: Allows contributors to claim refunds for failed campaigns.
To run the project locally:
-
Clone the repository:
git clone https://github.com/yourusername/relief-finance.git cd relief-finance
-
Install dependencies:
-
Create an .env file and add the following environment variables:
```NEXT_PUBLIC_CONTRACT_ADDRESS=your_contract_address_here ```NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id_here
-
Run the development server:
-
Connect Wallet: Connect a Web3 wallet (MetaMask, TrustWallet, etc.).
-
View Campaigns: Browse through active campaigns and see the funding progress.
-
Contribute: Choose a campaign to donate cryptocurrency using your connected wallet.
-
Create Campaign: Create a new campaign by providing necessary details (title, description, funding goal).
-
Approve Campaign: Campaigns go through an approval process for added security.
-
Track Progress: Monitor live updates on fundraising goals and contributions.
This project is licensed under the MIT License.