31 namespace graphene {
namespace elasticsearch {
32 using namespace chain;
44 #ifndef ELASTICSEARCH_SPACE_ID 45 #define ELASTICSEARCH_SPACE_ID 6 50 class elasticsearch_plugin_impl;
61 std::string plugin_name()
const override;
62 std::string plugin_description()
const override;
63 virtual void plugin_set_program_options(
64 boost::program_options::options_description& cli,
65 boost::program_options::options_description& cfg)
override;
66 virtual void plugin_initialize(
const boost::program_options::variables_map& options)
override;
67 virtual void plugin_startup()
override;
70 vector<operation_history_object> get_account_history(
const account_id_type account_id,
71 operation_history_id_type stop,
unsigned limit, operation_history_id_type start);
72 mode get_running_mode();
75 std::unique_ptr<detail::elasticsearch_plugin_impl>
my;
102 transfer_from = o.
from;
133 fee_asset = o.fee.asset_id;
134 fee_amount = o.fee.amount;
204 vector<string> keys_to_rename;
205 for (
auto i = o.
begin(); i != o.
end(); ++i)
207 auto& element = (*i).value();
208 if (element.is_object())
210 const string& name = (*i).key();
211 auto& vo = element.get_object();
212 if (vo.contains(name.c_str()))
213 keys_to_rename.emplace_back(name);
216 else if (element.is_array())
217 adapt(element.get_array());
219 for (
const auto& i : keys_to_rename)
221 string new_name = i +
"_";
228 auto& memo = o[
"memo"];
229 if (memo.is_string())
231 o[
"memo_"] = o[
"memo"];
234 else if (memo.is_object())
237 if (tmp.find(
"nonce") != tmp.end())
239 tmp[
"nonce"] = tmp[
"nonce"].as_string();
244 if (o.
find(
"new_parameters") != o.
end())
246 auto& tmp = o[
"new_parameters"];
250 if (tmp2.find(
"current_fees") != tmp2.end())
252 tmp2.
erase(
"current_fees");
253 o[
"new_parameters"] = tmp2;
257 if (o.
find(
"owner") != o.
end() && o[
"owner"].is_string())
259 o[
"owner_"] = o[
"owner"].as_string();
262 if (o.
find(
"proposed_ops") != o.
end())
266 if (o.
find(
"initializer") != o.
end())
270 if (o.
find(
"policy") != o.
end())
274 if (o.
find(
"predicates") != o.
end())
278 if (o.
find(
"active_special_authority") != o.
end())
282 if (o.
find(
"owner_special_authority") != o.
end())
295 for (
auto& array_element : v)
297 if (array_element.is_object())
298 array_element = adapt(array_element.get_object());
299 else if (array_element.is_array())
300 adapt(array_element.get_array());
302 array_element = array_element.as_string();
315 (receives_asset_id)(receives_asset_name)(receives_amount)(receives_amount_units)(fill_price)
316 (fill_price_units)(is_maker))
static string to_string(const variant &v, output_formatting format=stringify_large_ints_and_doubles, uint32_t max_depth=DEFAULT_MAX_RECURSION_DEPTH)
void erase(const string &key)
asset_id_type fill_receives_asset_id
account_id_type transfer_from
std::unique_ptr< detail::elasticsearch_plugin_impl > my
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
asset_id_type receives_asset_id
tracks the history of all logical operations on blockchain stateAll operations and virtual operations...
An order-perserving dictionary of variant's.
asset_id_type pays_asset_id
void operator()(const graphene::chain::fill_order_operation &o)
optional< visitor_struct > additional_data
a node in a linked list of operation_history_objectsAccount history is important for users and wallet...
std::string receives_asset_name
std::vector< variant > variants
share_type receives_amount
transfer_struct transfer_data
void adapt(fc::variants &v)
provides stack-based nullable value similar to boost::optional
object_id_type fill_order_id
FC_REFLECT_ENUM(graphene::net::core_message_type_enum,(trx_message_type)(block_message_type)(core_message_type_first)(item_ids_inventory_message_type)(blockchain_item_ids_inventory_message_type)(fetch_blockchain_item_ids_message_type)(fetch_items_message_type)(item_not_available_message_type)(hello_message_type)(connection_accepted_message_type)(connection_rejected_message_type)(address_request_message_type)(address_message_type)(closing_connection_message_type)(current_time_request_message_type)(current_time_reply_message_type)(check_firewall_message_type)(check_firewall_reply_message_type)(get_current_connections_request_message_type)(get_current_connections_reply_message_type)(core_message_type_last))(different_chain)(already_connected)(connected_to_self)(not_accepting_connections)(blocked)(invalid_hello_message)(client_too_old))(inbound)(outbound))(firewalled)(not_firewalled))(unable_to_connect)(connection_successful)) namespace std
fc::time_point_sec block_time
std::string operation_result
Transfers an amount of one asset from one account to another.
void to_variant(const flat_set< T, A... > &var, variant &vo, uint32_t _max_depth)
account_transaction_history_object account_history
account_id_type account_id
iterator find(const string &key) const
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
share_type transfer_amount
std::string pays_asset_name
share_type fill_receives_amount
asset_id_type transfer_asset_id
account_id_type account_id
asset amount
The amount of asset to transfer from from to to.
void operator()(const graphene::chain::transfer_operation &o)
safe< int64_t > share_type
double receives_amount_units
account_id_type from
Account to transfer asset from.
asset_id_type fill_pays_asset_id
share_type fill_pays_amount
void operator()(const T &o)
operation_history_struct operation_history
#define FC_PACK_MAX_DEPTH
account_id_type fill_account_id
return fromEStoOperation(source)
account_id_type transfer_to
account_id_type to
Account to transfer asset to.
An order-perserving dictionary of variant's.
variant adapt(const variant_object &op)