6 #include "BlockObject.h"
13 explicit Block(std::shared_ptr<::taraxa::final_chain::FinalChain> final_chain,
14 std::shared_ptr<::taraxa::TransactionManager> trx_manager,
17 std::shared_ptr<const ::taraxa::final_chain::BlockHeader> block_header) noexcept;
19 response::Value
getNumber()
const noexcept;
20 response::Value
getHash()
const noexcept;
22 std::shared_ptr<object::Block>
getParent()
const noexcept;
23 response::Value
getNonce()
const noexcept;
28 std::shared_ptr<object::Account>
getMiner(std::optional<response::Value>&& blockArg)
const;
38 std::optional<std::vector<std::shared_ptr<object::Block>>>
getOmmers()
const noexcept;
39 std::shared_ptr<object::Block>
getOmmerAt(
int&& indexArg)
const noexcept;
41 std::optional<std::vector<std::shared_ptr<object::Transaction>>>
getTransactions()
const noexcept;
42 std::shared_ptr<object::Transaction>
getTransactionAt(response::IntType&& indexArg)
const noexcept;
43 std::vector<std::shared_ptr<object::Log>>
getLogs(BlockFilterCriteria&& filterArg)
const noexcept;
44 std::shared_ptr<object::Account>
getAccount(response::Value&& addressArg)
const;
45 std::shared_ptr<object::CallResult>
getCall(CallData&& dataArg)
const noexcept;
53 std::shared_ptr<const ::taraxa::final_chain::BlockHeader>
block_header_;
54 mutable std::vector<std::shared_ptr<::taraxa::Transaction>>
transactions_;
response::Value getGasUsed() const noexcept
Definition: block.cpp:70
response::Value getDifficulty() const noexcept
Definition: block.cpp:82
std::optional< int > getTransactionCount() const noexcept
Definition: block.cpp:41
response::Value getPbftHash() const noexcept
Definition: block.cpp:29
std::shared_ptr< object::Transaction > getTransactionAt(response::IntType &&indexArg) const noexcept
Definition: block.cpp:110
response::Value getNonce() const noexcept
Definition: block.cpp:35
std::optional< int > getOmmerCount() const noexcept
Definition: block.cpp:88
std::vector< std::shared_ptr< object::Log > > getLogs(BlockFilterCriteria &&filterArg) const noexcept
Definition: block.cpp:122
const ::taraxa::blk_hash_t kPBftBlockHash
Definition: block.hpp:52
response::Value getMixHash() const noexcept
Definition: block.cpp:80
std::vector< std::shared_ptr<::taraxa::Transaction > > transactions_
Definition: block.hpp:54
std::shared_ptr<::taraxa::final_chain::FinalChain > final_chain_
Definition: block.hpp:49
response::Value getHash() const noexcept
Definition: block.cpp:27
response::Value getReceiptsRoot() const noexcept
Definition: block.cpp:51
response::Value getNumber() const noexcept
Definition: block.cpp:25
response::Value getTransactionsRoot() const noexcept
Definition: block.cpp:37
std::shared_ptr< object::Block > getParent() const noexcept
Definition: block.cpp:31
response::Value getEstimateGas(CallData &&dataArg) const noexcept
Definition: block.cpp:134
std::shared_ptr< const ::taraxa::final_chain::BlockHeader > block_header_
Definition: block.hpp:53
std::optional< std::vector< std::shared_ptr< object::Transaction > > > getTransactions() const noexcept
Definition: block.cpp:96
std::shared_ptr< object::CallResult > getCall(CallData &&dataArg) const noexcept
Definition: block.cpp:132
response::Value getGasLimit() const noexcept
Definition: block.cpp:66
response::Value getOmmerHash() const noexcept
Definition: block.cpp:94
response::Value getTimestamp() const noexcept
Definition: block.cpp:74
response::Value getStateRoot() const noexcept
Definition: block.cpp:49
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
Definition: block.cpp:14
std::function< std::shared_ptr< object::Block >::taraxa::EthBlockNumber)> get_block_by_num_
Definition: block.hpp:51
std::shared_ptr< object::Account > getAccount(response::Value &&addressArg) const
Definition: block.cpp:127
std::optional< std::vector< std::shared_ptr< object::Block > > > getOmmers() const noexcept
Definition: block.cpp:90
response::Value getExtraData() const noexcept
Definition: block.cpp:64
std::shared_ptr< object::Account > getMiner(std::optional< response::Value > &&blockArg) const
Definition: block.cpp:55
response::Value getLogsBloom() const noexcept
Definition: block.cpp:78
std::shared_ptr< object::Block > getOmmerAt(int &&indexArg) const noexcept
Definition: block.cpp:92
std::shared_ptr<::taraxa::TransactionManager > trx_manager_
Definition: block.hpp:50
response::Value getTotalDifficulty() const noexcept
Definition: block.cpp:84
Definition: account.hpp:10
uint64_t EthBlockNumber
Definition: types.hpp:23
uint256_hash_t blk_hash_t
Definition: types.hpp:42