BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
asset_ops.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 #pragma once
28 
29 namespace graphene { namespace protocol {
30 
32  {
35  // After BSIP81 activation, taker_fee_percent is the taker fee
37  };
39 
40  bool is_valid_symbol( const string& symbol );
41 
47  struct asset_options {
54  // BSIP81: Asset owners may specify different market fee rate for maker orders and taker orders
55  // After BSIP81 activation, market_fee_percent is the maker fee
56  uint16_t market_fee_percent = 0;
59 
61  uint16_t issuer_permissions = DEFAULT_UIA_ASSET_ISSUER_PERMISSION;
63  uint16_t flags = 0;
64 
66  uint16_t get_enabled_issuer_permissions_mask() const;
67 
72  price core_exchange_rate = price(asset(), asset(0, asset_id_type(1)));
73 
76  flat_set<account_id_type> whitelist_authorities;
81  flat_set<account_id_type> blacklist_authorities;
82 
84  flat_set<asset_id_type> whitelist_markets;
86  flat_set<asset_id_type> blacklist_markets;
87 
92  string description;
94 
97  void validate()const;
98 
101  void validate_flags( bool is_market_issued, bool allow_disable_collateral_bid = true )const;
102  };
103 
110 
113  {
117  global_settlement = 0,
123  no_settlement = 1,
136  BSRM_TYPE_COUNT = 4
137  };
138 
139  struct ext
140  {
151  // https://github.com/bitshares/bitshares-core/issues/2467
153  };
154 
158  uint8_t minimum_feeds = 1;
171  asset_id_type short_backing_asset;
172 
174 
177  void validate()const;
178 
181  {
182  if( !extensions.value.black_swan_response_method.valid() )
184  return static_cast<black_swan_response_type>( *extensions.value.black_swan_response_method );
185  }
186  };
187 
188 
193  {
194  struct fee_params_t {
198  uint32_t price_per_kbyte = 10;
199  };
200 
203  account_id_type issuer;
205  string symbol;
207  uint8_t precision = 0;
208 
219  bool is_prediction_market = false;
221 
222  account_id_type fee_payer()const { return issuer; }
223  void validate()const;
224  share_type calculate_fee( const fee_params_t& k,
225  const optional<uint64_t>& sub_asset_creation_fee )const;
226  };
227 
239  {
240  struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; };
241 
243  account_id_type issuer;
244  asset_id_type asset_to_settle;
247 
248  account_id_type fee_payer()const { return issuer; }
249  void validate()const;
250  };
251 
268  {
269  struct fee_params_t {
277  };
278 
281  account_id_type account;
285 
286  account_id_type fee_payer()const { return account; }
287  void validate()const;
288  };
289 
294  {
295  struct fee_params_t { };
296 
297  asset_settle_cancel_operation() = default;
298  asset_settle_cancel_operation( const force_settlement_id_type& fsid, const account_id_type& aid,
299  const asset& a ) : settlement(fsid), account(aid), amount(a) {}
300 
302  force_settlement_id_type settlement;
304  account_id_type account;
307 
308  account_id_type fee_payer()const { return account; }
309  /***
310  * This is a virtual operation and should never be placed in a block
311  * (i.e. in a proposal)
312  */
313  void validate() const { FC_ASSERT( !"Virtual operation"); }
314 
316  { return 0; }
317  };
318 
323  {
325 
327  account_id_type from_account;
328  asset_id_type asset_id;
331 
332  account_id_type fee_payer()const { return from_account; }
333  void validate()const;
334  };
335 
352  {
353  struct ext
354  {
361  };
362 
363  struct fee_params_t {
365  uint32_t price_per_kbyte = 10;
366  };
367 
369 
371  account_id_type issuer;
372  asset_id_type asset_to_update;
373 
378 
379  account_id_type fee_payer()const { return issuer; }
380  void validate()const;
381  share_type calculate_fee(const fee_params_t& k)const;
382  };
383 
399  {
400  struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; };
401 
403  account_id_type issuer;
404  asset_id_type asset_to_update;
405 
408 
409  account_id_type fee_payer()const { return issuer; }
410  void validate()const;
411  };
412 
431  {
432  struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; };
433 
435  account_id_type issuer;
436  asset_id_type asset_to_update;
437 
438  flat_set<account_id_type> new_feed_producers;
440 
441  account_id_type fee_payer()const { return issuer; }
442  void validate()const;
443  };
444 
463  {
464  struct ext
465  {
468  };
469 
471 
473  account_id_type publisher;
474  asset_id_type asset_id;
477 
478  account_id_type fee_payer()const { return publisher; }
479  void validate()const;
480  };
481 
486  {
487  struct fee_params_t {
490  };
491 
493  account_id_type issuer;
495  account_id_type issue_to_account;
496 
497 
501 
502  account_id_type fee_payer()const { return issuer; }
503  void validate()const;
504  share_type calculate_fee(const fee_params_t& k)const;
505  };
506 
514  {
515  struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; };
516 
518  account_id_type payer;
521 
522  account_id_type fee_payer()const { return payer; }
523  void validate()const;
524  };
525 
530  {
531  struct fee_params_t {
533  };
534 
536  {
543  };
544 
546  account_id_type issuer;
548 
550 
551  account_id_type fee_payer()const { return issuer; }
552  void validate()const;
553  };
554 
566  {
567  struct fee_params_t {
569  };
570 
572  account_id_type issuer;
573  asset_id_type asset_to_update;
574  account_id_type new_issuer;
576 
577  account_id_type fee_payer()const { return issuer; }
578  void validate()const;
579 
580  void get_required_owner_authorities( flat_set<account_id_type>& a )const
581  { a.insert( issuer ); }
582 
583  void get_required_active_authorities( flat_set<account_id_type>& a )const
584  { }
585 
586  };
587 
602  {
603  struct fee_params_t {
605  };
606 
608  account_id_type issuer;
609  asset_id_type asset_id;
612 
613  account_id_type fee_payer()const { return issuer; }
614  void validate()const;
615  };
616 
617 } } // graphene::protocol
618 
619 FC_REFLECT( graphene::protocol::asset_claim_fees_operation, (fee)(issuer)(amount_to_claim)(extensions) )
622 
623 FC_REFLECT( graphene::protocol::asset_claim_pool_operation, (fee)(issuer)(asset_id)(amount_to_claim)(extensions) )
625 
627  (max_supply)
628  (market_fee_percent)
629  (max_market_fee)
630  (issuer_permissions)
631  (flags)
632  (core_exchange_rate)
633  (whitelist_authorities)
634  (blacklist_authorities)
635  (whitelist_markets)
636  (blacklist_markets)
637  (description)
638  (extensions)
639  )
640 
642  (initial_collateral_ratio)
643  (maintenance_collateral_ratio)
644  (maximum_short_squeeze_ratio)
645  (margin_call_fee_ratio)
646  (force_settle_fee_percent)
647  (black_swan_response_method)
648  )
649 
651  (feed_lifetime_sec)
652  (minimum_feeds)
653  (force_settlement_delay_sec)
654  (force_settlement_offset_percent)
655  (maximum_force_settlement_volume)
656  (short_backing_asset)
657  (extensions)
658  )
659 
661  (reward_percent)(whitelist_market_fee_sharing)(taker_fee_percent) )
662 
663 FC_REFLECT( graphene::protocol::asset_update_operation::ext, (new_precision)(skip_core_exchange_rate) )
665 
667  (symbol3)(symbol4)(long_symbol)(price_per_kbyte) )
668 
672 FC_REFLECT( graphene::protocol::asset_fund_fee_pool_operation::fee_params_t, (fee) )
673 FC_REFLECT( graphene::protocol::asset_update_operation::fee_params_t, (fee)(price_per_kbyte) )
674 FC_REFLECT( graphene::protocol::asset_update_issuer_operation::fee_params_t, (fee) )
675 FC_REFLECT( graphene::protocol::asset_update_bitasset_operation::fee_params_t, (fee) )
676 FC_REFLECT( graphene::protocol::asset_update_feed_producers_operation::fee_params_t, (fee) )
677 FC_REFLECT( graphene::protocol::asset_publish_feed_operation::fee_params_t, (fee) )
678 FC_REFLECT( graphene::protocol::asset_issue_operation::fee_params_t, (fee)(price_per_kbyte) )
679 FC_REFLECT( graphene::protocol::asset_reserve_operation::fee_params_t, (fee) )
680 
681 
682 FC_REFLECT( graphene::protocol::asset_create_operation,
683  (fee)
684  (issuer)
685  (symbol)
686  (precision)
687  (common_options)
688  (bitasset_opts)
689  (is_prediction_market)
690  (extensions)
691  )
692 FC_REFLECT( graphene::protocol::asset_update_operation,
693  (fee)
694  (issuer)
695  (asset_to_update)
696  (new_issuer)
697  (new_options)
698  (extensions)
699  )
700 FC_REFLECT( graphene::protocol::asset_update_issuer_operation,
701  (fee)
702  (issuer)
703  (asset_to_update)
704  (new_issuer)
705  (extensions)
706  )
707 FC_REFLECT( graphene::protocol::asset_update_bitasset_operation,
708  (fee)
709  (issuer)
710  (asset_to_update)
711  (new_options)
712  (extensions)
713  )
714 FC_REFLECT( graphene::protocol::asset_update_feed_producers_operation,
715  (fee)(issuer)(asset_to_update)(new_feed_producers)(extensions)
716  )
717 FC_REFLECT( graphene::protocol::asset_publish_feed_operation,
718  (fee)(publisher)(asset_id)(feed)(extensions) )
719 FC_REFLECT( graphene::protocol::asset_settle_operation, (fee)(account)(amount)(extensions) )
720 FC_REFLECT( graphene::protocol::asset_settle_cancel_operation, (fee)(settlement)(account)(amount) )
721 FC_REFLECT( graphene::protocol::asset_global_settle_operation,
722  (fee)(issuer)(asset_to_settle)(settle_price)(extensions) )
723 FC_REFLECT( graphene::protocol::asset_issue_operation,
724  (fee)(issuer)(asset_to_issue)(issue_to_account)(memo)(extensions) )
725 FC_REFLECT( graphene::protocol::asset_reserve_operation,
726  (fee)(payer)(amount_to_reserve)(extensions) )
727 
728 FC_REFLECT( graphene::protocol::asset_fund_fee_pool_operation, (fee)(from_account)(asset_id)(amount)(extensions) )
729 
730 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_options )
731 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::bitasset_options::ext )
732 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::bitasset_options )
733 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::additional_asset_options )
734 
735 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::ext )
736 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::ext )
737 
738 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation::fee_params_t )
739 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation::fee_params_t )
740 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_operation::fee_params_t )
741 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_fund_fee_pool_operation::fee_params_t )
742 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_pool_operation::fee_params_t )
743 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::fee_params_t )
744 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::additional_options_type )
745 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::fee_params_t )
746 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_issuer_operation::fee_params_t )
747 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_bitasset_operation::fee_params_t )
749  graphene::protocol::asset_update_feed_producers_operation::fee_params_t )
750 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::fee_params_t )
751 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_issue_operation::fee_params_t )
752 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_reserve_operation::fee_params_t )
753 
754 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation )
755 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation )
756 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_operation )
757 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_cancel_operation )
758 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_fund_fee_pool_operation )
759 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_pool_operation )
760 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation )
761 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation )
762 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_issuer_operation )
763 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_bitasset_operation )
764 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_feed_producers_operation )
765 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation )
766 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_issue_operation )
767 GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_reserve_operation )
GRAPHENE_MAX_SHARE_SUPPLY
constexpr int64_t GRAPHENE_MAX_SHARE_SUPPLY(1000000000000000LL)
graphene::protocol::asset_issue_operation::fee
asset fee
Definition: asset_ops.hpp:492
graphene::protocol::asset_create_operation::issuer
account_id_type issuer
This account must sign and pay the fee for this operation. Later, this account may update the asset.
Definition: asset_ops.hpp:203
graphene::protocol::asset_claim_pool_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:613
graphene::protocol::asset_reserve_operation::validate
void validate() const
Definition: asset_ops.cpp:192
graphene::protocol::bitasset_options::black_swan_response_type::global_settlement
@ global_settlement
graphene::protocol::extension< additional_asset_options >
graphene::protocol::asset_settle_cancel_operation::asset_settle_cancel_operation
asset_settle_cancel_operation(const force_settlement_id_type &fsid, const account_id_type &aid, const asset &a)
Definition: asset_ops.hpp:298
graphene::protocol::asset_settle_cancel_operation::amount
asset amount
Amount of asset to force settle. This must be a market-issued asset.
Definition: asset_ops.hpp:306
graphene::protocol::asset_update_issuer_operation::issuer
account_id_type issuer
Definition: asset_ops.hpp:572
graphene::protocol::asset_update_bitasset_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:400
graphene::protocol::asset_settle_cancel_operation::fee
asset fee
Definition: asset_ops.hpp:301
graphene::protocol::asset_issue_operation::fee_params_t::price_per_kbyte
uint32_t price_per_kbyte
Definition: asset_ops.hpp:489
graphene::protocol::asset_claim_pool_operation::validate
void validate() const
Definition: asset_ops.cpp:349
graphene::protocol::asset_update_operation::calculate_fee
share_type calculate_fee(const fee_params_t &k) const
Definition: asset_ops.cpp:160
graphene::protocol::asset_issue_operation::memo
optional< memo_data > memo
Definition: asset_ops.hpp:499
graphene::protocol::asset_create_operation::fee_params_t::long_symbol
uint64_t long_symbol
Definition: asset_ops.hpp:197
graphene::protocol::asset_reserve_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:522
graphene::protocol::price
The price struct stores asset prices in the BitShares system.
Definition: asset.hpp:108
graphene::protocol::asset_create_operation::fee_params_t
Definition: asset_ops.hpp:194
graphene::protocol::asset_settle_cancel_operation::account
account_id_type account
Account requesting the force settlement. This account pays the fee.
Definition: asset_ops.hpp:304
graphene::protocol::bitasset_options::maximum_force_settlement_volume
uint16_t maximum_force_settlement_volume
Definition: asset_ops.hpp:168
graphene::protocol::bitasset_options::black_swan_response_type
black_swan_response_type
Defines how a BitAsset would respond to black swan events.
Definition: asset_ops.hpp:112
graphene::protocol::asset_settle_cancel_operation::settlement
force_settlement_id_type settlement
Definition: asset_ops.hpp:302
graphene::protocol::asset_issue_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:488
graphene::protocol::asset_options::market_fee_percent
uint16_t market_fee_percent
Definition: asset_ops.hpp:56
graphene::protocol::bitasset_options::get_black_swan_response_method
black_swan_response_type get_black_swan_response_method() const
Get the effective black swan response method.
Definition: asset_ops.hpp:180
graphene::protocol::asset_options::whitelist_authorities
flat_set< account_id_type > whitelist_authorities
Definition: asset_ops.hpp:76
graphene::protocol::asset_claim_fees_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:551
graphene::protocol::asset_publish_feed_operation::fee
asset fee
paid for by publisher
Definition: asset_ops.hpp:472
graphene::protocol::asset_global_settle_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:248
graphene::protocol::bitasset_options::black_swan_response_type::individual_settlement_to_order
@ individual_settlement_to_order
graphene::protocol::asset_claim_fees_operation
used to transfer accumulated fees back to the issuer's balance.
Definition: asset_ops.hpp:529
graphene::protocol::asset_create_operation::is_prediction_market
bool is_prediction_market
For BitAssets, set this to true if the asset implements a prediction market; false otherwise.
Definition: asset_ops.hpp:219
graphene::protocol::asset_settle_cancel_operation::calculate_fee
share_type calculate_fee(const fee_params_t &params) const
Definition: asset_ops.hpp:315
graphene::protocol::asset_publish_feed_operation::ext::initial_collateral_ratio
fc::optional< uint16_t > initial_collateral_ratio
After BSIP77, price feed producers can feed ICR too.
Definition: asset_ops.hpp:467
graphene::protocol::asset_claim_fees_operation::amount_to_claim
asset amount_to_claim
Definition: asset_ops.hpp:547
graphene::protocol::asset_settle_operation::fee
asset fee
Definition: asset_ops.hpp:279
graphene::protocol::asset_update_issuer_operation::asset_to_update
asset_id_type asset_to_update
Definition: asset_ops.hpp:573
graphene::protocol::asset_claim_fees_operation::fee_params_t
Definition: asset_ops.hpp:531
graphene::protocol::asset_create_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:220
graphene::protocol::asset_reserve_operation::payer
account_id_type payer
Definition: asset_ops.hpp:518
graphene::protocol::asset_reserve_operation::fee_params_t
Definition: asset_ops.hpp:515
graphene::protocol::asset_options::core_exchange_rate
price core_exchange_rate
Definition: asset_ops.hpp:72
graphene::protocol::asset_update_feed_producers_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:439
graphene::protocol::asset_create_operation::bitasset_opts
optional< bitasset_options > bitasset_opts
Options only available for BitAssets. MUST be non-null if and only if the asset is market-issued.
Definition: asset_ops.hpp:217
graphene::protocol::asset_claim_fees_operation::validate
void validate() const
Definition: asset_ops.cpp:342
graphene::protocol::asset_update_issuer_operation
Update issuer of an asset.
Definition: asset_ops.hpp:565
graphene::protocol::asset_options::whitelist_markets
flat_set< asset_id_type > whitelist_markets
Definition: asset_ops.hpp:84
graphene::protocol::bitasset_options::feed_lifetime_sec
uint32_t feed_lifetime_sec
Time before a price feed expires.
Definition: asset_ops.hpp:156
graphene::protocol::asset_options::blacklist_authorities
flat_set< account_id_type > blacklist_authorities
Definition: asset_ops.hpp:81
graphene::protocol::asset_global_settle_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:240
graphene::protocol::asset_fund_fee_pool_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:332
graphene::protocol::asset_global_settle_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:246
graphene::protocol::asset_publish_feed_operation::asset_id
asset_id_type asset_id
asset for which the feed is published
Definition: asset_ops.hpp:474
graphene::protocol::asset_update_feed_producers_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:441
graphene::protocol::asset_options::blacklist_markets
flat_set< asset_id_type > blacklist_markets
Definition: asset_ops.hpp:86
graphene::protocol::asset_options
The asset_options struct contains options available on all assets in the network.
Definition: asset_ops.hpp:47
graphene::protocol::asset_fund_fee_pool_operation::fee_params_t
Definition: asset_ops.hpp:324
graphene::protocol::base_operation
Definition: base.hpp:124
graphene::protocol::asset_update_issuer_operation::fee
asset fee
Definition: asset_ops.hpp:571
graphene::protocol::asset_claim_fees_operation::additional_options_type
Definition: asset_ops.hpp:535
graphene::protocol::asset_update_feed_producers_operation::fee_params_t
Definition: asset_ops.hpp:432
graphene::protocol::asset_update_operation::asset_to_update
asset_id_type asset_to_update
Definition: asset_ops.hpp:372
graphene::protocol::asset_options::extensions
additional_asset_options_t extensions
Definition: asset_ops.hpp:93
graphene::protocol::bitasset_options
The bitasset_options struct contains configurable options available only to BitAssets.
Definition: asset_ops.hpp:109
graphene::protocol::asset_claim_fees_operation::fee
asset fee
Definition: asset_ops.hpp:545
graphene::protocol::asset_update_feed_producers_operation::validate
void validate() const
Definition: asset_ops.cpp:226
graphene::protocol::asset_update_operation::extensions
extension< ext > extensions
Definition: asset_ops.hpp:377
graphene::protocol::asset_settle_cancel_operation::asset_settle_cancel_operation
asset_settle_cancel_operation()=default
graphene::protocol::asset_claim_pool_operation::asset_id
asset_id_type asset_id
Definition: asset_ops.hpp:609
graphene::protocol::asset_update_issuer_operation::fee_params_t
Definition: asset_ops.hpp:567
graphene::protocol::asset_create_operation::fee
asset fee
Definition: asset_ops.hpp:201
graphene::protocol::asset_create_operation::fee_params_t::symbol3
uint64_t symbol3
Definition: asset_ops.hpp:195
graphene::protocol::asset_settle_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:284
graphene::protocol::asset_create_operation::fee_params_t::symbol4
uint64_t symbol4
Definition: asset_ops.hpp:196
graphene::protocol::asset_claim_pool_operation::fee_params_t
Definition: asset_ops.hpp:603
graphene::protocol::asset_issue_operation::issuer
account_id_type issuer
Must be asset_to_issue->asset_id->issuer.
Definition: asset_ops.hpp:493
graphene::protocol::additional_asset_options::whitelist_market_fee_sharing
fc::optional< flat_set< account_id_type > > whitelist_market_fee_sharing
Definition: asset_ops.hpp:34
graphene::protocol::asset_settle_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:286
graphene::protocol::asset_publish_feed_operation::validate
void validate() const
Definition: asset_ops.cpp:166
graphene::protocol::asset_options::max_supply
share_type max_supply
Definition: asset_ops.hpp:50
graphene::protocol::asset_publish_feed_operation::extensions
extension< ext > extensions
Definition: asset_ops.hpp:476
graphene::protocol::asset_settle_operation::fee_params_t
Definition: asset_ops.hpp:269
graphene::protocol::asset_issue_operation::calculate_fee
share_type calculate_fee(const fee_params_t &k) const
Definition: asset_ops.cpp:77
graphene::protocol::asset_update_bitasset_operation::new_options
bitasset_options new_options
Definition: asset_ops.hpp:406
graphene::protocol::asset_update_operation::ext
Definition: asset_ops.hpp:353
graphene::protocol::asset_claim_fees_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:532
memo.hpp
graphene::protocol::bitasset_options::ext::maintenance_collateral_ratio
fc::optional< uint16_t > maintenance_collateral_ratio
After BSIP75, the asset owner can update MCR directly.
Definition: asset_ops.hpp:146
graphene::protocol::asset_create_operation::fee_params_t::price_per_kbyte
uint32_t price_per_kbyte
Definition: asset_ops.hpp:198
graphene::protocol::asset_settle_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:276
GRAPHENE_BLOCKCHAIN_PRECISION
#define GRAPHENE_BLOCKCHAIN_PRECISION
Definition: config.hpp:29
graphene::protocol::asset_update_operation::ext::new_precision
fc::optional< uint8_t > new_precision
Definition: asset_ops.hpp:357
graphene::protocol::asset_reserve_operation
used to take an asset out of circulation, returning to the issuer
Definition: asset_ops.hpp:513
graphene::protocol::asset_update_operation
Update options common to all assets.
Definition: asset_ops.hpp:351
graphene::protocol::asset_settle_operation::account
account_id_type account
Account requesting the force settlement. This account pays the fee.
Definition: asset_ops.hpp:281
graphene::protocol::asset_global_settle_operation::asset_to_settle
asset_id_type asset_to_settle
Definition: asset_ops.hpp:244
graphene::protocol::asset_settle_cancel_operation::validate
void validate() const
Definition: asset_ops.hpp:313
graphene::protocol::asset_create_operation::precision
uint8_t precision
Number of digits to the right of decimal point, must be less than or equal to 12.
Definition: asset_ops.hpp:207
graphene::protocol::asset_claim_pool_operation::issuer
account_id_type issuer
Definition: asset_ops.hpp:608
graphene::protocol::asset_create_operation::validate
void validate() const
Definition: asset_ops.cpp:110
graphene::protocol::bitasset_options::ext::initial_collateral_ratio
fc::optional< uint16_t > initial_collateral_ratio
Definition: asset_ops.hpp:144
graphene::protocol::asset_issue_operation::asset_to_issue
asset asset_to_issue
Definition: asset_ops.hpp:494
graphene::protocol::asset_options::issuer_permissions
uint16_t issuer_permissions
The flags which the issuer has permission to update. See asset_issuer_permission_flags.
Definition: asset_ops.hpp:61
graphene::protocol::asset_publish_feed_operation::fee_params_t
Definition: asset_ops.hpp:470
graphene::protocol::asset_claim_fees_operation::issuer
account_id_type issuer
must match issuer of asset from which we claim fees
Definition: asset_ops.hpp:546
graphene::protocol::asset_update_bitasset_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:409
graphene::protocol::asset_update_bitasset_operation::fee_params_t
Definition: asset_ops.hpp:400
graphene::protocol::asset_create_operation::calculate_fee
share_type calculate_fee(const fee_params_t &k, const optional< uint64_t > &sub_asset_creation_fee) const
Definition: asset_ops.cpp:82
graphene::protocol::asset_publish_feed_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:478
graphene::protocol::asset_reserve_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:520
graphene::protocol::asset_fund_fee_pool_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:330
graphene::protocol::bitasset_options::ext
Definition: asset_ops.hpp:139
graphene::protocol::asset_global_settle_operation::validate
void validate() const
Definition: asset_ops.cpp:231
graphene::protocol::price_feed
defines market parameters for margin positions
Definition: asset.hpp:160
graphene::protocol::asset_update_issuer_operation::get_required_active_authorities
void get_required_active_authorities(flat_set< account_id_type > &a) const
Definition: asset_ops.hpp:583
GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
Definition: types.hpp:85
graphene::protocol::asset_issue_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:500
graphene::protocol::asset_global_settle_operation::fee_params_t
Definition: asset_ops.hpp:240
graphene::protocol::asset_fund_fee_pool_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:324
graphene::protocol::asset_update_operation::ext::skip_core_exchange_rate
fc::optional< bool > skip_core_exchange_rate
Definition: asset_ops.hpp:360
graphene::protocol::asset_options::validate
void validate() const
Definition: asset_ops.cpp:273
graphene::protocol::asset_publish_feed_operation::publisher
account_id_type publisher
Definition: asset_ops.hpp:473
graphene::protocol::asset_update_bitasset_operation
Update options specific to BitAssets.
Definition: asset_ops.hpp:398
graphene::protocol::asset_update_operation::asset_update_operation
asset_update_operation()
Definition: asset_ops.hpp:368
graphene::protocol::asset_settle_cancel_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:308
graphene::protocol::asset_create_operation::symbol
string symbol
The ticker symbol of this asset.
Definition: asset_ops.hpp:205
graphene::protocol::asset_issue_operation::validate
void validate() const
Definition: asset_ops.cpp:199
graphene::protocol::asset_update_feed_producers_operation::fee
asset fee
Definition: asset_ops.hpp:434
graphene::protocol::asset_publish_feed_operation
Publish price feeds for market-issued assets.
Definition: asset_ops.hpp:462
graphene::protocol::asset_settle_cancel_operation
Definition: asset_ops.hpp:293
graphene::protocol::bitasset_options::validate
void validate() const
Definition: asset_ops.cpp:237
graphene::protocol::additional_asset_options::reward_percent
fc::optional< uint16_t > reward_percent
Definition: asset_ops.hpp:33
graphene::protocol::bitasset_options::ext::black_swan_response_method
fc::optional< uint8_t > black_swan_response_method
Definition: asset_ops.hpp:152
graphene::protocol::asset_update_bitasset_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:407
graphene::protocol::asset_options::flags
uint16_t flags
The currently active flags on this permission. See asset_issuer_permission_flags.
Definition: asset_ops.hpp:63
graphene::protocol::bitasset_options::black_swan_response_type::BSRM_TYPE_COUNT
@ BSRM_TYPE_COUNT
Total number of available black swan response methods.
graphene::protocol::bitasset_options::force_settlement_delay_sec
uint32_t force_settlement_delay_sec
This is the delay between the time a long requests settlement and the chain evaluates the settlement.
Definition: asset_ops.hpp:160
graphene::protocol::additional_asset_options
Definition: asset_ops.hpp:31
graphene::protocol::asset_issue_operation::fee_params_t
Definition: asset_ops.hpp:487
GRAPHENE_DEFAULT_PRICE_FEED_LIFETIME
#define GRAPHENE_DEFAULT_PRICE_FEED_LIFETIME
1 day
Definition: config.hpp:72
graphene::protocol::is_valid_symbol
bool is_valid_symbol(const string &symbol)
Definition: asset_ops.cpp:38
GRAPHENE_DEFAULT_FORCE_SETTLEMENT_MAX_VOLUME
#define GRAPHENE_DEFAULT_FORCE_SETTLEMENT_MAX_VOLUME
20%
Definition: config.hpp:71
graphene::protocol::asset_issue_operation::issue_to_account
account_id_type issue_to_account
Definition: asset_ops.hpp:495
graphene::protocol::asset_claim_fees_operation::extensions
extension< additional_options_type > extensions
Definition: asset_ops.hpp:549
graphene::protocol::asset_update_operation::new_options
asset_options new_options
Definition: asset_ops.hpp:376
graphene::protocol::asset_reserve_operation::amount_to_reserve
asset amount_to_reserve
Definition: asset_ops.hpp:519
graphene::protocol::asset_update_issuer_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:568
FC_ASSERT
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
Definition: exception.hpp:345
graphene::protocol::asset_fund_fee_pool_operation::validate
void validate() const
Definition: asset_ops.cpp:207
graphene::protocol::asset_reserve_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:515
graphene::protocol::asset_update_operation::issuer
account_id_type issuer
Definition: asset_ops.hpp:371
graphene::protocol::asset_update_feed_producers_operation
Update the set of feed-producing accounts for a BitAsset.
Definition: asset_ops.hpp:430
base.hpp
graphene::protocol::asset_settle_cancel_operation::fee_params_t
Definition: asset_ops.hpp:295
graphene::protocol::asset_update_feed_producers_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:432
graphene::protocol::asset_settle_operation
Schedules a market-issued asset for automatic settlement.
Definition: asset_ops.hpp:267
graphene::protocol::asset_options::validate_flags
void validate_flags(bool is_market_issued, bool allow_disable_collateral_bid=true) const
Definition: asset_ops.cpp:312
graphene::protocol::asset_update_feed_producers_operation::asset_to_update
asset_id_type asset_to_update
Definition: asset_ops.hpp:436
graphene::protocol::asset_create_operation::common_options
asset_options common_options
Definition: asset_ops.hpp:215
GRAPHENE_DEFAULT_FORCE_SETTLEMENT_DELAY
#define GRAPHENE_DEFAULT_FORCE_SETTLEMENT_DELAY
1 day
Definition: config.hpp:69
graphene::protocol::bitasset_options::black_swan_response_type::no_settlement
@ no_settlement
graphene::protocol::asset_global_settle_operation::settle_price
price settle_price
Definition: asset_ops.hpp:245
graphene::protocol::asset_update_feed_producers_operation::new_feed_producers
flat_set< account_id_type > new_feed_producers
Definition: asset_ops.hpp:438
graphene::protocol::asset_update_bitasset_operation::validate
void validate() const
Definition: asset_ops.cpp:220
graphene::protocol::asset_update_bitasset_operation::asset_to_update
asset_id_type asset_to_update
Definition: asset_ops.hpp:404
graphene::protocol::bitasset_options::ext::force_settle_fee_percent
fc::optional< uint16_t > force_settle_fee_percent
Definition: asset_ops.hpp:150
graphene::protocol::asset_options::max_market_fee
share_type max_market_fee
Market fees calculated as market_fee_percent of the traded volume are capped to this value.
Definition: asset_ops.hpp:58
graphene::protocol::bitasset_options::ext::maximum_short_squeeze_ratio
fc::optional< uint16_t > maximum_short_squeeze_ratio
After BSIP75, the asset owner can update MSSR directly.
Definition: asset_ops.hpp:148
graphene::protocol::asset_claim_pool_operation::extensions
extensions_type extensions
core asset
Definition: asset_ops.hpp:611
graphene::protocol::asset_fund_fee_pool_operation::amount
share_type amount
core asset
Definition: asset_ops.hpp:329
graphene::protocol::bitasset_options::ext::margin_call_fee_ratio
fc::optional< uint16_t > margin_call_fee_ratio
Definition: asset_ops.hpp:149
graphene::protocol::asset_update_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:364
graphene::protocol::asset_options::description
string description
Definition: asset_ops.hpp:92
FC_REFLECT
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition: reflect.hpp:388
graphene::protocol::asset_claim_fees_operation::additional_options_type::claim_from_asset_id
fc::optional< asset_id_type > claim_from_asset_id
Definition: asset_ops.hpp:542
graphene::protocol::additional_asset_options_t
extension< additional_asset_options > additional_asset_options_t
Definition: asset_ops.hpp:38
graphene::protocol::asset_publish_feed_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:470
graphene::protocol::asset_claim_pool_operation::fee_params_t::fee
uint64_t fee
Definition: asset_ops.hpp:604
graphene::protocol::asset_fund_fee_pool_operation
Definition: asset_ops.hpp:322
graphene::protocol::asset_update_bitasset_operation::issuer
account_id_type issuer
Definition: asset_ops.hpp:403
graphene::protocol::asset_fund_fee_pool_operation::from_account
account_id_type from_account
Definition: asset_ops.hpp:327
graphene::protocol::asset_update_bitasset_operation::fee
asset fee
Definition: asset_ops.hpp:402
graphene::protocol::asset_settle_operation::validate
void validate() const
Definition: asset_ops.cpp:214
graphene::protocol::bitasset_options::black_swan_response_type::individual_settlement_to_fund
@ individual_settlement_to_fund
fc::optional< uint16_t >
graphene::protocol::asset_global_settle_operation::fee
asset fee
Definition: asset_ops.hpp:242
graphene::protocol::asset_update_issuer_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:577
graphene::protocol::asset_global_settle_operation::issuer
account_id_type issuer
must equal issuer of asset_to_settle
Definition: asset_ops.hpp:243
graphene::protocol::asset_update_feed_producers_operation::issuer
account_id_type issuer
Definition: asset_ops.hpp:435
graphene::protocol::asset
Definition: asset.hpp:31
graphene::protocol::asset_update_operation::fee_params_t
Definition: asset_ops.hpp:363
graphene::protocol::asset_update_operation::validate
void validate() const
Definition: asset_ops.cpp:134
GRAPHENE_DEFAULT_FORCE_SETTLEMENT_OFFSET
#define GRAPHENE_DEFAULT_FORCE_SETTLEMENT_OFFSET
1%
Definition: config.hpp:70
graphene::protocol::asset_update_operation::new_issuer
optional< account_id_type > new_issuer
If the asset is to be given a new issuer, specify his ID here.
Definition: asset_ops.hpp:375
graphene::protocol::asset_fund_fee_pool_operation::fee
asset fee
core asset
Definition: asset_ops.hpp:326
graphene::protocol::asset_reserve_operation::fee
asset fee
Definition: asset_ops.hpp:517
graphene::protocol::asset_publish_feed_operation::ext
Definition: asset_ops.hpp:464
asset.hpp
graphene::protocol::asset_claim_pool_operation::fee
asset fee
Definition: asset_ops.hpp:607
graphene::protocol::asset_update_issuer_operation::get_required_owner_authorities
void get_required_owner_authorities(flat_set< account_id_type > &a) const
Definition: asset_ops.hpp:580
graphene::protocol::asset_options::get_enabled_issuer_permissions_mask
uint16_t get_enabled_issuer_permissions_mask() const
Definition: asset_ops.cpp:336
graphene::protocol::bitasset_options::force_settlement_offset_percent
uint16_t force_settlement_offset_percent
This is the percent to adjust the feed price in the short's favor in the event of a forced settlement...
Definition: asset_ops.hpp:162
graphene::protocol::asset_update_operation::fee_params_t::price_per_kbyte
uint32_t price_per_kbyte
Definition: asset_ops.hpp:365
graphene::protocol::asset_issue_operation
Definition: asset_ops.hpp:485
graphene::protocol::asset_update_issuer_operation::new_issuer
account_id_type new_issuer
Definition: asset_ops.hpp:574
graphene::protocol::asset_create_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:222
graphene::protocol::bitasset_options::short_backing_asset
asset_id_type short_backing_asset
Definition: asset_ops.hpp:171
graphene::protocol::asset_update_issuer_operation::extensions
extensions_type extensions
Definition: asset_ops.hpp:575
graphene::protocol::asset_update_operation::fee
asset fee
Definition: asset_ops.hpp:370
graphene::protocol::asset_global_settle_operation
allows global settling of bitassets (black swan or prediction markets)
Definition: asset_ops.hpp:238
graphene
Definition: api.cpp:48
graphene::protocol::asset_create_operation
Definition: asset_ops.hpp:192
graphene::protocol::bitasset_options::extensions
extension< ext > extensions
Definition: asset_ops.hpp:173
graphene::protocol::asset_update_issuer_operation::validate
void validate() const
Definition: asset_ops.cpp:154
graphene::protocol::asset_claim_pool_operation::amount_to_claim
asset amount_to_claim
fee.asset_id must != asset_id
Definition: asset_ops.hpp:610
graphene::protocol::asset_claim_pool_operation
Transfers BTS from the fee pool of a specified asset back to the issuer's balance.
Definition: asset_ops.hpp:601
graphene::protocol::asset_update_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:379
graphene::protocol::asset_fund_fee_pool_operation::asset_id
asset_id_type asset_id
Definition: asset_ops.hpp:328
graphene::protocol::extensions_type
future_extensions::flat_set_type extensions_type
Definition: base.hpp:156
graphene::protocol::additional_asset_options::taker_fee_percent
fc::optional< uint16_t > taker_fee_percent
Definition: asset_ops.hpp:36
graphene::protocol::asset_settle_operation::amount
asset amount
Amount of asset to force settle. This must be a market-issued asset.
Definition: asset_ops.hpp:283
graphene::protocol::asset_issue_operation::fee_payer
account_id_type fee_payer() const
Definition: asset_ops.hpp:502
graphene::protocol::asset_publish_feed_operation::feed
price_feed feed
Definition: asset_ops.hpp:475
fc::safe
Definition: safe.hpp:26
graphene::protocol::bitasset_options::minimum_feeds
uint8_t minimum_feeds
Minimum number of unexpired feeds required to extract a median feed from.
Definition: asset_ops.hpp:158