-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
200 lines (177 loc) · 4.51 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
type Domain @entity {
id: ID! # The namehash of the name
name: String # The human readable name, if known. Unknown portions replaced with hash in square brackets (eg, foo.[1234].eth)
labelName: String # The human readable label name (imported from CSV), if known
labelhash: Bytes # keccak256(labelName)
parent: Domain # The namehash (id) of the parent name
subdomains: [Domain!]! @derivedFrom(field: "parent") # Can count domains from length of array
resolvedAddress: Account # Address logged from current resolver, if any
owner: Account!
resolver: Resolver
ttl: BigInt
isMigrated: Boolean!
createdAt: BigInt!
events: [DomainEvent!]! @derivedFrom(field: "domain")
}
interface DomainEvent {
id: ID!
domain: Domain!
blockNumber: Int!
transactionID: Bytes!
}
type Transfer implements DomainEvent @entity {
id: ID!
domain: Domain!
blockNumber: Int!
transactionID: Bytes!
owner: Account!
}
type NewOwner implements DomainEvent @entity {
id: ID!
parentDomain: Domain!
domain: Domain!
blockNumber: Int!
transactionID: Bytes!
owner: Account!
}
type NewResolver implements DomainEvent @entity {
id: ID!
domain: Domain!
blockNumber: Int!
transactionID: Bytes!
resolver: Resolver!
}
type NewTTL implements DomainEvent @entity {
id: ID!
domain: Domain!
blockNumber: Int!
transactionID: Bytes!
ttl: BigInt!
}
type Account @entity {
id: ID!
domains: [Domain!]! @derivedFrom(field: "owner")
registrations: [Registration!] @derivedFrom(field: "registrant")
}
type Registration @entity {
id: ID!
domain: Domain
registrationDate: BigInt!
expiryDate: BigInt!
cost: BigInt
registrant: Account!
labelName: String
events: [RegistrationEvent!]! @derivedFrom(field: "registration")
}
interface RegistrationEvent {
id: ID!
registration: Registration!
blockNumber: Int!
transactionID: Bytes!
}
type NameRegistered implements RegistrationEvent @entity {
id: ID!
registration: Registration!
blockNumber: Int!
transactionID: Bytes!
registrant: Account!
expiryDate: BigInt!
}
type NameRenewed implements RegistrationEvent @entity {
id: ID!
registration: Registration!
blockNumber: Int!
transactionID: Bytes!
expiryDate: BigInt!
}
type NameTransferred implements RegistrationEvent @entity {
id: ID!
registration: Registration!
blockNumber: Int!
transactionID: Bytes!
newOwner: Account!
}
type Resolver @entity {
id: ID! # Concatenation of resolver address and namehash
domain: Domain
address: Bytes! # Address of resolver contract
addr: Account # Current value of addr record (per events)
contentHash: Bytes # Content hash, in binary format.
texts: [String!] # Set of observed text record keys
coinTypes: [Int!] # Set of observed SLIP-44 coin types
events: [ResolverEvent!]! @derivedFrom(field: "resolver")
}
interface ResolverEvent {
id: ID! # Concatenation of block number and log ID
resolver: Resolver! # Used to derive relationships to Resolvers
blockNumber: Int!
transactionID: Bytes!
}
type AddrChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
addr: Account!
}
type MulticoinAddrChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
coinType: Int!
addr: Bytes!
}
type NameChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
name: String!
}
type AbiChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
contentType: BigInt!
}
type PubkeyChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
x: Bytes!
y: Bytes!
}
type TextChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
key: String!
}
type ContenthashChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
hash: Bytes!
}
type InterfaceChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
interfaceID: Bytes!
implementer: Bytes!
}
type AuthorisationChanged implements ResolverEvent @entity {
id: ID!
resolver: Resolver!
blockNumber: Int!
transactionID: Bytes!
owner: Bytes!
target: Bytes!
isAuthorized: Boolean!
}