TARAXA
graphql::taraxa::Block Class Reference

#include <block.hpp>

Collaboration diagram for graphql::taraxa::Block:

Public Member Functions

 Block (std::shared_ptr<::taraxa::final_chain::FinalChain > final_chain, std::shared_ptr<::taraxa::TransactionManager > trx_manager, std::function< std::shared_ptr< object::Block >(::taraxa::EthBlockNumber)> get_block_by_num, const ::taraxa::blk_hash_t &pbft_block_hash, std::shared_ptr< const ::taraxa::final_chain::BlockHeader > block_header) noexcept
 
response::Value getNumber () const noexcept
 
response::Value getHash () const noexcept
 
response::Value getPbftHash () const noexcept
 
std::shared_ptr< object::Block > getParent () const noexcept
 
response::Value getNonce () const noexcept
 
response::Value getTransactionsRoot () const noexcept
 
std::optional< int > getTransactionCount () const noexcept
 
response::Value getStateRoot () const noexcept
 
response::Value getReceiptsRoot () const noexcept
 
std::shared_ptr< object::Account > getMiner (std::optional< response::Value > &&blockArg) const
 
response::Value getExtraData () const noexcept
 
response::Value getGasLimit () const noexcept
 
response::Value getGasUsed () const noexcept
 
response::Value getTimestamp () const noexcept
 
response::Value getLogsBloom () const noexcept
 
response::Value getMixHash () const noexcept
 
response::Value getDifficulty () const noexcept
 
response::Value getTotalDifficulty () const noexcept
 
std::optional< int > getOmmerCount () const noexcept
 
std::optional< std::vector< std::shared_ptr< object::Block > > > getOmmers () const noexcept
 
std::shared_ptr< object::Block > getOmmerAt (int &&indexArg) const noexcept
 
response::Value getOmmerHash () const noexcept
 
std::optional< std::vector< std::shared_ptr< object::Transaction > > > getTransactions () const noexcept
 
std::shared_ptr< object::Transaction > getTransactionAt (response::IntType &&indexArg) const noexcept
 
std::vector< std::shared_ptr< object::Log > > getLogs (BlockFilterCriteria &&filterArg) const noexcept
 
std::shared_ptr< object::Account > getAccount (response::Value &&addressArg) const
 
std::shared_ptr< object::CallResult > getCall (CallData &&dataArg) const noexcept
 
response::Value getEstimateGas (CallData &&dataArg) const noexcept
 

Private Attributes

std::shared_ptr<::taraxa::final_chain::FinalChainfinal_chain_
 
std::shared_ptr<::taraxa::TransactionManagertrx_manager_
 
std::function< std::shared_ptr< object::Block >::taraxa::EthBlockNumber)> get_block_by_num_
 
const ::taraxa::blk_hash_t kPBftBlockHash
 
std::shared_ptr< const ::taraxa::final_chain::BlockHeaderblock_header_
 
std::vector< std::shared_ptr<::taraxa::Transaction > > transactions_
 

Constructor & Destructor Documentation

◆ Block()

graphql::taraxa::Block::Block ( std::shared_ptr<::taraxa::final_chain::FinalChain final_chain,
std::shared_ptr<::taraxa::TransactionManager trx_manager,
std::function< std::shared_ptr< object::Block >(::taraxa::EthBlockNumber)>  get_block_by_num,
const ::taraxa::blk_hash_t pbft_block_hash,
std::shared_ptr< const ::taraxa::final_chain::BlockHeader block_header 
)
explicitnoexcept

Member Function Documentation

◆ getAccount()

std::shared_ptr< object::Account > graphql::taraxa::Block::getAccount ( response::Value &&  addressArg) const

◆ getCall()

std::shared_ptr< object::CallResult > graphql::taraxa::Block::getCall ( CallData &&  dataArg) const
noexcept

◆ getDifficulty()

response::Value graphql::taraxa::Block::getDifficulty ( ) const
noexcept

◆ getEstimateGas()

response::Value graphql::taraxa::Block::getEstimateGas ( CallData &&  dataArg) const
noexcept

◆ getExtraData()

response::Value graphql::taraxa::Block::getExtraData ( ) const
noexcept

◆ getGasLimit()

response::Value graphql::taraxa::Block::getGasLimit ( ) const
noexcept

◆ getGasUsed()

response::Value graphql::taraxa::Block::getGasUsed ( ) const
noexcept

◆ getHash()

response::Value graphql::taraxa::Block::getHash ( ) const
noexcept

◆ getLogs()

std::vector< std::shared_ptr< object::Log > > graphql::taraxa::Block::getLogs ( BlockFilterCriteria &&  filterArg) const
noexcept

◆ getLogsBloom()

response::Value graphql::taraxa::Block::getLogsBloom ( ) const
noexcept

◆ getMiner()

std::shared_ptr< object::Account > graphql::taraxa::Block::getMiner ( std::optional< response::Value > &&  blockArg) const

◆ getMixHash()

response::Value graphql::taraxa::Block::getMixHash ( ) const
noexcept

◆ getNonce()

response::Value graphql::taraxa::Block::getNonce ( ) const
noexcept

◆ getNumber()

response::Value graphql::taraxa::Block::getNumber ( ) const
noexcept

◆ getOmmerAt()

std::shared_ptr< object::Block > graphql::taraxa::Block::getOmmerAt ( int &&  indexArg) const
noexcept

◆ getOmmerCount()

std::optional< int > graphql::taraxa::Block::getOmmerCount ( ) const
noexcept

◆ getOmmerHash()

response::Value graphql::taraxa::Block::getOmmerHash ( ) const
noexcept

◆ getOmmers()

std::optional< std::vector< std::shared_ptr< object::Block > > > graphql::taraxa::Block::getOmmers ( ) const
noexcept

◆ getParent()

std::shared_ptr< object::Block > graphql::taraxa::Block::getParent ( ) const
noexcept

◆ getPbftHash()

response::Value graphql::taraxa::Block::getPbftHash ( ) const
noexcept

◆ getReceiptsRoot()

response::Value graphql::taraxa::Block::getReceiptsRoot ( ) const
noexcept

◆ getStateRoot()

response::Value graphql::taraxa::Block::getStateRoot ( ) const
noexcept

◆ getTimestamp()

response::Value graphql::taraxa::Block::getTimestamp ( ) const
noexcept

◆ getTotalDifficulty()

response::Value graphql::taraxa::Block::getTotalDifficulty ( ) const
noexcept

◆ getTransactionAt()

std::shared_ptr< object::Transaction > graphql::taraxa::Block::getTransactionAt ( response::IntType &&  indexArg) const
noexcept

◆ getTransactionCount()

std::optional< int > graphql::taraxa::Block::getTransactionCount ( ) const
noexcept

◆ getTransactions()

std::optional< std::vector< std::shared_ptr< object::Transaction > > > graphql::taraxa::Block::getTransactions ( ) const
noexcept

◆ getTransactionsRoot()

response::Value graphql::taraxa::Block::getTransactionsRoot ( ) const
noexcept

Member Data Documentation

◆ block_header_

std::shared_ptr<const ::taraxa::final_chain::BlockHeader> graphql::taraxa::Block::block_header_
private

◆ final_chain_

std::shared_ptr<::taraxa::final_chain::FinalChain> graphql::taraxa::Block::final_chain_
private

◆ get_block_by_num_

std::function<std::shared_ptr<object::Block>::taraxa::EthBlockNumber)> graphql::taraxa::Block::get_block_by_num_
private

◆ kPBftBlockHash

const ::taraxa::blk_hash_t graphql::taraxa::Block::kPBftBlockHash
private

◆ transactions_

std::vector<std::shared_ptr<::taraxa::Transaction> > graphql::taraxa::Block::transactions_
mutableprivate

◆ trx_manager_

std::shared_ptr<::taraxa::TransactionManager> graphql::taraxa::Block::trx_manager_
private

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