generated from subsquid-labs/squid-frontier-evm-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.graphql
115 lines (104 loc) · 1.92 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
type CollectionEntity @entity {
id: ID!
blockNumber: BigInt
createdAt: DateTime!
currentOwner: String!
issuer: String!
max: Int! # totalSupply
meta: MetadataEntity
burned: Boolean
metadata: String
name: String
nfts: [NFTEntity!] @derivedFrom(field: "collection")
symbol: String
updatedAt: DateTime!
type: CollectionType!
}
type NFTEntity @entity {
id: ID!
blockNumber: BigInt
burned: Boolean!
collection: CollectionEntity!
createdAt: DateTime!
currentOwner: String!
events: [Event!] @derivedFrom(field: "nft")
hash: String! @index
issuer: String!
meta: MetadataEntity
metadata: String
name: String
price: BigInt
royalty: Int
sn: String!
count: BigInt!
updatedAt: DateTime!
}
type MetadataEntity @entity {
id: ID!
name: String
description: String
image: String
attributes: [Attribute!]
animationUrl: String
type: String
}
type Attribute @jsonField {
display: String
trait: String
value: String!
}
interface EventType {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String
interaction: Interaction!
meta: String!
}
type Event implements EventType @entity {
id: ID!
blockNumber: BigInt
timestamp: DateTime!
caller: String!
currentOwner: String! # currentOwner
interaction: Interaction!
meta: String!
nft: NFTEntity!
}
enum CollectionType {
ERC721
ERC1155
}
enum Interaction {
MINT
MINTNFT
LIST
UNLIST
BUY
SEND
CONSUME
}
# type Transfer @entity {
# id: ID!
# token: Token!
# from: Owner
# to: Owner
# timestamp: BigInt!
# block: Int!
# transactionHash: String!
# }
# type Contract @entity {
# id: ID!
# name: String
# symbol: String
# totalSupply: BigInt
# mintedTokens: [Token!]! @derivedFrom(field: "contract")
# }
# type Token @entity {
# id: ID!
# owner: Owner
# uri: String
# transfers: [Transfer!]! @derivedFrom(field: "token")
# contract: Contract
# }