Documentation ¶
Index ¶
- func OnERC721Received(_operator common.Address, _from common.Address, _tokenId hash.Hash256, ...) []byte
- func SupportsInterface(interfaceID []byte) bool
- type NFT721ReceiverContract
- func (cont *NFT721ReceiverContract) Address() common.Address
- func (cont *NFT721ReceiverContract) Front() interface{}
- func (cont *NFT721ReceiverContract) Init(addr common.Address, master common.Address)
- func (cont *NFT721ReceiverContract) Master() common.Address
- func (cont *NFT721ReceiverContract) OnCreate(cc *types.ContractContext, Args []byte) error
- func (cont *NFT721ReceiverContract) OnReward(cc *types.ContractContext, b *types.Block, CountMap map[common.Address]uint32) (map[common.Address]*amount.Amount, error)
- type NFT721ReceiverContractConstruction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnERC721Received ¶
func OnERC721Received(_operator common.Address, _from common.Address, _tokenId hash.Hash256, _data []byte) []byte
/ @notice Handle the receipt of an NFT / @dev The ERC721 smart contract calls this function on the recipient / after a `transfer`. This function MAY throw to revert and reject the / transfer. Return of other than the magic value MUST result in the / transaction being reverted. / Note: the contract address is always the message sender. / @param _operator The address which called `safeTransferFrom` function / @param _from The address which previously owned the token / @param _tokenId The NFT identifier which is being transferred / @param _data Additional data with no specified format / @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` / unless throwing
func SupportsInterface ¶
//////////////////////////////////////////////// Public Read Functions ////////////////////////////////////////////////
Types ¶
type NFT721ReceiverContract ¶
type NFT721ReceiverContract struct {
// contains filtered or unexported fields
}
func (*NFT721ReceiverContract) Address ¶
func (cont *NFT721ReceiverContract) Address() common.Address
func (*NFT721ReceiverContract) Front ¶
func (cont *NFT721ReceiverContract) Front() interface{}
func (*NFT721ReceiverContract) Init ¶
func (cont *NFT721ReceiverContract) Init(addr common.Address, master common.Address)
func (*NFT721ReceiverContract) Master ¶
func (cont *NFT721ReceiverContract) Master() common.Address
func (*NFT721ReceiverContract) OnCreate ¶
func (cont *NFT721ReceiverContract) OnCreate(cc *types.ContractContext, Args []byte) error
type NFT721ReceiverContractConstruction ¶
type NFT721ReceiverContractConstruction struct { }