Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit badfa33

Browse files
feat(tectonic): Add Tectonic Integration (#609)
1 parent 45ee14f commit badfa33

25 files changed

+12296
-0
lines changed

src/apps/tectonic/assets/logo.png

33.4 KB
Loading

src/apps/tectonic/contracts/abis/tectonic-core.json

Lines changed: 1106 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 365 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,365 @@
1+
[
2+
{
3+
"constant": false,
4+
"inputs": [
5+
{ "internalType": "contract TectonicCoreLensInterface", "name": "tectonicCore", "type": "address" },
6+
{ "internalType": "address", "name": "account", "type": "address" }
7+
],
8+
"name": "getAccountLimits",
9+
"outputs": [
10+
{
11+
"components": [
12+
{ "internalType": "contract TToken[]", "name": "markets", "type": "address[]" },
13+
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
14+
{ "internalType": "uint256", "name": "shortfall", "type": "uint256" }
15+
],
16+
"internalType": "struct TectonicLens.AccountLimits",
17+
"name": "",
18+
"type": "tuple"
19+
}
20+
],
21+
"payable": false,
22+
"stateMutability": "nonpayable",
23+
"type": "function"
24+
},
25+
{
26+
"constant": true,
27+
"inputs": [
28+
{ "internalType": "contract GovernorBravoInterface", "name": "governor", "type": "address" },
29+
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
30+
],
31+
"name": "getGovBravoProposals",
32+
"outputs": [
33+
{
34+
"components": [
35+
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
36+
{ "internalType": "address", "name": "proposer", "type": "address" },
37+
{ "internalType": "uint256", "name": "eta", "type": "uint256" },
38+
{ "internalType": "address[]", "name": "targets", "type": "address[]" },
39+
{ "internalType": "uint256[]", "name": "values", "type": "uint256[]" },
40+
{ "internalType": "string[]", "name": "signatures", "type": "string[]" },
41+
{ "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" },
42+
{ "internalType": "uint256", "name": "startBlock", "type": "uint256" },
43+
{ "internalType": "uint256", "name": "endBlock", "type": "uint256" },
44+
{ "internalType": "uint256", "name": "forVotes", "type": "uint256" },
45+
{ "internalType": "uint256", "name": "againstVotes", "type": "uint256" },
46+
{ "internalType": "uint256", "name": "abstainVotes", "type": "uint256" },
47+
{ "internalType": "bool", "name": "canceled", "type": "bool" },
48+
{ "internalType": "bool", "name": "executed", "type": "bool" }
49+
],
50+
"internalType": "struct TectonicLens.GovBravoProposal[]",
51+
"name": "",
52+
"type": "tuple[]"
53+
}
54+
],
55+
"payable": false,
56+
"stateMutability": "view",
57+
"type": "function"
58+
},
59+
{
60+
"constant": true,
61+
"inputs": [
62+
{ "internalType": "contract GovernorBravoInterface", "name": "governor", "type": "address" },
63+
{ "internalType": "address", "name": "voter", "type": "address" },
64+
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
65+
],
66+
"name": "getGovBravoReceipts",
67+
"outputs": [
68+
{
69+
"components": [
70+
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
71+
{ "internalType": "bool", "name": "hasVoted", "type": "bool" },
72+
{ "internalType": "uint8", "name": "support", "type": "uint8" },
73+
{ "internalType": "uint128", "name": "votes", "type": "uint128" }
74+
],
75+
"internalType": "struct TectonicLens.GovBravoReceipt[]",
76+
"name": "",
77+
"type": "tuple[]"
78+
}
79+
],
80+
"payable": false,
81+
"stateMutability": "view",
82+
"type": "function"
83+
},
84+
{
85+
"constant": true,
86+
"inputs": [
87+
{ "internalType": "contract GovernorAlpha", "name": "governor", "type": "address" },
88+
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
89+
],
90+
"name": "getGovProposals",
91+
"outputs": [
92+
{
93+
"components": [
94+
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
95+
{ "internalType": "address", "name": "proposer", "type": "address" },
96+
{ "internalType": "uint256", "name": "eta", "type": "uint256" },
97+
{ "internalType": "address[]", "name": "targets", "type": "address[]" },
98+
{ "internalType": "uint256[]", "name": "values", "type": "uint256[]" },
99+
{ "internalType": "string[]", "name": "signatures", "type": "string[]" },
100+
{ "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" },
101+
{ "internalType": "uint256", "name": "startBlock", "type": "uint256" },
102+
{ "internalType": "uint256", "name": "endBlock", "type": "uint256" },
103+
{ "internalType": "uint256", "name": "forVotes", "type": "uint256" },
104+
{ "internalType": "uint256", "name": "againstVotes", "type": "uint256" },
105+
{ "internalType": "bool", "name": "canceled", "type": "bool" },
106+
{ "internalType": "bool", "name": "executed", "type": "bool" }
107+
],
108+
"internalType": "struct TectonicLens.GovProposal[]",
109+
"name": "",
110+
"type": "tuple[]"
111+
}
112+
],
113+
"payable": false,
114+
"stateMutability": "view",
115+
"type": "function"
116+
},
117+
{
118+
"constant": true,
119+
"inputs": [
120+
{ "internalType": "contract GovernorAlpha", "name": "governor", "type": "address" },
121+
{ "internalType": "address", "name": "voter", "type": "address" },
122+
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
123+
],
124+
"name": "getGovReceipts",
125+
"outputs": [
126+
{
127+
"components": [
128+
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
129+
{ "internalType": "bool", "name": "hasVoted", "type": "bool" },
130+
{ "internalType": "bool", "name": "support", "type": "bool" },
131+
{ "internalType": "uint128", "name": "votes", "type": "uint128" }
132+
],
133+
"internalType": "struct TectonicLens.GovReceipt[]",
134+
"name": "",
135+
"type": "tuple[]"
136+
}
137+
],
138+
"payable": false,
139+
"stateMutability": "view",
140+
"type": "function"
141+
},
142+
{
143+
"constant": true,
144+
"inputs": [
145+
{ "internalType": "contract Tonic", "name": "tonic", "type": "address" },
146+
{ "internalType": "address", "name": "account", "type": "address" }
147+
],
148+
"name": "getTonicBalanceMetadata",
149+
"outputs": [
150+
{
151+
"components": [
152+
{ "internalType": "uint256", "name": "balance", "type": "uint256" },
153+
{ "internalType": "uint256", "name": "votes", "type": "uint256" },
154+
{ "internalType": "address", "name": "delegate", "type": "address" }
155+
],
156+
"internalType": "struct TectonicLens.TonicBalanceMetadata",
157+
"name": "",
158+
"type": "tuple"
159+
}
160+
],
161+
"payable": false,
162+
"stateMutability": "view",
163+
"type": "function"
164+
},
165+
{
166+
"constant": false,
167+
"inputs": [
168+
{ "internalType": "contract Tonic", "name": "tonic", "type": "address" },
169+
{ "internalType": "contract TectonicCoreLensInterface", "name": "tectonicCore", "type": "address" },
170+
{ "internalType": "address", "name": "account", "type": "address" }
171+
],
172+
"name": "getTonicBalanceMetadataExt",
173+
"outputs": [
174+
{
175+
"components": [
176+
{ "internalType": "uint256", "name": "balance", "type": "uint256" },
177+
{ "internalType": "uint256", "name": "votes", "type": "uint256" },
178+
{ "internalType": "address", "name": "delegate", "type": "address" },
179+
{ "internalType": "uint256", "name": "allocated", "type": "uint256" }
180+
],
181+
"internalType": "struct TectonicLens.TonicBalanceMetadataExt",
182+
"name": "",
183+
"type": "tuple"
184+
}
185+
],
186+
"payable": false,
187+
"stateMutability": "nonpayable",
188+
"type": "function"
189+
},
190+
{
191+
"constant": true,
192+
"inputs": [
193+
{ "internalType": "contract Tonic", "name": "tonic", "type": "address" },
194+
{ "internalType": "address", "name": "account", "type": "address" },
195+
{ "internalType": "uint32[]", "name": "blockNumbers", "type": "uint32[]" }
196+
],
197+
"name": "getTonicVotes",
198+
"outputs": [
199+
{
200+
"components": [
201+
{ "internalType": "uint256", "name": "blockNumber", "type": "uint256" },
202+
{ "internalType": "uint256", "name": "votes", "type": "uint256" }
203+
],
204+
"internalType": "struct TectonicLens.TonicVotes[]",
205+
"name": "",
206+
"type": "tuple[]"
207+
}
208+
],
209+
"payable": false,
210+
"stateMutability": "view",
211+
"type": "function"
212+
},
213+
{
214+
"constant": false,
215+
"inputs": [
216+
{ "internalType": "contract TToken", "name": "tToken", "type": "address" },
217+
{ "internalType": "address payable", "name": "account", "type": "address" }
218+
],
219+
"name": "tTokenBalances",
220+
"outputs": [
221+
{
222+
"components": [
223+
{ "internalType": "address", "name": "tToken", "type": "address" },
224+
{ "internalType": "uint256", "name": "balanceOf", "type": "uint256" },
225+
{ "internalType": "uint256", "name": "borrowBalanceCurrent", "type": "uint256" },
226+
{ "internalType": "uint256", "name": "balanceOfUnderlying", "type": "uint256" },
227+
{ "internalType": "uint256", "name": "tokenBalance", "type": "uint256" },
228+
{ "internalType": "uint256", "name": "tokenAllowance", "type": "uint256" }
229+
],
230+
"internalType": "struct TectonicLens.TTokenBalances",
231+
"name": "",
232+
"type": "tuple"
233+
}
234+
],
235+
"payable": false,
236+
"stateMutability": "nonpayable",
237+
"type": "function"
238+
},
239+
{
240+
"constant": false,
241+
"inputs": [
242+
{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" },
243+
{ "internalType": "address payable", "name": "account", "type": "address" }
244+
],
245+
"name": "tTokenBalancesAll",
246+
"outputs": [
247+
{
248+
"components": [
249+
{ "internalType": "address", "name": "tToken", "type": "address" },
250+
{ "internalType": "uint256", "name": "balanceOf", "type": "uint256" },
251+
{ "internalType": "uint256", "name": "borrowBalanceCurrent", "type": "uint256" },
252+
{ "internalType": "uint256", "name": "balanceOfUnderlying", "type": "uint256" },
253+
{ "internalType": "uint256", "name": "tokenBalance", "type": "uint256" },
254+
{ "internalType": "uint256", "name": "tokenAllowance", "type": "uint256" }
255+
],
256+
"internalType": "struct TectonicLens.TTokenBalances[]",
257+
"name": "",
258+
"type": "tuple[]"
259+
}
260+
],
261+
"payable": false,
262+
"stateMutability": "nonpayable",
263+
"type": "function"
264+
},
265+
{
266+
"constant": false,
267+
"inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }],
268+
"name": "tTokenMetadata",
269+
"outputs": [
270+
{
271+
"components": [
272+
{ "internalType": "address", "name": "tToken", "type": "address" },
273+
{ "internalType": "uint256", "name": "exchangeRateCurrent", "type": "uint256" },
274+
{ "internalType": "uint256", "name": "supplyRatePerBlock", "type": "uint256" },
275+
{ "internalType": "uint256", "name": "borrowRatePerBlock", "type": "uint256" },
276+
{ "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" },
277+
{ "internalType": "uint256", "name": "totalBorrows", "type": "uint256" },
278+
{ "internalType": "uint256", "name": "totalReserves", "type": "uint256" },
279+
{ "internalType": "uint256", "name": "totalSupply", "type": "uint256" },
280+
{ "internalType": "uint256", "name": "totalCash", "type": "uint256" },
281+
{ "internalType": "bool", "name": "isListed", "type": "bool" },
282+
{ "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" },
283+
{ "internalType": "address", "name": "underlyingAssetAddress", "type": "address" },
284+
{ "internalType": "uint256", "name": "tTokenDecimals", "type": "uint256" },
285+
{ "internalType": "uint256", "name": "underlyingDecimals", "type": "uint256" }
286+
],
287+
"internalType": "struct TectonicLens.TTokenMetadata",
288+
"name": "",
289+
"type": "tuple"
290+
}
291+
],
292+
"payable": false,
293+
"stateMutability": "nonpayable",
294+
"type": "function"
295+
},
296+
{
297+
"constant": false,
298+
"inputs": [{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }],
299+
"name": "tTokenMetadataAll",
300+
"outputs": [
301+
{
302+
"components": [
303+
{ "internalType": "address", "name": "tToken", "type": "address" },
304+
{ "internalType": "uint256", "name": "exchangeRateCurrent", "type": "uint256" },
305+
{ "internalType": "uint256", "name": "supplyRatePerBlock", "type": "uint256" },
306+
{ "internalType": "uint256", "name": "borrowRatePerBlock", "type": "uint256" },
307+
{ "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" },
308+
{ "internalType": "uint256", "name": "totalBorrows", "type": "uint256" },
309+
{ "internalType": "uint256", "name": "totalReserves", "type": "uint256" },
310+
{ "internalType": "uint256", "name": "totalSupply", "type": "uint256" },
311+
{ "internalType": "uint256", "name": "totalCash", "type": "uint256" },
312+
{ "internalType": "bool", "name": "isListed", "type": "bool" },
313+
{ "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" },
314+
{ "internalType": "address", "name": "underlyingAssetAddress", "type": "address" },
315+
{ "internalType": "uint256", "name": "tTokenDecimals", "type": "uint256" },
316+
{ "internalType": "uint256", "name": "underlyingDecimals", "type": "uint256" }
317+
],
318+
"internalType": "struct TectonicLens.TTokenMetadata[]",
319+
"name": "",
320+
"type": "tuple[]"
321+
}
322+
],
323+
"payable": false,
324+
"stateMutability": "nonpayable",
325+
"type": "function"
326+
},
327+
{
328+
"constant": false,
329+
"inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }],
330+
"name": "tTokenUnderlyingPrice",
331+
"outputs": [
332+
{
333+
"components": [
334+
{ "internalType": "address", "name": "tToken", "type": "address" },
335+
{ "internalType": "uint256", "name": "underlyingPrice", "type": "uint256" }
336+
],
337+
"internalType": "struct TectonicLens.TTokenUnderlyingPrice",
338+
"name": "",
339+
"type": "tuple"
340+
}
341+
],
342+
"payable": false,
343+
"stateMutability": "nonpayable",
344+
"type": "function"
345+
},
346+
{
347+
"constant": false,
348+
"inputs": [{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }],
349+
"name": "tTokenUnderlyingPriceAll",
350+
"outputs": [
351+
{
352+
"components": [
353+
{ "internalType": "address", "name": "tToken", "type": "address" },
354+
{ "internalType": "uint256", "name": "underlyingPrice", "type": "uint256" }
355+
],
356+
"internalType": "struct TectonicLens.TTokenUnderlyingPrice[]",
357+
"name": "",
358+
"type": "tuple[]"
359+
}
360+
],
361+
"payable": false,
362+
"stateMutability": "nonpayable",
363+
"type": "function"
364+
}
365+
]

0 commit comments

Comments
 (0)