erc20

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ERC20_ABI = `` /* 4451-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20

type ERC20 struct {
	// contains filtered or unexported fields
}

func NewERC20

func NewERC20(w3 *web3.Web3, contractAddress common.Address) (*ERC20, error)

func (*ERC20) Address

func (e *ERC20) Address() common.Address

func (*ERC20) Allowance

func (e *ERC20) Allowance(owner, spender common.Address) (*big.Int, error)

func (*ERC20) Approve

func (e *ERC20) Approve(spender common.Address, limit, gasPrice, gasTipCap, gasFeeCap *big.Int) (common.Hash, error)

func (*ERC20) BalanceOf

func (e *ERC20) BalanceOf(owner common.Address) (*big.Int, error)

func (*ERC20) Decimals

func (e *ERC20) Decimals() (uint8, error)

func (*ERC20) EstimateGasLimit

func (e *ERC20) EstimateGasLimit(to common.Address, data []byte, gasPrice, wei *big.Int) (uint64, error)

func (*ERC20) SetConfirmation

func (e *ERC20) SetConfirmation(blockCount int)

func (*ERC20) SetTxPollTimeout

func (e *ERC20) SetTxPollTimeout(txPollTimeout int)

func (*ERC20) Symbol

func (e *ERC20) Symbol() (string, error)

func (*ERC20) SyncSendEIP1559Tx

func (e *ERC20) SyncSendEIP1559Tx(
	gasTipCap *big.Int,
	gasFeeCap *big.Int,
	gasLimit uint64,
	to common.Address,
	data []byte,
	wei *big.Int,
) (*eTypes.Receipt, error)

func (*ERC20) SyncSendRawTransactionForTx

func (e *ERC20) SyncSendRawTransactionForTx(
	gasPrice *big.Int, gasLimit uint64, to common.Address, data []byte, wei *big.Int,
) (*eTypes.Receipt, error)

func (*ERC20) Transfer

func (e *ERC20) Transfer(to common.Address, amount, gasPrice, gasTipCap, gasFeeCap *big.Int) (common.Hash, error)

func (*ERC20) WaitBlock

func (e *ERC20) WaitBlock(blockCount uint64) error

Jump to

Keyboard shortcuts

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