Function: createAllocation(AllocationType _allocationType, address _grantee, address _controller, VestingAllocation.Allocation _allocation, VestingAllocation.Milestone[] _milestones, address _paymentToken, uint256 _exercisePrice, uint256 _shortStopDuration)
This function is used to create a new VestingAllocation contract.
Inputs
_allocationType
Control: Arbitrary.
Constraints: Should be enum
AllocationType.Vesting
.Impact: Type of allocation.
_grantee
Control: Arbitrary.
Constraints: None.
Impact: Address of the grantee.
_controller
Control: Arbitrary.
Constraints: None.
Impact: Address of the controller.
_allocation
Control: Arbitrary.
Constraints: None.
Impact: Struct of the allocation including
Allocation
fields:tokenStreamTotal
,vestingCliffCredit
,unlockingCliffCredit
,vestingRate
,vestingStartTime
,unlockRate
,unlockStartTime
, andtokenContract
.
_milestones
Control: Arbitrary.
Constraints: None.
Impact: Array of
Milestone
. Struct of the milestone includingmilestoneAward
,unlockOnCompletion
,complete
, and an array ofconditionContracts
addresses.
_paymentToken
Control: Arbitrary.
Constraints: None.
Impact: Address of payment token.
_exercisePrice
Control: Arbitrary.
Constraints: None.
Impact: Value of exercise price.
_shortStopDuration
Control: Arbitrary.
Constraints: None.
Impact: Value of short stop duration.
Branches and code coverage
Intended branches
Deploy a new VestingAllocation contract using the provided parameters.
Negative behavior
Revert if the
_allocationType
is notAllocationType.Vesting
.