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;
193 FC_ASSERT( owner.address_auths.size() == 0 );
195 FC_ASSERT( active.address_auths.size() == 0 );
196 FC_ASSERT( !owner.is_impossible(),
"cannot create an account with an impossible owner authority threshold" );
197 FC_ASSERT( !active.is_impossible(),
"cannot create an account with an impossible active authority threshold" );
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;
230 FC_ASSERT( account != account_id_type() );
235 || new_options.valid()
236 ||
extensions.value.owner_special_authority.valid()
237 ||
extensions.value.active_special_authority.valid()
245 FC_ASSERT( owner->address_auths.size() == 0 );
246 FC_ASSERT( !owner->is_impossible(),
"cannot update an account with an impossible owner authority threshold" );
251 FC_ASSERT( active->address_auths.size() == 0 );
252 FC_ASSERT( !active->is_impossible(),
"cannot update an account with an impossible active authority threshold" );
256 new_options->validate();
257 if(
extensions.value.owner_special_authority.valid() )
259 if(
extensions.value.active_special_authority.valid() )
265 if( upgrade_to_lifetime_member )
uint64_t membership_lifetime_fee
the cost to upgrade to a lifetime member
#define GRAPHENE_TEMP_ACCOUNT
Represents the canonical account with WILDCARD authority (anybody can access funds in temp account) ...
#define GRAPHENE_MAX_ACCOUNT_NAME_LENGTH
uint64_t premium_fee
the cost to register the cheapest non-free account
Manage an account's membership statusThis operation is used to upgrade an account to a member...
void validate_special_authority(const special_authority &auth)
share_type calculate_fee(const fee_parameters_type &k) const
bool is_cheap_name(const string &n)
Update an existing account.
#define GRAPHENE_MIN_ACCOUNT_NAME_LENGTH
static authority null_authority()
share_type calculate_fee(const fee_parameters_type &k) const
size_t pack_size(const T &v)
These are the fields which can be updated by the active authority.
flat_set< vote_id_type > votes
#define GRAPHENE_100_PERCENT
#define FC_CAPTURE_AND_RETHROW(...)
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
#define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION(type)
extensions_type extensions
share_type calculate_fee(const fee_parameters_type &) const
An ID for some votable object.
uint64_t basic_fee
the cost to register the cheapest non-free account
bool is_valid_name(const string &name)
This operation is used to whitelist and blacklist accounts, primarily for transacting in whitelisted ...
uint64_t membership_annual_fee
transfers the account to another account while clearing the white listIn theory an account can be tra...