Staking ERC721 Base
The Staking721Base
smart contract implements NFT staking mechanism. It allows composition of NFT Collection and ERC20 Token contract into a staking mechanism.
The base contract provides for customization of staking logic. Contract admins can implement their own reward mechanisms by overriding existing functions.
Note: This is a Beta release.
Unlocked Features
Once deployed, you can use the features made available by these contracts on the SDK and dashboard:
Click on each feature to learn more about what functions are available.
Implementing the Contract Extension
Import the contract extension and make your contract inherit it.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@thirdweb-dev/contracts/base/Staking721Base.sol";
contract MyToken is Staking721Base {
constructor(
uint256 _timeUnit,
uint256 _rewardsPerUnitTime,
address _nftCollection,
address _rewardToken
)
Staking721Base(
uint256 _timeUnit,
uint256 _rewardsPerUnitTime,
address _nftCollection,
address _rewardToken
)
{}
}