-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
194 lines (164 loc) · 5.03 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
type GlobalStat @entity {
id: Bytes!
totalExecutedBundlesCount: BigInt!
totalExecutedBundlesWithRefundCount: BigInt!
totalExecutedFastBidsCount: BigInt!
totalValidatorsPaid: BigInt!
totalUniqueSearchers: BigInt!
hourlyCollectionSnapshotGlobal: [HourlyCollectionSnapshotGlobal!]! @derivedFrom(field: "target")
dailyCollectionSnapshotGlobal: [DailyCollectionSnapshotGlobal!]! @derivedFrom(field: "target")
weeklyCollectionSnapshotGlobal: [WeeklyCollectionSnapshotGlobal!]! @derivedFrom(field: "target")
}
type Collection @entity {
id: ID!
timestamp: Int!
rangeVolume: BigInt!
validators: [Validator!]!
rangeTransactions: Int
topBid: BigInt!
}
type HourlyCollectionSnapshotGlobal @entity {
"The hour"
id: ID!
target: GlobalStat!
bundlesCollection: Collection!
bundlesWithRefundCollection: Collection!
fastBidsCollection: Collection!
}
type DailyCollectionSnapshotGlobal @entity {
"The day"
id: ID!
target: GlobalStat!
bundlesCollection: Collection!
bundlesWithRefundCollection: Collection!
fastBidsCollection: Collection!
}
type WeeklyCollectionSnapshotGlobal @entity {
"The week"
id: ID!
target: GlobalStat!
bundlesCollection: Collection!
bundlesWithRefundCollection: Collection!
fastBidsCollection: Collection!
}
type HourlyValidatorSnapshot @entity {
"The hour"
id: ID!
target: Validator!
bundlesCollection: Collection!
bundlesWithRefundCollection: Collection!
fastBidsCollection: Collection!
}
type DailyValidatorSnapshot @entity {
"The day"
id: ID!
target: Validator!
bundlesCollection: Collection!
bundlesWithRefundCollection: Collection!
fastBidsCollection: Collection!
}
type WeeklyValidatorSnapshot @entity {
"The week"
id: ID!
target: Validator!
bundlesCollection: Collection!
bundlesWithRefundCollection: Collection!
fastBidsCollection: Collection!
}
type Searcher @entity {
id: Bytes!
address: Bytes!
bundlesLanded: BigInt!
bundlesWithRefundLanded: BigInt!
fastBidsLanded: BigInt!
totalTipped: BigInt!
totalBundlesTipped: BigInt!
totalBundlesWithRefundTipped: BigInt!
totalFastBidsTipped: BigInt!
lastBundleLandedTimestamp: Int!
lastBundleWithRefundLandedTimestamp: Int!
lastFastBidLandedTimestamp: Int!
bundles: [RelayFlashBid!]! @derivedFrom(field: "sender")
bundlesWithRefund: [RelayFlashBidWithRefund!]! @derivedFrom(field: "sender")
fastBids: [RelayFastBid!]! @derivedFrom(field: "sender")
}
type Validator @entity {
id: Bytes!
address: Bytes!
totalTips: BigInt!
totalBundlesTips: BigInt!
totalBundlesWithRefundTips: BigInt!
totalFastBidsTips: BigInt!
totalExecutedBundlesCount: BigInt!
totalExecutedBundlesWithRefundCount: BigInt!
totalExecutedFastBidsCount: BigInt!
lastBundleReceivedTimestamp: Int!
lastBundleWithRefundReceivedTimestamp: Int!
lastFastBidReceivedTimestamp: Int!
hourlyValidatorSnapshot: [HourlyValidatorSnapshot!]! @derivedFrom(field: "target")
dailyValidatorSnapshot: [DailyValidatorSnapshot!]! @derivedFrom(field: "target")
weeklyValidatorSnapshot: [WeeklyValidatorSnapshot!]! @derivedFrom(field: "target")
bundles: [RelayFlashBid!]! @derivedFrom(field: "validator")
bundlesWithRefund: [RelayFlashBidWithRefund!]! @derivedFrom(field: "validator")
fastBids: [RelayFastBid!]! @derivedFrom(field: "validator")
standardPayments: [RelayProcessingPaidValidator!]! @derivedFrom(field: "validator")
customPayments: [CustomPaymentProcessorPaid!]! @derivedFrom(field: "payor")
}
type RelayFastBid @entity(immutable: true) {
id: Bytes!
sender: Searcher! # address
validator: Validator! # address
success: Boolean! # bool
bidAmount: BigInt! # uint256
searcherContractAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type RelayFlashBid @entity(immutable: true) {
id: Bytes!
sender: Searcher! # address
oppTxHash: Bytes! # bytes32
validator: Validator! # address
bidAmount: BigInt! # uint256
amountPaid: BigInt! # uint256
searcherContractAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type RelayFlashBidWithRefund @entity(immutable: true) {
id: Bytes!
sender: Searcher! # address
oppTxHash: Bytes! # bytes32
validator: Validator! # address
bidAmount: BigInt! # uint256
amountPaid: BigInt! # uint256
searcherContractAddress: Bytes! # address
refundedAmount: BigInt! # uint256
refundAddress: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type RelayProcessingPaidValidator @entity(immutable: true) {
id: Bytes!
validator: Validator! # address
validatorPayment: BigInt! # uint256
initiator: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
type CustomPaymentProcessorPaid @entity(immutable: true) {
id: Bytes!
payor: Validator! # address
payee: Bytes! # address
paymentProcessor: Bytes! # address
totalAmount: BigInt! # uint256
startBlock: BigInt! # uint256
endBlock: BigInt! # uint256
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}