-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
61 lines (58 loc) · 1.12 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
type Factory @entity {
# factory address
id: ID!
# amount of pools created
poolCount: BigInt!
# current owner of the factory
owner: ID!
}
type Token @entity {
# token address
id: ID!
# token symbol
symbol: String!
# token name
name: String!
# token decimals
decimals: BigInt!
}
type Pool @entity {
# pool address
id: ID!
# creation
createdAtTimestamp: BigInt!
# block pool was created at
createdAtBlockNumber: BigInt!
# token0
token0: Token!
# token1
token1: Token!
# fee amount
feeTier: BigInt!
# tickSpacing
tickSpacing: BigInt!
# in range liquidity
liquidity: BigInt!
# current price tracker
sqrtPrice: BigInt!
# current tick
tick: BigInt
}
type Tick @entity {
# format: <pool address>#<tick index>
id: ID!
# pool address
poolAddress: String
# tick index
tickIdx: BigInt!
# pointer to pool
pool: Pool!
# total liquidity pool has as tick lower or upper
liquidityGross: BigInt!
# how much liquidity changes when tick crossed
liquidityNet: BigInt!
# created time
createdAtTimestamp: BigInt!
# created block
createdAtBlockNumber: BigInt!
}