@venusprotocol/oracle 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/build-info/2fde13baf96aae3a4a0595eaa19cc540.json +1 -0
- package/artifacts/contracts/PriceOracle.sol/PriceOracle.dbg.json +1 -1
- package/artifacts/contracts/PriceOracle.sol/PriceOracle.json +0 -6
- package/contracts/PriceOracle.sol +4 -4
- package/deploy/oracles.d.ts +4 -0
- package/deploy/oracles.d.ts.map +1 -0
- package/deploy/oracles.js +118 -0
- package/deploy/oracles.js.map +1 -0
- package/package.json +2 -2
- package/README.md +0 -106
- package/artifacts/build-info/766f05630947fa6d366a667b66c1141b.json +0 -1
- package/deploy/oracles.ts +0 -104
- package/deployments/localhost/.chainId +0 -1
- package/deployments/localhost/BinanceOracle.json +0 -393
- package/deployments/localhost/BinanceOracle_Implementation.json +0 -305
- package/deployments/localhost/BinanceOracle_Proxy.json +0 -241
- package/deployments/localhost/BoundValidator.json +0 -457
- package/deployments/localhost/BoundValidator_Implementation.json +0 -428
- package/deployments/localhost/BoundValidator_Proxy.json +0 -237
- package/deployments/localhost/ChainlinkOracle.json +0 -370
- package/deployments/localhost/ChainlinkOracle_Implementation.json +0 -273
- package/deployments/localhost/ChainlinkOracle_Proxy.json +0 -237
- package/deployments/localhost/DefaultProxyAdmin.json +0 -257
- package/deployments/localhost/PivotTwapOracle.json +0 -393
- package/deployments/localhost/PivotTwapOracle_Implementation.json +0 -304
- package/deployments/localhost/PivotTwapOracle_Proxy.json +0 -241
- package/deployments/localhost/PythOracle.json +0 -393
- package/deployments/localhost/PythOracle_Implementation.json +0 -309
- package/deployments/localhost/PythOracle_Proxy.json +0 -241
- package/deployments/localhost/ResilientOracle.json +0 -700
- package/deployments/localhost/ResilientOracle_Implementation.json +0 -746
- package/deployments/localhost/ResilientOracle_Proxy.json +0 -241
- package/deployments/localhost/solcInputs/0e89febeebc7444140de8e67c9067d2c.json +0 -78
- package/deployments/localhost/solcInputs/468ec7a31e2db8855c82fb8141193271.json +0 -54
- package/deployments/localhost/solcInputs/50629170e50dc9fec79dac585e95ac05.json +0 -138
|
@@ -1,746 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
|
|
3
|
-
"abi": [
|
|
4
|
-
{
|
|
5
|
-
"anonymous": false,
|
|
6
|
-
"inputs": [
|
|
7
|
-
{
|
|
8
|
-
"indexed": true,
|
|
9
|
-
"internalType": "bool",
|
|
10
|
-
"name": "isEnable",
|
|
11
|
-
"type": "bool"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"name": "GlobalEnable",
|
|
15
|
-
"type": "event"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"anonymous": false,
|
|
19
|
-
"inputs": [
|
|
20
|
-
{
|
|
21
|
-
"indexed": false,
|
|
22
|
-
"internalType": "uint8",
|
|
23
|
-
"name": "version",
|
|
24
|
-
"type": "uint8"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"name": "Initialized",
|
|
28
|
-
"type": "event"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"anonymous": false,
|
|
32
|
-
"inputs": [
|
|
33
|
-
{
|
|
34
|
-
"indexed": true,
|
|
35
|
-
"internalType": "address",
|
|
36
|
-
"name": "vToken",
|
|
37
|
-
"type": "address"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"indexed": true,
|
|
41
|
-
"internalType": "uint256",
|
|
42
|
-
"name": "role",
|
|
43
|
-
"type": "uint256"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"indexed": true,
|
|
47
|
-
"internalType": "bool",
|
|
48
|
-
"name": "enable",
|
|
49
|
-
"type": "bool"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"name": "OracleEnabled",
|
|
53
|
-
"type": "event"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"anonymous": false,
|
|
57
|
-
"inputs": [
|
|
58
|
-
{
|
|
59
|
-
"indexed": true,
|
|
60
|
-
"internalType": "address",
|
|
61
|
-
"name": "vToken",
|
|
62
|
-
"type": "address"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"indexed": true,
|
|
66
|
-
"internalType": "address",
|
|
67
|
-
"name": "oracle",
|
|
68
|
-
"type": "address"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"indexed": true,
|
|
72
|
-
"internalType": "uint256",
|
|
73
|
-
"name": "role",
|
|
74
|
-
"type": "uint256"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"name": "OracleSet",
|
|
78
|
-
"type": "event"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"anonymous": false,
|
|
82
|
-
"inputs": [
|
|
83
|
-
{
|
|
84
|
-
"indexed": true,
|
|
85
|
-
"internalType": "address",
|
|
86
|
-
"name": "previousOwner",
|
|
87
|
-
"type": "address"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"indexed": true,
|
|
91
|
-
"internalType": "address",
|
|
92
|
-
"name": "newOwner",
|
|
93
|
-
"type": "address"
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"name": "OwnershipTransferred",
|
|
97
|
-
"type": "event"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"anonymous": false,
|
|
101
|
-
"inputs": [
|
|
102
|
-
{
|
|
103
|
-
"indexed": false,
|
|
104
|
-
"internalType": "address",
|
|
105
|
-
"name": "account",
|
|
106
|
-
"type": "address"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"name": "Paused",
|
|
110
|
-
"type": "event"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"anonymous": false,
|
|
114
|
-
"inputs": [
|
|
115
|
-
{
|
|
116
|
-
"indexed": true,
|
|
117
|
-
"internalType": "address",
|
|
118
|
-
"name": "token",
|
|
119
|
-
"type": "address"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"indexed": true,
|
|
123
|
-
"internalType": "address",
|
|
124
|
-
"name": "mainOracle",
|
|
125
|
-
"type": "address"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"indexed": true,
|
|
129
|
-
"internalType": "address",
|
|
130
|
-
"name": "pivotOracle",
|
|
131
|
-
"type": "address"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"indexed": false,
|
|
135
|
-
"internalType": "address",
|
|
136
|
-
"name": "fallbackOracle",
|
|
137
|
-
"type": "address"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
"name": "TokenConfigAdded",
|
|
141
|
-
"type": "event"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"anonymous": false,
|
|
145
|
-
"inputs": [
|
|
146
|
-
{
|
|
147
|
-
"indexed": false,
|
|
148
|
-
"internalType": "address",
|
|
149
|
-
"name": "account",
|
|
150
|
-
"type": "address"
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"name": "Unpaused",
|
|
154
|
-
"type": "event"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"inputs": [],
|
|
158
|
-
"name": "INVALID_PRICE",
|
|
159
|
-
"outputs": [
|
|
160
|
-
{
|
|
161
|
-
"internalType": "uint256",
|
|
162
|
-
"name": "",
|
|
163
|
-
"type": "uint256"
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
"stateMutability": "view",
|
|
167
|
-
"type": "function"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"inputs": [],
|
|
171
|
-
"name": "boundValidator",
|
|
172
|
-
"outputs": [
|
|
173
|
-
{
|
|
174
|
-
"internalType": "contract BoundValidatorInterface",
|
|
175
|
-
"name": "",
|
|
176
|
-
"type": "address"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"stateMutability": "view",
|
|
180
|
-
"type": "function"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"inputs": [
|
|
184
|
-
{
|
|
185
|
-
"internalType": "address",
|
|
186
|
-
"name": "vToken",
|
|
187
|
-
"type": "address"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"internalType": "enum ResilientOracle.OracleRole",
|
|
191
|
-
"name": "role",
|
|
192
|
-
"type": "uint8"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"internalType": "bool",
|
|
196
|
-
"name": "enable",
|
|
197
|
-
"type": "bool"
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
"name": "enableOracle",
|
|
201
|
-
"outputs": [],
|
|
202
|
-
"stateMutability": "nonpayable",
|
|
203
|
-
"type": "function"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"inputs": [
|
|
207
|
-
{
|
|
208
|
-
"internalType": "address",
|
|
209
|
-
"name": "vToken",
|
|
210
|
-
"type": "address"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"internalType": "enum ResilientOracle.OracleRole",
|
|
214
|
-
"name": "role",
|
|
215
|
-
"type": "uint8"
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
"name": "getOracle",
|
|
219
|
-
"outputs": [
|
|
220
|
-
{
|
|
221
|
-
"internalType": "address",
|
|
222
|
-
"name": "oracle",
|
|
223
|
-
"type": "address"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"internalType": "bool",
|
|
227
|
-
"name": "enabled",
|
|
228
|
-
"type": "bool"
|
|
229
|
-
}
|
|
230
|
-
],
|
|
231
|
-
"stateMutability": "view",
|
|
232
|
-
"type": "function"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"inputs": [
|
|
236
|
-
{
|
|
237
|
-
"internalType": "address",
|
|
238
|
-
"name": "vToken",
|
|
239
|
-
"type": "address"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"name": "getTokenConfig",
|
|
243
|
-
"outputs": [
|
|
244
|
-
{
|
|
245
|
-
"components": [
|
|
246
|
-
{
|
|
247
|
-
"internalType": "address",
|
|
248
|
-
"name": "vToken",
|
|
249
|
-
"type": "address"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"internalType": "address[3]",
|
|
253
|
-
"name": "oracles",
|
|
254
|
-
"type": "address[3]"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"internalType": "bool[3]",
|
|
258
|
-
"name": "enableFlagsForOracles",
|
|
259
|
-
"type": "bool[3]"
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
"internalType": "struct ResilientOracle.TokenConfig",
|
|
263
|
-
"name": "",
|
|
264
|
-
"type": "tuple"
|
|
265
|
-
}
|
|
266
|
-
],
|
|
267
|
-
"stateMutability": "view",
|
|
268
|
-
"type": "function"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"inputs": [
|
|
272
|
-
{
|
|
273
|
-
"internalType": "address",
|
|
274
|
-
"name": "vToken",
|
|
275
|
-
"type": "address"
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"name": "getUnderlyingPrice",
|
|
279
|
-
"outputs": [
|
|
280
|
-
{
|
|
281
|
-
"internalType": "uint256",
|
|
282
|
-
"name": "",
|
|
283
|
-
"type": "uint256"
|
|
284
|
-
}
|
|
285
|
-
],
|
|
286
|
-
"stateMutability": "view",
|
|
287
|
-
"type": "function"
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"inputs": [
|
|
291
|
-
{
|
|
292
|
-
"internalType": "contract BoundValidatorInterface",
|
|
293
|
-
"name": "_boundValidator",
|
|
294
|
-
"type": "address"
|
|
295
|
-
}
|
|
296
|
-
],
|
|
297
|
-
"name": "initialize",
|
|
298
|
-
"outputs": [],
|
|
299
|
-
"stateMutability": "nonpayable",
|
|
300
|
-
"type": "function"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"inputs": [],
|
|
304
|
-
"name": "owner",
|
|
305
|
-
"outputs": [
|
|
306
|
-
{
|
|
307
|
-
"internalType": "address",
|
|
308
|
-
"name": "",
|
|
309
|
-
"type": "address"
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"stateMutability": "view",
|
|
313
|
-
"type": "function"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"inputs": [],
|
|
317
|
-
"name": "pause",
|
|
318
|
-
"outputs": [],
|
|
319
|
-
"stateMutability": "nonpayable",
|
|
320
|
-
"type": "function"
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"inputs": [],
|
|
324
|
-
"name": "paused",
|
|
325
|
-
"outputs": [
|
|
326
|
-
{
|
|
327
|
-
"internalType": "bool",
|
|
328
|
-
"name": "",
|
|
329
|
-
"type": "bool"
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"stateMutability": "view",
|
|
333
|
-
"type": "function"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"inputs": [],
|
|
337
|
-
"name": "renounceOwnership",
|
|
338
|
-
"outputs": [],
|
|
339
|
-
"stateMutability": "nonpayable",
|
|
340
|
-
"type": "function"
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"inputs": [
|
|
344
|
-
{
|
|
345
|
-
"internalType": "address",
|
|
346
|
-
"name": "vToken",
|
|
347
|
-
"type": "address"
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"internalType": "address",
|
|
351
|
-
"name": "oracle",
|
|
352
|
-
"type": "address"
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"internalType": "enum ResilientOracle.OracleRole",
|
|
356
|
-
"name": "role",
|
|
357
|
-
"type": "uint8"
|
|
358
|
-
}
|
|
359
|
-
],
|
|
360
|
-
"name": "setOracle",
|
|
361
|
-
"outputs": [],
|
|
362
|
-
"stateMutability": "nonpayable",
|
|
363
|
-
"type": "function"
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
"inputs": [
|
|
367
|
-
{
|
|
368
|
-
"components": [
|
|
369
|
-
{
|
|
370
|
-
"internalType": "address",
|
|
371
|
-
"name": "vToken",
|
|
372
|
-
"type": "address"
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
"internalType": "address[3]",
|
|
376
|
-
"name": "oracles",
|
|
377
|
-
"type": "address[3]"
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
"internalType": "bool[3]",
|
|
381
|
-
"name": "enableFlagsForOracles",
|
|
382
|
-
"type": "bool[3]"
|
|
383
|
-
}
|
|
384
|
-
],
|
|
385
|
-
"internalType": "struct ResilientOracle.TokenConfig",
|
|
386
|
-
"name": "tokenConfig",
|
|
387
|
-
"type": "tuple"
|
|
388
|
-
}
|
|
389
|
-
],
|
|
390
|
-
"name": "setTokenConfig",
|
|
391
|
-
"outputs": [],
|
|
392
|
-
"stateMutability": "nonpayable",
|
|
393
|
-
"type": "function"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"inputs": [
|
|
397
|
-
{
|
|
398
|
-
"components": [
|
|
399
|
-
{
|
|
400
|
-
"internalType": "address",
|
|
401
|
-
"name": "vToken",
|
|
402
|
-
"type": "address"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"internalType": "address[3]",
|
|
406
|
-
"name": "oracles",
|
|
407
|
-
"type": "address[3]"
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
"internalType": "bool[3]",
|
|
411
|
-
"name": "enableFlagsForOracles",
|
|
412
|
-
"type": "bool[3]"
|
|
413
|
-
}
|
|
414
|
-
],
|
|
415
|
-
"internalType": "struct ResilientOracle.TokenConfig[]",
|
|
416
|
-
"name": "tokenConfigs_",
|
|
417
|
-
"type": "tuple[]"
|
|
418
|
-
}
|
|
419
|
-
],
|
|
420
|
-
"name": "setTokenConfigs",
|
|
421
|
-
"outputs": [],
|
|
422
|
-
"stateMutability": "nonpayable",
|
|
423
|
-
"type": "function"
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
"inputs": [
|
|
427
|
-
{
|
|
428
|
-
"internalType": "address",
|
|
429
|
-
"name": "newOwner",
|
|
430
|
-
"type": "address"
|
|
431
|
-
}
|
|
432
|
-
],
|
|
433
|
-
"name": "transferOwnership",
|
|
434
|
-
"outputs": [],
|
|
435
|
-
"stateMutability": "nonpayable",
|
|
436
|
-
"type": "function"
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
"inputs": [],
|
|
440
|
-
"name": "unpause",
|
|
441
|
-
"outputs": [],
|
|
442
|
-
"stateMutability": "nonpayable",
|
|
443
|
-
"type": "function"
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"inputs": [
|
|
447
|
-
{
|
|
448
|
-
"internalType": "address",
|
|
449
|
-
"name": "vToken",
|
|
450
|
-
"type": "address"
|
|
451
|
-
}
|
|
452
|
-
],
|
|
453
|
-
"name": "updatePrice",
|
|
454
|
-
"outputs": [],
|
|
455
|
-
"stateMutability": "nonpayable",
|
|
456
|
-
"type": "function"
|
|
457
|
-
}
|
|
458
|
-
],
|
|
459
|
-
"transactionHash": "0x5ff8bcff5375f0aa88529ee9765b0c719eaee41af8cca72388fa96d468893878",
|
|
460
|
-
"receipt": {
|
|
461
|
-
"to": null,
|
|
462
|
-
"from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
|
|
463
|
-
"contractAddress": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
|
|
464
|
-
"transactionIndex": 0,
|
|
465
|
-
"gasUsed": "1501077",
|
|
466
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
467
|
-
"blockHash": "0x1055954806247c42fe766b398ce853e5d505a9ceb6317dc3a359b54ba3dd507a",
|
|
468
|
-
"transactionHash": "0x5ff8bcff5375f0aa88529ee9765b0c719eaee41af8cca72388fa96d468893878",
|
|
469
|
-
"logs": [],
|
|
470
|
-
"blockNumber": 4,
|
|
471
|
-
"cumulativeGasUsed": "1501077",
|
|
472
|
-
"status": 1,
|
|
473
|
-
"byzantium": true
|
|
474
|
-
},
|
|
475
|
-
"args": [],
|
|
476
|
-
"numDeployments": 1,
|
|
477
|
-
"solcInputHash": "50629170e50dc9fec79dac585e95ac05",
|
|
478
|
-
"metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"isEnable\",\"type\":\"bool\"}],\"name\":\"GlobalEnable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"role\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"enable\",\"type\":\"bool\"}],\"name\":\"OracleEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"role\",\"type\":\"uint256\"}],\"name\":\"OracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"mainOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pivotOracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fallbackOracle\",\"type\":\"address\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"INVALID_PRICE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"boundValidator\",\"outputs\":[{\"internalType\":\"contract BoundValidatorInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"enable\",\"type\":\"bool\"}],\"name\":\"enableOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"getTokenConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"getUnderlyingPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract BoundValidatorInterface\",\"name\":\"_boundValidator\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"updatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"enableOracle(address,uint8,bool)\":{\"params\":{\"enable\":\"expected status\",\"role\":\"oracle role\",\"vToken\":\"vToken address\"}},\"getOracle(address,uint8)\":{\"params\":{\"role\":\"oracle role\",\"vToken\":\"vtoken address\"}},\"getTokenConfig(address)\":{\"details\":\"Get token config by vToken address\",\"params\":{\"vToken\":\"vtoken address\"}},\"getUnderlyingPrice(address)\":{\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price USD price in 18 decimals\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setOracle(address,address,uint8)\":{\"params\":{\"oracle\":\"oracle address\",\"role\":\"oracle role\",\"vToken\":\"vToken address\"}},\"setTokenConfig((address,address[3],bool[3]))\":{\"params\":{\"tokenConfig\":\"token config struct\"}},\"setTokenConfigs((address,address[3],bool[3])[])\":{\"params\":{\"tokenConfigs_\":\"token config array\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updatePrice(address)\":{\"params\":{\"vToken\":\"vToken address\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"enableOracle(address,uint8,bool)\":{\"notice\":\"Enable/disable oracle for the input vToken, input vToken MUST exist\"},\"getOracle(address,uint8)\":{\"notice\":\"Get oracle & enabling status by vToken address\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Get price of underlying asset of the input vToken, check flow: - check the global pausing status - check price from main oracle against pivot oracle - check price from fallback oracle against pivot oracle or main oracle if fails\"},\"pause()\":{\"notice\":\"Pause protocol\"},\"setOracle(address,address,uint8)\":{\"notice\":\"Set oracle of any type for the input vToken, input vToken MUST exist\"},\"setTokenConfig((address,address[3],bool[3]))\":{\"notice\":\"Set single token configs, vToken MUST HAVE NOT be added before, and main oracle MUST NOT be zero address\"},\"setTokenConfigs((address,address[3],bool[3])[])\":{\"notice\":\"Batch set token configs\"},\"unpause()\":{\"notice\":\"Unpause protocol\"},\"updatePrice(address)\":{\"notice\":\"Currently it calls the updateTwap\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ResilientOracle.sol\":\"ResilientOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"contracts/ResilientOracle.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"./interfaces/OracleInterface.sol\\\";\\n\\ncontract ResilientOracle is OwnableUpgradeable, PausableUpgradeable, ResilientOracleInterface {\\n uint256 public constant INVALID_PRICE = 0;\\n\\n BoundValidatorInterface public boundValidator;\\n\\n /**\\n * @dev oracle role, we have 3 roles at the moment\\n * MAIN: The most trustworthy price source\\n * PIVOT: Not so trustworthy price source, used as a loose sanity checker\\n * FALLBACK: The backup source when main oracle price is invalidated\\n */\\n enum OracleRole {\\n MAIN,\\n PIVOT,\\n FALLBACK\\n }\\n\\n struct TokenConfig {\\n /// @notice vToken address\\n address vToken;\\n /// @notice `oracles` stores the oracles in the order of: [main, pivot, fallback],\\n /// it can be indexed with enum OracleRole value\\n address[3] oracles;\\n /// @notice `enableFlagsForOracles` stores the oracle enable statuses\\n /// for each oracle in the same order as `oracles`\\n bool[3] enableFlagsForOracles;\\n }\\n\\n mapping(address => TokenConfig) private tokenConfigs;\\n\\n event GlobalEnable(bool indexed isEnable);\\n event TokenConfigAdded(\\n address indexed token,\\n address indexed mainOracle,\\n address indexed pivotOracle,\\n address fallbackOracle\\n );\\n event OracleSet(address indexed vToken, address indexed oracle, uint256 indexed role);\\n event OracleEnabled(address indexed vToken, uint256 indexed role, bool indexed enable);\\n\\n modifier notNullAddress(address someone) {\\n require(someone != address(0), \\\"can't be zero address\\\");\\n _;\\n }\\n\\n /**\\n * @notice Check whether token config exist by checking whether vToken is zero address\\n * @dev vToken can't be set to zero, so it's suitable to be used to check\\n * @param vToken vtoken address\\n */\\n modifier checkTokenConfigExistance(address vToken) {\\n require(tokenConfigs[vToken].vToken != address(0), \\\"token config must exist\\\");\\n _;\\n }\\n\\n function initialize(BoundValidatorInterface _boundValidator) public initializer {\\n require(address(_boundValidator) != address(0), \\\"invaliud bound validator address\\\");\\n boundValidator = _boundValidator;\\n\\n __Ownable_init();\\n __Pausable_init();\\n }\\n\\n /**\\n * @notice Pause protocol\\n */\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @notice Unpause protocol\\n */\\n function unpause() external onlyOwner {\\n _unpause();\\n }\\n\\n /**\\n * @dev Get token config by vToken address\\n * @param vToken vtoken address\\n */\\n function getTokenConfig(address vToken) external view returns (TokenConfig memory) {\\n return tokenConfigs[vToken];\\n }\\n\\n /**\\n * @notice Get oracle & enabling status by vToken address\\n * @param vToken vtoken address\\n * @param role oracle role\\n */\\n function getOracle(address vToken, OracleRole role) public view returns (address oracle, bool enabled) {\\n oracle = tokenConfigs[vToken].oracles[uint256(role)];\\n enabled = tokenConfigs[vToken].enableFlagsForOracles[uint256(role)];\\n }\\n\\n /**\\n * @notice Batch set token configs\\n * @param tokenConfigs_ token config array\\n */\\n function setTokenConfigs(TokenConfig[] memory tokenConfigs_) external onlyOwner {\\n require(tokenConfigs_.length != 0, \\\"length can't be 0\\\");\\n for (uint256 i = 0; i < tokenConfigs_.length; i++) {\\n setTokenConfig(tokenConfigs_[i]);\\n }\\n }\\n\\n /**\\n * @notice Set single token configs, vToken MUST HAVE NOT be added before, and main oracle MUST NOT be zero address\\n * @param tokenConfig token config struct\\n */\\n function setTokenConfig(TokenConfig memory tokenConfig)\\n public\\n onlyOwner\\n notNullAddress(tokenConfig.vToken)\\n notNullAddress(tokenConfig.oracles[uint256(OracleRole.MAIN)])\\n {\\n tokenConfigs[tokenConfig.vToken] = tokenConfig;\\n emit TokenConfigAdded(\\n tokenConfig.vToken,\\n tokenConfig.oracles[uint256(OracleRole.MAIN)],\\n tokenConfig.oracles[uint256(OracleRole.PIVOT)],\\n tokenConfig.oracles[uint256(OracleRole.FALLBACK)]\\n );\\n }\\n\\n /**\\n * @notice Set oracle of any type for the input vToken, input vToken MUST exist\\n * @param vToken vToken address\\n * @param oracle oracle address\\n * @param role oracle role\\n */\\n function setOracle(\\n address vToken,\\n address oracle,\\n OracleRole role\\n ) external onlyOwner notNullAddress(vToken) checkTokenConfigExistance(vToken) {\\n require(!(oracle == address(0) && role == OracleRole.MAIN), \\\"can't set zero address to main oracle\\\");\\n tokenConfigs[vToken].oracles[uint256(role)] = oracle;\\n emit OracleSet(vToken, oracle, uint256(role));\\n }\\n\\n /**\\n * @notice Enable/disable oracle for the input vToken, input vToken MUST exist\\n * @param vToken vToken address\\n * @param role oracle role\\n * @param enable expected status\\n */\\n function enableOracle(\\n address vToken,\\n OracleRole role,\\n bool enable\\n ) external onlyOwner notNullAddress(vToken) checkTokenConfigExistance(vToken) {\\n tokenConfigs[vToken].enableFlagsForOracles[uint256(role)] = enable;\\n emit OracleEnabled(vToken, uint256(role), enable);\\n }\\n\\n /**\\n * @notice Currently it calls the updateTwap\\n * @param vToken vToken address\\n */\\n function updatePrice(address vToken) external override {\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n if (pivotOracle != address(0) && pivotOracleEnabled) {\\n //if PIVOT oracle is PythOrcle it will revert so we need to catch the revert\\n try TwapInterface(pivotOracle).updateTwap(vToken) returns (uint256 _price) {} catch {}\\n }\\n }\\n\\n /**\\n * @notice Get price of underlying asset of the input vToken, check flow:\\n * - check the global pausing status\\n * - check price from main oracle against pivot oracle\\n * - check price from fallback oracle against pivot oracle or main oracle if fails\\n * @param vToken vToken address\\n * @return price USD price in 18 decimals\\n */\\n function getUnderlyingPrice(address vToken) external view override returns (uint256) {\\n require(!paused(), \\\"resilient oracle is paused\\\");\\n\\n uint256 price = _getMainOraclePrice(vToken);\\n if (price == INVALID_PRICE) {\\n price = _getFallbackOraclePrice(vToken);\\n }\\n\\n require(price != INVALID_PRICE, \\\"invalid resilient oracle price\\\");\\n return price;\\n }\\n\\n /**\\n * @notice This function won't revert when price is 0, because the fallback oracle may come to play later\\n * @param vToken vToken address\\n * @return price USD price in 18 decimals\\n */\\n function _getMainOraclePrice(address vToken) internal view returns (uint256) {\\n uint256 price = INVALID_PRICE;\\n\\n (address mainOracle, bool mainOracleEnabled) = getOracle(vToken, OracleRole.MAIN);\\n if (mainOracleEnabled && mainOracle != address(0)) {\\n try OracleInterface(mainOracle).getUnderlyingPrice(vToken) returns (uint256 mainOraclePrice) {\\n price = mainOraclePrice;\\n\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n\\n if (pivotOracleEnabled && pivotOracle != address(0)) {\\n try OracleInterface(pivotOracle).getUnderlyingPrice(vToken) returns (uint256 pivotPrice) {\\n if (pivotPrice != INVALID_PRICE) {\\n bool isPriceValid = boundValidator.validatePriceWithAnchorPrice(vToken, price, pivotPrice);\\n if (!isPriceValid) {\\n return INVALID_PRICE;\\n }\\n }\\n } catch {}\\n }\\n } catch {}\\n }\\n\\n return price;\\n }\\n\\n /**\\n * @notice This function won't revert when price is 0, because the getUnderlyingPrice checks if pirce is > 0\\n * @param vToken vToken address\\n * @return price USD price in 18 decimals\\n */\\n function _getFallbackOraclePrice(address vToken) internal view returns (uint256) {\\n uint256 price = INVALID_PRICE;\\n bool compareWithMain = false;\\n\\n (address fallbackOracle, bool fallbackEnabled) = getOracle(vToken, OracleRole.FALLBACK);\\n if (fallbackEnabled && fallbackOracle != address(0)) {\\n try OracleInterface(fallbackOracle).getUnderlyingPrice(vToken) returns (uint256 fallbackOraclePrice) {\\n price = fallbackOraclePrice;\\n\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n if (pivotOracleEnabled && pivotOracle != address(0)) {\\n try OracleInterface(pivotOracle).getUnderlyingPrice(vToken) returns (uint256 pivotPrice) {\\n if (pivotPrice != INVALID_PRICE) {\\n bool isPriceValid = boundValidator.validatePriceWithAnchorPrice(vToken, price, pivotPrice);\\n if (!isPriceValid) {\\n compareWithMain = true;\\n }\\n } else {\\n compareWithMain = true;\\n }\\n } catch {\\n compareWithMain = true;\\n }\\n } else {\\n compareWithMain = true;\\n }\\n } catch {}\\n }\\n\\n if (compareWithMain) {\\n (address mainOracle, bool mainOracleEnabled) = getOracle(vToken, OracleRole.MAIN);\\n if (mainOracleEnabled && mainOracle != address(0)) {\\n try OracleInterface(mainOracle).getUnderlyingPrice(vToken) returns (uint256 mainOraclePrice) {\\n bool isPriceValid = boundValidator.validatePriceWithAnchorPrice(vToken, price, mainOraclePrice);\\n if (!isPriceValid) {\\n return INVALID_PRICE;\\n } else {\\n price = mainOraclePrice;\\n }\\n } catch {\\n price = INVALID_PRICE;\\n }\\n } else {\\n price = INVALID_PRICE;\\n }\\n }\\n\\n return price;\\n }\\n}\\n\",\"keccak256\":\"0x17493c3a2333c8fd665918dd1753e5943d7ba6b914b4895d798e3553014a4c89\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\npragma experimental ABIEncoderV2;\\n\\ninterface OracleInterface {\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address vToken) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address vToken,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x474f40570a75a85caa03217fdef1646e22361ad430b0a67f51b2c038668c3836\",\"license\":\"UNLICENSED\"}},\"version\":1}",
|
|
479
|
-
"bytecode": "0x608060405234801561001057600080fd5b50611a2f806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80638456cb59116100a2578063a6b1344a11610071578063a6b1344a14610215578063c4d66de814610228578063cb67e3b11461023b578063f2fde38b1461025b578063fc57d4df1461026e57600080fd5b80638456cb59146101b75780638b855da4146101bf5780638da5cb5b146101f157806396e85ced1461020257600080fd5b80634b932b8f116100de5780634b932b8f146101705780634bf39cba146101835780635c975abb14610199578063715018a6146101af57600080fd5b80632cfa387114610110578063333a21b01461012557806333d33494146101385780633f4ba83a14610168575b600080fd5b61012361011e3660046116b2565b610281565b005b610123610133366004611762565b610317565b60975461014b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610123610433565b61012361017e366004611799565b610445565b61018b600081565b60405190815260200161015f565b60655460ff16604051901515815260200161015f565b610123610585565b610123610597565b6101d26101cd3660046117e2565b6105a7565b604080516001600160a01b03909316835290151560208301520161015f565b6033546001600160a01b031661014b565b610123610210366004611817565b610649565b610123610223366004611834565b6106e6565b610123610236366004611817565b6108b2565b61024e610249366004611817565b610a3c565b60405161015f919061187b565b610123610269366004611817565b610b11565b61018b61027c366004611817565b610b8a565b610289610c56565b80516000036102d35760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b60005b8151811015610313576103018282815181106102f4576102f46118f6565b6020026020010151610317565b8061030b8161190c565b9150506102d6565b5050565b61031f610c56565b80516001600160a01b0381166103475760405162461bcd60e51b81526004016102ca90611933565b6020820151516001600160a01b0381166103735760405162461bcd60e51b81526004016102ca90611933565b82516001600160a01b039081166000908152609860209081526040909120855181546001600160a01b03191693169290921782558401518491906103bd90600183019060036113e2565b5060408201516103d3906004830190600361143a565b505050602083810151808201518151865160409384015193516001600160a01b039485168152928416949184169316917fa51ad01e2270c314a7b78f0c60fe66c723f2d06c121d63fcdce776e654878fc1910160405180910390a4505050565b61043b610c56565b610443610cb0565b565b61044d610c56565b826001600160a01b0381166104745760405162461bcd60e51b81526004016102ca90611933565b6001600160a01b038085166000908152609860205260409020548591166104d75760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016102ca565b6001600160a01b0385166000908152609860205260409020839060040185600281111561050657610506611962565b60038110610516576105166118f6565b602091828204019190066101000a81548160ff02191690831515021790555082151584600281111561054a5761054a611962565b6040516001600160a01b038816907fcf3cad1ec87208efbde5d82a0557484a78d4182c3ad16926a5463bc1f7234b3d90600090a45050505050565b61058d610c56565b6104436000610d02565b61059f610c56565b610443610d54565b6001600160a01b038216600090815260986020526040812081906001018360028111156105d6576105d6611962565b600381106105e6576105e66118f6565b01546001600160a01b0385811660009081526098602052604090209116925060040183600281111561061a5761061a611962565b6003811061062a5761062a6118f6565b602091828204019190069054906101000a900460ff1690509250929050565b6000806106578360016105a7565b90925090506001600160a01b038216158015906106715750805b156106e15760405163725068a560e01b81526001600160a01b03848116600483015283169063725068a5906024016020604051808303816000875af19250505080156106da575060408051601f3d908101601f191682019092526106d791810190611978565b60015b156106e157505b505050565b6106ee610c56565b826001600160a01b0381166107155760405162461bcd60e51b81526004016102ca90611933565b6001600160a01b038085166000908152609860205260409020548591166107785760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016102ca565b6001600160a01b0384161580156107a05750600083600281111561079e5761079e611962565b145b156107fb5760405162461bcd60e51b815260206004820152602560248201527f63616e277420736574207a65726f206164647265737320746f206d61696e206f6044820152647261636c6560d81b60648201526084016102ca565b6001600160a01b0385166000908152609860205260409020849060010184600281111561082a5761082a611962565b6003811061083a5761083a6118f6565b0180546001600160a01b0319166001600160a01b039290921691909117905582600281111561086b5761086b611962565b846001600160a01b0316866001600160a01b03167fea681d3efb830ef032a9c29a7215b5ceeeb546250d2c463dbf87817aecda1bf160405160405180910390a45050505050565b600054610100900460ff16158080156108d25750600054600160ff909116105b806108ec5750303b1580156108ec575060005460ff166001145b61094f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ca565b6000805460ff191660011790558015610972576000805461ff0019166101001790555b6001600160a01b0382166109c85760405162461bcd60e51b815260206004820181905260248201527f696e76616c69756420626f756e642076616c696461746f72206164647265737360448201526064016102ca565b609780546001600160a01b0319166001600160a01b0384161790556109eb610d91565b6109f3610dc0565b8015610313576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b610a446114c7565b6001600160a01b038281166000908152609860209081526040918290208251606080820185528254909516815283519485019384905293909291840191600184019060039082845b81546001600160a01b03168152600190910190602001808311610a8c575050509183525050604080516060810191829052602090920191906004840190600390826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610ad15790505050505050815250509050919050565b610b19610c56565b6001600160a01b038116610b7e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ca565b610b8781610d02565b50565b6000610b9860655460ff1690565b15610be55760405162461bcd60e51b815260206004820152601a60248201527f726573696c69656e74206f7261636c652069732070617573656400000000000060448201526064016102ca565b6000610bf083610def565b905080610c0357610c0083610fc4565b90505b80610c505760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726573696c69656e74206f7261636c65207072696365000060448201526064016102ca565b92915050565b6033546001600160a01b031633146104435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ca565b610cb86112f0565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610d5c611339565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610ce53390565b600054610100900460ff16610db85760405162461bcd60e51b81526004016102ca90611991565b61044361137f565b600054610100900460ff16610de75760405162461bcd60e51b81526004016102ca90611991565b6104436113af565b6000808080610dfe85826105a7565b91509150808015610e1757506001600160a01b03821615155b15610fbb5760405163fc57d4df60e01b81526001600160a01b03868116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610e7e575060408051601f3d908101601f19168201909252610e7b91810190611978565b60015b15610fbb57809350600080610e948860016105a7565b91509150808015610ead57506001600160a01b03821615155b15610fb75760405163fc57d4df60e01b81526001600160a01b03898116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610f14575060408051601f3d908101601f19168201909252610f1191810190611978565b60015b15610fb7578015610fb557609754604051634be3819f60e11b81526001600160a01b038b81166004830152602482018a90526044820184905260009216906397c7033e90606401602060405180830381865afa158015610f78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9c91906119dc565b905080610fb3575060009998505050505050505050565b505b505b5050505b50909392505050565b600080808080610fd58660026105a7565b91509150808015610fee57506001600160a01b03821615155b156111a15760405163fc57d4df60e01b81526001600160a01b03878116600483015283169063fc57d4df90602401602060405180830381865afa925050508015611055575060408051601f3d908101601f1916820190925261105291810190611978565b60015b156111a15780945060008061106b8960016105a7565b9150915080801561108457506001600160a01b03821615155b156111985760405163fc57d4df60e01b81526001600160a01b038a8116600483015283169063fc57d4df90602401602060405180830381865afa9250505080156110eb575060408051601f3d908101601f191682019092526110e891810190611978565b60015b6110f8576001955061119d565b801561118d57609754604051634be3819f60e11b81526001600160a01b038c81166004830152602482018b90526044820184905260009216906397c7033e90606401602060405180830381865afa158015611157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117b91906119dc565b90508061118757600197505b50611192565b600196505b5061119d565b600195505b5050505b82156112e6576000806111b58860006105a7565b915091508080156111ce57506001600160a01b03821615155b156112de5760405163fc57d4df60e01b81526001600160a01b03898116600483015283169063fc57d4df90602401602060405180830381865afa925050508015611235575060408051601f3d908101601f1916820190925261123291810190611978565b60015b61124257600095506112e3565b609754604051634be3819f60e11b81526001600160a01b038b81166004830152602482018a90526044820184905260009216906397c7033e90606401602060405180830381865afa15801561129b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bf91906119dc565b9050806112d6575060009998505050505050505050565b5095506112e3565b600095505b50505b5091949350505050565b60655460ff166104435760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102ca565b60655460ff16156104435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102ca565b600054610100900460ff166113a65760405162461bcd60e51b81526004016102ca90611991565b61044333610d02565b600054610100900460ff166113d65760405162461bcd60e51b81526004016102ca90611991565b6065805460ff19169055565b826003810192821561142a579160200282015b8281111561142a57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906113f5565b506114369291506114fc565b5090565b60018301918390821561142a5791602002820160005b8382111561148d57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302611450565b80156114ba5782816101000a81549060ff021916905560010160208160000104928301926001030261148d565b50506114369291506114fc565b604051806060016040528060006001600160a01b031681526020016114ea611511565b81526020016114f7611511565b905290565b5b8082111561143657600081556001016114fd565b60405180606001604052806003906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156115685761156861152f565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156115975761159761152f565b604052919050565b6001600160a01b0381168114610b8757600080fd5b8015158114610b8757600080fd5b600082601f8301126115d357600080fd5b6115db611545565b8060608401858111156115ed57600080fd5b845b81811015611610578035611602816115b4565b8452602093840193016115ef565b509095945050505050565b600060e0828403121561162d57600080fd5b611635611545565b905081356116428161159f565b81526020603f8301841361165557600080fd5b61165d611545565b80608085018681111561166f57600080fd5b8386015b818110156116935780356116868161159f565b8452928401928401611673565b5081848601526116a387826115c2565b60408601525050505092915050565b600060208083850312156116c557600080fd5b823567ffffffffffffffff808211156116dd57600080fd5b818501915085601f8301126116f157600080fd5b8135818111156117035761170361152f565b611711848260051b0161156e565b818152848101925060e091820284018501918883111561173057600080fd5b938501935b8285101561175657611747898661161b565b84529384019392850192611735565b50979650505050505050565b600060e0828403121561177457600080fd5b61177e838361161b565b9392505050565b80356003811061179457600080fd5b919050565b6000806000606084860312156117ae57600080fd5b83356117b98161159f565b92506117c760208501611785565b915060408401356117d7816115b4565b809150509250925092565b600080604083850312156117f557600080fd5b82356118008161159f565b915061180e60208401611785565b90509250929050565b60006020828403121561182957600080fd5b813561177e8161159f565b60008060006060848603121561184957600080fd5b83356118548161159f565b925060208401356118648161159f565b915061187260408501611785565b90509250925092565b81516001600160a01b03908116825260208084015160e0840192919081850160005b60038110156118bc57825185168252918301919083019060010161189d565b505050604085015191506080840160005b60038110156118ec5783511515825292820192908201906001016118cd565b5050505092915050565b634e487b7160e01b600052603260045260246000fd5b60006001820161192c57634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561198a57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156119ee57600080fd5b815161177e816115b456fea26469706673582212200bd0506c453200c10440b4869b37c5b1b99e9a6ae4bfcfc1f0004c71a4c5865564736f6c634300080d0033",
|
|
480
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80638456cb59116100a2578063a6b1344a11610071578063a6b1344a14610215578063c4d66de814610228578063cb67e3b11461023b578063f2fde38b1461025b578063fc57d4df1461026e57600080fd5b80638456cb59146101b75780638b855da4146101bf5780638da5cb5b146101f157806396e85ced1461020257600080fd5b80634b932b8f116100de5780634b932b8f146101705780634bf39cba146101835780635c975abb14610199578063715018a6146101af57600080fd5b80632cfa387114610110578063333a21b01461012557806333d33494146101385780633f4ba83a14610168575b600080fd5b61012361011e3660046116b2565b610281565b005b610123610133366004611762565b610317565b60975461014b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610123610433565b61012361017e366004611799565b610445565b61018b600081565b60405190815260200161015f565b60655460ff16604051901515815260200161015f565b610123610585565b610123610597565b6101d26101cd3660046117e2565b6105a7565b604080516001600160a01b03909316835290151560208301520161015f565b6033546001600160a01b031661014b565b610123610210366004611817565b610649565b610123610223366004611834565b6106e6565b610123610236366004611817565b6108b2565b61024e610249366004611817565b610a3c565b60405161015f919061187b565b610123610269366004611817565b610b11565b61018b61027c366004611817565b610b8a565b610289610c56565b80516000036102d35760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b60005b8151811015610313576103018282815181106102f4576102f46118f6565b6020026020010151610317565b8061030b8161190c565b9150506102d6565b5050565b61031f610c56565b80516001600160a01b0381166103475760405162461bcd60e51b81526004016102ca90611933565b6020820151516001600160a01b0381166103735760405162461bcd60e51b81526004016102ca90611933565b82516001600160a01b039081166000908152609860209081526040909120855181546001600160a01b03191693169290921782558401518491906103bd90600183019060036113e2565b5060408201516103d3906004830190600361143a565b505050602083810151808201518151865160409384015193516001600160a01b039485168152928416949184169316917fa51ad01e2270c314a7b78f0c60fe66c723f2d06c121d63fcdce776e654878fc1910160405180910390a4505050565b61043b610c56565b610443610cb0565b565b61044d610c56565b826001600160a01b0381166104745760405162461bcd60e51b81526004016102ca90611933565b6001600160a01b038085166000908152609860205260409020548591166104d75760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016102ca565b6001600160a01b0385166000908152609860205260409020839060040185600281111561050657610506611962565b60038110610516576105166118f6565b602091828204019190066101000a81548160ff02191690831515021790555082151584600281111561054a5761054a611962565b6040516001600160a01b038816907fcf3cad1ec87208efbde5d82a0557484a78d4182c3ad16926a5463bc1f7234b3d90600090a45050505050565b61058d610c56565b6104436000610d02565b61059f610c56565b610443610d54565b6001600160a01b038216600090815260986020526040812081906001018360028111156105d6576105d6611962565b600381106105e6576105e66118f6565b01546001600160a01b0385811660009081526098602052604090209116925060040183600281111561061a5761061a611962565b6003811061062a5761062a6118f6565b602091828204019190069054906101000a900460ff1690509250929050565b6000806106578360016105a7565b90925090506001600160a01b038216158015906106715750805b156106e15760405163725068a560e01b81526001600160a01b03848116600483015283169063725068a5906024016020604051808303816000875af19250505080156106da575060408051601f3d908101601f191682019092526106d791810190611978565b60015b156106e157505b505050565b6106ee610c56565b826001600160a01b0381166107155760405162461bcd60e51b81526004016102ca90611933565b6001600160a01b038085166000908152609860205260409020548591166107785760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016102ca565b6001600160a01b0384161580156107a05750600083600281111561079e5761079e611962565b145b156107fb5760405162461bcd60e51b815260206004820152602560248201527f63616e277420736574207a65726f206164647265737320746f206d61696e206f6044820152647261636c6560d81b60648201526084016102ca565b6001600160a01b0385166000908152609860205260409020849060010184600281111561082a5761082a611962565b6003811061083a5761083a6118f6565b0180546001600160a01b0319166001600160a01b039290921691909117905582600281111561086b5761086b611962565b846001600160a01b0316866001600160a01b03167fea681d3efb830ef032a9c29a7215b5ceeeb546250d2c463dbf87817aecda1bf160405160405180910390a45050505050565b600054610100900460ff16158080156108d25750600054600160ff909116105b806108ec5750303b1580156108ec575060005460ff166001145b61094f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ca565b6000805460ff191660011790558015610972576000805461ff0019166101001790555b6001600160a01b0382166109c85760405162461bcd60e51b815260206004820181905260248201527f696e76616c69756420626f756e642076616c696461746f72206164647265737360448201526064016102ca565b609780546001600160a01b0319166001600160a01b0384161790556109eb610d91565b6109f3610dc0565b8015610313576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b610a446114c7565b6001600160a01b038281166000908152609860209081526040918290208251606080820185528254909516815283519485019384905293909291840191600184019060039082845b81546001600160a01b03168152600190910190602001808311610a8c575050509183525050604080516060810191829052602090920191906004840190600390826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610ad15790505050505050815250509050919050565b610b19610c56565b6001600160a01b038116610b7e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ca565b610b8781610d02565b50565b6000610b9860655460ff1690565b15610be55760405162461bcd60e51b815260206004820152601a60248201527f726573696c69656e74206f7261636c652069732070617573656400000000000060448201526064016102ca565b6000610bf083610def565b905080610c0357610c0083610fc4565b90505b80610c505760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726573696c69656e74206f7261636c65207072696365000060448201526064016102ca565b92915050565b6033546001600160a01b031633146104435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102ca565b610cb86112f0565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610d5c611339565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610ce53390565b600054610100900460ff16610db85760405162461bcd60e51b81526004016102ca90611991565b61044361137f565b600054610100900460ff16610de75760405162461bcd60e51b81526004016102ca90611991565b6104436113af565b6000808080610dfe85826105a7565b91509150808015610e1757506001600160a01b03821615155b15610fbb5760405163fc57d4df60e01b81526001600160a01b03868116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610e7e575060408051601f3d908101601f19168201909252610e7b91810190611978565b60015b15610fbb57809350600080610e948860016105a7565b91509150808015610ead57506001600160a01b03821615155b15610fb75760405163fc57d4df60e01b81526001600160a01b03898116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610f14575060408051601f3d908101601f19168201909252610f1191810190611978565b60015b15610fb7578015610fb557609754604051634be3819f60e11b81526001600160a01b038b81166004830152602482018a90526044820184905260009216906397c7033e90606401602060405180830381865afa158015610f78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9c91906119dc565b905080610fb3575060009998505050505050505050565b505b505b5050505b50909392505050565b600080808080610fd58660026105a7565b91509150808015610fee57506001600160a01b03821615155b156111a15760405163fc57d4df60e01b81526001600160a01b03878116600483015283169063fc57d4df90602401602060405180830381865afa925050508015611055575060408051601f3d908101601f1916820190925261105291810190611978565b60015b156111a15780945060008061106b8960016105a7565b9150915080801561108457506001600160a01b03821615155b156111985760405163fc57d4df60e01b81526001600160a01b038a8116600483015283169063fc57d4df90602401602060405180830381865afa9250505080156110eb575060408051601f3d908101601f191682019092526110e891810190611978565b60015b6110f8576001955061119d565b801561118d57609754604051634be3819f60e11b81526001600160a01b038c81166004830152602482018b90526044820184905260009216906397c7033e90606401602060405180830381865afa158015611157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117b91906119dc565b90508061118757600197505b50611192565b600196505b5061119d565b600195505b5050505b82156112e6576000806111b58860006105a7565b915091508080156111ce57506001600160a01b03821615155b156112de5760405163fc57d4df60e01b81526001600160a01b03898116600483015283169063fc57d4df90602401602060405180830381865afa925050508015611235575060408051601f3d908101601f1916820190925261123291810190611978565b60015b61124257600095506112e3565b609754604051634be3819f60e11b81526001600160a01b038b81166004830152602482018a90526044820184905260009216906397c7033e90606401602060405180830381865afa15801561129b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bf91906119dc565b9050806112d6575060009998505050505050505050565b5095506112e3565b600095505b50505b5091949350505050565b60655460ff166104435760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102ca565b60655460ff16156104435760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102ca565b600054610100900460ff166113a65760405162461bcd60e51b81526004016102ca90611991565b61044333610d02565b600054610100900460ff166113d65760405162461bcd60e51b81526004016102ca90611991565b6065805460ff19169055565b826003810192821561142a579160200282015b8281111561142a57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906113f5565b506114369291506114fc565b5090565b60018301918390821561142a5791602002820160005b8382111561148d57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302611450565b80156114ba5782816101000a81549060ff021916905560010160208160000104928301926001030261148d565b50506114369291506114fc565b604051806060016040528060006001600160a01b031681526020016114ea611511565b81526020016114f7611511565b905290565b5b8082111561143657600081556001016114fd565b60405180606001604052806003906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156115685761156861152f565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156115975761159761152f565b604052919050565b6001600160a01b0381168114610b8757600080fd5b8015158114610b8757600080fd5b600082601f8301126115d357600080fd5b6115db611545565b8060608401858111156115ed57600080fd5b845b81811015611610578035611602816115b4565b8452602093840193016115ef565b509095945050505050565b600060e0828403121561162d57600080fd5b611635611545565b905081356116428161159f565b81526020603f8301841361165557600080fd5b61165d611545565b80608085018681111561166f57600080fd5b8386015b818110156116935780356116868161159f565b8452928401928401611673565b5081848601526116a387826115c2565b60408601525050505092915050565b600060208083850312156116c557600080fd5b823567ffffffffffffffff808211156116dd57600080fd5b818501915085601f8301126116f157600080fd5b8135818111156117035761170361152f565b611711848260051b0161156e565b818152848101925060e091820284018501918883111561173057600080fd5b938501935b8285101561175657611747898661161b565b84529384019392850192611735565b50979650505050505050565b600060e0828403121561177457600080fd5b61177e838361161b565b9392505050565b80356003811061179457600080fd5b919050565b6000806000606084860312156117ae57600080fd5b83356117b98161159f565b92506117c760208501611785565b915060408401356117d7816115b4565b809150509250925092565b600080604083850312156117f557600080fd5b82356118008161159f565b915061180e60208401611785565b90509250929050565b60006020828403121561182957600080fd5b813561177e8161159f565b60008060006060848603121561184957600080fd5b83356118548161159f565b925060208401356118648161159f565b915061187260408501611785565b90509250925092565b81516001600160a01b03908116825260208084015160e0840192919081850160005b60038110156118bc57825185168252918301919083019060010161189d565b505050604085015191506080840160005b60038110156118ec5783511515825292820192908201906001016118cd565b5050505092915050565b634e487b7160e01b600052603260045260246000fd5b60006001820161192c57634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b60006020828403121561198a57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156119ee57600080fd5b815161177e816115b456fea26469706673582212200bd0506c453200c10440b4869b37c5b1b99e9a6ae4bfcfc1f0004c71a4c5865564736f6c634300080d0033",
|
|
481
|
-
"devdoc": {
|
|
482
|
-
"kind": "dev",
|
|
483
|
-
"methods": {
|
|
484
|
-
"enableOracle(address,uint8,bool)": {
|
|
485
|
-
"params": {
|
|
486
|
-
"enable": "expected status",
|
|
487
|
-
"role": "oracle role",
|
|
488
|
-
"vToken": "vToken address"
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
"getOracle(address,uint8)": {
|
|
492
|
-
"params": {
|
|
493
|
-
"role": "oracle role",
|
|
494
|
-
"vToken": "vtoken address"
|
|
495
|
-
}
|
|
496
|
-
},
|
|
497
|
-
"getTokenConfig(address)": {
|
|
498
|
-
"details": "Get token config by vToken address",
|
|
499
|
-
"params": {
|
|
500
|
-
"vToken": "vtoken address"
|
|
501
|
-
}
|
|
502
|
-
},
|
|
503
|
-
"getUnderlyingPrice(address)": {
|
|
504
|
-
"params": {
|
|
505
|
-
"vToken": "vToken address"
|
|
506
|
-
},
|
|
507
|
-
"returns": {
|
|
508
|
-
"_0": "price USD price in 18 decimals"
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
"owner()": {
|
|
512
|
-
"details": "Returns the address of the current owner."
|
|
513
|
-
},
|
|
514
|
-
"paused()": {
|
|
515
|
-
"details": "Returns true if the contract is paused, and false otherwise."
|
|
516
|
-
},
|
|
517
|
-
"renounceOwnership()": {
|
|
518
|
-
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
|
|
519
|
-
},
|
|
520
|
-
"setOracle(address,address,uint8)": {
|
|
521
|
-
"params": {
|
|
522
|
-
"oracle": "oracle address",
|
|
523
|
-
"role": "oracle role",
|
|
524
|
-
"vToken": "vToken address"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
"setTokenConfig((address,address[3],bool[3]))": {
|
|
528
|
-
"params": {
|
|
529
|
-
"tokenConfig": "token config struct"
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
"setTokenConfigs((address,address[3],bool[3])[])": {
|
|
533
|
-
"params": {
|
|
534
|
-
"tokenConfigs_": "token config array"
|
|
535
|
-
}
|
|
536
|
-
},
|
|
537
|
-
"transferOwnership(address)": {
|
|
538
|
-
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
|
|
539
|
-
},
|
|
540
|
-
"updatePrice(address)": {
|
|
541
|
-
"params": {
|
|
542
|
-
"vToken": "vToken address"
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
|
-
"version": 1
|
|
547
|
-
},
|
|
548
|
-
"userdoc": {
|
|
549
|
-
"kind": "user",
|
|
550
|
-
"methods": {
|
|
551
|
-
"enableOracle(address,uint8,bool)": {
|
|
552
|
-
"notice": "Enable/disable oracle for the input vToken, input vToken MUST exist"
|
|
553
|
-
},
|
|
554
|
-
"getOracle(address,uint8)": {
|
|
555
|
-
"notice": "Get oracle & enabling status by vToken address"
|
|
556
|
-
},
|
|
557
|
-
"getUnderlyingPrice(address)": {
|
|
558
|
-
"notice": "Get price of underlying asset of the input vToken, check flow: - check the global pausing status - check price from main oracle against pivot oracle - check price from fallback oracle against pivot oracle or main oracle if fails"
|
|
559
|
-
},
|
|
560
|
-
"pause()": {
|
|
561
|
-
"notice": "Pause protocol"
|
|
562
|
-
},
|
|
563
|
-
"setOracle(address,address,uint8)": {
|
|
564
|
-
"notice": "Set oracle of any type for the input vToken, input vToken MUST exist"
|
|
565
|
-
},
|
|
566
|
-
"setTokenConfig((address,address[3],bool[3]))": {
|
|
567
|
-
"notice": "Set single token configs, vToken MUST HAVE NOT be added before, and main oracle MUST NOT be zero address"
|
|
568
|
-
},
|
|
569
|
-
"setTokenConfigs((address,address[3],bool[3])[])": {
|
|
570
|
-
"notice": "Batch set token configs"
|
|
571
|
-
},
|
|
572
|
-
"unpause()": {
|
|
573
|
-
"notice": "Unpause protocol"
|
|
574
|
-
},
|
|
575
|
-
"updatePrice(address)": {
|
|
576
|
-
"notice": "Currently it calls the updateTwap"
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
"version": 1
|
|
580
|
-
},
|
|
581
|
-
"storageLayout": {
|
|
582
|
-
"storage": [
|
|
583
|
-
{
|
|
584
|
-
"astId": 138,
|
|
585
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
586
|
-
"label": "_initialized",
|
|
587
|
-
"offset": 0,
|
|
588
|
-
"slot": "0",
|
|
589
|
-
"type": "t_uint8"
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
"astId": 141,
|
|
593
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
594
|
-
"label": "_initializing",
|
|
595
|
-
"offset": 1,
|
|
596
|
-
"slot": "0",
|
|
597
|
-
"type": "t_bool"
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
"astId": 693,
|
|
601
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
602
|
-
"label": "__gap",
|
|
603
|
-
"offset": 0,
|
|
604
|
-
"slot": "1",
|
|
605
|
-
"type": "t_array(t_uint256)50_storage"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"astId": 10,
|
|
609
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
610
|
-
"label": "_owner",
|
|
611
|
-
"offset": 0,
|
|
612
|
-
"slot": "51",
|
|
613
|
-
"type": "t_address"
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"astId": 130,
|
|
617
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
618
|
-
"label": "__gap",
|
|
619
|
-
"offset": 0,
|
|
620
|
-
"slot": "52",
|
|
621
|
-
"type": "t_array(t_uint256)49_storage"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
"astId": 303,
|
|
625
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
626
|
-
"label": "_paused",
|
|
627
|
-
"offset": 0,
|
|
628
|
-
"slot": "101",
|
|
629
|
-
"type": "t_bool"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"astId": 408,
|
|
633
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
634
|
-
"label": "__gap",
|
|
635
|
-
"offset": 0,
|
|
636
|
-
"slot": "102",
|
|
637
|
-
"type": "t_array(t_uint256)49_storage"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"astId": 3691,
|
|
641
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
642
|
-
"label": "boundValidator",
|
|
643
|
-
"offset": 0,
|
|
644
|
-
"slot": "151",
|
|
645
|
-
"type": "t_contract(BoundValidatorInterface)4730"
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
"astId": 3714,
|
|
649
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
650
|
-
"label": "tokenConfigs",
|
|
651
|
-
"offset": 0,
|
|
652
|
-
"slot": "152",
|
|
653
|
-
"type": "t_mapping(t_address,t_struct(TokenConfig)3709_storage)"
|
|
654
|
-
}
|
|
655
|
-
],
|
|
656
|
-
"types": {
|
|
657
|
-
"t_address": {
|
|
658
|
-
"encoding": "inplace",
|
|
659
|
-
"label": "address",
|
|
660
|
-
"numberOfBytes": "20"
|
|
661
|
-
},
|
|
662
|
-
"t_array(t_address)3_storage": {
|
|
663
|
-
"base": "t_address",
|
|
664
|
-
"encoding": "inplace",
|
|
665
|
-
"label": "address[3]",
|
|
666
|
-
"numberOfBytes": "96"
|
|
667
|
-
},
|
|
668
|
-
"t_array(t_bool)3_storage": {
|
|
669
|
-
"base": "t_bool",
|
|
670
|
-
"encoding": "inplace",
|
|
671
|
-
"label": "bool[3]",
|
|
672
|
-
"numberOfBytes": "32"
|
|
673
|
-
},
|
|
674
|
-
"t_array(t_uint256)49_storage": {
|
|
675
|
-
"base": "t_uint256",
|
|
676
|
-
"encoding": "inplace",
|
|
677
|
-
"label": "uint256[49]",
|
|
678
|
-
"numberOfBytes": "1568"
|
|
679
|
-
},
|
|
680
|
-
"t_array(t_uint256)50_storage": {
|
|
681
|
-
"base": "t_uint256",
|
|
682
|
-
"encoding": "inplace",
|
|
683
|
-
"label": "uint256[50]",
|
|
684
|
-
"numberOfBytes": "1600"
|
|
685
|
-
},
|
|
686
|
-
"t_bool": {
|
|
687
|
-
"encoding": "inplace",
|
|
688
|
-
"label": "bool",
|
|
689
|
-
"numberOfBytes": "1"
|
|
690
|
-
},
|
|
691
|
-
"t_contract(BoundValidatorInterface)4730": {
|
|
692
|
-
"encoding": "inplace",
|
|
693
|
-
"label": "contract BoundValidatorInterface",
|
|
694
|
-
"numberOfBytes": "20"
|
|
695
|
-
},
|
|
696
|
-
"t_mapping(t_address,t_struct(TokenConfig)3709_storage)": {
|
|
697
|
-
"encoding": "mapping",
|
|
698
|
-
"key": "t_address",
|
|
699
|
-
"label": "mapping(address => struct ResilientOracle.TokenConfig)",
|
|
700
|
-
"numberOfBytes": "32",
|
|
701
|
-
"value": "t_struct(TokenConfig)3709_storage"
|
|
702
|
-
},
|
|
703
|
-
"t_struct(TokenConfig)3709_storage": {
|
|
704
|
-
"encoding": "inplace",
|
|
705
|
-
"label": "struct ResilientOracle.TokenConfig",
|
|
706
|
-
"members": [
|
|
707
|
-
{
|
|
708
|
-
"astId": 3698,
|
|
709
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
710
|
-
"label": "vToken",
|
|
711
|
-
"offset": 0,
|
|
712
|
-
"slot": "0",
|
|
713
|
-
"type": "t_address"
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
"astId": 3703,
|
|
717
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
718
|
-
"label": "oracles",
|
|
719
|
-
"offset": 0,
|
|
720
|
-
"slot": "1",
|
|
721
|
-
"type": "t_array(t_address)3_storage"
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
"astId": 3708,
|
|
725
|
-
"contract": "contracts/ResilientOracle.sol:ResilientOracle",
|
|
726
|
-
"label": "enableFlagsForOracles",
|
|
727
|
-
"offset": 0,
|
|
728
|
-
"slot": "4",
|
|
729
|
-
"type": "t_array(t_bool)3_storage"
|
|
730
|
-
}
|
|
731
|
-
],
|
|
732
|
-
"numberOfBytes": "160"
|
|
733
|
-
},
|
|
734
|
-
"t_uint256": {
|
|
735
|
-
"encoding": "inplace",
|
|
736
|
-
"label": "uint256",
|
|
737
|
-
"numberOfBytes": "32"
|
|
738
|
-
},
|
|
739
|
-
"t_uint8": {
|
|
740
|
-
"encoding": "inplace",
|
|
741
|
-
"label": "uint8",
|
|
742
|
-
"numberOfBytes": "1"
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}
|