g8keepVester
g8keepVester
Inherits: IG8keepDeployerVesting
A vesting contract for tokens deployed on the g8keep platform.
State Variables
nextVestingId
The next ID to assign to a token vesting.
deploymentVestings
Mapping of vesting IDs to their vesting parameters.
Functions
deploymentVest
Creates a vesting at the time of token deployment for the deployer to be able to claim their tokens linearly over a period of time.
The caller of this function must be the token contract.
Parameters
claim
Calculates the claimable tokens for a vesting ID and transfers them to the recipient.
Must be called by the owner of the vesting ID.
Parameters
vested
Calculates the amount of tokens available to claim for a vesting ID.
Parameters
Returns
getVesting
Returns all of the vesting parameters for a vesting ID.
Parameters
_vested
Internal function to calculate the amount of tokens that are available to claim for the vesting ID and returns a storage pointer for the vesting to update in storage in the claim
function.
Parameters
Returns
Events
DeploymentVestCreated
Emitted when a deployment vest is created.
DeploymentVestClaimed
Emitted when a claim is made for vested tokens.
Errors
InvalidAddress
Thrown when a deployment vest is being created and the deployer address is zero.
InvalidAmount
Thrown when a deployment vest is being created and the amount of tokens is zero.
InvalidCaller
Thrown when claiming vested tokens and the caller is not the vesting recipient.
InvalidDuration
Thrown when a deployment vest is being created and the vesting time is zero or
the end time would overflow a uint40.
InvalidVestingId
Thrown when claiming vested tokens and the vesting ID is greater than or equal to the next ID.
NoTokensVested
Thrown when claiming vested tokens and there are no tokens available to claim.
Structs
DeploymentVesting
Struct of the vesting parameters for an ID.
Last updated