-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
109 lines (99 loc) · 2.08 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
type ERC1155Token @entity {
# {tokenID}
id: ID!
totalSupply: BigInt
numericId: BigInt!
owners: [ERC1155TokenOwner!]! @derivedFrom(field: "token")
uri: String
meta: Metadata
transfers: [ERC1155Transfer!]! @derivedFrom(field: "token")
contract: ERC1155Contract
}
type Metadata @entity {
id: ID!
name: String
description: String
image: String
attributes: [Attribute!]
animationUrl: String
type: String
}
type Attribute @jsonField {
display: String
trait: String
value: String!
}
type ERC1155Owner @entity {
# {owner address}
id: ID!
ownedTokens: [ERC1155TokenOwner!]! @derivedFrom(field: "owner")
}
type ERC1155TokenOwner @entity {
# ${owner.id}-${token.id}
id: ID!
owner: ERC1155Owner!
token: ERC1155Token!
balance: BigInt!
}
type ERC1155Contract @entity {
# {contract address}
id: ID!
name: String
symbol: String
totalSupply: BigInt!
mintedTokens: [ERC1155Token!]! @derivedFrom(field: "contract")
contractURI: String
contractURIUpdated: BigInt
address: String
decimals: Int
}
type ERC1155Transfer @entity {
# {txhash}-{tokenID}-{txlogindex}
id: ID!
token: ERC1155Token!
# Empty from is minting
from: ERC1155Owner
# Empty to is burning
to: ERC1155Owner
timestamp: BigInt!
block: BigInt!
transactionHash: String!
}
type ERC721Token @entity {
id: ID!
numericId: BigInt!
owner: ERC721Owner
uri: String
meta: Metadata
transfers: [ERC721Transfer!]! @derivedFrom(field: "token")
contract: ERC721Contract
}
type ERC721Owner @entity {
id: ID!
ownedTokens: [ERC721Token!]! @derivedFrom(field: "owner")
balance: BigInt
}
type ERC721Contract @entity {
# 1
id: ID!
name: String
symbol: String
totalSupply: BigInt
mintedTokens: [ERC721Token!]! @derivedFrom(field: "contract")
contractURI: String
contractURIUpdated: BigInt
address: String
decimals: Int
}
type ERC721Transfer @entity {
# {txhash}-{txlogindex}
id: ID!
token: ERC721Token!
# Empty from is minting
from: ERC721Owner
# Empty to is burning
to: ERC721Owner
timestamp: BigInt!
block: BigInt!
transactionHash: String!
}