@venusprotocol/protocol-reserve 2.4.0 → 3.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deployments/arbitrumsepolia/ConverterNetwork.json +723 -0
- package/deployments/arbitrumsepolia/ConverterNetwork_Implementation.json +828 -0
- package/deployments/arbitrumsepolia/ConverterNetwork_Proxy.json +277 -0
- package/deployments/arbitrumsepolia/SingleTokenConverterBeacon.json +206 -0
- package/deployments/arbitrumsepolia/SingleTokenConverterImp.json +2170 -0
- package/deployments/arbitrumsepolia/USDCPrimeConverter.json +229 -0
- package/deployments/arbitrumsepolia/USDTPrimeConverter.json +229 -0
- package/deployments/arbitrumsepolia/WBTCPrimeConverter.json +229 -0
- package/deployments/arbitrumsepolia/WETHPrimeConverter.json +229 -0
- package/deployments/arbitrumsepolia/XVSVaultConverter.json +229 -0
- package/deployments/arbitrumsepolia/XVSVaultTreasury.json +627 -0
- package/deployments/arbitrumsepolia/XVSVaultTreasury_Implementation.json +672 -0
- package/deployments/arbitrumsepolia/XVSVaultTreasury_Proxy.json +281 -0
- package/deployments/arbitrumsepolia/solcInputs/176b6b19adc371c32ad674fe4863e12d.json +238 -0
- package/deployments/arbitrumsepolia.json +4936 -889
- package/deployments/arbitrumsepolia_addresses.json +14 -1
- package/dist/deploy/{001-psr.d.ts → 000-psr.d.ts} +1 -1
- package/dist/deploy/000-psr.d.ts.map +1 -0
- package/dist/deploy/000-psr.js +67 -0
- package/dist/deploy/000-psr.js.map +1 -0
- package/dist/deploy/{006-risk-fund-v2.d.ts → 001-risk-fund-v2.d.ts} +1 -1
- package/dist/deploy/001-risk-fund-v2.d.ts.map +1 -0
- package/dist/deploy/001-risk-fund-v2.js +38 -0
- package/dist/deploy/001-risk-fund-v2.js.map +1 -0
- package/dist/deploy/002-risk-fund-converter.d.ts.map +1 -1
- package/dist/deploy/002-risk-fund-converter.js +48 -54
- package/dist/deploy/002-risk-fund-converter.js.map +1 -1
- package/dist/deploy/003-xvs-vault-treasury.d.ts.map +1 -1
- package/dist/deploy/003-xvs-vault-treasury.js +21 -29
- package/dist/deploy/003-xvs-vault-treasury.js.map +1 -1
- package/dist/deploy/004-single-token-converter.d.ts.map +1 -1
- package/dist/deploy/004-single-token-converter.js +86 -87
- package/dist/deploy/004-single-token-converter.js.map +1 -1
- package/dist/deploy/005-converter-network.d.ts.map +1 -1
- package/dist/deploy/005-converter-network.js +19 -27
- package/dist/deploy/005-converter-network.js.map +1 -1
- package/dist/hardhat.config.d.ts.map +1 -1
- package/dist/hardhat.config.js +10 -13
- package/dist/hardhat.config.js.map +1 -1
- package/dist/helpers/utils.d.ts +0 -1
- package/dist/helpers/utils.d.ts.map +1 -1
- package/dist/helpers/utils.js +1 -2
- package/dist/helpers/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/deploy/001-psr.d.ts.map +0 -1
- package/dist/deploy/001-psr.js +0 -76
- package/dist/deploy/001-psr.js.map +0 -1
- package/dist/deploy/006-risk-fund-v2.d.ts.map +0 -1
- package/dist/deploy/006-risk-fund-v2.js +0 -43
- package/dist/deploy/006-risk-fund-v2.js.map +0 -1
|
@@ -0,0 +1,828 @@
|
|
|
1
|
+
{
|
|
2
|
+
"address": "0xa5FD972D51aC9a74Bb02E9072CE8b3eC33BfB832",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [],
|
|
6
|
+
"stateMutability": "nonpayable",
|
|
7
|
+
"type": "constructor"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"inputs": [],
|
|
11
|
+
"name": "ConverterAlreadyExists",
|
|
12
|
+
"type": "error"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"inputs": [],
|
|
16
|
+
"name": "ConverterDoesNotExist",
|
|
17
|
+
"type": "error"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"inputs": [
|
|
21
|
+
{
|
|
22
|
+
"internalType": "uint256",
|
|
23
|
+
"name": "loopsLimit",
|
|
24
|
+
"type": "uint256"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"name": "InvalidMaxLoopsLimit",
|
|
28
|
+
"type": "error"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"inputs": [],
|
|
32
|
+
"name": "InvalidTokenConverterAddress",
|
|
33
|
+
"type": "error"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"inputs": [
|
|
37
|
+
{
|
|
38
|
+
"internalType": "uint256",
|
|
39
|
+
"name": "loopsLimit",
|
|
40
|
+
"type": "uint256"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"internalType": "uint256",
|
|
44
|
+
"name": "requiredLoops",
|
|
45
|
+
"type": "uint256"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "MaxLoopsLimitExceeded",
|
|
49
|
+
"type": "error"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"inputs": [
|
|
53
|
+
{
|
|
54
|
+
"internalType": "address",
|
|
55
|
+
"name": "sender",
|
|
56
|
+
"type": "address"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"internalType": "address",
|
|
60
|
+
"name": "calledContract",
|
|
61
|
+
"type": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"internalType": "string",
|
|
65
|
+
"name": "methodSignature",
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"name": "Unauthorized",
|
|
70
|
+
"type": "error"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"inputs": [],
|
|
74
|
+
"name": "ZeroAddressNotAllowed",
|
|
75
|
+
"type": "error"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"anonymous": false,
|
|
79
|
+
"inputs": [
|
|
80
|
+
{
|
|
81
|
+
"indexed": true,
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "converter",
|
|
84
|
+
"type": "address"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"name": "ConverterAdded",
|
|
88
|
+
"type": "event"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"anonymous": false,
|
|
92
|
+
"inputs": [
|
|
93
|
+
{
|
|
94
|
+
"indexed": true,
|
|
95
|
+
"internalType": "address",
|
|
96
|
+
"name": "converter",
|
|
97
|
+
"type": "address"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"name": "ConverterRemoved",
|
|
101
|
+
"type": "event"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"anonymous": false,
|
|
105
|
+
"inputs": [
|
|
106
|
+
{
|
|
107
|
+
"indexed": false,
|
|
108
|
+
"internalType": "uint8",
|
|
109
|
+
"name": "version",
|
|
110
|
+
"type": "uint8"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"name": "Initialized",
|
|
114
|
+
"type": "event"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"anonymous": false,
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"indexed": false,
|
|
121
|
+
"internalType": "uint256",
|
|
122
|
+
"name": "oldMaxLoopsLimit",
|
|
123
|
+
"type": "uint256"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"indexed": false,
|
|
127
|
+
"internalType": "uint256",
|
|
128
|
+
"name": "newmaxLoopsLimit",
|
|
129
|
+
"type": "uint256"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"name": "MaxLoopsLimitUpdated",
|
|
133
|
+
"type": "event"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"anonymous": false,
|
|
137
|
+
"inputs": [
|
|
138
|
+
{
|
|
139
|
+
"indexed": false,
|
|
140
|
+
"internalType": "address",
|
|
141
|
+
"name": "oldAccessControlManager",
|
|
142
|
+
"type": "address"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"indexed": false,
|
|
146
|
+
"internalType": "address",
|
|
147
|
+
"name": "newAccessControlManager",
|
|
148
|
+
"type": "address"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"name": "NewAccessControlManager",
|
|
152
|
+
"type": "event"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"anonymous": false,
|
|
156
|
+
"inputs": [
|
|
157
|
+
{
|
|
158
|
+
"indexed": true,
|
|
159
|
+
"internalType": "address",
|
|
160
|
+
"name": "previousOwner",
|
|
161
|
+
"type": "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"indexed": true,
|
|
165
|
+
"internalType": "address",
|
|
166
|
+
"name": "newOwner",
|
|
167
|
+
"type": "address"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"name": "OwnershipTransferStarted",
|
|
171
|
+
"type": "event"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"anonymous": false,
|
|
175
|
+
"inputs": [
|
|
176
|
+
{
|
|
177
|
+
"indexed": true,
|
|
178
|
+
"internalType": "address",
|
|
179
|
+
"name": "previousOwner",
|
|
180
|
+
"type": "address"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"indexed": true,
|
|
184
|
+
"internalType": "address",
|
|
185
|
+
"name": "newOwner",
|
|
186
|
+
"type": "address"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"name": "OwnershipTransferred",
|
|
190
|
+
"type": "event"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"inputs": [],
|
|
194
|
+
"name": "acceptOwnership",
|
|
195
|
+
"outputs": [],
|
|
196
|
+
"stateMutability": "nonpayable",
|
|
197
|
+
"type": "function"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"inputs": [],
|
|
201
|
+
"name": "accessControlManager",
|
|
202
|
+
"outputs": [
|
|
203
|
+
{
|
|
204
|
+
"internalType": "contract IAccessControlManagerV8",
|
|
205
|
+
"name": "",
|
|
206
|
+
"type": "address"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"stateMutability": "view",
|
|
210
|
+
"type": "function"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"inputs": [
|
|
214
|
+
{
|
|
215
|
+
"internalType": "contract IAbstractTokenConverter",
|
|
216
|
+
"name": "_tokenConverter",
|
|
217
|
+
"type": "address"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"name": "addTokenConverter",
|
|
221
|
+
"outputs": [],
|
|
222
|
+
"stateMutability": "nonpayable",
|
|
223
|
+
"type": "function"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"inputs": [
|
|
227
|
+
{
|
|
228
|
+
"internalType": "uint256",
|
|
229
|
+
"name": "",
|
|
230
|
+
"type": "uint256"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"name": "allConverters",
|
|
234
|
+
"outputs": [
|
|
235
|
+
{
|
|
236
|
+
"internalType": "contract IAbstractTokenConverter",
|
|
237
|
+
"name": "",
|
|
238
|
+
"type": "address"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"stateMutability": "view",
|
|
242
|
+
"type": "function"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"inputs": [
|
|
246
|
+
{
|
|
247
|
+
"internalType": "address",
|
|
248
|
+
"name": "_tokenAddressIn",
|
|
249
|
+
"type": "address"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"internalType": "address",
|
|
253
|
+
"name": "_tokenAddressOut",
|
|
254
|
+
"type": "address"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"name": "findTokenConverters",
|
|
258
|
+
"outputs": [
|
|
259
|
+
{
|
|
260
|
+
"internalType": "address[]",
|
|
261
|
+
"name": "converters",
|
|
262
|
+
"type": "address[]"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"internalType": "uint256[]",
|
|
266
|
+
"name": "convertersBalance",
|
|
267
|
+
"type": "uint256[]"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"stateMutability": "nonpayable",
|
|
271
|
+
"type": "function"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"inputs": [
|
|
275
|
+
{
|
|
276
|
+
"internalType": "address",
|
|
277
|
+
"name": "_tokenAddressIn",
|
|
278
|
+
"type": "address"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"internalType": "address",
|
|
282
|
+
"name": "_tokenAddressOut",
|
|
283
|
+
"type": "address"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"name": "findTokenConvertersForConverters",
|
|
287
|
+
"outputs": [
|
|
288
|
+
{
|
|
289
|
+
"internalType": "address[]",
|
|
290
|
+
"name": "converters",
|
|
291
|
+
"type": "address[]"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"internalType": "uint256[]",
|
|
295
|
+
"name": "convertersBalance",
|
|
296
|
+
"type": "uint256[]"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"stateMutability": "nonpayable",
|
|
300
|
+
"type": "function"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"inputs": [],
|
|
304
|
+
"name": "getAllConverters",
|
|
305
|
+
"outputs": [
|
|
306
|
+
{
|
|
307
|
+
"internalType": "contract IAbstractTokenConverter[]",
|
|
308
|
+
"name": "converters",
|
|
309
|
+
"type": "address[]"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"stateMutability": "view",
|
|
313
|
+
"type": "function"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"inputs": [
|
|
317
|
+
{
|
|
318
|
+
"internalType": "address",
|
|
319
|
+
"name": "_accessControlManager",
|
|
320
|
+
"type": "address"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"internalType": "uint256",
|
|
324
|
+
"name": "_loopsLimit",
|
|
325
|
+
"type": "uint256"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"name": "initialize",
|
|
329
|
+
"outputs": [],
|
|
330
|
+
"stateMutability": "nonpayable",
|
|
331
|
+
"type": "function"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"inputs": [
|
|
335
|
+
{
|
|
336
|
+
"internalType": "address",
|
|
337
|
+
"name": "_tokenConverter",
|
|
338
|
+
"type": "address"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"name": "isTokenConverter",
|
|
342
|
+
"outputs": [
|
|
343
|
+
{
|
|
344
|
+
"internalType": "bool",
|
|
345
|
+
"name": "isConverter",
|
|
346
|
+
"type": "bool"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"stateMutability": "view",
|
|
350
|
+
"type": "function"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"inputs": [],
|
|
354
|
+
"name": "maxLoopsLimit",
|
|
355
|
+
"outputs": [
|
|
356
|
+
{
|
|
357
|
+
"internalType": "uint256",
|
|
358
|
+
"name": "",
|
|
359
|
+
"type": "uint256"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"stateMutability": "view",
|
|
363
|
+
"type": "function"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"inputs": [],
|
|
367
|
+
"name": "owner",
|
|
368
|
+
"outputs": [
|
|
369
|
+
{
|
|
370
|
+
"internalType": "address",
|
|
371
|
+
"name": "",
|
|
372
|
+
"type": "address"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"stateMutability": "view",
|
|
376
|
+
"type": "function"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"inputs": [],
|
|
380
|
+
"name": "pendingOwner",
|
|
381
|
+
"outputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "address",
|
|
384
|
+
"name": "",
|
|
385
|
+
"type": "address"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"stateMutability": "view",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [
|
|
393
|
+
{
|
|
394
|
+
"internalType": "contract IAbstractTokenConverter",
|
|
395
|
+
"name": "_tokenConverter",
|
|
396
|
+
"type": "address"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"name": "removeTokenConverter",
|
|
400
|
+
"outputs": [],
|
|
401
|
+
"stateMutability": "nonpayable",
|
|
402
|
+
"type": "function"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"inputs": [],
|
|
406
|
+
"name": "renounceOwnership",
|
|
407
|
+
"outputs": [],
|
|
408
|
+
"stateMutability": "nonpayable",
|
|
409
|
+
"type": "function"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"inputs": [
|
|
413
|
+
{
|
|
414
|
+
"internalType": "address",
|
|
415
|
+
"name": "accessControlManager_",
|
|
416
|
+
"type": "address"
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"name": "setAccessControlManager",
|
|
420
|
+
"outputs": [],
|
|
421
|
+
"stateMutability": "nonpayable",
|
|
422
|
+
"type": "function"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"inputs": [
|
|
426
|
+
{
|
|
427
|
+
"internalType": "uint256",
|
|
428
|
+
"name": "limit",
|
|
429
|
+
"type": "uint256"
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
"name": "setMaxLoopsLimit",
|
|
433
|
+
"outputs": [],
|
|
434
|
+
"stateMutability": "nonpayable",
|
|
435
|
+
"type": "function"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"inputs": [
|
|
439
|
+
{
|
|
440
|
+
"internalType": "address",
|
|
441
|
+
"name": "newOwner",
|
|
442
|
+
"type": "address"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"name": "transferOwnership",
|
|
446
|
+
"outputs": [],
|
|
447
|
+
"stateMutability": "nonpayable",
|
|
448
|
+
"type": "function"
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
"transactionHash": "0xa94ec929a3f70b001e1d7a329293e4a28a3efec86568cf6f38a5e4fc4ff178a6",
|
|
452
|
+
"receipt": {
|
|
453
|
+
"to": null,
|
|
454
|
+
"from": "0x638Eb8DFfF094Fd1d52c5A198b44984806C521E5",
|
|
455
|
+
"contractAddress": "0xa5FD972D51aC9a74Bb02E9072CE8b3eC33BfB832",
|
|
456
|
+
"transactionIndex": 1,
|
|
457
|
+
"gasUsed": "1985279",
|
|
458
|
+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000004000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000",
|
|
459
|
+
"blockHash": "0xfe837de8527f0702ff0ae948c73804a47a4cf38e8033d5ec3559c2a73ce2b1cb",
|
|
460
|
+
"transactionHash": "0xa94ec929a3f70b001e1d7a329293e4a28a3efec86568cf6f38a5e4fc4ff178a6",
|
|
461
|
+
"logs": [
|
|
462
|
+
{
|
|
463
|
+
"transactionIndex": 1,
|
|
464
|
+
"blockNumber": 94298892,
|
|
465
|
+
"transactionHash": "0xa94ec929a3f70b001e1d7a329293e4a28a3efec86568cf6f38a5e4fc4ff178a6",
|
|
466
|
+
"address": "0xa5FD972D51aC9a74Bb02E9072CE8b3eC33BfB832",
|
|
467
|
+
"topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
|
|
468
|
+
"data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
|
|
469
|
+
"logIndex": 0,
|
|
470
|
+
"blockHash": "0xfe837de8527f0702ff0ae948c73804a47a4cf38e8033d5ec3559c2a73ce2b1cb"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"blockNumber": 94298892,
|
|
474
|
+
"cumulativeGasUsed": "1985279",
|
|
475
|
+
"status": 1,
|
|
476
|
+
"byzantium": true
|
|
477
|
+
},
|
|
478
|
+
"args": [],
|
|
479
|
+
"numDeployments": 1,
|
|
480
|
+
"solcInputHash": "176b6b19adc371c32ad674fe4863e12d",
|
|
481
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ConverterAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConverterDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"loopsLimit\",\"type\":\"uint256\"}],\"name\":\"InvalidMaxLoopsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenConverterAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"loopsLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredLoops\",\"type\":\"uint256\"}],\"name\":\"MaxLoopsLimitExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"converter\",\"type\":\"address\"}],\"name\":\"ConverterAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"converter\",\"type\":\"address\"}],\"name\":\"ConverterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLoopsLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newmaxLoopsLimit\",\"type\":\"uint256\"}],\"name\":\"MaxLoopsLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlManager\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlManager\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAbstractTokenConverter\",\"name\":\"_tokenConverter\",\"type\":\"address\"}],\"name\":\"addTokenConverter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"allConverters\",\"outputs\":[{\"internalType\":\"contract IAbstractTokenConverter\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddressIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenAddressOut\",\"type\":\"address\"}],\"name\":\"findTokenConverters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"converters\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"convertersBalance\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddressIn\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_tokenAddressOut\",\"type\":\"address\"}],\"name\":\"findTokenConvertersForConverters\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"converters\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"convertersBalance\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllConverters\",\"outputs\":[{\"internalType\":\"contract IAbstractTokenConverter[]\",\"name\":\"converters\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_accessControlManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_loopsLimit\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenConverter\",\"type\":\"address\"}],\"name\":\"isTokenConverter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isConverter\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLoopsLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IAbstractTokenConverter\",\"name\":\"_tokenConverter\",\"type\":\"address\"}],\"name\":\"removeTokenConverter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"setMaxLoopsLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"custom:security-contact\":\"https://github.com/VenusProtocol/protocol-reserve#discussion\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"addTokenConverter(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"ConverterAdded is emitted on success\",\"params\":{\"_tokenConverter\":\"Address of the token converter\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"findTokenConverters(address,address)\":{\"params\":{\"_tokenAddressIn\":\"Address of tokenIn\",\"_tokenAddressOut\":\"Address of tokenOut\"},\"returns\":{\"converters\":\"Array of the conveters on the basis of the tokens pair\",\"convertersBalance\":\"Array of balances with respect to token out\"}},\"findTokenConvertersForConverters(address,address)\":{\"params\":{\"_tokenAddressIn\":\"Address of tokenIn\",\"_tokenAddressOut\":\"Address of tokenOut\"},\"returns\":{\"converters\":\"Array of the conveters on the basis of the tokens pair\",\"convertersBalance\":\"Array of balances with respect to token out\"}},\"getAllConverters()\":{\"returns\":{\"converters\":\"Array containing all the converters addresses\"}},\"initialize(address,uint256)\":{\"custom:error\":\"InvalidMaxLoopsLimit is thrown when when loops limit is invalid\",\"custom:event\":\"ConverterAdded is emitted for each converter added on success\",\"params\":{\"_accessControlManager\":\"The address of ACM contract\",\"_loopsLimit\":\"Limit for the loops in the contract to avoid DOS\"}},\"isTokenConverter(address)\":{\"params\":{\"_tokenConverter\":\"Address of the token converter\"},\"returns\":{\"isConverter\":\"true if given address is converter otherwise false\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"removeTokenConverter(address)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"ConverterDoesNotExist is thrown when converter to remove does not exist\",\"custom:event\":\"ConverterRemoved is emitted on success\",\"params\":{\"_tokenConverter\":\"Address of the token converter\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setAccessControlManager(address)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits NewAccessControlManager event\",\"details\":\"Admin function to set address of AccessControlManager\",\"params\":{\"accessControlManager_\":\"The new address of the AccessControlManager\"}},\"setMaxLoopsLimit(uint256)\":{\"custom:access\":\"Only owner\",\"custom:error\":\"InvalidMaxLoopsLimit is thrown when when loops limit is invalid\",\"params\":{\"limit\":\"Limit for the max loops can execute at a time\"}},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"}},\"title\":\"ConverterNetwork\",\"version\":1},\"userdoc\":{\"errors\":{\"ConverterAlreadyExists()\":[{\"notice\":\"Error thrown when converter already exists\"}],\"ConverterDoesNotExist()\":[{\"notice\":\"Error thrown converter does not exist\"}],\"InvalidMaxLoopsLimit(uint256)\":[{\"notice\":\"Error thrown when loops limit is invalid\"}],\"InvalidTokenConverterAddress()\":[{\"notice\":\"Error thrown when converter address is invalid\"}],\"MaxLoopsLimitExceeded(uint256,uint256)\":[{\"notice\":\"Thrown an error on maxLoopsLimit exceeds for any loop\"}],\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"ConverterAdded(address)\":{\"notice\":\"Emitted when new converter is added\"},\"ConverterRemoved(address)\":{\"notice\":\"Emitted when converter is removed\"},\"MaxLoopsLimitUpdated(uint256,uint256)\":{\"notice\":\"Emitted when max loops limit is set\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"}},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"addTokenConverter(address)\":{\"notice\":\"Adds new converter to the array\"},\"allConverters(uint256)\":{\"notice\":\"Array holding all the converters\"},\"findTokenConverters(address,address)\":{\"notice\":\"Used to get the array of converters supporting conversions, arranged in descending order based on token balances It will return the converters which are open to users for conversion\"},\"findTokenConvertersForConverters(address,address)\":{\"notice\":\"Used to get the array of converters supporting conversions, arranged in descending order based on token balances It will return the converters which are open to converters for conversion.\"},\"getAllConverters()\":{\"notice\":\"This function returns the array containing all the converters addresses\"},\"initialize(address,uint256)\":{\"notice\":\"ConverterNetwork initializer\"},\"isTokenConverter(address)\":{\"notice\":\"This function checks if the given address is a converter or not\"},\"removeTokenConverter(address)\":{\"notice\":\"Removes converter from the array\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setMaxLoopsLimit(uint256)\":{\"notice\":\"Set the limit for the loops can iterate to avoid the DOS\"}},\"notice\":\"ConverterNetwork keeps track of all the converters and is used to fetch valid converters which provide conversions according to token addresses provided\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/TokenConverter/ConverterNetwork.sol\":\"ConverterNetwork\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"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/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.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/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.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 IAccessControl {\\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\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"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\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlledV8\\n * @author Venus\\n * @notice This contract is helper between access control manager and actual contract. This contract further inherited by other contract (using solidity 0.8.13)\\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\\n */\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/oracle/contracts/ResilientOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n// SPDX-FileCopyrightText: 2022 Venus\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"./interfaces/VBep20Interface.sol\\\";\\nimport \\\"./interfaces/OracleInterface.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\n\\n/**\\n * @title ResilientOracle\\n * @author Venus\\n * @notice The Resilient Oracle is the main contract that the protocol uses to fetch prices of assets.\\n * \\n * DeFi protocols are vulnerable to price oracle failures including oracle manipulation and incorrectly\\n * reported prices. If only one oracle is used, this creates a single point of failure and opens a vector\\n * for attacking the protocol.\\n * \\n * The Resilient Oracle uses multiple sources and fallback mechanisms to provide accurate prices and protect\\n * the protocol from oracle attacks. Currently it includes integrations with Chainlink, Pyth, Binance Oracle\\n * and TWAP (Time-Weighted Average Price) oracles. TWAP uses PancakeSwap as the on-chain price source.\\n * \\n * For every market (vToken) we configure the main, pivot and fallback oracles. The oracles are configured per \\n * vToken's underlying asset address. The main oracle oracle is the most trustworthy price source, the pivot \\n * oracle is used as a loose sanity checker and the fallback oracle is used as a backup price source. \\n * \\n * To validate prices returned from two oracles, we use an upper and lower bound ratio that is set for every\\n * market. The upper bound ratio represents the deviation between reported price (the price that\\u2019s being\\n * validated) and the anchor price (the price we are validating against) above which the reported price will\\n * be invalidated. The lower bound ratio presents the deviation between reported price and anchor price below\\n * which the reported price will be invalidated. So for oracle price to be considered valid the below statement\\n * should be true:\\n\\n```\\nanchorRatio = anchorPrice/reporterPrice\\nisValid = anchorRatio <= upperBoundAnchorRatio && anchorRatio >= lowerBoundAnchorRatio\\n```\\n\\n * In most cases, Chainlink is used as the main oracle, TWAP or Pyth oracles are used as the pivot oracle depending\\n * on which supports the given market and Binance oracle is used as the fallback oracle. For some markets we may\\n * use Pyth or TWAP as the main oracle if the token price is not supported by Chainlink or Binance oracles. \\n * \\n * For a fetched price to be valid it must be positive and not stagnant. If the price is invalid then we consider the\\n * oracle to be stagnant and treat it like it's disabled.\\n */\\ncontract ResilientOracle is PausableUpgradeable, AccessControlledV8, ResilientOracleInterface {\\n /**\\n * @dev Oracle roles:\\n * **main**: The most trustworthy price source\\n * **pivot**: Price oracle used as a loose sanity checker\\n * **fallback**: The backup source when main oracle price is invalidated\\n */\\n enum OracleRole {\\n MAIN,\\n PIVOT,\\n FALLBACK\\n }\\n\\n struct TokenConfig {\\n /// @notice asset address\\n address asset;\\n /// @notice `oracles` stores the oracles based on their role in the following order:\\n /// [main, pivot, fallback],\\n /// It can be indexed with the corresponding enum OracleRole value\\n address[3] oracles;\\n /// @notice `enableFlagsForOracles` stores the enabled state\\n /// for each oracle in the same order as `oracles`\\n bool[3] enableFlagsForOracles;\\n }\\n\\n uint256 public constant INVALID_PRICE = 0;\\n\\n /// @notice Native market address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable nativeMarket;\\n\\n /// @notice VAI address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vai;\\n\\n /// @notice Set this as asset address for Native token on each chain.This is the underlying for vBNB (on bsc)\\n /// and can serve as any underlying asset of a market that supports native tokens\\n address public constant NATIVE_TOKEN_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n /// @notice Bound validator contract address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n BoundValidatorInterface public immutable boundValidator;\\n\\n mapping(address => TokenConfig) private tokenConfigs;\\n\\n event TokenConfigAdded(\\n address indexed asset,\\n address indexed mainOracle,\\n address indexed pivotOracle,\\n address fallbackOracle\\n );\\n\\n /// Event emitted when an oracle is set\\n event OracleSet(address indexed asset, address indexed oracle, uint256 indexed role);\\n\\n /// Event emitted when an oracle is enabled or disabled\\n event OracleEnabled(address indexed asset, uint256 indexed role, bool indexed enable);\\n\\n /**\\n * @notice Checks whether an address is null or not\\n */\\n modifier notNullAddress(address someone) {\\n if (someone == address(0)) revert(\\\"can't be zero address\\\");\\n _;\\n }\\n\\n /**\\n * @notice Checks whether token config exists by checking whether asset is null address\\n * @dev address can't be null, so it's suitable to be used to check the validity of the config\\n * @param asset asset address\\n */\\n modifier checkTokenConfigExistence(address asset) {\\n if (tokenConfigs[asset].asset == address(0)) revert(\\\"token config must exist\\\");\\n _;\\n }\\n\\n /// @notice Constructor for the implementation contract. Sets immutable variables.\\n /// @dev nativeMarketAddress can be address(0) if on the chain we do not support native market\\n /// (e.g vETH on ethereum would not be supported, only vWETH)\\n /// @param nativeMarketAddress The address of a native market (for bsc it would be vBNB address)\\n /// @param vaiAddress The address of the VAI token (if there is VAI on the deployed chain).\\n /// Set to address(0) of VAI is not existent.\\n /// @param _boundValidator Address of the bound validator contract\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(\\n address nativeMarketAddress,\\n address vaiAddress,\\n BoundValidatorInterface _boundValidator\\n ) notNullAddress(address(_boundValidator)) {\\n nativeMarket = nativeMarketAddress;\\n vai = vaiAddress;\\n boundValidator = _boundValidator;\\n\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Initializes the contract admin and sets the BoundValidator contract address\\n * @param accessControlManager_ Address of the access control manager contract\\n */\\n function initialize(address accessControlManager_) external initializer {\\n __AccessControlled_init(accessControlManager_);\\n __Pausable_init();\\n }\\n\\n /**\\n * @notice Pauses oracle\\n * @custom:access Only Governance\\n */\\n function pause() external {\\n _checkAccessAllowed(\\\"pause()\\\");\\n _pause();\\n }\\n\\n /**\\n * @notice Unpauses oracle\\n * @custom:access Only Governance\\n */\\n function unpause() external {\\n _checkAccessAllowed(\\\"unpause()\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Batch sets token configs\\n * @param tokenConfigs_ Token config array\\n * @custom:access Only Governance\\n * @custom:error Throws a length error if the length of the token configs array is 0\\n */\\n function setTokenConfigs(TokenConfig[] memory tokenConfigs_) external {\\n if (tokenConfigs_.length == 0) revert(\\\"length can't be 0\\\");\\n uint256 numTokenConfigs = tokenConfigs_.length;\\n for (uint256 i; i < numTokenConfigs; ) {\\n setTokenConfig(tokenConfigs_[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets oracle for a given asset and role.\\n * @dev Supplied asset **must** exist and main oracle may not be null\\n * @param asset Asset address\\n * @param oracle Oracle address\\n * @param role Oracle role\\n * @custom:access Only Governance\\n * @custom:error Null address error if main-role oracle address is null\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error TokenConfigExistance error is thrown if token config is not set\\n * @custom:event Emits OracleSet event with asset address, oracle address and role of the oracle for the asset\\n */\\n function setOracle(\\n address asset,\\n address oracle,\\n OracleRole role\\n ) external notNullAddress(asset) checkTokenConfigExistence(asset) {\\n _checkAccessAllowed(\\\"setOracle(address,address,uint8)\\\");\\n if (oracle == address(0) && role == OracleRole.MAIN) revert(\\\"can't set zero address to main oracle\\\");\\n tokenConfigs[asset].oracles[uint256(role)] = oracle;\\n emit OracleSet(asset, oracle, uint256(role));\\n }\\n\\n /**\\n * @notice Enables/ disables oracle for the input asset. Token config for the input asset **must** exist\\n * @dev Configuration for the asset **must** already exist and the asset cannot be 0 address\\n * @param asset Asset address\\n * @param role Oracle role\\n * @param enable Enabled boolean of the oracle\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error TokenConfigExistance error is thrown if token config is not set\\n */\\n function enableOracle(\\n address asset,\\n OracleRole role,\\n bool enable\\n ) external notNullAddress(asset) checkTokenConfigExistence(asset) {\\n _checkAccessAllowed(\\\"enableOracle(address,uint8,bool)\\\");\\n tokenConfigs[asset].enableFlagsForOracles[uint256(role)] = enable;\\n emit OracleEnabled(asset, uint256(role), enable);\\n }\\n\\n /**\\n * @notice Updates the TWAP pivot oracle price.\\n * @dev This function should always be called before calling getUnderlyingPrice\\n * @param vToken vToken address\\n */\\n function updatePrice(address vToken) external override {\\n address asset = _getUnderlyingAsset(vToken);\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(asset, OracleRole.PIVOT);\\n if (pivotOracle != address(0) && pivotOracleEnabled) {\\n //if pivot oracle is not TwapOracle it will revert so we need to catch the revert\\n try TwapInterface(pivotOracle).updateTwap(asset) {} catch {}\\n }\\n }\\n\\n /**\\n * @notice Updates the pivot oracle price. Currently using TWAP\\n * @dev This function should always be called before calling getPrice\\n * @param asset asset address\\n */\\n function updateAssetPrice(address asset) external {\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(asset, OracleRole.PIVOT);\\n if (pivotOracle != address(0) && pivotOracleEnabled) {\\n //if pivot oracle is not TwapOracle it will revert so we need to catch the revert\\n try TwapInterface(pivotOracle).updateTwap(asset) {} catch {}\\n }\\n }\\n\\n /**\\n * @dev Gets token config by asset address\\n * @param asset asset address\\n * @return tokenConfig Config for the asset\\n */\\n function getTokenConfig(address asset) external view returns (TokenConfig memory) {\\n return tokenConfigs[asset];\\n }\\n\\n /**\\n * @notice Gets price of the underlying asset for a given vToken. Validation flow:\\n * - Check if the oracle is paused globally\\n * - Validate price from main oracle against pivot oracle\\n * - Validate price from fallback oracle against pivot oracle if the first validation failed\\n * - Validate price from main oracle against fallback oracle if the second validation failed\\n * In the case that the pivot oracle is not available but main price is available and validation is successful,\\n * main oracle price is returned.\\n * @param vToken vToken address\\n * @return price USD price in scaled decimal places.\\n * @custom:error Paused error is thrown when resilent oracle is paused\\n * @custom:error Invalid resilient oracle price error is thrown if fetched prices from oracle is invalid\\n */\\n function getUnderlyingPrice(address vToken) external view override returns (uint256) {\\n if (paused()) revert(\\\"resilient oracle is paused\\\");\\n\\n address asset = _getUnderlyingAsset(vToken);\\n return _getPrice(asset);\\n }\\n\\n /**\\n * @notice Gets price of the asset\\n * @param asset asset address\\n * @return price USD price in scaled decimal places.\\n * @custom:error Paused error is thrown when resilent oracle is paused\\n * @custom:error Invalid resilient oracle price error is thrown if fetched prices from oracle is invalid\\n */\\n function getPrice(address asset) external view override returns (uint256) {\\n if (paused()) revert(\\\"resilient oracle is paused\\\");\\n return _getPrice(asset);\\n }\\n\\n /**\\n * @notice Sets/resets single token configs.\\n * @dev main oracle **must not** be a null address\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress is thrown if asset address is null\\n * @custom:error NotNullAddress is thrown if main-role oracle address for asset is null\\n * @custom:event Emits TokenConfigAdded event when the asset config is set successfully by the authorized account\\n */\\n function setTokenConfig(\\n TokenConfig memory tokenConfig\\n ) public notNullAddress(tokenConfig.asset) notNullAddress(tokenConfig.oracles[uint256(OracleRole.MAIN)]) {\\n _checkAccessAllowed(\\\"setTokenConfig(TokenConfig)\\\");\\n\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(\\n tokenConfig.asset,\\n tokenConfig.oracles[uint256(OracleRole.MAIN)],\\n tokenConfig.oracles[uint256(OracleRole.PIVOT)],\\n tokenConfig.oracles[uint256(OracleRole.FALLBACK)]\\n );\\n }\\n\\n /**\\n * @notice Gets oracle and enabled status by asset address\\n * @param asset asset address\\n * @param role Oracle role\\n * @return oracle Oracle address based on role\\n * @return enabled Enabled flag of the oracle based on token config\\n */\\n function getOracle(address asset, OracleRole role) public view returns (address oracle, bool enabled) {\\n oracle = tokenConfigs[asset].oracles[uint256(role)];\\n enabled = tokenConfigs[asset].enableFlagsForOracles[uint256(role)];\\n }\\n\\n function _getPrice(address asset) internal view returns (uint256) {\\n uint256 pivotPrice = INVALID_PRICE;\\n\\n // Get pivot oracle price, Invalid price if not available or error\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(asset, OracleRole.PIVOT);\\n if (pivotOracleEnabled && pivotOracle != address(0)) {\\n try OracleInterface(pivotOracle).getPrice(asset) returns (uint256 pricePivot) {\\n pivotPrice = pricePivot;\\n } catch {}\\n }\\n\\n // Compare main price and pivot price, return main price and if validation was successful\\n // note: In case pivot oracle is not available but main price is available and\\n // validation is successful, the main oracle price is returned.\\n (uint256 mainPrice, bool validatedPivotMain) = _getMainOraclePrice(\\n asset,\\n pivotPrice,\\n pivotOracleEnabled && pivotOracle != address(0)\\n );\\n if (mainPrice != INVALID_PRICE && validatedPivotMain) return mainPrice;\\n\\n // Compare fallback and pivot if main oracle comparision fails with pivot\\n // Return fallback price when fallback price is validated successfully with pivot oracle\\n (uint256 fallbackPrice, bool validatedPivotFallback) = _getFallbackOraclePrice(asset, pivotPrice);\\n if (fallbackPrice != INVALID_PRICE && validatedPivotFallback) return fallbackPrice;\\n\\n // Lastly compare main price and fallback price\\n if (\\n mainPrice != INVALID_PRICE &&\\n fallbackPrice != INVALID_PRICE &&\\n boundValidator.validatePriceWithAnchorPrice(asset, mainPrice, fallbackPrice)\\n ) {\\n return mainPrice;\\n }\\n\\n revert(\\\"invalid resilient oracle price\\\");\\n }\\n\\n /**\\n * @notice Gets a price for the provided asset\\n * @dev This function won't revert when price is 0, because the fallback oracle may still be\\n * able to fetch a correct price\\n * @param asset asset address\\n * @param pivotPrice Pivot oracle price\\n * @param pivotEnabled If pivot oracle is not empty and enabled\\n * @return price USD price in scaled decimals\\n * e.g. asset decimals is 8 then price is returned as 10**18 * 10**(18-8) = 10**28 decimals\\n * @return pivotValidated Boolean representing if the validation of main oracle price\\n * and pivot oracle price were successful\\n * @custom:error Invalid price error is thrown if main oracle fails to fetch price of the asset\\n * @custom:error Invalid price error is thrown if main oracle is not enabled or main oracle\\n * address is null\\n */\\n function _getMainOraclePrice(\\n address asset,\\n uint256 pivotPrice,\\n bool pivotEnabled\\n ) internal view returns (uint256, bool) {\\n (address mainOracle, bool mainOracleEnabled) = getOracle(asset, OracleRole.MAIN);\\n if (mainOracleEnabled && mainOracle != address(0)) {\\n try OracleInterface(mainOracle).getPrice(asset) returns (uint256 mainOraclePrice) {\\n if (!pivotEnabled) {\\n return (mainOraclePrice, true);\\n }\\n if (pivotPrice == INVALID_PRICE) {\\n return (mainOraclePrice, false);\\n }\\n return (\\n mainOraclePrice,\\n boundValidator.validatePriceWithAnchorPrice(asset, mainOraclePrice, pivotPrice)\\n );\\n } catch {\\n return (INVALID_PRICE, false);\\n }\\n }\\n\\n return (INVALID_PRICE, false);\\n }\\n\\n /**\\n * @dev This function won't revert when the price is 0 because getPrice checks if price is > 0\\n * @param asset asset address\\n * @return price USD price in 18 decimals\\n * @return pivotValidated Boolean representing if the validation of fallback oracle price\\n * and pivot oracle price were successfull\\n * @custom:error Invalid price error is thrown if fallback oracle fails to fetch price of the asset\\n * @custom:error Invalid price error is thrown if fallback oracle is not enabled or fallback oracle\\n * address is null\\n */\\n function _getFallbackOraclePrice(address asset, uint256 pivotPrice) private view returns (uint256, bool) {\\n (address fallbackOracle, bool fallbackEnabled) = getOracle(asset, OracleRole.FALLBACK);\\n if (fallbackEnabled && fallbackOracle != address(0)) {\\n try OracleInterface(fallbackOracle).getPrice(asset) returns (uint256 fallbackOraclePrice) {\\n if (pivotPrice == INVALID_PRICE) {\\n return (fallbackOraclePrice, false);\\n }\\n return (\\n fallbackOraclePrice,\\n boundValidator.validatePriceWithAnchorPrice(asset, fallbackOraclePrice, pivotPrice)\\n );\\n } catch {\\n return (INVALID_PRICE, false);\\n }\\n }\\n\\n return (INVALID_PRICE, false);\\n }\\n\\n /**\\n * @dev This function returns the underlying asset of a vToken\\n * @param vToken vToken address\\n * @return asset underlying asset address\\n */\\n function _getUnderlyingAsset(address vToken) private view notNullAddress(vToken) returns (address asset) {\\n if (vToken == nativeMarket) {\\n asset = NATIVE_TOKEN_ADDR;\\n } else if (vToken == vai) {\\n asset = vai;\\n } else {\\n asset = VBep20Interface(vToken).underlying();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x005e52885b8f7935dbccb1c87847229a9a2bfb66fd75fe200c9ec6f8a5d7a0e9\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/oracle/contracts/interfaces/VBep20Interface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\ninterface VBep20Interface is IERC20Metadata {\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n function underlying() external view returns (address);\\n}\\n\",\"keccak256\":\"0x6e71c3df86501df5c0e4bace1333c0c91f9f9cced252a54fb99eeda219b789d5\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/**\\n * @title MaxLoopsLimitHelper\\n * @author Venus\\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\\n */\\nabstract contract MaxLoopsLimitHelper {\\n // Limit for the loops to avoid the DOS\\n uint256 public maxLoopsLimit;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when max loops limit is set\\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\\n\\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\\n\\n /**\\n * @notice Set the limit for the loops can iterate to avoid the DOS\\n * @param limit Limit for the max loops can execute at a time\\n */\\n function _setMaxLoopsLimit(uint256 limit) internal {\\n require(limit > maxLoopsLimit, \\\"Comptroller: Invalid maxLoopsLimit\\\");\\n\\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\\n maxLoopsLimit = limit;\\n\\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\\n }\\n\\n /**\\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\\n * @param len Length of the loops iterate\\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\\n */\\n function _ensureMaxLoops(uint256 len) internal view {\\n if (len > maxLoopsLimit) {\\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4c25e30635485d162177effa384eee51768b0141a567a0da16ff6ad673274166\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Interfaces/IConverterNetwork.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport { IAbstractTokenConverter } from \\\"../TokenConverter/IAbstractTokenConverter.sol\\\";\\n\\n/**\\n * @title IConverterNetwork\\n * @author Venus\\n * @notice Interface implemented by `ConverterNetwork`.\\n */\\ninterface IConverterNetwork {\\n /// @notice Adds new converter to the array\\n /// @param _tokenConverter Address of the token converter\\n function addTokenConverter(IAbstractTokenConverter _tokenConverter) external;\\n\\n /// @notice Removes converter from the array\\n /// @param _tokenConverter Address of the token converter\\n function removeTokenConverter(IAbstractTokenConverter _tokenConverter) external;\\n\\n /// @notice Used to get the array of converters supporting conversions, arranged in descending order based on token balances\\n /// @param _tokenAddressIn Address of tokenIn\\n /// @param _tokenAddressOut Address of tokenOut\\n /// @return converters Array of the conveters on the basis of the tokens pair\\n /// @return convertersBalance Array of balances with respect to token out\\n function findTokenConverters(address _tokenAddressIn, address _tokenAddressOut)\\n external\\n returns (address[] memory converters, uint256[] memory convertersBalance);\\n\\n /// @notice Used to get the array of converters supporting conversions, arranged in descending order based on token balances\\n /// @param _tokenAddressIn Address of tokenIn\\n /// @param _tokenAddressOut Address of tokenOut\\n /// @return converters Array of the conveters on the basis of the tokens pair\\n /// @return convertersBalance Array of balances with respect to token out\\n function findTokenConvertersForConverters(address _tokenAddressIn, address _tokenAddressOut)\\n external\\n returns (address[] memory converters, uint256[] memory convertersBalance);\\n\\n /// @notice This function returns the array containing all the converters addresses\\n /// @return Array containing all the converters addresses\\n function getAllConverters() external view returns (IAbstractTokenConverter[] memory);\\n\\n /// @notice This function checks for given address is converter or not\\n /// @param _tokenConverter Address of the token converter\\n /// @return boolean true if given address is converter otherwise false\\n function isTokenConverter(address _tokenConverter) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd9a747f176d9b9de220331b87ed711cc2bd594a118b538a35f3c47060bff7a8b\",\"license\":\"BSD-3-Clause\"},\"contracts/TokenConverter/ConverterNetwork.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { AccessControlledV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport { MaxLoopsLimitHelper } from \\\"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\nimport { sort } from \\\"../Utils/ArrayHelpers.sol\\\";\\nimport { IAbstractTokenConverter } from \\\"./IAbstractTokenConverter.sol\\\";\\nimport { IConverterNetwork } from \\\"../Interfaces/IConverterNetwork.sol\\\";\\n\\n/// @title ConverterNetwork\\n/// @author Venus\\n/// @notice ConverterNetwork keeps track of all the converters and is used to fetch valid converters which provide conversions according to token addresses provided\\n/// @custom:security-contact https://github.com/VenusProtocol/protocol-reserve#discussion\\ncontract ConverterNetwork is IConverterNetwork, AccessControlledV8, MaxLoopsLimitHelper {\\n /// @notice Array holding all the converters\\n IAbstractTokenConverter[] public allConverters;\\n\\n /// @notice Emitted when new converter is added\\n event ConverterAdded(address indexed converter);\\n\\n /// @notice Emitted when converter is removed\\n event ConverterRemoved(address indexed converter);\\n\\n /// @notice Error thrown when converter already exists\\n error ConverterAlreadyExists();\\n\\n /// @notice Error thrown converter does not exist\\n error ConverterDoesNotExist();\\n\\n /// @notice Error thrown when converter address is invalid\\n error InvalidTokenConverterAddress();\\n\\n /// @notice Error thrown when loops limit is invalid\\n error InvalidMaxLoopsLimit(uint256 loopsLimit);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n /// @notice ConverterNetwork initializer\\n /// @param _accessControlManager The address of ACM contract\\n /// @param _loopsLimit Limit for the loops in the contract to avoid DOS\\n /// @custom:event ConverterAdded is emitted for each converter added on success\\n /// @custom:error InvalidMaxLoopsLimit is thrown when when loops limit is invalid\\n function initialize(address _accessControlManager, uint256 _loopsLimit) external initializer {\\n ensureNonzeroAddress(_accessControlManager);\\n __AccessControlled_init(_accessControlManager);\\n\\n if (_loopsLimit >= type(uint128).max) revert InvalidMaxLoopsLimit(_loopsLimit);\\n _setMaxLoopsLimit(_loopsLimit);\\n }\\n\\n /**\\n * @notice Set the limit for the loops can iterate to avoid the DOS\\n * @param limit Limit for the max loops can execute at a time\\n * @custom:error InvalidMaxLoopsLimit is thrown when when loops limit is invalid\\n * @custom:access Only owner\\n */\\n function setMaxLoopsLimit(uint256 limit) external onlyOwner {\\n if (limit >= type(uint128).max) revert InvalidMaxLoopsLimit(limit);\\n _setMaxLoopsLimit(limit);\\n }\\n\\n /// @notice Adds new converter to the array\\n /// @param _tokenConverter Address of the token converter\\n /// @custom:event ConverterAdded is emitted on success\\n /// @custom:access Only Governance\\n function addTokenConverter(IAbstractTokenConverter _tokenConverter) external {\\n _checkAccessAllowed(\\\"addTokenConverter(address)\\\");\\n _addTokenConverter(_tokenConverter);\\n }\\n\\n /// @notice Removes converter from the array\\n /// @param _tokenConverter Address of the token converter\\n /// @custom:error ConverterDoesNotExist is thrown when converter to remove does not exist\\n /// @custom:event ConverterRemoved is emitted on success\\n /// @custom:access Only Governance\\n function removeTokenConverter(IAbstractTokenConverter _tokenConverter) external {\\n _checkAccessAllowed(\\\"removeTokenConverter(address)\\\");\\n\\n // Find the index of the converter in the array\\n uint128 indexToRemove = _findConverterIndex(_tokenConverter);\\n\\n // Ensure that the converter exists in the array\\n if (indexToRemove == type(uint128).max) revert ConverterDoesNotExist();\\n\\n // Swap the element to remove with the last element\\n allConverters[indexToRemove] = allConverters[allConverters.length - 1];\\n\\n // Remove the last element (which is now a duplicate)\\n allConverters.pop();\\n\\n emit ConverterRemoved(address(_tokenConverter));\\n }\\n\\n /// @notice Used to get the array of converters supporting conversions, arranged in descending order based on token balances\\n /// It will return the converters which are open to users for conversion\\n /// @param _tokenAddressIn Address of tokenIn\\n /// @param _tokenAddressOut Address of tokenOut\\n /// @return converters Array of the conveters on the basis of the tokens pair\\n /// @return convertersBalance Array of balances with respect to token out\\n function findTokenConverters(address _tokenAddressIn, address _tokenAddressOut)\\n external\\n returns (address[] memory converters, uint256[] memory convertersBalance)\\n {\\n (converters, convertersBalance) = _findTokenConverters(_tokenAddressIn, _tokenAddressOut, false);\\n }\\n\\n /// @notice Used to get the array of converters supporting conversions, arranged in descending order based on token balances\\n /// It will return the converters which are open to converters for conversion.\\n /// @param _tokenAddressIn Address of tokenIn\\n /// @param _tokenAddressOut Address of tokenOut\\n /// @return converters Array of the conveters on the basis of the tokens pair\\n /// @return convertersBalance Array of balances with respect to token out\\n function findTokenConvertersForConverters(address _tokenAddressIn, address _tokenAddressOut)\\n external\\n returns (address[] memory converters, uint256[] memory convertersBalance)\\n {\\n (converters, convertersBalance) = _findTokenConverters(_tokenAddressIn, _tokenAddressOut, true);\\n }\\n\\n /// @notice This function returns the array containing all the converters addresses\\n /// @return converters Array containing all the converters addresses\\n function getAllConverters() external view returns (IAbstractTokenConverter[] memory converters) {\\n converters = allConverters;\\n }\\n\\n /// @notice This function checks if the given address is a converter or not\\n /// @param _tokenConverter Address of the token converter\\n /// @return isConverter true if given address is converter otherwise false\\n function isTokenConverter(address _tokenConverter) external view returns (bool isConverter) {\\n uint128 index = _findConverterIndex(IAbstractTokenConverter(_tokenConverter));\\n\\n if (index != type(uint128).max) {\\n isConverter = true;\\n }\\n }\\n\\n /// @notice Adds new converter contract to the array\\n /// @param _tokenConverter Address of the token converter\\n /// @custom:error ConverterAlreadyExists is thrown when new tokenconverter to add already exists\\n /// @custom:event ConverterAdded is emitted on success\\n function _addTokenConverter(IAbstractTokenConverter _tokenConverter) internal {\\n if (\\n (address(_tokenConverter) == address(0)) || (address(_tokenConverter.converterNetwork()) != address(this))\\n ) {\\n revert InvalidTokenConverterAddress();\\n }\\n\\n uint128 index = _findConverterIndex(_tokenConverter);\\n if (index != type(uint128).max) revert ConverterAlreadyExists();\\n\\n allConverters.push(_tokenConverter);\\n _ensureMaxLoops(allConverters.length);\\n\\n emit ConverterAdded(address(_tokenConverter));\\n }\\n\\n /// @notice Used to get the array of converters supporting conversions, arranged in descending order based on token balances\\n /// @param _tokenAddressIn Address of tokenIn\\n /// @param _tokenAddressOut Address of tokenOut\\n /// @param forConverters Bool to filter out converters on the basis of the conversionAccess\\n /// @return converters Array of converters\\n /// @return convertersBalance Array of balances with respect to token out\\n function _findTokenConverters(\\n address _tokenAddressIn,\\n address _tokenAddressOut,\\n bool forConverters\\n ) internal returns (address[] memory converters, uint256[] memory convertersBalance) {\\n uint128 convertersLength = uint128(allConverters.length);\\n\\n // Create a dynamic array to store the matching converters\\n converters = new address[](convertersLength);\\n convertersBalance = new uint256[](convertersLength);\\n uint128 count;\\n\\n for (uint128 i; i < convertersLength; ) {\\n IAbstractTokenConverter converter = allConverters[i];\\n\\n unchecked {\\n ++i;\\n }\\n\\n if ((address(converter.converterNetwork()) != address(this)) || msg.sender == address(converter)) {\\n continue;\\n }\\n\\n (, IAbstractTokenConverter.ConversionAccessibility conversionAccess) = converter.conversionConfigurations(\\n _tokenAddressIn,\\n _tokenAddressOut\\n );\\n\\n if (conversionAccess == IAbstractTokenConverter.ConversionAccessibility.ALL) {\\n converters[count] = address(converter);\\n convertersBalance[count] = converter.balanceOf(_tokenAddressOut);\\n ++count;\\n } else if (\\n forConverters &&\\n (conversionAccess == IAbstractTokenConverter.ConversionAccessibility.ONLY_FOR_CONVERTERS)\\n ) {\\n converters[count] = address(converter);\\n convertersBalance[count] = converter.balanceOf(_tokenAddressOut);\\n ++count;\\n } else if (\\n !forConverters && (conversionAccess == IAbstractTokenConverter.ConversionAccessibility.ONLY_FOR_USERS)\\n ) {\\n converters[count] = address(converter);\\n convertersBalance[count] = converter.balanceOf(_tokenAddressOut);\\n ++count;\\n }\\n }\\n\\n // Resize the array to the actual number of matching converters\\n assembly {\\n mstore(converters, count)\\n mstore(convertersBalance, count)\\n }\\n sort(convertersBalance, converters);\\n }\\n\\n /// @notice Used to get the index of the converter stored in the array\\n /// This will return the index if the converter exists in the array otherwise will return type(uint128).max\\n /// @param _tokenConverter Address of the token converter\\n /// @return index of the converter address in the allConverters array\\n function _findConverterIndex(IAbstractTokenConverter _tokenConverter) internal view returns (uint128 index) {\\n index = type(uint128).max; // Not found, return a large value\\n\\n uint128 convertersLength = uint128(allConverters.length);\\n for (uint128 i; i < convertersLength; ) {\\n if (allConverters[i] == _tokenConverter) {\\n index = i;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe9fdf8e3af51249c162e37c946b8966f4b9ccec719201c8fd4258cb89c6d294\",\"license\":\"BSD-3-Clause\"},\"contracts/TokenConverter/IAbstractTokenConverter.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport { ResilientOracle } from \\\"@venusprotocol/oracle/contracts/ResilientOracle.sol\\\";\\nimport { IConverterNetwork } from \\\"../Interfaces/IConverterNetwork.sol\\\";\\n\\n/// @notice Interface for AbstractTokenConverter\\n/// @custom:security-contact https://github.com/VenusProtocol/protocol-reserve#discussion\\ninterface IAbstractTokenConverter {\\n /// @notice This enum define the all possible ways of conversion can happen\\n enum ConversionAccessibility {\\n NONE, // Conversion is disable for the pair\\n ALL, // Conversion is enable for private conversion and users\\n ONLY_FOR_CONVERTERS, // Conversion is enable only for private conversion\\n ONLY_FOR_USERS // Conversion is enable only for users\\n }\\n\\n /// @notice This struct represents the configuration for a token conversion.\\n struct ConversionConfig {\\n /// incentive on conversion of tokens in mantissa i.e 10% incentive would be 0.1 * 1e18\\n uint256 incentive;\\n /// enable or disable conversion for users or converters or both or none\\n ConversionAccessibility conversionAccess;\\n }\\n\\n /// @notice Pause conversion of tokens\\n function pauseConversion() external;\\n\\n /// @notice Resume conversion of tokens.\\n function resumeConversion() external;\\n\\n /// @notice Sets a new price oracle\\n /// @param priceOracle_ Address of the new price oracle to set\\n function setPriceOracle(ResilientOracle priceOracle_) external;\\n\\n /// @notice Set the configuration for new or existing convert pair\\n /// @param tokenAddressIn Address of tokenIn\\n /// @param tokenAddressOut Address of tokenOut\\n /// @param conversionConfig ConversionConfig config details to update\\n function setConversionConfig(\\n address tokenAddressIn,\\n address tokenAddressOut,\\n ConversionConfig calldata conversionConfig\\n ) external;\\n\\n /// @notice Convert exact amount of tokenAddressIn for tokenAddressOut\\n /// @dev Method does not support deflationary tokens transfer\\n /// @param amountInMantissa Amount of tokenAddressIn\\n /// @param amountOutMinMantissa Min amount of tokenAddressOut required as output\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after convert\\n /// @param to Address of the tokenAddressOut receiver\\n function convertExactTokens(\\n uint256 amountInMantissa,\\n uint256 amountOutMinMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut,\\n address to\\n ) external returns (uint256 actualAmountIn, uint256 actualAmountOut);\\n\\n /// @notice Convert tokens for tokenAddressIn for exact amount of tokenAddressOut\\n /// @dev Method does not support deflationary tokens transfer\\n /// @param amountInMaxMantissa Max amount of tokenAddressIn\\n /// @param amountOutMantissa Amount of tokenAddressOut required as output\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after convert\\n /// @param to Address of the tokenAddressOut receiver\\n function convertForExactTokens(\\n uint256 amountInMaxMantissa,\\n uint256 amountOutMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut,\\n address to\\n ) external returns (uint256 actualAmountIn, uint256 actualAmountOut);\\n\\n /// @notice Convert exact amount of tokenAddressIn for tokenAddressOut\\n /// @param amountInMantissa Amount of tokenAddressIn\\n /// @param amountOutMinMantissa Min amount of tokenAddressOut required as output\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after convert\\n /// @param to Address of the tokenAddressOut receiver\\n function convertExactTokensSupportingFeeOnTransferTokens(\\n uint256 amountInMantissa,\\n uint256 amountOutMinMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut,\\n address to\\n ) external returns (uint256 actualAmountIn, uint256 actualAmountOut);\\n\\n /// @notice Convert tokens for tokenAddressIn for exact amount of tokenAddressOut\\n /// @param amountInMaxMantissa Max amount of tokenAddressIn\\n /// @param amountOutMantissa Amount of tokenAddressOut required as output\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after convert\\n /// @param to Address of the tokenAddressOut receiver\\n function convertForExactTokensSupportingFeeOnTransferTokens(\\n uint256 amountInMaxMantissa,\\n uint256 amountOutMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut,\\n address to\\n ) external returns (uint256 actualAmountIn, uint256 actualAmountOut);\\n\\n /// @notice Get the configuration for the pair of the tokens\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after conversion\\n /// @return incentives Percentage of incentives to be distributed for the pair of tokens\\n /// @return conversionAccess Accessibility for the pair of tokens\\n function conversionConfigurations(address tokenAddressIn, address tokenAddressOut)\\n external\\n returns (uint256 incentives, ConversionAccessibility conversionAccess);\\n\\n /// @notice Get the address of the converterNetwork\\n function converterNetwork() external returns (IConverterNetwork converterNetwork);\\n\\n /// @notice To get the amount of tokenAddressOut tokens sender could receive on providing amountInMantissa tokens of tokenAddressIn\\n /// @param amountInMantissa Amount of tokenAddressIn\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after conversion\\n /// @return amountConvertedMantissa Amount of tokenAddressIn should be transferred after conversion\\n /// @return amountOutMantissa Amount of the tokenAddressOut sender should receive after conversion\\n /// @custom:error InsufficientInputAmount error is thrown when given input amount is zero\\n /// @custom:error ConversionConfigNotEnabled is thrown when conversion is disabled or config does not exist for given pair\\n function getUpdatedAmountOut(\\n uint256 amountInMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut\\n ) external returns (uint256 amountConvertedMantissa, uint256 amountOutMantissa);\\n\\n /// @notice To get the amount of tokenAddressIn tokens sender would send on receiving amountOutMantissa tokens of tokenAddressOut\\n /// @param amountOutMantissa Amount of tokenAddressOut user wants to receive\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after conversion\\n /// @return amountConvertedMantissa Amount of tokenAddressOut should be transferred after conversion\\n /// @return amountInMantissa Amount of the tokenAddressIn sender would send to contract before conversion\\n /// @custom:error InsufficientInputAmount error is thrown when given input amount is zero\\n /// @custom:error ConversionConfigNotEnabled is thrown when conversion is disabled or config does not exist for given pair\\n function getUpdatedAmountIn(\\n uint256 amountOutMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut\\n ) external returns (uint256 amountConvertedMantissa, uint256 amountInMantissa);\\n\\n /// @notice To get the amount of tokenAddressIn tokens sender would send on receiving amountOutMantissa tokens of tokenAddressOut\\n /// @dev This function retrieves values without altering token prices.\\n /// @param amountOutMantissa Amount of tokenAddressOut user wants to receive\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after conversion\\n /// @return amountConvertedMantissa Amount of tokenAddressOut should be transferred after conversion\\n /// @return amountInMantissa Amount of the tokenAddressIn sender would send to contract before conversion\\n /// @custom:error InsufficientInputAmount error is thrown when given input amount is zero\\n /// @custom:error ConversionConfigNotEnabled is thrown when conversion is disabled or config does not exist for given pair\\n function getAmountIn(\\n uint256 amountOutMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut\\n ) external view returns (uint256 amountConvertedMantissa, uint256 amountInMantissa);\\n\\n /// @notice To get the amount of tokenAddressOut tokens sender could receive on providing amountInMantissa tokens of tokenAddressIn\\n /// @dev This function retrieves values without altering token prices.\\n /// @param amountInMantissa Amount of tokenAddressIn\\n /// @param tokenAddressIn Address of the token to convert\\n /// @param tokenAddressOut Address of the token to get after conversion\\n /// @return amountConvertedMantissa Amount of tokenAddressIn should be transferred after conversion\\n /// @return amountOutMantissa Amount of the tokenAddressOut sender should receive after conversion\\n /// @custom:error InsufficientInputAmount error is thrown when given input amount is zero\\n /// @custom:error ConversionConfigNotEnabled is thrown when conversion is disabled or config does not exist for given pair\\n function getAmountOut(\\n uint256 amountInMantissa,\\n address tokenAddressIn,\\n address tokenAddressOut\\n ) external view returns (uint256 amountConvertedMantissa, uint256 amountOutMantissa);\\n\\n /// @notice Get the balance for specific token\\n /// @param token Address of the token\\n /// @return tokenBalance Balance of the token the contract has\\n function balanceOf(address token) external view returns (uint256 tokenBalance);\\n}\\n\",\"keccak256\":\"0x7852d4f8a6dd1c80d14342f8ff2e26f723eb00c888e9a9e50a5fe8f95c59200c\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/ArrayHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Used to sort addresses array based on their token balances\\n/// @param arr Array of token balances of different addresses\\n/// @param addrs Array containing these addresses\\nfunction sort(uint256[] memory arr, address[] memory addrs) pure {\\n if (arr.length > 1) {\\n return quickSortDescending(arr, addrs, 0, arr.length - 1);\\n }\\n}\\n\\n/// @notice Used to sort addresses array based on their token balances\\n/// @param arr Array of token balances of different addresses\\n/// @param addrs Array containing these addresses\\n/// @param left index of first value\\n/// @param right index of last value\\nfunction quickSortDescending(\\n uint256[] memory arr,\\n address[] memory addrs,\\n uint256 left,\\n uint256 right\\n) pure {\\n if (left >= right) return;\\n uint256 p = arr[(left + right) / 2]; // p = the pivot element\\n uint256 i = left;\\n uint256 j = right;\\n while (i < j) {\\n while (arr[i] > p) ++i;\\n while (arr[j] < p) --j; // arr[j] < p means p still to the right, so j > 0\\n if (arr[i] < arr[j]) {\\n (arr[i], arr[j]) = (arr[j], arr[i]);\\n (addrs[i], addrs[j]) = (addrs[j], addrs[i]);\\n } else {\\n ++i;\\n }\\n }\\n\\n if (j > left) quickSortDescending(arr, addrs, left, j - 1); // j > left, so j > 0\\n quickSortDescending(arr, addrs, j + 1, right);\\n}\\n\",\"keccak256\":\"0xc52f21116bbc94532e4022f72980d2605f8ec7580a82d87aaaebf893ba03c2f7\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
482
|
+
"bytecode": "0x6080604052348015600f57600080fd5b506016601a565b60d7565b600054610100900460ff161560855760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161460d5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6120ae806100e66000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c806380d45a2d116100b2578063be26317e11610081578063e30c397811610066578063e30c39781461027e578063f2fde38b1461029c578063f49e746f146102af57600080fd5b8063be26317e14610254578063cd6dc6871461026b57600080fd5b806380d45a2d146101f25780638da5cb5b14610205578063932fd98514610223578063b4a0bdf31461023657600080fd5b80634e9f8f39116100ee5780634e9f8f39146101ac5780636c059fb1146101bf578063715018a6146101e257806379ba5097146101ea57600080fd5b80630e32cb861461012057806325a31b6b14610135578063285510e9146101535780633119e7c71461018b575b600080fd5b61013361012e366004611b9f565b6102c2565b005b61013d6102d6565b60405161014a9190611bc3565b60405180910390f35b610166610161366004611c1d565b610345565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014a565b61019e610199366004611c36565b61037c565b60405161014a929190611c6f565b61019e6101ba366004611c36565b610396565b6101d26101cd366004611b9f565b6103a5565b604051901515815260200161014a565b6101336103d7565b6101336103eb565b610133610200366004611c1d565b6104a2565b60335473ffffffffffffffffffffffffffffffffffffffff16610166565b610133610231366004611b9f565b6104ff565b60975473ffffffffffffffffffffffffffffffffffffffff16610166565b61025d60c95481565b60405190815260200161014a565b610133610279366004611d00565b610546565b60655473ffffffffffffffffffffffffffffffffffffffff16610166565b6101336102aa366004611b9f565b610739565b6101336102bd366004611b9f565b6107e9565b6102ca610a00565b6102d381610a81565b50565b606060fb80548060200260200160405190810160405280929190818152602001828054801561033b57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610310575b5050505050905090565b60fb818154811061035557600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60608061038b84846000610bab565b909590945092505050565b60608061038b84846001610bab565b6000806103b183611100565b90506fffffffffffffffffffffffffffffffff808216146103d157600191505b50919050565b6103df610a00565b6103e960006111ba565b565b606554339073ffffffffffffffffffffffffffffffffffffffff168114610499576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102d3816111ba565b6104aa610a00565b6fffffffffffffffffffffffffffffffff81106104f6576040517f132515e000000000000000000000000000000000000000000000000000000000815260048101829052602401610490565b6102d3816111eb565b61053d6040518060400160405280601a81526020017f616464546f6b656e436f6e7665727465722861646472657373290000000000008152506112ba565b6102d381611397565b600054610100900460ff16158080156105665750600054600160ff909116105b806105805750303b158015610580575060005460ff166001145b61060c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610490565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561066a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610673836115a3565b61067c836115f0565b6fffffffffffffffffffffffffffffffff82106106c8576040517f132515e000000000000000000000000000000000000000000000000000000000815260048101839052602401610490565b6106d1826111eb565b801561073457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610741610a00565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556107a460335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6108276040518060400160405280601d81526020017f72656d6f7665546f6b656e436f6e7665727465722861646472657373290000008152506112ba565b600061083282611100565b90507fffffffffffffffffffffffffffffffff000000000000000000000000000000016fffffffffffffffffffffffffffffffff82160161089f576040517f2516fa2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb80546108af90600190611d5b565b815481106108bf576108bf611d74565b60009182526020909120015460fb805473ffffffffffffffffffffffffffffffffffffffff909216916fffffffffffffffffffffffffffffffff841690811061090a5761090a611d74565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060fb80548061096357610963611da3565b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590910190915560405173ffffffffffffffffffffffffffffffffffffffff8416917febba5edf297d79cea0ec18d97adacf578cc3152240bd112e8d7da26ba65700d191a25050565b60335473ffffffffffffffffffffffffffffffffffffffff1633146103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610490565b73ffffffffffffffffffffffffffffffffffffffff8116610b24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610490565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa091015b60405180910390a15050565b60fb5460609081906fffffffffffffffffffffffffffffffff811667ffffffffffffffff811115610bde57610bde611dd2565b604051908082528060200260200182016040528015610c07578160200160208202803683370190505b509250806fffffffffffffffffffffffffffffffff1667ffffffffffffffff811115610c3557610c35611dd2565b604051908082528060200260200182016040528015610c5e578160200160208202803683370190505b5091506000805b826fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff1610156110e557600060fb826fffffffffffffffffffffffffffffffff1681548110610cb857610cb8611d74565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160010191503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166301e201786040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d739190611e01565b73ffffffffffffffffffffffffffffffffffffffff16141580610dab57503373ffffffffffffffffffffffffffffffffffffffff8216145b15610db65750610c65565b6040517fb491ddf700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a8116600483015289811660248301526000919083169063b491ddf79060440160408051808303816000875af1158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e539190611e1e565b915060019050816003811115610e6b57610e6b611e47565b03610f73578187856fffffffffffffffffffffffffffffffff1681518110610e9557610e95611d74565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f70a082310000000000000000000000000000000000000000000000000000000081528a82166004820152908316906370a0823190602401602060405180830381865afa158015610f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f349190611e76565b86856fffffffffffffffffffffffffffffffff1681518110610f5857610f58611d74565b6020908102919091010152610f6c84611e8f565b93506110de565b878015610f9157506002816003811115610f8f57610f8f611e47565b145b15610fbb578187856fffffffffffffffffffffffffffffffff1681518110610e9557610e95611d74565b87158015610fda57506003816003811115610fd857610fd8611e47565b145b156110de578187856fffffffffffffffffffffffffffffffff168151811061100457611004611d74565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f70a082310000000000000000000000000000000000000000000000000000000081528a82166004820152908316906370a0823190602401602060405180830381865afa15801561107f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a39190611e76565b86856fffffffffffffffffffffffffffffffff16815181106110c7576110c7611d74565b60209081029190910101526110db84611e8f565b93505b5050610c65565b508084528083526110f68385611698565b5050935093915050565b60fb546fffffffffffffffffffffffffffffffff9060005b816fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff1610156111b3578373ffffffffffffffffffffffffffffffffffffffff1660fb826fffffffffffffffffffffffffffffffff168154811061118057611180611d74565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16036111ab578092505b600101611118565b5050919050565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556102d3816116bc565b60c954811161127c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696d60448201527f69740000000000000000000000000000000000000000000000000000000000006064820152608401610490565b60c980549082905560408051828152602081018490527fc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa9101610b9f565b6097546040517f18c5e8ab00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906318c5e8ab906113139033908690600401611f22565b602060405180830381865afa158015611330573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113549190611f59565b905080611393573330836040517f4a3fa29300000000000000000000000000000000000000000000000000000000815260040161049093929190611f7b565b5050565b73ffffffffffffffffffffffffffffffffffffffff8116158061145657503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166301e201786040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143d9190611e01565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561148d576040517f36e7473200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061149882611100565b90506fffffffffffffffffffffffffffffffff808216146114e5576040517f0aef5e8600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb805460018101825560008290527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555461155e90611733565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fa0a158044a2552256f6415ce60c2ef0d6983a67f58e491cd7af6e48ae2abe25f90600090a25050565b73ffffffffffffffffffffffffffffffffffffffff81166102d3576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054610100900460ff16611687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b61168f61177d565b6102d38161181c565b6001825111156113935761139382826000600186516116b79190611d5b565b6118b3565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c9548111156102d35760c9546040517ff257f636000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052604401610490565b600054610100900460ff16611814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b6103e9611add565b600054610100900460ff166102ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b80821015611ad75760008460026118ca8486611fbd565b6118d49190611fd0565b815181106118e4576118e4611d74565b6020908102919091010151905082825b80821015611aa4575b8287838151811061191057611910611d74565b6020026020010151111561192e576119278261200b565b91506118fd565b8287828151811061194157611941611d74565b6020026020010151101561195f5761195881612043565b905061192e565b86818151811061197157611971611d74565b602002602001015187838151811061198b5761198b611d74565b60200260200101511015611a94578681815181106119ab576119ab611d74565b60200260200101518783815181106119c5576119c5611d74565b60200260200101518884815181106119df576119df611d74565b602002602001018984815181106119f8576119f8611d74565b6020026020010182815250828152505050858181518110611a1b57611a1b611d74565b6020026020010151868381518110611a3557611a35611d74565b6020026020010151878481518110611a4f57611a4f611d74565b60200260200101888481518110611a6857611a68611d74565b73ffffffffffffffffffffffffffffffffffffffff9384166020918202929092010152911690526118f4565b611a9d8261200b565b91506118f4565b84811115611abd57611abd8787876116b7600186611d5b565b611ad38787611acd846001611fbd565b876118b3565b5050505b50505050565b600054610100900460ff16611b74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b6103e9336111ba565b73ffffffffffffffffffffffffffffffffffffffff811681146102d357600080fd5b600060208284031215611bb157600080fd5b8135611bbc81611b7d565b9392505050565b6020808252825182820181905260009190848201906040850190845b81811015611c1157835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611bdf565b50909695505050505050565b600060208284031215611c2f57600080fd5b5035919050565b60008060408385031215611c4957600080fd5b8235611c5481611b7d565b91506020830135611c6481611b7d565b809150509250929050565b604080825283519082018190526000906020906060840190828701845b82811015611cbe57815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101611c8c565b5050508381038285015284518082528583019183019060005b81811015611cf357835183529284019291840191600101611cd7565b5090979650505050505050565b60008060408385031215611d1357600080fd5b8235611d1e81611b7d565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611d6e57611d6e611d2c565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611e1357600080fd5b8151611bbc81611b7d565b60008060408385031215611e3157600080fd5b82519150602083015160048110611c6457600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215611e8857600080fd5b5051919050565b60006fffffffffffffffffffffffffffffffff808316818103611eb457611eb4611d2c565b6001019392505050565b6000815180845260005b81811015611ee457602081850181015186830182015201611ec8565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000611f516040830184611ebe565b949350505050565b600060208284031215611f6b57600080fd5b81518015158114611bbc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611fb46060830184611ebe565b95945050505050565b80820180821115611d6e57611d6e611d2c565b600082612006577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361203c5761203c611d2c565b5060010190565b60008161205257612052611d2c565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea264697066735822122043fe620950a480d860f29545b04e4166e48b1a7cedd58d8784b99cbba91f803b64736f6c63430008190033",
|
|
483
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011b5760003560e01c806380d45a2d116100b2578063be26317e11610081578063e30c397811610066578063e30c39781461027e578063f2fde38b1461029c578063f49e746f146102af57600080fd5b8063be26317e14610254578063cd6dc6871461026b57600080fd5b806380d45a2d146101f25780638da5cb5b14610205578063932fd98514610223578063b4a0bdf31461023657600080fd5b80634e9f8f39116100ee5780634e9f8f39146101ac5780636c059fb1146101bf578063715018a6146101e257806379ba5097146101ea57600080fd5b80630e32cb861461012057806325a31b6b14610135578063285510e9146101535780633119e7c71461018b575b600080fd5b61013361012e366004611b9f565b6102c2565b005b61013d6102d6565b60405161014a9190611bc3565b60405180910390f35b610166610161366004611c1d565b610345565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014a565b61019e610199366004611c36565b61037c565b60405161014a929190611c6f565b61019e6101ba366004611c36565b610396565b6101d26101cd366004611b9f565b6103a5565b604051901515815260200161014a565b6101336103d7565b6101336103eb565b610133610200366004611c1d565b6104a2565b60335473ffffffffffffffffffffffffffffffffffffffff16610166565b610133610231366004611b9f565b6104ff565b60975473ffffffffffffffffffffffffffffffffffffffff16610166565b61025d60c95481565b60405190815260200161014a565b610133610279366004611d00565b610546565b60655473ffffffffffffffffffffffffffffffffffffffff16610166565b6101336102aa366004611b9f565b610739565b6101336102bd366004611b9f565b6107e9565b6102ca610a00565b6102d381610a81565b50565b606060fb80548060200260200160405190810160405280929190818152602001828054801561033b57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610310575b5050505050905090565b60fb818154811061035557600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60608061038b84846000610bab565b909590945092505050565b60608061038b84846001610bab565b6000806103b183611100565b90506fffffffffffffffffffffffffffffffff808216146103d157600191505b50919050565b6103df610a00565b6103e960006111ba565b565b606554339073ffffffffffffffffffffffffffffffffffffffff168114610499576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6102d3816111ba565b6104aa610a00565b6fffffffffffffffffffffffffffffffff81106104f6576040517f132515e000000000000000000000000000000000000000000000000000000000815260048101829052602401610490565b6102d3816111eb565b61053d6040518060400160405280601a81526020017f616464546f6b656e436f6e7665727465722861646472657373290000000000008152506112ba565b6102d381611397565b600054610100900460ff16158080156105665750600054600160ff909116105b806105805750303b158015610580575060005460ff166001145b61060c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610490565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561066a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610673836115a3565b61067c836115f0565b6fffffffffffffffffffffffffffffffff82106106c8576040517f132515e000000000000000000000000000000000000000000000000000000000815260048101839052602401610490565b6106d1826111eb565b801561073457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b610741610a00565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556107a460335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6108276040518060400160405280601d81526020017f72656d6f7665546f6b656e436f6e7665727465722861646472657373290000008152506112ba565b600061083282611100565b90507fffffffffffffffffffffffffffffffff000000000000000000000000000000016fffffffffffffffffffffffffffffffff82160161089f576040517f2516fa2900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb80546108af90600190611d5b565b815481106108bf576108bf611d74565b60009182526020909120015460fb805473ffffffffffffffffffffffffffffffffffffffff909216916fffffffffffffffffffffffffffffffff841690811061090a5761090a611d74565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060fb80548061096357610963611da3565b60008281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905590910190915560405173ffffffffffffffffffffffffffffffffffffffff8416917febba5edf297d79cea0ec18d97adacf578cc3152240bd112e8d7da26ba65700d191a25050565b60335473ffffffffffffffffffffffffffffffffffffffff1633146103e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610490565b73ffffffffffffffffffffffffffffffffffffffff8116610b24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610490565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa091015b60405180910390a15050565b60fb5460609081906fffffffffffffffffffffffffffffffff811667ffffffffffffffff811115610bde57610bde611dd2565b604051908082528060200260200182016040528015610c07578160200160208202803683370190505b509250806fffffffffffffffffffffffffffffffff1667ffffffffffffffff811115610c3557610c35611dd2565b604051908082528060200260200182016040528015610c5e578160200160208202803683370190505b5091506000805b826fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff1610156110e557600060fb826fffffffffffffffffffffffffffffffff1681548110610cb857610cb8611d74565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160010191503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166301e201786040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d739190611e01565b73ffffffffffffffffffffffffffffffffffffffff16141580610dab57503373ffffffffffffffffffffffffffffffffffffffff8216145b15610db65750610c65565b6040517fb491ddf700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a8116600483015289811660248301526000919083169063b491ddf79060440160408051808303816000875af1158015610e2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e539190611e1e565b915060019050816003811115610e6b57610e6b611e47565b03610f73578187856fffffffffffffffffffffffffffffffff1681518110610e9557610e95611d74565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f70a082310000000000000000000000000000000000000000000000000000000081528a82166004820152908316906370a0823190602401602060405180830381865afa158015610f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f349190611e76565b86856fffffffffffffffffffffffffffffffff1681518110610f5857610f58611d74565b6020908102919091010152610f6c84611e8f565b93506110de565b878015610f9157506002816003811115610f8f57610f8f611e47565b145b15610fbb578187856fffffffffffffffffffffffffffffffff1681518110610e9557610e95611d74565b87158015610fda57506003816003811115610fd857610fd8611e47565b145b156110de578187856fffffffffffffffffffffffffffffffff168151811061100457611004611d74565b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526040517f70a082310000000000000000000000000000000000000000000000000000000081528a82166004820152908316906370a0823190602401602060405180830381865afa15801561107f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a39190611e76565b86856fffffffffffffffffffffffffffffffff16815181106110c7576110c7611d74565b60209081029190910101526110db84611e8f565b93505b5050610c65565b508084528083526110f68385611698565b5050935093915050565b60fb546fffffffffffffffffffffffffffffffff9060005b816fffffffffffffffffffffffffffffffff16816fffffffffffffffffffffffffffffffff1610156111b3578373ffffffffffffffffffffffffffffffffffffffff1660fb826fffffffffffffffffffffffffffffffff168154811061118057611180611d74565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16036111ab578092505b600101611118565b5050919050565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556102d3816116bc565b60c954811161127c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696d60448201527f69740000000000000000000000000000000000000000000000000000000000006064820152608401610490565b60c980549082905560408051828152602081018490527fc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa9101610b9f565b6097546040517f18c5e8ab00000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906318c5e8ab906113139033908690600401611f22565b602060405180830381865afa158015611330573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113549190611f59565b905080611393573330836040517f4a3fa29300000000000000000000000000000000000000000000000000000000815260040161049093929190611f7b565b5050565b73ffffffffffffffffffffffffffffffffffffffff8116158061145657503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff166301e201786040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143d9190611e01565b73ffffffffffffffffffffffffffffffffffffffff1614155b1561148d576040517f36e7473200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061149882611100565b90506fffffffffffffffffffffffffffffffff808216146114e5576040517f0aef5e8600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60fb805460018101825560008290527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555461155e90611733565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fa0a158044a2552256f6415ce60c2ef0d6983a67f58e491cd7af6e48ae2abe25f90600090a25050565b73ffffffffffffffffffffffffffffffffffffffff81166102d3576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054610100900460ff16611687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b61168f61177d565b6102d38161181c565b6001825111156113935761139382826000600186516116b79190611d5b565b6118b3565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60c9548111156102d35760c9546040517ff257f636000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052604401610490565b600054610100900460ff16611814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b6103e9611add565b600054610100900460ff166102ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b80821015611ad75760008460026118ca8486611fbd565b6118d49190611fd0565b815181106118e4576118e4611d74565b6020908102919091010151905082825b80821015611aa4575b8287838151811061191057611910611d74565b6020026020010151111561192e576119278261200b565b91506118fd565b8287828151811061194157611941611d74565b6020026020010151101561195f5761195881612043565b905061192e565b86818151811061197157611971611d74565b602002602001015187838151811061198b5761198b611d74565b60200260200101511015611a94578681815181106119ab576119ab611d74565b60200260200101518783815181106119c5576119c5611d74565b60200260200101518884815181106119df576119df611d74565b602002602001018984815181106119f8576119f8611d74565b6020026020010182815250828152505050858181518110611a1b57611a1b611d74565b6020026020010151868381518110611a3557611a35611d74565b6020026020010151878481518110611a4f57611a4f611d74565b60200260200101888481518110611a6857611a68611d74565b73ffffffffffffffffffffffffffffffffffffffff9384166020918202929092010152911690526118f4565b611a9d8261200b565b91506118f4565b84811115611abd57611abd8787876116b7600186611d5b565b611ad38787611acd846001611fbd565b876118b3565b5050505b50505050565b600054610100900460ff16611b74576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610490565b6103e9336111ba565b73ffffffffffffffffffffffffffffffffffffffff811681146102d357600080fd5b600060208284031215611bb157600080fd5b8135611bbc81611b7d565b9392505050565b6020808252825182820181905260009190848201906040850190845b81811015611c1157835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611bdf565b50909695505050505050565b600060208284031215611c2f57600080fd5b5035919050565b60008060408385031215611c4957600080fd5b8235611c5481611b7d565b91506020830135611c6481611b7d565b809150509250929050565b604080825283519082018190526000906020906060840190828701845b82811015611cbe57815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101611c8c565b5050508381038285015284518082528583019183019060005b81811015611cf357835183529284019291840191600101611cd7565b5090979650505050505050565b60008060408385031215611d1357600080fd5b8235611d1e81611b7d565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611d6e57611d6e611d2c565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611e1357600080fd5b8151611bbc81611b7d565b60008060408385031215611e3157600080fd5b82519150602083015160048110611c6457600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060208284031215611e8857600080fd5b5051919050565b60006fffffffffffffffffffffffffffffffff808316818103611eb457611eb4611d2c565b6001019392505050565b6000815180845260005b81811015611ee457602081850181015186830182015201611ec8565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201526000611f516040830184611ebe565b949350505050565b600060208284031215611f6b57600080fd5b81518015158114611bbc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff808616835280851660208401525060606040830152611fb46060830184611ebe565b95945050505050565b80820180821115611d6e57611d6e611d2c565b600082612006577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361203c5761203c611d2c565b5060010190565b60008161205257612052611d2c565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea264697066735822122043fe620950a480d860f29545b04e4166e48b1a7cedd58d8784b99cbba91f803b64736f6c63430008190033",
|
|
484
|
+
"devdoc": {
|
|
485
|
+
"author": "Venus",
|
|
486
|
+
"custom:security-contact": "https://github.com/VenusProtocol/protocol-reserve#discussion",
|
|
487
|
+
"events": {
|
|
488
|
+
"Initialized(uint8)": {
|
|
489
|
+
"details": "Triggered when the contract has been initialized or reinitialized."
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"kind": "dev",
|
|
493
|
+
"methods": {
|
|
494
|
+
"acceptOwnership()": {
|
|
495
|
+
"details": "The new owner accepts the ownership transfer."
|
|
496
|
+
},
|
|
497
|
+
"addTokenConverter(address)": {
|
|
498
|
+
"custom:access": "Only Governance",
|
|
499
|
+
"custom:event": "ConverterAdded is emitted on success",
|
|
500
|
+
"params": {
|
|
501
|
+
"_tokenConverter": "Address of the token converter"
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
"constructor": {
|
|
505
|
+
"custom:oz-upgrades-unsafe-allow": "constructor"
|
|
506
|
+
},
|
|
507
|
+
"findTokenConverters(address,address)": {
|
|
508
|
+
"params": {
|
|
509
|
+
"_tokenAddressIn": "Address of tokenIn",
|
|
510
|
+
"_tokenAddressOut": "Address of tokenOut"
|
|
511
|
+
},
|
|
512
|
+
"returns": {
|
|
513
|
+
"converters": "Array of the conveters on the basis of the tokens pair",
|
|
514
|
+
"convertersBalance": "Array of balances with respect to token out"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"findTokenConvertersForConverters(address,address)": {
|
|
518
|
+
"params": {
|
|
519
|
+
"_tokenAddressIn": "Address of tokenIn",
|
|
520
|
+
"_tokenAddressOut": "Address of tokenOut"
|
|
521
|
+
},
|
|
522
|
+
"returns": {
|
|
523
|
+
"converters": "Array of the conveters on the basis of the tokens pair",
|
|
524
|
+
"convertersBalance": "Array of balances with respect to token out"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"getAllConverters()": {
|
|
528
|
+
"returns": {
|
|
529
|
+
"converters": "Array containing all the converters addresses"
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
"initialize(address,uint256)": {
|
|
533
|
+
"custom:error": "InvalidMaxLoopsLimit is thrown when when loops limit is invalid",
|
|
534
|
+
"custom:event": "ConverterAdded is emitted for each converter added on success",
|
|
535
|
+
"params": {
|
|
536
|
+
"_accessControlManager": "The address of ACM contract",
|
|
537
|
+
"_loopsLimit": "Limit for the loops in the contract to avoid DOS"
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"isTokenConverter(address)": {
|
|
541
|
+
"params": {
|
|
542
|
+
"_tokenConverter": "Address of the token converter"
|
|
543
|
+
},
|
|
544
|
+
"returns": {
|
|
545
|
+
"isConverter": "true if given address is converter otherwise false"
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"owner()": {
|
|
549
|
+
"details": "Returns the address of the current owner."
|
|
550
|
+
},
|
|
551
|
+
"pendingOwner()": {
|
|
552
|
+
"details": "Returns the address of the pending owner."
|
|
553
|
+
},
|
|
554
|
+
"removeTokenConverter(address)": {
|
|
555
|
+
"custom:access": "Only Governance",
|
|
556
|
+
"custom:error": "ConverterDoesNotExist is thrown when converter to remove does not exist",
|
|
557
|
+
"custom:event": "ConverterRemoved is emitted on success",
|
|
558
|
+
"params": {
|
|
559
|
+
"_tokenConverter": "Address of the token converter"
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"renounceOwnership()": {
|
|
563
|
+
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
|
|
564
|
+
},
|
|
565
|
+
"setAccessControlManager(address)": {
|
|
566
|
+
"custom:access": "Only Governance",
|
|
567
|
+
"custom:event": "Emits NewAccessControlManager event",
|
|
568
|
+
"details": "Admin function to set address of AccessControlManager",
|
|
569
|
+
"params": {
|
|
570
|
+
"accessControlManager_": "The new address of the AccessControlManager"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"setMaxLoopsLimit(uint256)": {
|
|
574
|
+
"custom:access": "Only owner",
|
|
575
|
+
"custom:error": "InvalidMaxLoopsLimit is thrown when when loops limit is invalid",
|
|
576
|
+
"params": {
|
|
577
|
+
"limit": "Limit for the max loops can execute at a time"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"transferOwnership(address)": {
|
|
581
|
+
"details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner."
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"title": "ConverterNetwork",
|
|
585
|
+
"version": 1
|
|
586
|
+
},
|
|
587
|
+
"userdoc": {
|
|
588
|
+
"errors": {
|
|
589
|
+
"ConverterAlreadyExists()": [
|
|
590
|
+
{
|
|
591
|
+
"notice": "Error thrown when converter already exists"
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
"ConverterDoesNotExist()": [
|
|
595
|
+
{
|
|
596
|
+
"notice": "Error thrown converter does not exist"
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
"InvalidMaxLoopsLimit(uint256)": [
|
|
600
|
+
{
|
|
601
|
+
"notice": "Error thrown when loops limit is invalid"
|
|
602
|
+
}
|
|
603
|
+
],
|
|
604
|
+
"InvalidTokenConverterAddress()": [
|
|
605
|
+
{
|
|
606
|
+
"notice": "Error thrown when converter address is invalid"
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
"MaxLoopsLimitExceeded(uint256,uint256)": [
|
|
610
|
+
{
|
|
611
|
+
"notice": "Thrown an error on maxLoopsLimit exceeds for any loop"
|
|
612
|
+
}
|
|
613
|
+
],
|
|
614
|
+
"Unauthorized(address,address,string)": [
|
|
615
|
+
{
|
|
616
|
+
"notice": "Thrown when the action is prohibited by AccessControlManager"
|
|
617
|
+
}
|
|
618
|
+
],
|
|
619
|
+
"ZeroAddressNotAllowed()": [
|
|
620
|
+
{
|
|
621
|
+
"notice": "Thrown if the supplied address is a zero address where it is not allowed"
|
|
622
|
+
}
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"events": {
|
|
626
|
+
"ConverterAdded(address)": {
|
|
627
|
+
"notice": "Emitted when new converter is added"
|
|
628
|
+
},
|
|
629
|
+
"ConverterRemoved(address)": {
|
|
630
|
+
"notice": "Emitted when converter is removed"
|
|
631
|
+
},
|
|
632
|
+
"MaxLoopsLimitUpdated(uint256,uint256)": {
|
|
633
|
+
"notice": "Emitted when max loops limit is set"
|
|
634
|
+
},
|
|
635
|
+
"NewAccessControlManager(address,address)": {
|
|
636
|
+
"notice": "Emitted when access control manager contract address is changed"
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"kind": "user",
|
|
640
|
+
"methods": {
|
|
641
|
+
"accessControlManager()": {
|
|
642
|
+
"notice": "Returns the address of the access control manager contract"
|
|
643
|
+
},
|
|
644
|
+
"addTokenConverter(address)": {
|
|
645
|
+
"notice": "Adds new converter to the array"
|
|
646
|
+
},
|
|
647
|
+
"allConverters(uint256)": {
|
|
648
|
+
"notice": "Array holding all the converters"
|
|
649
|
+
},
|
|
650
|
+
"findTokenConverters(address,address)": {
|
|
651
|
+
"notice": "Used to get the array of converters supporting conversions, arranged in descending order based on token balances It will return the converters which are open to users for conversion"
|
|
652
|
+
},
|
|
653
|
+
"findTokenConvertersForConverters(address,address)": {
|
|
654
|
+
"notice": "Used to get the array of converters supporting conversions, arranged in descending order based on token balances It will return the converters which are open to converters for conversion."
|
|
655
|
+
},
|
|
656
|
+
"getAllConverters()": {
|
|
657
|
+
"notice": "This function returns the array containing all the converters addresses"
|
|
658
|
+
},
|
|
659
|
+
"initialize(address,uint256)": {
|
|
660
|
+
"notice": "ConverterNetwork initializer"
|
|
661
|
+
},
|
|
662
|
+
"isTokenConverter(address)": {
|
|
663
|
+
"notice": "This function checks if the given address is a converter or not"
|
|
664
|
+
},
|
|
665
|
+
"removeTokenConverter(address)": {
|
|
666
|
+
"notice": "Removes converter from the array"
|
|
667
|
+
},
|
|
668
|
+
"setAccessControlManager(address)": {
|
|
669
|
+
"notice": "Sets the address of AccessControlManager"
|
|
670
|
+
},
|
|
671
|
+
"setMaxLoopsLimit(uint256)": {
|
|
672
|
+
"notice": "Set the limit for the loops can iterate to avoid the DOS"
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
"notice": "ConverterNetwork keeps track of all the converters and is used to fetch valid converters which provide conversions according to token addresses provided",
|
|
676
|
+
"version": 1
|
|
677
|
+
},
|
|
678
|
+
"storageLayout": {
|
|
679
|
+
"storage": [
|
|
680
|
+
{
|
|
681
|
+
"astId": 244,
|
|
682
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
683
|
+
"label": "_initialized",
|
|
684
|
+
"offset": 0,
|
|
685
|
+
"slot": "0",
|
|
686
|
+
"type": "t_uint8"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"astId": 247,
|
|
690
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
691
|
+
"label": "_initializing",
|
|
692
|
+
"offset": 1,
|
|
693
|
+
"slot": "0",
|
|
694
|
+
"type": "t_bool"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"astId": 1478,
|
|
698
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
699
|
+
"label": "__gap",
|
|
700
|
+
"offset": 0,
|
|
701
|
+
"slot": "1",
|
|
702
|
+
"type": "t_array(t_uint256)50_storage"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"astId": 116,
|
|
706
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
707
|
+
"label": "_owner",
|
|
708
|
+
"offset": 0,
|
|
709
|
+
"slot": "51",
|
|
710
|
+
"type": "t_address"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"astId": 236,
|
|
714
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
715
|
+
"label": "__gap",
|
|
716
|
+
"offset": 0,
|
|
717
|
+
"slot": "52",
|
|
718
|
+
"type": "t_array(t_uint256)49_storage"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"astId": 25,
|
|
722
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
723
|
+
"label": "_pendingOwner",
|
|
724
|
+
"offset": 0,
|
|
725
|
+
"slot": "101",
|
|
726
|
+
"type": "t_address"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"astId": 104,
|
|
730
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
731
|
+
"label": "__gap",
|
|
732
|
+
"offset": 0,
|
|
733
|
+
"slot": "102",
|
|
734
|
+
"type": "t_array(t_uint256)49_storage"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"astId": 5417,
|
|
738
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
739
|
+
"label": "_accessControlManager",
|
|
740
|
+
"offset": 0,
|
|
741
|
+
"slot": "151",
|
|
742
|
+
"type": "t_contract(IAccessControlManagerV8)5602"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"astId": 5422,
|
|
746
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
747
|
+
"label": "__gap",
|
|
748
|
+
"offset": 0,
|
|
749
|
+
"slot": "152",
|
|
750
|
+
"type": "t_array(t_uint256)49_storage"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"astId": 6563,
|
|
754
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
755
|
+
"label": "maxLoopsLimit",
|
|
756
|
+
"offset": 0,
|
|
757
|
+
"slot": "201",
|
|
758
|
+
"type": "t_uint256"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
"astId": 6568,
|
|
762
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
763
|
+
"label": "__gap",
|
|
764
|
+
"offset": 0,
|
|
765
|
+
"slot": "202",
|
|
766
|
+
"type": "t_array(t_uint256)49_storage"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"astId": 12108,
|
|
770
|
+
"contract": "contracts/TokenConverter/ConverterNetwork.sol:ConverterNetwork",
|
|
771
|
+
"label": "allConverters",
|
|
772
|
+
"offset": 0,
|
|
773
|
+
"slot": "251",
|
|
774
|
+
"type": "t_array(t_contract(IAbstractTokenConverter)12881)dyn_storage"
|
|
775
|
+
}
|
|
776
|
+
],
|
|
777
|
+
"types": {
|
|
778
|
+
"t_address": {
|
|
779
|
+
"encoding": "inplace",
|
|
780
|
+
"label": "address",
|
|
781
|
+
"numberOfBytes": "20"
|
|
782
|
+
},
|
|
783
|
+
"t_array(t_contract(IAbstractTokenConverter)12881)dyn_storage": {
|
|
784
|
+
"base": "t_contract(IAbstractTokenConverter)12881",
|
|
785
|
+
"encoding": "dynamic_array",
|
|
786
|
+
"label": "contract IAbstractTokenConverter[]",
|
|
787
|
+
"numberOfBytes": "32"
|
|
788
|
+
},
|
|
789
|
+
"t_array(t_uint256)49_storage": {
|
|
790
|
+
"base": "t_uint256",
|
|
791
|
+
"encoding": "inplace",
|
|
792
|
+
"label": "uint256[49]",
|
|
793
|
+
"numberOfBytes": "1568"
|
|
794
|
+
},
|
|
795
|
+
"t_array(t_uint256)50_storage": {
|
|
796
|
+
"base": "t_uint256",
|
|
797
|
+
"encoding": "inplace",
|
|
798
|
+
"label": "uint256[50]",
|
|
799
|
+
"numberOfBytes": "1600"
|
|
800
|
+
},
|
|
801
|
+
"t_bool": {
|
|
802
|
+
"encoding": "inplace",
|
|
803
|
+
"label": "bool",
|
|
804
|
+
"numberOfBytes": "1"
|
|
805
|
+
},
|
|
806
|
+
"t_contract(IAbstractTokenConverter)12881": {
|
|
807
|
+
"encoding": "inplace",
|
|
808
|
+
"label": "contract IAbstractTokenConverter",
|
|
809
|
+
"numberOfBytes": "20"
|
|
810
|
+
},
|
|
811
|
+
"t_contract(IAccessControlManagerV8)5602": {
|
|
812
|
+
"encoding": "inplace",
|
|
813
|
+
"label": "contract IAccessControlManagerV8",
|
|
814
|
+
"numberOfBytes": "20"
|
|
815
|
+
},
|
|
816
|
+
"t_uint256": {
|
|
817
|
+
"encoding": "inplace",
|
|
818
|
+
"label": "uint256",
|
|
819
|
+
"numberOfBytes": "32"
|
|
820
|
+
},
|
|
821
|
+
"t_uint8": {
|
|
822
|
+
"encoding": "inplace",
|
|
823
|
+
"label": "uint8",
|
|
824
|
+
"numberOfBytes": "1"
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|