BitShares-Core  5.0.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  const asset_bitasset_data_object* bitasset_to_update = nullptr;
105  const asset_object* asset_to_update = nullptr;
106  };
107 
108  class asset_update_feed_producers_evaluator : public evaluator<asset_update_feed_producers_evaluator>
109  {
110  public:
112 
113  void_result do_evaluate( const operation_type& o );
114  void_result do_apply( const operation_type& o );
115 
116  const asset_object* asset_to_update = nullptr;
117  };
118 
119  class asset_fund_fee_pool_evaluator : public evaluator<asset_fund_fee_pool_evaluator>
120  {
121  public:
123 
126 
127  const asset_dynamic_data_object* asset_dyn_data = nullptr;
128  };
129 
130  class asset_global_settle_evaluator : public evaluator<asset_global_settle_evaluator>
131  {
132  public:
134 
135  void_result do_evaluate(const operation_type& op);
136  void_result do_apply(const operation_type& op);
137 
138  const asset_object* asset_to_settle = nullptr;
139  };
140  class asset_settle_evaluator : public evaluator<asset_settle_evaluator>
141  {
142  public:
144 
145  void_result do_evaluate(const operation_type& op);
146  operation_result do_apply(const operation_type& op);
147 
148  const asset_object* asset_to_settle = nullptr;
149  };
150 
151  class asset_publish_feeds_evaluator : public evaluator<asset_publish_feeds_evaluator>
152  {
153  public:
155 
158 
159  const asset_object* asset_ptr = nullptr;
160  const asset_bitasset_data_object* bitasset_ptr = nullptr;
161  };
162 
163  class asset_claim_fees_evaluator : public evaluator<asset_claim_fees_evaluator>
164  {
165  public:
167 
170 
171  const asset_object* container_asset = nullptr;
172  const asset_dynamic_data_object* container_ddo = nullptr;
173  };
174 
175  class asset_claim_pool_evaluator : public evaluator<asset_claim_pool_evaluator>
176  {
177  public:
179 
182  };
183 
184 } } // graphene::chain
Update the set of feed-producing accounts for a BitAssetBitAssets have price feeds selected by taking...
Definition: asset_ops.hpp:384
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...
asset_update_bitasset_operation operation_type
Definition: api.cpp:56
used to transfer accumulated fees back to the issuer&#39;s balance.
Definition: asset_ops.hpp:482
Schedules a market-issued asset for automatic settlementHolders of market-issued assests may request ...
Definition: asset_ops.hpp:226
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:415
used to take an asset out of circulation, returning to the issuer
Definition: asset_ops.hpp:466
Update options specific to BitAssetsBitAssets have some options which are not relevant to other asset...
Definition: asset_ops.hpp:353
asset_update_feed_producers_operation operation_type
tracks the asset information that changes frequentlyBecause the asset_object is very large it doesn&#39;t...
asset_update_issuer_operation operation_type
Update options common to all assetsThere are a number of options which all assets in the network use...
Definition: asset_ops.hpp:307
Transfers BTS from the fee pool of a specified asset back to the issuer&#39;s balance.
Definition: asset_ops.hpp:554
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:518
allows global settling of bitassets (black swan or prediction markets)
Definition: asset_ops.hpp:199