This repository has been archived by the owner on Aug 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
/
schema.graphql
110 lines (97 loc) · 2.34 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
type Domain @entity {
id: ID! # The namehash of the name
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
owner: Account!
resolver: Resolver
ttl: BigInt
}
type Account @entity {
id: ID!
domains: [Domain!]! @derivedFrom(field: "owner")
domainCount: Int!
}
enum AuctionState {
AUCTION
FINALIZED
RELEASED
FORBIDDEN
}
type AuctionedName @entity {
id: ID!
domain: Domain
registrationDate: Int!
releaseDate: Int
winningBidder: Account
maxBid: BigInt
secondBid: BigInt
bidCount: Int!
state: AuctionState
}
type Resolver @entity {
id: ID! # Concatenation of resolver address and namehash
domain: Domain!
address: Bytes!
resolverEvents: [ResolverEvent!]! @derivedFrom(field: "resolverID")
}
interface ResolverEvent {
id: ID! # Concatenation of block number and log ID
node: Bytes!
resolverID: Resolver! # Used to derive relationships to Resolvers
}
type AddrChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
a: Bytes!
}
type NameChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
name: String!
}
type AbiChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
contentType: BigInt!
}
type PubkeyChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
x: Bytes!
y: Bytes!
}
# Currently not in use - follow this issue for status - https://github.com/graphprotocol/graph-node/issues/913
#type TextChanged implements ResolverEvent @entity {
# id: ID!
# node: Bytes!
# resolverID: String!
# indexedKey: String!
# key: String!
#}
type ContenthashChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
hash: Bytes!
}
type InterfaceChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
interfaceID: Bytes!
implementer: Bytes!
}
type AuthorisationChanged implements ResolverEvent @entity {
id: ID!
node: Bytes!
resolverID: Resolver!
owner: Bytes!
target: Bytes!
isAuthorized: Boolean!
}