Appearance
Methods to retrieve token balances and allowances
To retrieve token balances and allowances, the following methods are available:
getBalance
This method fetches the balance of a specific address.
- Class:
TradeTokenContract
- Parameters:
address
(string): The address whose balance needs to be fetched.
- Returns:
Promise<string>
getBalances
This method fetches the balances of all addresses involved in Transfer events.
- Class:
TradeTokenContract
- Returns:
Promise<AccountBalance[]>
getAllowance
This method fetches the allowance of a spender for a given owner.
- Class:
TradeTokenContract
- Parameters:
owner
(string): Address of the token owner.spender
(string): Address of the spender.
- Returns:
Promise<string>
These methods are part of the TradeTokenContract
class, which manages interactions with a Trade Token contract.