A contract for staking NFTs and earning rewards.
This contract allows users to stake their NFTs to earn rewards. The rewards are distributed based on the staked NFT's rarity and the duration of the staking period.
To use the INFTStake contract, first, you need to approve the contract to spend your NFTs. Once approved, you can stake your NFTs by calling the `stake` function. To unstake your NFTs, call the `unstake` function. You can also view your current staking balance and claim your accumulated rewards using the `getBalance` and `claimRewards` functions, respectively.
The contract uses a mapping to store the staking balances for each user and their staked NFTs. The rewards are calculated based on the rarity of the NFT and the duration of the staking period.
stake(uint256 tokenId)unstake(uint256 tokenId)claimRewards()setRewardsPerDay(uint256 _rewardsPerDay)Press Enter to send your query
Powered by Neuron AI • Press Enter to send