BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | Public Attributes | List of all members
graphene::chain::linear_vesting_policy Struct Reference

Linear vesting balance with cliff. More...

#include <vesting_balance_object.hpp>

Public Member Functions

asset get_allowed_withdraw (const vesting_policy_context &ctx) const
 
bool is_deposit_allowed (const vesting_policy_context &ctx) const
 
bool is_deposit_vested_allowed (const vesting_policy_context &) const
 
bool is_withdraw_allowed (const vesting_policy_context &ctx) const
 
void on_deposit (const vesting_policy_context &ctx)
 
void on_deposit_vested (const vesting_policy_context &)
 
void on_withdraw (const vesting_policy_context &ctx)
 

Public Attributes

fc::time_point_sec begin_timestamp
 This is the time at which funds begin vesting. More...
 
uint32_t vesting_cliff_seconds = 0
 No amount may be withdrawn before this many seconds of the vesting period have elapsed. More...
 
uint32_t vesting_duration_seconds = 0
 Duration of the vesting period, in seconds. Must be greater than 0 and greater than vesting_cliff_seconds. More...
 
share_type begin_balance
 The total amount of asset to vest. More...
 

Detailed Description

Linear vesting balance with cliff.

This vesting balance type is used to mimic traditional stock vesting contracts where each day a certain amount vests until it is fully matured.

Note
New funds may not be added to a linear vesting balance.

Definition at line 61 of file vesting_balance_object.hpp.

Member Function Documentation

◆ get_allowed_withdraw()

asset graphene::chain::linear_vesting_policy::get_allowed_withdraw ( const vesting_policy_context ctx) const

Definition at line 39 of file vesting_balance_object.cpp.

◆ is_deposit_allowed()

bool graphene::chain::linear_vesting_policy::is_deposit_allowed ( const vesting_policy_context ctx) const

Definition at line 77 of file vesting_balance_object.cpp.

◆ is_deposit_vested_allowed()

bool graphene::chain::linear_vesting_policy::is_deposit_vested_allowed ( const vesting_policy_context ) const
inline

Definition at line 74 of file vesting_balance_object.hpp.

◆ is_withdraw_allowed()

bool graphene::chain::linear_vesting_policy::is_withdraw_allowed ( const vesting_policy_context ctx) const

Definition at line 87 of file vesting_balance_object.cpp.

◆ on_deposit()

void graphene::chain::linear_vesting_policy::on_deposit ( const vesting_policy_context ctx)

Definition at line 73 of file vesting_balance_object.cpp.

◆ on_deposit_vested()

void graphene::chain::linear_vesting_policy::on_deposit_vested ( const vesting_policy_context )
inline

Definition at line 77 of file vesting_balance_object.hpp.

◆ on_withdraw()

void graphene::chain::linear_vesting_policy::on_withdraw ( const vesting_policy_context ctx)

Definition at line 83 of file vesting_balance_object.cpp.

Member Data Documentation

◆ begin_balance

share_type graphene::chain::linear_vesting_policy::begin_balance

The total amount of asset to vest.

Definition at line 70 of file vesting_balance_object.hpp.

◆ begin_timestamp

fc::time_point_sec graphene::chain::linear_vesting_policy::begin_timestamp

This is the time at which funds begin vesting.

Definition at line 64 of file vesting_balance_object.hpp.

◆ vesting_cliff_seconds

uint32_t graphene::chain::linear_vesting_policy::vesting_cliff_seconds = 0

No amount may be withdrawn before this many seconds of the vesting period have elapsed.

Definition at line 66 of file vesting_balance_object.hpp.

◆ vesting_duration_seconds

uint32_t graphene::chain::linear_vesting_policy::vesting_duration_seconds = 0

Duration of the vesting period, in seconds. Must be greater than 0 and greater than vesting_cliff_seconds.

Definition at line 68 of file vesting_balance_object.hpp.


The documentation for this struct was generated from the following files: