hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::interface::EngineReceipt Class Referenceabstract

Provides a response for a single corresponding EngineCall command. More...

#include "engine_receipt.hpp"

Inheritance diagram for shared_model::interface::EngineReceipt:
Inheritance graph
Collaboration diagram for shared_model::interface::EngineReceipt:
Collaboration graph

Classes

struct  CallResult
 

Public Types

enum  PayloadType { PayloadType::kPayloadTypeUnk, PayloadType::kPayloadTypeCallResult, PayloadType::kPayloadTypeContractAddress }
 
using EngineLogsPtr = std::unique_ptr< interface::EngineLog >
 
using EngineLogsCollectionType = std::vector< EngineLogsPtr >
 
- Public Types inherited from shared_model::interface::ModelPrimitive< EngineReceipt >
using ModelType = EngineReceipt
 

Public Member Functions

virtual int32_t getCommandIndex () const =0
 Get command index. More...
 
virtual types::AccountIdType getCaller () const =0
 Get sender account id. More...
 
virtual PayloadType getPayloadType () const =0
 Returns the payload data type. More...
 
virtual std::optional< CallResult > const & getResponseData () const =0
 
virtual std::optional< types::EvmAddressHexString > const & getContractAddress () const =0
 Returns payload data. More...
 
virtual EngineLogsCollectionType const & getEngineLogs () const =0
 Return engine logs collection. More...
 
std::string toString () const override
 
bool operator== (const ModelType &rhs) const override
 
- Public Member Functions inherited from shared_model::interface::ModelPrimitive< EngineReceipt >
virtual bool operator== (const ModelType &rhs) const=0
 
virtual bool operator!= (const ModelType &rhs) const
 
virtual ~ModelPrimitive ()=default
 

Static Public Member Functions

static char const * payloadTypeToStr (PayloadType pt)
 

Detailed Description

Provides a response for a single corresponding EngineCall command.

Member Typedef Documentation

◆ EngineLogsCollectionType

◆ EngineLogsPtr

Member Enumeration Documentation

◆ PayloadType

Enumerator
kPayloadTypeUnk 
kPayloadTypeCallResult 
kPayloadTypeContractAddress 

Member Function Documentation

◆ getCaller()

virtual types::AccountIdType shared_model::interface::EngineReceipt::getCaller ( ) const
pure virtual

Get sender account id.

Implemented in shared_model::plain::EngineReceipt, and shared_model::proto::EngineReceipt.

Here is the caller graph for this function:

◆ getCommandIndex()

virtual int32_t shared_model::interface::EngineReceipt::getCommandIndex ( ) const
pure virtual

Get command index.

Implemented in shared_model::plain::EngineReceipt, and shared_model::proto::EngineReceipt.

Here is the caller graph for this function:

◆ getContractAddress()

virtual std::optional<types::EvmAddressHexString> const& shared_model::interface::EngineReceipt::getContractAddress ( ) const
pure virtual

Returns payload data.

Implemented in shared_model::plain::EngineReceipt, and shared_model::proto::EngineReceipt.

Here is the caller graph for this function:

◆ getEngineLogs()

virtual EngineLogsCollectionType const& shared_model::interface::EngineReceipt::getEngineLogs ( ) const
pure virtual

Return engine logs collection.

Implemented in shared_model::plain::EngineReceipt, and shared_model::proto::EngineReceipt.

Here is the caller graph for this function:

◆ getPayloadType()

virtual PayloadType shared_model::interface::EngineReceipt::getPayloadType ( ) const
pure virtual

Returns the payload data type.

Implemented in shared_model::plain::EngineReceipt, and shared_model::proto::EngineReceipt.

Here is the caller graph for this function:

◆ getResponseData()

virtual std::optional<CallResult> const& shared_model::interface::EngineReceipt::getResponseData ( ) const
pure virtual

[optional] Get engine response data(output). Enable if getPayloadType() == kPayloadTypeCallResult.

Implemented in shared_model::plain::EngineReceipt, and shared_model::proto::EngineReceipt.

Here is the caller graph for this function:

◆ operator==()

bool EngineReceipt::operator== ( const ModelType rhs) const
override
Here is the call graph for this function:

◆ payloadTypeToStr()

static char const* shared_model::interface::EngineReceipt::payloadTypeToStr ( PayloadType  pt)
inlinestatic
Here is the caller graph for this function:

◆ toString()

std::string EngineReceipt::toString ( ) const
overridevirtual

Make string developer representation of object

Returns
string with internal state of object

Reimplemented from shared_model::interface::ModelPrimitive< EngineReceipt >.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: