VVestingWallet
Handles vesting of VRSW tokens
vVestingWallet is based on OpenZeppelin's VestingWallet contract with minor adjustments
vVestingWallet receives an amount of ERC20 tokens. The tokens are linearly released to the beneficiary over a specified period of time.
Events
event ERC20Released
event ERC20Released(
address indexed token,
uint256 amount)Emitted when an amount of tokens is released
State-changing Functions
constructor
constructor(
address beneficiaryAddress,
address erc20Token,
uint64 startTimestamp,
uint64 durationSeconds
) Creates a new Vesting Wallet for a beneficiary.
Parameters:
beneficiaryAddress
uint256
Amount to stake
erc20Token
address
Address of the vested token
startTimestamp
uint64
Timestamp when the vesting starts
durationSeconds
uint64
duration of vesting
release
function release() externalReleases all the available vested token to the beneficiary
Emits the ERC20Released event
beneficiaryAddress
uint256
Amount to stake
erc20Token
address
Address of the vested token
startTimestamp
uint64
Timestamp when the vesting starts
durationSeconds
uint64
duration of vesting
function lockVrsw
Read-only Functions
beneficiary
function beneficiary() public view returns (address)Returns the beneficiary address
start
function start() public view returns (uint256)Returns the timestamp when the vesting starts
duration
function duration() public view returns (uint256)Returns the duration of the vesting period
released
function released() public view returns (uint256)Returns the amount of tokens that have been transferred to the Beneficiary
releasable
function releasable() public view returns (uint256)Returns the amount of tokens that are available to be claimed by the Beneficiary. The amount is the total number of vested tokens minus the number of tokens that have already been released.
vestedAmount
function vestedAmount() public view returns (uint256)Returns total amount of tokens that are already vested.
Last updated