igrc1155.gno
0.85 Kb ยท 40 lines
1package grc1155
2
3type IGRC1155 interface {
4 SafeTransferFrom(from, to address, tid TokenID, amount int64) error
5 SafeBatchTransferFrom(from, to address, batch []TokenID, amounts []int64) error
6 BalanceOf(owner address, tid TokenID) (int64, error)
7 BalanceOfBatch(owners []address, batch []TokenID) ([]int64, error)
8 SetApprovalForAll(operator address, approved bool) error
9 IsApprovedForAll(owner, operator address) bool
10}
11
12type TokenID string
13
14type TransferSingleEvent struct {
15 Operator address
16 From address
17 To address
18 TokenID TokenID
19 Amount int64
20}
21
22type TransferBatchEvent struct {
23 Operator address
24 From address
25 To address
26 Batch []TokenID
27 Amounts []int64
28}
29
30type ApprovalForAllEvent struct {
31 Owner address
32 Operator address
33 Approved bool
34}
35
36type UpdateURIEvent struct {
37 URI string
38}
39
40type MultiTokenGetter func() IGRC1155