ledger-core
Public Member Functions | List of all members
ledger::core::api::EthereumLikeAccount Class Referenceabstract

#include <EthereumLikeAccount.hpp>

+ Inheritance diagram for ledger::core::api::EthereumLikeAccount:

Public Member Functions

virtual void broadcastRawTransaction (const std::vector< uint8_t > &transaction, const std::shared_ptr< StringCallback > &callback)=0
 
virtual void broadcastTransaction (const std::shared_ptr< EthereumLikeTransaction > &transaction, const std::shared_ptr< StringCallback > &callback)=0
 
virtual std::shared_ptr< EthereumLikeTransactionBuilderbuildTransaction ()=0
 
virtual std::vector< std::shared_ptr< ERC20LikeAccount > > getERC20Accounts ()=0
 
virtual void getGasPrice (const std::shared_ptr< BigIntCallback > &callback)=0
 
virtual void getEstimatedGasLimit (const std::string &address, const std::shared_ptr< BigIntCallback > &callback)=0
 
virtual void getERC20Balance (const std::string &erc20Address, const std::shared_ptr< BigIntCallback > &callback)=0
 
virtual void getERC20Balances (const std::vector< std::string > &erc20Addresses, const std::shared_ptr< BigIntListCallback > &callback)=0
 

Detailed Description

Class representing a Ethereum account.

Member Function Documentation

◆ broadcastRawTransaction()

virtual void ledger::core::api::EthereumLikeAccount::broadcastRawTransaction ( const std::vector< uint8_t > &  transaction,
const std::shared_ptr< StringCallback > &  callback 
)
pure virtual

Send a raw (binary) transaction on the Ethereum blockchain.

◆ broadcastTransaction()

virtual void ledger::core::api::EthereumLikeAccount::broadcastTransaction ( const std::shared_ptr< EthereumLikeTransaction > &  transaction,
const std::shared_ptr< StringCallback > &  callback 
)
pure virtual

Send a transaction on the Ethereum blockchain.

◆ buildTransaction()

virtual std::shared_ptr<EthereumLikeTransactionBuilder> ledger::core::api::EthereumLikeAccount::buildTransaction ( )
pure virtual

Get a builder object to construct transactions.

Implemented in ledger::core::EthereumLikeAccount.

◆ getERC20Accounts()

virtual std::vector<std::shared_ptr<ERC20LikeAccount> > ledger::core::api::EthereumLikeAccount::getERC20Accounts ( )
pure virtual

Get the list of ERC20 accounts associated with this Ethereum account.

Implemented in ledger::core::EthereumLikeAccount.

◆ getERC20Balance()

virtual void ledger::core::api::EthereumLikeAccount::getERC20Balance ( const std::string &  erc20Address,
const std::shared_ptr< BigIntCallback > &  callback 
)
pure virtual

Get balance of ERC20 token The passed address is an ERC20 account Note: same note as above

◆ getERC20Balances()

virtual void ledger::core::api::EthereumLikeAccount::getERC20Balances ( const std::vector< std::string > &  erc20Addresses,
const std::shared_ptr< BigIntListCallback > &  callback 
)
pure virtual

Get balance of ERC20 tokens The passed addresses are ERC20 accounts Note: same note as above

◆ getEstimatedGasLimit()

virtual void ledger::core::api::EthereumLikeAccount::getEstimatedGasLimit ( const std::string &  address,
const std::shared_ptr< BigIntCallback > &  callback 
)
pure virtual

Get estimated gas limit to set so the transaction will succeed The passed address could be EOA or contract This estimation is based on X last incoming txs (to address) that succeeded Note: same note as above

◆ getGasPrice()

virtual void ledger::core::api::EthereumLikeAccount::getGasPrice ( const std::shared_ptr< BigIntCallback > &  callback)
pure virtual

Get gas price from network Note: it would have been better to have this method on EthereumLikeWallet but since EthereumLikeWallet is not used anywhere, it's better to keep all specific methods under the same specific class so it will be easy to segratate when the right time comes !


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