Scorum
api_objects.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
7 namespace scorum {
8 namespace blockchain_history {
9 
10 using namespace protocol;
11 
13 {
15  : signed_block(block)
16  {
17  block_id = id();
18  signing_key = signee();
19  transaction_ids.reserve(transactions.size());
20  for (const signed_transaction& tx : transactions)
21  transaction_ids.push_back(tx.id());
22  }
24  {
25  }
26 
29  std::vector<transaction_id_type> transaction_ids;
30 };
31 
33 {
35 
37  {
38  trx_id = op.trx_id;
39  timestamp = op.timestamp;
40  op.op.visit([&](const auto& operation) { this->op = operation; });
41  }
42 
44  fc::time_point_sec timestamp;
46 };
47 
49 {
50  block_api_object() = default;
51 
54  {
55  }
56 
57  uint32_t block_num = 0;
58  std::vector<block_api_operation_object> operations;
59 };
60 }
61 }
62 
64 
67  (block_num)(operations))
68 
71  (block_id)(signing_key)(transaction_ids))
FC_REFLECT(appender_args,(appender)(stream)) FC_REFLECT_DERIVED(file_appender_args
fc::ripemd160 transaction_id_type
Definition: types.hpp:65
fc::static_variant< vote_operation, comment_operation, transfer_operation, transfer_to_scorumpower_operation, withdraw_scorumpower_operation, account_create_by_committee_operation, account_create_operation, account_create_with_delegation_operation, account_update_operation, witness_update_operation, account_witness_vote_operation, account_witness_proxy_operation, delete_comment_operation, comment_options_operation, set_withdraw_scorumpower_route_to_account_operation, set_withdraw_scorumpower_route_to_dev_pool_operation, prove_authority_operation, request_account_recovery_operation, recover_account_operation, change_recovery_account_operation, escrow_approve_operation, escrow_dispute_operation, escrow_release_operation, escrow_transfer_operation, decline_voting_rights_operation, delegate_scorumpower_operation, create_budget_operation, close_budget_operation, proposal_vote_operation, proposal_create_operation, atomicswap_initiate_operation, atomicswap_redeem_operation, atomicswap_refund_operation, close_budget_by_advertising_moderator_operation, update_budget_operation, create_game_operation, cancel_game_operation, update_game_markets_operation, update_game_start_time_operation, post_game_results_operation, post_bet_operation, cancel_pending_bets_operation, delegate_sp_from_reg_pool_operation, create_nft_operation, update_nft_meta_operation, create_game_round_operation, update_game_round_result_operation, adjust_nft_experience_operation, update_nft_name_operation, author_reward_operation, comment_benefficiary_reward_operation, comment_payout_update_operation, comment_reward_operation, curation_reward_operation, hardfork_operation, producer_reward_operation, active_sp_holders_reward_operation, return_scorumpower_delegation_operation, shutdown_witness_operation, witness_miss_block_operation, expired_contract_refund_operation, acc_finished_vesting_withdraw_operation, devpool_finished_vesting_withdraw_operation, acc_to_acc_vesting_withdraw_operation, devpool_to_acc_vesting_withdraw_operation, acc_to_devpool_vesting_withdraw_operation, devpool_to_devpool_vesting_withdraw_operation, proposal_virtual_operation, budget_outgo_operation, budget_owner_income_operation, active_sp_holders_reward_legacy_operation, budget_closing_operation, bets_matched_operation, game_status_changed_operation, bet_resolved_operation, bet_cancelled_operation, bet_restored_operation, bet_updated_operation > operation
Definition: operations.hpp:112
fc::ripemd160 block_id_type
Definition: types.hpp:63
Definition: asset.cpp:15
block_api_object(const signed_block_header &b)
Definition: api_objects.hpp:52
std::vector< block_api_operation_object > operations
Definition: api_objects.hpp:58
block_api_operation_object(const applied_operation &op)
Definition: api_objects.hpp:36
std::vector< transaction_id_type > transaction_ids
Definition: api_objects.hpp:29
signed_block_api_obj(const signed_block &block)
Definition: api_objects.hpp:14