Skip to main content

TokenVestingManagerVotes

The TokenVestingManagerVotes contract extends the standard TokenVestingManager with governance capabilities, enabling voting power delegation for vesting recipients. Each vesting schedule deploys an individual Vault contract that holds tokens and implements the ERC5805 voting interface.

Overview

contract TokenVestingManagerVotes is AccessProtected, ITokenVestingManager

Key Features:

  • Governance-enabled vesting with voting power delegation
  • Individual Vault contracts for each vesting using EIP-1167 minimal proxies
  • Flexible delegation allowing recipients to participate in governance before claiming
  • ERC5805 compliance for standard governance integration
  • Preserved voting power even during vesting periods
  • All standard vesting features from TokenVestingManager

Use Cases:

  • DAO governance token distributions
  • Community voting power allocation
  • Decentralized protocol token vesting
  • Governance participation rewards
  • Voting-enabled employee compensation

Key Differences from TokenVestingManager:

  • Each vesting deploys a separate Vault contract
  • Tokens are held in individual Vaults instead of the main contract
  • Recipients can delegate voting power immediately
  • Compatible with governance frameworks requiring ERC5805
  • Slightly higher gas costs due to Vault deployments

Constructor

constructor(
address tokenAddress_,
ITypes.FeeType feeType_,
uint256 fee_,
address feeCollector_,
ITypes.FundingType fundingType_,
address vaultImplementation_
);

Parameters

NameTypeDescription
tokenAddress_address- Address of the token to be vested
feeType_ITypes.FeeType- Fee type for this contract
fee_uint256- Fee amount for this contract
feeCollector_address- Address of the fee collector
fundingType_ITypes.FundingType- Type of funding for this contract (Full or Partial)
vaultImplementation_address- Address of the deployed Vault implementation contract

Requirements:

  • Token address must implement IERC5805 interface
  • Vault implementation must be a deployed Vault contract
  • All addresses must be non-zero
  • Token fee percentage cannot exceed 100% (10000 basis points)

State Variables

State Variables

BASIS_POINTS

Basis points for fee calculation

uint256 public constant BASIS_POINTS = 10000;

TOKEN_ADDRESS

Address of the token to be vested

address public immutable TOKEN_ADDRESS;

FEE_TYPE

Fee type for this contract

ITypes.FeeType public immutable FEE_TYPE;

FUNDING_TYPE

Funding type for this contract

ITypes.FundingType public immutable FUNDING_TYPE;

DEPLOYMENT_BLOCK_NUMBER

Block number when this contract was deployed

uint256 public immutable DEPLOYMENT_BLOCK_NUMBER;

FEE

Fee amount for this contract

uint256 public immutable FEE;

VAULT_IMPLEMENTATION

Address of the deployed Vault implementation contract

address public immutable VAULT_IMPLEMENTATION;

numTokensReservedForVesting

Total number of tokens reserved for vesting

uint256 public numTokensReservedForVesting;

numTokensReservedForFee

Number of tokens reserved for fees

uint256 public numTokensReservedForFee;

vestingIdNonce

Nonce to generate vesting IDs

uint256 private vestingIdNonce;

feeCollector

Address of the fee collector

address public feeCollector;

recipients

recipients of the vesting

address[] public recipients;

recipientToIndex

Mapping: recipient address => index+1 in recipients array (0 means not in array)

mapping(address => uint256) private recipientToIndex;

vestingFunding

Mapping: vestingId => funding amount

mapping(bytes32 => uint256) public vestingFunding;

recipientVestings

Holds the vesting ids for each recipient

mapping(address => bytes32[]) public recipientVestings;

vestingToRecipientIndex

Mapping: recipient => vestingId => index+1 in recipientVestings array (0 means not in array)

mapping(address => mapping(bytes32 => uint256)) private vestingToRecipientIndex;

vestingById

Mapping: vestingId => vesting Holds the vesting information for each vesting id

mapping(bytes32 => TokenVestingLib.Vesting) public vestingById;

pendingVestingTransfers

Mapping: vestingId => newOwner Tracks pending ownership transfers for each vesting ID

mapping(bytes32 => address) public pendingVestingTransfers;

vestingVaults

Holds the address of the Vault contract for each vesting ID

mapping(bytes32 => address) public vestingVaults;

Vault System

Vault Deployment

Each vesting automatically deploys a minimal proxy Vault contract:

// Vault deployment happens automatically in _createVesting
address vaultAddress = Clones.clone(VAULT_IMPLEMENTATION);
IVault(vaultAddress).initialize(TOKEN_ADDRESS, _recipient, address(this));

Vault Functions

The deployed Vault contracts provide:

interface IVault {
function release(uint256 amount) external returns (uint256);
function revoke(uint256 amount) external;
function delegate(address delegatee) external;
function getVotes(address account) external view returns (uint256);
function getPastVotes(address account, uint256 timepoint) external view returns (uint256);
function balance() external view returns (uint256);
}

Vesting Management Functions

createVesting

function createVesting(
address _recipient,
uint32 _startTimestamp,
uint32 _endTimestamp,
uint32 _timelock,
uint256 _initialUnlock,
uint32 _cliffReleaseTimestamp,
uint256 _cliffAmount,
uint32 _releaseIntervalSecs,
uint256 _linearVestAmount,
bool _isRevocable
) external onlyAdmin

Creates a new governance-enabled vesting schedule with an individual Vault.

Parameters: (Same as TokenVestingManager)

  • _recipient: Beneficiary address
  • _startTimestamp: Vesting start time (unix timestamp)
  • _endTimestamp: Vesting end time (unix timestamp)
  • _timelock: Earliest claim timestamp (0 for no timelock)
  • _initialUnlock: Tokens immediately available at start
  • _cliffReleaseTimestamp: When cliff amount becomes available
  • _cliffAmount: Tokens released at cliff
  • _releaseIntervalSecs: Frequency of linear releases
  • _linearVestAmount: Total tokens vested linearly after cliff
  • _isRevocable: Whether admin can revoke this vesting

Additional Behavior:

  • Deploys a new Vault contract as EIP-1167 minimal proxy
  • Transfers tokens directly to the Vault (full funding mode)
  • Emits VaultDeployed event with vault address
  • Enables immediate voting power delegation

Example:

// Create governance-enabled vesting
vestingManagerVotes.createVesting(
0x123...789, // DAO member address
block.timestamp, // start now
block.timestamp + 2 * 365 * 24 * 3600, // 2 years
0, // no timelock
1000e18, // 1000 tokens initial unlock
block.timestamp + 6 * 30 * 24 * 3600, // 6 months cliff
2000e18, // 2000 tokens at cliff
30 * 24 * 3600, // monthly releases
7000e18, // 7000 tokens linear
false // non-revocable for governance
);

createVestingBatch

function createVestingBatch(
CreateVestingBatchParams calldata params
) external onlyAdmin

Creates multiple governance-enabled vesting schedules, each with its own Vault.

Gas Considerations:

  • Each vesting requires Vault deployment
  • Batch creation is still more efficient than individual calls
  • Recommended for creating 3-5 governance vestings simultaneously

fundVesting

function fundVesting(bytes32 _vestingId, uint256 _fundingAmount) external

Adds funding to an existing vesting's Vault contract (partial funding only).

Behavior:

  • Transfers tokens directly to the vesting's Vault
  • Maintains governance functionality during funding
  • Recipient can delegate voting power for funded tokens immediately

Governance Functions

delegateVotingPower

function delegateVotingPower(bytes32 _vestingId, address _delegatee) external

Delegates voting power from a vesting's Vault to a specified address.

Parameters:

  • _vestingId: Unique identifier of the vesting
  • _delegatee: Address to delegate voting power to

Access: Vesting recipient only

Behavior:

  • Calls the Vault's delegate function
  • Delegatee receives voting power for all tokens in the Vault
  • Delegation persists until changed or Vault is emptied
  • Emits VotingPowerDelegated event

Example:

// Delegate voting power to a governance committee
vestingManagerVotes.delegateVotingPower(vestingId, governanceCommitteeAddress);

getVestingVault

function getVestingVault(bytes32 _vestingId) external view returns (address)

Returns the Vault contract address for a specific vesting.

Parameters:

  • _vestingId: Unique identifier of the vesting

Returns: Address of the Vault contract holding the vesting's tokens

Claiming Functions

claim

function claim(bytes32 _vestingId) external payable

Claims vested tokens from the vesting's Vault contract.

Behavior:

  • Calculates claimable amount using standard vesting logic
  • Calls Vault's release function to transfer tokens
  • Tokens are transferred directly from Vault to recipient
  • Deducts applicable fees and transfers to fee collector
  • Maintains voting power for remaining tokens in Vault

Voting Power Impact:

  • Claimed tokens lose voting power (transferred to recipient)
  • Remaining tokens in Vault retain voting power
  • Delegation persists for remaining tokens

adminClaim

function adminClaim(bytes32 _vestingId) external payable onlyAdmin

Admin-sponsored claiming from Vault contracts.

batchAdminClaim

function batchAdminClaim(bytes32[] memory _vestingIds) external payable onlyAdmin

Batch claiming from multiple Vault contracts.

Vault Query Functions

getVaultBalance

function getVaultBalance(bytes32 _vestingId) external view returns (uint256)

Returns the current token balance in a vesting's Vault.

getVaultVotes

function getVaultVotes(bytes32 _vestingId, address _account) external view returns (uint256)

Returns the current voting power for an account from a specific Vault.

getVaultPastVotes

function getVaultPastVotes(bytes32 _vestingId, address _account, uint256 _timepoint) external view returns (uint256)

Returns historical voting power for an account from a specific Vault.

getVaultDelegate

function getVaultDelegate(bytes32 _vestingId) external view returns (address)

Returns the current delegate for a vesting's Vault.

Administrative Functions

revokeVesting

function revokeVesting(bytes32 _vestingId) external onlyAdmin

Revokes a vesting and recovers unvested tokens from the Vault.

Behavior:

  • Calculates unvested amount in the Vault
  • Calls Vault's revoke function
  • Transfers unvested tokens back to the contract
  • Recipient retains any vested tokens and their voting power
  • Vault remains active for any remaining tokens

withdrawAdmin

function withdrawAdmin(uint256 _amountRequested) external onlyAdmin

Withdraws tokens from the main contract (not from individual Vaults).

Note: This function only withdraws tokens held in the main contract, not from individual Vaults.

Events

VaultDeployed

event VaultDeployed(
bytes32 indexed vestingId,
address indexed vaultAddress
);

Emitted when a new Vault is deployed for a vesting.

VotingPowerDelegated

event VotingPowerDelegated(
address indexed vault,
address indexed delegatee
);

Emitted when voting power is delegated from a Vault.

Standard Events: All events from TokenVestingManager are also available:

  • VestingCreated
  • VestingFunded
  • Claimed
  • VestingRevoked
  • VestingTransferred
  • AdminWithdrawn
  • TokenFeeWithdrawn
  • GasFeeWithdrawn

Error Handling

Vault-Specific Errors:

  • VaultUnauthorized(): Unauthorized access to Vault functions
  • VaultAlreadyInitialized(): Attempting to initialize already initialized Vault
  • VaultDeploymentFailed(): Vault deployment failed
  • VaultZeroAddressDelegate(): Attempting to delegate to zero address

Standard Errors: All errors from TokenVestingManager apply.

Optimization Strategies:

  • Use batch operations when possible
  • Consider gas costs when creating many small vestings
  • Delegate voting power strategically to minimize transactions

Governance Framework Compatibility

The TokenVestingManagerVotes contract is compatible with:

OpenZeppelin Governor:

contract MyGovernor is Governor {
function getVotes(address account, uint256 blockNumber)
public view override returns (uint256) {
// Vault contracts automatically participate in governance
return token.getPastVotes(account, blockNumber);
}
}

Compound Governor:

  • Vaults implement required voting interface
  • Historical voting power is tracked
  • Compatible with delegation patterns

Custom Governance:

  • Access voting power through Vault contracts
  • Use getVotes and getPastVotes functions
  • Implement custom delegation logic if needed

All available functions

isVestingActive

Reverts if the vesting is not active

modifier isVestingActive(bytes32 _vestingId);

onlyVestingRecipient

Reverts if caller is not the recipient of the vesting

modifier onlyVestingRecipient(bytes32 _vestingId);

onlyFeeCollector

modifier onlyFeeCollector();

constructor

Sets the token address to be vested

constructor(
address tokenAddress_,
ITypes.FeeType feeType_,
uint256 fee_,
address feeCollector_,
ITypes.FundingType fundingType_,
address vaultImplementation_
);

Parameters

NameTypeDescription
tokenAddress_address- Address of the token to be vested
feeType_ITypes.FeeType- Fee type for this contract
fee_uint256- Fee amount for this contract
feeCollector_address- Address of the fee collector
fundingType_ITypes.FundingType- Type of funding for this contract (Full or Partial)
vaultImplementation_address

createVesting

Create a new vesting

function createVesting(
address _recipient,
uint32 _startTimestamp,
uint32 _endTimestamp,
uint32 _timelock,
uint256 _initialUnlock,
uint32 _cliffReleaseTimestamp,
uint256 _cliffAmount,
uint32 _releaseIntervalSecs,
uint256 _linearVestAmount,
bool _isRevocable
) external onlyAdmin;

Parameters

NameTypeDescription
_recipientaddress- Address of the recipient
_startTimestampuint32- Start timestamp of the vesting
_endTimestampuint32- End timestamp of the vesting
_timelockuint32- Timelock for the vesting
_initialUnlockuint256- Initial unlock amount
_cliffReleaseTimestampuint32- Cliff release timestamp
_cliffAmountuint256- Cliff amount
_releaseIntervalSecsuint32- Release interval in seconds
_linearVestAmountuint256- Linear vest amount
_isRevocablebool- Whether the vesting is revocable

createVestingBatch

Create a batch of vestings

function createVestingBatch(CreateVestingBatchParams calldata params) external onlyAdmin;

Parameters

NameTypeDescription
paramsCreateVestingBatchParams- Parameters for creating the vesting batch

fundVesting

Fund an existing vesting schedule

function fundVesting(bytes32 _vestingId, uint256 _fundingAmount) external isVestingActive(_vestingId) onlyAdmin;

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting to fund
_fundingAmountuint256- Amount of tokens to add as funding

fundVestingBatch

Fund multiple vestings in batch

function fundVestingBatch(bytes32[] calldata _vestingIds, uint256[] calldata _fundingAmounts) external onlyAdmin;

Parameters

NameTypeDescription
_vestingIdsbytes32[]- Array of vesting identifiers to fund
_fundingAmountsuint256[]- Array of funding amounts for each vesting

claim

Claim vested tokens

function claim(bytes32 _vestingId) external payable onlyVestingRecipient(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

adminClaim

Admin claims vested tokens on behalf of a recipient (gas sponsoring)

function adminClaim(bytes32 _vestingId) external payable onlyAdmin;

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

batchAdminClaim

Admin claims vested tokens for multiple recipients (batch gas sponsoring)

function batchAdminClaim(bytes32[] calldata _vestingIds) external payable onlyAdmin;

Parameters

NameTypeDescription
_vestingIdsbytes32[]- Array of vesting identifiers to claim

revokeVesting

Revoke active Vesting

function revokeVesting(bytes32 _vestingId) external onlyAdmin;

Parameters

NameTypeDescription
_vestingIdbytes32- Vesting Identifier

batchRevokeVestings

Revoke multiple vestings in batch

More gas efficient than calling revokeVesting multiple times

function batchRevokeVestings(bytes32[] calldata _vestingIds) external onlyAdmin;

Parameters

NameTypeDescription
_vestingIdsbytes32[]- Array of vesting identifiers to revoke

withdrawAdmin

Allow the owner to withdraw any balance not currently tied up in Vestings

function withdrawAdmin(uint256 _amountRequested) external onlyAdmin;

Parameters

NameTypeDescription
_amountRequesteduint256- Amount to withdraw

withdrawOtherToken

Withdraw a token which isn't controlled by the vesting contract. Useful when someone accidentally sends tokens to the contract

function withdrawOtherToken(address _otherTokenAddress) external onlyAdmin;

Parameters

NameTypeDescription
_otherTokenAddressaddress- the token which we want to withdraw

initiateVestingTransfer

Initiate the transfer of vesting ownership to a new address

function initiateVestingTransfer(bytes32 _vestingId, address _newOwner)
external
onlyVestingRecipient(_vestingId)
isVestingActive(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32The ID of the vesting to transfer
_newOwneraddressThe address of the new owner

cancelVestingTransfer

Cancel a pending vesting transfer

function cancelVestingTransfer(bytes32 _vestingId) external onlyVestingRecipient(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32The ID of the vesting with a pending transfer

acceptVestingTransfer

Accept a vesting transfer as the new owner

function acceptVestingTransfer(bytes32 _vestingId) external isVestingActive(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32The ID of the vesting to accept

directVestingTransfer

Direct transfer of vesting ownership by admin (for contract compatibility)

This is specifically for compatibility with contracts that cannot call acceptVestingTransfer

function directVestingTransfer(bytes32 _vestingId, address _newOwner)
external
onlyVestingRecipient(_vestingId)
isVestingActive(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32The ID of the vesting to transfer
_newOwneraddressThe address of the new owner

withdrawTokenFee

Allows only fee collector to withdraw collected token fees

This function is completely separate from distributor admin controls

function withdrawTokenFee(address recipient, uint256 amount) external onlyFeeCollector;

Parameters

NameTypeDescription
recipientaddressAddress to receive the fee
amountuint256Amount to withdraw, if 0 withdraws all available fees

withdrawGasFee

Allows only fee collector to withdraw collected gas fees

This function is completely separate from distributor admin controls

function withdrawGasFee(address recipient, uint256 amount) external onlyFeeCollector;

Parameters

NameTypeDescription
recipientaddressAddress to receive the fee
amountuint256Amount to withdraw, if 0 withdraws all available fees

transferFeeCollectorRole

Updates the fee collector address

Can only be called by the fee collector

function transferFeeCollectorRole(address newFeeCollector) external onlyFeeCollector;

Parameters

NameTypeDescription
newFeeCollectoraddressAddress of the new fee collector

delegate

Delegate voting power of the vesting's Vault

function delegate(bytes32 _vestingId, address _delegatee)
public
onlyVestingRecipient(_vestingId)
isVestingActive(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32The ID of the vesting
_delegateeaddressThe address to delegate voting power to

delegateBatch

Delegate voting power of multiple vestings' Vaults in batch

function delegateBatch(bytes32[] calldata _vestingIds, address[] calldata _delegatees) external;

Parameters

NameTypeDescription
_vestingIdsbytes32[]The IDs of the vestings
_delegateesaddress[]The addresses to delegate voting power to

getVestingFundingInfo

Get funding information for a vesting

function getVestingFundingInfo(bytes32 _vestingId)
external
view
returns (uint8 fundingType, uint256 totalFunded, uint256 totalRequired);

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

Returns

NameTypeDescription
fundingTypeuint8- Type of funding (Full or Partial)
totalFundeduint256- Total amount of tokens funded so far
totalRequireduint256- Total amount of tokens required for full funding

isVestingFullyFunded

Check if a vesting is fully funded

function isVestingFullyFunded(bytes32 _vestingId) external view returns (bool);

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

Returns

NameTypeDescription
<none>boolisFullyFunded - True if the vesting is fully funded

getVestingInfo

Get the vesting information

function getVestingInfo(bytes32 _vestingId) external view returns (TokenVestingLib.Vesting memory);

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

Returns

NameTypeDescription
<none>TokenVestingLib.Vestingvesting - Vesting information

getVestedAmount

Get the vested amount for a Vesting, at a given timestamp.

function getVestedAmount(bytes32 _vestingId, uint32 _referenceTimestamp) external view returns (uint256);

Parameters

NameTypeDescription
_vestingIdbytes32
_referenceTimestampuint32Timestamp for which we're calculating

getClaimableAmount

Get the claimable amount for a vesting

function getClaimableAmount(bytes32 _vestingId) external view returns (uint256 claimable);

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

Returns

NameTypeDescription
claimableuint256- The amount of tokens that can be claimed at the current time

getAllRecipients

Get all recipients

function getAllRecipients() external view returns (address[] memory);

Returns

NameTypeDescription
<none>address[]recipients - The list of recipients

getAllRecipientsLength

Get the length of all recipients

function getAllRecipientsLength() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256length - The length of all recipients

getAllRecipientsSliced

Get all recipients in a range

function getAllRecipientsSliced(uint256 _from, uint256 _to) external view returns (address[] memory);

Parameters

NameTypeDescription
_fromuint256- The start index (inclusive)
_touint256- The end index (exclusive)

Returns

NameTypeDescription
<none>address[]recipientsSliced - The list of recipients in the range

getAllRecipientVestings

Get all vestings for a recipient

function getAllRecipientVestings(address _recipient) external view returns (bytes32[] memory);

Parameters

NameTypeDescription
_recipientaddress- The recipient address

Returns

NameTypeDescription
<none>bytes32[]recipientVestings - The list of vestings for the recipient

getAllRecipientVestingsSliced

Get all vestings for a recipient in a range

function getAllRecipientVestingsSliced(uint256 _from, uint256 _to, address _recipient)
external
view
returns (bytes32[] memory);

Parameters

NameTypeDescription
_fromuint256- The start index (inclusive)
_touint256- The end index (exclusive)
_recipientaddress- The recipient address

Returns

NameTypeDescription
<none>bytes32[]recipientVestingsSliced - The list of vestings for the recipient in the range

getAllRecipientVestingsLength

Get the length of all vestings for a recipient

function getAllRecipientVestingsLength(address _recipient) external view returns (uint256);

Parameters

NameTypeDescription
_recipientaddress- The recipient address

Returns

NameTypeDescription
<none>uint256length - The length of all vestings for the recipient

getPendingVestingTransfer

Get the pending owner for a vesting transfer

function getPendingVestingTransfer(bytes32 _vestingId) external view returns (address);

Parameters

NameTypeDescription
_vestingIdbytes32The ID of the vesting

Returns

NameTypeDescription
<none>addressThe address of the pending owner if there is one, or zero address

amountAvailableToWithdrawByAdmin

Amount of tokens available to withdraw by the admin

function amountAvailableToWithdrawByAdmin() public view returns (uint256);

Returns

NameTypeDescription
<none>uint256The amount of tokens available to withdraw

isRecipient

Check if a recipient has vestings

function isRecipient(address recipient) external view returns (bool);

Parameters

NameTypeDescription
recipientaddress- The recipient address

Returns

NameTypeDescription
<none>boolisRecipient - True if the recipient has vestings

_createVesting

Internal function to create a new vesting and deploy its vault

function _createVesting(TokenVestingLib.VestingParams memory params) internal returns (address vaultProxy);

Parameters

NameTypeDescription
paramsTokenVestingLib.VestingParams- Vesting parameters

Returns

NameTypeDescription
vaultProxyaddressThe address of the deployed and initialized Vault proxy.

_deployAndInitializeVault

Deploys and initializes a new Vault proxy for a vesting schedule.

function _deployAndInitializeVault(address _recipient) internal returns (address vaultProxy);

Parameters

NameTypeDescription
_recipientaddressThe beneficiary of the vesting schedule.

Returns

NameTypeDescription
vaultProxyaddressThe address of the deployed and initialized Vault proxy.

_claim

Internal function to claim vested tokens

function _claim(bytes32 _vestingId) internal;

Parameters

NameTypeDescription
_vestingIdbytes32- Identifier of the vesting

_revokeVesting

Internal function to revoke a vesting

function _revokeVesting(bytes32 _vestingId) internal isVestingActive(_vestingId);

Parameters

NameTypeDescription
_vestingIdbytes32- Vesting Identifier

_removeVestingFromRecipient

Helper function to remove a vesting ID from a recipient's array

function _removeVestingFromRecipient(address _recipient, bytes32 _vestingId) internal;

Parameters

NameTypeDescription
_recipientaddressThe address of the recipient
_vestingIdbytes32The ID of the vesting to remove

_removeRecipient

Helper function to remove a recipient from the recipients array

function _removeRecipient(address _recipient) internal;

Parameters

NameTypeDescription
_recipientaddressThe address of the recipient to remove

_isRecipient

Internal function to check if an address is a recipient

function _isRecipient(address recipient) internal view returns (bool);

Parameters

NameTypeDescription
recipientaddressThe address to check

Returns

NameTypeDescription
<none>boolTrue if the address is a recipient, false otherwise

_checkArrayLengthMismatch

Internal function to check if all array lengths in batch params match the expected length

function _checkArrayLengthMismatch(CreateVestingBatchParams calldata params, uint256 expectedLength) internal pure;

Parameters

NameTypeDescription
paramsCreateVestingBatchParams- Batch parameters to validate
expectedLengthuint256- The expected length all arrays should match