Function: createAllocation(AllocationType _allocationType, address _grantee, address _controller, RestrictedTokenAward.Allocation _allocation, RestrictedTokenAward.Milestone[] _milestones, address _paymentToken, uint256 _exercisePrice, uint256 _shortStopDuration)
This function is used to create a new allocation.
Inputs
_allocationType
Control: Arbitrary.
Constraints:
AllocationType.RestrictedToken
only.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 RestrictedToken contract using the provided parameters.
Negative behavior
Revert if the
_allocationType
is notAllocationType.RestrictedToken
.