Documentation
¶
Index ¶
- Constants
- type Erc20Contract
- func (c *Erc20Contract) BalanceOf(address common.Address, opts *bind.CallOpts) (*big.Int, error)
- func (c *Erc20Contract) EstimateTransferGas(to common.Address, amount *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
- func (c *Erc20Contract) GetDecimals(opts *bind.CallOpts) (uint8, error)
- func (c *Erc20Contract) GetName(opts *bind.CallOpts) (string, error)
- func (c *Erc20Contract) GetSymbol(opts *bind.CallOpts) (string, error)
- func (c *Erc20Contract) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*types.Transaction, error)
Constants ¶
View Source
const (
Erc20AbiString string = `` /* 1089-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Erc20Contract ¶
type Erc20Contract struct {
Name string
Symbol string
Decimals uint8
// contains filtered or unexported fields
}
func NewErc20Contract ¶
func NewErc20Contract(address common.Address, client rocketpool.ExecutionClient, opts *bind.CallOpts) (*Erc20Contract, error)
Creates a contract wrapper for the ERC20 at the given address
func (*Erc20Contract) EstimateTransferGas ¶
func (c *Erc20Contract) EstimateTransferGas(to common.Address, amount *big.Int, opts *bind.TransactOpts) (gaslimit.Limits, error)
Estimate the gas for transferring an ERC20 to another address
func (*Erc20Contract) GetDecimals ¶
func (c *Erc20Contract) GetDecimals(opts *bind.CallOpts) (uint8, error)
Get the token decimals
func (*Erc20Contract) GetName ¶
func (c *Erc20Contract) GetName(opts *bind.CallOpts) (string, error)
Get the token name
func (*Erc20Contract) GetSymbol ¶
func (c *Erc20Contract) GetSymbol(opts *bind.CallOpts) (string, error)
Get the token symbol
func (*Erc20Contract) Transfer ¶
func (c *Erc20Contract) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*types.Transaction, error)
Transfer an ERC20 to another address
Click to show internal directories.
Click to hide internal directories.