rolic-hub / demo-stake-contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Hardhat Project

What our smart contract does

  1. the constructor accepts an interest total amount
  2. be able to recieve eth
  3. have a deadline for sending eth
  4. have a threshold
  5. if the threshold has not been met when the deadline is reached open for withdrawal
  6. if the balance in the contract is greater than or equal to the threshold amount the total is added to the interest total amount and after some calculations interest is added to each users account and they can withdraw

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.

Try running some of the following tasks:

npx hardhat help
npx hardhat test
GAS_REPORT=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.js

About


Languages

Language:JavaScript 67.2%Language:Solidity 32.8%