Documentation
¶
Index ¶
- type BalanceRequest
- type HistoricalBalanceRequest
- type HistoricalSupplyRequest
- type TokenInfo
- type TokensClient
- func (c *TokensClient) GetAccountBalance(ctx context.Context, req *BalanceRequest) (*big.Int, error)
- func (c *TokensClient) GetHistoricalBalance(ctx context.Context, req *HistoricalBalanceRequest) (*big.Int, error)
- func (c *TokensClient) GetHistoricalSupply(ctx context.Context, req *HistoricalSupplyRequest) (*big.Int, error)
- func (c *TokensClient) GetTokenInfo(ctx context.Context, contractAddr common.Address) (result []TokenInfo, err error)
- func (c *TokensClient) GetTotalSupply(ctx context.Context, contractAddr common.Address) (*big.Int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceRequest ¶
BalanceRequest contains the request parameters for GetAccountBalance.
type HistoricalBalanceRequest ¶
type HistoricalBalanceRequest struct { ContractAddress common.Address Address common.Address BlockNo int64 }
HistoricalBalanceRequest contains the request parameters for GetHistoricalBalance.
type HistoricalSupplyRequest ¶
HistoricalSupplyRequest contains the request parameters for GetHistoricalSupply.
type TokenInfo ¶
type TokenInfo struct { ContractAddress common.Address `etherscan:"contractAddress"` TokenName string `etherscan:"tokenName"` Symbol string Divisor uint TokenType string `etherscan:"tokenType"` TotalSupply *big.Int `etherscan:"totalSupply"` BlueCheckmark bool `etherscan:"blueCheckmark,str"` Description string Website string Email string Blog string Reddit string Slack string Facebook string Twitter string BitcoinTalk string Github string Telegram string WeChat string LinkedIn string Discord string Whitepaper string TokenPriceUSD decimal.Decimal `etherscan:"tokenPriceUSD"` }
TokenInfo describes an ERC20/ERC721 token.
type TokensClient ¶
TokensClient is the client for tokens actions.
func (*TokensClient) GetAccountBalance ¶
func (c *TokensClient) GetAccountBalance( ctx context.Context, req *BalanceRequest, ) (*big.Int, error)
GetAccountBalance returns the current balance of an ERC-20 token of an address.
func (*TokensClient) GetHistoricalBalance ¶
func (c *TokensClient) GetHistoricalBalance( ctx context.Context, req *HistoricalBalanceRequest, ) (*big.Int, error)
GetHistoricalBalance returns the balance of an ERC-20 token of an address at a certain block height.
func (*TokensClient) GetHistoricalSupply ¶
func (c *TokensClient) GetHistoricalSupply( ctx context.Context, req *HistoricalSupplyRequest, ) (*big.Int, error)
GetHistoricalSupply returns the amount of an ERC-20 token in circulation at a certain block height.
func (*TokensClient) GetTokenInfo ¶
func (c *TokensClient) GetTokenInfo( ctx context.Context, contractAddr common.Address, ) (result []TokenInfo, err error)
GetTokenInfo returns project information and social media links of an ERC-20/ERC-721 token.
func (*TokensClient) GetTotalSupply ¶
func (c *TokensClient) GetTotalSupply( ctx context.Context, contractAddr common.Address, ) (*big.Int, error)
GetTotalSupply returns the current amount of an ERC-20 token in circulation.