Skip to content

Commit a682d3a

Browse files
authored
Revert "Revert "MarginProtocol: Big refactoring + Chainlink Oracles""
1 parent 54bfbf1 commit a682d3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2759
-1806
lines changed

artifacts/kovan/abi/MarginFlowProtocol.json

Lines changed: 251 additions & 384 deletions
Large diffs are not rendered by default.

artifacts/kovan/abi/MarginFlowProtocolSafety.json

Lines changed: 200 additions & 180 deletions
Large diffs are not rendered by default.

artifacts/kovan/abi/MarginLiquidityPoolInterface.json

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,58 @@
2424
"name": "SpreadUpdated",
2525
"type": "event"
2626
},
27+
{
28+
"inputs": [
29+
{
30+
"internalType": "uint256",
31+
"name": "amount",
32+
"type": "uint256"
33+
}
34+
],
35+
"name": "approveToProtocol",
36+
"outputs": [],
37+
"stateMutability": "nonpayable",
38+
"type": "function"
39+
},
40+
{
41+
"inputs": [],
42+
"name": "moneyMarket",
43+
"outputs": [
44+
{
45+
"internalType": "contract MoneyMarketInterface",
46+
"name": "",
47+
"type": "address"
48+
}
49+
],
50+
"stateMutability": "nonpayable",
51+
"type": "function"
52+
},
53+
{
54+
"inputs": [],
55+
"name": "owner",
56+
"outputs": [
57+
{
58+
"internalType": "address",
59+
"name": "",
60+
"type": "address"
61+
}
62+
],
63+
"stateMutability": "view",
64+
"type": "function"
65+
},
66+
{
67+
"inputs": [],
68+
"name": "protocol",
69+
"outputs": [
70+
{
71+
"internalType": "address",
72+
"name": "",
73+
"type": "address"
74+
}
75+
],
76+
"stateMutability": "nonpayable",
77+
"type": "function"
78+
},
2779
{
2880
"inputs": [
2981
{
@@ -51,14 +103,21 @@
51103
"type": "uint256"
52104
}
53105
],
54-
"name": "withdrawLiquidity",
55-
"outputs": [
106+
"name": "increaseAllowanceForProtocol",
107+
"outputs": [],
108+
"stateMutability": "nonpayable",
109+
"type": "function"
110+
},
111+
{
112+
"inputs": [
56113
{
57114
"internalType": "uint256",
58-
"name": "",
115+
"name": "_realized",
59116
"type": "uint256"
60117
}
61118
],
119+
"name": "increaseAllowanceForProtocolSafety",
120+
"outputs": [],
62121
"stateMutability": "nonpayable",
63122
"type": "function"
64123
},
@@ -91,7 +150,7 @@
91150
"type": "uint256"
92151
}
93152
],
94-
"stateMutability": "nonpayable",
153+
"stateMutability": "view",
95154
"type": "function"
96155
},
97156
{

artifacts/kovan/abi/MarginLiquidityPoolRegistry.json

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"type": "address"
130130
}
131131
],
132-
"name": "poolHasPaidFees",
132+
"name": "poolHasPaidDeposits",
133133
"outputs": [
134134
{
135135
"internalType": "bool",
@@ -140,7 +140,49 @@
140140
"stateMutability": "view",
141141
"type": "function",
142142
"constant": true,
143-
"signature": "0x94ba13c6"
143+
"signature": "0xe64bdf9e"
144+
},
145+
{
146+
"inputs": [
147+
{
148+
"internalType": "contract MarginLiquidityPoolInterface",
149+
"name": "",
150+
"type": "address"
151+
}
152+
],
153+
"name": "poolLiquidationITokens",
154+
"outputs": [
155+
{
156+
"internalType": "uint256",
157+
"name": "",
158+
"type": "uint256"
159+
}
160+
],
161+
"stateMutability": "view",
162+
"type": "function",
163+
"constant": true,
164+
"signature": "0x76d94e1b"
165+
},
166+
{
167+
"inputs": [
168+
{
169+
"internalType": "contract MarginLiquidityPoolInterface",
170+
"name": "",
171+
"type": "address"
172+
}
173+
],
174+
"name": "poolMarginCallITokens",
175+
"outputs": [
176+
{
177+
"internalType": "uint256",
178+
"name": "",
179+
"type": "uint256"
180+
}
181+
],
182+
"stateMutability": "view",
183+
"type": "function",
184+
"constant": true,
185+
"signature": "0xa1714932"
144186
},
145187
{
146188
"inputs": [],
@@ -256,11 +298,37 @@
256298
}
257299
],
258300
"name": "marginCallPool",
259-
"outputs": [],
301+
"outputs": [
302+
{
303+
"internalType": "uint256",
304+
"name": "",
305+
"type": "uint256"
306+
}
307+
],
260308
"stateMutability": "nonpayable",
261309
"type": "function",
262310
"signature": "0x37a615b5"
263311
},
312+
{
313+
"inputs": [
314+
{
315+
"internalType": "contract MarginLiquidityPoolInterface",
316+
"name": "_pool",
317+
"type": "address"
318+
}
319+
],
320+
"name": "liquidatePool",
321+
"outputs": [
322+
{
323+
"internalType": "uint256",
324+
"name": "",
325+
"type": "uint256"
326+
}
327+
],
328+
"stateMutability": "nonpayable",
329+
"type": "function",
330+
"signature": "0x019a3046"
331+
},
264332
{
265333
"inputs": [
266334
{

artifacts/kovan/abi/PriceOracleInterface.json

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
}
2323
],
2424
"name": "PriceFeeded",
25-
"type": "event"
25+
"type": "event",
26+
"signature": "0x3105faf42de9614e0ddc10fabac5d5aaf57cc1632093d5e3e42e89a505edb7c8"
2627
},
2728
{
2829
"anonymous": false,
@@ -41,7 +42,8 @@
4142
}
4243
],
4344
"name": "PriceUpdated",
44-
"type": "event"
45+
"type": "event",
46+
"signature": "0x0d86730737b142fc160892fa8a0f2db687a92a0e294d1ad70624cf5acef03b84"
4547
},
4648
{
4749
"inputs": [],
@@ -54,7 +56,9 @@
5456
}
5557
],
5658
"stateMutability": "pure",
57-
"type": "function"
59+
"type": "function",
60+
"constant": true,
61+
"signature": "0x66331bba"
5862
},
5963
{
6064
"inputs": [
@@ -73,25 +77,7 @@
7377
}
7478
],
7579
"stateMutability": "nonpayable",
76-
"type": "function"
77-
},
78-
{
79-
"inputs": [
80-
{
81-
"internalType": "address",
82-
"name": "key",
83-
"type": "address"
84-
}
85-
],
86-
"name": "readPrice",
87-
"outputs": [
88-
{
89-
"internalType": "uint256",
90-
"name": "",
91-
"type": "uint256"
92-
}
93-
],
94-
"stateMutability": "view",
95-
"type": "function"
80+
"type": "function",
81+
"signature": "0x41976e09"
9682
}
9783
]

0 commit comments

Comments
 (0)