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
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"
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