Skip to content

JediFaust/jdt_staking

Repository files navigation

JediStaking Smart Contract

Language License


Solidity Smart contract for Staking JDT ERC20 Tokens


📝 Table of Contents

🚀 Link on EtherScan

https://rinkeby.etherscan.io/address/0x4AB7544890020E913995eAf0582B370175Ee2019#code

🚀 Installing

  • Set initial values on scripts/deploy.ts file
  • Deploy contract running on console:
node scripts/deploy.ts
  • Copy address of deployed contract and paste to .env file as CONTRACT_ADDRESS
  • Use stake, claim and unstake functions

⛓️ Contract Functions

  • stake()

Staking function, takes amount of LP Tokens

  • claim()

Claims reward if reward rate passes

  • unstake()

Unstakes the full amount and claims left rewards

  • setRewardRate()

Sets the time reward gains

  • setLockTime()

Sets the lock time, user can't unstake unless it passes

  • setRewardPercent()

Sets percent of rewards gained from amount of LP Tokens staked

🎈 Deploy & Test Scripts

node scripts/deploy.js --network rinkeby
npx hardhat test

💡 HardHat Tasks

npx hardhat stake
npx hardhat claim
npx hardhat unstake

About

Staking Smart Contract

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published