Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

InternalTrait

Fully qualified path: openzeppelin_finance::vesting::vesting::VestingComponent::InternalTrait

pub trait InternalTrait<
    TContractState,
    +HasComponent<TContractState>,
    impl VestingSchedule: VestingScheduleTrait<TContractState>,
>

Trait functions

initializer

Initializes the component by setting the vesting start, duration and cliff_duration.

Requirements:

  • cliff_duration must be less than or equal to duration.

Fully qualified path: openzeppelin_finance::vesting::vesting::VestingComponent::InternalTrait::initializer

fn initializer(
    ref self: ComponentState<TContractState>, start: u64, duration: u64, cliff_duration: u64,
)

resolve_vested_amount

Returns the vested amount that’s calculated using the VestingScheduleTrait implementation.

Fully qualified path: openzeppelin_finance::vesting::vesting::VestingComponent::InternalTrait::resolve_vested_amount

fn resolve_vested_amount(
    self: @ComponentState<TContractState>, token: ContractAddress, timestamp: u64,
) -> u256