-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
95 lines (91 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
type Swap {
id: ID!
chainId: BigInt!
transaction: String! # Instead of Transaction reference
timestamp: BigInt!
pool: String! # Instead of Pool reference
token0: String! # Instead of Token reference
token1: String! # Instead of Token reference
sender: String! # Instead of Bytes
origin: String! # Instead of Bytes
amount0: BigDecimal!
amount1: BigDecimal!
amountUSD: BigDecimal!
sqrtPriceX96: BigInt!
tick: BigInt!
logIndex: BigInt!
}
type PoolManager {
id: ID!
chainId: BigInt!
poolCount: BigInt!
txCount: BigInt!
totalVolumeUSD: BigDecimal!
totalVolumeETH: BigDecimal!
totalFeesUSD: BigDecimal!
totalFeesETH: BigDecimal!
untrackedVolumeUSD: BigDecimal!
totalValueLockedUSD: BigDecimal!
totalValueLockedETH: BigDecimal!
totalValueLockedUSDUntracked: BigDecimal!
totalValueLockedETHUntracked: BigDecimal!
owner: String!
}
type Pool @entity {
id: ID!
chainId: BigInt!
name: String!
createdAtTimestamp: BigInt!
createdAtBlockNumber: BigInt!
token0: String! # Instead of Token reference
token1: String! # Instead of Token reference
feeTier: BigInt!
liquidity: BigInt!
sqrtPrice: BigInt!
token0Price: BigDecimal!
token1Price: BigDecimal!
tick: BigInt
tickSpacing: BigInt!
observationIndex: BigInt!
volumeToken0: BigDecimal!
volumeToken1: BigDecimal!
volumeUSD: BigDecimal!
untrackedVolumeUSD: BigDecimal!
feesUSD: BigDecimal!
txCount: BigInt!
collectedFeesToken0: BigDecimal!
collectedFeesToken1: BigDecimal!
collectedFeesUSD: BigDecimal!
totalValueLockedToken0: BigDecimal!
totalValueLockedToken1: BigDecimal!
totalValueLockedETH: BigDecimal!
totalValueLockedUSD: BigDecimal!
totalValueLockedUSDUntracked: BigDecimal!
liquidityProviderCount: BigInt!
hooks: String!
}
type Token @entity {
id: ID!
chainId: BigInt!
symbol: String!
name: String!
decimals: BigInt!
totalSupply: BigInt!
volume: BigDecimal!
volumeUSD: BigDecimal!
untrackedVolumeUSD: BigDecimal!
feesUSD: BigDecimal!
txCount: BigInt!
poolCount: BigInt!
totalValueLocked: BigDecimal!
totalValueLockedUSD: BigDecimal!
totalValueLockedUSDUntracked: BigDecimal!
derivedETH: BigDecimal!
whitelistPools: [String!]! # Changed from Pool reference to String for simplicity
}
# stores for USD calculations
type Bundle @entity {
id: ID!
# price of ETH in usd
ethPriceUSD: BigDecimal!
}