Documentation
¶
Index ¶
- Constants
- type Erc20Contract
- func (c *Erc20Contract) Address() common.Address
- func (c *Erc20Contract) BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)
- func (c *Erc20Contract) Decimals() uint8
- func (c *Erc20Contract) Name() string
- func (c *Erc20Contract) Symbol() string
- func (c *Erc20Contract) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- type IErc20Token
Constants ¶
View Source
const (
Erc20AbiString string = `` /* 719-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Erc20Contract ¶
type Erc20Contract struct {
// contains filtered or unexported fields
}
Simple binding for ERC20 tokens
func NewErc20Contract ¶
func NewErc20Contract(address common.Address, client eth.IExecutionClient, queryMgr *eth.QueryManager, txMgr *eth.TransactionManager, opts *bind.CallOpts) (*Erc20Contract, error)
Creates a contract wrapper for the ERC20 at the given address
func (*Erc20Contract) Address ¶
func (c *Erc20Contract) Address() common.Address
The address of the token
func (*Erc20Contract) BalanceOf ¶
func (c *Erc20Contract) BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)
Get the token balance for an address
func (*Erc20Contract) Decimals ¶
func (c *Erc20Contract) Decimals() uint8
Get the number of decimal places the token uses
func (*Erc20Contract) Transfer ¶
func (c *Erc20Contract) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for transferring the ERC20 to another address
type IErc20Token ¶
type IErc20Token interface { // The address of the token Address() common.Address // Get the full name of the token Name() string // Get the token tracker symbol Symbol() string // Get the number of decimal places the token uses Decimals() uint8 // The token balance of the given address BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address) // Transfer tokens to a different address Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error) }
Simple binding for ERC20 tokens
Click to show internal directories.
Click to hide internal directories.