Search Apps Documentation Source Content File Folder Download Copy Actions Download

igrc721.gno

0.82 Kb ยท 31 lines
 1package grc721
 2
 3type IGRC721 interface {
 4	BalanceOf(owner address) (int64, error)
 5	OwnerOf(tid TokenID) (address, error)
 6	SetTokenURI(tid TokenID, tURI TokenURI) (bool, error)
 7	SafeTransferFrom(from, to address, tid TokenID) error
 8	TransferFrom(from, to address, tid TokenID) error
 9	Approve(approved address, tid TokenID) error
10	SetApprovalForAll(operator address, approved bool) error
11	GetApproved(tid TokenID) (address, error)
12	IsApprovedForAll(owner, operator address) bool
13}
14
15type (
16	TokenID  string
17	TokenURI string
18)
19
20func (t TokenID) String() string  { return string(t) }
21func (t TokenURI) String() string { return string(t) }
22
23const (
24	MintEvent           = "Mint"
25	BurnEvent           = "Burn"
26	TransferEvent       = "Transfer"
27	ApprovalEvent       = "Approval"
28	ApprovalForAllEvent = "ApprovalForAll"
29)
30
31type NFTGetter func() IGRC721