hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_engine_receipt.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_PROTO_MODEL_ENGINE_RECEIPT_HPP
7 #define IROHA_SHARED_PROTO_MODEL_ENGINE_RECEIPT_HPP
8 
10 
11 #include "cryptography/hash.hpp"
13 #include "qry_responses.pb.h"
14 
15 namespace shared_model {
16  namespace proto {
17 
18  class EngineReceipt final : public interface::EngineReceipt {
19  public:
20  using TransportType = iroha::protocol::EngineReceipt;
21 
22  explicit EngineReceipt(const TransportType &proto);
23 
24  explicit EngineReceipt(const EngineReceipt &o);
25 
26  int32_t getCommandIndex() const override;
29  const override;
31  getEngineLogs() const override;
32  std::optional<shared_model::interface::EngineReceipt::CallResult> const &
33  getResponseData() const override;
34  std::optional<shared_model::interface::types::EvmAddressHexString> const &
35  getContractAddress() const override;
36 
37  private:
38  const TransportType &proto_;
40  engine_logs_;
41  std::optional<shared_model::interface::types::EvmDataHexString> const
42  response_data_;
43  std::optional<shared_model::interface::EngineReceipt::CallResult> const
44  call_result_;
45  std::optional<shared_model::interface::types::EvmAddressHexString> const
46  contact_address_;
47  };
48  } // namespace proto
49 } // namespace shared_model
50 
51 #endif // IROHA_SHARED_PROTO_MODEL_ENGINE_RECEIPT_HPP
Provides a response for a single corresponding EngineCall command.
Definition: engine_receipt.hpp:20
PayloadType
Definition: engine_receipt.hpp:22
iroha::protocol::EngineReceipt TransportType
Definition: proto_engine_receipt.hpp:20
shared_model::interface::EngineReceipt::PayloadType getPayloadType() const override
Returns the payload data type.
Definition: proto_engine_receipt.cpp:55
std::optional< shared_model::interface::types::EvmAddressHexString > const & getContractAddress() const override
Returns payload data.
Definition: proto_engine_receipt.cpp:78
std::optional< shared_model::interface::EngineReceipt::CallResult > const & getResponseData() const override
Definition: proto_engine_receipt.cpp:73
EngineReceipt(const TransportType &proto)
Definition: proto_engine_receipt.cpp:15
shared_model::interface::EngineReceipt::EngineLogsCollectionType const & getEngineLogs() const override
Return engine logs collection.
Definition: proto_engine_receipt.cpp:83
shared_model::interface::types::AccountIdType getCaller() const override
Get sender account id.
Definition: proto_engine_receipt.cpp:50
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
std::vector< EngineLogsPtr > EngineLogsCollectionType
Definition: engine_receipt.hpp:51
int32_t getCommandIndex() const override
Get command index.
Definition: proto_engine_receipt.cpp:68
Definition: proto_engine_receipt.hpp:18
Definition: command_executor.hpp:12