trc20

package
v0.0.0-...-31e81b3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TRC20

type TRC20 struct {
	ContractAddress address.Address
	*client.GrpcClient
}

func NewTrc20

func NewTrc20(g *client.GrpcClient, contractAddr string) (*TRC20, error)

func (*TRC20) Approve

func (t *TRC20) Approve(ks *keystore.Keystore, spender string, amount *big.Int) (*transaction.Transaction, error)

func (*TRC20) Call

func (t *TRC20) Call(ks *keystore.Keystore, method string, params []byte) (*transaction.Transaction, error)

func (*TRC20) CallConstant

func (t *TRC20) CallConstant(method string, params []byte) (string, error)

func (*TRC20) GetAllowance

func (t *TRC20) GetAllowance(owner, spender string) (*big.Int, error)

func (*TRC20) GetBalance

func (t *TRC20) GetBalance(addr string) (*big.Int, error)

func (*TRC20) GetDecimals

func (t *TRC20) GetDecimals() (*big.Int, error)

func (*TRC20) GetName

func (t *TRC20) GetName() (string, error)

func (*TRC20) GetSymbol

func (t *TRC20) GetSymbol() (string, error)

func (*TRC20) GetTotalSupply

func (t *TRC20) GetTotalSupply() (*big.Int, error)

func (*TRC20) Transfer

func (t *TRC20) Transfer(ks *keystore.Keystore, to string, amount *big.Int) (*transaction.Transaction, error)

func (*TRC20) TransferFrom

func (t *TRC20) TransferFrom(ks *keystore.Keystore, from, to string, amount *big.Int) (*transaction.Transaction, error)

Jump to

Keyboard shortcuts

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