hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
engine_receipt.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PLAIN_ENGINE_RECEIPT_HPP
7 #define IROHA_SHARED_MODEL_PLAIN_ENGINE_RECEIPT_HPP
8 
10 
12 #include "cryptography/hash.hpp"
14 
15 namespace shared_model {
16  namespace plain {
17 
18  class EngineReceipt final : public interface::EngineReceipt {
19  public:
22  interface::types::AccountIdType const &caller,
23  std::optional<interface::types::EvmDataHexString> const &callee,
24  std::optional<interface::types::EvmDataHexString> const
25  &contract_address,
26  std::optional<interface::types::EvmDataHexString> const &e_response);
27 
28  int32_t getCommandIndex() const override;
32  const override;
34  std::optional<interface::EngineReceipt::CallResult> const &
35  getResponseData() const override;
36  std::optional<interface::types::EvmAddressHexString> const &
37  getContractAddress() const override;
38 
39  private:
40  interface::types::CommandIndexType const cmd_index_;
41  interface::types::AccountIdType const caller_;
42  interface::EngineReceipt::PayloadType const payload_type_;
44  std::optional<interface::types::EvmDataHexString> const callee_;
45  std::optional<interface::types::EvmDataHexString> const contract_address_;
46  std::optional<interface::types::EvmDataHexString> const e_response_;
47  std::optional<interface::EngineReceipt::CallResult> const call_result_;
48  };
49  } // namespace plain
50 } // namespace shared_model
51 
52 #endif // IROHA_SHARED_MODEL_PLAIN_ENGINE_RECEIPT_HPP
Provides a response for a single corresponding EngineCall command.
Definition: engine_receipt.hpp:20
interface::EngineReceipt::EngineLogsCollectionType const & getEngineLogs() const override
Return engine logs collection.
Definition: engine_receipt.cpp:73
Definition: engine_receipt.hpp:18
PayloadType
Definition: engine_receipt.hpp:22
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
interface::EngineReceipt::EngineLogsCollectionType & getMutableLogs()
Definition: engine_receipt.cpp:78
std::vector< EngineLogsPtr > EngineLogsCollectionType
Definition: engine_receipt.hpp:51
EngineReceipt(interface::types::CommandIndexType cmd_index, interface::types::AccountIdType const &caller, std::optional< interface::types::EvmDataHexString > const &callee, std::optional< interface::types::EvmDataHexString > const &contract_address, std::optional< interface::types::EvmDataHexString > const &e_response)
int32_t getCommandIndex() const override
Get command index.
Definition: engine_receipt.cpp:58
int32_t CommandIndexType
Type of command index within a transaction.
Definition: types.hpp:97
interface::types::AccountIdType getCaller() const override
Get sender account id.
Definition: engine_receipt.cpp:49
Definition: command_executor.hpp:12
std::optional< interface::EngineReceipt::CallResult > const & getResponseData() const override
Definition: engine_receipt.cpp:63
interface::EngineReceipt::PayloadType getPayloadType() const override
Returns the payload data type.
Definition: engine_receipt.cpp:54
std::optional< interface::types::EvmAddressHexString > const & getContractAddress() const override
Returns payload data.
Definition: engine_receipt.cpp:68