contracts

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	WalletService interfaces.WalletService
	TxService     interfaces.TxService
	Interface     *contractsinterfaces.Token
}

func NewToken

func NewToken(
	w interfaces.WalletService,
	tx interfaces.TxService,
	contractAddress common.Address,
	backend bind.ContractBackend,
) (*Token, error)

func (*Token) Allowance

func (t *Token) Allowance(owner common.Address, spender common.Address) (*big.Int, error)

func (*Token) Approve

func (t *Token) Approve(spender common.Address, amount *big.Int) (*eth.Transaction, error)

func (*Token) ApproveFrom

func (t *Token) ApproveFrom(w *types.Wallet, spender common.Address, amount *big.Int) (*eth.Transaction, error)

func (*Token) BalanceOf

func (t *Token) BalanceOf(owner common.Address) (*big.Int, error)

func (*Token) GetCustomTxSendOptions

func (t *Token) GetCustomTxSendOptions(w *types.Wallet) *bind.TransactOpts

func (*Token) GetTxCallOptions

func (t *Token) GetTxCallOptions() *bind.CallOpts

func (*Token) GetTxSendOptions

func (t *Token) GetTxSendOptions() (*bind.TransactOpts, error)

func (*Token) ListenToTransferEvents

func (t *Token) ListenToTransferEvents() (chan *contractsinterfaces.TokenTransfer, error)

func (*Token) PrintTransferEvents

func (t *Token) PrintTransferEvents() error

func (*Token) SetTxSender

func (t *Token) SetTxSender(w *types.Wallet)

func (*Token) TotalSupply

func (t *Token) TotalSupply() (*big.Int, error)

func (*Token) Transfer

func (t *Token) Transfer(receiver common.Address, amount *big.Int) (*eth.Transaction, error)

func (*Token) TransferFrom

func (t *Token) TransferFrom(sender, receiver common.Address, amount *big.Int) (*eth.Transaction, error)

func (*Token) TransferFromCustomWallet

func (t *Token) TransferFromCustomWallet(w *types.Wallet, receiver common.Address, amount *big.Int) (*eth.Transaction, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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