A decentralized escrow smart contract template for freelance projects on Blocklance.
Utilizes a Decentralized Identifier (DID) to reference project information stored on Blocklance. The smart contract ensures data integrity and security.
BlockCrow also includes a secure payment structure allowing various payment methods, primarily any valid ERC20 token. Payouts can be made via different payment models such as hourly rates, fixed fees, or milestone-based payments.
BlockCrow includes the ability to handle project milestones. Each milestone is represented by a unique ID which must have been created on Blocklance, and the associated amount for each milestone is securely stored on the contract. The contract allows flexibility in the number and structure of milestones.
BlockCrow includes a secure process for releasing funds from escrow upon project completion, incorporating verification processes suitable for different project types. Safety checks are implemented to prevent unauthorized fund release.
BlockCrow allows a flexible timeline structure using block timestamps to manage project durations, milestones, and final delivery dates securely.
-
Deployment
Deploy the smart contract to the Base blockchain.
-
Initialization
Initialize the smart contract with the project information and payment terms.
-
Escrow Agent
Assign an escrow agent to the project.
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts
- OpenZeppelin Contracts Library: GitHub
- Hardhat: GitHub | Documentation
- Use access control mechanisms to restrict functions based on user roles.
- Thoroughly test the contract in a development environment before deploying it on the mainnet.
- Regularly update dependencies to benefit from security patches and improvements.
This smart contract is released under the MIT License. See LICENSE for more details.