conache / quasi-escrow

Basic escrow smart contract implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐ŸŒฑ Project idea

Implement a quasi escrow smart contract that represents a legal agreement designed to protect buyers and sellers in a transaction that takes at least three variables as input _address, _timePeriod, and _amount.

Smart Contract should allow to deposit of some amount of ERC20 tokens for a specified address and allow withdrawal after a certain defined time.

Main restrictions

  • withdraw should be only allowed when _timePeriod occurs
  • the allowed amount that could be withdrawn is defined by _timePeriod
  • permission to withdraw should be defined by _address

๐Ÿš€ Development instructions

  • Run npm install beforehand
  • If you want to run the deployment script: setup .env file as in env.example

To compile the smart contracts:

npx hardhat compile


To run tests:

npx hardhat test


To check coverage metrics:

npx hardhat coverage


To check the contract sizes:

npx hardhat size-contracts


To deploy:

npx hardhat run ./scripts/deploy.js --network goerli

About

Basic escrow smart contract implementation.

License:MIT License


Languages

Language:JavaScript 80.0%Language:Solidity 19.6%Language:Shell 0.4%