The Task Bounty System is a decentralized smart contract that allows users to create and participate in task-based bounties. Employers can post tasks with rewards in ETH, freelancers can apply, and the task owner selects a winner who receives the reward.
- ✅ Task Creation: Users can create tasks with ETH rewards and deadlines.
- ✅ Freelancer Applications: Freelancers can apply for open tasks.
- ✅ Winner Selection: Task owners select a freelancer to complete the task and receive the reward.
- ✅ Automatic Payments: ETH is automatically transferred to the winner upon selection.
- ✅ Task Cancellation: Task owners can cancel tasks and reclaim their funds (before selecting a winner).
- ✅ Reputation System: Freelancers earn reputation points for completing tasks.
- Creates a new task with a deadline.
- Requires ETH to be sent as a reward.
- Allows freelancers to submit a proposal for a task.
- Task must be active and not expired.
- Task owner selects a winner from the list of applicants.
- The freelancer receives the ETH reward.
- Task owner can cancel the task and reclaim funds (before selecting a winner).
- Returns the list of freelancers who applied for a task.
- Retrieves a freelancer's reputation score based on completed tasks.
- Employer Posts a Task: Calls
createTask()
and sends ETH as a reward. - Freelancers Apply: Call
applyForTask()
with a proposal. - Employer Selects a Winner: Calls
selectWinner()
, and the freelancer receives ETH. - Freelancer Reputation Increases: The freelancer gains a reputation point.
- ✅ Uses the checks-effects-interactions pattern to prevent re-entrancy attacks.
- ✅ Ensures only the task owner can select a winner or cancel a task.
- ✅ Prevents expired tasks from being manipulated.
- Open Remix IDE.
- Create a new Solidity file (
TaskBounty.sol
). - Copy and paste the contract code.
- Compile and deploy using an Ethereum testnet.
- Install dependencies:
npm install hardhat ethers chai
- Write test cases in Hardhat and run:
npx hardhat test
This project is licensed under the MIT License.
Developed by [Mrinal Singh]. Feel free to contribute or modify as needed!