-
Notifications
You must be signed in to change notification settings - Fork 0
/
BalancerAdapterWeighted.json
771 lines (771 loc) · 237 KB
/
BalancerAdapterWeighted.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
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
{
"address": "0xbd0D7864ed0131518cDD4D6B96e4Be99Ed5B4A47",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "AlreadyRegistered",
"type": "error"
},
{
"inputs": [],
"name": "BadAccessControlSingleton",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "IsNotLP",
"type": "error"
},
{
"inputs": [],
"name": "LPOracleNotReady",
"type": "error"
},
{
"inputs": [],
"name": "OnlyAdminError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyAlerterError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyDAOError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyLiquidationAccessError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyMintAccessError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyRewardAccessError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyRoleError",
"type": "error"
},
{
"inputs": [],
"name": "OnlyVaultAccessError",
"type": "error"
},
{
"inputs": [],
"name": "PRBMathSD59x18__DivInputTooSmall",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "rAbs",
"type": "uint256"
}
],
"name": "PRBMathSD59x18__DivOverflow",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "x",
"type": "int256"
}
],
"name": "PRBMathSD59x18__Exp2InputTooBig",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "x",
"type": "int256"
}
],
"name": "PRBMathSD59x18__FromIntOverflow",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "x",
"type": "int256"
}
],
"name": "PRBMathSD59x18__FromIntUnderflow",
"type": "error"
},
{
"inputs": [
{
"internalType": "int256",
"name": "x",
"type": "int256"
}
],
"name": "PRBMathSD59x18__LogInputTooSmall",
"type": "error"
},
{
"inputs": [],
"name": "PRBMathSD59x18__MulInputTooSmall",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "rAbs",
"type": "uint256"
}
],
"name": "PRBMathSD59x18__MulOverflow",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "prod1",
"type": "uint256"
}
],
"name": "PRBMath__MulDivFixedPointOverflow",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "prod1",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "denominator",
"type": "uint256"
}
],
"name": "PRBMath__MulDivOverflow",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"inputs": [],
"name": "ACCESS_CONTROL_SINGLETON",
"outputs": [
{
"internalType": "contract ISuAccessControl",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ALERTER_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DAO_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "LIQUIDATION_ACCESS_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MINT_ACCESS_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ORACLE",
"outputs": [
{
"internalType": "contract ISuOracle",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "REWARD_ACCESS_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "VAULT_ACCESS_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "getFiatPrice1e18",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "getFiatPrice1e18Unsafe",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_authControl",
"type": "address"
},
{
"internalType": "address",
"name": "_oracle",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "isAdapterLP",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "lps",
"outputs": [
{
"internalType": "enum WeightedPoolType",
"name": "poolType",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "poolId",
"type": "bytes32"
},
{
"internalType": "contract IVault",
"name": "vault",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "lp",
"type": "address"
},
{
"internalType": "enum WeightedPoolType",
"name": "poolType",
"type": "uint8"
}
],
"name": "registerLP",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "withdraw",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct WithdrawResult[]",
"name": "results",
"type": "tuple[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"numDeployments": 1,
"solcInputHash": "6bdb767f00e3f0fe0de7c63e7a48801d",
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"AlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadAccessControlSingleton\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"IsNotLP\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LPOracleNotReady\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAlerterError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyDAOError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLiquidationAccessError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyMintAccessError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyRewardAccessError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyRoleError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyVaultAccessError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PRBMathSD59x18__DivInputTooSmall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rAbs\",\"type\":\"uint256\"}],\"name\":\"PRBMathSD59x18__DivOverflow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"PRBMathSD59x18__Exp2InputTooBig\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"PRBMathSD59x18__FromIntOverflow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"PRBMathSD59x18__FromIntUnderflow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"PRBMathSD59x18__LogInputTooSmall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PRBMathSD59x18__MulInputTooSmall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rAbs\",\"type\":\"uint256\"}],\"name\":\"PRBMathSD59x18__MulOverflow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"prod1\",\"type\":\"uint256\"}],\"name\":\"PRBMath__MulDivFixedPointOverflow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"prod1\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"}],\"name\":\"PRBMath__MulDivOverflow\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACCESS_CONTROL_SINGLETON\",\"outputs\":[{\"internalType\":\"contract ISuAccessControl\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ALERTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DAO_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LIQUIDATION_ACCESS_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINT_ACCESS_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ORACLE\",\"outputs\":[{\"internalType\":\"contract ISuOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REWARD_ACCESS_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VAULT_ACCESS_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getFiatPrice1e18\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getFiatPrice1e18Unsafe\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_authControl\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"isAdapterLP\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lps\",\"outputs\":[{\"internalType\":\"enum WeightedPoolType\",\"name\":\"poolType\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"poolId\",\"type\":\"bytes32\"},{\"internalType\":\"contract IVault\",\"name\":\"vault\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lp\",\"type\":\"address\"},{\"internalType\":\"enum WeightedPoolType\",\"name\":\"poolType\",\"type\":\"uint8\"}],\"name\":\"registerLP\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct WithdrawResult[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"See ILPAdapter interface for full details.\",\"kind\":\"dev\",\"methods\":{\"getFiatPrice1e18(address)\":{\"params\":{\"asset\":\"- address of erc20 token contract\"},\"returns\":{\"_0\":\"usdPrice1e18 such that asset.balanceOf() * getFiatPrice1e18(asset) / 1e18 == $$ * 1e18*\"}},\"isAdapterLP(address)\":{\"params\":{\"asset\":\"- address of LP token to check*\"}},\"registerLP(address,uint8)\":{\"params\":{\"lp\":\"LP token to find and set the corresponding info.*\"}},\"supportsInterface(bytes4)\":{\"details\":\"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.\"},\"withdraw(address,uint256)\":{\"params\":{\"amount\":\"- amount of asset to withdraw/unwrap*\",\"asset\":\"- address of LP token to withdraw/unwrap\"}}},\"title\":\"BalancerAdapterWeighted\",\"version\":1},\"userdoc\":{\"errors\":{\"PRBMathSD59x18__DivInputTooSmall()\":[{\"notice\":\"Emitted when one of the inputs is MIN_SD59x18.\"}],\"PRBMathSD59x18__DivOverflow(uint256)\":[{\"notice\":\"Emitted when one of the intermediary unsigned results overflows SD59x18.\"}],\"PRBMathSD59x18__Exp2InputTooBig(int256)\":[{\"notice\":\"Emitted when the input is greater than 192.\"}],\"PRBMathSD59x18__FromIntOverflow(int256)\":[{\"notice\":\"Emitted when converting a basic integer to the fixed-point format overflows SD59x18.\"}],\"PRBMathSD59x18__FromIntUnderflow(int256)\":[{\"notice\":\"Emitted when converting a basic integer to the fixed-point format underflows SD59x18.\"}],\"PRBMathSD59x18__LogInputTooSmall(int256)\":[{\"notice\":\"Emitted when the input is less than or equal to zero.\"}],\"PRBMathSD59x18__MulInputTooSmall()\":[{\"notice\":\"Emitted when one of the inputs is MIN_SD59x18.\"}],\"PRBMathSD59x18__MulOverflow(uint256)\":[{\"notice\":\"Emitted when the intermediary absolute result overflows SD59x18.\"}],\"PRBMath__MulDivFixedPointOverflow(uint256)\":[{\"notice\":\"Emitted when the result overflows uint256.\"}],\"PRBMath__MulDivOverflow(uint256,uint256)\":[{\"notice\":\"Emitted when the result overflows uint256.\"}]},\"kind\":\"user\",\"methods\":{\"getFiatPrice1e18(address)\":{\"notice\":\"WARNING! Read this description very carefully! function getFiatPrice1e18(address asset) returns (uint256) that: basicAmountOfAsset * getFiatPrice1e18(asset) / 1e18 === $$ * 1e18 in other words, it doesn't matter what's the erc20.decimals is, you just multiply token balance in basic units on value from oracle and get dollar amount multiplied on 1e18. different assets have different deviation threshold (errors) for wBTC it's <= 0.5%, read more https://data.chain.link/ethereum/mainnet/crypto-usd/btc-usd for other asset is can be larger based on particular oracle implementation. examples: market price of btc = $30k, for 0.1 wBTC the unit256 amount is 0.1 * 1e18 0.1 * 1e18 * (price1e18 / 1e18) == $3000 == uint256(3000*1e18) => price1e18 = 30000 * 1e18; market price of usdt = $0.97, for 1 usdt uint256 = 1 * 1e6 so 1*1e6 * price1e18 / 1e18 == $0.97 == uint256(0.97*1e18) => 1*1e6 * (price1e18 / 1e18) / (0.97*1e18) = 1 => price1e18 = 0.97 * (1e18/1e6) * 1e18 assume market price of wBTC = $31,503.77, oracle error = $158 case #1: small amount of wBTC we have 0.0,000,001 wBTC that is worth v = $0.00315 \\u00b1 $0.00001 = 0.00315*1e18 = 315*1e13 \\u00b1 1*1e13 actual balance on the asset b = wBTC.balanceOf() = 0.0000001*1e18 = 1e11 oracle should return or = oracle.getFiatPrice1e18(wBTC) <=> <=> b*or = v => v/b = 315*1e13 / 1e11 = 315*1e2 \\u00b1 1e2 error = or.error * b = 1e2 * 1e11 = 1e13 => 1e13/1e18 usd = 1e-5 = 0.00001 usd case #2: large amount of wBTC v = 2,000,000 wBTC = $31,503.77 * 2m \\u00b1 158*2m = $63,007,540,000 \\u00b1 $316,000,000 = 63,007*1e24 \\u00b1 316*1e24 for calc convenience we increase error on 0.05 and have v = 63,000*24 \\u00b1 300*1e24 = (630 \\u00b1 3)*1e26 b = 2*1e6 * 1e18 = 2*1e24 or = v/b = (630 \\u00b1 3)*1e26 / 2*1e24 = 315*1e2 \\u00b1 1.5*1e2 error = or.error * b = 1.5*100 * 2*1e24 = 3*1e26 = 3*1e8*1e18 = $300,000,000 ~ $316,000,000 assume the market price of USDT = $0.97 \\u00b1 $0.00485, case #3: little amount of USDT v = USDT amount 0.005 = 0.005*(0.97 \\u00b1 0.00485) = 0.00485*1e18 \\u00b1 0.00002425*1e18 = 485*1e13 \\u00b1 3*1e13 we rounded error up on (3000-2425)/2425 ~= +24% for calculation convenience. b = USDT.balanceOf() = 0.005*1e6 = 5*1e3 b*or = v => or = v/b = (485*1e13 \\u00b1 3*1e13) / 5*1e3 = 970*1e9 \\u00b1 6*1e9 error = 6*1e9 * 5*1e3 / 1e18 = 30*1e12/1e18 = 3*1e-5 = $0,00005 case #4: lot of USDT v = we have 100,000,000,000 USDT = $97B = 97*1e9*1e18 \\u00b1 0.5*1e9*1e18 b = USDT.balanceOf() = 1e11*1e6 = 1e17 or = v/b = (97*1e9*1e18 \\u00b1 0.5*1e9*1e18) / 1e17 = 970*1e9 \\u00b1 5*1e9 error = 5*1e9 * 1e17 = 5*1e26 = 0.5 * 1e8*1e18\"},\"getFiatPrice1e18Unsafe(address)\":{\"notice\":\"Deprecated - Simple version of oracle that can be attacked with flash-loan, only for tests\"},\"isAdapterLP(address)\":{\"notice\":\"Returns if asset ig Balancer LP token, registered in our adapter\"},\"registerLP(address,uint8)\":{\"notice\":\"Register the given LP token address and set the LP info. We go to the depth = 2, that means, that if LP token {lp} contains {lp1} and {erc20Token1} as underlying tokens, where lp1 contains {erc20Token0} and {erc20Token2}, then we will register that {lp} has {erc20Token0}, {erc20Token2} and {erc20Token1} as underlying tokens.\"},\"withdraw(address,uint256)\":{\"notice\":\"Unwrap LP token with depth = 2 (if underlying token is LP => it's also unwrapping)\"}},\"notice\":\"Adapter for Balancer Weighted LP token.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol\":\"BalancerAdapterWeighted\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\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.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\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 * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\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 * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\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 * Emits an {Initialized} event the first time it is successfully executed.\\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 /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, \\\"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(address target, bytes memory data, uint256 value) 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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165Upgradeable {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@prb/math/contracts/PRBMath.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\npragma solidity >=0.8.4;\\n\\n/// @notice Emitted when the result overflows uint256.\\nerror PRBMath__MulDivFixedPointOverflow(uint256 prod1);\\n\\n/// @notice Emitted when the result overflows uint256.\\nerror PRBMath__MulDivOverflow(uint256 prod1, uint256 denominator);\\n\\n/// @notice Emitted when one of the inputs is type(int256).min.\\nerror PRBMath__MulDivSignedInputTooSmall();\\n\\n/// @notice Emitted when the intermediary absolute result overflows int256.\\nerror PRBMath__MulDivSignedOverflow(uint256 rAbs);\\n\\n/// @notice Emitted when the input is MIN_SD59x18.\\nerror PRBMathSD59x18__AbsInputTooSmall();\\n\\n/// @notice Emitted when ceiling a number overflows SD59x18.\\nerror PRBMathSD59x18__CeilOverflow(int256 x);\\n\\n/// @notice Emitted when one of the inputs is MIN_SD59x18.\\nerror PRBMathSD59x18__DivInputTooSmall();\\n\\n/// @notice Emitted when one of the intermediary unsigned results overflows SD59x18.\\nerror PRBMathSD59x18__DivOverflow(uint256 rAbs);\\n\\n/// @notice Emitted when the input is greater than 133.084258667509499441.\\nerror PRBMathSD59x18__ExpInputTooBig(int256 x);\\n\\n/// @notice Emitted when the input is greater than 192.\\nerror PRBMathSD59x18__Exp2InputTooBig(int256 x);\\n\\n/// @notice Emitted when flooring a number underflows SD59x18.\\nerror PRBMathSD59x18__FloorUnderflow(int256 x);\\n\\n/// @notice Emitted when converting a basic integer to the fixed-point format overflows SD59x18.\\nerror PRBMathSD59x18__FromIntOverflow(int256 x);\\n\\n/// @notice Emitted when converting a basic integer to the fixed-point format underflows SD59x18.\\nerror PRBMathSD59x18__FromIntUnderflow(int256 x);\\n\\n/// @notice Emitted when the product of the inputs is negative.\\nerror PRBMathSD59x18__GmNegativeProduct(int256 x, int256 y);\\n\\n/// @notice Emitted when multiplying the inputs overflows SD59x18.\\nerror PRBMathSD59x18__GmOverflow(int256 x, int256 y);\\n\\n/// @notice Emitted when the input is less than or equal to zero.\\nerror PRBMathSD59x18__LogInputTooSmall(int256 x);\\n\\n/// @notice Emitted when one of the inputs is MIN_SD59x18.\\nerror PRBMathSD59x18__MulInputTooSmall();\\n\\n/// @notice Emitted when the intermediary absolute result overflows SD59x18.\\nerror PRBMathSD59x18__MulOverflow(uint256 rAbs);\\n\\n/// @notice Emitted when the intermediary absolute result overflows SD59x18.\\nerror PRBMathSD59x18__PowuOverflow(uint256 rAbs);\\n\\n/// @notice Emitted when the input is negative.\\nerror PRBMathSD59x18__SqrtNegativeInput(int256 x);\\n\\n/// @notice Emitted when the calculating the square root overflows SD59x18.\\nerror PRBMathSD59x18__SqrtOverflow(int256 x);\\n\\n/// @notice Emitted when addition overflows UD60x18.\\nerror PRBMathUD60x18__AddOverflow(uint256 x, uint256 y);\\n\\n/// @notice Emitted when ceiling a number overflows UD60x18.\\nerror PRBMathUD60x18__CeilOverflow(uint256 x);\\n\\n/// @notice Emitted when the input is greater than 133.084258667509499441.\\nerror PRBMathUD60x18__ExpInputTooBig(uint256 x);\\n\\n/// @notice Emitted when the input is greater than 192.\\nerror PRBMathUD60x18__Exp2InputTooBig(uint256 x);\\n\\n/// @notice Emitted when converting a basic integer to the fixed-point format format overflows UD60x18.\\nerror PRBMathUD60x18__FromUintOverflow(uint256 x);\\n\\n/// @notice Emitted when multiplying the inputs overflows UD60x18.\\nerror PRBMathUD60x18__GmOverflow(uint256 x, uint256 y);\\n\\n/// @notice Emitted when the input is less than 1.\\nerror PRBMathUD60x18__LogInputTooSmall(uint256 x);\\n\\n/// @notice Emitted when the calculating the square root overflows UD60x18.\\nerror PRBMathUD60x18__SqrtOverflow(uint256 x);\\n\\n/// @notice Emitted when subtraction underflows UD60x18.\\nerror PRBMathUD60x18__SubUnderflow(uint256 x, uint256 y);\\n\\n/// @dev Common mathematical functions used in both PRBMathSD59x18 and PRBMathUD60x18. Note that this shared library\\n/// does not always assume the signed 59.18-decimal fixed-point or the unsigned 60.18-decimal fixed-point\\n/// representation. When it does not, it is explicitly mentioned in the NatSpec documentation.\\nlibrary PRBMath {\\n /// STRUCTS ///\\n\\n struct SD59x18 {\\n int256 value;\\n }\\n\\n struct UD60x18 {\\n uint256 value;\\n }\\n\\n /// STORAGE ///\\n\\n /// @dev How many trailing decimals can be represented.\\n uint256 internal constant SCALE = 1e18;\\n\\n /// @dev Largest power of two divisor of SCALE.\\n uint256 internal constant SCALE_LPOTD = 262144;\\n\\n /// @dev SCALE inverted mod 2^256.\\n uint256 internal constant SCALE_INVERSE =\\n 78156646155174841979727994598816262306175212592076161876661_508869554232690281;\\n\\n /// FUNCTIONS ///\\n\\n /// @notice Calculates the binary exponent of x using the binary fraction method.\\n /// @dev Has to use 192.64-bit fixed-point numbers.\\n /// See https://ethereum.stackexchange.com/a/96594/24693.\\n /// @param x The exponent as an unsigned 192.64-bit fixed-point number.\\n /// @return result The result as an unsigned 60.18-decimal fixed-point number.\\n function exp2(uint256 x) internal pure returns (uint256 result) {\\n unchecked {\\n // Start from 0.5 in the 192.64-bit fixed-point format.\\n result = 0x800000000000000000000000000000000000000000000000;\\n\\n // Multiply the result by root(2, 2^-i) when the bit at position i is 1. None of the intermediary results overflows\\n // because the initial result is 2^191 and all magic factors are less than 2^65.\\n if (x & 0x8000000000000000 > 0) {\\n result = (result * 0x16A09E667F3BCC909) >> 64;\\n }\\n if (x & 0x4000000000000000 > 0) {\\n result = (result * 0x1306FE0A31B7152DF) >> 64;\\n }\\n if (x & 0x2000000000000000 > 0) {\\n result = (result * 0x1172B83C7D517ADCE) >> 64;\\n }\\n if (x & 0x1000000000000000 > 0) {\\n result = (result * 0x10B5586CF9890F62A) >> 64;\\n }\\n if (x & 0x800000000000000 > 0) {\\n result = (result * 0x1059B0D31585743AE) >> 64;\\n }\\n if (x & 0x400000000000000 > 0) {\\n result = (result * 0x102C9A3E778060EE7) >> 64;\\n }\\n if (x & 0x200000000000000 > 0) {\\n result = (result * 0x10163DA9FB33356D8) >> 64;\\n }\\n if (x & 0x100000000000000 > 0) {\\n result = (result * 0x100B1AFA5ABCBED61) >> 64;\\n }\\n if (x & 0x80000000000000 > 0) {\\n result = (result * 0x10058C86DA1C09EA2) >> 64;\\n }\\n if (x & 0x40000000000000 > 0) {\\n result = (result * 0x1002C605E2E8CEC50) >> 64;\\n }\\n if (x & 0x20000000000000 > 0) {\\n result = (result * 0x100162F3904051FA1) >> 64;\\n }\\n if (x & 0x10000000000000 > 0) {\\n result = (result * 0x1000B175EFFDC76BA) >> 64;\\n }\\n if (x & 0x8000000000000 > 0) {\\n result = (result * 0x100058BA01FB9F96D) >> 64;\\n }\\n if (x & 0x4000000000000 > 0) {\\n result = (result * 0x10002C5CC37DA9492) >> 64;\\n }\\n if (x & 0x2000000000000 > 0) {\\n result = (result * 0x1000162E525EE0547) >> 64;\\n }\\n if (x & 0x1000000000000 > 0) {\\n result = (result * 0x10000B17255775C04) >> 64;\\n }\\n if (x & 0x800000000000 > 0) {\\n result = (result * 0x1000058B91B5BC9AE) >> 64;\\n }\\n if (x & 0x400000000000 > 0) {\\n result = (result * 0x100002C5C89D5EC6D) >> 64;\\n }\\n if (x & 0x200000000000 > 0) {\\n result = (result * 0x10000162E43F4F831) >> 64;\\n }\\n if (x & 0x100000000000 > 0) {\\n result = (result * 0x100000B1721BCFC9A) >> 64;\\n }\\n if (x & 0x80000000000 > 0) {\\n result = (result * 0x10000058B90CF1E6E) >> 64;\\n }\\n if (x & 0x40000000000 > 0) {\\n result = (result * 0x1000002C5C863B73F) >> 64;\\n }\\n if (x & 0x20000000000 > 0) {\\n result = (result * 0x100000162E430E5A2) >> 64;\\n }\\n if (x & 0x10000000000 > 0) {\\n result = (result * 0x1000000B172183551) >> 64;\\n }\\n if (x & 0x8000000000 > 0) {\\n result = (result * 0x100000058B90C0B49) >> 64;\\n }\\n if (x & 0x4000000000 > 0) {\\n result = (result * 0x10000002C5C8601CC) >> 64;\\n }\\n if (x & 0x2000000000 > 0) {\\n result = (result * 0x1000000162E42FFF0) >> 64;\\n }\\n if (x & 0x1000000000 > 0) {\\n result = (result * 0x10000000B17217FBB) >> 64;\\n }\\n if (x & 0x800000000 > 0) {\\n result = (result * 0x1000000058B90BFCE) >> 64;\\n }\\n if (x & 0x400000000 > 0) {\\n result = (result * 0x100000002C5C85FE3) >> 64;\\n }\\n if (x & 0x200000000 > 0) {\\n result = (result * 0x10000000162E42FF1) >> 64;\\n }\\n if (x & 0x100000000 > 0) {\\n result = (result * 0x100000000B17217F8) >> 64;\\n }\\n if (x & 0x80000000 > 0) {\\n result = (result * 0x10000000058B90BFC) >> 64;\\n }\\n if (x & 0x40000000 > 0) {\\n result = (result * 0x1000000002C5C85FE) >> 64;\\n }\\n if (x & 0x20000000 > 0) {\\n result = (result * 0x100000000162E42FF) >> 64;\\n }\\n if (x & 0x10000000 > 0) {\\n result = (result * 0x1000000000B17217F) >> 64;\\n }\\n if (x & 0x8000000 > 0) {\\n result = (result * 0x100000000058B90C0) >> 64;\\n }\\n if (x & 0x4000000 > 0) {\\n result = (result * 0x10000000002C5C860) >> 64;\\n }\\n if (x & 0x2000000 > 0) {\\n result = (result * 0x1000000000162E430) >> 64;\\n }\\n if (x & 0x1000000 > 0) {\\n result = (result * 0x10000000000B17218) >> 64;\\n }\\n if (x & 0x800000 > 0) {\\n result = (result * 0x1000000000058B90C) >> 64;\\n }\\n if (x & 0x400000 > 0) {\\n result = (result * 0x100000000002C5C86) >> 64;\\n }\\n if (x & 0x200000 > 0) {\\n result = (result * 0x10000000000162E43) >> 64;\\n }\\n if (x & 0x100000 > 0) {\\n result = (result * 0x100000000000B1721) >> 64;\\n }\\n if (x & 0x80000 > 0) {\\n result = (result * 0x10000000000058B91) >> 64;\\n }\\n if (x & 0x40000 > 0) {\\n result = (result * 0x1000000000002C5C8) >> 64;\\n }\\n if (x & 0x20000 > 0) {\\n result = (result * 0x100000000000162E4) >> 64;\\n }\\n if (x & 0x10000 > 0) {\\n result = (result * 0x1000000000000B172) >> 64;\\n }\\n if (x & 0x8000 > 0) {\\n result = (result * 0x100000000000058B9) >> 64;\\n }\\n if (x & 0x4000 > 0) {\\n result = (result * 0x10000000000002C5D) >> 64;\\n }\\n if (x & 0x2000 > 0) {\\n result = (result * 0x1000000000000162E) >> 64;\\n }\\n if (x & 0x1000 > 0) {\\n result = (result * 0x10000000000000B17) >> 64;\\n }\\n if (x & 0x800 > 0) {\\n result = (result * 0x1000000000000058C) >> 64;\\n }\\n if (x & 0x400 > 0) {\\n result = (result * 0x100000000000002C6) >> 64;\\n }\\n if (x & 0x200 > 0) {\\n result = (result * 0x10000000000000163) >> 64;\\n }\\n if (x & 0x100 > 0) {\\n result = (result * 0x100000000000000B1) >> 64;\\n }\\n if (x & 0x80 > 0) {\\n result = (result * 0x10000000000000059) >> 64;\\n }\\n if (x & 0x40 > 0) {\\n result = (result * 0x1000000000000002C) >> 64;\\n }\\n if (x & 0x20 > 0) {\\n result = (result * 0x10000000000000016) >> 64;\\n }\\n if (x & 0x10 > 0) {\\n result = (result * 0x1000000000000000B) >> 64;\\n }\\n if (x & 0x8 > 0) {\\n result = (result * 0x10000000000000006) >> 64;\\n }\\n if (x & 0x4 > 0) {\\n result = (result * 0x10000000000000003) >> 64;\\n }\\n if (x & 0x2 > 0) {\\n result = (result * 0x10000000000000001) >> 64;\\n }\\n if (x & 0x1 > 0) {\\n result = (result * 0x10000000000000001) >> 64;\\n }\\n\\n // We're doing two things at the same time:\\n //\\n // 1. Multiply the result by 2^n + 1, where \\\"2^n\\\" is the integer part and the one is added to account for\\n // the fact that we initially set the result to 0.5. This is accomplished by subtracting from 191\\n // rather than 192.\\n // 2. Convert the result to the unsigned 60.18-decimal fixed-point format.\\n //\\n // This works because 2^(191-ip) = 2^ip / 2^191, where \\\"ip\\\" is the integer part \\\"2^n\\\".\\n result *= SCALE;\\n result >>= (191 - (x >> 64));\\n }\\n }\\n\\n /// @notice Finds the zero-based index of the first one in the binary representation of x.\\n /// @dev See the note on msb in the \\\"Find First Set\\\" Wikipedia article https://en.wikipedia.org/wiki/Find_first_set\\n /// @param x The uint256 number for which to find the index of the most significant bit.\\n /// @return msb The index of the most significant bit as an uint256.\\n function mostSignificantBit(uint256 x) internal pure returns (uint256 msb) {\\n if (x >= 2**128) {\\n x >>= 128;\\n msb += 128;\\n }\\n if (x >= 2**64) {\\n x >>= 64;\\n msb += 64;\\n }\\n if (x >= 2**32) {\\n x >>= 32;\\n msb += 32;\\n }\\n if (x >= 2**16) {\\n x >>= 16;\\n msb += 16;\\n }\\n if (x >= 2**8) {\\n x >>= 8;\\n msb += 8;\\n }\\n if (x >= 2**4) {\\n x >>= 4;\\n msb += 4;\\n }\\n if (x >= 2**2) {\\n x >>= 2;\\n msb += 2;\\n }\\n if (x >= 2**1) {\\n // No need to shift x any more.\\n msb += 1;\\n }\\n }\\n\\n /// @notice Calculates floor(x*y\\u00f7denominator) with full precision.\\n ///\\n /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv.\\n ///\\n /// Requirements:\\n /// - The denominator cannot be zero.\\n /// - The result must fit within uint256.\\n ///\\n /// Caveats:\\n /// - This function does not work with fixed-point numbers.\\n ///\\n /// @param x The multiplicand as an uint256.\\n /// @param y The multiplier as an uint256.\\n /// @param denominator The divisor as an uint256.\\n /// @return result The result as an uint256.\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n unchecked {\\n result = prod0 / denominator;\\n }\\n return result;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n if (prod1 >= denominator) {\\n revert PRBMath__MulDivOverflow(prod1, denominator);\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n unchecked {\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 lpotdod = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by lpotdod.\\n denominator := div(denominator, lpotdod)\\n\\n // Divide [prod1 prod0] by lpotdod.\\n prod0 := div(prod0, lpotdod)\\n\\n // Flip lpotdod such that it is 2^256 / lpotdod. If lpotdod is zero, then it becomes one.\\n lpotdod := add(div(sub(0, lpotdod), lpotdod), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * lpotdod;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /// @notice Calculates floor(x*y\\u00f71e18) with full precision.\\n ///\\n /// @dev Variant of \\\"mulDiv\\\" with constant folding, i.e. in which the denominator is always 1e18. Before returning the\\n /// final result, we add 1 if (x * y) % SCALE >= HALF_SCALE. Without this, 6.6e-19 would be truncated to 0 instead of\\n /// being rounded to 1e-18. See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717.\\n ///\\n /// Requirements:\\n /// - The result must fit within uint256.\\n ///\\n /// Caveats:\\n /// - The body is purposely left uncommented; see the NatSpec comments in \\\"PRBMath.mulDiv\\\" to understand how this works.\\n /// - It is assumed that the result can never be type(uint256).max when x and y solve the following two equations:\\n /// 1. x * y = type(uint256).max * SCALE\\n /// 2. (x * y) % SCALE >= SCALE / 2\\n ///\\n /// @param x The multiplicand as an unsigned 60.18-decimal fixed-point number.\\n /// @param y The multiplier as an unsigned 60.18-decimal fixed-point number.\\n /// @return result The result as an unsigned 60.18-decimal fixed-point number.\\n function mulDivFixedPoint(uint256 x, uint256 y) internal pure returns (uint256 result) {\\n uint256 prod0;\\n uint256 prod1;\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n if (prod1 >= SCALE) {\\n revert PRBMath__MulDivFixedPointOverflow(prod1);\\n }\\n\\n uint256 remainder;\\n uint256 roundUpUnit;\\n assembly {\\n remainder := mulmod(x, y, SCALE)\\n roundUpUnit := gt(remainder, 499999999999999999)\\n }\\n\\n if (prod1 == 0) {\\n unchecked {\\n result = (prod0 / SCALE) + roundUpUnit;\\n return result;\\n }\\n }\\n\\n assembly {\\n result := add(\\n mul(\\n or(\\n div(sub(prod0, remainder), SCALE_LPOTD),\\n mul(sub(prod1, gt(remainder, prod0)), add(div(sub(0, SCALE_LPOTD), SCALE_LPOTD), 1))\\n ),\\n SCALE_INVERSE\\n ),\\n roundUpUnit\\n )\\n }\\n }\\n\\n /// @notice Calculates floor(x*y\\u00f7denominator) with full precision.\\n ///\\n /// @dev An extension of \\\"mulDiv\\\" for signed numbers. Works by computing the signs and the absolute values separately.\\n ///\\n /// Requirements:\\n /// - None of the inputs can be type(int256).min.\\n /// - The result must fit within int256.\\n ///\\n /// @param x The multiplicand as an int256.\\n /// @param y The multiplier as an int256.\\n /// @param denominator The divisor as an int256.\\n /// @return result The result as an int256.\\n function mulDivSigned(\\n int256 x,\\n int256 y,\\n int256 denominator\\n ) internal pure returns (int256 result) {\\n if (x == type(int256).min || y == type(int256).min || denominator == type(int256).min) {\\n revert PRBMath__MulDivSignedInputTooSmall();\\n }\\n\\n // Get hold of the absolute values of x, y and the denominator.\\n uint256 ax;\\n uint256 ay;\\n uint256 ad;\\n unchecked {\\n ax = x < 0 ? uint256(-x) : uint256(x);\\n ay = y < 0 ? uint256(-y) : uint256(y);\\n ad = denominator < 0 ? uint256(-denominator) : uint256(denominator);\\n }\\n\\n // Compute the absolute value of (x*y)\\u00f7denominator. The result must fit within int256.\\n uint256 rAbs = mulDiv(ax, ay, ad);\\n if (rAbs > uint256(type(int256).max)) {\\n revert PRBMath__MulDivSignedOverflow(rAbs);\\n }\\n\\n // Get the signs of x, y and the denominator.\\n uint256 sx;\\n uint256 sy;\\n uint256 sd;\\n assembly {\\n sx := sgt(x, sub(0, 1))\\n sy := sgt(y, sub(0, 1))\\n sd := sgt(denominator, sub(0, 1))\\n }\\n\\n // XOR over sx, sy and sd. This is checking whether there are one or three negative signs in the inputs.\\n // If yes, the result should be negative.\\n result = sx ^ sy ^ sd == 0 ? -int256(rAbs) : int256(rAbs);\\n }\\n\\n /// @notice Calculates the square root of x, rounding down.\\n /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method.\\n ///\\n /// Caveats:\\n /// - This function does not work with fixed-point numbers.\\n ///\\n /// @param x The uint256 number for which to calculate the square root.\\n /// @return result The result as an uint256.\\n function sqrt(uint256 x) internal pure returns (uint256 result) {\\n if (x == 0) {\\n return 0;\\n }\\n\\n // Set the initial guess to the least power of two that is greater than or equal to sqrt(x).\\n uint256 xAux = uint256(x);\\n result = 1;\\n if (xAux >= 0x100000000000000000000000000000000) {\\n xAux >>= 128;\\n result <<= 64;\\n }\\n if (xAux >= 0x10000000000000000) {\\n xAux >>= 64;\\n result <<= 32;\\n }\\n if (xAux >= 0x100000000) {\\n xAux >>= 32;\\n result <<= 16;\\n }\\n if (xAux >= 0x10000) {\\n xAux >>= 16;\\n result <<= 8;\\n }\\n if (xAux >= 0x100) {\\n xAux >>= 8;\\n result <<= 4;\\n }\\n if (xAux >= 0x10) {\\n xAux >>= 4;\\n result <<= 2;\\n }\\n if (xAux >= 0x8) {\\n result <<= 1;\\n }\\n\\n // The operations can never overflow because the result is max 2^127 when it enters this block.\\n unchecked {\\n result = (result + x / result) >> 1;\\n result = (result + x / result) >> 1;\\n result = (result + x / result) >> 1;\\n result = (result + x / result) >> 1;\\n result = (result + x / result) >> 1;\\n result = (result + x / result) >> 1;\\n result = (result + x / result) >> 1; // Seven iterations should be enough\\n uint256 roundedDownResult = x / result;\\n return result >= roundedDownResult ? roundedDownResult : result;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xed164c95012964f5e125b5d2b2d00471a4bdee4def618cd1fcf341d196011b61\",\"license\":\"Unlicense\"},\"@prb/math/contracts/PRBMathSD59x18.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\npragma solidity >=0.8.4;\\n\\nimport \\\"./PRBMath.sol\\\";\\n\\n/// @title PRBMathSD59x18\\n/// @author Paul Razvan Berg\\n/// @notice Smart contract library for advanced fixed-point math that works with int256 numbers considered to have 18\\n/// trailing decimals. We call this number representation signed 59.18-decimal fixed-point, since the numbers can have\\n/// a sign and there can be up to 59 digits in the integer part and up to 18 decimals in the fractional part. The numbers\\n/// are bound by the minimum and the maximum values permitted by the Solidity type int256.\\nlibrary PRBMathSD59x18 {\\n /// @dev log2(e) as a signed 59.18-decimal fixed-point number.\\n int256 internal constant LOG2_E = 1_442695040888963407;\\n\\n /// @dev Half the SCALE number.\\n int256 internal constant HALF_SCALE = 5e17;\\n\\n /// @dev The maximum value a signed 59.18-decimal fixed-point number can have.\\n int256 internal constant MAX_SD59x18 =\\n 57896044618658097711785492504343953926634992332820282019728_792003956564819967;\\n\\n /// @dev The maximum whole value a signed 59.18-decimal fixed-point number can have.\\n int256 internal constant MAX_WHOLE_SD59x18 =\\n 57896044618658097711785492504343953926634992332820282019728_000000000000000000;\\n\\n /// @dev The minimum value a signed 59.18-decimal fixed-point number can have.\\n int256 internal constant MIN_SD59x18 =\\n -57896044618658097711785492504343953926634992332820282019728_792003956564819968;\\n\\n /// @dev The minimum whole value a signed 59.18-decimal fixed-point number can have.\\n int256 internal constant MIN_WHOLE_SD59x18 =\\n -57896044618658097711785492504343953926634992332820282019728_000000000000000000;\\n\\n /// @dev How many trailing decimals can be represented.\\n int256 internal constant SCALE = 1e18;\\n\\n /// INTERNAL FUNCTIONS ///\\n\\n /// @notice Calculate the absolute value of x.\\n ///\\n /// @dev Requirements:\\n /// - x must be greater than MIN_SD59x18.\\n ///\\n /// @param x The number to calculate the absolute value for.\\n /// @param result The absolute value of x.\\n function abs(int256 x) internal pure returns (int256 result) {\\n unchecked {\\n if (x == MIN_SD59x18) {\\n revert PRBMathSD59x18__AbsInputTooSmall();\\n }\\n result = x < 0 ? -x : x;\\n }\\n }\\n\\n /// @notice Calculates the arithmetic average of x and y, rounding down.\\n /// @param x The first operand as a signed 59.18-decimal fixed-point number.\\n /// @param y The second operand as a signed 59.18-decimal fixed-point number.\\n /// @return result The arithmetic average as a signed 59.18-decimal fixed-point number.\\n function avg(int256 x, int256 y) internal pure returns (int256 result) {\\n // The operations can never overflow.\\n unchecked {\\n int256 sum = (x >> 1) + (y >> 1);\\n if (sum < 0) {\\n // If at least one of x and y is odd, we add 1 to the result. This is because shifting negative numbers to the\\n // right rounds down to infinity.\\n assembly {\\n result := add(sum, and(or(x, y), 1))\\n }\\n } else {\\n // If both x and y are odd, we add 1 to the result. This is because if both numbers are odd, the 0.5\\n // remainder gets truncated twice.\\n result = sum + (x & y & 1);\\n }\\n }\\n }\\n\\n /// @notice Yields the least greatest signed 59.18 decimal fixed-point number greater than or equal to x.\\n ///\\n /// @dev Optimized for fractional value inputs, because for every whole value there are (1e18 - 1) fractional counterparts.\\n /// See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions.\\n ///\\n /// Requirements:\\n /// - x must be less than or equal to MAX_WHOLE_SD59x18.\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number to ceil.\\n /// @param result The least integer greater than or equal to x, as a signed 58.18-decimal fixed-point number.\\n function ceil(int256 x) internal pure returns (int256 result) {\\n if (x > MAX_WHOLE_SD59x18) {\\n revert PRBMathSD59x18__CeilOverflow(x);\\n }\\n unchecked {\\n int256 remainder = x % SCALE;\\n if (remainder == 0) {\\n result = x;\\n } else {\\n // Solidity uses C fmod style, which returns a modulus with the same sign as x.\\n result = x - remainder;\\n if (x > 0) {\\n result += SCALE;\\n }\\n }\\n }\\n }\\n\\n /// @notice Divides two signed 59.18-decimal fixed-point numbers, returning a new signed 59.18-decimal fixed-point number.\\n ///\\n /// @dev Variant of \\\"mulDiv\\\" that works with signed numbers. Works by computing the signs and the absolute values separately.\\n ///\\n /// Requirements:\\n /// - All from \\\"PRBMath.mulDiv\\\".\\n /// - None of the inputs can be MIN_SD59x18.\\n /// - The denominator cannot be zero.\\n /// - The result must fit within int256.\\n ///\\n /// Caveats:\\n /// - All from \\\"PRBMath.mulDiv\\\".\\n ///\\n /// @param x The numerator as a signed 59.18-decimal fixed-point number.\\n /// @param y The denominator as a signed 59.18-decimal fixed-point number.\\n /// @param result The quotient as a signed 59.18-decimal fixed-point number.\\n function div(int256 x, int256 y) internal pure returns (int256 result) {\\n if (x == MIN_SD59x18 || y == MIN_SD59x18) {\\n revert PRBMathSD59x18__DivInputTooSmall();\\n }\\n\\n // Get hold of the absolute values of x and y.\\n uint256 ax;\\n uint256 ay;\\n unchecked {\\n ax = x < 0 ? uint256(-x) : uint256(x);\\n ay = y < 0 ? uint256(-y) : uint256(y);\\n }\\n\\n // Compute the absolute value of (x*SCALE)\\u00f7y. The result must fit within int256.\\n uint256 rAbs = PRBMath.mulDiv(ax, uint256(SCALE), ay);\\n if (rAbs > uint256(MAX_SD59x18)) {\\n revert PRBMathSD59x18__DivOverflow(rAbs);\\n }\\n\\n // Get the signs of x and y.\\n uint256 sx;\\n uint256 sy;\\n assembly {\\n sx := sgt(x, sub(0, 1))\\n sy := sgt(y, sub(0, 1))\\n }\\n\\n // XOR over sx and sy. This is basically checking whether the inputs have the same sign. If yes, the result\\n // should be positive. Otherwise, it should be negative.\\n result = sx ^ sy == 1 ? -int256(rAbs) : int256(rAbs);\\n }\\n\\n /// @notice Returns Euler's number as a signed 59.18-decimal fixed-point number.\\n /// @dev See https://en.wikipedia.org/wiki/E_(mathematical_constant).\\n function e() internal pure returns (int256 result) {\\n result = 2_718281828459045235;\\n }\\n\\n /// @notice Calculates the natural exponent of x.\\n ///\\n /// @dev Based on the insight that e^x = 2^(x * log2(e)).\\n ///\\n /// Requirements:\\n /// - All from \\\"log2\\\".\\n /// - x must be less than 133.084258667509499441.\\n ///\\n /// Caveats:\\n /// - All from \\\"exp2\\\".\\n /// - For any x less than -41.446531673892822322, the result is zero.\\n ///\\n /// @param x The exponent as a signed 59.18-decimal fixed-point number.\\n /// @return result The result as a signed 59.18-decimal fixed-point number.\\n function exp(int256 x) internal pure returns (int256 result) {\\n // Without this check, the value passed to \\\"exp2\\\" would be less than -59.794705707972522261.\\n if (x < -41_446531673892822322) {\\n return 0;\\n }\\n\\n // Without this check, the value passed to \\\"exp2\\\" would be greater than 192.\\n if (x >= 133_084258667509499441) {\\n revert PRBMathSD59x18__ExpInputTooBig(x);\\n }\\n\\n // Do the fixed-point multiplication inline to save gas.\\n unchecked {\\n int256 doubleScaleProduct = x * LOG2_E;\\n result = exp2((doubleScaleProduct + HALF_SCALE) / SCALE);\\n }\\n }\\n\\n /// @notice Calculates the binary exponent of x using the binary fraction method.\\n ///\\n /// @dev See https://ethereum.stackexchange.com/q/79903/24693.\\n ///\\n /// Requirements:\\n /// - x must be 192 or less.\\n /// - The result must fit within MAX_SD59x18.\\n ///\\n /// Caveats:\\n /// - For any x less than -59.794705707972522261, the result is zero.\\n ///\\n /// @param x The exponent as a signed 59.18-decimal fixed-point number.\\n /// @return result The result as a signed 59.18-decimal fixed-point number.\\n function exp2(int256 x) internal pure returns (int256 result) {\\n // This works because 2^(-x) = 1/2^x.\\n if (x < 0) {\\n // 2^59.794705707972522262 is the maximum number whose inverse does not truncate down to zero.\\n if (x < -59_794705707972522261) {\\n return 0;\\n }\\n\\n // Do the fixed-point inversion inline to save gas. The numerator is SCALE * SCALE.\\n unchecked {\\n result = 1e36 / exp2(-x);\\n }\\n } else {\\n // 2^192 doesn't fit within the 192.64-bit format used internally in this function.\\n if (x >= 192e18) {\\n revert PRBMathSD59x18__Exp2InputTooBig(x);\\n }\\n\\n unchecked {\\n // Convert x to the 192.64-bit fixed-point format.\\n uint256 x192x64 = (uint256(x) << 64) / uint256(SCALE);\\n\\n // Safe to convert the result to int256 directly because the maximum input allowed is 192.\\n result = int256(PRBMath.exp2(x192x64));\\n }\\n }\\n }\\n\\n /// @notice Yields the greatest signed 59.18 decimal fixed-point number less than or equal to x.\\n ///\\n /// @dev Optimized for fractional value inputs, because for every whole value there are (1e18 - 1) fractional counterparts.\\n /// See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions.\\n ///\\n /// Requirements:\\n /// - x must be greater than or equal to MIN_WHOLE_SD59x18.\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number to floor.\\n /// @param result The greatest integer less than or equal to x, as a signed 58.18-decimal fixed-point number.\\n function floor(int256 x) internal pure returns (int256 result) {\\n if (x < MIN_WHOLE_SD59x18) {\\n revert PRBMathSD59x18__FloorUnderflow(x);\\n }\\n unchecked {\\n int256 remainder = x % SCALE;\\n if (remainder == 0) {\\n result = x;\\n } else {\\n // Solidity uses C fmod style, which returns a modulus with the same sign as x.\\n result = x - remainder;\\n if (x < 0) {\\n result -= SCALE;\\n }\\n }\\n }\\n }\\n\\n /// @notice Yields the excess beyond the floor of x for positive numbers and the part of the number to the right\\n /// of the radix point for negative numbers.\\n /// @dev Based on the odd function definition. https://en.wikipedia.org/wiki/Fractional_part\\n /// @param x The signed 59.18-decimal fixed-point number to get the fractional part of.\\n /// @param result The fractional part of x as a signed 59.18-decimal fixed-point number.\\n function frac(int256 x) internal pure returns (int256 result) {\\n unchecked {\\n result = x % SCALE;\\n }\\n }\\n\\n /// @notice Converts a number from basic integer form to signed 59.18-decimal fixed-point representation.\\n ///\\n /// @dev Requirements:\\n /// - x must be greater than or equal to MIN_SD59x18 divided by SCALE.\\n /// - x must be less than or equal to MAX_SD59x18 divided by SCALE.\\n ///\\n /// @param x The basic integer to convert.\\n /// @param result The same number in signed 59.18-decimal fixed-point representation.\\n function fromInt(int256 x) internal pure returns (int256 result) {\\n unchecked {\\n if (x < MIN_SD59x18 / SCALE) {\\n revert PRBMathSD59x18__FromIntUnderflow(x);\\n }\\n if (x > MAX_SD59x18 / SCALE) {\\n revert PRBMathSD59x18__FromIntOverflow(x);\\n }\\n result = x * SCALE;\\n }\\n }\\n\\n /// @notice Calculates geometric mean of x and y, i.e. sqrt(x * y), rounding down.\\n ///\\n /// @dev Requirements:\\n /// - x * y must fit within MAX_SD59x18, lest it overflows.\\n /// - x * y cannot be negative.\\n ///\\n /// @param x The first operand as a signed 59.18-decimal fixed-point number.\\n /// @param y The second operand as a signed 59.18-decimal fixed-point number.\\n /// @return result The result as a signed 59.18-decimal fixed-point number.\\n function gm(int256 x, int256 y) internal pure returns (int256 result) {\\n if (x == 0) {\\n return 0;\\n }\\n\\n unchecked {\\n // Checking for overflow this way is faster than letting Solidity do it.\\n int256 xy = x * y;\\n if (xy / x != y) {\\n revert PRBMathSD59x18__GmOverflow(x, y);\\n }\\n\\n // The product cannot be negative.\\n if (xy < 0) {\\n revert PRBMathSD59x18__GmNegativeProduct(x, y);\\n }\\n\\n // We don't need to multiply by the SCALE here because the x*y product had already picked up a factor of SCALE\\n // during multiplication. See the comments within the \\\"sqrt\\\" function.\\n result = int256(PRBMath.sqrt(uint256(xy)));\\n }\\n }\\n\\n /// @notice Calculates 1 / x, rounding toward zero.\\n ///\\n /// @dev Requirements:\\n /// - x cannot be zero.\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number for which to calculate the inverse.\\n /// @return result The inverse as a signed 59.18-decimal fixed-point number.\\n function inv(int256 x) internal pure returns (int256 result) {\\n unchecked {\\n // 1e36 is SCALE * SCALE.\\n result = 1e36 / x;\\n }\\n }\\n\\n /// @notice Calculates the natural logarithm of x.\\n ///\\n /// @dev Based on the insight that ln(x) = log2(x) / log2(e).\\n ///\\n /// Requirements:\\n /// - All from \\\"log2\\\".\\n ///\\n /// Caveats:\\n /// - All from \\\"log2\\\".\\n /// - This doesn't return exactly 1 for 2718281828459045235, for that we would need more fine-grained precision.\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number for which to calculate the natural logarithm.\\n /// @return result The natural logarithm as a signed 59.18-decimal fixed-point number.\\n function ln(int256 x) internal pure returns (int256 result) {\\n // Do the fixed-point multiplication inline to save gas. This is overflow-safe because the maximum value that log2(x)\\n // can return is 195205294292027477728.\\n unchecked {\\n result = (log2(x) * SCALE) / LOG2_E;\\n }\\n }\\n\\n /// @notice Calculates the common logarithm of x.\\n ///\\n /// @dev First checks if x is an exact power of ten and it stops if yes. If it's not, calculates the common\\n /// logarithm based on the insight that log10(x) = log2(x) / log2(10).\\n ///\\n /// Requirements:\\n /// - All from \\\"log2\\\".\\n ///\\n /// Caveats:\\n /// - All from \\\"log2\\\".\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number for which to calculate the common logarithm.\\n /// @return result The common logarithm as a signed 59.18-decimal fixed-point number.\\n function log10(int256 x) internal pure returns (int256 result) {\\n if (x <= 0) {\\n revert PRBMathSD59x18__LogInputTooSmall(x);\\n }\\n\\n // Note that the \\\"mul\\\" in this block is the assembly mul operation, not the \\\"mul\\\" function defined in this contract.\\n // prettier-ignore\\n assembly {\\n switch x\\n case 1 { result := mul(SCALE, sub(0, 18)) }\\n case 10 { result := mul(SCALE, sub(1, 18)) }\\n case 100 { result := mul(SCALE, sub(2, 18)) }\\n case 1000 { result := mul(SCALE, sub(3, 18)) }\\n case 10000 { result := mul(SCALE, sub(4, 18)) }\\n case 100000 { result := mul(SCALE, sub(5, 18)) }\\n case 1000000 { result := mul(SCALE, sub(6, 18)) }\\n case 10000000 { result := mul(SCALE, sub(7, 18)) }\\n case 100000000 { result := mul(SCALE, sub(8, 18)) }\\n case 1000000000 { result := mul(SCALE, sub(9, 18)) }\\n case 10000000000 { result := mul(SCALE, sub(10, 18)) }\\n case 100000000000 { result := mul(SCALE, sub(11, 18)) }\\n case 1000000000000 { result := mul(SCALE, sub(12, 18)) }\\n case 10000000000000 { result := mul(SCALE, sub(13, 18)) }\\n case 100000000000000 { result := mul(SCALE, sub(14, 18)) }\\n case 1000000000000000 { result := mul(SCALE, sub(15, 18)) }\\n case 10000000000000000 { result := mul(SCALE, sub(16, 18)) }\\n case 100000000000000000 { result := mul(SCALE, sub(17, 18)) }\\n case 1000000000000000000 { result := 0 }\\n case 10000000000000000000 { result := SCALE }\\n case 100000000000000000000 { result := mul(SCALE, 2) }\\n case 1000000000000000000000 { result := mul(SCALE, 3) }\\n case 10000000000000000000000 { result := mul(SCALE, 4) }\\n case 100000000000000000000000 { result := mul(SCALE, 5) }\\n case 1000000000000000000000000 { result := mul(SCALE, 6) }\\n case 10000000000000000000000000 { result := mul(SCALE, 7) }\\n case 100000000000000000000000000 { result := mul(SCALE, 8) }\\n case 1000000000000000000000000000 { result := mul(SCALE, 9) }\\n case 10000000000000000000000000000 { result := mul(SCALE, 10) }\\n case 100000000000000000000000000000 { result := mul(SCALE, 11) }\\n case 1000000000000000000000000000000 { result := mul(SCALE, 12) }\\n case 10000000000000000000000000000000 { result := mul(SCALE, 13) }\\n case 100000000000000000000000000000000 { result := mul(SCALE, 14) }\\n case 1000000000000000000000000000000000 { result := mul(SCALE, 15) }\\n case 10000000000000000000000000000000000 { result := mul(SCALE, 16) }\\n case 100000000000000000000000000000000000 { result := mul(SCALE, 17) }\\n case 1000000000000000000000000000000000000 { result := mul(SCALE, 18) }\\n case 10000000000000000000000000000000000000 { result := mul(SCALE, 19) }\\n case 100000000000000000000000000000000000000 { result := mul(SCALE, 20) }\\n case 1000000000000000000000000000000000000000 { result := mul(SCALE, 21) }\\n case 10000000000000000000000000000000000000000 { result := mul(SCALE, 22) }\\n case 100000000000000000000000000000000000000000 { result := mul(SCALE, 23) }\\n case 1000000000000000000000000000000000000000000 { result := mul(SCALE, 24) }\\n case 10000000000000000000000000000000000000000000 { result := mul(SCALE, 25) }\\n case 100000000000000000000000000000000000000000000 { result := mul(SCALE, 26) }\\n case 1000000000000000000000000000000000000000000000 { result := mul(SCALE, 27) }\\n case 10000000000000000000000000000000000000000000000 { result := mul(SCALE, 28) }\\n case 100000000000000000000000000000000000000000000000 { result := mul(SCALE, 29) }\\n case 1000000000000000000000000000000000000000000000000 { result := mul(SCALE, 30) }\\n case 10000000000000000000000000000000000000000000000000 { result := mul(SCALE, 31) }\\n case 100000000000000000000000000000000000000000000000000 { result := mul(SCALE, 32) }\\n case 1000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 33) }\\n case 10000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 34) }\\n case 100000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 35) }\\n case 1000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 36) }\\n case 10000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 37) }\\n case 100000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 38) }\\n case 1000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 39) }\\n case 10000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 40) }\\n case 100000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 41) }\\n case 1000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 42) }\\n case 10000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 43) }\\n case 100000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 44) }\\n case 1000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 45) }\\n case 10000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 46) }\\n case 100000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 47) }\\n case 1000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 48) }\\n case 10000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 49) }\\n case 100000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 50) }\\n case 1000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 51) }\\n case 10000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 52) }\\n case 100000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 53) }\\n case 1000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 54) }\\n case 10000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 55) }\\n case 100000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 56) }\\n case 1000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 57) }\\n case 10000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 58) }\\n default {\\n result := MAX_SD59x18\\n }\\n }\\n\\n if (result == MAX_SD59x18) {\\n // Do the fixed-point division inline to save gas. The denominator is log2(10).\\n unchecked {\\n result = (log2(x) * SCALE) / 3_321928094887362347;\\n }\\n }\\n }\\n\\n /// @notice Calculates the binary logarithm of x.\\n ///\\n /// @dev Based on the iterative approximation algorithm.\\n /// https://en.wikipedia.org/wiki/Binary_logarithm#Iterative_approximation\\n ///\\n /// Requirements:\\n /// - x must be greater than zero.\\n ///\\n /// Caveats:\\n /// - The results are not perfectly accurate to the last decimal, due to the lossy precision of the iterative approximation.\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number for which to calculate the binary logarithm.\\n /// @return result The binary logarithm as a signed 59.18-decimal fixed-point number.\\n function log2(int256 x) internal pure returns (int256 result) {\\n if (x <= 0) {\\n revert PRBMathSD59x18__LogInputTooSmall(x);\\n }\\n unchecked {\\n // This works because log2(x) = -log2(1/x).\\n int256 sign;\\n if (x >= SCALE) {\\n sign = 1;\\n } else {\\n sign = -1;\\n // Do the fixed-point inversion inline to save gas. The numerator is SCALE * SCALE.\\n assembly {\\n x := div(1000000000000000000000000000000000000, x)\\n }\\n }\\n\\n // Calculate the integer part of the logarithm and add it to the result and finally calculate y = x * 2^(-n).\\n uint256 n = PRBMath.mostSignificantBit(uint256(x / SCALE));\\n\\n // The integer part of the logarithm as a signed 59.18-decimal fixed-point number. The operation can't overflow\\n // because n is maximum 255, SCALE is 1e18 and sign is either 1 or -1.\\n result = int256(n) * SCALE;\\n\\n // This is y = x * 2^(-n).\\n int256 y = x >> n;\\n\\n // If y = 1, the fractional part is zero.\\n if (y == SCALE) {\\n return result * sign;\\n }\\n\\n // Calculate the fractional part via the iterative approximation.\\n // The \\\"delta >>= 1\\\" part is equivalent to \\\"delta /= 2\\\", but shifting bits is faster.\\n for (int256 delta = int256(HALF_SCALE); delta > 0; delta >>= 1) {\\n y = (y * y) / SCALE;\\n\\n // Is y^2 > 2 and so in the range [2,4)?\\n if (y >= 2 * SCALE) {\\n // Add the 2^(-m) factor to the logarithm.\\n result += delta;\\n\\n // Corresponds to z/2 on Wikipedia.\\n y >>= 1;\\n }\\n }\\n result *= sign;\\n }\\n }\\n\\n /// @notice Multiplies two signed 59.18-decimal fixed-point numbers together, returning a new signed 59.18-decimal\\n /// fixed-point number.\\n ///\\n /// @dev Variant of \\\"mulDiv\\\" that works with signed numbers and employs constant folding, i.e. the denominator is\\n /// always 1e18.\\n ///\\n /// Requirements:\\n /// - All from \\\"PRBMath.mulDivFixedPoint\\\".\\n /// - None of the inputs can be MIN_SD59x18\\n /// - The result must fit within MAX_SD59x18.\\n ///\\n /// Caveats:\\n /// - The body is purposely left uncommented; see the NatSpec comments in \\\"PRBMath.mulDiv\\\" to understand how this works.\\n ///\\n /// @param x The multiplicand as a signed 59.18-decimal fixed-point number.\\n /// @param y The multiplier as a signed 59.18-decimal fixed-point number.\\n /// @return result The product as a signed 59.18-decimal fixed-point number.\\n function mul(int256 x, int256 y) internal pure returns (int256 result) {\\n if (x == MIN_SD59x18 || y == MIN_SD59x18) {\\n revert PRBMathSD59x18__MulInputTooSmall();\\n }\\n\\n unchecked {\\n uint256 ax;\\n uint256 ay;\\n ax = x < 0 ? uint256(-x) : uint256(x);\\n ay = y < 0 ? uint256(-y) : uint256(y);\\n\\n uint256 rAbs = PRBMath.mulDivFixedPoint(ax, ay);\\n if (rAbs > uint256(MAX_SD59x18)) {\\n revert PRBMathSD59x18__MulOverflow(rAbs);\\n }\\n\\n uint256 sx;\\n uint256 sy;\\n assembly {\\n sx := sgt(x, sub(0, 1))\\n sy := sgt(y, sub(0, 1))\\n }\\n result = sx ^ sy == 1 ? -int256(rAbs) : int256(rAbs);\\n }\\n }\\n\\n /// @notice Returns PI as a signed 59.18-decimal fixed-point number.\\n function pi() internal pure returns (int256 result) {\\n result = 3_141592653589793238;\\n }\\n\\n /// @notice Raises x to the power of y.\\n ///\\n /// @dev Based on the insight that x^y = 2^(log2(x) * y).\\n ///\\n /// Requirements:\\n /// - All from \\\"exp2\\\", \\\"log2\\\" and \\\"mul\\\".\\n /// - z cannot be zero.\\n ///\\n /// Caveats:\\n /// - All from \\\"exp2\\\", \\\"log2\\\" and \\\"mul\\\".\\n /// - Assumes 0^0 is 1.\\n ///\\n /// @param x Number to raise to given power y, as a signed 59.18-decimal fixed-point number.\\n /// @param y Exponent to raise x to, as a signed 59.18-decimal fixed-point number.\\n /// @return result x raised to power y, as a signed 59.18-decimal fixed-point number.\\n function pow(int256 x, int256 y) internal pure returns (int256 result) {\\n if (x == 0) {\\n result = y == 0 ? SCALE : int256(0);\\n } else {\\n result = exp2(mul(log2(x), y));\\n }\\n }\\n\\n /// @notice Raises x (signed 59.18-decimal fixed-point number) to the power of y (basic unsigned integer) using the\\n /// famous algorithm \\\"exponentiation by squaring\\\".\\n ///\\n /// @dev See https://en.wikipedia.org/wiki/Exponentiation_by_squaring\\n ///\\n /// Requirements:\\n /// - All from \\\"abs\\\" and \\\"PRBMath.mulDivFixedPoint\\\".\\n /// - The result must fit within MAX_SD59x18.\\n ///\\n /// Caveats:\\n /// - All from \\\"PRBMath.mulDivFixedPoint\\\".\\n /// - Assumes 0^0 is 1.\\n ///\\n /// @param x The base as a signed 59.18-decimal fixed-point number.\\n /// @param y The exponent as an uint256.\\n /// @return result The result as a signed 59.18-decimal fixed-point number.\\n function powu(int256 x, uint256 y) internal pure returns (int256 result) {\\n uint256 xAbs = uint256(abs(x));\\n\\n // Calculate the first iteration of the loop in advance.\\n uint256 rAbs = y & 1 > 0 ? xAbs : uint256(SCALE);\\n\\n // Equivalent to \\\"for(y /= 2; y > 0; y /= 2)\\\" but faster.\\n uint256 yAux = y;\\n for (yAux >>= 1; yAux > 0; yAux >>= 1) {\\n xAbs = PRBMath.mulDivFixedPoint(xAbs, xAbs);\\n\\n // Equivalent to \\\"y % 2 == 1\\\" but faster.\\n if (yAux & 1 > 0) {\\n rAbs = PRBMath.mulDivFixedPoint(rAbs, xAbs);\\n }\\n }\\n\\n // The result must fit within the 59.18-decimal fixed-point representation.\\n if (rAbs > uint256(MAX_SD59x18)) {\\n revert PRBMathSD59x18__PowuOverflow(rAbs);\\n }\\n\\n // Is the base negative and the exponent an odd number?\\n bool isNegative = x < 0 && y & 1 == 1;\\n result = isNegative ? -int256(rAbs) : int256(rAbs);\\n }\\n\\n /// @notice Returns 1 as a signed 59.18-decimal fixed-point number.\\n function scale() internal pure returns (int256 result) {\\n result = SCALE;\\n }\\n\\n /// @notice Calculates the square root of x, rounding down.\\n /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method.\\n ///\\n /// Requirements:\\n /// - x cannot be negative.\\n /// - x must be less than MAX_SD59x18 / SCALE.\\n ///\\n /// @param x The signed 59.18-decimal fixed-point number for which to calculate the square root.\\n /// @return result The result as a signed 59.18-decimal fixed-point .\\n function sqrt(int256 x) internal pure returns (int256 result) {\\n unchecked {\\n if (x < 0) {\\n revert PRBMathSD59x18__SqrtNegativeInput(x);\\n }\\n if (x > MAX_SD59x18 / SCALE) {\\n revert PRBMathSD59x18__SqrtOverflow(x);\\n }\\n // Multiply x by the SCALE to account for the factor of SCALE that is picked up when multiplying two signed\\n // 59.18-decimal fixed-point numbers together (in this case, those two numbers are both the square root).\\n result = int256(PRBMath.sqrt(uint256(x * SCALE)));\\n }\\n }\\n\\n /// @notice Converts a signed 59.18-decimal fixed-point number to basic integer form, rounding down in the process.\\n /// @param x The signed 59.18-decimal fixed-point number to convert.\\n /// @return result The same number in basic integer form.\\n function toInt(int256 x) internal pure returns (int256 result) {\\n unchecked {\\n result = x / SCALE;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1886d687eace717c05b7dcc20e43a088df0e549df86b453c2222961b520308f0\",\"license\":\"Unlicense\"},\"@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.6.0;\\n\\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\\n\\nlibrary TransferHelper {\\n /// @notice Transfers tokens from the targeted address to the given destination\\n /// @notice Errors with 'STF' if transfer fails\\n /// @param token The contract address of the token to be transferred\\n /// @param from The originating address from which the tokens will be transferred\\n /// @param to The destination address of the transfer\\n /// @param value The amount to be transferred\\n function safeTransferFrom(\\n address token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n (bool success, bytes memory data) =\\n token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');\\n }\\n\\n /// @notice Transfers tokens from msg.sender to a recipient\\n /// @dev Errors with ST if transfer fails\\n /// @param token The contract address of the token which will be transferred\\n /// @param to The recipient of the transfer\\n /// @param value The value of the transfer\\n function safeTransfer(\\n address token,\\n address to,\\n uint256 value\\n ) internal {\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');\\n }\\n\\n /// @notice Approves the stipulated contract to spend the given allowance in the given token\\n /// @dev Errors with 'SA' if transfer fails\\n /// @param token The contract address of the token to be approved\\n /// @param to The target of the approval\\n /// @param value The amount of the given token the target will be allowed to spend\\n function safeApprove(\\n address token,\\n address to,\\n uint256 value\\n ) internal {\\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));\\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');\\n }\\n\\n /// @notice Transfers ETH to the recipient address\\n /// @dev Fails with `STE`\\n /// @param to The destination of the transfer\\n /// @param value The value to be transferred\\n function safeTransferETH(address to, uint256 value) internal {\\n (bool success, ) = to.call{value: value}(new bytes(0));\\n require(success, 'STE');\\n }\\n}\\n\",\"keccak256\":\"0x9af98b0908c96320ca6d08b22f0efca864742f6adbe5794cafe2d1d2e808b0cd\",\"license\":\"GPL-2.0-or-later\"},\"contracts/periphery/contracts/access-control/SuAccessRoles.sol\":{\"content\":\"// SPDX-License-Identifier: BSL 1.1\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title SuAccessRoles Library\\n * @dev SuAuthenticated and SuAccessControlSingleton need to have this constants\\n * Hierarchy:\\n * 1. DAO - can give admins and system roles\\n * 2.1. Admin - can set Alerters\\n * 2.2. System - includes Minter, Vault, Liquidation and Reward roles, don't have access to give some roles.\\n * 3. Alerter - can send alerts and trigger rate limits, don't have access to give some roles.\\n */\\nabstract contract SuAccessRoles {\\n bytes32 public constant ADMIN_ROLE = 0x00;\\n\\n bytes32 public constant DAO_ROLE = keccak256(\\\"DAO_ROLE\\\");\\n\\n bytes32 public constant ALERTER_ROLE = keccak256(\\\"ALERTER_ROLE\\\");\\n\\n // system roles\\n bytes32 public constant MINT_ACCESS_ROLE = keccak256(\\\"MINT_ACCESS_ROLE\\\");\\n bytes32 public constant VAULT_ACCESS_ROLE = keccak256(\\\"VAULT_ACCESS_ROLE\\\");\\n bytes32 public constant LIQUIDATION_ACCESS_ROLE = keccak256(\\\"LIQUIDATION_ACCESS_ROLE\\\");\\n bytes32 public constant REWARD_ACCESS_ROLE = keccak256(\\\"REWARD_ACCESS_ROLE\\\");\\n}\\n\",\"keccak256\":\"0x024209469b6b337eef6cf520501d1e6c2ba66a79f014c25220a35e407d69b02e\",\"license\":\"BSL 1.1\"},\"contracts/periphery/contracts/access-control/SuAuthenticated.sol\":{\"content\":\"// SPDX-License-Identifier: BSL 1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../interfaces/access-control/ISuAccessControl.sol\\\";\\nimport \\\"./SuAccessRoles.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @title SuAuthenticated\\n * @dev other contracts should inherit to be authenticated.\\n * The address of SuAccessControlSingleton should be one for all contract that inherits SuAuthenticated\\n */\\nabstract contract SuAuthenticated is Initializable, SuAccessRoles, IERC165Upgradeable {\\n ISuAccessControl public ACCESS_CONTROL_SINGLETON;\\n\\n error OnlyDAOError();\\n error OnlyAdminError();\\n error OnlyAlerterError();\\n error OnlyVaultAccessError();\\n error OnlyLiquidationAccessError();\\n error OnlyMintAccessError();\\n error OnlyRewardAccessError();\\n error OnlyRoleError();\\n error BadAccessControlSingleton();\\n\\n /**\\n * @dev should be passed in constructor\\n */\\n function __suAuthenticatedInit(address _accessControlSingleton) internal onlyInitializing {\\n ACCESS_CONTROL_SINGLETON = ISuAccessControl(_accessControlSingleton);\\n if (\\n !ISuAccessControl(_accessControlSingleton).supportsInterface(type(IAccessControlUpgradeable).interfaceId)\\n ) revert BadAccessControlSingleton();\\n }\\n\\n /** CORE ROLES */\\n\\n modifier onlyDAO() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(DAO_ROLE, msg.sender)) revert OnlyDAOError();\\n _;\\n }\\n\\n modifier onlyAdmin() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(ADMIN_ROLE, msg.sender)) revert OnlyAdminError();\\n _;\\n }\\n\\n modifier onlyAlerter() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(ALERTER_ROLE, msg.sender)) revert OnlyAlerterError();\\n _;\\n }\\n\\n /** SYSTEM ROLES */\\n\\n modifier onlyVaultAccess() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(VAULT_ACCESS_ROLE, msg.sender)) revert OnlyVaultAccessError();\\n _;\\n }\\n\\n modifier onlyLiquidationAccess() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(LIQUIDATION_ACCESS_ROLE, msg.sender)) revert OnlyLiquidationAccessError();\\n _;\\n }\\n\\n modifier onlyMintAccess() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(MINT_ACCESS_ROLE, msg.sender)) revert OnlyMintAccessError();\\n _;\\n }\\n\\n modifier onlyRewardAccess() {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(REWARD_ACCESS_ROLE, msg.sender)) revert OnlyRewardAccessError();\\n _;\\n }\\n\\n // syntax sugar under ACCESS_CONTROL_SINGLETON\\n modifier onlyRole(bytes32 role) {\\n if (!ACCESS_CONTROL_SINGLETON.hasRole(role, msg.sender)) revert OnlyRoleError();\\n _;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return ACCESS_CONTROL_SINGLETON.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x3553007ac782c0c5f2ecf3ca47b8b72d74b2cae35c34ffe2d030b968938b2b0d\",\"license\":\"BSL 1.1\"},\"contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol\":{\"content\":\"// SPDX-License-Identifier: BSL 1.1\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport \\\"@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol\\\";\\nimport \\\"@prb/math/contracts/PRBMathSD59x18.sol\\\";\\n\\n// if import \\\"@balancer-labs/v2-interfaces/contracts/vault/IVault.sol\\\" then we have a problem of\\n// re-declaration of IERC20, because balancer implement their own IERC20 (don't know why)\\nimport \\\"../vendor/balancer/IVault.sol\\\";\\nimport \\\"../vendor/balancer/WeightedPoolUserData.sol\\\";\\nimport \\\"../access-control/SuAuthenticated.sol\\\";\\nimport \\\"../interfaces/adapters/ILPAdapter.sol\\\";\\nimport \\\"../interfaces/adapters/IWeightedPool.sol\\\";\\n\\n/**\\n * @dev\\n * Default - It's pool that is not Composable, just StablePool, like AURA_LP\\n * WeightedPool2Tokens - It's Balancer WeightedPool2Tokens LP token, like B_80BAL_20WETH_LP\\n*/\\nenum WeightedPoolType { Default, WeightedPool2Tokens }\\n\\nstruct LPInfoAdapter {\\n WeightedPoolType poolType;\\n bytes32 poolId;\\n IVault vault;\\n IERC20[] underlyingTokens;\\n IERC20[] underlyingTokensExpanded;\\n}\\n\\n/**\\n * @title BalancerAdapterWeighted\\n * @notice Adapter for Balancer Weighted LP token.\\n * @dev See ILPAdapter interface for full details.\\n */\\ncontract BalancerAdapterWeighted is SuAuthenticated, ILPAdapter {\\n using PRBMathSD59x18 for *;\\n\\n mapping(address => LPInfoAdapter) public lps; // Mapping from LP token to pool\\n ISuOracle public ORACLE;\\n using WeightedPoolUserData for bytes;\\n\\n function initialize(address _authControl, address _oracle) public initializer {\\n __suAuthenticatedInit(_authControl);\\n ORACLE = ISuOracle(_oracle);\\n }\\n\\n /**\\n * @notice Register the given LP token address and set the LP info. We go to the depth = 2, that means, that if\\n * LP token {lp} contains {lp1} and {erc20Token1} as underlying tokens,\\n * where lp1 contains {erc20Token0} and {erc20Token2},\\n * then we will register that {lp} has {erc20Token0}, {erc20Token2} and {erc20Token1} as underlying tokens.\\n * @param lp LP token to find and set the corresponding info.\\n **/\\n function registerLP(address lp, WeightedPoolType poolType) external onlyAdmin {\\n IVault vault = IWeightedPool(lp).getVault();\\n if (address(vault) == address(0)) revert IsNotLP(lp);\\n if (address(lps[lp].vault) != address(0)) revert AlreadyRegistered(lp);\\n\\n bytes32 poolId = IWeightedPool(lp).getPoolId();\\n\\n lps[lp].poolId = poolId;\\n lps[lp].vault = vault;\\n lps[lp].poolType = poolType;\\n\\n (lps[lp].underlyingTokens,,) = vault.getPoolTokens(poolId);\\n\\n uint256 nTokens = lps[lp].underlyingTokens.length;\\n for (uint16 i = 0; i < nTokens; ++i) {\\n IERC20 currentToken = lps[lp].underlyingTokens[i];\\n if (isAdapterLP(address(currentToken))) {\\n IERC20[] memory newUnderlyingTokens;\\n LPInfoAdapter memory underlyingLPTokenInfo = lps[address(currentToken)];\\n (newUnderlyingTokens,,) = underlyingLPTokenInfo.vault.getPoolTokens(\\n underlyingLPTokenInfo.poolId\\n );\\n for (uint16 j = 0; j < newUnderlyingTokens.length; ++j) {\\n lps[lp].underlyingTokensExpanded.push(newUnderlyingTokens[j]);\\n }\\n } else {\\n lps[lp].underlyingTokensExpanded.push(currentToken);\\n }\\n }\\n }\\n\\n function isAdapterLP(address asset) public view returns (bool) {\\n return address(lps[asset].vault) != address(0);\\n }\\n\\n // solhint-disable-next-line max-line-length\\n // Description - https://revestfinance.medium.com/dev-blog-on-the-derivation-of-a-safe-price-formula-for-balancer-pool-tokens-33e8993455d0\\n function _getFiatPriceWeightedComplex(address asset) internal view returns (uint256) {\\n LPInfoAdapter memory lpInfo = lps[asset];\\n\\n (IERC20[] memory tokens, uint256[] memory balances, ) = lpInfo.vault.getPoolTokens(lpInfo.poolId);\\n uint256[] memory weights = IWeightedPool(asset).getNormalizedWeights();\\n\\n int256 totalPi = PRBMathSD59x18.fromInt(1e18);\\n uint256[] memory prices = new uint256[](tokens.length);\\n\\n for (uint256 i = 0; i < tokens.length; i++) {\\n address underlyingTokenAddress = address(lpInfo.underlyingTokens[i]);\\n uint256 decimals = IERC20Metadata(underlyingTokenAddress).decimals();\\n balances[i] = (balances[i] * 1e18) / (10**decimals);\\n prices[i] = ORACLE.getFiatPrice1e18(underlyingTokenAddress) / (10**(18 - decimals));\\n\\n int256 val = int256(prices[i]).div(int256(weights[i]));\\n int256 indivPi = val.pow(int256(weights[i]));\\n\\n totalPi = totalPi.mul(indivPi);\\n }\\n\\n int256 invariant = int256(IWeightedPool(asset).getLastInvariant());\\n int256 numerator = totalPi.mul(invariant);\\n int256 totalSupply = int256(IWeightedPool(asset).totalSupply());\\n\\n return uint256(numerator.toInt().div(totalSupply));\\n }\\n\\n function getFiatPrice1e18(address asset) external view returns (uint256) {\\n if (!isAdapterLP(asset)) revert IsNotLP(asset);\\n LPInfoAdapter memory lpInfo = lps[asset];\\n\\n // getTimeWeightedAverage is deprecated, so for any weighted LP token we should use this approximation\\n return _getFiatPriceWeightedComplex(asset);\\n }\\n /// @notice Deprecated - Simple version of oracle that can be attacked with flash-loan, only for tests\\n function getFiatPrice1e18Unsafe(address asset) external view returns (uint256) {\\n if (!isAdapterLP(asset)) revert IsNotLP(asset);\\n LPInfoAdapter memory lpInfo = lps[asset];\\n\\n uint256 sumBalances = 0;\\n uint256 nTokens = lpInfo.underlyingTokens.length;\\n (,uint256[] memory newUnderlyingTokenBalances,) = lpInfo.vault.getPoolTokens(lpInfo.poolId);\\n for (uint256 i = 0; i < nTokens; ++i) {\\n address underlyingTokenAddress = address(lpInfo.underlyingTokens[i]);\\n if (underlyingTokenAddress != asset) {\\n sumBalances += newUnderlyingTokenBalances[i] * ORACLE.getFiatPrice1e18(underlyingTokenAddress);\\n }\\n }\\n\\n return sumBalances / IERC20(asset).totalSupply();\\n }\\n\\n function _withdrawInternal(address asset, uint256 amount) internal returns (WithdrawResult[] memory results) {\\n LPInfoAdapter memory lpInfo = lps[asset];\\n uint256 nTokens = lpInfo.underlyingTokens.length;\\n address vaultAddress = address(lpInfo.vault);\\n if (asset != vaultAddress && IERC20(asset).allowance(address(this), vaultAddress) < amount) {\\n IERC20(asset).approve(vaultAddress, amount);\\n }\\n\\n uint256[] memory balancesBefore = new uint256[](nTokens);\\n for (uint16 i = 0; i < nTokens; ++i) {\\n balancesBefore[i] = lpInfo.underlyingTokens[i].balanceOf(address(this));\\n }\\n\\n IAsset[] memory assets = new IAsset[](nTokens);\\n uint256[] memory minAmountsOut = new uint[](nTokens);\\n for (uint16 i = 0; i < nTokens; ++i) {\\n assets[i] = IAsset(address(lpInfo.underlyingTokens[i]));\\n minAmountsOut[i] = 0;\\n }\\n lpInfo.vault.exitPool(\\n lpInfo.poolId,\\n payable(address(this)),\\n payable(address(this)),\\n IVault.ExitPoolRequest({\\n assets: assets,\\n minAmountsOut: minAmountsOut,\\n userData: abi.encode(WeightedPoolUserData.ExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, amount),\\n toInternalBalance: false\\n })\\n );\\n\\n // For some LPs vault returns the first address in underlyingTokens as the LP token address\\n if (address(lpInfo.underlyingTokens[0]) == asset) {\\n results = new WithdrawResult[](nTokens - 1);\\n for (uint16 i = 1; i < nTokens; ++i) {\\n uint256 underlineTokenAmount = lpInfo.underlyingTokens[i].balanceOf(address(this)) - balancesBefore[i];\\n results[i - 1] = WithdrawResult({\\n token: address(lpInfo.underlyingTokens[i]),\\n amount: underlineTokenAmount\\n });\\n }\\n } else {\\n results = new WithdrawResult[](nTokens);\\n for (uint16 i = 0; i < nTokens; ++i) {\\n uint256 underlineTokenAmount = lpInfo.underlyingTokens[i].balanceOf(address(this)) - balancesBefore[i];\\n results[i] = WithdrawResult({\\n token: address(lpInfo.underlyingTokens[i]),\\n amount: underlineTokenAmount\\n });\\n }\\n }\\n }\\n\\n function withdraw(address asset, uint256 amount) external returns (WithdrawResult[] memory results) {\\n if (!isAdapterLP(asset)) revert IsNotLP(asset);\\n TransferHelper.safeTransferFrom(asset, msg.sender, address(this), amount);\\n\\n uint256 nTokensExpanded = lps[asset].underlyingTokensExpanded.length;\\n WithdrawResult[] memory resultsExt = new WithdrawResult[](nTokensExpanded);\\n uint256 resultsIndex = 0;\\n WithdrawResult[] memory firstWithdrawResult = _withdrawInternal(asset, amount);\\n uint256 nTokens = firstWithdrawResult.length;\\n for (uint16 i = 0; i < nTokens; ++i) {\\n if (isAdapterLP(firstWithdrawResult[i].token)) {\\n WithdrawResult[] memory secondWithdrawResult = _withdrawInternal(\\n firstWithdrawResult[i].token,\\n firstWithdrawResult[i].amount\\n );\\n for (uint16 j = 0; j < nTokens; ++j) {\\n resultsExt[resultsIndex] = secondWithdrawResult[j];\\n ++resultsIndex;\\n }\\n } else {\\n resultsExt[resultsIndex] = firstWithdrawResult[i];\\n ++resultsIndex;\\n }\\n }\\n\\n results = new WithdrawResult[](resultsIndex);\\n resultsIndex = 0;\\n for (uint16 i = 0; i < nTokensExpanded; ++i) {\\n address underlyingToken = resultsExt[i].token;\\n if (underlyingToken != address(0)) {\\n TransferHelper.safeTransfer(underlyingToken, msg.sender, resultsExt[i].amount);\\n results[resultsIndex] = resultsExt[i];\\n ++resultsIndex;\\n }\\n }\\n }\\n\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x6d9a643c2f48c948fb6c5e63348938dcd62ccd67098f6a9ed77629fc6e607f24\",\"license\":\"BSL 1.1\"},\"contracts/periphery/contracts/interfaces/access-control/ISuAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol\\\";\\nimport \\\"../../access-control/SuAccessRoles.sol\\\";\\n\\n/**\\n * @notice Access control for contracts\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n **/\\ninterface ISuAccessControl is IAccessControlUpgradeable, IERC165Upgradeable {\\n function setRoleAdmin(bytes32 role, bytes32 adminRole) external;\\n}\\n\",\"keccak256\":\"0x25724ac502fd6418ccd38273b276de4b2fdecd023d723c5d80c9f0a27c407bcd\",\"license\":\"MIT\"},\"contracts/periphery/contracts/interfaces/adapters/IBasePoolExtended.sol\":{\"content\":\"// SPDX-License-Identifier: BSL 1.1\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\nimport \\\"../../vendor/balancer/IVault.sol\\\";\\n\\n// We use that because BasePool use solidity 0.7.0 and we don't need whole implementation, only interface\\n// We also don't import \\\"@balancer-labs/v2-interfaces/contracts/vault/IBasePool.sol\\\"\\n// because it's a problem with their copy of IERC20.\\ninterface IBasePoolExtended is IERC20 {\\n /**\\n * @dev Returns this Pool's ID, used when interacting with the Vault (to e.g. join the Pool or swap with it).\\n */\\n function getPoolId() external view returns (bytes32);\\n\\n /**\\n * @notice Returns the Balancer Vault\\n */\\n function getVault() external view returns (IVault);\\n}\",\"keccak256\":\"0x3ebb845be255a79c5eceaaf033de7a07bd4525355c00d912f49dec14bcde4ce4\",\"license\":\"BSL 1.1\"},\"contracts/periphery/contracts/interfaces/adapters/ILPAdapter.sol\":{\"content\":\"// SPDX-License-Identifier: BSL 1.1\\npragma solidity ^0.8.0;\\n\\nimport \\\"../oracle/ISuOracle.sol\\\";\\n\\nstruct WithdrawResult {\\n address token;\\n uint256 amount;\\n}\\n\\ninterface ILPAdapter is ISuOracle {\\n /* ======================== ERRORS ======================== */\\n error IsNotLP(address asset);\\n error AlreadyRegistered(address asset);\\n error LPOracleNotReady();\\n\\n /* ==================== MUTABLE METHODS ==================== */\\n /**\\n * @notice Unwrap LP token with depth = 2 (if underlying token is LP => it's also unwrapping)\\n * @param asset - address of LP token to withdraw/unwrap\\n * @param amount - amount of asset to withdraw/unwrap\\n **/\\n function withdraw(address asset, uint256 amount) external returns (WithdrawResult[] memory);\\n\\n /* ====================== VIEW METHODS ==================== */\\n /**\\n * @notice Returns if asset ig Balancer LP token, registered in our adapter\\n * @param asset - address of LP token to check\\n **/\\n function isAdapterLP(address asset) external returns (bool);\\n}\",\"keccak256\":\"0x4a1b94f8bdc9063002386f854608c9b600ad2a7d45703ad05deb7536c006a855\",\"license\":\"BSL 1.1\"},\"contracts/periphery/contracts/interfaces/adapters/IWeightedPool.sol\":{\"content\":\"// SPDX-License-Identifier: BSL 1.1\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IBasePoolExtended.sol\\\";\\n\\n/**\\n * @notice Interface for weighted pool that have 2 methods we need in flash-loan-safe Oracle\\n */\\ninterface IWeightedPool is IBasePoolExtended {\\n /**\\n * @notice Returns all normalized weights, in the same order as the Pool's tokens.\\n */\\n function getNormalizedWeights() external view returns (uint256[] memory);\\n\\n /**\\n * @notice Is for weighted pool\\n */\\n function getLastInvariant() external view returns (uint256);\\n}\",\"keccak256\":\"0xb53d387f800829f19ad51f45f637b30cb8de03cc867a951f47a735446db04b4e\",\"license\":\"BSL 1.1\"},\"contracts/periphery/contracts/interfaces/oracle/ISuOracle.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\n// solhint-disable compiler-version\\npragma solidity >=0.7.6;\\n\\ninterface ISuOracle {\\n /**\\n * @notice WARNING! Read this description very carefully!\\n * function getFiatPrice1e18(address asset) returns (uint256) that:\\n * basicAmountOfAsset * getFiatPrice1e18(asset) / 1e18 === $$ * 1e18\\n * in other words, it doesn't matter what's the erc20.decimals is,\\n * you just multiply token balance in basic units on value from oracle and get dollar amount multiplied on 1e18.\\n *\\n * different assets have different deviation threshold (errors)\\n * for wBTC it's <= 0.5%, read more https://data.chain.link/ethereum/mainnet/crypto-usd/btc-usd\\n * for other asset is can be larger based on particular oracle implementation.\\n *\\n * examples:\\n * market price of btc = $30k,\\n * for 0.1 wBTC the unit256 amount is 0.1 * 1e18\\n * 0.1 * 1e18 * (price1e18 / 1e18) == $3000 == uint256(3000*1e18)\\n * => price1e18 = 30000 * 1e18;\\n *\\n * market price of usdt = $0.97,\\n * for 1 usdt uint256 = 1 * 1e6\\n * so 1*1e6 * price1e18 / 1e18 == $0.97 == uint256(0.97*1e18)\\n * => 1*1e6 * (price1e18 / 1e18) / (0.97*1e18) = 1\\n * => price1e18 = 0.97 * (1e18/1e6) * 1e18\\n *\\n * assume market price of wBTC = $31,503.77, oracle error = $158\\n *\\n * case #1: small amount of wBTC\\n * we have 0.0,000,001 wBTC that is worth v = $0.00315 \\u00b1 $0.00001 = 0.00315*1e18 = 315*1e13 \\u00b1 1*1e13\\n * actual balance on the asset b = wBTC.balanceOf() = 0.0000001*1e18 = 1e11\\n * oracle should return or = oracle.getFiatPrice1e18(wBTC) <=>\\n * <=> b*or = v => v/b = 315*1e13 / 1e11 = 315*1e2 \\u00b1 1e2\\n * error = or.error * b = 1e2 * 1e11 = 1e13 => 1e13/1e18 usd = 1e-5 = 0.00001 usd\\n *\\n * case #2: large amount of wBTC\\n * v = 2,000,000 wBTC = $31,503.77 * 2m \\u00b1 158*2m = $63,007,540,000 \\u00b1 $316,000,000 = 63,007*1e24 \\u00b1 316*1e24\\n * for calc convenience we increase error on 0.05 and have v = 63,000*24 \\u00b1 300*1e24 = (630 \\u00b1 3)*1e26\\n * b = 2*1e6 * 1e18 = 2*1e24\\n * or = v/b = (630 \\u00b1 3)*1e26 / 2*1e24 = 315*1e2 \\u00b1 1.5*1e2\\n * error = or.error * b = 1.5*100 * 2*1e24 = 3*1e26 = 3*1e8*1e18 = $300,000,000 ~ $316,000,000\\n *\\n * assume the market price of USDT = $0.97 \\u00b1 $0.00485,\\n *\\n * case #3: little amount of USDT\\n * v = USDT amount 0.005 = 0.005*(0.97 \\u00b1 0.00485) = 0.00485*1e18 \\u00b1 0.00002425*1e18 = 485*1e13 \\u00b1 3*1e13\\n * we rounded error up on (3000-2425)/2425 ~= +24% for calculation convenience.\\n * b = USDT.balanceOf() = 0.005*1e6 = 5*1e3\\n * b*or = v => or = v/b = (485*1e13 \\u00b1 3*1e13) / 5*1e3 = 970*1e9 \\u00b1 6*1e9\\n * error = 6*1e9 * 5*1e3 / 1e18 = 30*1e12/1e18 = 3*1e-5 = $0,00005\\n *\\n * case #4: lot of USDT\\n * v = we have 100,000,000,000 USDT = $97B = 97*1e9*1e18 \\u00b1 0.5*1e9*1e18\\n * b = USDT.balanceOf() = 1e11*1e6 = 1e17\\n * or = v/b = (97*1e9*1e18 \\u00b1 0.5*1e9*1e18) / 1e17 = 970*1e9 \\u00b1 5*1e9\\n * error = 5*1e9 * 1e17 = 5*1e26 = 0.5 * 1e8*1e18\\n *\\n * @param asset - address of erc20 token contract\\n * @return usdPrice1e18 such that asset.balanceOf() * getFiatPrice1e18(asset) / 1e18 == $$ * 1e18\\n **/\\n function getFiatPrice1e18(address asset) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa56b9cc86ef5935efecc276e6a3188d518f1a99cad960083a8de35849c997687\",\"license\":\"UNLICENSED\"},\"contracts/periphery/contracts/vendor/balancer/IAsset.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\n/**\\n * @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero\\n * address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like\\n * types.\\n *\\n * This concept is unrelated to a Pool's Asset Managers.\\n */\\ninterface IAsset {\\n // solhint-disable-previous-line no-empty-blocks\\n}\",\"keccak256\":\"0x03a924155a451b978afb5b571f4a04637ec381a116da825567dd5c92312a678f\",\"license\":\"GPL-3.0-or-later\"},\"contracts/periphery/contracts/vendor/balancer/IAuthorizer.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\ninterface IAuthorizer {\\n /**\\n * @dev Returns true if `account` can perform the action described by `actionId` in the contract `where`.\\n */\\n function canPerform(\\n bytes32 actionId,\\n address account,\\n address where\\n ) external view returns (bool);\\n}\",\"keccak256\":\"0xde5c6175a4af46cf69ecf42373482758e3e54c472fdf8e525ce3e8d6c9266d3e\",\"license\":\"GPL-3.0-or-later\"},\"contracts/periphery/contracts/vendor/balancer/IFlashLoanRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\n// Inspired by Aave Protocol's IFlashLoanReceiver.\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IFlashLoanRecipient {\\n /**\\n * @dev When `flashLoan` is called on the Vault, it invokes the `receiveFlashLoan` hook on the recipient.\\n *\\n * At the time of the call, the Vault will have transferred `amounts` for `tokens` to the recipient. Before this\\n * call returns, the recipient must have transferred `amounts` plus `feeAmounts` for each token back to the\\n * Vault, or else the entire flash loan will revert.\\n *\\n * `userData` is the same value passed in the `IVault.flashLoan` call.\\n */\\n function receiveFlashLoan(\\n IERC20[] memory tokens,\\n uint256[] memory amounts,\\n uint256[] memory feeAmounts,\\n bytes memory userData\\n ) external;\\n}\",\"keccak256\":\"0xe04da57b5405d556708c19a240e2c5795ee41f6d21424ca72c6c750ef3ce96e5\",\"license\":\"GPL-3.0-or-later\"},\"contracts/periphery/contracts/vendor/balancer/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"./IWETH.sol\\\";\\nimport \\\"./IAsset.sol\\\";\\nimport \\\"./IAuthorizer.sol\\\";\\nimport \\\"./IFlashLoanRecipient.sol\\\";\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Full external interface for the Vault core contract - no external or public methods exist in the contract that\\n * don't override one of these declarations.\\n */\\ninterface IVault {\\n // Generalities about the Vault:\\n //\\n // - Whenever documentation refers to 'tokens', it strictly refers to ERC20-compliant token contracts. Tokens are\\n // transferred out of the Vault by calling the `IERC20.transfer` function, and transferred in by calling\\n // `IERC20.transferFrom`. In these cases, the sender must have previously allowed the Vault to use their tokens by\\n // calling `IERC20.approve`. The only deviation from the ERC20 standard that is supported is functions not returning\\n // a boolean value: in these scenarios, a non-reverting call is assumed to be successful.\\n //\\n // - All non-view functions in the Vault are non-reentrant: calling them while another one is mid-execution (e.g.\\n // while execution control is transferred to a token contract during a swap) will result in a revert. View\\n // functions can be called in a re-reentrant way, but doing so might cause them to return inconsistent results.\\n // Contracts calling view functions in the Vault must make sure the Vault has not already been entered.\\n //\\n // - View functions revert if referring to either unregistered Pools, or unregistered tokens for registered Pools.\\n\\n // Authorizer\\n //\\n // Some system actions are permissioned, like setting and collecting protocol fees. This permissioning system exists\\n // outside of the Vault in the Authorizer contract: the Vault simply calls the Authorizer to check if the caller\\n // can perform a given action.\\n\\n /**\\n * @dev Returns the Vault's Authorizer.\\n */\\n function getAuthorizer() external view returns (IAuthorizer);\\n\\n /**\\n * @dev Sets a new Authorizer for the Vault. The caller must be allowed by the current Authorizer to do this.\\n *\\n * Emits an `AuthorizerChanged` event.\\n */\\n function setAuthorizer(IAuthorizer newAuthorizer) external;\\n\\n /**\\n * @dev Emitted when a new authorizer is set by `setAuthorizer`.\\n */\\n event AuthorizerChanged(IAuthorizer indexed newAuthorizer);\\n\\n // Relayers\\n //\\n // Additionally, it is possible for an account to perform certain actions on behalf of another one, using their\\n // Vault ERC20 allowance and Internal Balance. These accounts are said to be 'relayers' for these Vault functions,\\n // and are expected to be smart contracts with sound authentication mechanisms. For an account to be able to wield\\n // this power, two things must occur:\\n // - The Authorizer must grant the account the permission to be a relayer for the relevant Vault function. This\\n // means that Balancer governance must approve each individual contract to act as a relayer for the intended\\n // functions.\\n // - Each user must approve the relayer to act on their behalf.\\n // This double protection means users cannot be tricked into approving malicious relayers (because they will not\\n // have been allowed by the Authorizer via governance), nor can malicious relayers approved by a compromised\\n // Authorizer or governance drain user funds, since they would also need to be approved by each individual user.\\n\\n /**\\n * @dev Returns true if `user` has approved `relayer` to act as a relayer for them.\\n */\\n function hasApprovedRelayer(address user, address relayer) external view returns (bool);\\n\\n /**\\n * @dev Allows `relayer` to act as a relayer for `sender` if `approved` is true, and disallows it otherwise.\\n *\\n * Emits a `RelayerApprovalChanged` event.\\n */\\n function setRelayerApproval(\\n address sender,\\n address relayer,\\n bool approved\\n ) external;\\n\\n /**\\n * @dev Emitted every time a relayer is approved or disapproved by `setRelayerApproval`.\\n */\\n event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);\\n\\n // Internal Balance\\n //\\n // Users can deposit tokens into the Vault, where they are allocated to their Internal Balance, and later\\n // transferred or withdrawn. It can also be used as a source of tokens when joining Pools, as a destination\\n // when exiting them, and as either when performing swaps. This usage of Internal Balance results in greatly reduced\\n // gas costs when compared to relying on plain ERC20 transfers, leading to large savings for frequent users.\\n //\\n // Internal Balance management features batching, which means a single contract call can be used to perform multiple\\n // operations of different kinds, with different senders and recipients, at once.\\n\\n /**\\n * @dev Returns `user`'s Internal Balance for a set of tokens.\\n */\\n function getInternalBalance(address user, IERC20[] memory tokens) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Performs a set of user balance operations, which involve Internal Balance (deposit, withdraw or transfer)\\n * and plain ERC20 transfers using the Vault's allowance. This last feature is particularly useful for relayers, as\\n * it lets integrators reuse a user's Vault allowance.\\n *\\n * For each operation, if the caller is not `sender`, it must be an authorized relayer for them.\\n */\\n function manageUserBalance(UserBalanceOp[] memory ops) external payable;\\n\\n /**\\n * @dev Data for `manageUserBalance` operations, which include the possibility for ETH to be sent and received\\n without manual WETH wrapping or unwrapping.\\n */\\n struct UserBalanceOp {\\n UserBalanceOpKind kind;\\n IAsset asset;\\n uint256 amount;\\n address sender;\\n address payable recipient;\\n }\\n\\n // There are four possible operations in `manageUserBalance`:\\n //\\n // - DEPOSIT_INTERNAL\\n // Increases the Internal Balance of the `recipient` account by transferring tokens from the corresponding\\n // `sender`. The sender must have allowed the Vault to use their tokens via `IERC20.approve()`.\\n //\\n // ETH can be used by passing the ETH sentinel value as the asset and forwarding ETH in the call: it will be wrapped\\n // and deposited as WETH. Any ETH amount remaining will be sent back to the caller (not the sender, which is\\n // relevant for relayers).\\n //\\n // Emits an `InternalBalanceChanged` event.\\n //\\n //\\n // - WITHDRAW_INTERNAL\\n // Decreases the Internal Balance of the `sender` account by transferring tokens to the `recipient`.\\n //\\n // ETH can be used by passing the ETH sentinel value as the asset. This will deduct WETH instead, unwrap it and send\\n // it to the recipient as ETH.\\n //\\n // Emits an `InternalBalanceChanged` event.\\n //\\n //\\n // - TRANSFER_INTERNAL\\n // Transfers tokens from the Internal Balance of the `sender` account to the Internal Balance of `recipient`.\\n //\\n // Reverts if the ETH sentinel value is passed.\\n //\\n // Emits an `InternalBalanceChanged` event.\\n //\\n //\\n // - TRANSFER_EXTERNAL\\n // Transfers tokens from `sender` to `recipient`, using the Vault's ERC20 allowance. This is typically used by\\n // relayers, as it lets them reuse a user's Vault allowance.\\n //\\n // Reverts if the ETH sentinel value is passed.\\n //\\n // Emits an `ExternalBalanceTransfer` event.\\n\\n enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }\\n\\n /**\\n * @dev Emitted when a user's Internal Balance changes, either from calls to `manageUserBalance`, or through\\n * interacting with Pools using Internal Balance.\\n *\\n * Because Internal Balance works exclusively with ERC20 tokens, ETH deposits and withdrawals will use the WETH\\n * address.\\n */\\n event InternalBalanceChanged(address indexed user, IERC20 indexed token, int256 delta);\\n\\n /**\\n * @dev Emitted when a user's Vault ERC20 allowance is used by the Vault to transfer tokens to an external account.\\n */\\n event ExternalBalanceTransfer(IERC20 indexed token, address indexed sender, address recipient, uint256 amount);\\n\\n // Pools\\n //\\n // There are three specialization settings for Pools, which allow for cheaper swaps at the cost of reduced\\n // functionality:\\n //\\n // - General: no specialization, suited for all Pools. IGeneralPool is used for swap request callbacks, passing the\\n // balance of all tokens in the Pool. These Pools have the largest swap costs (because of the extra storage reads),\\n // which increase with the number of registered tokens.\\n //\\n // - Minimal Swap Info: IMinimalSwapInfoPool is used instead of IGeneralPool, which saves gas by only passing the\\n // balance of the two tokens involved in the swap. This is suitable for some pricing algorithms, like the weighted\\n // constant product one popularized by Balancer V1. Swap costs are smaller compared to general Pools, and are\\n // independent of the number of registered tokens.\\n //\\n // - Two Token: only allows two tokens to be registered. This achieves the lowest possible swap gas cost. Like\\n // minimal swap info Pools, these are called via IMinimalSwapInfoPool.\\n\\n enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }\\n\\n /**\\n * @dev Registers the caller account as a Pool with a given specialization setting. Returns the Pool's ID, which\\n * is used in all Pool-related functions. Pools cannot be deregistered, nor can the Pool's specialization be\\n * changed.\\n *\\n * The caller is expected to be a smart contract that implements either `IGeneralPool` or `IMinimalSwapInfoPool`,\\n * depending on the chosen specialization setting. This contract is known as the Pool's contract.\\n *\\n * Note that the same contract may register itself as multiple Pools with unique Pool IDs, or in other words,\\n * multiple Pools may share the same contract.\\n *\\n * Emits a `PoolRegistered` event.\\n */\\n function registerPool(PoolSpecialization specialization) external returns (bytes32);\\n\\n /**\\n * @dev Emitted when a Pool is registered by calling `registerPool`.\\n */\\n event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, PoolSpecialization specialization);\\n\\n /**\\n * @dev Returns a Pool's contract address and specialization setting.\\n */\\n function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);\\n\\n /**\\n * @dev Registers `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n *\\n * Pools can only interact with tokens they have registered. Users join a Pool by transferring registered tokens,\\n * exit by receiving registered tokens, and can only swap registered tokens.\\n *\\n * Each token can only be registered once. For Pools with the Two Token specialization, `tokens` must have a length\\n * of two, that is, both tokens must be registered in the same `registerTokens` call, and they must be sorted in\\n * ascending order.\\n *\\n * The `tokens` and `assetManagers` arrays must have the same length, and each entry in these indicates the Asset\\n * Manager for the corresponding token. Asset Managers can manage a Pool's tokens via `managePoolBalance`,\\n * depositing and withdrawing them directly, and can even set their balance to arbitrary amounts. They are therefore\\n * expected to be highly secured smart contracts with sound design principles, and the decision to register an\\n * Asset Manager should not be made lightly.\\n *\\n * Pools can choose not to assign an Asset Manager to a given token by passing in the zero address. Once an Asset\\n * Manager is set, it cannot be changed except by deregistering the associated token and registering again with a\\n * different Asset Manager.\\n *\\n * Emits a `TokensRegistered` event.\\n */\\n function registerTokens(\\n bytes32 poolId,\\n IERC20[] memory tokens,\\n address[] memory assetManagers\\n ) external;\\n\\n /**\\n * @dev Emitted when a Pool registers tokens by calling `registerTokens`.\\n */\\n event TokensRegistered(bytes32 indexed poolId, IERC20[] tokens, address[] assetManagers);\\n\\n /**\\n * @dev Deregisters `tokens` for the `poolId` Pool. Must be called by the Pool's contract.\\n *\\n * Only registered tokens (via `registerTokens`) can be deregistered. Additionally, they must have zero total\\n * balance. For Pools with the Two Token specialization, `tokens` must have a length of two, that is, both tokens\\n * must be deregistered in the same `deregisterTokens` call.\\n *\\n * A deregistered token can be re-registered later on, possibly with a different Asset Manager.\\n *\\n * Emits a `TokensDeregistered` event.\\n */\\n function deregisterTokens(bytes32 poolId, IERC20[] memory tokens) external;\\n\\n /**\\n * @dev Emitted when a Pool deregisters tokens by calling `deregisterTokens`.\\n */\\n event TokensDeregistered(bytes32 indexed poolId, IERC20[] tokens);\\n\\n /**\\n * @dev Returns detailed information for a Pool's registered token.\\n *\\n * `cash` is the number of tokens the Vault currently holds for the Pool. `managed` is the number of tokens\\n * withdrawn and held outside the Vault by the Pool's token Asset Manager. The Pool's total balance for `token`\\n * equals the sum of `cash` and `managed`.\\n *\\n * Internally, `cash` and `managed` are stored using 112 bits. No action can ever cause a Pool's token `cash`,\\n * `managed` or `total` balance to be greater than 2^112 - 1.\\n *\\n * `lastChangeBlock` is the number of the block in which `token`'s total balance was last modified (via either a\\n * join, exit, swap, or Asset Manager update). This value is useful to avoid so-called 'sandwich attacks', for\\n * example when developing price oracles. A change of zero (e.g. caused by a swap with amount zero) is considered a\\n * change for this purpose, and will update `lastChangeBlock`.\\n *\\n * `assetManager` is the Pool's token Asset Manager.\\n */\\n function getPoolTokenInfo(bytes32 poolId, IERC20 token)\\n external\\n view\\n returns (\\n uint256 cash,\\n uint256 managed,\\n uint256 lastChangeBlock,\\n address assetManager\\n );\\n\\n /**\\n * @dev Returns a Pool's registered tokens, the total balance for each, and the latest block when *any* of\\n * the tokens' `balances` changed.\\n *\\n * The order of the `tokens` array is the same order that will be used in `joinPool`, `exitPool`, as well as in all\\n * Pool hooks (where applicable). Calls to `registerTokens` and `deregisterTokens` may change this order.\\n *\\n * If a Pool only registers tokens once, and these are sorted in ascending order, they will be stored in the same\\n * order as passed to `registerTokens`.\\n *\\n * Total balances include both tokens held by the Vault and those withdrawn by the Pool's Asset Managers. These are\\n * the amounts used by joins, exits and swaps. For a detailed breakdown of token balances, use `getPoolTokenInfo`\\n * instead.\\n */\\n function getPoolTokens(bytes32 poolId)\\n external\\n view\\n returns (\\n IERC20[] memory tokens,\\n uint256[] memory balances,\\n uint256 lastChangeBlock\\n );\\n\\n /**\\n * @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will\\n * trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized\\n * Pool shares.\\n *\\n * If the caller is not `sender`, it must be an authorized relayer for them.\\n *\\n * The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount\\n * to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces\\n * these maximums.\\n *\\n * If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable\\n * this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the\\n * WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent\\n * back to the caller (not the sender, which is important for relayers).\\n *\\n * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n * interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be\\n * sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final\\n * `assets` array might not be sorted. Pools with no registered tokens cannot be joined.\\n *\\n * If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only\\n * be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be\\n * withdrawn from Internal Balance: attempting to do so will trigger a revert.\\n *\\n * This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement\\n * their own custom logic. This typically requires additional information from the user (such as the expected number\\n * of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed\\n * directly to the Pool's contract, as is `recipient`.\\n *\\n * Emits a `PoolBalanceChanged` event.\\n */\\n function joinPool(\\n bytes32 poolId,\\n address sender,\\n address recipient,\\n JoinPoolRequest memory request\\n ) external payable;\\n\\n struct JoinPoolRequest {\\n IAsset[] assets;\\n uint256[] maxAmountsIn;\\n bytes userData;\\n bool fromInternalBalance;\\n }\\n\\n /**\\n * @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will\\n * trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized\\n * Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see\\n * `getPoolTokenInfo`).\\n *\\n * If the caller is not `sender`, it must be an authorized relayer for them.\\n *\\n * The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum\\n * token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:\\n * it just enforces these minimums.\\n *\\n * If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To\\n * enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead\\n * of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.\\n *\\n * `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when\\n * interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must\\n * be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the\\n * final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.\\n *\\n * If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,\\n * an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to\\n * do so will trigger a revert.\\n *\\n * `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the\\n * `tokens` array. This array must match the Pool's registered tokens.\\n *\\n * This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement\\n * their own custom logic. This typically requires additional information from the user (such as the expected number\\n * of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and\\n * passed directly to the Pool's contract.\\n *\\n * Emits a `PoolBalanceChanged` event.\\n */\\n function exitPool(\\n bytes32 poolId,\\n address sender,\\n address payable recipient,\\n ExitPoolRequest memory request\\n ) external;\\n\\n struct ExitPoolRequest {\\n IAsset[] assets;\\n uint256[] minAmountsOut;\\n bytes userData;\\n bool toInternalBalance;\\n }\\n\\n /**\\n * @dev Emitted when a user joins or exits a Pool by calling `joinPool` or `exitPool`, respectively.\\n */\\n event PoolBalanceChanged(\\n bytes32 indexed poolId,\\n address indexed liquidityProvider,\\n IERC20[] tokens,\\n int256[] deltas,\\n uint256[] protocolFeeAmounts\\n );\\n\\n enum PoolBalanceChangeKind { JOIN, EXIT }\\n\\n // Swaps\\n //\\n // Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,\\n // they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be\\n // aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.\\n //\\n // The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.\\n // In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),\\n // and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').\\n // More complex swaps, such as one token in to multiple tokens out can be achieved by batching together\\n // individual swaps.\\n //\\n // There are two swap kinds:\\n // - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the\\n // `onSwap` hook) the amount of tokens out (to send to the recipient).\\n // - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines\\n // (via the `onSwap` hook) the amount of tokens in (to receive from the sender).\\n //\\n // Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with\\n // the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated\\n // tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended\\n // swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at\\n // the final intended token.\\n //\\n // In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal\\n // Balance) after all individual swaps have been completed, and the net token balance change computed. This makes\\n // certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost\\n // much less gas than they would otherwise.\\n //\\n // It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple\\n // Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only\\n // updating the Pool's internal accounting).\\n //\\n // To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token\\n // involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the\\n // minimum amount of tokens to receive (by passing a negative value) is specified.\\n //\\n // Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after\\n // this point in time (e.g. if the transaction failed to be included in a block promptly).\\n //\\n // If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do\\n // the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be\\n // passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the\\n // same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).\\n //\\n // Finally, Internal Balance can be used when either sending or receiving tokens.\\n\\n enum SwapKind { GIVEN_IN, GIVEN_OUT }\\n\\n /**\\n * @dev Performs a swap with a single Pool.\\n *\\n * If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens\\n * taken from the Pool, which must be greater than or equal to `limit`.\\n *\\n * If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens\\n * sent to the Pool, which must be less than or equal to `limit`.\\n *\\n * Internal Balance usage and the recipient are determined by the `funds` struct.\\n *\\n * Emits a `Swap` event.\\n */\\n function swap(\\n SingleSwap memory singleSwap,\\n FundManagement memory funds,\\n uint256 limit,\\n uint256 deadline\\n ) external payable returns (uint256);\\n\\n /**\\n * @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on\\n * the `kind` value.\\n *\\n * `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).\\n * Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.\\n *\\n * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n * used to extend swap behavior.\\n */\\n struct SingleSwap {\\n bytes32 poolId;\\n SwapKind kind;\\n IAsset assetIn;\\n IAsset assetOut;\\n uint256 amount;\\n bytes userData;\\n }\\n\\n /**\\n * @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either\\n * the amount of tokens sent to or received from the Pool, depending on the `kind` value.\\n *\\n * Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\\n * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\\n * the same index in the `assets` array.\\n *\\n * Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a\\n * Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or\\n * `amountOut` depending on the swap kind.\\n *\\n * Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out\\n * of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal\\n * the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.\\n *\\n * The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,\\n * or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and\\n * out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to\\n * or unwrapped from WETH by the Vault.\\n *\\n * Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies\\n * the minimum or maximum amount of each token the vault is allowed to transfer.\\n *\\n * `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the\\n * equivalent `swap` call.\\n *\\n * Emits `Swap` events.\\n */\\n function batchSwap(\\n SwapKind kind,\\n BatchSwapStep[] memory swaps,\\n IAsset[] memory assets,\\n FundManagement memory funds,\\n int256[] memory limits,\\n uint256 deadline\\n ) external payable returns (int256[] memory);\\n\\n /**\\n * @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the\\n * `assets` array passed to that function, and ETH assets are converted to WETH.\\n *\\n * If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out\\n * from the previous swap, depending on the swap kind.\\n *\\n * The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be\\n * used to extend swap behavior.\\n */\\n struct BatchSwapStep {\\n bytes32 poolId;\\n uint256 assetInIndex;\\n uint256 assetOutIndex;\\n uint256 amount;\\n bytes userData;\\n }\\n\\n /**\\n * @dev Emitted for each individual swap performed by `swap` or `batchSwap`.\\n */\\n event Swap(\\n bytes32 indexed poolId,\\n IERC20 indexed tokenIn,\\n IERC20 indexed tokenOut,\\n uint256 amountIn,\\n uint256 amountOut\\n );\\n\\n /**\\n * @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the\\n * `recipient` account.\\n *\\n * If the caller is not `sender`, it must be an authorized relayer for them.\\n *\\n * If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20\\n * transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`\\n * must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of\\n * `joinPool`.\\n *\\n * If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of\\n * transferred. This matches the behavior of `exitPool`.\\n *\\n * Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a\\n * revert.\\n */\\n struct FundManagement {\\n address sender;\\n bool fromInternalBalance;\\n address payable recipient;\\n bool toInternalBalance;\\n }\\n\\n /**\\n * @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\\n * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\\n *\\n * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\\n * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\\n * receives are the same that an equivalent `batchSwap` call would receive.\\n *\\n * Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.\\n * This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,\\n * approve them for the Vault, or even know a user's address.\\n *\\n * Note that this function is not 'view' (due to implementation details): the client code must explicitly execute\\n * eth_call instead of eth_sendTransaction.\\n */\\n function queryBatchSwap(\\n SwapKind kind,\\n BatchSwapStep[] memory swaps,\\n IAsset[] memory assets,\\n FundManagement memory funds\\n ) external returns (int256[] memory assetDeltas);\\n\\n // Flash Loans\\n\\n /**\\n * @dev Performs a 'flash loan', sending tokens to `recipient`, executing the `receiveFlashLoan` hook on it,\\n * and then reverting unless the tokens plus a proportional protocol fee have been returned.\\n *\\n * The `tokens` and `amounts` arrays must have the same length, and each entry in these indicates the loan amount\\n * for each token contract. `tokens` must be sorted in ascending order.\\n *\\n * The 'userData' field is ignored by the Vault, and forwarded as-is to `recipient` as part of the\\n * `receiveFlashLoan` call.\\n *\\n * Emits `FlashLoan` events.\\n */\\n function flashLoan(\\n IFlashLoanRecipient recipient,\\n IERC20[] memory tokens,\\n uint256[] memory amounts,\\n bytes memory userData\\n ) external;\\n\\n /**\\n * @dev Emitted for each individual flash loan performed by `flashLoan`.\\n */\\n event FlashLoan(IFlashLoanRecipient indexed recipient, IERC20 indexed token, uint256 amount, uint256 feeAmount);\\n\\n // Asset Management\\n //\\n // Each token registered for a Pool can be assigned an Asset Manager, which is able to freely withdraw the Pool's\\n // tokens from the Vault, deposit them, or assign arbitrary values to its `managed` balance (see\\n // `getPoolTokenInfo`). This makes them extremely powerful and dangerous. Even if an Asset Manager only directly\\n // controls one of the tokens in a Pool, a malicious manager could set that token's balance to manipulate the\\n // prices of the other tokens, and then drain the Pool with swaps. The risk of using Asset Managers is therefore\\n // not constrained to the tokens they are managing, but extends to the entire Pool's holdings.\\n //\\n // However, a properly designed Asset Manager smart contract can be safely used for the Pool's benefit,\\n // for example by lending unused tokens out for interest, or using them to participate in voting protocols.\\n //\\n // This concept is unrelated to the IAsset interface.\\n\\n /**\\n * @dev Performs a set of Pool balance operations, which may be either withdrawals, deposits or updates.\\n *\\n * Pool Balance management features batching, which means a single contract call can be used to perform multiple\\n * operations of different kinds, with different Pools and tokens, at once.\\n *\\n * For each operation, the caller must be registered as the Asset Manager for `token` in `poolId`.\\n */\\n function managePoolBalance(PoolBalanceOp[] memory ops) external;\\n\\n struct PoolBalanceOp {\\n PoolBalanceOpKind kind;\\n bytes32 poolId;\\n IERC20 token;\\n uint256 amount;\\n }\\n\\n /**\\n * Withdrawals decrease the Pool's cash, but increase its managed balance, leaving the total balance unchanged.\\n *\\n * Deposits increase the Pool's cash, but decrease its managed balance, leaving the total balance unchanged.\\n *\\n * Updates don't affect the Pool's cash balance, but because the managed balance changes, it does alter the total.\\n * The external amount can be either increased or decreased by this call (i.e., reporting a gain or a loss).\\n */\\n enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }\\n\\n /**\\n * @dev Emitted when a Pool's token Asset Manager alters its balance via `managePoolBalance`.\\n */\\n event PoolBalanceManaged(\\n bytes32 indexed poolId,\\n address indexed assetManager,\\n IERC20 indexed token,\\n int256 cashDelta,\\n int256 managedDelta\\n );\\n\\n // Protocol Fees\\n //\\n // Some operations cause the Vault to collect tokens in the form of protocol fees, which can then be withdrawn by\\n // permissioned accounts.\\n //\\n // There are two kinds of protocol fees:\\n //\\n // - flash loan fees: charged on all flash loans, as a percentage of the amounts lent.\\n //\\n // - swap fees: a percentage of the fees charged by Pools when performing swaps. For a number of reasons, including\\n // swap gas costs and interface simplicity, protocol swap fees are not charged on each individual swap. Rather,\\n // Pools are expected to keep track of how much they have charged in swap fees, and pay any outstanding debts to the\\n // Vault when they are joined or exited. This prevents users from joining a Pool with unpaid debt, as well as\\n // exiting a Pool in debt without first paying their share.\\n\\n// /**\\n// * @dev Returns the current protocol fee module.\\n// */\\n// function getProtocolFeesCollector() external view returns (ProtocolFeesCollector);\\n\\n /**\\n * @dev Safety mechanism to pause most Vault operations in the event of an emergency - typically detection of an\\n * error in some part of the system.\\n *\\n * The Vault can only be paused during an initial time period, after which pausing is forever disabled.\\n *\\n * While the contract is paused, the following features are disabled:\\n * - depositing and transferring internal balance\\n * - transferring external balance (using the Vault's allowance)\\n * - swaps\\n * - joining Pools\\n * - Asset Manager interactions\\n *\\n * Internal Balance can still be withdrawn, and Pools exited.\\n */\\n function setPaused(bool paused) external;\\n\\n /**\\n * @dev Returns the Vault's WETH instance.\\n */\\n function WETH() external view returns (IWETH);\\n // solhint-disable-previous-line func-name-mixedcase\\n}\\n\",\"keccak256\":\"0xd78326c413abc3b0b50d12cd4372594524a353165128da8d6912c03f0a6558b8\",\"license\":\"GPL-3.0-or-later\"},\"contracts/periphery/contracts/vendor/balancer/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the WETH token contract used internally for wrapping and unwrapping, to support\\n * sending and receiving ETH in joins, swaps, and internal balance deposits and withdrawals.\\n */\\ninterface IWETH is IERC20 {\\n function deposit() external payable;\\n\\n function withdraw(uint256 amount) external;\\n}\\n\",\"keccak256\":\"0xba2969251c6a8d4786525e890b9d5d36d2da5ece080a36f144bac1a2037b7f94\",\"license\":\"GPL-3.0-or-later\"},\"contracts/periphery/contracts/vendor/balancer/WeightedPoolUserData.sol\":{\"content\":\"//copied from node_modules/@balancer-labs/v2-interfaces/contracts/pool-weighted/WeightedPoolUserData.sol,\\n// but import of custom IERC20 removed\\n// SPDX-License-Identifier: GPL-3.0-or-later\\n// This program is free software: you can redistribute it and/or modify\\n// it under the terms of the GNU General Public License as published by\\n// the Free Software Foundation, either version 3 of the License, or\\n// (at your option) any later version.\\n\\n// This program is distributed in the hope that it will be useful,\\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n// GNU General Public License for more details.\\n\\n// You should have received a copy of the GNU General Public License\\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\\n\\npragma solidity >=0.7.0 <0.9.0;\\n\\nlibrary WeightedPoolUserData {\\n // In order to preserve backwards compatibility, make sure new join and exit kinds are added at the end of the enum.\\n enum JoinKind { INIT, EXACT_TOKENS_IN_FOR_BPT_OUT, TOKEN_IN_FOR_EXACT_BPT_OUT, ALL_TOKENS_IN_FOR_EXACT_BPT_OUT }\\n enum ExitKind { EXACT_BPT_IN_FOR_ONE_TOKEN_OUT, EXACT_BPT_IN_FOR_TOKENS_OUT, BPT_IN_FOR_EXACT_TOKENS_OUT }\\n\\n function joinKind(bytes memory self) internal pure returns (JoinKind) {\\n return abi.decode(self, (JoinKind));\\n }\\n\\n function exitKind(bytes memory self) internal pure returns (ExitKind) {\\n return abi.decode(self, (ExitKind));\\n }\\n\\n // Joins\\n\\n function initialAmountsIn(bytes memory self) internal pure returns (uint256[] memory amountsIn) {\\n (, amountsIn) = abi.decode(self, (JoinKind, uint256[]));\\n }\\n\\n function exactTokensInForBptOut(bytes memory self)\\n internal\\n pure\\n returns (uint256[] memory amountsIn, uint256 minBPTAmountOut)\\n {\\n (, amountsIn, minBPTAmountOut) = abi.decode(self, (JoinKind, uint256[], uint256));\\n }\\n\\n function tokenInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut, uint256 tokenIndex) {\\n (, bptAmountOut, tokenIndex) = abi.decode(self, (JoinKind, uint256, uint256));\\n }\\n\\n function allTokensInForExactBptOut(bytes memory self) internal pure returns (uint256 bptAmountOut) {\\n (, bptAmountOut) = abi.decode(self, (JoinKind, uint256));\\n }\\n\\n // Exits\\n\\n function exactBptInForTokenOut(bytes memory self) internal pure returns (uint256 bptAmountIn, uint256 tokenIndex) {\\n (, bptAmountIn, tokenIndex) = abi.decode(self, (ExitKind, uint256, uint256));\\n }\\n\\n function exactBptInForTokensOut(bytes memory self) internal pure returns (uint256 bptAmountIn) {\\n (, bptAmountIn) = abi.decode(self, (ExitKind, uint256));\\n }\\n\\n function bptInForExactTokensOut(bytes memory self)\\n internal\\n pure\\n returns (uint256[] memory amountsOut, uint256 maxBPTAmountIn)\\n {\\n (, amountsOut, maxBPTAmountIn) = abi.decode(self, (ExitKind, uint256[], uint256));\\n }\\n}\\n\",\"keccak256\":\"0xdf70ad7f107e4fd3b9e6c456ef46ced40dd3ab40180a0be82c13d5748c313954\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
"bytecode": "0x6080806040523461001657612dbd908161001c8239f35b600080fdfe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146115525750806303ee9f221461152557806314c376dc146114ea57806338013f02146114c1578063438280dd14611486578063485cc9551461123f578063513621171461121257806371d0fb41146111d757806375b238fc146111bb5780638e5313e014611180578063aefca7e814610cf8578063b9ac2b38146107de578063c02d9db11461057e578063d12e733214610509578063dc97e84e146104ce578063e9c26518146104935763f3fef3a3146100da57600080fd5b3461048e57604036600319011261048e576100f36115dd565b6024356100ff8261188a565b1561046d5760008060405160208101906323b872dd60e01b825233602482015230604482015284606482015260648152610138816115f3565b519082865af16101466125ca565b8161043e575b5015610413576001600160a01b038216600090815260016020526040902060040154919061018561017c8461255a565b91600093612624565b928351926000905b8461ffff8316101561028b576101ba6001600160a01b036101b261ffff851689611876565b51511661188a565b15610258576101f46001600160a01b036101d861ffff851689611876565b51511660206101eb61ffff86168a611876565b51015190612624565b926000915b8661ffff841610156102425761023661023c9161021a61ffff861688611876565b51610225828a611876565b526102308189611876565b506118df565b9261179b565b916101f9565b9692909350610251915061179b565b909461018d565b6102856102519161026f61ffff8599951685611876565b5161027a8288611876565b526102308187611876565b9561179b565b83610296849261255a565b6000805b61ffff8216858110156103b8576001600160a01b036102b98287611876565b515116806102d4575b5050906102ce9061179b565b9061029a565b6000809160206102e4858a611876565b510151826040516103198161030b602082019563a9059cbb60e01b87523360248401612609565b03601f19810183528261163f565b51925af16103256125ca565b81610389575b501561035f576102ce916103426103589287611876565b5161034d8287611876565b526102308186611876565b90866102c2565b60405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606490fd5b805180159250821561039e575b50508761032b565b6103b19250602080918301019101611662565b8780610396565b8360405180916020820160208352815180915260206040840192019060005b8181106103e5575050500390f35b825180516001600160a01b0316855260209081015181860152869550604090940193909201916001016103d7565b60405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606490fd5b8051801592508215610453575b50503861014c565b6104669250602080918301019101611662565b388061044b565b604051631e489be560e01b81526001600160a01b0383166004820152602490fd5b600080fd5b3461048e57600036600319011261048e5760206040517f3b5d4cc60d3ec3516ee8ae083bd60934f6eb2a6c54b1229985c41bfb092b26038152f35b3461048e57600036600319011261048e5760206040517f9a9aef7c1247d5fc769b0185c052913e39673da29a880317dfd20ebf86f26a498152f35b3461048e57602036600319011261048e576001600160a01b038061052b6115dd565b166000526001602052604060002060ff81541691600260018301549201541660405191600284101561056857606093835260208301526040820152f35b634e487b7160e01b600052602160045260246000fd5b3461048e5760208060031936011261048e576105986115dd565b906105a28261188a565b1561046d5760018060a01b038092169182600052600182526040600020906040516105cc816115f3565b60ff8354166002908181101561056857825260018401549285830193845280828601541692604081019384526080610619600461060b60038a0161181c565b9860608501998a520161181c565b91015260009481815151945116945190600060405180978194631f29a8cd60e31b8352600483015260249889915afa9182156106cd576000926107b6575b5060005b8581106106d95788600489828d604051938480926318160ddd60e01b82525afa9081156106cd5760009161069c575b61069492506118fc565b604051908152f35b90508282813d83116106c6575b6106b3818361163f565b8101031261048e5761069491519061068a565b503d6106a9565b6040513d6000823e3d90fd5b836106e5828451611876565b51168a81036106fe575b506106f9906118df565b61065b565b61070b82859a939a611876565b518a86885416928a60405180958193631735856760e31b835260048301525afa9182156106cd57600092610787575b5081810291818304149015171561077257810180911161075d57966106f96106ef565b86634e487b7160e01b60005260116004526000fd5b87634e487b7160e01b60005260116004526000fd5b9091508a81813d83116107af575b61079f818361163f565b8101031261048e5751908c61073a565b503d610795565b6107d49192503d806000833e6107cc818361163f565b8101906116ef565b5090509089610657565b3461048e57602036600319011261048e576107f76115dd565b6108008161188a565b15610cd65760018060a01b0381166000526001602052604060002060405190610828826115f3565b60ff815416906002821015610568579082526001810154602083015260028101546001600160a01b031660408301526080906108789060049061086d6003820161181c565b60608601520161181c565b91015260018060a01b03811660005260016020526040600020906040519161089f836115f3565b60ff81541660028110156105685783526000600182015491602085019283526108ef600460018060a01b0360028401541692604088019384526108e46003820161181c565b60608901520161181c565b6080860152519151604051631f29a8cd60e31b8152600481019190915291829060249082906001600160a01b03165afa80156106cd57600091600091610cb8575b5060405163f89f27ed60e01b81526000816004816001600160a01b0388165afa9081156106cd57600091610c7a575b506a0c097ce7bc90715b34b9f16024949293941b9261097e85516118ad565b9560009360018060a01b0360025416955b8751861015610b8e5760608301516001600160a01b03906109b1908890611876565b5160405163313ce56760e01b8152911691602082600481865afa9182156106cd57600092610b50575b506109e58887611876565b5180670de0b6b3a7640000810204670de0b6b3a76400001481151715610b0657610a2590670de0b6b3a7640000610a1e60ff86166118ee565b91026118fc565b610a2f8988611876565b5260405192631735856760e31b845260048401526020836024818c5afa9283156106cd57600093610b1c575b5060128060ff8416810311610b0657610adf93610a83610a899260ff610ad9961690036118ee565b906118fc565b610a93898d611876565b52610ab3610aa1898d611876565b51610aac8a8a611876565b5190611929565b610abd8989611876565b519080610aec5750610ae557670de0b6b3a76400005b90611a9b565b956118df565b9461098f565b6000610ad3565b610ad391610afc610b0192612387565b611a9b565b611bd1565b634e487b7160e01b600052601160045260246000fd5b9092506020813d602011610b48575b81610b386020938361163f565b8101031261048e5751918b610a5b565b3d9150610b2b565b9091506020813d602011610b86575b81610b6c6020938361163f565b8101031261048e575160ff8116810361048e57908b6109da565b3d9150610b5f565b604051634d8166ef60e11b8152906020826004816001600160a01b0387165afa9182156106cd57600092610c44575b50610bcc600492602092611a9b565b6040516318160ddd60e01b815290939092839182906001600160a01b03165afa9081156106cd57600091610c11575b602061069483670de0b6b3a76400008605611929565b90506020813d602011610c3c575b81610c2c6020938361163f565b8101031261048e57516020610bfb565b3d9150610c1f565b91506020823d602011610c72575b81610c5f6020938361163f565b8101031261048e57905190610bcc610bbd565b3d9150610c52565b90503d806000833e610c8c818361163f565b810160208282031261048e5781516001600160401b03811161048e57610cb29201611691565b8561095f565b9050610ccf91503d806000833e6107cc818361163f565b5084610930565b604051631e489be560e01b81526001600160a01b039091166004820152602490fd5b3461048e57604036600319011261048e57610d116115dd565b60248035916002908184101561048e5760018060a01b03908160005460101c16906040518092632474521560e21b825260006004830152338783015281604460209586935afa9081156106cd57600091611153575b5015611141578216906040516311b2515f60e31b81528181600481865afa80156106cd578491600091611107575b50169182156110f05780600052600194858352848160406000200154166110d85760405163038fff2d60e41b8152938385600481865afa9081156106cd5788956000926110a5575b5060008481528886526040808220808b0185905585810180546001600160a01b03191685179055805460ff191660ff9d8e1617905551631f29a8cd60e31b808252600482019490945296909187919082905afa9485156106cd57600095611086575b50600083815287855260409020855160039690918701906001600160401b03831161107157600160401b83116110715786908254848455808510611044575b509b979b01906000528560002060005b838110611031575050505082600052868452886040600020015494876000905b610eb357005b61ffff87818316101561102f5785600052898752888c610ed984826040600020016117ae565b9054911b1c16610ee88161188a565b1561100e57600052898752604060002060405190610f05826115f3565b8481541687811015610ff9578e8360808f8f946000968f9998878f610f489560049561086d94528401549c88019c8d52830154169660408701978852820161181c565b910152511692518d604051809581938a835260048301525afa9182156106cd57600092610fda575b5060008b5b610f91575b50505099610f89899a9b61179b565b909a99610ead565b825182821690811015610fd4578c91610fc9610fce928e858e8e60005252610fc160046040600020019289611876565b5116906117dc565b61179b565b90610f75565b50610f7a565b610ff09192503d806000833e6107cc818361163f565b5050908d610f70565b8d634e487b7160e01b60005260216004526000fd5b610f89915091610fc98b9c9d93886000528c8a5260046040600020016117dc565b005b82518a1682820155918701918a01610e8d565b836000528b858460002092830192015b828110611062575050610e7d565b600081558a94508d9101611054565b8a634e487b7160e01b60005260416004526000fd5b61109c9195503d806000833e6107cc818361163f565b50509389610e3e565b955090508385813d81116110d1575b6110be818361163f565b8101031261048e57935187946000610ddc565b503d6110b4565b6040516345ed80e960e01b8152600481018390528790fd5b859060405190631e489be560e01b82526004820152fd5b809250838092503d831161113a575b611120818361163f565b8101031261048e5751838116810361048e57839088610d94565b503d611116565b604051631886ea7d60e11b8152600490fd5b6111739150833d8511611179575b61116b818361163f565b810190611662565b87610d66565b503d611161565b3461048e57600036600319011261048e5760206040517fe453bacb314e78dcd5192e6b1a2b1f0e7c76e92f6b7e429a6a90f04e39db3b768152f35b3461048e57600036600319011261048e57602060405160008152f35b3461048e57600036600319011261048e5760206040517f880a91047114272656e533301261260c75e4d11543ac7303d6fe4204579ec7278152f35b3461048e57602036600319011261048e5760206112356112306115dd565b61188a565b6040519015158152f35b3461048e57604036600319011261048e576112586115dd565b6001600160a01b036024358181169081900361048e576000549060ff8260081c161591828093611479575b8015611462575b156114065760ff198116600117600055826113f4575b506000549260ff8460081c161561139b5762010000600160b01b03601086901b1662010000600160b01b0319851681176000556040516301ffc9a760e01b8152637965db0b60e01b60048201529095909160209183916024918391165afa9081156106cd5760009161137d575b501561136b57600280546001600160a01b03191691909117905561132d57005b610100600160b01b03191617600055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1005b6040516384d942fd60e01b8152600490fd5b611395915060203d81116111795761116b818361163f565b8561130d565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b61ffff191661010117600055846112a0565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b15801561128a5750600160ff82161461128a565b50600160ff821610611283565b3461048e57600036600319011261048e5760206040517f39f61ca2a1a28fee144218173ec637b649a353e4026b2738c673800e5bf1437b8152f35b3461048e57600036600319011261048e576002546040516001600160a01b039091168152602090f35b3461048e57600036600319011261048e5760206040517fe965846df3dd5b1dfa65f58e31477079e90140e0908b6dd31b5aead5a57cf3658152f35b3461048e57600036600319011261048e5760005460405160109190911c6001600160a01b03168152602090f35b3461048e57602036600319011261048e5760043563ffffffff60e01b811680910361048e576000546301ffc9a760e01b835260048301919091526020908290602490829060101c6001600160a01b03165afa80156106cd576020916000916115c0575b506040519015158152f35b6115d79150823d81116111795761116b818361163f565b826115b5565b600435906001600160a01b038216820361048e57565b60a081019081106001600160401b0382111761160e57604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761160e57604052565b601f909101601f19168101906001600160401b0382119082101761160e57604052565b9081602091031261048e5751801515810361048e5790565b6001600160401b03811161160e5760051b60200190565b81601f8201121561048e578051916116a88361167a565b926116b6604051948561163f565b808452602092838086019260051b82010192831161048e578301905b8282106116e0575050505090565b815181529083019083016116d2565b909160608284031261048e5781516001600160401b03939084811161048e5783019381601f8601121561048e578451946117288661167a565b90611736604051928361163f565b868252602096878084019160051b8301019185831161048e578801905b82821061177c575050509484015190811161048e57604091611776918501611691565b92015190565b81516001600160a01b038116810361048e578152908801908801611753565b61ffff809116908114610b065760010190565b80548210156117c65760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b8054600160401b81101561160e576117f9916001820181556117ae565b819291549060031b9160018060a01b039283811b93849216901b16911916179055565b9060405191828154918282526020928383019160005283600020936000905b828210611853575050506118519250038361163f565b565b85546001600160a01b03168452600195860195889550938101939091019061183b565b80518210156117c65760209160051b010190565b6001600160a01b0390811660009081526001602052604090206002015416151590565b906118b78261167a565b6118c4604051918261163f565b82815280926118d5601f199161167a565b0190602036910137565b6000198114610b065760010190565b604d8111610b0657600a0a90565b8115611906570490565b634e487b7160e01b600052601260045260246000fd5b91908203918211610b0657565b600160ff1b9080821480156119cb575b6119b95760008112156119b057611961816000035b60008512156119a95784600003906119d4565b926001600160ff1b0384116119905760001991821291121860010361198c578114610b065760000390565b5090565b604051637cb4bef560e01b815260048101859052602490fd5b84906119d4565b6119618161194e565b60405163b3c754a360e01b8152600490fd5b50818314611939565b670de0b6b3a7640000916000198383099280830292838086109503948086039514611a725782851015611a5457908291096001821901821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b6044858460405191631dcf306360e21b835260048301526024820152fd5b505090611a7f92506118fc565b90565b8015611906576a0c097ce7bc90715b34b9f160241b0590565b600160ff1b818114908115611b34575b50611b22576000811215611b1957611ad4816000035b6000841215611b12578360000390611b3e565b916001600160ff1b038311611af957600019918212911218600103611a7f5760000390565b60405163bf79e8d960e01b815260048101849052602490fd5b8390611b3e565b611ad481611ac1565b604051630d01a11b60e21b8152600490fd5b9050821438611aab565b600019828209828202908180821091039381850390670de0b6b3a76400009485831015611bb85790859109916706f05b59d3b1ffff83119514611bb1577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac106699350828211900360ee1b910360121c17020190565b5050040190565b60405163698d9a0160e11b815260048101849052602490fd5b6000811215611c065768033dd1780914b97114198112611c0057611bf790600003611bd1565b611a7f90611a82565b50600090565b680a688906bd8b00000081121561236f57604090670de0b6b3a764000090821b81900490600160bf1b6001603f1b831661235c575b6001603e1b831661234a575b6001603d1b8316612338575b6001603c1b8316612326575b6001603b1b8316612314575b6001603a1b8316612302575b600160391b83166122f0575b600160381b83166122de575b600160371b83166122cc575b600160361b83166122ba575b600160351b83166122a8575b600160341b8316612296575b600160331b8316612284575b600160321b8316612272575b600160311b8316612260575b600160301b831661224e575b6001602f1b831661223c575b6001602e1b831661222a575b6001602d1b8316612218575b6001602c1b8316612206575b6001602b1b83166121f4575b6001602a1b83166121e2575b600160291b83166121d0575b600160281b83166121be575b600160271b83166121ac575b600160261b831661219a575b600160251b8316612188575b600160241b8316612176575b600160231b8316612164575b600160221b8316612152575b600160211b8316612140575b600160201b831661212e575b6380000000831661211c575b6340000000831661210a575b632000000083166120f8575b631000000083166120e6575b630800000083166120d4575b630400000083166120c2575b630200000083166120b0575b6301000000831661209e575b62800000831661208c575b62400000831661207a575b622000008316612068575b621000008316612056575b620800008316612044575b620400008316612032575b620200008316612020575b62010000831661200f575b6180008316611ffe575b6140008316611fed575b6120008316611fdc575b6110008316611fcb575b6108008316611fba575b6104008316611fa9575b6102008316611f98575b6101008316611f88575b60808316611f78575b838316611f68575b60208316611f58575b60108316611f48575b60088316611f38575b60048316611f28575b60028316611f18575b60018316611f08575b02911c60bf031c90565b6001600160401b0102831c611efe565b6001600160401b0102831c611ef5565b6003600160401b0102831c611eec565b6006600160401b0102831c611ee3565b600b600160401b0102831c611eda565b6016600160401b0102831c611ed1565b602c600160401b0102831c611ec8565b6059600160401b0102831c611ec0565b60b1600160401b0102831c611eb7565b610163600160401b0102831c611ead565b6102c6600160401b0102831c611ea3565b61058c600160401b0102831c611e99565b610b17600160401b0102831c611e8f565b61162e600160401b0102831c611e85565b612c5d600160401b0102831c611e7b565b6158b9600160401b0102831c611e71565b61b172600160401b0102831c611e67565b680100000000000162e402831c611e5c565b6801000000000002c5c802831c611e51565b68010000000000058b9102831c611e46565b680100000000000b172102831c611e3b565b68010000000000162e4302831c611e30565b680100000000002c5c8602831c611e25565b6801000000000058b90c02831c611e1a565b68010000000000b1721802831c611e0f565b6801000000000162e43002831c611e03565b68010000000002c5c86002831c611df7565b680100000000058b90c002831c611deb565b6801000000000b17217f02831c611ddf565b680100000000162e42ff02831c611dd3565b6801000000002c5c85fe02831c611dc7565b68010000000058b90bfc02831c611dbb565b680100000000b17217f802831c611daf565b68010000000162e42ff102831c611da3565b680100000002c5c85fe302831c611d97565b6801000000058b90bfce02831c611d8b565b68010000000b17217fbb02831c611d7f565b6801000000162e42fff002831c611d73565b68010000002c5c8601cc02831c611d67565b680100000058b90c0b4902831c611d5b565b6801000000b17218355102831c611d4f565b680100000162e430e5a202831c611d43565b6801000002c5c863b73f02831c611d37565b68010000058b90cf1e6e02831c611d2b565b680100000b1721bcfc9a02831c611d1f565b68010000162e43f4f83102831c611d13565b680100002c5c89d5ec6d02831c611d07565b6801000058b91b5bc9ae02831c611cfb565b68010000b17255775c0402831c611cef565b6801000162e525ee054702831c611ce3565b68010002c5cc37da949202831c611cd7565b680100058ba01fb9f96d02831c611ccb565b6801000b175effdc76ba02831c611cbf565b680100162f3904051fa102831c611cb3565b6801002c605e2e8cec5002831c611ca7565b68010058c86da1c09ea202831c611c9b565b680100b1afa5abcbed6102831c611c8f565b68010163da9fb33356d802831c611c83565b680102c9a3e778060ee702831c611c77565b6801059b0d31585743ae02831c611c6b565b68010b5586cf9890f62a02831c611c5f565b6801172b83c7d517adce02831c611c53565b6801306fe0a31b7152df02831c611c47565b5068016a09e667f3bcc909607f1b611c3b565b6024906040519063e69458f960e01b82526004820152fd5b6000908181131561254257670de0b6b3a764000091828212612525576001925b81818405600160801b81101561251a575b600160401b811015612505575b600160201b8110156124f0575b620100008110156124db575b6101008110156124c6575b60108110156124b1575b6004811015612488575b60021115612468575b81810293811d9082821461245d57506706f05b59d3b20000905b83821361242f57505050500290565b808391020590671bc16d674ec8000082121561244f575b60011d90612420565b809194019360011d90612446565b925050929150020290565b600181018091111561240657634e487b7160e01b83526011600452602483fd5b60021c906002810180911161249d57906123fd565b634e487b7160e01b84526011600452602484fd5b60041c906004810180911161249d57906123f3565b60081c906008810180911161249d57906123e9565b60101c906010810180911161249d57906123de565b60201c906020810180911161249d57906123d2565b60401c906040810180911161249d57906123c5565b60809150811c6123b8565b600019926a0c097ce7bc90715b34b9f160241b92909204916123a7565b6024906040519063309fa7dd60e11b82526004820152fd5b906125648261167a565b6040906125738251918261163f565b8381528093612584601f199161167a565b019060005b8281106125965750505050565b835180850191906001600160401b0383118184101761160e5760209286526000815282600081830152828501015201612589565b3d15612604573d906001600160401b03821161160e57604051916125f8601f8201601f19166020018461163f565b82523d6000602084013e565b606090565b6001600160a01b039091168152602081019190915260400190565b6001600160a01b0381166000908152600160205260408082209051919493929061264d836115f3565b60ff8154166002811015612d735783526001810154602084015260028101546001600160a01b0316604084015261268d9060049061086d6003820161181c565b6080830152606082015151604083015190939081906001600160a01b0390811690841681141580612ce8575b612c7a575b50506126c9846118ad565b93865b8161ffff8216101561277f57602490602060018060a01b036126f661ffff841660608a0151611876565b5116604051938480926370a0823160e01b82523060048301525afa801561277457899061273c575b612737925061273161ffff831689611876565b5261179b565b6126cc565b506020823d60201161276c575b816127566020938361163f565b8101031261276857612737915161271e565b8880fd5b3d9150612749565b6040513d8b823e3d90fd5b50919495939092956127908361167a565b9161279e604051938461163f565b838352601f196127ad8561167a565b013660208501376127bd846118ad565b93865b61ffff811682811015612804579088612731838d6127ec6127ff96606060018060a01b03930151611876565b51166127f8828b611876565b5289611876565b6127c0565b5050949693909592919660018060a01b0360408a0151169160208a015193604051926001602085015260408401526040835282606081011060018060401b03606085011117612c66576001600160401b0360e084019081116060850190911017612c665760e08301604052606083015260808201528060a08101528360c0820152813b15612c6257918391604051938492638bdb391360e01b845260048401523060248401523060448401526080606484015261010483019060608101519160806084860152825180915260206101248601930190865b818110612c3d575050506080810151916083198582030160a486015260208084519283815201930190865b818110612c215750505060a08101518483036083190160c486015280518084529190865b838110612c0757505084838360c06020948a868198879a0101520151151560e4840152601f8019910116010301925af18015612bfc57612bd1575b50906060860151908151156117c6576020909101516001600160a01b03908116911603612ae1576000198201828111612acd576129a19061255a565b9260015b61ffff811684811015612ac4576024602060018060a01b036129cb8460608d0151611876565b5116604051928380926370a0823160e01b82523060048301525afa8015612ab9578590612a85575b612a099150612a028386611876565b519061191c565b9060018060a01b03612a1f8260608c0151611876565b51169160405192612a2f84611624565b8352602083015261ffff600019820111612a7157612a6c9291612a66916000190161ffff1690612a5f828a611876565b5287611876565b5061179b565b6129a5565b634e487b7160e01b85526011600452602485fd5b506020813d602011612ab1575b81612a9f6020938361163f565b8101031261048e57612a0990516129f3565b3d9150612a92565b6040513d87823e3d90fd5b50505050509150565b634e487b7160e01b82526011600452602482fd5b612aed8293959261255a565b94815b61ffff81169085821015612bc9576024602060018060a01b03612b178560608a0151611876565b5116604051928380926370a0823160e01b82523060048301525afa908115612ab9578591612b95575b5082612b56612a6692612a02612b909688611876565b60608801516001600160a01b0390612b6f908490611876565b51169060405191612b7f83611624565b825260208201526127f8828c611876565b612af0565b90506020813d602011612bc1575b81612bb06020938361163f565b8101031261048e5751612b90612b40565b3d9150612ba3565b505050505050565b6001600160401b038111612be85760405238612965565b634e487b7160e01b82526041600452602482fd5b6040513d84823e3d90fd5b60208183018101518683018201528a98508997500161292a565b8251855289975088965060209485019490920191600101612906565b82516001600160a01b03168552899750889650602094850194909201916001016128db565b8380fd5b634e487b7160e01b86526041600452602486fd5b60405163095ea7b360e01b81529160209183918291612c9d919060048401612609565b03818a6001600160a01b0388165af18015612cdd57612cbe575b81906126be565b612cd69060203d6020116111795761116b818361163f565b5038612cb7565b6040513d89823e3d90fd5b50604051636eb1769f60e11b81523060048201526024810182905291506020826044816001600160a01b0388165afa8015612d685783928991612d2e575b5082116126b9565b9250506020823d602011612d60575b81612d4a6020938361163f565b81010312612d5c578280925190612d26565b8780fd5b3d9150612d3d565b6040513d8a823e3d90fd5b634e487b7160e01b87526021600452602487fdfea26469706673582212204252360a9a29a89efb47867f841746bf6ce8c5ef2314f1b3706c00cc89d7360964736f6c63430008110033",
"deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146115525750806303ee9f221461152557806314c376dc146114ea57806338013f02146114c1578063438280dd14611486578063485cc9551461123f578063513621171461121257806371d0fb41146111d757806375b238fc146111bb5780638e5313e014611180578063aefca7e814610cf8578063b9ac2b38146107de578063c02d9db11461057e578063d12e733214610509578063dc97e84e146104ce578063e9c26518146104935763f3fef3a3146100da57600080fd5b3461048e57604036600319011261048e576100f36115dd565b6024356100ff8261188a565b1561046d5760008060405160208101906323b872dd60e01b825233602482015230604482015284606482015260648152610138816115f3565b519082865af16101466125ca565b8161043e575b5015610413576001600160a01b038216600090815260016020526040902060040154919061018561017c8461255a565b91600093612624565b928351926000905b8461ffff8316101561028b576101ba6001600160a01b036101b261ffff851689611876565b51511661188a565b15610258576101f46001600160a01b036101d861ffff851689611876565b51511660206101eb61ffff86168a611876565b51015190612624565b926000915b8661ffff841610156102425761023661023c9161021a61ffff861688611876565b51610225828a611876565b526102308189611876565b506118df565b9261179b565b916101f9565b9692909350610251915061179b565b909461018d565b6102856102519161026f61ffff8599951685611876565b5161027a8288611876565b526102308187611876565b9561179b565b83610296849261255a565b6000805b61ffff8216858110156103b8576001600160a01b036102b98287611876565b515116806102d4575b5050906102ce9061179b565b9061029a565b6000809160206102e4858a611876565b510151826040516103198161030b602082019563a9059cbb60e01b87523360248401612609565b03601f19810183528261163f565b51925af16103256125ca565b81610389575b501561035f576102ce916103426103589287611876565b5161034d8287611876565b526102308186611876565b90866102c2565b60405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606490fd5b805180159250821561039e575b50508761032b565b6103b19250602080918301019101611662565b8780610396565b8360405180916020820160208352815180915260206040840192019060005b8181106103e5575050500390f35b825180516001600160a01b0316855260209081015181860152869550604090940193909201916001016103d7565b60405162461bcd60e51b815260206004820152600360248201526229aa2360e91b6044820152606490fd5b8051801592508215610453575b50503861014c565b6104669250602080918301019101611662565b388061044b565b604051631e489be560e01b81526001600160a01b0383166004820152602490fd5b600080fd5b3461048e57600036600319011261048e5760206040517f3b5d4cc60d3ec3516ee8ae083bd60934f6eb2a6c54b1229985c41bfb092b26038152f35b3461048e57600036600319011261048e5760206040517f9a9aef7c1247d5fc769b0185c052913e39673da29a880317dfd20ebf86f26a498152f35b3461048e57602036600319011261048e576001600160a01b038061052b6115dd565b166000526001602052604060002060ff81541691600260018301549201541660405191600284101561056857606093835260208301526040820152f35b634e487b7160e01b600052602160045260246000fd5b3461048e5760208060031936011261048e576105986115dd565b906105a28261188a565b1561046d5760018060a01b038092169182600052600182526040600020906040516105cc816115f3565b60ff8354166002908181101561056857825260018401549285830193845280828601541692604081019384526080610619600461060b60038a0161181c565b9860608501998a520161181c565b91015260009481815151945116945190600060405180978194631f29a8cd60e31b8352600483015260249889915afa9182156106cd576000926107b6575b5060005b8581106106d95788600489828d604051938480926318160ddd60e01b82525afa9081156106cd5760009161069c575b61069492506118fc565b604051908152f35b90508282813d83116106c6575b6106b3818361163f565b8101031261048e5761069491519061068a565b503d6106a9565b6040513d6000823e3d90fd5b836106e5828451611876565b51168a81036106fe575b506106f9906118df565b61065b565b61070b82859a939a611876565b518a86885416928a60405180958193631735856760e31b835260048301525afa9182156106cd57600092610787575b5081810291818304149015171561077257810180911161075d57966106f96106ef565b86634e487b7160e01b60005260116004526000fd5b87634e487b7160e01b60005260116004526000fd5b9091508a81813d83116107af575b61079f818361163f565b8101031261048e5751908c61073a565b503d610795565b6107d49192503d806000833e6107cc818361163f565b8101906116ef565b5090509089610657565b3461048e57602036600319011261048e576107f76115dd565b6108008161188a565b15610cd65760018060a01b0381166000526001602052604060002060405190610828826115f3565b60ff815416906002821015610568579082526001810154602083015260028101546001600160a01b031660408301526080906108789060049061086d6003820161181c565b60608601520161181c565b91015260018060a01b03811660005260016020526040600020906040519161089f836115f3565b60ff81541660028110156105685783526000600182015491602085019283526108ef600460018060a01b0360028401541692604088019384526108e46003820161181c565b60608901520161181c565b6080860152519151604051631f29a8cd60e31b8152600481019190915291829060249082906001600160a01b03165afa80156106cd57600091600091610cb8575b5060405163f89f27ed60e01b81526000816004816001600160a01b0388165afa9081156106cd57600091610c7a575b506a0c097ce7bc90715b34b9f16024949293941b9261097e85516118ad565b9560009360018060a01b0360025416955b8751861015610b8e5760608301516001600160a01b03906109b1908890611876565b5160405163313ce56760e01b8152911691602082600481865afa9182156106cd57600092610b50575b506109e58887611876565b5180670de0b6b3a7640000810204670de0b6b3a76400001481151715610b0657610a2590670de0b6b3a7640000610a1e60ff86166118ee565b91026118fc565b610a2f8988611876565b5260405192631735856760e31b845260048401526020836024818c5afa9283156106cd57600093610b1c575b5060128060ff8416810311610b0657610adf93610a83610a899260ff610ad9961690036118ee565b906118fc565b610a93898d611876565b52610ab3610aa1898d611876565b51610aac8a8a611876565b5190611929565b610abd8989611876565b519080610aec5750610ae557670de0b6b3a76400005b90611a9b565b956118df565b9461098f565b6000610ad3565b610ad391610afc610b0192612387565b611a9b565b611bd1565b634e487b7160e01b600052601160045260246000fd5b9092506020813d602011610b48575b81610b386020938361163f565b8101031261048e5751918b610a5b565b3d9150610b2b565b9091506020813d602011610b86575b81610b6c6020938361163f565b8101031261048e575160ff8116810361048e57908b6109da565b3d9150610b5f565b604051634d8166ef60e11b8152906020826004816001600160a01b0387165afa9182156106cd57600092610c44575b50610bcc600492602092611a9b565b6040516318160ddd60e01b815290939092839182906001600160a01b03165afa9081156106cd57600091610c11575b602061069483670de0b6b3a76400008605611929565b90506020813d602011610c3c575b81610c2c6020938361163f565b8101031261048e57516020610bfb565b3d9150610c1f565b91506020823d602011610c72575b81610c5f6020938361163f565b8101031261048e57905190610bcc610bbd565b3d9150610c52565b90503d806000833e610c8c818361163f565b810160208282031261048e5781516001600160401b03811161048e57610cb29201611691565b8561095f565b9050610ccf91503d806000833e6107cc818361163f565b5084610930565b604051631e489be560e01b81526001600160a01b039091166004820152602490fd5b3461048e57604036600319011261048e57610d116115dd565b60248035916002908184101561048e5760018060a01b03908160005460101c16906040518092632474521560e21b825260006004830152338783015281604460209586935afa9081156106cd57600091611153575b5015611141578216906040516311b2515f60e31b81528181600481865afa80156106cd578491600091611107575b50169182156110f05780600052600194858352848160406000200154166110d85760405163038fff2d60e41b8152938385600481865afa9081156106cd5788956000926110a5575b5060008481528886526040808220808b0185905585810180546001600160a01b03191685179055805460ff191660ff9d8e1617905551631f29a8cd60e31b808252600482019490945296909187919082905afa9485156106cd57600095611086575b50600083815287855260409020855160039690918701906001600160401b03831161107157600160401b83116110715786908254848455808510611044575b509b979b01906000528560002060005b838110611031575050505082600052868452886040600020015494876000905b610eb357005b61ffff87818316101561102f5785600052898752888c610ed984826040600020016117ae565b9054911b1c16610ee88161188a565b1561100e57600052898752604060002060405190610f05826115f3565b8481541687811015610ff9578e8360808f8f946000968f9998878f610f489560049561086d94528401549c88019c8d52830154169660408701978852820161181c565b910152511692518d604051809581938a835260048301525afa9182156106cd57600092610fda575b5060008b5b610f91575b50505099610f89899a9b61179b565b909a99610ead565b825182821690811015610fd4578c91610fc9610fce928e858e8e60005252610fc160046040600020019289611876565b5116906117dc565b61179b565b90610f75565b50610f7a565b610ff09192503d806000833e6107cc818361163f565b5050908d610f70565b8d634e487b7160e01b60005260216004526000fd5b610f89915091610fc98b9c9d93886000528c8a5260046040600020016117dc565b005b82518a1682820155918701918a01610e8d565b836000528b858460002092830192015b828110611062575050610e7d565b600081558a94508d9101611054565b8a634e487b7160e01b60005260416004526000fd5b61109c9195503d806000833e6107cc818361163f565b50509389610e3e565b955090508385813d81116110d1575b6110be818361163f565b8101031261048e57935187946000610ddc565b503d6110b4565b6040516345ed80e960e01b8152600481018390528790fd5b859060405190631e489be560e01b82526004820152fd5b809250838092503d831161113a575b611120818361163f565b8101031261048e5751838116810361048e57839088610d94565b503d611116565b604051631886ea7d60e11b8152600490fd5b6111739150833d8511611179575b61116b818361163f565b810190611662565b87610d66565b503d611161565b3461048e57600036600319011261048e5760206040517fe453bacb314e78dcd5192e6b1a2b1f0e7c76e92f6b7e429a6a90f04e39db3b768152f35b3461048e57600036600319011261048e57602060405160008152f35b3461048e57600036600319011261048e5760206040517f880a91047114272656e533301261260c75e4d11543ac7303d6fe4204579ec7278152f35b3461048e57602036600319011261048e5760206112356112306115dd565b61188a565b6040519015158152f35b3461048e57604036600319011261048e576112586115dd565b6001600160a01b036024358181169081900361048e576000549060ff8260081c161591828093611479575b8015611462575b156114065760ff198116600117600055826113f4575b506000549260ff8460081c161561139b5762010000600160b01b03601086901b1662010000600160b01b0319851681176000556040516301ffc9a760e01b8152637965db0b60e01b60048201529095909160209183916024918391165afa9081156106cd5760009161137d575b501561136b57600280546001600160a01b03191691909117905561132d57005b610100600160b01b03191617600055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1005b6040516384d942fd60e01b8152600490fd5b611395915060203d81116111795761116b818361163f565b8561130d565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b61ffff191661010117600055846112a0565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b15801561128a5750600160ff82161461128a565b50600160ff821610611283565b3461048e57600036600319011261048e5760206040517f39f61ca2a1a28fee144218173ec637b649a353e4026b2738c673800e5bf1437b8152f35b3461048e57600036600319011261048e576002546040516001600160a01b039091168152602090f35b3461048e57600036600319011261048e5760206040517fe965846df3dd5b1dfa65f58e31477079e90140e0908b6dd31b5aead5a57cf3658152f35b3461048e57600036600319011261048e5760005460405160109190911c6001600160a01b03168152602090f35b3461048e57602036600319011261048e5760043563ffffffff60e01b811680910361048e576000546301ffc9a760e01b835260048301919091526020908290602490829060101c6001600160a01b03165afa80156106cd576020916000916115c0575b506040519015158152f35b6115d79150823d81116111795761116b818361163f565b826115b5565b600435906001600160a01b038216820361048e57565b60a081019081106001600160401b0382111761160e57604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761160e57604052565b601f909101601f19168101906001600160401b0382119082101761160e57604052565b9081602091031261048e5751801515810361048e5790565b6001600160401b03811161160e5760051b60200190565b81601f8201121561048e578051916116a88361167a565b926116b6604051948561163f565b808452602092838086019260051b82010192831161048e578301905b8282106116e0575050505090565b815181529083019083016116d2565b909160608284031261048e5781516001600160401b03939084811161048e5783019381601f8601121561048e578451946117288661167a565b90611736604051928361163f565b868252602096878084019160051b8301019185831161048e578801905b82821061177c575050509484015190811161048e57604091611776918501611691565b92015190565b81516001600160a01b038116810361048e578152908801908801611753565b61ffff809116908114610b065760010190565b80548210156117c65760005260206000200190600090565b634e487b7160e01b600052603260045260246000fd5b8054600160401b81101561160e576117f9916001820181556117ae565b819291549060031b9160018060a01b039283811b93849216901b16911916179055565b9060405191828154918282526020928383019160005283600020936000905b828210611853575050506118519250038361163f565b565b85546001600160a01b03168452600195860195889550938101939091019061183b565b80518210156117c65760209160051b010190565b6001600160a01b0390811660009081526001602052604090206002015416151590565b906118b78261167a565b6118c4604051918261163f565b82815280926118d5601f199161167a565b0190602036910137565b6000198114610b065760010190565b604d8111610b0657600a0a90565b8115611906570490565b634e487b7160e01b600052601260045260246000fd5b91908203918211610b0657565b600160ff1b9080821480156119cb575b6119b95760008112156119b057611961816000035b60008512156119a95784600003906119d4565b926001600160ff1b0384116119905760001991821291121860010361198c578114610b065760000390565b5090565b604051637cb4bef560e01b815260048101859052602490fd5b84906119d4565b6119618161194e565b60405163b3c754a360e01b8152600490fd5b50818314611939565b670de0b6b3a7640000916000198383099280830292838086109503948086039514611a725782851015611a5457908291096001821901821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b6044858460405191631dcf306360e21b835260048301526024820152fd5b505090611a7f92506118fc565b90565b8015611906576a0c097ce7bc90715b34b9f160241b0590565b600160ff1b818114908115611b34575b50611b22576000811215611b1957611ad4816000035b6000841215611b12578360000390611b3e565b916001600160ff1b038311611af957600019918212911218600103611a7f5760000390565b60405163bf79e8d960e01b815260048101849052602490fd5b8390611b3e565b611ad481611ac1565b604051630d01a11b60e21b8152600490fd5b9050821438611aab565b600019828209828202908180821091039381850390670de0b6b3a76400009485831015611bb85790859109916706f05b59d3b1ffff83119514611bb1577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac106699350828211900360ee1b910360121c17020190565b5050040190565b60405163698d9a0160e11b815260048101849052602490fd5b6000811215611c065768033dd1780914b97114198112611c0057611bf790600003611bd1565b611a7f90611a82565b50600090565b680a688906bd8b00000081121561236f57604090670de0b6b3a764000090821b81900490600160bf1b6001603f1b831661235c575b6001603e1b831661234a575b6001603d1b8316612338575b6001603c1b8316612326575b6001603b1b8316612314575b6001603a1b8316612302575b600160391b83166122f0575b600160381b83166122de575b600160371b83166122cc575b600160361b83166122ba575b600160351b83166122a8575b600160341b8316612296575b600160331b8316612284575b600160321b8316612272575b600160311b8316612260575b600160301b831661224e575b6001602f1b831661223c575b6001602e1b831661222a575b6001602d1b8316612218575b6001602c1b8316612206575b6001602b1b83166121f4575b6001602a1b83166121e2575b600160291b83166121d0575b600160281b83166121be575b600160271b83166121ac575b600160261b831661219a575b600160251b8316612188575b600160241b8316612176575b600160231b8316612164575b600160221b8316612152575b600160211b8316612140575b600160201b831661212e575b6380000000831661211c575b6340000000831661210a575b632000000083166120f8575b631000000083166120e6575b630800000083166120d4575b630400000083166120c2575b630200000083166120b0575b6301000000831661209e575b62800000831661208c575b62400000831661207a575b622000008316612068575b621000008316612056575b620800008316612044575b620400008316612032575b620200008316612020575b62010000831661200f575b6180008316611ffe575b6140008316611fed575b6120008316611fdc575b6110008316611fcb575b6108008316611fba575b6104008316611fa9575b6102008316611f98575b6101008316611f88575b60808316611f78575b838316611f68575b60208316611f58575b60108316611f48575b60088316611f38575b60048316611f28575b60028316611f18575b60018316611f08575b02911c60bf031c90565b6001600160401b0102831c611efe565b6001600160401b0102831c611ef5565b6003600160401b0102831c611eec565b6006600160401b0102831c611ee3565b600b600160401b0102831c611eda565b6016600160401b0102831c611ed1565b602c600160401b0102831c611ec8565b6059600160401b0102831c611ec0565b60b1600160401b0102831c611eb7565b610163600160401b0102831c611ead565b6102c6600160401b0102831c611ea3565b61058c600160401b0102831c611e99565b610b17600160401b0102831c611e8f565b61162e600160401b0102831c611e85565b612c5d600160401b0102831c611e7b565b6158b9600160401b0102831c611e71565b61b172600160401b0102831c611e67565b680100000000000162e402831c611e5c565b6801000000000002c5c802831c611e51565b68010000000000058b9102831c611e46565b680100000000000b172102831c611e3b565b68010000000000162e4302831c611e30565b680100000000002c5c8602831c611e25565b6801000000000058b90c02831c611e1a565b68010000000000b1721802831c611e0f565b6801000000000162e43002831c611e03565b68010000000002c5c86002831c611df7565b680100000000058b90c002831c611deb565b6801000000000b17217f02831c611ddf565b680100000000162e42ff02831c611dd3565b6801000000002c5c85fe02831c611dc7565b68010000000058b90bfc02831c611dbb565b680100000000b17217f802831c611daf565b68010000000162e42ff102831c611da3565b680100000002c5c85fe302831c611d97565b6801000000058b90bfce02831c611d8b565b68010000000b17217fbb02831c611d7f565b6801000000162e42fff002831c611d73565b68010000002c5c8601cc02831c611d67565b680100000058b90c0b4902831c611d5b565b6801000000b17218355102831c611d4f565b680100000162e430e5a202831c611d43565b6801000002c5c863b73f02831c611d37565b68010000058b90cf1e6e02831c611d2b565b680100000b1721bcfc9a02831c611d1f565b68010000162e43f4f83102831c611d13565b680100002c5c89d5ec6d02831c611d07565b6801000058b91b5bc9ae02831c611cfb565b68010000b17255775c0402831c611cef565b6801000162e525ee054702831c611ce3565b68010002c5cc37da949202831c611cd7565b680100058ba01fb9f96d02831c611ccb565b6801000b175effdc76ba02831c611cbf565b680100162f3904051fa102831c611cb3565b6801002c605e2e8cec5002831c611ca7565b68010058c86da1c09ea202831c611c9b565b680100b1afa5abcbed6102831c611c8f565b68010163da9fb33356d802831c611c83565b680102c9a3e778060ee702831c611c77565b6801059b0d31585743ae02831c611c6b565b68010b5586cf9890f62a02831c611c5f565b6801172b83c7d517adce02831c611c53565b6801306fe0a31b7152df02831c611c47565b5068016a09e667f3bcc909607f1b611c3b565b6024906040519063e69458f960e01b82526004820152fd5b6000908181131561254257670de0b6b3a764000091828212612525576001925b81818405600160801b81101561251a575b600160401b811015612505575b600160201b8110156124f0575b620100008110156124db575b6101008110156124c6575b60108110156124b1575b6004811015612488575b60021115612468575b81810293811d9082821461245d57506706f05b59d3b20000905b83821361242f57505050500290565b808391020590671bc16d674ec8000082121561244f575b60011d90612420565b809194019360011d90612446565b925050929150020290565b600181018091111561240657634e487b7160e01b83526011600452602483fd5b60021c906002810180911161249d57906123fd565b634e487b7160e01b84526011600452602484fd5b60041c906004810180911161249d57906123f3565b60081c906008810180911161249d57906123e9565b60101c906010810180911161249d57906123de565b60201c906020810180911161249d57906123d2565b60401c906040810180911161249d57906123c5565b60809150811c6123b8565b600019926a0c097ce7bc90715b34b9f160241b92909204916123a7565b6024906040519063309fa7dd60e11b82526004820152fd5b906125648261167a565b6040906125738251918261163f565b8381528093612584601f199161167a565b019060005b8281106125965750505050565b835180850191906001600160401b0383118184101761160e5760209286526000815282600081830152828501015201612589565b3d15612604573d906001600160401b03821161160e57604051916125f8601f8201601f19166020018461163f565b82523d6000602084013e565b606090565b6001600160a01b039091168152602081019190915260400190565b6001600160a01b0381166000908152600160205260408082209051919493929061264d836115f3565b60ff8154166002811015612d735783526001810154602084015260028101546001600160a01b0316604084015261268d9060049061086d6003820161181c565b6080830152606082015151604083015190939081906001600160a01b0390811690841681141580612ce8575b612c7a575b50506126c9846118ad565b93865b8161ffff8216101561277f57602490602060018060a01b036126f661ffff841660608a0151611876565b5116604051938480926370a0823160e01b82523060048301525afa801561277457899061273c575b612737925061273161ffff831689611876565b5261179b565b6126cc565b506020823d60201161276c575b816127566020938361163f565b8101031261276857612737915161271e565b8880fd5b3d9150612749565b6040513d8b823e3d90fd5b50919495939092956127908361167a565b9161279e604051938461163f565b838352601f196127ad8561167a565b013660208501376127bd846118ad565b93865b61ffff811682811015612804579088612731838d6127ec6127ff96606060018060a01b03930151611876565b51166127f8828b611876565b5289611876565b6127c0565b5050949693909592919660018060a01b0360408a0151169160208a015193604051926001602085015260408401526040835282606081011060018060401b03606085011117612c66576001600160401b0360e084019081116060850190911017612c665760e08301604052606083015260808201528060a08101528360c0820152813b15612c6257918391604051938492638bdb391360e01b845260048401523060248401523060448401526080606484015261010483019060608101519160806084860152825180915260206101248601930190865b818110612c3d575050506080810151916083198582030160a486015260208084519283815201930190865b818110612c215750505060a08101518483036083190160c486015280518084529190865b838110612c0757505084838360c06020948a868198879a0101520151151560e4840152601f8019910116010301925af18015612bfc57612bd1575b50906060860151908151156117c6576020909101516001600160a01b03908116911603612ae1576000198201828111612acd576129a19061255a565b9260015b61ffff811684811015612ac4576024602060018060a01b036129cb8460608d0151611876565b5116604051928380926370a0823160e01b82523060048301525afa8015612ab9578590612a85575b612a099150612a028386611876565b519061191c565b9060018060a01b03612a1f8260608c0151611876565b51169160405192612a2f84611624565b8352602083015261ffff600019820111612a7157612a6c9291612a66916000190161ffff1690612a5f828a611876565b5287611876565b5061179b565b6129a5565b634e487b7160e01b85526011600452602485fd5b506020813d602011612ab1575b81612a9f6020938361163f565b8101031261048e57612a0990516129f3565b3d9150612a92565b6040513d87823e3d90fd5b50505050509150565b634e487b7160e01b82526011600452602482fd5b612aed8293959261255a565b94815b61ffff81169085821015612bc9576024602060018060a01b03612b178560608a0151611876565b5116604051928380926370a0823160e01b82523060048301525afa908115612ab9578591612b95575b5082612b56612a6692612a02612b909688611876565b60608801516001600160a01b0390612b6f908490611876565b51169060405191612b7f83611624565b825260208201526127f8828c611876565b612af0565b90506020813d602011612bc1575b81612bb06020938361163f565b8101031261048e5751612b90612b40565b3d9150612ba3565b505050505050565b6001600160401b038111612be85760405238612965565b634e487b7160e01b82526041600452602482fd5b6040513d84823e3d90fd5b60208183018101518683018201528a98508997500161292a565b8251855289975088965060209485019490920191600101612906565b82516001600160a01b03168552899750889650602094850194909201916001016128db565b8380fd5b634e487b7160e01b86526041600452602486fd5b60405163095ea7b360e01b81529160209183918291612c9d919060048401612609565b03818a6001600160a01b0388165af18015612cdd57612cbe575b81906126be565b612cd69060203d6020116111795761116b818361163f565b5038612cb7565b6040513d89823e3d90fd5b50604051636eb1769f60e11b81523060048201526024810182905291506020826044816001600160a01b0388165afa8015612d685783928991612d2e575b5082116126b9565b9250506020823d602011612d60575b81612d4a6020938361163f565b81010312612d5c578280925190612d26565b8780fd5b3d9150612d3d565b6040513d8a823e3d90fd5b634e487b7160e01b87526021600452602487fdfea26469706673582212204252360a9a29a89efb47867f841746bf6ce8c5ef2314f1b3706c00cc89d7360964736f6c63430008110033",
"devdoc": {
"details": "See ILPAdapter interface for full details.",
"kind": "dev",
"methods": {
"getFiatPrice1e18(address)": {
"params": {
"asset": "- address of erc20 token contract"
},
"returns": {
"_0": "usdPrice1e18 such that asset.balanceOf() * getFiatPrice1e18(asset) / 1e18 == $$ * 1e18*"
}
},
"isAdapterLP(address)": {
"params": {
"asset": "- address of LP token to check*"
}
},
"registerLP(address,uint8)": {
"params": {
"lp": "LP token to find and set the corresponding info.*"
}
},
"supportsInterface(bytes4)": {
"details": "Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas."
},
"withdraw(address,uint256)": {
"params": {
"amount": "- amount of asset to withdraw/unwrap*",
"asset": "- address of LP token to withdraw/unwrap"
}
}
},
"title": "BalancerAdapterWeighted",
"version": 1
},
"userdoc": {
"errors": {
"PRBMathSD59x18__DivInputTooSmall()": [
{
"notice": "Emitted when one of the inputs is MIN_SD59x18."
}
],
"PRBMathSD59x18__DivOverflow(uint256)": [
{
"notice": "Emitted when one of the intermediary unsigned results overflows SD59x18."
}
],
"PRBMathSD59x18__Exp2InputTooBig(int256)": [
{
"notice": "Emitted when the input is greater than 192."
}
],
"PRBMathSD59x18__FromIntOverflow(int256)": [
{
"notice": "Emitted when converting a basic integer to the fixed-point format overflows SD59x18."
}
],
"PRBMathSD59x18__FromIntUnderflow(int256)": [
{
"notice": "Emitted when converting a basic integer to the fixed-point format underflows SD59x18."
}
],
"PRBMathSD59x18__LogInputTooSmall(int256)": [
{
"notice": "Emitted when the input is less than or equal to zero."
}
],
"PRBMathSD59x18__MulInputTooSmall()": [
{
"notice": "Emitted when one of the inputs is MIN_SD59x18."
}
],
"PRBMathSD59x18__MulOverflow(uint256)": [
{
"notice": "Emitted when the intermediary absolute result overflows SD59x18."
}
],
"PRBMath__MulDivFixedPointOverflow(uint256)": [
{
"notice": "Emitted when the result overflows uint256."
}
],
"PRBMath__MulDivOverflow(uint256,uint256)": [
{
"notice": "Emitted when the result overflows uint256."
}
]
},
"kind": "user",
"methods": {
"getFiatPrice1e18(address)": {
"notice": "WARNING! Read this description very carefully! function getFiatPrice1e18(address asset) returns (uint256) that: basicAmountOfAsset * getFiatPrice1e18(asset) / 1e18 === $$ * 1e18 in other words, it doesn't matter what's the erc20.decimals is, you just multiply token balance in basic units on value from oracle and get dollar amount multiplied on 1e18. different assets have different deviation threshold (errors) for wBTC it's <= 0.5%, read more https://data.chain.link/ethereum/mainnet/crypto-usd/btc-usd for other asset is can be larger based on particular oracle implementation. examples: market price of btc = $30k, for 0.1 wBTC the unit256 amount is 0.1 * 1e18 0.1 * 1e18 * (price1e18 / 1e18) == $3000 == uint256(3000*1e18) => price1e18 = 30000 * 1e18; market price of usdt = $0.97, for 1 usdt uint256 = 1 * 1e6 so 1*1e6 * price1e18 / 1e18 == $0.97 == uint256(0.97*1e18) => 1*1e6 * (price1e18 / 1e18) / (0.97*1e18) = 1 => price1e18 = 0.97 * (1e18/1e6) * 1e18 assume market price of wBTC = $31,503.77, oracle error = $158 case #1: small amount of wBTC we have 0.0,000,001 wBTC that is worth v = $0.00315 ± $0.00001 = 0.00315*1e18 = 315*1e13 ± 1*1e13 actual balance on the asset b = wBTC.balanceOf() = 0.0000001*1e18 = 1e11 oracle should return or = oracle.getFiatPrice1e18(wBTC) <=> <=> b*or = v => v/b = 315*1e13 / 1e11 = 315*1e2 ± 1e2 error = or.error * b = 1e2 * 1e11 = 1e13 => 1e13/1e18 usd = 1e-5 = 0.00001 usd case #2: large amount of wBTC v = 2,000,000 wBTC = $31,503.77 * 2m ± 158*2m = $63,007,540,000 ± $316,000,000 = 63,007*1e24 ± 316*1e24 for calc convenience we increase error on 0.05 and have v = 63,000*24 ± 300*1e24 = (630 ± 3)*1e26 b = 2*1e6 * 1e18 = 2*1e24 or = v/b = (630 ± 3)*1e26 / 2*1e24 = 315*1e2 ± 1.5*1e2 error = or.error * b = 1.5*100 * 2*1e24 = 3*1e26 = 3*1e8*1e18 = $300,000,000 ~ $316,000,000 assume the market price of USDT = $0.97 ± $0.00485, case #3: little amount of USDT v = USDT amount 0.005 = 0.005*(0.97 ± 0.00485) = 0.00485*1e18 ± 0.00002425*1e18 = 485*1e13 ± 3*1e13 we rounded error up on (3000-2425)/2425 ~= +24% for calculation convenience. b = USDT.balanceOf() = 0.005*1e6 = 5*1e3 b*or = v => or = v/b = (485*1e13 ± 3*1e13) / 5*1e3 = 970*1e9 ± 6*1e9 error = 6*1e9 * 5*1e3 / 1e18 = 30*1e12/1e18 = 3*1e-5 = $0,00005 case #4: lot of USDT v = we have 100,000,000,000 USDT = $97B = 97*1e9*1e18 ± 0.5*1e9*1e18 b = USDT.balanceOf() = 1e11*1e6 = 1e17 or = v/b = (97*1e9*1e18 ± 0.5*1e9*1e18) / 1e17 = 970*1e9 ± 5*1e9 error = 5*1e9 * 1e17 = 5*1e26 = 0.5 * 1e8*1e18"
},
"getFiatPrice1e18Unsafe(address)": {
"notice": "Deprecated - Simple version of oracle that can be attacked with flash-loan, only for tests"
},
"isAdapterLP(address)": {
"notice": "Returns if asset ig Balancer LP token, registered in our adapter"
},
"registerLP(address,uint8)": {
"notice": "Register the given LP token address and set the LP info. We go to the depth = 2, that means, that if LP token {lp} contains {lp1} and {erc20Token1} as underlying tokens, where lp1 contains {erc20Token0} and {erc20Token2}, then we will register that {lp} has {erc20Token0}, {erc20Token2} and {erc20Token1} as underlying tokens."
},
"withdraw(address,uint256)": {
"notice": "Unwrap LP token with depth = 2 (if underlying token is LP => it's also unwrapping)"
}
},
"notice": "Adapter for Balancer Weighted LP token.",
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 671,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8"
},
{
"astId": 674,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool"
},
{
"astId": 28586,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "ACCESS_CONTROL_SINGLETON",
"offset": 2,
"slot": "0",
"type": "t_contract(ISuAccessControl)32175"
},
{
"astId": 28813,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "lps",
"offset": 0,
"slot": "1",
"type": "t_mapping(t_address,t_struct(LPInfoAdapter)28801_storage)"
},
{
"astId": 28816,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "ORACLE",
"offset": 0,
"slot": "2",
"type": "t_contract(ISuOracle)32359"
},
{
"astId": 29889,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "__gap",
"offset": 0,
"slot": "3",
"type": "t_array(t_uint256)45_storage"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_contract(IERC20)5992)dyn_storage": {
"base": "t_contract(IERC20)5992",
"encoding": "dynamic_array",
"label": "contract IERC20[]",
"numberOfBytes": "32"
},
"t_array(t_uint256)45_storage": {
"base": "t_uint256",
"encoding": "inplace",
"label": "uint256[45]",
"numberOfBytes": "1440"
},
"t_bool": {
"encoding": "inplace",
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"encoding": "inplace",
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(IERC20)5992": {
"encoding": "inplace",
"label": "contract IERC20",
"numberOfBytes": "20"
},
"t_contract(ISuAccessControl)32175": {
"encoding": "inplace",
"label": "contract ISuAccessControl",
"numberOfBytes": "20"
},
"t_contract(ISuOracle)32359": {
"encoding": "inplace",
"label": "contract ISuOracle",
"numberOfBytes": "20"
},
"t_contract(IVault)35174": {
"encoding": "inplace",
"label": "contract IVault",
"numberOfBytes": "20"
},
"t_enum(WeightedPoolType)28784": {
"encoding": "inplace",
"label": "enum WeightedPoolType",
"numberOfBytes": "1"
},
"t_mapping(t_address,t_struct(LPInfoAdapter)28801_storage)": {
"encoding": "mapping",
"key": "t_address",
"label": "mapping(address => struct LPInfoAdapter)",
"numberOfBytes": "32",
"value": "t_struct(LPInfoAdapter)28801_storage"
},
"t_struct(LPInfoAdapter)28801_storage": {
"encoding": "inplace",
"label": "struct LPInfoAdapter",
"members": [
{
"astId": 28787,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "poolType",
"offset": 0,
"slot": "0",
"type": "t_enum(WeightedPoolType)28784"
},
{
"astId": 28789,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "poolId",
"offset": 0,
"slot": "1",
"type": "t_bytes32"
},
{
"astId": 28792,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "vault",
"offset": 0,
"slot": "2",
"type": "t_contract(IVault)35174"
},
{
"astId": 28796,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "underlyingTokens",
"offset": 0,
"slot": "3",
"type": "t_array(t_contract(IERC20)5992)dyn_storage"
},
{
"astId": 28800,
"contract": "contracts/periphery/contracts/adapters/BalancerAdapterWeighted.sol:BalancerAdapterWeighted",
"label": "underlyingTokensExpanded",
"offset": 0,
"slot": "4",
"type": "t_array(t_contract(IERC20)5992)dyn_storage"
}
],
"numberOfBytes": "160"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"encoding": "inplace",
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}