Ethereum  PoC-8
The C++ Implementation of Ethereum
dev::eth::TransactionReceipt Class Reference

#include <TransactionReceipt.h>

Inheritance diagram for dev::eth::TransactionReceipt:
dev::eth::LocalisedTransactionReceipt

Public Member Functions

 TransactionReceipt (bytesConstRef _rlp)
 
 TransactionReceipt (h256 const &_root, u256 const &_gasUsed, LogEntries const &_log)
 
 TransactionReceipt (uint8_t _status, u256 const &_gasUsed, LogEntries const &_log)
 
bool hasStatusCode () const
 
h256 const & stateRoot () const
 
uint8_t statusCode () const
 
u256 const & cumulativeGasUsed () const
 
LogBloom const & bloom () const
 
LogEntries const & log () const
 
void streamRLP (RLPStream &_s) const
 
bytes rlp () const
 

Detailed Description

Transaction receipt, constructed either from RLP representation or from individual values. Either a state root or a status code is contained. m_hasStatusCode is true when it contains a status code. Empty state root is not included into RLP-encoding.

Definition at line 39 of file TransactionReceipt.h.

Constructor & Destructor Documentation

◆ TransactionReceipt() [1/3]

TransactionReceipt::TransactionReceipt ( bytesConstRef  _rlp)

Definition at line 31 of file TransactionReceipt.cpp.

◆ TransactionReceipt() [2/3]

TransactionReceipt::TransactionReceipt ( h256 const &  _root,
u256 const &  _gasUsed,
LogEntries const &  _log 
)

Definition at line 54 of file TransactionReceipt.cpp.

◆ TransactionReceipt() [3/3]

TransactionReceipt::TransactionReceipt ( uint8_t  _status,
u256 const &  _gasUsed,
LogEntries const &  _log 
)

Definition at line 61 of file TransactionReceipt.cpp.

Member Function Documentation

◆ bloom()

LogBloom const& dev::eth::TransactionReceipt::bloom ( ) const
inline

Definition at line 55 of file TransactionReceipt.h.

◆ cumulativeGasUsed()

u256 const& dev::eth::TransactionReceipt::cumulativeGasUsed ( ) const
inline

Definition at line 54 of file TransactionReceipt.h.

◆ hasStatusCode()

bool TransactionReceipt::hasStatusCode ( ) const
Returns
true if the receipt has a status code. Otherwise the receipt has a state root (pre-EIP658).

Definition at line 81 of file TransactionReceipt.cpp.

◆ log()

LogEntries const& dev::eth::TransactionReceipt::log ( ) const
inline

Definition at line 56 of file TransactionReceipt.h.

◆ rlp()

bytes dev::eth::TransactionReceipt::rlp ( ) const
inline

Definition at line 60 of file TransactionReceipt.h.

◆ stateRoot()

h256 const & TransactionReceipt::stateRoot ( ) const
Returns
the state root.
Exceptions
TransactionReceiptVersionErrorwhen the receipt has a status code instead of a state root.

Definition at line 94 of file TransactionReceipt.cpp.

◆ statusCode()

uint8_t TransactionReceipt::statusCode ( ) const
Returns
the status code.
Exceptions
TransactionReceiptVersionErrorwhen the receipt has a state root instead of a status code.

Definition at line 86 of file TransactionReceipt.cpp.

◆ streamRLP()

void TransactionReceipt::streamRLP ( RLPStream _s) const

Definition at line 68 of file TransactionReceipt.cpp.


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