forked from 0xmakesy/Sudoswap
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathschema.graphql
204 lines (186 loc) · 3.62 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
201
202
203
204
type NewPair @entity {
id: ID!
address: String
owner: String
blockNumber: BigInt
createdAt: BigInt
updatedAt: BigInt
createdTx: String
nft: String
initialBondingCurveAddress: String
initialAssetRecipient: String
poolType: BigInt
initialDelta: BigInt
initialFee: BigInt
initialSpotPrice: BigInt!
initialNFTIdInventory: [BigInt!]
initialInventoryCount: BigInt
initialETHLiquidity: BigInt
pair: Pair @derivedFrom(field:"initialAttributes")
}
type Pair @entity {
id: ID!
owner: String
createdTx: String
createdAt: BigInt
updatedAt: BigInt
nft: String
bondingCurveAddress: String
assetRecipient: String
poolType: BigInt
delta: BigInt
fee: BigInt
spotPrice: BigInt
nftIdInventory: [BigInt!]
inventoryCount: BigInt
ethLiquidity: BigInt
initialAttributes: NewPair
}
type ETHPairPrices @entity {
id: ID!
nftContract: String
minSpotAsk: BigInt
maxSpotBid: BigInt
}
type DailyETHPoolStat @entity {
id: ID!
dayTimestamp: BigInt
dayString: String
nftContract: String
erc20Contract: String
numSwaps: BigInt
swapVolumeETH: BigInt
approxPoolFees: BigInt
approxProtocolFees: BigInt
approxPoolRevenue: BigInt
approxPoolSpent: BigInt
ethDeposited: BigInt
ethWithdrawn: BigInt
nftsDeposited: BigInt
nftsWithdrawn: BigInt
numBuys: BigInt
numSells: BigInt
}
type DailyETHPairStat @entity {
id: ID!
pair: String
dayTimestamp: BigInt
dayString: String
nftContract: String
erc20Contract: String
numSwaps: BigInt
swapVolumeETH: BigInt
approxPairFees: BigInt
approxProtocolFees: BigInt
approxPairRevenue: BigInt
approxPairSpent: BigInt
ethDeposited: BigInt
ethWithdrawn: BigInt
nftsDeposited: BigInt
nftsWithdrawn: BigInt
minSpotAsk: BigInt
maxSpotBid: BigInt
numBuys: BigInt
numSells: BigInt
}
type DailyETHProtocolStat @entity {
id: ID!
dayTimestamp: BigInt
dayString: String
numSwaps: BigInt
swapVolumeETH: BigInt
approxPoolFees: BigInt
approxProtocolFees: BigInt
approxPoolRevenue: BigInt
approxPoolSpent: BigInt
ethDeposited: BigInt
ethWithdrawn: BigInt
numPoolsCreated: BigInt
numPairsCreated: BigInt
nftsDeposited: BigInt
nftsWithdrawn: BigInt
numBuys: BigInt
numSells: BigInt
}
type BondingCurveStatusUpdate @entity {
id: ID!
allowed: String
address: String
}
type AssetRecipientChange @entity {
id: ID!
a: Bytes! # address
pair: String
timestamp: BigInt
}
type DeltaUpdate @entity {
id: ID!
newDelta: BigInt! # uint128
pair: String
timestamp: BigInt
}
type FeeUpdate @entity {
id: ID!
newFee: BigInt! # uint96
pair: String
timestamp: BigInt
}
type NFTWithdrawal @entity {
id: ID!
pair: String
timestamp: BigInt
}
type NFTDeposit @entity {
id: ID!
pair: String
timestamp: BigInt
}
type OwnershipTransferred @entity {
id: ID!
newOwner: Bytes! # address
pair: String
timestamp: BigInt
}
type SpotPriceUpdate @entity {
id: ID!
newSpotPrice: BigInt! # uint128
updateTx: String
nft: String
pair: String
blockNumber: BigInt
timestamp: BigInt
}
type ProtocolFeeMultiplier @entity {
id: ID!
protocolFeeMultiplier: BigDecimal!
}
type PoolNFTBuys @entity {
id: ID!
ethPaidByPool: BigInt!
pair: String!
fee: BigInt!
protocolFee: BigInt!
timestamp: BigInt!
nft: String!
}
type PoolNFTSales @entity {
id: ID!
ethReceivedByPool: BigInt!
pair: String!
fee: BigInt!
protocolFee: BigInt!
timestamp: BigInt!
nft: String!
}
type TokenDeposit @entity {
id: ID!
amountDeposited: BigInt! # uint256
pair: String
timestamp: BigInt
}
type TokenWithdrawal @entity {
id: ID!
amountWithdrawn: BigInt! # uint256
pair: String
timestamp: BigInt
}