forked from 0xKaso/deploy-result
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDesynChainlinkOracle.json
606 lines (606 loc) · 54 KB
/
DesynChainlinkOracle.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
{
"address": "0xEC6Ee1D5af1cE6EE0Bad0C42858505E1b6d4A3a7",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "twapOracle_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "feed",
"type": "address"
},
{
"indexed": false,
"internalType": "string",
"name": "symbol",
"type": "string"
}
],
"name": "FeedSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "oldAdmin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "NewAdmin",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "previousPriceMantissa",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "requestedPriceMantissa",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newPriceMantissa",
"type": "uint256"
}
],
"name": "PricePosted",
"type": "event"
},
{
"inputs": [],
"name": "BONE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "BPOW_PRECISION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EXIT_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "INIT_POOL_SUPPLY",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_BOUND_TOKENS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_BPOW_BASE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_IN_RATIO",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_OUT_RATIO",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_TOTAL_WEIGHT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_WEIGHT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BALANCE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BOUND_TOKENS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BPOW_BASE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_WEIGHT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "admin",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "assetPrices",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "poolTokens",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "actualAmountsOut",
"type": "uint256[]"
}
],
"name": "getAllPrice",
"outputs": [
{
"internalType": "uint256",
"name": "fundAll",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getColor",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "symbol",
"type": "string"
}
],
"name": "getFeed",
"outputs": [
{
"internalType": "contract AggregatorV2V3Interface",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
}
],
"name": "getPrice",
"outputs": [
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "setAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "setDirectPrice",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "address",
"name": "feed",
"type": "address"
}
],
"name": "setFeed",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "testList",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "twapOracle",
"outputs": [
{
"internalType": "contract IUniswapOracle",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0x8da92cc8d851388c8f088a19274ef07dce708dac0d7654e470a1343a8c5f16bf",
"receipt": {
"to": null,
"from": "0x595b85b4A418e3B8df897D02F5BD49167D00862F",
"contractAddress": "0xEC6Ee1D5af1cE6EE0Bad0C42858505E1b6d4A3a7",
"transactionIndex": 44,
"gasUsed": "1052252",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x353d0a87a2a9ce6b62ca3557106547ce21b9690362cf472b9d599a2c5268e60c",
"transactionHash": "0x8da92cc8d851388c8f088a19274ef07dce708dac0d7654e470a1343a8c5f16bf",
"logs": [],
"blockNumber": 7836342,
"cumulativeGasUsed": "7316686",
"status": 1,
"byzantium": true
},
"args": [
"0xf2a0A4fCF770CaaDCcD786cE3C4F9c1FDE637487"
],
"numDeployments": 1,
"solcInputHash": "ec6aa3e489db51b52585f0a55af97c3a",
"metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"twapOracle_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"FeedSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousPriceMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestedPriceMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPriceMantissa\",\"type\":\"uint256\"}],\"name\":\"PricePosted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BONE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BPOW_PRECISION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EXIT_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INIT_POOL_SUPPLY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_BOUND_TOKENS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_BPOW_BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_IN_RATIO\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_OUT_RATIO\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_TOTAL_WEIGHT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WEIGHT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_BALANCE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_BOUND_TOKENS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_BPOW_BASE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_WEIGHT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"assetPrices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"poolTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"actualAmountsOut\",\"type\":\"uint256[]\"}],\"name\":\"getAllPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"fundAll\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getColor\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"getFeed\",\"outputs\":[{\"internalType\":\"contract AggregatorV2V3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"setAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"setDirectPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"}],\"name\":\"setFeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"testList\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"twapOracle\",\"outputs\":[{\"internalType\":\"contract IUniswapOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deploy/DesynChainlinkOracle.sol\":\"DesynChainlinkOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":20},\"remappings\":[]},\"sources\":{\"contracts/base/Color.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity 0.6.12;\\n\\n// abstract contract BColor {\\n// function getColor()\\n// external view virtual\\n// returns (bytes32);\\n// }\\n\\ncontract BBronze {\\n function getColor() external pure returns (bytes32) {\\n return bytes32(\\\"BRONZE\\\");\\n }\\n}\\n\",\"keccak256\":\"0x739437b7b96998c98f74864044362596c566c35e25c56416c3bae25db97aaba1\",\"license\":\"GPL-3.0-or-later\"},\"contracts/base/Const.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity 0.6.12;\\n\\nimport \\\"./Color.sol\\\";\\n\\ncontract Const is BBronze {\\n uint public constant BONE = 10**18;\\n\\n uint public constant MIN_BOUND_TOKENS = 1;\\n uint public constant MAX_BOUND_TOKENS = 16;\\n\\n uint public constant MIN_FEE = BONE / 10**6;\\n uint public constant MAX_FEE = BONE / 10;\\n uint public constant EXIT_FEE = 0;\\n\\n uint public constant MIN_WEIGHT = BONE;\\n uint public constant MAX_WEIGHT = BONE * 50;\\n uint public constant MAX_TOTAL_WEIGHT = BONE * 50;\\n uint public constant MIN_BALANCE = BONE / 10**12;\\n\\n uint public constant INIT_POOL_SUPPLY = BONE * 100;\\n\\n uint public constant MIN_BPOW_BASE = 1 wei;\\n uint public constant MAX_BPOW_BASE = (2 * BONE) - 1 wei;\\n uint public constant BPOW_PRECISION = BONE / 10**10;\\n\\n uint public constant MAX_IN_RATIO = BONE / 2;\\n uint public constant MAX_OUT_RATIO = (BONE / 3) + 1 wei;\\n}\\n\",\"keccak256\":\"0x8a359fca5b843a757809a3388d7be7dd673967f28e2981a1a24c9a2267cc4014\",\"license\":\"GPL-3.0-or-later\"},\"contracts/base/Num.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity 0.6.12;\\n\\nimport \\\"./Const.sol\\\";\\n\\n// Core contract; can't be changed. So disable solhint (reminder for v2)\\n\\n/* solhint-disable private-vars-leading-underscore */\\n\\ncontract Num is Const {\\n function btoi(uint a) internal pure returns (uint) {\\n return a / BONE;\\n }\\n\\n function bfloor(uint a) internal pure returns (uint) {\\n return btoi(a) * BONE;\\n }\\n\\n function badd(uint a, uint b) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, \\\"ERR_ADD_OVERFLOW\\\");\\n return c;\\n }\\n\\n function bsub(uint a, uint b) internal pure returns (uint) {\\n (uint c, bool flag) = bsubSign(a, b);\\n require(!flag, \\\"ERR_SUB_UNDERFLOW\\\");\\n return c;\\n }\\n\\n function bsubSign(uint a, uint b) internal pure returns (uint, bool) {\\n if (a >= b) {\\n return (a - b, false);\\n } else {\\n return (b - a, true);\\n }\\n }\\n\\n function bmul(uint a, uint b) internal pure returns (uint) {\\n uint c0 = a * b;\\n require(a == 0 || c0 / a == b, \\\"ERR_MUL_OVERFLOW\\\");\\n uint c1 = c0 + (BONE / 2);\\n require(c1 >= c0, \\\"ERR_MUL_OVERFLOW\\\");\\n uint c2 = c1 / BONE;\\n return c2;\\n }\\n\\n function bdiv(uint a, uint b) internal pure returns (uint) {\\n require(b != 0, \\\"ERR_DIV_ZERO\\\");\\n uint c0 = a * BONE;\\n require(a == 0 || c0 / a == BONE, \\\"ERR_DIV_INTERNAL\\\"); // bmul overflow\\n uint c1 = c0 + (b / 2);\\n require(c1 >= c0, \\\"ERR_DIV_INTERNAL\\\"); // badd require\\n uint c2 = c1 / b;\\n return c2;\\n }\\n\\n // DSMath.wpow\\n function bpowi(uint a, uint n) internal pure returns (uint) {\\n uint z = n % 2 != 0 ? a : BONE;\\n\\n for (n /= 2; n != 0; n /= 2) {\\n a = bmul(a, a);\\n\\n if (n % 2 != 0) {\\n z = bmul(z, a);\\n }\\n }\\n return z;\\n }\\n\\n // Compute b^(e.w) by splitting it into (b^e)*(b^0.w).\\n // Use `bpowi` for `b^e` and `bpowK` for k iterations\\n // of approximation of b^0.w\\n function bpow(uint base, uint exp) internal pure returns (uint) {\\n require(base >= MIN_BPOW_BASE, \\\"ERR_BPOW_BASE_TOO_LOW\\\");\\n require(base <= MAX_BPOW_BASE, \\\"ERR_BPOW_BASE_TOO_HIGH\\\");\\n\\n uint whole = bfloor(exp);\\n uint remain = bsub(exp, whole);\\n\\n uint wholePow = bpowi(base, btoi(whole));\\n\\n if (remain == 0) {\\n return wholePow;\\n }\\n\\n uint partialResult = bpowApprox(base, remain, BPOW_PRECISION);\\n return bmul(wholePow, partialResult);\\n }\\n\\n function bpowApprox(\\n uint base,\\n uint exp,\\n uint precision\\n ) internal pure returns (uint) {\\n // term 0:\\n uint a = exp;\\n (uint x, bool xneg) = bsubSign(base, BONE);\\n uint term = BONE;\\n uint sum = term;\\n bool negative = false;\\n\\n // term(k) = numer / denom\\n // = (product(a - i - 1, i=1-->k) * x^k) / (k!)\\n // each iteration, multiply previous term by (a-(k-1)) * x / k\\n // continue until term is less than precision\\n for (uint i = 1; term >= precision; i++) {\\n uint bigK = i * BONE;\\n (uint c, bool cneg) = bsubSign(a, bsub(bigK, BONE));\\n term = bmul(term, bmul(c, x));\\n term = bdiv(term, bigK);\\n if (term == 0) break;\\n\\n if (xneg) negative = !negative;\\n if (cneg) negative = !negative;\\n if (negative) {\\n sum = bsub(sum, term);\\n } else {\\n sum = badd(sum, term);\\n }\\n }\\n\\n return sum;\\n }\\n}\\n\",\"keccak256\":\"0x77fcd4820332801e887874b4557b796e2e28a9d5e103778eafd0bec353e2111f\",\"license\":\"GPL-3.0-or-later\"},\"contracts/deploy/DesynChainlinkOracle.sol\":{\"content\":\"pragma solidity 0.6.12;\\n\\nimport \\\"../base/Num.sol\\\";\\nimport \\\"../interfaces/IERC20.sol\\\";\\nimport \\\"../interfaces/AggregatorV2V3Interface.sol\\\";\\nimport \\\"../interfaces/IUniswapOracle.sol\\\";\\n\\nlibrary SafeMath {\\n function add(uint a, uint b) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint a, uint b) internal pure returns (uint) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n function sub(\\n uint a,\\n uint b,\\n string memory errorMessage\\n ) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n uint c = a - b;\\n\\n return c;\\n }\\n\\n function mul(uint a, uint b) internal pure returns (uint) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint a, uint b) internal pure returns (uint) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n function div(\\n uint a,\\n uint b,\\n string memory errorMessage\\n ) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n uint c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n function mod(uint a, uint b) internal pure returns (uint) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n function mod(\\n uint a,\\n uint b,\\n string memory errorMessage\\n ) internal pure returns (uint) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\\ncontract DesynChainlinkOracle is Num {\\n address public admin;\\n using SafeMath for uint;\\n IUniswapOracle public twapOracle;\\n uint[] public testList;\\n mapping(address => uint) internal prices;\\n mapping(bytes32 => AggregatorV2V3Interface) internal feeds;\\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\\n event NewAdmin(address oldAdmin, address newAdmin);\\n event FeedSet(address feed, string symbol);\\n\\n constructor(address twapOracle_) public {\\n admin = msg.sender;\\n twapOracle = IUniswapOracle(twapOracle_);\\n }\\n\\n function getPrice(address tokenAddress) public returns (uint price) {\\n IERC20 token = IERC20(tokenAddress);\\n AggregatorV2V3Interface feed = getFeed(token.symbol());\\n if (prices[address(token)] != 0) {\\n price = prices[address(token)];\\n } else if (address(feed) != address(0)) {\\n price = getChainlinkPrice(feed);\\n } else {\\n try twapOracle.update(address(token)) {} catch {}\\n price = getUniswapPrice(tokenAddress);\\n }\\n\\n uint decimalDelta = bsub(uint(18), uint(token.decimals()));\\n // Ensure that we don't multiply the result by 0\\n if (decimalDelta > 0) {\\n return price.mul(10**decimalDelta);\\n } else {\\n return price;\\n }\\n }\\n\\n function getAllPrice(address[] calldata poolTokens, uint[] calldata actualAmountsOut) external returns (uint fundAll) {\\n for (uint i = 0; i < poolTokens.length; i++) {\\n address t = poolTokens[i];\\n uint tokenAmountOut = actualAmountsOut[i];\\n testList.push(tokenAmountOut);\\n fundAll = badd(fundAll, bmul(getPrice(t), tokenAmountOut));\\n }\\n }\\n\\n function getChainlinkPrice(AggregatorV2V3Interface feed) internal view returns (uint) {\\n // Chainlink USD-denominated feeds store answers at 8 decimals\\n uint decimalDelta = bsub(uint(18), feed.decimals());\\n // Ensure that we don't multiply the result by 0\\n if (decimalDelta > 0) {\\n return uint(feed.latestAnswer()).mul(10**decimalDelta);\\n } else {\\n return uint(feed.latestAnswer());\\n }\\n }\\n\\n function getUniswapPrice(address tokenAddress) internal view returns (uint) {\\n IERC20 token = IERC20(tokenAddress);\\n uint price = twapOracle.consult(tokenAddress, token.decimals());\\n return price;\\n }\\n\\n function setDirectPrice(address asset, uint price) external onlyAdmin {\\n emit PricePosted(asset, prices[asset], price, price);\\n prices[asset] = price;\\n }\\n\\n function setFeed(string calldata symbol, address feed) external onlyAdmin {\\n require(feed != address(0) && feed != address(this), \\\"invalid feed address\\\");\\n emit FeedSet(feed, symbol);\\n feeds[keccak256(abi.encodePacked(symbol))] = AggregatorV2V3Interface(feed);\\n }\\n\\n function getFeed(string memory symbol) public view returns (AggregatorV2V3Interface) {\\n return feeds[keccak256(abi.encodePacked(symbol))];\\n }\\n\\n function assetPrices(address asset) external view returns (uint) {\\n return prices[asset];\\n }\\n\\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n\\n function setAdmin(address newAdmin) external onlyAdmin {\\n address oldAdmin = admin;\\n admin = newAdmin;\\n\\n emit NewAdmin(oldAdmin, newAdmin);\\n }\\n\\n modifier onlyAdmin() {\\n require(msg.sender == admin, \\\"only admin may call\\\");\\n _;\\n }\\n}\\n\",\"keccak256\":\"0xf75d365115c09e01a027fb5b74fcd992b61a2274a2cebf08d350f825a5af3beb\"},\"contracts/interfaces/AggregatorV2V3Interface.sol\":{\"content\":\"pragma solidity 0.6.12;\\n\\n/**\\n * @title The V2 & V3 Aggregator Interface\\n * @notice Solidity V0.5 does not allow interfaces to inherit from other\\n * interfaces so this contract is a combination of v0.5 AggregatorInterface.sol\\n * and v0.5 AggregatorV3Interface.sol.\\n */\\ninterface AggregatorV2V3Interface {\\n //\\n // V2 Interface:\\n //\\n function latestAnswer() external view returns (int);\\n\\n function latestTimestamp() external view returns (uint);\\n\\n function latestRound() external view returns (uint);\\n\\n function getAnswer(uint roundId) external view returns (int);\\n\\n function getTimestamp(uint roundId) external view returns (uint);\\n\\n event AnswerUpdated(int indexed current, uint indexed roundId, uint timestamp);\\n event NewRound(uint indexed roundId, address indexed startedBy, uint startedAt);\\n\\n //\\n // V3 Interface:\\n //\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint);\\n\\n // getRoundData and latestRoundData should both raise \\\"No data present\\\"\\n // if they do not have data to report, instead of returning unset values\\n // which could be misinterpreted as actual reported values.\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (\\n uint80 roundId,\\n int answer,\\n uint startedAt,\\n uint updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int answer,\\n uint startedAt,\\n uint updatedAt,\\n uint80 answeredInRound\\n );\\n}\\n\",\"keccak256\":\"0xddc6925ea0d3d6ba97756fd0f32b03ad1e6228955e9691ba5d4ad358431b20fb\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity 0.6.12;\\n\\n// Interface declarations\\n\\n/* solhint-disable func-order */\\n\\ninterface IERC20 {\\n // Emitted when the allowance of a spender for an owner is set by a call to approve.\\n // Value is the new allowance\\n event Approval(address indexed owner, address indexed spender, uint value);\\n\\n // Emitted when value tokens are moved from one account (from) to another (to).\\n // Note that value may be zero\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n // Returns the amount of tokens in existence\\n function totalSupply() external view returns (uint);\\n\\n // Returns the amount of tokens owned by account\\n function balanceOf(address account) external view returns (uint);\\n\\n // Returns the decimals of tokens\\n function decimals() external view returns (uint8);\\n\\n function symbol() external view returns (string memory);\\n\\n // Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner\\n // through transferFrom. This is zero by default\\n // This value changes when approve or transferFrom are called\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n // Sets amount as the allowance of spender over the caller\\u2019s tokens\\n // Returns a boolean value indicating whether the operation succeeded\\n // Emits an Approval event.\\n function approve(address spender, uint amount) external returns (bool);\\n\\n // Moves amount tokens from the caller\\u2019s account to recipient\\n // Returns a boolean value indicating whether the operation succeeded\\n // Emits a Transfer event.\\n function transfer(address recipient, uint amount) external returns (bool);\\n\\n // Moves amount tokens from sender to recipient using the allowance mechanism\\n // Amount is then deducted from the caller\\u2019s allowance\\n // Returns a boolean value indicating whether the operation succeeded\\n // Emits a Transfer event\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0xfe22b6d6029b400b9cce7f9b39c546f99cd6922b2fd926e480e2b4d476ab26f8\",\"license\":\"GPL-3.0-or-later\"},\"contracts/interfaces/IUniswapOracle.sol\":{\"content\":\"pragma solidity 0.6.12;\\n\\ninterface IUniswapOracle {\\n function update(address token) external;\\n\\n function consult(address token, uint amountIn) external view returns (uint amountOut);\\n}\\n\",\"keccak256\":\"0x2e5000256e6ba1667d719ed23fcc6b648d8807d3ae25b693dceb1f3b9cfa9448\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506040516111b03803806111b08339818101604052602081101561003357600080fd5b5051600080546001600160a01b03199081163317909155600180546001600160a01b039093169290911691909117905561113e806100726000396000f3fe608060405234801561001057600080fd5b50600436106101495760003560e01c806309a3bbe41461014e57806309a8acb0146101685780630c607acf14610196578063189d00ca1461020d578063218b5382146102155780633b39a51c1461021d57806341976e09146102dd578063422b66f4146103035780634e36fffe146103c15780635e9a523c146103de578063704b6c021461040457806376c7a3c71461042a578063867378c5146104325780639043292a1461043a5780639381cd2b14610442578063992e2a921461044a5780639a86139b14610452578063b0e0d1361461045a578063b7b800a414610462578063ba019dab14610462578063bc063e1a1461046a578063bc694ea214610472578063c36596a614610215578063c6580d121461047a578063e4a28a521461014e578063ec09302114610482578063f851a4401461048a575b600080fd5b610156610492565b60408051918252519081900360200190f35b6101946004803603604081101561017e57600080fd5b506001600160a01b03813516906020013561049f565b005b610194600480360360408110156101ac57600080fd5b810190602081018135600160201b8111156101c657600080fd5b8201836020820111156101d857600080fd5b803590602001918460018302840111600160201b831117156101f957600080fd5b9193509150356001600160a01b031661056e565b610156610709565b61015661071d565b6102c16004803603602081101561023357600080fd5b810190602081018135600160201b81111561024d57600080fd5b82018360208201111561025f57600080fd5b803590602001918460018302840111600160201b8311171561028057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610729945050505050565b604080516001600160a01b039092168252519081900360200190f35b610156600480360360208110156102f357600080fd5b50356001600160a01b03166107c7565b6101566004803603604081101561031957600080fd5b810190602081018135600160201b81111561033357600080fd5b82018360208201111561034557600080fd5b803590602001918460208302840111600160201b8311171561036657600080fd5b919390929091602081019035600160201b81111561038357600080fd5b82018360208201111561039557600080fd5b803590602001918460208302840111600160201b831117156103b657600080fd5b509092509050610a63565b610156600480360360208110156103d757600080fd5b5035610b11565b610156600480360360208110156103f457600080fd5b50356001600160a01b0316610b2f565b6101946004803603602081101561041a57600080fd5b50356001600160a01b0316610b4a565b610156610c02565b610156610c14565b6102c1610c28565b610156610c37565b610156610c44565b610156610c50565b610156610c5d565b610156610c62565b610156610c67565b610156610c77565b610156610c83565b610156610c88565b6102c1610c98565b6802b5e3af16b188000081565b6000546001600160a01b031633146104f4576040805162461bcd60e51b81526020600482015260136024820152721bdb9b1e4818591b5a5b881b585e4818d85b1b606a1b604482015290519081900360640190fd5b6001600160a01b0382166000818152600360209081526040918290205482519384529083015281810183905260608201839052517fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79181900360800190a16001600160a01b03909116600090815260036020526040902055565b6000546001600160a01b031633146105c3576040805162461bcd60e51b81526020600482015260136024820152721bdb9b1e4818591b5a5b881b585e4818d85b1b606a1b604482015290519081900360640190fd5b6001600160a01b038116158015906105e457506001600160a01b0381163014155b61062c576040805162461bcd60e51b8152602060048201526014602482015273696e76616c69642066656564206164647265737360601b604482015290519081900360640190fd5b7fd9e7d1778ca05570ced72c9aeb12a41fcc76f7f57ea25853dea228f8836d002281848460405180846001600160a01b03168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a18060046000858560405160200180838380828437808301925050509250505060405160208183030381529060405280519060200120815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505050565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600060046000836040516020018082805190602001908083835b602083106107625780518252601f199092019160209182019101610743565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a90046001600160a01b031690505b919050565b60008082905060006108fb826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561080b57600080fd5b505afa15801561081f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561084857600080fd5b8101908080516040519392919084600160201b82111561086757600080fd5b90830190602082018581111561087c57600080fd5b8251600160201b81118282018810171561089557600080fd5b82525081516020918201929091019080838360005b838110156108c25781810151838201526020016108aa565b50505050905090810190601f1680156108ef5780820380516001836020036101000a031916815260200191505b50604052505050610729565b6001600160a01b0383166000908152600360205260409020549091501561093c576001600160a01b03821660009081526003602052604090205492506109c7565b6001600160a01b0381161561095b5761095481610ca7565b92506109c7565b60015460408051630e0dc3b960e11b81526001600160a01b03858116600483015291519190921691631c1b877291602480830192600092919082900301818387803b1580156109a957600080fd5b505af19250505080156109ba575060015b506109c484610dd8565b92505b6000610a3b6012846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0757600080fd5b505afa158015610a1b573d6000803e3d6000fd5b505050506040513d6020811015610a3157600080fd5b505160ff16610eed565b90508015610a5b57610a5184600a83900a610f51565b93505050506107c2565b5050506107c2565b6000805b84811015610b08576000868683818110610a7d57fe5b905060200201356001600160a01b031690506000858584818110610a9d57fe5b60028054600181018255600091909152602090910292909201357f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace909201829055509050610afc84610af7610af1856107c7565b84610fb1565b611075565b93505050600101610a67565b50949350505050565b60028181548110610b1e57fe5b600091825260209091200154905081565b6001600160a01b031660009081526003602052604090205490565b6000546001600160a01b03163314610b9f576040805162461bcd60e51b81526020600482015260136024820152721bdb9b1e4818591b5a5b881b585e4818d85b1b606a1b604482015290519081900360640190fd5b600080546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc929181900390910190a15050565b620f4240670de0b6b3a7640000610719565b64e8d4a51000670de0b6b3a7640000610719565b6001546001600160a01b031681565b68056bc75e2d6310000081565b6704a03ce68d21555681565b6542524f4e5a4560d01b90565b601081565b600181565b600a670de0b6b3a7640000610719565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a7640000610719565b6000546001600160a01b031681565b600080610ce86012846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0757600080fd5b90508015610d6a57610d6281600a0a846001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d6020811015610d5a57600080fd5b505190610f51565b9150506107c2565b826001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610da357600080fd5b505afa158015610db7573d6000803e3d6000fd5b505050506040513d6020811015610dcd57600080fd5b505191506107c29050565b6000808290506000600160009054906101000a90046001600160a01b03166001600160a01b0316633ddac95385846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3e57600080fd5b505afa158015610e52573d6000803e3d6000fd5b505050506040513d6020811015610e6857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260ff9091166024830152516044808301926020929190829003018186803b158015610eb957600080fd5b505afa158015610ecd573d6000803e3d6000fd5b505050506040513d6020811015610ee357600080fd5b5051949350505050565b6000806000610efc85856110c2565b915091508015610f47576040805162461bcd60e51b81526020600482015260116024820152704552525f5355425f554e444552464c4f5760781b604482015290519081900360640190fd5b5090505b92915050565b600082610f6057506000610f4b565b82820282848281610f6d57fe5b0414610faa5760405162461bcd60e51b81526004018080602001828103825260218152602001806110e86021913960400191505060405180910390fd5b9392505050565b6000828202831580610fcb575082848281610fc857fe5b04145b61100f576040805162461bcd60e51b815260206004820152601060248201526f4552525f4d554c5f4f564552464c4f5760801b604482015290519081900360640190fd5b6706f05b59d3b20000810181811015611062576040805162461bcd60e51b815260206004820152601060248201526f4552525f4d554c5f4f564552464c4f5760801b604482015290519081900360640190fd5b670de0b6b3a76400009004949350505050565b600082820183811015610faa576040805162461bcd60e51b815260206004820152601060248201526f4552525f4144445f4f564552464c4f5760801b604482015290519081900360640190fd5b6000808284106110d857505080820360006110e0565b505081810360015b925092905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f22f389e4be5ef1ffcb5aa248d38a1a516d02c8f5edc38f82185637bb980383764736f6c634300060c0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101495760003560e01c806309a3bbe41461014e57806309a8acb0146101685780630c607acf14610196578063189d00ca1461020d578063218b5382146102155780633b39a51c1461021d57806341976e09146102dd578063422b66f4146103035780634e36fffe146103c15780635e9a523c146103de578063704b6c021461040457806376c7a3c71461042a578063867378c5146104325780639043292a1461043a5780639381cd2b14610442578063992e2a921461044a5780639a86139b14610452578063b0e0d1361461045a578063b7b800a414610462578063ba019dab14610462578063bc063e1a1461046a578063bc694ea214610472578063c36596a614610215578063c6580d121461047a578063e4a28a521461014e578063ec09302114610482578063f851a4401461048a575b600080fd5b610156610492565b60408051918252519081900360200190f35b6101946004803603604081101561017e57600080fd5b506001600160a01b03813516906020013561049f565b005b610194600480360360408110156101ac57600080fd5b810190602081018135600160201b8111156101c657600080fd5b8201836020820111156101d857600080fd5b803590602001918460018302840111600160201b831117156101f957600080fd5b9193509150356001600160a01b031661056e565b610156610709565b61015661071d565b6102c16004803603602081101561023357600080fd5b810190602081018135600160201b81111561024d57600080fd5b82018360208201111561025f57600080fd5b803590602001918460018302840111600160201b8311171561028057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610729945050505050565b604080516001600160a01b039092168252519081900360200190f35b610156600480360360208110156102f357600080fd5b50356001600160a01b03166107c7565b6101566004803603604081101561031957600080fd5b810190602081018135600160201b81111561033357600080fd5b82018360208201111561034557600080fd5b803590602001918460208302840111600160201b8311171561036657600080fd5b919390929091602081019035600160201b81111561038357600080fd5b82018360208201111561039557600080fd5b803590602001918460208302840111600160201b831117156103b657600080fd5b509092509050610a63565b610156600480360360208110156103d757600080fd5b5035610b11565b610156600480360360208110156103f457600080fd5b50356001600160a01b0316610b2f565b6101946004803603602081101561041a57600080fd5b50356001600160a01b0316610b4a565b610156610c02565b610156610c14565b6102c1610c28565b610156610c37565b610156610c44565b610156610c50565b610156610c5d565b610156610c62565b610156610c67565b610156610c77565b610156610c83565b610156610c88565b6102c1610c98565b6802b5e3af16b188000081565b6000546001600160a01b031633146104f4576040805162461bcd60e51b81526020600482015260136024820152721bdb9b1e4818591b5a5b881b585e4818d85b1b606a1b604482015290519081900360640190fd5b6001600160a01b0382166000818152600360209081526040918290205482519384529083015281810183905260608201839052517fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79181900360800190a16001600160a01b03909116600090815260036020526040902055565b6000546001600160a01b031633146105c3576040805162461bcd60e51b81526020600482015260136024820152721bdb9b1e4818591b5a5b881b585e4818d85b1b606a1b604482015290519081900360640190fd5b6001600160a01b038116158015906105e457506001600160a01b0381163014155b61062c576040805162461bcd60e51b8152602060048201526014602482015273696e76616c69642066656564206164647265737360601b604482015290519081900360640190fd5b7fd9e7d1778ca05570ced72c9aeb12a41fcc76f7f57ea25853dea228f8836d002281848460405180846001600160a01b03168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a18060046000858560405160200180838380828437808301925050509250505060405160208183030381529060405280519060200120815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550505050565b6402540be400670de0b6b3a76400005b0481565b670de0b6b3a764000081565b600060046000836040516020018082805190602001908083835b602083106107625780518252601f199092019160209182019101610743565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120815260200190815260200160002060009054906101000a90046001600160a01b031690505b919050565b60008082905060006108fb826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b15801561080b57600080fd5b505afa15801561081f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561084857600080fd5b8101908080516040519392919084600160201b82111561086757600080fd5b90830190602082018581111561087c57600080fd5b8251600160201b81118282018810171561089557600080fd5b82525081516020918201929091019080838360005b838110156108c25781810151838201526020016108aa565b50505050905090810190601f1680156108ef5780820380516001836020036101000a031916815260200191505b50604052505050610729565b6001600160a01b0383166000908152600360205260409020549091501561093c576001600160a01b03821660009081526003602052604090205492506109c7565b6001600160a01b0381161561095b5761095481610ca7565b92506109c7565b60015460408051630e0dc3b960e11b81526001600160a01b03858116600483015291519190921691631c1b877291602480830192600092919082900301818387803b1580156109a957600080fd5b505af19250505080156109ba575060015b506109c484610dd8565b92505b6000610a3b6012846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0757600080fd5b505afa158015610a1b573d6000803e3d6000fd5b505050506040513d6020811015610a3157600080fd5b505160ff16610eed565b90508015610a5b57610a5184600a83900a610f51565b93505050506107c2565b5050506107c2565b6000805b84811015610b08576000868683818110610a7d57fe5b905060200201356001600160a01b031690506000858584818110610a9d57fe5b60028054600181018255600091909152602090910292909201357f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace909201829055509050610afc84610af7610af1856107c7565b84610fb1565b611075565b93505050600101610a67565b50949350505050565b60028181548110610b1e57fe5b600091825260209091200154905081565b6001600160a01b031660009081526003602052604090205490565b6000546001600160a01b03163314610b9f576040805162461bcd60e51b81526020600482015260136024820152721bdb9b1e4818591b5a5b881b585e4818d85b1b606a1b604482015290519081900360640190fd5b600080546001600160a01b038381166001600160a01b0319831681179093556040805191909216808252602082019390935281517ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc929181900390910190a15050565b620f4240670de0b6b3a7640000610719565b64e8d4a51000670de0b6b3a7640000610719565b6001546001600160a01b031681565b68056bc75e2d6310000081565b6704a03ce68d21555681565b6542524f4e5a4560d01b90565b601081565b600181565b600a670de0b6b3a7640000610719565b671bc16d674ec7ffff81565b600081565b6002670de0b6b3a7640000610719565b6000546001600160a01b031681565b600080610ce86012846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0757600080fd5b90508015610d6a57610d6281600a0a846001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d6020811015610d5a57600080fd5b505190610f51565b9150506107c2565b826001600160a01b03166350d25bcd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610da357600080fd5b505afa158015610db7573d6000803e3d6000fd5b505050506040513d6020811015610dcd57600080fd5b505191506107c29050565b6000808290506000600160009054906101000a90046001600160a01b03166001600160a01b0316633ddac95385846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610e3e57600080fd5b505afa158015610e52573d6000803e3d6000fd5b505050506040513d6020811015610e6857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260ff9091166024830152516044808301926020929190829003018186803b158015610eb957600080fd5b505afa158015610ecd573d6000803e3d6000fd5b505050506040513d6020811015610ee357600080fd5b5051949350505050565b6000806000610efc85856110c2565b915091508015610f47576040805162461bcd60e51b81526020600482015260116024820152704552525f5355425f554e444552464c4f5760781b604482015290519081900360640190fd5b5090505b92915050565b600082610f6057506000610f4b565b82820282848281610f6d57fe5b0414610faa5760405162461bcd60e51b81526004018080602001828103825260218152602001806110e86021913960400191505060405180910390fd5b9392505050565b6000828202831580610fcb575082848281610fc857fe5b04145b61100f576040805162461bcd60e51b815260206004820152601060248201526f4552525f4d554c5f4f564552464c4f5760801b604482015290519081900360640190fd5b6706f05b59d3b20000810181811015611062576040805162461bcd60e51b815260206004820152601060248201526f4552525f4d554c5f4f564552464c4f5760801b604482015290519081900360640190fd5b670de0b6b3a76400009004949350505050565b600082820183811015610faa576040805162461bcd60e51b815260206004820152601060248201526f4552525f4144445f4f564552464c4f5760801b604482015290519081900360640190fd5b6000808284106110d857505080820360006110e0565b505081810360015b925092905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f22f389e4be5ef1ffcb5aa248d38a1a516d02c8f5edc38f82185637bb980383764736f6c634300060c0033",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 8300,
"contract": "contracts/deploy/DesynChainlinkOracle.sol:DesynChainlinkOracle",
"label": "admin",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 8305,
"contract": "contracts/deploy/DesynChainlinkOracle.sol:DesynChainlinkOracle",
"label": "twapOracle",
"offset": 0,
"slot": "1",
"type": "t_contract(IUniswapOracle)15121"
},
{
"astId": 8308,
"contract": "contracts/deploy/DesynChainlinkOracle.sol:DesynChainlinkOracle",
"label": "testList",
"offset": 0,
"slot": "2",
"type": "t_array(t_uint256)dyn_storage"
},
{
"astId": 8312,
"contract": "contracts/deploy/DesynChainlinkOracle.sol:DesynChainlinkOracle",
"label": "prices",
"offset": 0,
"slot": "3",
"type": "t_mapping(t_address,t_uint256)"
},
{
"astId": 8316,
"contract": "contracts/deploy/DesynChainlinkOracle.sol:DesynChainlinkOracle",
"label": "feeds",
"offset": 0,
"slot": "4",
"type": "t_mapping(t_bytes32,t_contract(AggregatorV2V3Interface)14720)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)dyn_storage": {
"base": "t_uint256",
"encoding": "dynamic_array",
"label": "uint256[]",
"numberOfBytes": "32"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(AggregatorV2V3Interface)14720": {
"encoding": "inplace",
"label": "contract AggregatorV2V3Interface",
"numberOfBytes": "20"
},
"t_contract(IUniswapOracle)15121": {
"encoding": "inplace",
"label": "contract IUniswapOracle",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_uint256)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_mapping(t_bytes32,t_contract(AggregatorV2V3Interface)14720)": {
"encoding": "mapping",
"key": "t_bytes32",
"label": "mapping(bytes32 => contract AggregatorV2V3Interface)",
"numberOfBytes": "32",
"value": "t_contract(AggregatorV2V3Interface)14720"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}