-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asset update issuer operation #599
Changes from all commits
0192a02
75ece83
4e9f6e9
05bd614
08b1e40
29a3f68
ff4a35b
f5c2e0a
4a91978
2cfef3e
53bb08b
76de8f4
d2f67c3
8e49b2c
e2be061
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// bitshares-core #199 Require owner key for change of asset-issuer (new operation) | ||
#ifndef HARDFORK_CORE_199_TIME | ||
#define HARDFORK_CORE_199_TIME (fc::time_point_sec( 1600000000 )) | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -442,6 +442,39 @@ namespace graphene { namespace chain { | |
void validate()const; | ||
}; | ||
|
||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is redundant. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shit, it seems I must be much much more careful when merging to resolve conflicts. On it .. |
||
* @brief Update issuer of an asset | ||
* @ingroup operations | ||
* | ||
* An issuer has general administrative power of an asset and in some cases | ||
* also its shares issued to individuals. Thus, changing the issuer today | ||
* requires the use of a separate operation that needs to be signed by the | ||
* owner authority. | ||
* | ||
*/ | ||
struct asset_update_issuer_operation : public base_operation | ||
{ | ||
struct fee_parameters_type { | ||
uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; | ||
}; | ||
|
||
asset fee; | ||
account_id_type issuer; | ||
asset_id_type asset_to_update; | ||
account_id_type new_issuer; | ||
extensions_type extensions; | ||
|
||
account_id_type fee_payer()const { return issuer; } | ||
void validate()const; | ||
|
||
void get_required_owner_authorities( flat_set<account_id_type>& a )const | ||
{ a.insert( issuer ); } | ||
|
||
void get_required_active_authorities( flat_set<account_id_type>& a )const | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this can be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can (IMHO) remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, not a big deal if keep it. |
||
{ } | ||
|
||
}; | ||
|
||
/** | ||
* @brief Transfers BTS from the fee pool of a specified asset back to the issuer's balance | ||
|
||
|
@@ -471,7 +504,6 @@ namespace graphene { namespace chain { | |
void validate()const; | ||
}; | ||
|
||
|
||
} } // graphene::chain | ||
|
||
FC_REFLECT( graphene::chain::asset_claim_fees_operation, (fee)(issuer)(amount_to_claim)(extensions) ) | ||
|
@@ -510,6 +542,7 @@ FC_REFLECT( graphene::chain::asset_settle_operation::fee_parameters_type, (fee) | |
FC_REFLECT( graphene::chain::asset_settle_cancel_operation::fee_parameters_type, ) | ||
FC_REFLECT( graphene::chain::asset_fund_fee_pool_operation::fee_parameters_type, (fee) ) | ||
FC_REFLECT( graphene::chain::asset_update_operation::fee_parameters_type, (fee)(price_per_kbyte) ) | ||
FC_REFLECT( graphene::chain::asset_update_issuer_operation::fee_parameters_type, (fee) ) | ||
FC_REFLECT( graphene::chain::asset_update_bitasset_operation::fee_parameters_type, (fee) ) | ||
FC_REFLECT( graphene::chain::asset_update_feed_producers_operation::fee_parameters_type, (fee) ) | ||
FC_REFLECT( graphene::chain::asset_publish_feed_operation::fee_parameters_type, (fee) ) | ||
|
@@ -535,6 +568,13 @@ FC_REFLECT( graphene::chain::asset_update_operation, | |
(new_options) | ||
(extensions) | ||
) | ||
FC_REFLECT( graphene::chain::asset_update_issuer_operation, | ||
(fee) | ||
(issuer) | ||
(asset_to_update) | ||
(new_issuer) | ||
(extensions) | ||
) | ||
FC_REFLECT( graphene::chain::asset_update_bitasset_operation, | ||
(fee) | ||
(issuer) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the
static
for?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That avoids exposing the symbol outside the compilation unit.