erc

package module
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 8 Imported by: 5

README

ERCs

ERC20

follow EIP20 token standard

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20Info

type ERC20Info struct {
	Network  *string
	Address  *string
	Symbol   *string
	Decimals *int
	Contract *erc20.Erc20
}

Basic info of ERC20 token.

func NewErc20 added in v0.5.4

func NewErc20(address string, network string, client bind.ContractBackend) (*ERC20Info, error)

Create a new ERC20 token.

func (*ERC20Info) BalanceOf

func (t *ERC20Info) BalanceOf(address string) (decimal.Decimal, error)

Return the balance, already divided by decimals.

func (*ERC20Info) TotalSupply

func (t *ERC20Info) TotalSupply() (decimal.Decimal, error)

Return token's total supply amount, already divided by decimals.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL