TARAXA
Loading...
Searching...
No Matches
account.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5
6#include "AccountObject.h"
9
10namespace graphql::taraxa {
11
12class Account {
13 public:
14 explicit Account(std::shared_ptr<::taraxa::final_chain::FinalChain> final_chain, dev::Address address,
16 explicit Account(std::shared_ptr<::taraxa::final_chain::FinalChain> final_chain, dev::Address address);
17
18 response::Value getAddress() const noexcept;
19 response::Value getBalance() const noexcept;
20 response::Value getTransactionCount() const noexcept;
21 response::Value getCode() const noexcept;
22 response::Value getStorage(response::Value&& slotArg) const;
23
24 private:
26 std::optional<::taraxa::state_api::Account> account_;
27 std::shared_ptr<::taraxa::final_chain::FinalChain> final_chain_;
28};
29} // namespace graphql::taraxa
Definition FixedHash.h:35
Definition account.hpp:12
response::Value getBalance() const noexcept
Definition account.cpp:22
response::Value getStorage(response::Value &&slotArg) const
Definition account.cpp:40
response::Value getAddress() const noexcept
Definition account.cpp:20
std::shared_ptr<::taraxa::final_chain::FinalChain > final_chain_
Definition account.hpp:27
response::Value getCode() const noexcept
Definition account.cpp:36
response::Value getTransactionCount() const noexcept
Definition account.cpp:29
std::optional<::taraxa::state_api::Account > account_
Definition account.hpp:26
const dev::Address kAddress
Definition account.hpp:25
Definition account.hpp:10
uint64_t EthBlockNumber
Definition types.hpp:24