-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
155 lines (149 loc) · 3.98 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
type Account @entity {
id: ID!
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")
asERC1155: ERC1155Contract
ERC1155balances: [ERC1155Balance!]! @derivedFrom(field: "account")
ERC1155operatorOwner: [ERC1155Operator!]! @derivedFrom(field: "owner")
ERC1155operatorOperator: [ERC1155Operator!]! @derivedFrom(field: "operator")
ERC1155transferFromEvent: [ERC1155Transfer!]! @derivedFrom(field: "from")
ERC1155transferToEvent: [ERC1155Transfer!]! @derivedFrom(field: "to")
ERC1155transferOperatorEvent: [ERC1155Transfer!]! @derivedFrom(field: "operator")
}
type ERC721Contract @entity {
id: ID!
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 {
id: ID!
transaction: Transaction!
timestamp: BigInt!
contract: ERC721Contract!
token: ERC721Token!
from: Account!
to: Account!
}
type ERC1155Contract @entity {
id: ID!
asAccount: Account!
tokens: [ERC1155Token!]! @derivedFrom(field: "contract")
balances: [ERC1155Balance!]! @derivedFrom(field: "contract")
operators: [ERC1155Operator!]! @derivedFrom(field: "contract")
transfers: [ERC1155Transfer!]! @derivedFrom(field: "contract")
}
type ERC1155Token @entity {
id: ID!
contract: ERC1155Contract!
identifier: BigInt!
uri: String
totalSupply: ERC1155Balance!
balances: [ERC1155Balance!]! @derivedFrom(field: "token")
transfers: [ERC1155Transfer!]! @derivedFrom(field: "token")
}
type ERC1155Balance @entity {
id: ID!
contract: ERC1155Contract!
token: ERC1155Token!
account: Account
value: BigDecimal!
valueExact: BigInt!
transferFromEvent: [ERC1155Transfer!]! @derivedFrom(field: "fromBalance")
transferToEvent: [ERC1155Transfer!]! @derivedFrom(field: "toBalance")
}
type ERC1155Operator @entity {
id: ID!
contract: ERC1155Contract!
owner: Account!
operator: Account!
approved: Boolean!
}
type ERC1155Transfer implements Event @entity {
id: ID!
transaction: Transaction!
timestamp: BigInt!
contract: ERC1155Contract!
token: ERC1155Token!
operator: Account!
from: Account
fromBalance: ERC1155Balance
to: Account
toBalance: ERC1155Balance
value: BigDecimal!
valueExact: BigInt!
}
interface Event {
id: ID!
transaction: Transaction!
timestamp: BigInt!
}
type Transaction @entity {
id: ID!
timestamp: BigInt!
blockNumber: BigInt!
events: [Event!]! @derivedFrom(field: "transaction")
}
type Approval @entity {
id: ID!
owner: Bytes! # address
spender: Bytes! # address
value: BigInt! # uint256
timestamp: BigInt! # uint256
}
type Burned @entity {
id: ID!
burner: Bytes! # address
amount: BigInt! # uint256
burnPrice: BigInt! # uint256
tokenSupply: BigInt! # uint256
reserve: BigInt! # uint256
timestamp: BigInt! # uint256
}
type Minted @entity {
id: ID!
minter: Bytes! # address
amount: BigInt! # uint256
mintPrice: BigInt! # uint256
tokenSupply: BigInt! # uint256
royaltyPaid: BigInt! # uint256
reserve: BigInt! # uint256
timestamp: BigInt! # uint256
}
type OwnershipTransferred @entity {
id: ID!
previousOwner: Bytes! # address
newOwner: Bytes! # address
timestamp: BigInt! # uint256
}
type Transfer @entity {
id: ID!
from: Bytes! # address
to: Bytes! # address
value: BigInt! # uint256
timestamp: BigInt! # uint256
}