BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
29 #include <graphene/chain/hardfork.hpp>
32 namespace graphene {
namespace chain {
77 "Asset ${a} '${sym}' has transfer_restricted flag enabled",
78 (
"a", _asset.
id)(
"sym", _asset.
symbol) );
83 "Account ${acct} '${name}' is unauthorized to transact asset ${a} '${sym}' due to whitelist / blacklist",
84 (
"acct", to.
id)(
"name", to.
name)(
"a", _asset.
id)(
"sym", _asset.
symbol) );
89 "Account ${acct} '${name}' is unauthorized to withdraw asset ${a} '${sym}' due to whitelist / blacklist",
90 (
"acct", from.
id)(
"name", from.
name)(
"a", _asset.
id)(
"sym", _asset.
symbol) );
138 p.period_start_time = op.period_start_time;
139 p.expiration = op.period_start_time + op.periods_until_expiration * op.withdrawal_period_sec;
140 p.withdrawal_limit = op.withdrawal_limit;
141 p.withdrawal_period_sec = op.withdrawal_period_sec;
uint32_t withdrawal_period_sec
Length of the withdrawal period in seconds.
#define FC_CAPTURE_AND_RETHROW(...)
Update an existing withdraw permission.
tracks the blockchain state in an extensible manner
uint32_t periods_until_expiration
The number of withdrawal periods this permission is valid for.
account_id_type withdraw_from_account
Must match withdraw_permission->withdraw_from_account.
void_result do_apply(const operation_type &op) const
uint32_t withdrawal_period_sec
The duration of a withdrawal period in seconds.
time_point_sec head_block_time() const
share_type claimed_this_period
void_result do_apply(const operation_type &op) const
const T & get(const object_id_type &id) const
asset get_balance(account_id_type owner, asset_id_type asset_id) const
Retrieve a particular account's balance in a given asset.
asset available_this_period(fc::time_point_sec current_time) const
void_result do_evaluate(const operation_type &op) const
asset amount_to_withdraw
Amount to withdraw. Must not exceed withdraw_permission->withdrawal_limit.
object_id_type do_apply(const operation_type &op) const
time_point_sec period_start_time
void_result do_evaluate(const operation_type &op) const
chain_parameters parameters
account_id_type withdraw_from_account
Must match withdrawal_permission->withdraw_from_account. This account pays the fee.
tracks the parameters of an asset
const T & create(F &&constructor)
void adjust_balance(account_id_type account, asset delta)
Adjust a particular account's balance in a given asset by a delta.
bool is_transfer_restricted() const
withdraw_permission_id_type withdraw_permission
ID of the permission authorizing this withdrawal.
string symbol
Ticker symbol for this asset, i.e. "USD".
account_id_type authorized_account
The account previously authorized to make withdrawals. Must match withdrawal_permission->authorized_a...
const T * find(const object_id_type &id) const
account_id_type withdraw_to_account
Must match withdraw_permision->authorized_account.
Withdraw from an account which has published a withdrawal permission.
account_id_type authorized_account
The account authorized to make withdrawals. Must match permission_to_update->authorized_account.
void_result do_evaluate(const operation_type &op) const
Create a new withdrawal permission.
account_id_type authorized_account
The account authorized to make withdrawals from withdraw_from_account.
This class represents an account on the object graph.
account_id_type authorized_account
The account authorized to make withdrawals from withdraw_from_account.
void_result do_evaluate(const operation_type &op) const
asset withdrawal_limit
New maximum amount the withdrawer is allowed to charge per withdrawal period.
withdraw_permission_id_type withdrawal_permission
ID of the permission to be revoked.
bool is_authorized_asset(const database &d, const account_object &acct, const asset_object &asset_obj)
Delete an existing withdrawal permission.
time_point_sec expiration
The time at which this withdraw permission expires.
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
string name
The account's name. This name must be unique among all account names on the graph....
account_id_type issuer
ID of the account which issued this asset.
uint32_t periods_until_expiration
The new number of withdrawal periods for which this permission will be valid.
uint32_t withdrawal_period_sec
New length of the period between withdrawals.
time_point_sec period_start_time
New beginning of the next withdrawal period; must be in the future.
withdraw_permission_id_type permission_to_update
ID of the permission which is being updated.
Grants another account authority to withdraw a limited amount of funds per interval.
account_id_type withdraw_from_account
The account authorizing authorized_account to withdraw from it.
const global_property_object & get_global_properties() const
void remove(const object &obj)
void_result do_apply(const operation_type &op) const
account_id_type withdraw_from_account
This account pays the fee. Must match permission_to_update->withdraw_from_account.
time_point_sec period_start_time
Time at which the first withdrawal period begins; must be in the future.
asset withdrawal_limit
The maximum amount authorized_account is allowed to withdraw in a given withdrawal period.
void modify(const T &obj, const Lambda &m)
uint8_t block_interval
interval in seconds between blocks
account_id_type withdraw_from_account
The account authorizing withdrawals from its balances.