This smart contract, written in Clarity, powers a decentralized application (DApp) that connects donors with marginalized individuals or groups seeking funding. It allows for transparent tracking of funds and their utilization.
- Beneficiary Registration
- Donation Management
- Fund Utilization Tracking
- Admin Controls
Allows a beneficiary to register with a name, description, and target amount.
Enables donors to contribute STX to a specific beneficiary.
Allows the admin to add fund utilization entries for beneficiaries.
Enables the admin to approve fund utilization requests.
get-beneficiary
: Retrieves information about a specific beneficiary.get-donations
: Lists all donations for a particular beneficiary.get-utilization
: Shows all utilization entries for a beneficiary.
beneficiaries
: Stores information about registered beneficiaries.donations
: Records all donations made through the platform.utilization
: Tracks how funds are being used by beneficiaries.
- Admin-only functions for critical operations.
- Error handling for various scenarios (e.g., insufficient funds, unauthorized access).
- Deploy this contract to a Stacks blockchain.
- Set the admin address post-deployment.
- Beneficiaries can register using
register-beneficiary
. - Donors can contribute using the
donate
function. - The admin can track and approve fund utilization.