/
schema-otoken.graphql
119 lines (109 loc) · 2.33 KB
/
schema-otoken.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
type OToken @entity {
id: ID! @index
chainId: Int! @index
otoken: String! @index
timestamp: DateTime! @index
blockNumber: Int! @index
totalSupply: BigInt!
rebasingSupply: BigInt!
nonRebasingSupply: BigInt!
}
type OTokenAsset @entity {
id: ID! @index
chainId: Int! @index
otoken: String! @index
address: String! @index
symbol: String!
}
type OTokenAddress @entity {
id: ID! @index
chainId: Int! @index
otoken: String! @index
address: String! @index
isContract: Boolean!
rebasingOption: RebasingOption!
balance: BigInt!
earned: BigInt!
credits: BigInt!
lastUpdated: DateTime!
history: [OTokenHistory!]! @derivedFrom(field: "address")
}
type OTokenHistory @entity {
id: ID!
chainId: Int! @index
otoken: String! @index
address: OTokenAddress! @index
value: BigInt!
balance: BigInt!
timestamp: DateTime!
blockNumber: Int! @index
txHash: String! @index
type: HistoryType!
}
type OTokenRebase @entity {
id: ID!
chainId: Int! @index
otoken: String! @index
timestamp: DateTime! @index
blockNumber: Int! @index
txHash: String! @index
totalSupply: BigInt!
rebasingCredits: BigInt!
rebasingCreditsPerToken: BigInt!
apy: OTokenAPY!
feeETH: BigInt!
feeUSD: BigInt!
yieldETH: BigInt!
yieldUSD: BigInt!
}
type OTokenRebaseOption @entity {
id: ID!
chainId: Int! @index
otoken: String! @index
timestamp: DateTime! @index
blockNumber: Int! @index
txHash: String! @index
address: OTokenAddress!
status: RebasingOption!
}
type OTokenAPY @entity {
id: ID!
chainId: Int! @index
otoken: String! @index
timestamp: DateTime! @index
blockNumber: Int! @index
txHash: String! @index
date: String! @index
apr: Float!
apy: Float!
apy7DayAvg: Float!
apy14DayAvg: Float!
apy30DayAvg: Float!
rebasingCreditsPerToken: BigInt!
}
type OTokenVault @entity {
id: ID!
chainId: Int! @index
otoken: String! @index
timestamp: DateTime! @index
blockNumber: Int! @index
address: String! @index
totalValue: BigInt!
}
type OTokenActivity @entity {
id: ID!
chainId: Int! @index
otoken: String! @index
timestamp: DateTime! @index
blockNumber: Int! @index
txHash: String! @index
callDataLast4Bytes: String!
address: String
sighash: String
action: String
exchange: String
interface: String
fromSymbol: String
toSymbol: String
amount: BigInt
}