-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
58 lines (58 loc) · 1.53 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
type Account @entity {
id: Bytes!
asERC721: ERC721Contract
ERC721tokens: [ERC721Token!]! @derivedFrom(field: "owner")
ERC721operatorOwner: [ERC721Operator!]! @derivedFrom(field: "owner")
ERC721operatorOperator: [ERC721Operator!]! @derivedFrom(field: "operator")
ERC721transferFromEvent: [ERC721Transfer!]! @derivedFrom(field: "from")
ERC721transferToEvent: [ERC721Transfer!]! @derivedFrom(field: "to")
events: [Event!]! @derivedFrom(field: "emitter")
}
type ERC721Contract @entity(immutable: true) {
id: Bytes!
asAccount: Account!
supportsMetadata: Boolean
name: String
symbol: String
tokens: [ERC721Token!]! @derivedFrom(field: "contract")
operators: [ERC721Operator!]! @derivedFrom(field: "contract")
transfers: [ERC721Transfer!]! @derivedFrom(field: "contract")
}
type ERC721Token @entity {
id: ID!
contract: ERC721Contract!
identifier: BigInt!
owner: Account!
approval: Account!
uri: String
transfers: [ERC721Transfer!]! @derivedFrom(field: "token")
}
type ERC721Operator @entity {
id: ID!
contract: ERC721Contract!
owner: Account!
operator: Account!
approved: Boolean!
}
type ERC721Transfer implements Event @entity(immutable: true) {
id: ID!
emitter: Account!
transaction: Transaction!
timestamp: BigInt!
contract: ERC721Contract!
token: ERC721Token!
from: Account!
to: Account!
}
interface Event {
id: ID!
transaction: Transaction!
emitter: Account!
timestamp: BigInt!
}
type Transaction @entity(immutable: true) {
id: ID!
timestamp: BigInt!
blockNumber: BigInt!
events: [Event!]! @derivedFrom(field: "transaction")
}