erc20

package
v1.20.8 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: GPL-3.0, GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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) BalanceOf

func (c *Erc20Contract) BalanceOf(address common.Address, opts *bind.CallOpts) (*big.Int, error)

Get the token balance for an 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

Jump to

Keyboard shortcuts

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