A decentralized task management application built on Ethereum/Polygon that allows users to create, edit, complete, and delete tasks on the blockchain.
contracts/: Smart contract codefrontend/: React frontend applicationscripts/: Deployment and utility scriptstest/: Smart contract tests
- Create tasks with title and description
- Edit existing tasks
- Mark tasks as completed
- Delete tasks
- Task ownership verification
- Priority levels and due dates
- Node.js 16+ and npm/pnpm
- MetaMask browser extension
- Sepolia or Mumbai testnet ETH/MATIC
- Clone the repository
- Install dependencies:
npm install # or pnpm install - Copy
.env.exampleto.envand update the values:cp .env.example .env
- Update the
.envfile with your:- Infura/Alchemy API keys for Sepolia and Mumbai
- Private key for deployment
- Etherscan/Polygonscan API keys for verification
npx hardhat run scripts/deploy.js --network sepolianpx hardhat run scripts/deploy.js --network mumbaiThe deployment script will:
- Compile the contract
- Deploy it to the specified network
- Wait for confirmations
- Verify the contract on Etherscan/Polygonscan
- Save deployment information to
deployments/{network}.json - Update the frontend
.env.localfile with the contract address
The deployment script attempts to verify the contract automatically. If verification fails, you can manually verify using:
npx hardhat verify --network sepolia DEPLOYED_CONTRACT_ADDRESS
# or
npx hardhat verify --network mumbai DEPLOYED_CONTRACT_ADDRESSAfter deploying the contract:
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install # or pnpm install -
Update the
.env.localfile with your deployed contract addresses (the deployment script should do this automatically) -
Start the development server:
npm run dev # or pnpm dev -
Open http://localhost:3000 in your browser
See the frontend README for instructions on deploying the frontend to Vercel or Netlify.
Run the smart contract tests:
npx hardhat test