Skip to content

Commit f76eba6

Browse files
committed
keeping deposit histroy, in subgraph
1 parent 7d9b58b commit f76eba6

File tree

8 files changed

+514
-30
lines changed

8 files changed

+514
-30
lines changed

subgraph/.yarn/install-state.gz

35.8 KB
Binary file not shown.

subgraph/abis/IRebasingERC20.json

Lines changed: 344 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
[
2+
{
3+
"anonymous": false,
4+
"inputs": [
5+
{
6+
"indexed": true,
7+
"internalType": "address",
8+
"name": "owner",
9+
"type": "address"
10+
},
11+
{
12+
"indexed": true,
13+
"internalType": "address",
14+
"name": "spender",
15+
"type": "address"
16+
},
17+
{
18+
"indexed": false,
19+
"internalType": "uint256",
20+
"name": "value",
21+
"type": "uint256"
22+
}
23+
],
24+
"name": "Approval",
25+
"type": "event"
26+
},
27+
{
28+
"anonymous": false,
29+
"inputs": [
30+
{
31+
"indexed": true,
32+
"internalType": "uint256",
33+
"name": "epoch",
34+
"type": "uint256"
35+
},
36+
{
37+
"indexed": false,
38+
"internalType": "uint256",
39+
"name": "newScalar",
40+
"type": "uint256"
41+
}
42+
],
43+
"name": "Rebase",
44+
"type": "event"
45+
},
46+
{
47+
"anonymous": false,
48+
"inputs": [
49+
{
50+
"indexed": true,
51+
"internalType": "uint256",
52+
"name": "epoch",
53+
"type": "uint256"
54+
},
55+
{
56+
"indexed": false,
57+
"internalType": "uint256",
58+
"name": "totalSupply",
59+
"type": "uint256"
60+
}
61+
],
62+
"name": "LogRebase",
63+
"type": "event"
64+
},
65+
{
66+
"anonymous": false,
67+
"inputs": [
68+
{
69+
"indexed": true,
70+
"internalType": "address",
71+
"name": "from",
72+
"type": "address"
73+
},
74+
{
75+
"indexed": true,
76+
"internalType": "address",
77+
"name": "to",
78+
"type": "address"
79+
},
80+
{
81+
"indexed": false,
82+
"internalType": "uint256",
83+
"name": "value",
84+
"type": "uint256"
85+
}
86+
],
87+
"name": "Transfer",
88+
"type": "event"
89+
},
90+
{
91+
"inputs": [
92+
{
93+
"internalType": "address",
94+
"name": "owner",
95+
"type": "address"
96+
},
97+
{
98+
"internalType": "address",
99+
"name": "spender",
100+
"type": "address"
101+
}
102+
],
103+
"name": "allowance",
104+
"outputs": [
105+
{
106+
"internalType": "uint256",
107+
"name": "",
108+
"type": "uint256"
109+
}
110+
],
111+
"stateMutability": "view",
112+
"type": "function"
113+
},
114+
{
115+
"inputs": [
116+
{
117+
"internalType": "address",
118+
"name": "spender",
119+
"type": "address"
120+
},
121+
{
122+
"internalType": "uint256",
123+
"name": "amount",
124+
"type": "uint256"
125+
}
126+
],
127+
"name": "approve",
128+
"outputs": [
129+
{
130+
"internalType": "bool",
131+
"name": "",
132+
"type": "bool"
133+
}
134+
],
135+
"stateMutability": "nonpayable",
136+
"type": "function"
137+
},
138+
{
139+
"inputs": [
140+
{
141+
"internalType": "address",
142+
"name": "account",
143+
"type": "address"
144+
}
145+
],
146+
"name": "balanceOf",
147+
"outputs": [
148+
{
149+
"internalType": "uint256",
150+
"name": "",
151+
"type": "uint256"
152+
}
153+
],
154+
"stateMutability": "view",
155+
"type": "function"
156+
},
157+
{
158+
"inputs": [],
159+
"name": "decimals",
160+
"outputs": [
161+
{
162+
"internalType": "uint8",
163+
"name": "",
164+
"type": "uint8"
165+
}
166+
],
167+
"stateMutability": "view",
168+
"type": "function"
169+
},
170+
{
171+
"inputs": [],
172+
"name": "name",
173+
"outputs": [
174+
{
175+
"internalType": "string",
176+
"name": "",
177+
"type": "string"
178+
}
179+
],
180+
"stateMutability": "view",
181+
"type": "function"
182+
},
183+
{
184+
"inputs": [],
185+
"name": "rebase",
186+
"outputs": [],
187+
"stateMutability": "nonpayable",
188+
"type": "function"
189+
},
190+
{
191+
"inputs": [
192+
{
193+
"internalType": "address",
194+
"name": "who",
195+
"type": "address"
196+
}
197+
],
198+
"name": "scaledBalanceOf",
199+
"outputs": [
200+
{
201+
"internalType": "uint256",
202+
"name": "",
203+
"type": "uint256"
204+
}
205+
],
206+
"stateMutability": "view",
207+
"type": "function"
208+
},
209+
{
210+
"inputs": [],
211+
"name": "scaledTotalSupply",
212+
"outputs": [
213+
{
214+
"internalType": "uint256",
215+
"name": "",
216+
"type": "uint256"
217+
}
218+
],
219+
"stateMutability": "view",
220+
"type": "function"
221+
},
222+
{
223+
"inputs": [],
224+
"name": "symbol",
225+
"outputs": [
226+
{
227+
"internalType": "string",
228+
"name": "",
229+
"type": "string"
230+
}
231+
],
232+
"stateMutability": "view",
233+
"type": "function"
234+
},
235+
{
236+
"inputs": [],
237+
"name": "totalSupply",
238+
"outputs": [
239+
{
240+
"internalType": "uint256",
241+
"name": "",
242+
"type": "uint256"
243+
}
244+
],
245+
"stateMutability": "view",
246+
"type": "function"
247+
},
248+
{
249+
"inputs": [
250+
{
251+
"internalType": "address",
252+
"name": "recipient",
253+
"type": "address"
254+
},
255+
{
256+
"internalType": "uint256",
257+
"name": "amount",
258+
"type": "uint256"
259+
}
260+
],
261+
"name": "transfer",
262+
"outputs": [
263+
{
264+
"internalType": "bool",
265+
"name": "",
266+
"type": "bool"
267+
}
268+
],
269+
"stateMutability": "nonpayable",
270+
"type": "function"
271+
},
272+
{
273+
"inputs": [
274+
{
275+
"internalType": "address",
276+
"name": "to",
277+
"type": "address"
278+
}
279+
],
280+
"name": "transferAll",
281+
"outputs": [
282+
{
283+
"internalType": "bool",
284+
"name": "",
285+
"type": "bool"
286+
}
287+
],
288+
"stateMutability": "nonpayable",
289+
"type": "function"
290+
},
291+
{
292+
"inputs": [
293+
{
294+
"internalType": "address",
295+
"name": "from",
296+
"type": "address"
297+
},
298+
{
299+
"internalType": "address",
300+
"name": "to",
301+
"type": "address"
302+
}
303+
],
304+
"name": "transferAllFrom",
305+
"outputs": [
306+
{
307+
"internalType": "bool",
308+
"name": "",
309+
"type": "bool"
310+
}
311+
],
312+
"stateMutability": "nonpayable",
313+
"type": "function"
314+
},
315+
{
316+
"inputs": [
317+
{
318+
"internalType": "address",
319+
"name": "sender",
320+
"type": "address"
321+
},
322+
{
323+
"internalType": "address",
324+
"name": "recipient",
325+
"type": "address"
326+
},
327+
{
328+
"internalType": "uint256",
329+
"name": "amount",
330+
"type": "uint256"
331+
}
332+
],
333+
"name": "transferFrom",
334+
"outputs": [
335+
{
336+
"internalType": "bool",
337+
"name": "",
338+
"type": "bool"
339+
}
340+
],
341+
"stateMutability": "nonpayable",
342+
"type": "function"
343+
}
344+
]

subgraph/schema.graphql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type Geyser @entity {
2727
lastUpdate: BigInt!
2828
rewardSchedules: [RewardSchedule]! @derivedFrom(field: "geyser")
2929
locks: [Lock]! @derivedFrom(field: "geyser")
30+
dailyStats: [GeyserDailyStat!]! @derivedFrom(field: "geyser")
3031
}
3132

3233
type User @entity {
@@ -85,3 +86,15 @@ type RewardPoolBalance @entity {
8586
balance: BigInt!
8687
lastUpdate: BigInt!
8788
}
89+
90+
type GeyserDailyStat @entity {
91+
"<geyser address>-<day timestamp>"
92+
id: ID!
93+
geyser: Geyser!
94+
timestamp: BigInt!
95+
unlockedReward: BigInt!
96+
rewardBalance: BigInt!
97+
totalStake: BigInt!
98+
totalStakeUnits: BigInt!
99+
rewardPoolBalances: [BigInt!]!
100+
}

0 commit comments

Comments
 (0)