-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.graphql
More file actions
46 lines (40 loc) · 787 Bytes
/
schema.graphql
File metadata and controls
46 lines (40 loc) · 787 Bytes
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
type PegSwap @entity {
id: ID!
tokens: [Token!]!
}
type Token @entity {
id: ID!
symbol: String!
name: String!
decimals: Int!
balance: BigDecimal!
dayData: [TokenDayData!]! @derivedFrom(field: "token")
}
type User @entity {
id: ID!
totalSourceAmountSwapped: BigInt!
totalTargetAmountSwapped: BigInt!
}
type Swap @entity {
id: ID!
caller: Bytes!
sourceAmount: BigInt!
targetAmount: BigInt!
sourceToken: Token!
targetToken: Token!
}
type TokenDayData @entity {
id: ID!
token:Token!
sourceAmount: BigDecimal!
targetAmount: BigDecimal!
volume:BigDecimal!
blockNumber:BigInt!
balance: BigDecimal!
balanceUSD: BigDecimal!
volumeUSD:BigDecimal!
timestamp:BigInt!
reserve0:BigDecimal!
reserve1:BigDecimal!
priceUSD:BigDecimal!
}