Skip to content

swapnilsparsh/NFT-Staking

 
 

Repository files navigation

Simple NFT Stacking Smart Contract

This smart contract stakes the minted NFT and rewards the staker in Custom ERC20 MoonTokens on the basis of time the NFT is staked for.

For Example:-
If NFT owner stakes NFT for:-
Atleast for 1 month they get 10% APR Reward in the form of MoonToken
or atleast 6 months they get 15% APR Reward in the form of MoonToken
or 12 months or more they get 25% APR Reward in the form of MoonToken

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

    ROPSTEN_API_URL = "https://ropsten.infura.io/v3/YOUR_API_KEY"
    PRIVATE_KEY = "YOUR-METAMASK-PRIVATE_KEY"

NPM Packages:

Tech Stack:

Run Locally:

Clone the github repo:

https://github.com/itsshantanu/NFT-Staking

Install Node Modules

npm install

Compile

npx hardhat compile

Test

npx hardhat test

Deploy on Localhost

npx hardhat node
npx hardhat run scripts/deploy.js --network localhost

Deploy on Ropsten

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

Help

npx hardhat help

Check live at Ropsten Test Net:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 54.3%
  • JavaScript 45.7%