BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
29 #include <boost/multi_index/composite_key.hpp>
30 #include <boost/multi_index/hashed_index.hpp>
31 #include <boost/multi_index/identity.hpp>
36 namespace graphene {
namespace chain {
46 : balance(_balance), now(_now), amount(_amount) {}
66 uint32_t vesting_cliff_seconds = 0;
68 uint32_t vesting_duration_seconds = 0;
78 {
FC_THROW(
"May not deposit vested into a linear vesting balance." ); }
91 uint32_t vesting_seconds = 0;
138 linear_vesting_policy,
140 instant_vesting_policy
152 protocol_ids, vesting_balance_object_type>
196 struct by_vesting_type;
204 inline uint64_t
vbo_mfs_hash(
const account_id_type& account_id,
const asset_id_type& asset_id)
206 return (asset_id.instance.value << 40) ^ account_id.instance.value;
224 return hash_value(vbo.
id);
247 return ( lhs.
id == rhs.
id );
252 typedef multi_index_container<
253 vesting_balance_object,
255 ordered_unique< tag<by_id>, member< object, object_id_type, &object::id >
257 ordered_non_unique< tag<by_account>,
258 member<vesting_balance_object, account_id_type, &vesting_balance_object::owner>
260 hashed_unique< tag<by_vesting_type>,
261 identity<vesting_balance_object>,
262 detail::vesting_balance_object_hash,
263 detail::vesting_balance_object_equal
278 (vesting_cliff_seconds)
279 (vesting_duration_seconds)
286 (coin_seconds_earned)
287 (coin_seconds_earned_last_update)
defines vesting in terms of coin-days accrued which allows for dynamic deposit/withdraw
share_type begin_balance
The total amount of asset to vest.
fc::uint128_t coin_seconds_earned
#define FC_REFLECT_EMPTY(TYPE)
FC_REFLECT_TYPENAME(fc::log_message)
#define MAP_OBJECT_ID_TO_TYPE(OBJECT)
vesting_policy policy
The vesting policy stores details on when funds vest, and controls when they may be withdrawn.
fc::time_point_sec coin_seconds_earned_last_update
#define FC_REFLECT_DERIVED(TYPE, INHERITS, MEMBERS)
Specializes fc::reflector for TYPE where type inherits other reflected classes.
bool is_deposit_vested_allowed(const vesting_policy_context &) const
bool is_deposit_vested_allowed(const vesting_policy_context &) const
fc::static_variant< linear_vesting_policy, cdd_vesting_policy, instant_vesting_policy > vesting_policy
fc::time_point_sec start_claim
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
vesting_balance_type balance_type
type of the vesting balance
FC_REFLECT_ENUM(graphene::net::core_message_type_enum,(trx_message_type)(block_message_type)(core_message_type_first)(item_ids_inventory_message_type)(blockchain_item_ids_inventory_message_type)(fetch_blockchain_item_ids_message_type)(fetch_items_message_type)(item_not_available_message_type)(hello_message_type)(connection_accepted_message_type)(connection_rejected_message_type)(address_request_message_type)(address_message_type)(closing_connection_message_type)(current_time_request_message_type)(current_time_reply_message_type)(check_firewall_message_type)(check_firewall_reply_message_type)(get_current_connections_request_message_type)(get_current_connections_reply_message_type)(core_message_type_last))(different_chain)(already_connected)(connected_to_self)(not_accepting_connections)(blocked)(invalid_hello_message)(client_too_old))(inbound)(outbound))(firewalled)(not_firewalled))(unable_to_connect)(connection_successful)) namespace std
multi_index_container< vesting_balance_object, indexed_by< ordered_unique< tag< by_id >, member< object, object_id_type, &object::id > >, ordered_non_unique< tag< by_account >, member< vesting_balance_object, account_id_type, &vesting_balance_object::owner > >, hashed_unique< tag< by_vesting_type >, identity< vesting_balance_object >, detail::vesting_balance_object_hash, detail::vesting_balance_object_equal > > > vesting_balance_multi_index_type
vesting_policy_context(asset _balance, fc::time_point_sec _now, asset _amount)
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
uint64_t operator()(const vesting_balance_object &vbo) const
uint64_t vbo_mfs_hash(const account_id_type &account_id, const asset_id_type &asset_id)
account_id_type owner
Account which owns and may withdraw from this vesting balance.
generic_index< vesting_balance_object, vesting_balance_multi_index_type > vesting_balance_index
fc::time_point_sec begin_timestamp
This is the time at which funds begin vesting.
void on_deposit_vested(const vesting_policy_context &)
Linear vesting balance with cliff.
base for all database objects