erc721

package
v0.0.0-...-f9bcfd4 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(url string) (*ethclient.Client, error)

func CreateTransactionSigner

func CreateTransactionSigner(client *ethclient.Client, chainID int64, pvtKey *ecdsa.PrivateKey) (*bind.TransactOpts, error)

func PvtKeyToPubAddress

func PvtKeyToPubAddress(pvtKey *ecdsa.PrivateKey) (common.Address, error)

Types

type ERC721CMD

type ERC721CMD interface {
	Mint(receiver common.Address, tokenID *big.Int) (*types.Transaction, error)
	Approve(spender common.Address, tokenID *big.Int) (*types.Transaction, error)
	GetApproved(tokenID *big.Int) (common.Address, error)
	BalanceOf(owner common.Address) (*big.Int, error)
	OwnerOf(tokenID *big.Int) (common.Address, error)
}

type ERC721CMDImpl

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

func NewERC721CMDImpl

func NewERC721CMDImpl(conn *ethclient.Client, chainID int64, pvtKey *ecdsa.PrivateKey, token *contract.ERC721Token) *ERC721CMDImpl

func (*ERC721CMDImpl) Approve

func (e *ERC721CMDImpl) Approve(spender common.Address, tokenID *big.Int) (*types.Transaction, error)

func (*ERC721CMDImpl) BalanceOf

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

func (*ERC721CMDImpl) GetApproved

func (e *ERC721CMDImpl) GetApproved(tokenID *big.Int) (common.Address, error)

func (*ERC721CMDImpl) Mint

func (e *ERC721CMDImpl) Mint(receiver common.Address, tokenID *big.Int) (*types.Transaction, error)

func (*ERC721CMDImpl) OwnerOf

func (e *ERC721CMDImpl) OwnerOf(tokenID *big.Int) (common.Address, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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