VestingScheduleTrait
A trait that defines the logic for calculating the vested amount based on a given timestamp.
Fully qualified path: openzeppelin_finance::vesting::vesting::VestingComponent::VestingScheduleTrait
pub trait VestingScheduleTrait<TContractState>
Trait functions
calculate_vested_amount
Calculates and returns the vested amount at a given timestamp based on the core
vesting parameters.
Fully qualified path: openzeppelin_finance::vesting::vesting::VestingComponent::VestingScheduleTrait::calculate_vested_amount
fn calculate_vested_amount(
self: @ComponentState<TContractState>,
token: ContractAddress,
total_allocation: u256,
timestamp: u64,
start: u64,
duration: u64,
cliff: u64,
) -> u256