tokens

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allowance

func Allowance(tokenContract *stader.Erc20TokenContractManager, owner common.Address, spender common.Address, opts *bind.CallOpts) (*big.Int, error)

Get a spender's Allowance for an address

func Approve

func Approve(tokenContract *stader.Erc20TokenContractManager, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Approve a token Allowance for a spender

func BalanceOf

func BalanceOf(tokenContract *stader.Erc20TokenContractManager, address common.Address, opts *bind.CallOpts) (*big.Int, error)

Get a token balance

func EstimateApproveGas

func EstimateApproveGas(tokenContract *stader.Erc20TokenContractManager, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error)

Estimate the gas of Approve

func EstimateTransferFromGas

func EstimateTransferFromGas(tokenContract *stader.Erc20TokenContractManager, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error)

Estimate the gas of TransferFrom

func EstimateTransferGas

func EstimateTransferGas(tokenContract *stader.Erc20TokenContractManager, to common.Address, amount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error)

Estimate the gas of Transfer

func GetEthBalance

func GetEthBalance(client stader.ExecutionClient, address common.Address, opts *bind.CallOpts) (*big.Int, error)

func TotalSupply

func TotalSupply(tokenContract *stader.Erc20TokenContractManager, opts *bind.CallOpts) (*big.Int, error)

Get a token's total supply

func Transfer

func Transfer(tokenContract *stader.Erc20TokenContractManager, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer tokens to an address

func TransferFrom

func TransferFrom(tokenContract *stader.Erc20TokenContractManager, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer tokens from a sender to an address

Types

type Balances

type Balances struct {
	ETH  *big.Int `json:"eth"`
	Sd   *big.Int `json:"sd"`
	Ethx *big.Int `json:"ethx"`
}

Token balances

Jump to

Keyboard shortcuts

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