This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
- Install dependencies:
npm install- Compile contracts:
npm run compile- Run tests:
npm run test- Deploy to local Hardhat network:
npm run node
# In another terminal:
npm run deploycontracts/- Solidity smart contractsscripts/- Deployment and utility scriptstest/- Test fileshardhat.config.js- Hardhat configuration
The Lock.sol contract is a simple time-locked wallet that:
- Accepts ETH deposits
- Locks funds until a specified unlock time
- Allows the owner to withdraw after the unlock time