Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
graphene::chain::vesting_balance_object Class Reference

#include <vesting_balance_object.hpp>

Inheritance diagram for graphene::chain::vesting_balance_object:
graphene::wallet::vesting_balance_object_with_info

Public Member Functions

 vesting_balance_object ()
 
void deposit (const fc::time_point_sec &now, const asset &amount)
 Deposit amount into vesting balance, requiring it to vest before withdrawal. More...
 
bool is_deposit_allowed (const fc::time_point_sec &now, const asset &amount) const
 
void deposit_vested (const fc::time_point_sec &now, const asset &amount)
 Deposit amount into vesting balance, making the new funds vest immediately. More...
 
bool is_deposit_vested_allowed (const fc::time_point_sec &now, const asset &amount) const
 
void withdraw (const fc::time_point_sec &now, const asset &amount)
 
bool is_withdraw_allowed (const fc::time_point_sec &now, const asset &amount) const
 
asset get_allowed_withdraw (const time_point_sec &now) const
 

Public Attributes

account_id_type owner
 Account which owns and may withdraw from this vesting balance. More...
 
asset balance
 
vesting_policy policy
 The vesting policy stores details on when funds vest, and controls when they may be withdrawn. More...
 

Static Public Attributes

static const uint8_t space_id = protocol_ids
 
static const uint8_t type_id = vesting_balance_object_type
 

Detailed Description

Vesting balance object is a balance that is locked by the blockchain for a period of time.

Definition at line 130 of file vesting_balance_object.hpp.

Constructor & Destructor Documentation

◆ vesting_balance_object()

graphene::chain::vesting_balance_object::vesting_balance_object ( )
inline

Definition at line 144 of file vesting_balance_object.hpp.

Member Function Documentation

◆ deposit()

void graphene::chain::vesting_balance_object::deposit ( const fc::time_point_sec &  now,
const asset amount 
)

Deposit amount into vesting balance, requiring it to vest before withdrawal.

Definition at line 207 of file vesting_balance_object.cpp.

◆ deposit_vested()

void graphene::chain::vesting_balance_object::deposit_vested ( const fc::time_point_sec &  now,
const asset amount 
)

Deposit amount into vesting balance, making the new funds vest immediately.

Definition at line 214 of file vesting_balance_object.cpp.

◆ get_allowed_withdraw()

asset graphene::chain::vesting_balance_object::get_allowed_withdraw ( const time_point_sec &  now) const

Get amount of allowed withdrawal.

Definition at line 234 of file vesting_balance_object.cpp.

◆ is_deposit_allowed()

bool graphene::chain::vesting_balance_object::is_deposit_allowed ( const fc::time_point_sec &  now,
const asset amount 
) const

Definition at line 193 of file vesting_balance_object.cpp.

◆ is_deposit_vested_allowed()

bool graphene::chain::vesting_balance_object::is_deposit_vested_allowed ( const fc::time_point_sec &  now,
const asset amount 
) const

Definition at line 221 of file vesting_balance_object.cpp.

◆ is_withdraw_allowed()

bool graphene::chain::vesting_balance_object::is_withdraw_allowed ( const fc::time_point_sec &  now,
const asset amount 
) const

Definition at line 198 of file vesting_balance_object.cpp.

◆ withdraw()

void graphene::chain::vesting_balance_object::withdraw ( const fc::time_point_sec &  now,
const asset amount 
)

Used to remove a vesting balance from the VBO. As well as the balance field, coin_seconds_earned and coin_seconds_earned_last_update fields are updated.

The money doesn't "go" anywhere; the caller is responsible for crediting it to the proper account.

Definition at line 226 of file vesting_balance_object.cpp.

Member Data Documentation

◆ balance

asset graphene::chain::vesting_balance_object::balance

Total amount remaining in this vesting balance Includes the unvested funds, and the vested funds which have not yet been withdrawn

Definition at line 140 of file vesting_balance_object.hpp.

◆ owner

account_id_type graphene::chain::vesting_balance_object::owner

Account which owns and may withdraw from this vesting balance.

Definition at line 137 of file vesting_balance_object.hpp.

◆ policy

vesting_policy graphene::chain::vesting_balance_object::policy

The vesting policy stores details on when funds vest, and controls when they may be withdrawn.

Definition at line 142 of file vesting_balance_object.hpp.

◆ space_id

const uint8_t graphene::chain::vesting_balance_object::space_id = protocol_ids
static

Definition at line 133 of file vesting_balance_object.hpp.

◆ type_id

const uint8_t graphene::chain::vesting_balance_object::type_id = vesting_balance_object_type
static

Definition at line 134 of file vesting_balance_object.hpp.


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