-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
174 lines (122 loc) · 2.63 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
type VisitorsInfo @entity {
id: ID!
"Number of minted token"
numTokens: BigInt!
"number of owners"
numOwners: BigInt!
"number of different account's owners including the ones that have sell/burn"
numAccounts: BigInt!
"Last Minted time in seconds"
lastMintDate: BigInt!
"Last transfer in seconds"
lastTransferDate: BigInt!
"Last Burned in seconds"
lastBurned: BigInt!
}
type Block @entity {
"Internal ID "
id: ID!
"event timestamp"
timestamp: BigInt!
"Block's number"
number: BigInt!
"Transactions contained in this block"
transactions: [Transaction!] @derivedFrom(field: "block")
}
type Token @entity {
"Id of the Token"
id: ID!
tokenID: BigInt!
"Owner's Account address"
owner: Account!
"URI that points the metadata of the NFT"
uri: String!
"Minted time in seconds (?)"
mintTime: BigInt!
"Transaction hash ultima vez que se tradeo"
transaction: Bytes!
"Current burned status"
burned: Boolean
}
type Account @entity {
"address of the Account"
id: ID!
"Address of the Account"
address: Bytes!
"Array of tokens owned by the Account"
tokens: [Token!]! @derivedFrom(field: "owner")
"number of tokens owned by the Account"
numTokens: BigInt!
}
enum TranasctionType {
MINT
BURN
TRANSFER
}
type Transaction @entity {
id: ID!
"Related block"
block: Block!
gasPrice: BigInt!
gasLimit: BigInt!
}
interface ERC721Transaction {
"Internal ID used for indexation"
id: ID!
"Seller account"
from: Account
"Buyer account"
to: Account
"Current transaction type"
type: TranasctionType!
"Related block"
block: Block!
}
type Burn implements ERC721Transaction @entity {
"hash of the transaction"
id: ID!
"Token transfer"
token: Token!
"Address of the sender"
from: Account
"Address of the receiver"
to: Account
"Transaction hash "
transaction: Bytes!
"Related block"
block: Block!
"Current transaction type"
type: TranasctionType!
}
type Mint implements ERC721Transaction @entity {
"hash of the transaction"
id: ID!
"Token transfer"
token: Token!
"Address of the sender"
from: Account
"Address of the receiver"
to: Account
"Transaction hash "
transaction: Bytes!
"Related block"
block: Block!
"Current transaction type"
type: TranasctionType!
}
type Transfer implements ERC721Transaction @entity {
"hash of the transaction"
id: ID!
"Token transfer"
token: Token!
"Address of the sender"
from: Account
"Address of the receiver"
to: Account
"Transaction hash "
transaction: Bytes!
"Related block"
block: Block!
"Current transaction type"
type: TranasctionType!
}