-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
195 lines (140 loc) Β· 4.43 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
# Represents an approval record, immutable once created
type Approval @entity(immutable: true) {
# Unique identifier for the approval record
id: Bytes!
# Ethereum address of the owner
owner: Bytes!
# Ethereum address of the approved entity
approved: Bytes!
# Token ID (uint256) associated with this approval
tokenId: BigInt!
# Block number where this approval was recorded
blockNumber: BigInt!
# Timestamp of the block
blockTimestamp: BigInt!
# Hash of the transaction for this approval
transactionHash: Bytes!
}
# Represents a global approval for an operator to manage all of an owner's assets
type ApprovalForAll @entity(immutable: true) {
# Unique identifier for the global approval record
id: Bytes!
# Ethereum address of the owner
owner: Bytes!
# Ethereum address of the operator
operator: Bytes!
# Boolean flag indicating approval status
approved: Boolean!
# Block number where this approval for all was recorded
blockNumber: BigInt!
# Timestamp of the block
blockTimestamp: BigInt!
# Hash of the transaction for this approval for all
transactionHash: Bytes!
}
# Represents the reveal event of a CloneX token
type CloneXRevealed @entity(immutable: true) {
# Unique identifier for the reveal event
id: Bytes!
# Token ID (uint256) of the revealed token
tokenId: BigInt!
# Associated file ID (string) for the reveal
fileId: String!
# Block number where this reveal was recorded
blockNumber: BigInt!
# Timestamp of the block
blockTimestamp: BigInt!
# Hash of the transaction for this reveal event
transactionHash: Bytes!
}
# Represents an ownership transfer event, immutable once created
type OwnershipTransferred @entity(immutable: true) {
# Unique identifier for the ownership transfer event
id: Bytes!
# Ethereum address of the previous owner
previousOwner: Bytes!
# Ethereum address of the new owner
newOwner: Bytes!
# Block number where this transfer was recorded
blockNumber: BigInt!
# Timestamp of the block
blockTimestamp: BigInt!
# Hash of the transaction for this ownership transfer
transactionHash: Bytes!
}
# Represents a transfer of a token, immutable once created
type Transfer @entity(immutable: true) {
# Unique identifier for the transfer event
id: Bytes!
# Ethereum address of the sender
from: Bytes!
# Ethereum address of the receiver
to: Bytes!
# Token ID (uint256) of the transferred token
tokenId: BigInt!
# Block number where this transfer was recorded
blockNumber: BigInt!
# Timestamp of the block
blockTimestamp: BigInt!
# Hash of the transaction for this transfer
transactionHash: Bytes!
# Gas price paid for this transaction
gasPrice: BigInt!
}
# Represents an account in the system
type Account @entity {
# Unique identifier (Ethereum address) for the account
id: Bytes!
# Number of NFTs owned by the account
nftCount: BigInt!
# List of token IDs owned by the account
ownedTokenIds: [BigInt!]!
# Total gas spent by the account on transactions
totalGasSpent: BigInt!
# List of transaction hashes involving this account
transactions: [Bytes!]!
}
# Represents the transfer history of a token
type TransferHistory @entity {
# Unique identifier for the transfer history record
id: ID!
# Associated token with this transfer history
token: Token!
# Account that sent the token
sender: Account!
# Account that received the token
receiver: Account!
# Timestamp when the transfer occurred
timestamp: BigInt!
# Hash of the transaction for this transfer
transactionHash: Bytes
# Block number where this transfer was recorded
blockNumber: BigInt
# Gas price paid for this transaction
gasPrice: BigInt
}
# Represents a token in the system
type Token @entity {
# Unique identifier for the token
id: ID!
# Token ID (uint256) of the token
tokenId: BigInt!
# Current owner of the token
owner: Account!
# List of transfer history records for the token
transferHistory: [TransferHistory!]!
# Metadata associated with the token
metadata: Metadata
}
# Represents metadata associated with a token
type Metadata @entity {
# Unique identifier for the token metadata
id: ID!
# Name of the token (The name and the token id aren't always
# the same. Don't ask me why, ask the devs of the contract)
# name: String!
# Image url for the token
image: String!
# Small blurred image url for the token to be used for base64 encoding
base64Image: String!
}