ledger-core
Public Member Functions | Static Public Member Functions | List of all members
ledger::core::ERC20LikeAccount Class Reference
+ Inheritance diagram for ledger::core::ERC20LikeAccount:
+ Collaboration diagram for ledger::core::ERC20LikeAccount:

Public Member Functions

 ERC20LikeAccount (const std::string &accountUid, const api::ERC20Token &erc20Token, const std::string &accountAddress, const api::Currency &parentCurrency, const std::shared_ptr< EthereumLikeAccount > &parentAccount)
 
api::ERC20Token getToken () override
 
std::string getAddress () override
 
FuturePtr< api::BigIntgetBalance ()
 
void getBalance (const std::shared_ptr< api::BigIntCallback > &callback) override
 
std::vector< std::shared_ptr< api::BigInt > > getBalanceHistoryFor (const std::chrono::system_clock::time_point &startDate, const std::chrono::system_clock::time_point &endDate, api::TimePeriod period) override
 
std::vector< std::shared_ptr< api::ERC20LikeOperation > > getOperations () override
 
Future< std::vector< uint8_t > > getTransferToAddressData (const std::shared_ptr< api::BigInt > &amount, const std::string &address)
 
void getTransferToAddressData (const std::shared_ptr< api::BigInt > &amount, const std::string &address, const std::shared_ptr< api::BinaryCallback > &data) override
 
std::shared_ptr< api::OperationQueryqueryOperations () override
 
void putOperation (soci::session &sql, const std::shared_ptr< ERC20LikeOperation > &operation, bool newOperation=false)
 
- Public Member Functions inherited from ledger::core::api::ERC20LikeAccount
virtual void getBalance (const std::shared_ptr< BigIntCallback > &callback)=0
 
virtual void getTransferToAddressData (const std::shared_ptr< BigInt > &amount, const std::string &address, const std::shared_ptr< BinaryCallback > &data)=0
 

Static Public Member Functions

static BigInt accumulateBalanceWithOperation (const BigInt &balance, api::ERC20LikeOperation &op)
 

Member Function Documentation

◆ getAddress()

std::string ledger::core::ERC20LikeAccount::getAddress ( )
overridevirtual

Get the address of this ERC20 account.

Implements ledger::core::api::ERC20LikeAccount.

◆ getBalanceHistoryFor()

std::vector< std::shared_ptr< api::BigInt > > ledger::core::ERC20LikeAccount::getBalanceHistoryFor ( const std::chrono::system_clock::time_point &  start,
const std::chrono::system_clock::time_point &  end,
api::TimePeriod  period 
)
overridevirtual

Get the balance history of this ERC20 account from a starting date (included) to an ending date (included).

Implements ledger::core::api::ERC20LikeAccount.

◆ getOperations()

std::vector< std::shared_ptr< api::ERC20LikeOperation > > ledger::core::ERC20LikeAccount::getOperations ( )
overridevirtual

Get the list of operations performed on this ERC20 account.

Implements ledger::core::api::ERC20LikeAccount.

◆ getToken()

api::ERC20Token ledger::core::ERC20LikeAccount::getToken ( )
overridevirtual

Get an ERC20 token.

Implements ledger::core::api::ERC20LikeAccount.


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