mirror of
https://github.com/arkorty/B.Tech-Project-III.git
synced 2026-04-19 12:41:48 +00:00
807 B
807 B
client_admin
Small admin dashboard for creating tasks on the TaskEscrow contract.
Setup
-
Copy
.env.exampleto.envand fill in values (PRIVATE_KEY, CONTRACT_ADDRESS if different). -
Install dependencies:
cd client_admin
npm install
- Run the server:
npm start
- Open dashboard: http://localhost:4000
Endpoints
- GET
/- dashboard UI - POST
/api/create-task- create task on blockchain. JSON body:{ paymentAmount: "0.01", durationInDays: 7, workerAddress?: "0x..." }
Notes
- This server uses the ABI located at
../server/artifacts/contracts/TaskEscrow.sol/TaskEscrow.json. Ensure the artifact exists (deploy the contract if necessary). - The server signs transactions using
PRIVATE_KEYin.env. Be careful with private keys.