forked from Clipto-Platform/clipto-subgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
265 lines (186 loc) · 5.2 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
enum EventType {
MINT
TRANSFER
BURN
}
type Platform @entity {
" address of the main contract "
id: ID!
" contract details "
name: String!
network: String!
version: String!
" metrics "
totalUsers: Int!
totalCreators: Int!
totalRequests: Int!
}
type Account @entity {
" address of the user "
id: ID!
nftOwned: [CliptoToken!]! @derivedFrom(field: "originalRequester")
}
type Creator @entity {
" address of the creator "
id: ID!
" metadata uri "
metadataURI: String!
" address of the creator "
address: Bytes!
" nft contract address for the creator "
nftTokenAddress: Bytes!
" twitter handle of the creator "
twitterHandle: String!
" lens handle of the creator "
lensHandle: String!
" bio description of the creator "
bio: String!
" min delivery time for the creator "
deliveryTime: BigInt!
" sample work, links of video of the creator "
demos: [String!]!
" profile pic link of the creator "
profilePicture: String!
" user name of the creator "
userName: String!
" min price accepted for each request "
price: BigDecimal!
" min price for business requests "
businessPrice: BigDecimal!
" creator's business services "
customServices: [String!]!
" transaction hash of the creator creation and updation "
txHash: Bytes!
" block number of creation and updation "
block: BigInt!
" timestamp of creation "
timestamp: BigInt!
" timestamp of creation and updation "
updated: BigInt!
" NFT data "
nftContract: [NFTContract!]! @derivedFrom(field: "creator")
" tokens minted "
nftTokens: [CliptoToken!]! @derivedFrom(field: "creator")
" all requests of creator "
requests: [Request!]! @derivedFrom(field: "creator")
}
type Request @entity {
" {creator's address} - {version} - {request id} "
id: ID!
" request version- 0-> old contract, 1-> multi token, Nft contract update "
version: String!
" metadata uri "
metadataURI: String!
" request id represents the index of Request array "
requestId: BigInt!
" creator address for whom the request is made "
creator: Creator!
" user address who made the request "
requester: Bytes!
"nft token receiver"
nftReceiver: Bytes!
" amount in ether unit amount * 10 ^ 18 "
amount: BigInt!
" erc 20 token type used for the request "
erc20: Bytes!
" token id of the nft created for the request "
nftTokenId: BigInt!
" token uri for the nft metadata "
nftTokenUri: String!
" address of the nft contract of the creator "
nftTokenAddress: Bytes!
" status of the refund made for the request "
refunded: Boolean!
" status for the completion of the request "
delivered: Boolean!
" status of rejection of the request "
rejected: Boolean!
" whether the request is related to business "
isBusiness: Boolean!
" description/instruction for the request "
description: String!
" business name for business type request"
businessName: String!
" business email for business type request "
businessEmail: String!
" business twitter for business type request "
businessTwitter: String!
" business details for business type request "
businessInfo: String!
" buisness request type"
businessRequestType: String!
" deadline for the request, no of days after the creation "
deadline: BigInt!
" hash of the transaction the request was created and updated "
txHash: Bytes!
" block the request was made and updated "
block: BigInt!
" timestamp of the request creation "
createdTimestamp: BigInt!
" timestamp of request creation and updation "
updatedTimestamp: BigInt!
}
type NFTContract @entity {
" Contract address "
id: ID!
" token symbol "
symbol: String!
" token name "
name: String!
" version of nft contract "
version: String!
" total supply of tokens "
totalSupply: BigInt!
" Creator for whom this contract is assigned "
creator: Creator!
" all tokens under this contract "
cliptoTokens: [CliptoToken!]! @derivedFrom(field: "nftContract")
" all tokens under this contract "
events: [Transfer!]! @derivedFrom(field: "nftContract")
" created timestamp and bock, only updated on creation "
blockNumber: BigInt!
blockHash: Bytes!
txHash: Bytes!
timestamp: BigInt!
}
type CliptoToken @entity {
" { nft contract address } - { clipto token id }"
id: ID!
" token id "
tokenId: BigInt!
" nft contract address "
nftContract: NFTContract!
" original requester, first requester who received on mint "
originalRequester: Account!
" current owner of the token "
currentOwner: Account!
" who transfered this token "
from: Account!
" creator of the contract, one who minted "
creator: Creator!
" token metdata "
tokenUri: String!
" events under this token "
events: [Transfer!]! @derivedFrom(field: "cliptoToken")
}
type Transfer @entity {
" { contract address } - { hash }"
id: ID!
" from account "
from: Account!
" to account "
to: Account!
" token id for easier access "
tokenId: BigInt!
" nft transfered "
cliptoToken: CliptoToken!
" contract "
nftContract: NFTContract!
" type of event "
eventType: EventType!
" transaction details "
blockNumber: BigInt!
blockHash: Bytes!
txHash: Bytes!
timestamp: BigInt!
}