BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
This class represents an account on the object graph. More...
#include <account_object.hpp>
Public Member Functions | |
bool | has_special_authority () const |
template<typename DB > | |
const vesting_balance_object & | cashback_balance (const DB &db) const |
bool | is_lifetime_member () const |
bool | is_basic_account (time_point_sec now) const |
bool | is_annual_member (time_point_sec now) const |
bool | is_member (time_point_sec now) const |
Public Member Functions inherited from graphene::db::abstract_object< account_object, protocol_ids, account_object_type > | |
abstract_object () | |
object_id< SpaceID, TypeID > | get_id () const |
Public Member Functions inherited from graphene::db::base_abstract_object< account_object > | |
std::unique_ptr< object > | clone () const override |
void | move_from (object &obj) override |
fc::variant | to_variant () const override |
std::vector< char > | pack () const override |
object ()=default | |
object (uint8_t space_id, uint8_t type_id) | |
Public Member Functions inherited from graphene::db::object | |
object ()=default | |
object (uint8_t space_id, uint8_t type_id) | |
virtual | ~object ()=default |
virtual std::unique_ptr< object > | clone () const =0 |
virtual fc::variant | to_variant () const =0 |
virtual std::vector< char > | pack () const =0 |
Public Attributes | |
time_point_sec | membership_expiration_date |
account_id_type | registrar |
The account that paid the fee to register this account. Receives a percentage of referral rewards. More... | |
account_id_type | referrer |
The account credited as referring this account. Receives a percentage of referral rewards. More... | |
account_id_type | lifetime_referrer |
The lifetime member at the top of the referral tree. Receives a percentage of referral rewards. More... | |
uint16_t | network_fee_percentage = GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE |
Percentage of fee which should go to network. More... | |
uint16_t | lifetime_referrer_fee_percentage = 0 |
Percentage of fee which should go to lifetime referrer. More... | |
uint16_t | referrer_rewards_percentage = 0 |
string | name |
The account's name. This name must be unique among all account names on the graph. May not be empty. More... | |
authority | owner |
authority | active |
account_options | options |
uint16_t | num_committee_voted |
Pre-calculated for better performance on chain maintenance. More... | |
account_statistics_id_type | statistics |
flat_set< account_id_type > | whitelisting_accounts |
flat_set< account_id_type > | blacklisting_accounts |
optional< vesting_balance_id_type > | cashback_vb |
special_authority | owner_special_authority = no_special_authority() |
special_authority | active_special_authority = no_special_authority() |
uint8_t | top_n_control_flags = 0 |
optional< flat_set< asset_id_type > > | allowed_assets |
uint32_t | creation_block_num = 0 |
The block number when the account was created. More... | |
time_point_sec | creation_time |
The time when the account was created. More... | |
set< account_id_type > | whitelisted_accounts |
set< account_id_type > | blacklisted_accounts |
Public Attributes inherited from graphene::db::object | |
object_id_type | id |
Static Public Attributes | |
static const uint8_t | top_n_control_owner = 1 |
static const uint8_t | top_n_control_active = 2 |
Static Public Attributes inherited from graphene::db::abstract_object< account_object, protocol_ids, account_object_type > | |
static constexpr uint8_t | space_id |
static constexpr uint8_t | type_id |
This class represents an account on the object graph.
Accounts are the primary unit of authority on the graphene system. Users must have an account in order to use assets, trade in the markets, vote for committee_members, etc.
Definition at line 180 of file account_object.hpp.
|
inline |
Definition at line 297 of file account_object.hpp.
|
inline |
Definition at line 290 of file account_object.hpp.
|
inline |
Definition at line 315 of file account_object.hpp.
|
inline |
Definition at line 309 of file account_object.hpp.
|
inline |
Definition at line 304 of file account_object.hpp.
|
inline |
Definition at line 320 of file account_object.hpp.
authority graphene::chain::account_object::active |
The owner authority contains the hot keys of the account. This authority has control over nearly all operations the account may perform.
Definition at line 220 of file account_object.hpp.
special_authority graphene::chain::account_object::active_special_authority = no_special_authority() |
Definition at line 268 of file account_object.hpp.
optional< flat_set<asset_id_type> > graphene::chain::account_object::allowed_assets |
This is a set of assets which the account is allowed to have. This is utilized to restrict buyback accounts to the assets that trade in their markets. In the future we may expand this to allow accounts to e.g. voluntarily restrict incoming transfers.
Definition at line 283 of file account_object.hpp.
set<account_id_type> graphene::chain::account_object::blacklisted_accounts |
Definition at line 250 of file account_object.hpp.
flat_set<account_id_type> graphene::chain::account_object::blacklisting_accounts |
This is a set of all accounts which have 'blacklisted' this account. Blacklisting is only used in core validation for the purpose of forbidding accounts from holding and transacting in whitelisted assets. This account cannot update this set, and it will be preserved even if the account is transferred. Other accounts may add or remove their IDs from this set.
Definition at line 260 of file account_object.hpp.
optional<vesting_balance_id_type> graphene::chain::account_object::cashback_vb |
Vesting balance which receives cashback_reward deposits.
Definition at line 265 of file account_object.hpp.
uint32_t graphene::chain::account_object::creation_block_num = 0 |
The block number when the account was created.
Definition at line 286 of file account_object.hpp.
time_point_sec graphene::chain::account_object::creation_time |
The time when the account was created.
Definition at line 288 of file account_object.hpp.
account_id_type graphene::chain::account_object::lifetime_referrer |
The lifetime member at the top of the referral tree. Receives a percentage of referral rewards.
Definition at line 198 of file account_object.hpp.
uint16_t graphene::chain::account_object::lifetime_referrer_fee_percentage = 0 |
Percentage of fee which should go to lifetime referrer.
Definition at line 203 of file account_object.hpp.
time_point_sec graphene::chain::account_object::membership_expiration_date |
The time at which this account's membership expires. If set to any time in the past, the account is a basic account. If set to time_point_sec::maximum(), the account is a lifetime member. If set to any time not in the past less than time_point_sec::maximum(), the account is an annual member.
See is_lifetime_member, is_basic_account, is_annual_member, and is_member
Definition at line 191 of file account_object.hpp.
string graphene::chain::account_object::name |
The account's name. This name must be unique among all account names on the graph. May not be empty.
Definition at line 209 of file account_object.hpp.
uint16_t graphene::chain::account_object::network_fee_percentage = GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE |
Percentage of fee which should go to network.
Definition at line 201 of file account_object.hpp.
uint16_t graphene::chain::account_object::num_committee_voted |
Pre-calculated for better performance on chain maintenance.
Definition at line 225 of file account_object.hpp.
account_options graphene::chain::account_object::options |
Definition at line 222 of file account_object.hpp.
authority graphene::chain::account_object::owner |
The owner authority represents absolute control over the account. Usually the keys in this authority will be kept in cold storage, as they should not be needed very often and compromise of these keys constitutes complete and irrevocable loss of the account. Generally the only time the owner authority is required is to update the active authority.
Definition at line 217 of file account_object.hpp.
special_authority graphene::chain::account_object::owner_special_authority = no_special_authority() |
Definition at line 267 of file account_object.hpp.
account_id_type graphene::chain::account_object::referrer |
The account credited as referring this account. Receives a percentage of referral rewards.
Definition at line 196 of file account_object.hpp.
uint16_t graphene::chain::account_object::referrer_rewards_percentage = 0 |
Percentage of referral rewards (leftover fee after paying network and lifetime referrer) which should go to referrer. The remainder of referral rewards goes to the registrar.
Definition at line 206 of file account_object.hpp.
account_id_type graphene::chain::account_object::registrar |
The account that paid the fee to register this account. Receives a percentage of referral rewards.
Definition at line 194 of file account_object.hpp.
account_statistics_id_type graphene::chain::account_object::statistics |
The reference implementation records the account's statistics in a separate object. This field contains the ID of that object.
Definition at line 229 of file account_object.hpp.
|
static |
Definition at line 276 of file account_object.hpp.
uint8_t graphene::chain::account_object::top_n_control_flags = 0 |
This flag is set when the top_n logic sets both authorities, and gets reset when authority or special_authority is set.
Definition at line 274 of file account_object.hpp.
|
static |
Definition at line 275 of file account_object.hpp.
set<account_id_type> graphene::chain::account_object::whitelisted_accounts |
Optionally track all of the accounts this account has whitelisted or blacklisted, these should be made Immutable so that when the account object is cloned no deep copy is required. This state is tracked for GUI display purposes.
TODO: move white list tracking to its own multi-index container rather than having 4 fields on an account. This will scale better because under the current design if you whitelist 2000 accounts, then every time someone fetches this account object they will get the full list of 2000 accounts.
Definition at line 249 of file account_object.hpp.
flat_set<account_id_type> graphene::chain::account_object::whitelisting_accounts |
This is a set of all accounts which have 'whitelisted' this account. Whitelisting is only used in core validation for the purpose of authorizing accounts to hold and transact in whitelisted assets. This account cannot update this set, except by transferring ownership of the account, which will clear it. Other accounts may add or remove their IDs from this set.
Definition at line 237 of file account_object.hpp.