Understanding what values need to be put in the constructor.
Environment
Remix, Solidity 0.5.0
Details
I want to understand exactly the constructor values when using TokenVesting contract.
address beneficiary: I assume this is where the Tokens will be released to once vesting starts so it can be address of another wallet not necessarily the owner address that deployed TokenVesting contract? Person that will receive the Tokens once the vesting starts.
uint256 start: The start of the contract time? not sure about this one
uint256 cliffDuration: The duration of the cliff between the contract start time and the start of the vesting correct?
uint256 duration: How long the token vesting should last? not sure about this one either
bool revocable: what does this mean? I know we have to put a true or false value but what is this trying to achieve?
could you please explain in more details about all those points? because I assumed things, when I read the OpenZeppelin TokenVesting contract it doesn’t explain clearly those points. It needs more explanation.
Could you also verify if this scenario is correct:
Token locked from today for the period of 3 months, then vesting for a period of 3 months.
uint256 start: 1586388558 (current time using unix timestamp)
uint256 cliffDuration: 1594166400 (9th July 2020) - 1586388558 = 7777842
uint256 duration: 7777842 (The duration from the cliff end to the tokens fully vested, in this scenario its 3 months so it matches the cliff duration)
*What about how its vested? for example 25% of the locked tokens then 25% etc…
*How tokens will be locked in this contract I assume by sending tokens from any wallet address? of course they have to be ERC-20 tokens. Or do they have to be sent from the TokenVesting contract owner wallet specifically?
please check the example and let me know if its correct.
Thank you in advance!
Code to reproduce
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/drafts/TokenVesting.sol";
contract TestVesting is TokenVesting {
constructor(address beneficiary, uint256 start, uint256 cliffDuration, uint256 duration, bool revocable) public
TokenVesting(beneficiary, start, cliffDuration, duration, revocable) {
}
}