Documentation ¶
Index ¶
- func Connect(url string) (*ethclient.Client, error)
- func CreateTransactionSigner(client *ethclient.Client, chainID int64, pvtKey *ecdsa.PrivateKey) (*bind.TransactOpts, error)
- func PvtKeyToPubAddress(pvtKey *ecdsa.PrivateKey) (common.Address, error)
- type ERC721CMD
- type ERC721CMDImpl
- func (e *ERC721CMDImpl) Approve(spender common.Address, tokenID *big.Int) (*types.Transaction, error)
- func (e *ERC721CMDImpl) BalanceOf(owner common.Address) (*big.Int, error)
- func (e *ERC721CMDImpl) GetApproved(tokenID *big.Int) (common.Address, error)
- func (e *ERC721CMDImpl) Mint(receiver common.Address, tokenID *big.Int) (*types.Transaction, error)
- func (e *ERC721CMDImpl) OwnerOf(tokenID *big.Int) (common.Address, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) GetApproved ¶
func (*ERC721CMDImpl) Mint ¶
func (e *ERC721CMDImpl) Mint(receiver common.Address, tokenID *big.Int) (*types.Transaction, error)
Click to show internal directories.
Click to hide internal directories.