StakeableTokenWrapper
Last updated
Was this helpful?
Last updated
Was this helpful?
A wrapper for an ERC-20 that can be staked and withdrawn.
In this contract, staked tokens don't do anything- instead other contracts can inherit from this one to add functionality. / c
constructor(contract IERC20 _stakedToken)
Creates a new StakeableTokenWrapper with given _stakedToken
address
_stakedToken
: address of a token that will be used to stake /
balanceOf(address account) → uint256
Read how much account
has staked in this contract
account
: address of an account
amount of total staked ERC20(this.stakedToken) by account
/
stake(uint256 amount)
Stakes given amount
in this contract
amount
: amount of ERC20(this.stakedToken) to stake /
withdraw(uint256 amount)
Withdraws given amount
from this contract
amount
: amount of ERC20(this.stakedToken) to withdraw /
Staked(address user, uint256 amount)
No description
Withdrawn(address user, uint256 amount)
No description