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

The asset_options struct contains options available on all assets in the network. More...

#include <asset_ops.hpp>

Public Member Functions

uint16_t get_enabled_issuer_permissions_mask () const
 
void validate () const
 
void validate_flags (bool is_market_issued, bool allow_disable_collateral_bid=true) const
 

Public Attributes

share_type max_supply = GRAPHENE_MAX_SHARE_SUPPLY
 
uint16_t market_fee_percent = 0
 
share_type max_market_fee = GRAPHENE_MAX_SHARE_SUPPLY
 Market fees calculated as market_fee_percent of the traded volume are capped to this value. More...
 
uint16_t issuer_permissions = DEFAULT_UIA_ASSET_ISSUER_PERMISSION
 The flags which the issuer has permission to update. See asset_issuer_permission_flags. More...
 
uint16_t flags = 0
 The currently active flags on this permission. See asset_issuer_permission_flags. More...
 
price core_exchange_rate = price(asset(), asset(0, asset_id_type(1)))
 
flat_set< account_id_type > whitelist_authorities
 
flat_set< account_id_type > blacklist_authorities
 
flat_set< asset_id_type > whitelist_markets
 
flat_set< asset_id_type > blacklist_markets
 
string description
 
additional_asset_options_t extensions
 

Detailed Description

The asset_options struct contains options available on all assets in the network.

Note
Changes to this struct will break protocol compatibility

Definition at line 47 of file asset_ops.hpp.

Member Function Documentation

◆ get_enabled_issuer_permissions_mask()

uint16_t graphene::protocol::asset_options::get_enabled_issuer_permissions_mask ( ) const
Returns
the bits in flags which are allowed to be updated according to data in issuer_permissions

Definition at line 336 of file asset_ops.cpp.

◆ validate()

void graphene::protocol::asset_options::validate ( ) const

Perform internal consistency checks.

Exceptions
fc::exceptionif any check fails

Definition at line 273 of file asset_ops.cpp.

◆ validate_flags()

void graphene::protocol::asset_options::validate_flags ( bool  is_market_issued,
bool  allow_disable_collateral_bid = true 
) const

Perform checks about flags.

Exceptions
fc::exceptionif any check fails

Definition at line 312 of file asset_ops.cpp.

Member Data Documentation

◆ blacklist_authorities

flat_set<account_id_type> graphene::protocol::asset_options::blacklist_authorities

A set of accounts which maintain blacklists to consult for this asset. If flags & white_list is set, an account may only send, receive, trade, etc. in this asset if none of these accounts appears in its account_object::blacklisting_accounts field. If the account is blacklisted, it may not transact in this asset even if it is also whitelisted.

Definition at line 81 of file asset_ops.hpp.

◆ blacklist_markets

flat_set<asset_id_type> graphene::protocol::asset_options::blacklist_markets

defines the assets that this asset may not be traded against in the market, must not overlap whitelist

Definition at line 86 of file asset_ops.hpp.

◆ core_exchange_rate

price graphene::protocol::asset_options::core_exchange_rate = price(asset(), asset(0, asset_id_type(1)))

When a non-core asset is used to pay a fee, the blockchain must convert that asset to core asset in order to accept the fee. If this asset's fee pool is funded, the chain will automatically deposite fees in this asset to its accumulated fees, and withdraw from the fee pool the same amount as converted at the core exchange rate.

Definition at line 72 of file asset_ops.hpp.

◆ description

string graphene::protocol::asset_options::description

data that describes the meaning/purpose of this asset, fee will be charged proportional to size of description.

Definition at line 92 of file asset_ops.hpp.

◆ extensions

additional_asset_options_t graphene::protocol::asset_options::extensions

Definition at line 93 of file asset_ops.hpp.

◆ flags

uint16_t graphene::protocol::asset_options::flags = 0

The currently active flags on this permission. See asset_issuer_permission_flags.

Definition at line 63 of file asset_ops.hpp.

◆ issuer_permissions

uint16_t graphene::protocol::asset_options::issuer_permissions = DEFAULT_UIA_ASSET_ISSUER_PERMISSION

The flags which the issuer has permission to update. See asset_issuer_permission_flags.

Definition at line 61 of file asset_ops.hpp.

◆ market_fee_percent

uint16_t graphene::protocol::asset_options::market_fee_percent = 0

When this asset is traded on the markets, this percentage of the total traded will be exacted and paid to the issuer. This is a fixed point value, representing hundredths of a percent, i.e. a value of 100 in this field means a 1% fee is charged on market trades of this asset.

Definition at line 56 of file asset_ops.hpp.

◆ max_market_fee

share_type graphene::protocol::asset_options::max_market_fee = GRAPHENE_MAX_SHARE_SUPPLY

Market fees calculated as market_fee_percent of the traded volume are capped to this value.

Definition at line 58 of file asset_ops.hpp.

◆ max_supply

share_type graphene::protocol::asset_options::max_supply = GRAPHENE_MAX_SHARE_SUPPLY

The maximum supply of this asset which may exist at any given time. This can be as large as GRAPHENE_MAX_SHARE_SUPPLY

Definition at line 50 of file asset_ops.hpp.

◆ whitelist_authorities

flat_set<account_id_type> graphene::protocol::asset_options::whitelist_authorities

A set of accounts which maintain whitelists to consult for this asset. If whitelist_authorities is non-empty, then only accounts in whitelist_authorities are allowed to hold, use, or transfer the asset.

Definition at line 76 of file asset_ops.hpp.

◆ whitelist_markets

flat_set<asset_id_type> graphene::protocol::asset_options::whitelist_markets

defines the assets that this asset may be traded against in the market

Definition at line 84 of file asset_ops.hpp.


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