erc20

package
v1.5.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ERC20_ABI = `` /* 4451-byte string literal not displayed */
View Source
const Uniswap_ABI = `` /* 11875-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) (hash common.Hash, ng *big.Int, err error)

func (*ERC20) ApproveCall added in v1.1.6

func (e *ERC20) ApproveCall(spender common.Address, limit, gasPrice, gasLimit, gasTipCap, gasFeeCap *big.Int) (hash common.Hash, err error)

func (*ERC20) ApproveGasLimit added in v1.2.2

func (e *ERC20) ApproveGasLimit(spender common.Address, limit, gasPrice, gasLimit, gasTipCap, gasFeeCap *big.Int) (hash common.Hash, ng *big.Int, err 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) Name added in v1.5.1

func (e *ERC20) Name() (string, 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) SyncSendRawTransactionForTxNonce added in v1.5.3

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

func (*ERC20) Transfer

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

func (*ERC20) TransferCall added in v1.2.6

func (e *ERC20) TransferCall(to common.Address, amount, gasPrice, gasLimit, gasTipCap, gasFeeCap *big.Int) (hash common.Hash, err error)

func (*ERC20) TransferNonce added in v1.5.3

func (e *ERC20) TransferNonce(to common.Address, amount, gasPrice, gasLimit, gasTipCap, gasFeeCap *big.Int, nonce uint64) (hash common.Hash, err error)

func (*ERC20) WaitBlock

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

type UniSwap added in v1.3.3

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

func NewUniSwap added in v1.3.3

func NewUniSwap(w3 *web3.Web3, contractAddress common.Address) (*UniSwap, error)

func (*UniSwap) EstimateGasLimit added in v1.3.3

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

func (*UniSwap) SwapETHForExactTokens added in v1.3.3

func (e *UniSwap) SwapETHForExactTokens(amountOut *big.Int, path []common.Address, to common.Address, deadline, gasPrice *big.Int, gasLimit uint64) (hash common.Hash, err error)

func (*UniSwap) SyncSendRawTransactionForTx added in v1.3.3

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

Jump to

Keyboard shortcuts

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