BitShares-Core  6.1.0
BitShares blockchain implementation and command-line interface software
asset_evaluator.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 #include <graphene/chain/hardfork.hpp>
30 #include <locale>
31 
32 namespace graphene { namespace chain {
33 
34  class asset_create_evaluator : public evaluator<asset_create_evaluator>
35  {
36  public:
38 
41 
45  virtual void pay_fee() override;
46  private:
47  bool fee_is_odd;
48  };
49 
50  class asset_issue_evaluator : public evaluator<asset_issue_evaluator>
51  {
52  public:
56 
57  const asset_dynamic_data_object* asset_dyn_data = nullptr;
58  const account_object* to_account = nullptr;
59  };
60 
61  class asset_reserve_evaluator : public evaluator<asset_reserve_evaluator>
62  {
63  public:
67 
68  const asset_dynamic_data_object* asset_dyn_data = nullptr;
69  const account_object* from_account = nullptr;
70  };
71 
72 
73  class asset_update_evaluator : public evaluator<asset_update_evaluator>
74  {
75  public:
77 
80 
81  const asset_object* asset_to_update = nullptr;
82  const asset_bitasset_data_object* bitasset_data = nullptr;
83  };
84 
85  class asset_update_issuer_evaluator : public evaluator<asset_update_issuer_evaluator>
86  {
87  public:
89 
92 
93  const asset_object* asset_to_update = nullptr;
94  };
95 
96  class asset_update_bitasset_evaluator : public evaluator<asset_update_bitasset_evaluator>
97  {
98  public:
100 
103 
104  private:
105  const asset_bitasset_data_object* bitasset_to_update = nullptr;
106  const asset_object* asset_to_update = nullptr;
107 
108  bool update_feeds_due_to_bsrm_change = false;
109  };
110 
111  class asset_update_feed_producers_evaluator : public evaluator<asset_update_feed_producers_evaluator>
112  {
113  public:
115 
117  void_result do_apply( const operation_type& o ) const;
118 
119  const asset_object* asset_to_update = nullptr;
120  };
121 
122  class asset_fund_fee_pool_evaluator : public evaluator<asset_fund_fee_pool_evaluator>
123  {
124  public:
126 
129 
130  const asset_dynamic_data_object* asset_dyn_data = nullptr;
131  };
132 
133  class asset_global_settle_evaluator : public evaluator<asset_global_settle_evaluator>
134  {
135  public:
137 
140 
141  const asset_object* asset_to_settle = nullptr;
142  };
143  class asset_settle_evaluator : public evaluator<asset_settle_evaluator>
144  {
145  public:
147 
150 
151  private:
152  const asset_object* asset_to_settle = nullptr;
153  const asset_bitasset_data_object* bitasset_ptr = nullptr;
154  };
155 
156  class asset_publish_feeds_evaluator : public evaluator<asset_publish_feeds_evaluator>
157  {
158  public:
160 
163 
164  private:
165  const asset_object* asset_ptr = nullptr;
166  const asset_bitasset_data_object* bitasset_ptr = nullptr;
167  };
168 
169  class asset_claim_fees_evaluator : public evaluator<asset_claim_fees_evaluator>
170  {
171  public:
173 
176 
177  const asset_object* container_asset = nullptr;
178  const asset_dynamic_data_object* container_ddo = nullptr;
179  };
180 
181  class asset_claim_pool_evaluator : public evaluator<asset_claim_pool_evaluator>
182  {
183  public:
185 
188  };
189 
190 } } // graphene::chain
Update the set of feed-producing accounts for a BitAssetBitAssets have price feeds selected by taking...
Definition: asset_ops.hpp:430
contains properties that only apply to bitassets (market issued assets)
This class represents an account on the object graphAccounts are the primary unit of authority on the...
Definition: api.cpp:48
used to transfer accumulated fees back to the issuer&#39;s balance.
Definition: asset_ops.hpp:529
Schedules a market-issued asset for automatic settlementHolders of market-issued assests may request ...
Definition: asset_ops.hpp:267
object_id_type do_apply(const asset_create_operation &o)
Publish price feeds for market-issued assetsPrice feed providers use this operation to publish their ...
Definition: asset_ops.hpp:462
used to take an asset out of circulation, returning to the issuer
Definition: asset_ops.hpp:513
Update options specific to BitAssetsBitAssets have some options which are not relevant to other asset...
Definition: asset_ops.hpp:398
tracks the asset information that changes frequentlyBecause the asset_object is very large it doesn&#39;t...
Update options common to all assetsThere are a number of options which all assets in the network use...
Definition: asset_ops.hpp:351
Transfers BTS from the fee pool of a specified asset back to the issuer&#39;s balance.
Definition: asset_ops.hpp:601
void_result do_evaluate(const asset_create_operation &o)
tracks the parameters of an assetAll assets have a globally unique symbol name that controls how they...
Update issuer of an assetAn issuer has general administrative power of an asset and in some cases als...
Definition: asset_ops.hpp:565
allows global settling of bitassets (black swan or prediction markets)
Definition: asset_ops.hpp:238