Comment on page
VestingTokenFactory
The
VestingTokenFactory
works as a beacon to proxy contracts that will delegate their logic to the VestingToken
contract. This smart contract also acts as a manager for the fees collected by VestingToken
transactions.Ownable
: to allow access to write functions.IBeacon
: to interact with theBeaconProxy
contracts.IFeeManager
: to store and provide information for the fee.
Necessary for the IBeacon. Has to point to the
VestingTokenFactory
deployed implementation.Unvest DAO
can set the Protocol Fee
to any value between 0% and 5%.
This function ensures that the Protocol Fee
cannot exceed 5%.This function allows the
Protocol Fee
to be set to 0%.Exposes in a single call the current
feePercentage
and current feeCollector
.IFeeManager(managerAddress).feeData();
// Returns:
// struct FeeData {
// address feeCollector;
// uint64 feePercentage;
// }
For accessibility, this is a shortcut for
IFeeManager(managerAddress).feeData().feeCollector
For accessibility, this is a shortcut for
IFeeManager(managerAddress).feeData().feePercentage
underlyingToken
: address of the ERC20 that is associated with a deployedVestingToken
Since mistakes can be made when deploying a new contract, a malicious individual could deploy one, or the ERC20 just needs multiple Vesting strategies, the contract stores all addresses of deployed
VestingToken
s and maps them to the underlyingToken
's address.newFeeCollector
: the new address that will be collectingVestingToken
s.
Only the
owner
of this contract can call this function.newFeePercentage
: the new fee percentage that will be charged onVestingToken
s' transfers.
Only the
feeCollector
can call this function.name (string)
: name of the ERC20 that will be created.symbol (string)
: symbol of the ERC20 that will be created.underlyingTokenAddress (address)
: address of the ERC20 that is being locked in the newVestingToken
contract.milestonesArray (Milestone[])
: array of the milestones that will describe the release behaviour of the newVestingToken
contract.
The contract is initialized with a name, symbol, the address of the underlying ERC20 token, and an array of milestones that describe the rules for releasing tokens.
Last modified 10mo ago