32 #ifndef LEDGER_CORE_ETHEREUMLIKETRANSACTIONAPI_H 33 #define LEDGER_CORE_ETHEREUMLIKETRANSACTIONAPI_H 35 #include <wallet/common/api_impl/OperationApi.h> 36 #include <wallet/ethereum/api_impl/EthereumLikeBlockApi.h> 38 #include <api/EthereumLikeTransaction.hpp> 39 #include <api/Amount.hpp> 40 #include <api/Currency.hpp> 41 #include <math/BigInt.h> 52 std::shared_ptr<api::Amount>
getGasPrice()
override ;
53 std::shared_ptr<api::Amount>
getGasLimit()
override ;
54 std::shared_ptr<api::Amount>
getGasUsed()
override ;
55 std::shared_ptr<api::EthereumLikeAddress>
getReceiver()
override ;
56 std::shared_ptr<api::EthereumLikeAddress>
getSender()
override;
57 std::shared_ptr<api::Amount>
getValue()
override;
60 std::vector<uint8_t>
serialize()
override;
61 std::chrono::system_clock::time_point
getDate()
override;
62 std::shared_ptr<api::EthereumLikeBlock>
getBlock()
override;
63 void setSignature(
const std::vector<uint8_t> & vSignature,
const std::vector<uint8_t> & rSignature,
const std::vector<uint8_t> & sSignature)
override ;
64 void setDERSignature(
const std::vector<uint8_t> & signature)
override;
65 void setVSignature(
const std::vector<uint8_t> & vSignature)
override;
75 std::chrono::system_clock::time_point _time;
76 std::shared_ptr<EthereumLikeBlockApi> _block;
79 std::shared_ptr<api::Amount> _gasPrice;
80 std::shared_ptr<api::Amount> _gasLimit;
81 std::shared_ptr<api::Amount> _gasUsed;
82 std::shared_ptr<api::Amount> _value;
83 std::shared_ptr<BigInt> _nonce;
84 std::vector<uint8_t> _data;
86 std::shared_ptr<api::EthereumLikeAddress> _receiver;
87 std::shared_ptr<api::EthereumLikeAddress> _sender;
88 std::vector<uint8_t> _vSignature;
89 std::vector<uint8_t> _rSignature;
90 std::vector<uint8_t> _sSignature;
96 #endif //LEDGER_CORE_ETHEREUMLIKETRANSACTIONAPI_H std::shared_ptr< api::EthereumLikeAddress > getSender() override
Definition: EthereumLikeTransactionApi.cpp:103
std::vector< uint8_t > serialize() override
Definition: EthereumLikeTransactionApi.cpp:155
int32_t getStatus() override
Definition: EthereumLikeTransactionApi.cpp:115
void setSignature(const std::vector< uint8_t > &vSignature, const std::vector< uint8_t > &rSignature, const std::vector< uint8_t > &sSignature) override
Definition: EthereumLikeTransactionApi.cpp:127
std::shared_ptr< api::EthereumLikeAddress > getReceiver() override
Definition: EthereumLikeTransactionApi.cpp:99
std::shared_ptr< api::EthereumLikeBlock > getBlock() override
Definition: EthereumLikeTransactionApi.cpp:123
int32_t getNonce() override
Definition: EthereumLikeTransactionApi.cpp:84
std::chrono::system_clock::time_point getDate() override
Definition: EthereumLikeTransactionApi.cpp:119
std::shared_ptr< api::Amount > getGasLimit() override
Definition: EthereumLikeTransactionApi.cpp:92
std::shared_ptr< api::Amount > getValue() override
Definition: EthereumLikeTransactionApi.cpp:107
std::experimental::optional< std::vector< uint8_t > > getData() override
Definition: EthereumLikeTransactionApi.cpp:111
Definition: EthereumLikeTransactionApi.h:45
std::shared_ptr< api::Amount > getGasUsed() override
Definition: EthereumLikeTransactionApi.cpp:96
Definition: EthereumLikeTransaction.hpp:28
Definition: Currency.hpp:23
Definition: Account.cpp:8
std::shared_ptr< api::Amount > getGasPrice() override
Definition: EthereumLikeTransactionApi.cpp:88
Definition: optional.hpp:177
std::string getHash() override
Definition: EthereumLikeTransactionApi.cpp:80