Decentraland Staking
Source: LandWorksDecentralandStaking.sol
Functions
Stake
Stakes user's LandWorks NFTs. Each NFT is transferred to the staking contract, the consumer
of the NFT is changed to the msg.sender
and the corresponding amount is computed.
Params
tokenIds
uint256[]
The tokenIds
of the LandWorks NFTs which will be staked
Withdraw
Withdraws staked users' LandWorks NFTs
Params
tokenIds
uint256[]
The tokenIds
of the LandWorks NFTs which will be withdrawn
Exit
Withdraws staked users' LandWorks NFTs and collected the accrued reward.
Params
tokenIds
uint256[]
The tokenIds
of the LandWorks NFTs which will be withdrawn
Get Reward
Collects the reward for msg.sender
Compute Amount
Computes the amount for the provided tokenId
based on the LandWorks NFT
Params
tokenId
uint256
The tokenId
of the LandWorks NFTs
Ownership
The contract has Ownable
functionality, therefore the owner has the following privileged actions:
Modify
rewardRate
, by callingnotifyRewardAmount()
Modify
rewardsDuration
once a period is finished, by callingsetRewardsDuration()
Pause or unpause the staking contract using
pause()
andunpause()
, thereby enabling/disabling calls tostake()
Appoint a new owner using
transferOwnership()
Renounce his role and therefore block subsequent calls for functionality mentioned above, by calling
renounceOwnership()
.
Last updated