Wrapped NFTs
WrappedNftStakingPool
WrappedNftStakingPool is used for wrapped staking when user's stake is wrapped into NFT token. When user stakes tokens, contract mints NFT and wraps stake into it, i.e. NFT token's ownership yeilds into stake owneships. Stake is locked for the fixed period and can be withdrawn together with APR reward. User's can stake until total staking limit is reached.
stakeLimit
public immutable staking limit in tokens
deposits
public mapping for NFT id to deposit data
PCT_BASE
public constant for percentage base mutiplier
apr
public immutable APR
lockPeriodMonths
public immutable locking period in months
stakeBalance
public variable to store staking balance in tokens
rewardBalance
public variable to store reward balance in tokens
constructor
WrappedNftStakingPool constructor
Parameters
_tokenAddress
address
contract address of the ACTA token used for stacking
_nftTokenAddress
address
contract address of the NFT token
_apr
uint256
APR to calculate reward
_stakeLimit
uint256
max amount of total ACTA tokens which can be staked
_lockPeriodMonths
uint256
period in months for which deposit is locked
deposit
external method is used to depost tokens
Parameters
_amount
uint256
amount to deposit.
_tokenURI
string
URI string of NFT token
withdraw
external method is used to withdraw deposit + reward to nft token owner's address
Parameters
_nftTokenId
uint256
id of NFT token
fundReward
external method is used to fund reward balance
Parameters
_amount
uint256
of tokens to fund reward balance
transferReward
external method used to transfer reward balance
Parameters
_amount
uint256
of tokens to transfer from reward balance
_transerAddress
address
address to receive reward balance
isDepositLocked
external method is used to check if deposit is locked
Parameters
_nftTokenId
uint256
id of NFT token
getDepositReward
external method is used to calculate reward for the deposit
Parameters
_nftTokenId
uint256
id of NFT token
DepositSuccesful
Emitted when deposit is succesful
Parameters
_nftTokenId
uint256
nft token id
_amount
uint256
amount of tokens deposited
_reward
uint256
amount of tokens rewarded
_tokenURI
string
tokenURI string
WithdrawSuccesful
Emitted when withdraw is succesful
Parameters
_nftTokenId
uint256
_amount
uint256
amount of tokens withdrawn
_reward
uint256
amount of tokens rewarded
Last updated