BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
28 namespace graphene {
namespace protocol {
66 const size_t len = name.size();
81 size_t end = name.find_first_of(
'.', begin );
82 if( end == std::string::npos )
90 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
91 case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
92 case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
100 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
101 case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
102 case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
104 case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
110 for(
size_t i=begin+1; i<end-1; i++ )
114 case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
case 'f':
case 'g':
case 'h':
115 case 'i':
case 'j':
case 'k':
case 'l':
case 'm':
case 'n':
case 'o':
case 'p':
116 case 'q':
case 'r':
case 's':
case 't':
case 'u':
case 'v':
case 'w':
case 'x':
118 case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
138 if( c >=
'0' && c <=
'9' )
return true;
139 if( c ==
'.' || c ==
'-' || c ==
'/' )
return true;
169 FC_ASSERT( needed_witnesses == 0 && needed_committee == 0,
170 "May not specify fewer witnesses or committee members than the number voted for.");
182 core_fee_required += data_fee;
184 return core_fee_required;
199 if(
extensions.value.owner_special_authority.valid() )
201 if(
extensions.value.active_special_authority.valid() )
203 if(
extensions.value.buyback_options.valid() )
209 size_t n_markets =
extensions.value.buyback_options->markets.size();
211 for(
const asset_id_type& m :
extensions.value.buyback_options->markets )
220 auto core_fee_required = k.
fee;
223 return core_fee_required;
236 ||
extensions.value.owner_special_authority.valid()
237 ||
extensions.value.active_special_authority.valid()
246 FC_ASSERT( !
owner->is_impossible(),
"cannot update an account with an impossible owner authority threshold" );
252 FC_ASSERT( !
active->is_impossible(),
"cannot update an account with an impossible active authority threshold" );
257 if(
extensions.value.owner_special_authority.valid() )
259 if(
extensions.value.active_special_authority.valid() )
#define FC_CAPTURE_AND_RETHROW(...)
optional< authority > active
New active authority. This can be updated by the current active authority.
flat_map< address, weight_type > address_auths
void validate_special_authority(const special_authority &auth)
uint64_t premium_fee
the cost to register the cheapest non-free account
share_type calculate_fee(const fee_params_t &k) const
uint64_t basic_fee
the cost to register the cheapest non-free account
#define GRAPHENE_TEMP_ACCOUNT
Represents the canonical account with WILDCARD authority (anybody can access funds in temp account)
#define GRAPHENE_MIN_ACCOUNT_NAME_LENGTH
extension< ext > extensions
These are the fields which can be updated by the active authority.
An ID for some votable object.
#define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION(type)
transfers the account to another account while clearing the white list
Update an existing account.
optional< authority > owner
New owner authority. If set, this operation requires owner authority to execute.
static uint64_t calculate_data_fee(uint64_t bytes, uint64_t price_per_kbyte)
optional< account_options > new_options
New account options.
flat_set< vote_id_type > votes
bool upgrade_to_lifetime_member
If true, the account will be upgraded to a lifetime member; otherwise, it will add a year to the subs...
size_t pack_size(const T &v)
static authority null_authority()
bool is_impossible() const
uint32_t num_auths() const
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
extension< ext > extensions
uint64_t membership_lifetime_fee
the cost to upgrade to a lifetime member
#define GRAPHENE_MAX_ACCOUNT_NAME_LENGTH
bool is_cheap_name(const string &n)
account_id_type account
The account to update.
Manage an account's membership status.
This operation is used to whitelist and blacklist accounts, primarily for transacting in whitelisted ...
uint16_t referrer_percent
share_type calculate_fee(const fee_params_t &k) const
uint64_t membership_annual_fee
bool is_valid_name(const string &name)
share_type calculate_fee(const fee_params_t &) const
#define GRAPHENE_100_PERCENT