@venusprotocol/oracle 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +11 -0
- package/README.md +107 -0
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +1 -1
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +1 -1
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SafeMath.sol/SafeMath.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/artifacts/build-info/a47a69a8f108d3e7113faf89771988ff.json +1 -0
- package/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
- package/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
- package/artifacts/contracts/Governance/AccessControlled.sol/AccessControlled.dbg.json +4 -0
- package/artifacts/contracts/Governance/AccessControlled.sol/AccessControlled.json +181 -0
- package/artifacts/contracts/Governance/IAccessControlManager.sol/IAccessControlManager.dbg.json +4 -0
- package/artifacts/contracts/Governance/IAccessControlManager.sol/IAccessControlManager.json +282 -0
- package/artifacts/contracts/PriceOracle.sol/PriceOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +130 -2
- package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.dbg.json +4 -0
- package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.json +30 -0
- package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +1 -1
- package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.dbg.json +4 -0
- package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.json +30 -0
- package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +1 -1
- package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +37 -6
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +1 -1
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +131 -2
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +122 -6
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +130 -2
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +132 -3
- package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +1 -1
- package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +1 -1
- package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +1 -1
- package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +1 -1
- package/contracts/Governance/AccessControlManager.sol +99 -0
- package/contracts/Governance/AccessControlled.sol +75 -0
- package/contracts/Governance/IAccessControlManager.sol +22 -0
- package/contracts/ResilientOracle.sol +44 -14
- package/contracts/interfaces/PublicResolverInterface.sol +7 -0
- package/contracts/interfaces/SIDRegistryInterface.sol +7 -0
- package/contracts/oracles/BinanceOracle.sol +35 -7
- package/contracts/oracles/BoundValidator.sol +36 -8
- package/contracts/oracles/ChainlinkOracle.sol +31 -21
- package/contracts/oracles/PythOracle.sol +23 -8
- package/contracts/oracles/TwapOracle.sol +41 -11
- package/deploy/1-deploy-oracles.ts +149 -0
- package/deploy/2-configure-feeds.ts +209 -0
- package/deployments/bsctestnet/AccessControlManager.json +563 -0
- package/deployments/bsctestnet/BinanceOracle.json +66 -40
- package/deployments/bsctestnet/BinanceOracle_Implementation.json +84 -38
- package/deployments/bsctestnet/BinanceOracle_Proxy.json +34 -34
- package/deployments/bsctestnet/BoundValidator.json +177 -39
- package/deployments/bsctestnet/BoundValidator_Implementation.json +248 -40
- package/deployments/bsctestnet/BoundValidator_Proxy.json +51 -37
- package/deployments/bsctestnet/ChainlinkOracle.json +161 -50
- package/deployments/bsctestnet/ChainlinkOracle_Implementation.json +239 -47
- package/deployments/bsctestnet/ChainlinkOracle_Proxy.json +44 -44
- package/deployments/bsctestnet/DefaultProxyAdmin.json +18 -18
- package/deployments/bsctestnet/PythOracle.json +178 -45
- package/deployments/bsctestnet/PythOracle_Implementation.json +246 -43
- package/deployments/bsctestnet/PythOracle_Proxy.json +53 -43
- package/deployments/bsctestnet/ResilientOracle.json +167 -48
- package/deployments/bsctestnet/ResilientOracle_Implementation.json +254 -51
- package/deployments/bsctestnet/ResilientOracle_Proxy.json +42 -46
- package/deployments/bsctestnet/TwapOracle.json +178 -40
- package/deployments/bsctestnet/TwapOracle_Implementation.json +270 -58
- package/deployments/bsctestnet/TwapOracle_Proxy.json +51 -37
- package/deployments/bsctestnet/solcInputs/{6153c675ce838eebb6442d63350712be.json → 30f2cb3e89e183b8669f05bddf9426d9.json} +46 -7
- package/package.json +3 -2
- package/artifacts/build-info/1d7bedd9b14544f287811332b9a539d7.json +0 -1
- package/artifacts/build-info/57da5d39a9f98618d0dcf1f6d4ff6b0d.json +0 -1
- package/artifacts/build-info/f6af69795174616b8b4a6373f9f1c538.json +0 -1
- package/deploy/1-deploy-oracles.d.ts +0 -2
- package/deploy/1-deploy-oracles.d.ts.map +0 -1
- package/deploy/1-deploy-oracles.js +0 -128
- package/deploy/1-deploy-oracles.js.map +0 -1
- package/deploy/2-configure-feeds.d.ts +0 -2
- package/deploy/2-configure-feeds.d.ts.map +0 -1
- package/deploy/2-configure-feeds.js +0 -139
- package/deploy/2-configure-feeds.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "0xCB2eCe619bA395Cd6B0f30a9543029B9652C4094",
|
|
3
3
|
"abi": [
|
|
4
4
|
{
|
|
5
5
|
"inputs": [
|
|
@@ -7,11 +7,37 @@
|
|
|
7
7
|
"internalType": "address",
|
|
8
8
|
"name": "vBnbAddress",
|
|
9
9
|
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "address",
|
|
13
|
+
"name": "vaiAddress",
|
|
14
|
+
"type": "address"
|
|
10
15
|
}
|
|
11
16
|
],
|
|
12
17
|
"stateMutability": "nonpayable",
|
|
13
18
|
"type": "constructor"
|
|
14
19
|
},
|
|
20
|
+
{
|
|
21
|
+
"inputs": [
|
|
22
|
+
{
|
|
23
|
+
"internalType": "address",
|
|
24
|
+
"name": "sender",
|
|
25
|
+
"type": "address"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"internalType": "address",
|
|
29
|
+
"name": "calledContract",
|
|
30
|
+
"type": "address"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"internalType": "string",
|
|
34
|
+
"name": "methodSignature",
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"name": "Unauthorized",
|
|
39
|
+
"type": "error"
|
|
40
|
+
},
|
|
15
41
|
{
|
|
16
42
|
"anonymous": false,
|
|
17
43
|
"inputs": [
|
|
@@ -25,6 +51,44 @@
|
|
|
25
51
|
"name": "Initialized",
|
|
26
52
|
"type": "event"
|
|
27
53
|
},
|
|
54
|
+
{
|
|
55
|
+
"anonymous": false,
|
|
56
|
+
"inputs": [
|
|
57
|
+
{
|
|
58
|
+
"indexed": false,
|
|
59
|
+
"internalType": "address",
|
|
60
|
+
"name": "oldAccessControlManager",
|
|
61
|
+
"type": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"indexed": false,
|
|
65
|
+
"internalType": "address",
|
|
66
|
+
"name": "newAccessControlManager",
|
|
67
|
+
"type": "address"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"name": "NewAccessControlManager",
|
|
71
|
+
"type": "event"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"anonymous": false,
|
|
75
|
+
"inputs": [
|
|
76
|
+
{
|
|
77
|
+
"indexed": true,
|
|
78
|
+
"internalType": "address",
|
|
79
|
+
"name": "previousOwner",
|
|
80
|
+
"type": "address"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"indexed": true,
|
|
84
|
+
"internalType": "address",
|
|
85
|
+
"name": "newOwner",
|
|
86
|
+
"type": "address"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"name": "OwnershipTransferStarted",
|
|
90
|
+
"type": "event"
|
|
91
|
+
},
|
|
28
92
|
{
|
|
29
93
|
"anonymous": false,
|
|
30
94
|
"inputs": [
|
|
@@ -108,6 +172,26 @@
|
|
|
108
172
|
"stateMutability": "view",
|
|
109
173
|
"type": "function"
|
|
110
174
|
},
|
|
175
|
+
{
|
|
176
|
+
"inputs": [],
|
|
177
|
+
"name": "acceptOwnership",
|
|
178
|
+
"outputs": [],
|
|
179
|
+
"stateMutability": "nonpayable",
|
|
180
|
+
"type": "function"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"inputs": [],
|
|
184
|
+
"name": "accessControlManager",
|
|
185
|
+
"outputs": [
|
|
186
|
+
{
|
|
187
|
+
"internalType": "contract IAccessControlManager",
|
|
188
|
+
"name": "",
|
|
189
|
+
"type": "address"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
"stateMutability": "view",
|
|
193
|
+
"type": "function"
|
|
194
|
+
},
|
|
111
195
|
{
|
|
112
196
|
"inputs": [
|
|
113
197
|
{
|
|
@@ -133,6 +217,11 @@
|
|
|
133
217
|
"internalType": "address",
|
|
134
218
|
"name": "underlyingPythOracle_",
|
|
135
219
|
"type": "address"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"internalType": "address",
|
|
223
|
+
"name": "accessControlManager_",
|
|
224
|
+
"type": "address"
|
|
136
225
|
}
|
|
137
226
|
],
|
|
138
227
|
"name": "initialize",
|
|
@@ -153,6 +242,19 @@
|
|
|
153
242
|
"stateMutability": "view",
|
|
154
243
|
"type": "function"
|
|
155
244
|
},
|
|
245
|
+
{
|
|
246
|
+
"inputs": [],
|
|
247
|
+
"name": "pendingOwner",
|
|
248
|
+
"outputs": [
|
|
249
|
+
{
|
|
250
|
+
"internalType": "address",
|
|
251
|
+
"name": "",
|
|
252
|
+
"type": "address"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"stateMutability": "view",
|
|
256
|
+
"type": "function"
|
|
257
|
+
},
|
|
156
258
|
{
|
|
157
259
|
"inputs": [],
|
|
158
260
|
"name": "renounceOwnership",
|
|
@@ -160,6 +262,19 @@
|
|
|
160
262
|
"stateMutability": "nonpayable",
|
|
161
263
|
"type": "function"
|
|
162
264
|
},
|
|
265
|
+
{
|
|
266
|
+
"inputs": [
|
|
267
|
+
{
|
|
268
|
+
"internalType": "address",
|
|
269
|
+
"name": "accessControlManager_",
|
|
270
|
+
"type": "address"
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"name": "setAccessControlManager",
|
|
274
|
+
"outputs": [],
|
|
275
|
+
"stateMutability": "nonpayable",
|
|
276
|
+
"type": "function"
|
|
277
|
+
},
|
|
163
278
|
{
|
|
164
279
|
"inputs": [
|
|
165
280
|
{
|
|
@@ -300,48 +415,65 @@
|
|
|
300
415
|
],
|
|
301
416
|
"stateMutability": "view",
|
|
302
417
|
"type": "function"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"inputs": [],
|
|
421
|
+
"name": "vai",
|
|
422
|
+
"outputs": [
|
|
423
|
+
{
|
|
424
|
+
"internalType": "address",
|
|
425
|
+
"name": "",
|
|
426
|
+
"type": "address"
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"stateMutability": "view",
|
|
430
|
+
"type": "function"
|
|
303
431
|
}
|
|
304
432
|
],
|
|
305
|
-
"transactionHash": "
|
|
433
|
+
"transactionHash": "0xc2089ca47d545126ad352c94dd633221c177f0a4bca396b1993fd7e0f478d6be",
|
|
306
434
|
"receipt": {
|
|
307
435
|
"to": null,
|
|
308
|
-
"from": "
|
|
309
|
-
"contractAddress": "
|
|
310
|
-
"transactionIndex":
|
|
311
|
-
"gasUsed": "
|
|
312
|
-
"logsBloom": "
|
|
313
|
-
"blockHash": "
|
|
314
|
-
"transactionHash": "
|
|
436
|
+
"from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1",
|
|
437
|
+
"contractAddress": "0xCB2eCe619bA395Cd6B0f30a9543029B9652C4094",
|
|
438
|
+
"transactionIndex": 0,
|
|
439
|
+
"gasUsed": "1299634",
|
|
440
|
+
"logsBloom": "0x00000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000001000000000000000000000400000000000000000000000000000000000400000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
441
|
+
"blockHash": "0x92378e91dfab22f871ca1db272088d481a5bd0d27e6143e9187aa21bb328ae49",
|
|
442
|
+
"transactionHash": "0xc2089ca47d545126ad352c94dd633221c177f0a4bca396b1993fd7e0f478d6be",
|
|
315
443
|
"logs": [
|
|
316
444
|
{
|
|
317
|
-
"transactionIndex":
|
|
318
|
-
"blockNumber":
|
|
319
|
-
"transactionHash": "
|
|
320
|
-
"address": "
|
|
445
|
+
"transactionIndex": 0,
|
|
446
|
+
"blockNumber": 28099632,
|
|
447
|
+
"transactionHash": "0xc2089ca47d545126ad352c94dd633221c177f0a4bca396b1993fd7e0f478d6be",
|
|
448
|
+
"address": "0xCB2eCe619bA395Cd6B0f30a9543029B9652C4094",
|
|
321
449
|
"topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
|
|
322
450
|
"data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
|
|
323
451
|
"logIndex": 0,
|
|
324
|
-
"blockHash": "
|
|
452
|
+
"blockHash": "0x92378e91dfab22f871ca1db272088d481a5bd0d27e6143e9187aa21bb328ae49"
|
|
325
453
|
}
|
|
326
454
|
],
|
|
327
|
-
"blockNumber":
|
|
328
|
-
"cumulativeGasUsed": "
|
|
455
|
+
"blockNumber": 28099632,
|
|
456
|
+
"cumulativeGasUsed": "1299634",
|
|
329
457
|
"status": 1,
|
|
330
458
|
"byzantium": true
|
|
331
459
|
},
|
|
332
|
-
"args": ["0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c"],
|
|
460
|
+
"args": ["0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c", "0x5fFbE5302BadED40941A403228E6AD03f93752d9"],
|
|
333
461
|
"numDeployments": 1,
|
|
334
|
-
"solcInputHash": "
|
|
335
|
-
"metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vBnbAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPythOracle\",\"type\":\"address\"}],\"name\":\"PythOracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BNB_ADDR\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EXP_SCALE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"getUnderlyingPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingPythOracle_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"internalType\":\"struct TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"internalType\":\"struct TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"underlyingPythOracle_\",\"type\":\"address\"}],\"name\":\"setUnderlyingPythOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenConfigs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"underlyingPythOracle\",\"outputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBnb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"params\":{\"vBnbAddress\":\"The address of the vBNB\"}},\"getUnderlyingPrice(address)\":{\"custom:error\":\"Zero address error thrown if underlyingPythOracle address is nullZero address error thrown if asset address is nullRange error thrown if price of Pyth oracle is not greater than zero\",\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price Underlying price with a precision of 10 decimals\"}},\"initialize(address)\":{\"params\":{\"underlyingPythOracle_\":\"Address of the Pyth oracle\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setTokenConfig((bytes32,address,uint64))\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Range error is thrown if max stale period is zeroNotNullAddress error is thrown if asset address is null\",\"params\":{\"tokenConfig\":\"Token config struct\"}},\"setTokenConfigs((bytes32,address,uint64)[])\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Zero length error is thrown if length of the array in parameter is 0\",\"params\":{\"tokenConfigs_\":\"Token config array\"}},\"setUnderlyingPythOracle(address)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress error thrown if underlyingPythOracle_ address is zero\",\"custom:event\":\"Emits PythOracleSet event with address of Pyth oracle.\",\"params\":{\"underlyingPythOracle_\":\"Pyth oracle contract address\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"vBnb\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"events\":{\"PythOracleSet(address)\":{\"notice\":\"Emit when setting a new pyth oracle address\"},\"TokenConfigAdded(address,bytes32,uint64)\":{\"notice\":\"Emit when a token config is added\"}},\"kind\":\"user\",\"methods\":{\"BNB_ADDR()\":{\"notice\":\"Set this as asset address for BNB. This is the underlying for vBNB\"},\"EXP_SCALE()\":{\"notice\":\"Exponent scale (decimal precision) of prices\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract. Sets immutable variables.\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Get price of underlying asset of the input vToken, under the hood this function get price from Pyth contract, the prices of which are updated externally\"},\"initialize(address)\":{\"notice\":\"Initializes the owner of the contract and sets required contracts\"},\"setTokenConfig((bytes32,address,uint64))\":{\"notice\":\"Set single token config. `maxStalePeriod` cannot be 0 and `vToken` can be a null address\"},\"setTokenConfigs((bytes32,address,uint64)[])\":{\"notice\":\"Batch set token configs\"},\"setUnderlyingPythOracle(address)\":{\"notice\":\"Set the underlying Pyth oracle contract address\"},\"tokenConfigs(address)\":{\"notice\":\"Token configs by asset address\"},\"underlyingPythOracle()\":{\"notice\":\"The actual pyth oracle address fetch & store the prices\"},\"vBnb()\":{\"notice\":\"vBNB address\"}},\"notice\":\"PythOracle contract reads prices from actual Pyth oracle contract which accepts, verifies and stores the updated prices from external sources\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/PythOracle.sol\":\"PythOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\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\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return 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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (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 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\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"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/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.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(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"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\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0f633a0223d9a1dcccfcf38a64c9de0874dfcbfac0c6941ccf074d63a2ce0e1e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address vToken) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address vToken,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8ac0bda5d5789c320bf219dc6691eef0e6617e9653bc0e24f407a44e4281edda\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/PythInterface.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n// SPDX-FileCopyrightText: 2021 Pyth Data Foundation\\npragma solidity 0.8.13;\\n\\ncontract PythStructs {\\n // A price with a degree of uncertainty, represented as a price +- a confidence interval.\\n //\\n // The confidence interval roughly corresponds to the standard error of a normal distribution.\\n // Both the price and confidence are stored in a fixed-point numeric representation,\\n // `x * (10^expo)`, where `expo` is the exponent.\\n //\\n // Please refer to the documentation at https://docs.pyth.network/consumers/best-practices for how\\n // to how this price safely.\\n struct Price {\\n // Price\\n int64 price;\\n // Confidence interval around the price\\n uint64 conf;\\n // Price exponent\\n int32 expo;\\n // Unix timestamp describing when the price was published\\n uint256 publishTime;\\n }\\n\\n // PriceFeed represents a current aggregate price from pyth publisher feeds.\\n struct PriceFeed {\\n // The price ID.\\n bytes32 id;\\n // Latest available price\\n Price price;\\n // Latest available exponentially-weighted moving average price\\n Price emaPrice;\\n }\\n}\\n\\n/// @title Consume prices from the Pyth Network (https://pyth.network/).\\n/// @dev Please refer to the guidance at https://docs.pyth.network/consumers/best-practices\\n/// for how to consume prices safely.\\n/// @author Pyth Data Association\\ninterface IPyth {\\n /// @dev Emitted when an update for price feed with `id` is processed successfully.\\n /// @param id The Pyth Price Feed ID.\\n /// @param fresh True if the price update is more recent and stored.\\n /// @param chainId ID of the source chain that the batch price update containing this price.\\n /// This value comes from Wormhole, and you can find the corresponding chains\\n /// at https://docs.wormholenetwork.com/wormhole/contracts.\\n /// @param sequenceNumber Sequence number of the batch price update containing this price.\\n /// @param lastPublishTime Publish time of the previously stored price.\\n /// @param publishTime Publish time of the given price update.\\n /// @param price Price of the given price update.\\n /// @param conf Confidence interval of the given price update.\\n event PriceFeedUpdate(\\n bytes32 indexed id,\\n bool indexed fresh,\\n uint16 chainId,\\n uint64 sequenceNumber,\\n uint256 lastPublishTime,\\n uint256 publishTime,\\n int64 price,\\n uint64 conf\\n );\\n\\n /// @dev Emitted when a batch price update is processed successfully.\\n /// @param chainId ID of the source chain that the batch price update comes from.\\n /// @param sequenceNumber Sequence number of the batch price update.\\n /// @param batchSize Number of prices within the batch price update.\\n /// @param freshPricesInBatch Number of prices that were more recent and were stored.\\n event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber, uint256 batchSize, uint256 freshPricesInBatch);\\n\\n /// @dev Emitted when a call to `updatePriceFeeds` is processed successfully.\\n /// @param sender Sender of the call (`msg.sender`).\\n /// @param batchCount Number of batches that this function processed.\\n /// @param fee Amount of paid fee for updating the prices.\\n event UpdatePriceFeeds(address indexed sender, uint256 batchCount, uint256 fee);\\n\\n /// @notice Returns the period (in seconds) that a price feed is considered valid since its publish time\\n function getValidTimePeriod() external view returns (uint256 validTimePeriod);\\n\\n /// @notice Returns the price and confidence interval.\\n /// @dev Reverts if the price has not been updated within the last `getValidTimePeriod()` seconds.\\n /// @param id The Pyth Price Feed ID of which to fetch the price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPrice(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price and confidence interval.\\n /// @dev Reverts if the EMA price is not available.\\n /// @param id The Pyth Price Feed ID of which to fetch the EMA price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPrice(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price of a price feed without any sanity checks.\\n /// @dev This function returns the most recent price update in this contract without any recency checks.\\n /// This function is unsafe as the returned price update may be arbitrarily far in the past.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getPrice` or `getPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price that is no older than `age` seconds of the current time.\\n /// @dev This function is a sanity-checked version of `getPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceNoOlderThan(bytes32 id, uint256 age) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price of a price feed without any sanity checks.\\n /// @dev This function returns the same price as `getEmaPrice` in the case where the price is available.\\n /// However, if the price is not recent this function returns the latest available price.\\n ///\\n /// The returned price can be from arbitrarily far in the past; this function makes no guarantees that\\n /// the returned price is recent or useful for any particular application.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getEmaPrice` or `getEmaPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price that is no older than `age` seconds\\n /// of the current time.\\n /// @dev This function is a sanity-checked version of `getEmaPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceNoOlderThan(bytes32 id, uint256 age) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Update price feeds with given update messages.\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n /// Prices will be updated if they are more recent than the current stored prices.\\n /// The call will succeed even if the update is not the most recent.\\n /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n function updatePriceFeeds(bytes[] calldata updateData) external payable;\\n\\n /// @notice Wrapper around updatePriceFeeds that rejects fast if a price update is not necessary. A price update is\\n /// necessary if the current on-chain publishTime is older than the given publishTime. It relies solely on the\\n /// given `publishTimes` for the price feeds and does not read the actual price\\n /// update publish time within `updateData`.\\n ///\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n ///\\n /// `priceIds` and `publishTimes` are two arrays with the same size that correspond to senders known publishTime\\n /// of each priceId when calling this method. If all of price feeds within `priceIds` have updated and have\\n /// a newer or equal publish time than the given publish time, it will reject the transaction to save gas.\\n /// Otherwise, it calls updatePriceFeeds method to update the prices.\\n ///\\n /// @dev Reverts if update is not needed or the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n /// @param priceIds Array of price ids.\\n /// @param publishTimes Array of publishTimes. `publishTimes[i]` corresponds to known `publishTime` of `priceIds[i]`\\n function updatePriceFeedsIfNecessary(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64[] calldata publishTimes\\n ) external payable;\\n\\n /// @notice Returns the required fee to update an array of price updates.\\n /// @param updateDataSize Number of price updates.\\n /// @return feeAmount The required fee in Wei.\\n function getUpdateFee(uint256 updateDataSize) external view returns (uint256 feeAmount);\\n}\\n\\nabstract contract AbstractPyth is IPyth {\\n /// @notice Returns the price feed with given id.\\n /// @dev Reverts if the price does not exist.\\n /// @param id The Pyth Price Feed ID of which to fetch the PriceFeed.\\n function queryPriceFeed(bytes32 id) public view virtual returns (PythStructs.PriceFeed memory priceFeed);\\n\\n /// @notice Returns true if a price feed with the given id exists.\\n /// @param id The Pyth Price Feed ID of which to check its existence.\\n function priceFeedExists(bytes32 id) public view virtual returns (bool exists);\\n\\n function getValidTimePeriod() public view virtual override returns (uint256 validTimePeriod);\\n\\n function getPrice(bytes32 id) external view override returns (PythStructs.Price memory price) {\\n return getPriceNoOlderThan(id, getValidTimePeriod());\\n }\\n\\n function getEmaPrice(bytes32 id) external view override returns (PythStructs.Price memory price) {\\n return getEmaPriceNoOlderThan(id, getValidTimePeriod());\\n }\\n\\n function getPriceUnsafe(bytes32 id) public view override returns (PythStructs.Price memory price) {\\n PythStructs.PriceFeed memory priceFeed = queryPriceFeed(id);\\n return priceFeed.price;\\n }\\n\\n function getPriceNoOlderThan(\\n bytes32 id,\\n uint256 age\\n ) public view override returns (PythStructs.Price memory price) {\\n price = getPriceUnsafe(id);\\n\\n require(diff(block.timestamp, price.publishTime) <= age, \\\"no price available which is recent enough\\\");\\n\\n return price;\\n }\\n\\n function getEmaPriceUnsafe(bytes32 id) public view override returns (PythStructs.Price memory price) {\\n PythStructs.PriceFeed memory priceFeed = queryPriceFeed(id);\\n return priceFeed.emaPrice;\\n }\\n\\n function getEmaPriceNoOlderThan(\\n bytes32 id,\\n uint256 age\\n ) public view override returns (PythStructs.Price memory price) {\\n price = getEmaPriceUnsafe(id);\\n\\n require(diff(block.timestamp, price.publishTime) <= age, \\\"no ema price available which is recent enough\\\");\\n\\n return price;\\n }\\n\\n function diff(uint256 x, uint256 y) internal pure returns (uint256) {\\n if (x > y) {\\n return x - y;\\n } else {\\n return y - x;\\n }\\n }\\n\\n // Access modifier is overridden to public to be able to call it locally.\\n function updatePriceFeeds(bytes[] calldata updateData) public payable virtual override;\\n\\n function updatePriceFeedsIfNecessary(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64[] calldata publishTimes\\n ) external payable override {\\n require(priceIds.length == publishTimes.length, \\\"priceIds and publishTimes arrays should have same length\\\");\\n\\n bool updateNeeded = false;\\n for (uint256 i = 0; i < priceIds.length; i++) {\\n if (!priceFeedExists(priceIds[i]) || queryPriceFeed(priceIds[i]).price.publishTime < publishTimes[i]) {\\n updateNeeded = true;\\n break;\\n }\\n }\\n\\n require(updateNeeded, \\\"no prices in the submitted batch have fresh prices, so this update will have no effect\\\");\\n\\n updatePriceFeeds(updateData);\\n }\\n}\\n\",\"keccak256\":\"0xdeaab73694af7b3b05087891b2391c5c486e1065e3912b9b586623523b60ae31\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/VBep20Interface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x3f845cd51b2d82f7932ac6c0ab714df97f733b01ce50f6fb0adb4c28447d4618\",\"license\":\"BSD-3-Clause\"},\"contracts/oracles/PythOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SignedMath.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"../interfaces/PythInterface.sol\\\";\\nimport \\\"../interfaces/OracleInterface.sol\\\";\\nimport \\\"../interfaces/VBep20Interface.sol\\\";\\n\\nstruct TokenConfig {\\n bytes32 pythId;\\n address asset;\\n uint64 maxStalePeriod;\\n}\\n\\n/**\\n * PythOracle contract reads prices from actual Pyth oracle contract which accepts, verifies and stores the\\n * updated prices from external sources\\n */\\ncontract PythOracle is OwnableUpgradeable, OracleInterface {\\n using SafeMath for uint256;\\n\\n // To calculate 10 ** n(which is a signed type)\\n using SignedMath for int256;\\n\\n // To cast int64/int8 types from Pyth to unsigned types\\n using SafeCast for int256;\\n\\n /// @notice Exponent scale (decimal precision) of prices\\n uint256 public constant EXP_SCALE = 1e18;\\n\\n /// @notice vBNB address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vBnb;\\n\\n /// @notice Set this as asset address for BNB. This is the underlying for vBNB\\n address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n /// @notice The actual pyth oracle address fetch & store the prices\\n IPyth public underlyingPythOracle;\\n\\n /// @notice Token configs by asset address\\n mapping(address => TokenConfig) public tokenConfigs;\\n\\n /// @notice Emit when setting a new pyth oracle address\\n event PythOracleSet(address indexed newPythOracle);\\n\\n /// @notice Emit when a token config is added\\n event TokenConfigAdded(address indexed vToken, bytes32 indexed pythId, uint64 indexed maxStalePeriod);\\n\\n modifier notNullAddress(address someone) {\\n require(someone != address(0), \\\"can't be zero address\\\");\\n _;\\n }\\n\\n /// @notice Constructor for the implementation contract. Sets immutable variables.\\n /// @param vBnbAddress The address of the vBNB\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address vBnbAddress) notNullAddress(vBnbAddress) {\\n vBnb = vBnbAddress;\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Batch set token configs\\n * @param tokenConfigs_ Token config array\\n * @custom:access Only Governance\\n * @custom:error Zero length error is thrown if length of the array in parameter is 0\\n */\\n function setTokenConfigs(TokenConfig[] memory tokenConfigs_) external onlyOwner {\\n require(tokenConfigs_.length != 0, \\\"length can't be 0\\\");\\n uint256 numTokenConfigs = tokenConfigs_.length;\\n for (uint256 i; i < numTokenConfigs; ++i) {\\n setTokenConfig(tokenConfigs_[i]);\\n }\\n }\\n\\n /**\\n * @notice Set the underlying Pyth oracle contract address\\n * @param underlyingPythOracle_ Pyth oracle contract address\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error thrown if underlyingPythOracle_ address is zero\\n * @custom:event Emits PythOracleSet event with address of Pyth oracle.\\n */\\n function setUnderlyingPythOracle(\\n IPyth underlyingPythOracle_\\n ) external onlyOwner notNullAddress(address(underlyingPythOracle_)) {\\n underlyingPythOracle = underlyingPythOracle_;\\n emit PythOracleSet(address(underlyingPythOracle_));\\n }\\n\\n /**\\n * @notice Initializes the owner of the contract and sets required contracts\\n * @param underlyingPythOracle_ Address of the Pyth oracle\\n */\\n function initialize(address underlyingPythOracle_) public initializer {\\n __Ownable_init();\\n require(underlyingPythOracle_ != address(0), \\\"pyth oracle cannot be zero address\\\");\\n underlyingPythOracle = IPyth(underlyingPythOracle_);\\n emit PythOracleSet(underlyingPythOracle_);\\n }\\n\\n /**\\n * @notice Set single token config. `maxStalePeriod` cannot be 0 and `vToken` can be a null address\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error Range error is thrown if max stale period is zero\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n */\\n function setTokenConfig(TokenConfig memory tokenConfig) public onlyOwner notNullAddress(tokenConfig.asset) {\\n require(tokenConfig.maxStalePeriod != 0, \\\"max stale period cannot be 0\\\");\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(tokenConfig.asset, tokenConfig.pythId, tokenConfig.maxStalePeriod);\\n }\\n\\n /**\\n * @notice Get price of underlying asset of the input vToken, under the hood this function\\n * get price from Pyth contract, the prices of which are updated externally\\n * @param vToken vToken address\\n * @return price Underlying price with a precision of 10 decimals\\n * @custom:error Zero address error thrown if underlyingPythOracle address is null\\n * @custom:error Zero address error thrown if asset address is null\\n * @custom:error Range error thrown if price of Pyth oracle is not greater than zero\\n */\\n function getUnderlyingPrice(address vToken) public view override returns (uint256) {\\n require(address(underlyingPythOracle) != address(0), \\\"Pyth oracle is zero address\\\");\\n\\n address asset;\\n uint256 decimals;\\n\\n // VBNB token doesn't have `underlying` method\\n if (address(vToken) == vBnb) {\\n asset = BNB_ADDR;\\n decimals = 18;\\n } else {\\n asset = VBep20Interface(vToken).underlying();\\n decimals = VBep20Interface(asset).decimals();\\n }\\n\\n TokenConfig storage tokenConfig = tokenConfigs[asset];\\n require(tokenConfig.asset != address(0), \\\"asset doesn't exist\\\");\\n\\n // if the price is expired after it's compared against `maxStalePeriod`, the following call will revert\\n PythStructs.Price memory priceInfo = underlyingPythOracle.getPriceNoOlderThan(\\n tokenConfig.pythId,\\n tokenConfig.maxStalePeriod\\n );\\n\\n uint256 price = int256(priceInfo.price).toUint256();\\n\\n require(price > 0, \\\"Pyth oracle price must be positive\\\");\\n\\n // the price returned from Pyth is price ** 10^expo, which is the real dollar price of the assets\\n // we need to multiply it by 1e18 to make the price 18 decimals\\n if (priceInfo.expo > 0) {\\n return price.mul(EXP_SCALE).mul(10 ** int256(priceInfo.expo).toUint256()) * (10 ** (18 - decimals));\\n } else {\\n return price.mul(EXP_SCALE).div(10 ** int256(-priceInfo.expo).toUint256()) * (10 ** (18 - decimals));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9baa348fd6140e407821098abe236510c53af68b88d22f7d45f0ebf2c612d8eb\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
336
|
-
"bytecode": "0x60a060405234801561001057600080fd5b506040516112ca3803806112ca83398101604081905261002f91610163565b806001600160a01b03811661008b5760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f2061646472657373000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166080526100a06100a7565b5050610193565b600054610100900460ff161561010f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610082565b60005460ff9081161015610161576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60006020828403121561017557600080fd5b81516001600160a01b038116811461018c57600080fd5b9392505050565b6080516111156101b560003960008181610194015261077f01526111156000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063c4d66de811610066578063c4d66de814610214578063eb8bee7014610227578063f2fde38b1461023a578063fc57d4df1461024d57600080fd5b8063715018a6146101de5780638da5cb5b146101e6578063bbba205d146101f757600080fd5b80631b69dc5f146100d45780633e83b6b81461014957806356fa5a561461017c5780635ba3792d1461018f5780636a8c7d35146101b6578063703ae1b9146101cb575b600080fd5b6101176100e2366004610c5e565b606660205260009081526040902080546001909101546001600160a01b03811690600160a01b900467ffffffffffffffff1683565b604080519384526001600160a01b03909216602084015267ffffffffffffffff16908201526060015b60405180910390f35b61016473bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b039091168152602001610140565b606554610164906001600160a01b031681565b6101647f000000000000000000000000000000000000000000000000000000000000000081565b6101c96101c4366004610d4c565b610260565b005b6101c96101d9366004610c5e565b6102f6565b6101c9610398565b6033546001600160a01b0316610164565b610206670de0b6b3a764000081565b604051908152602001610140565b6101c9610222366004610c5e565b6103ac565b6101c9610235366004610dfc565b610566565b6101c9610248366004610c5e565b6106a6565b61020661025b366004610c5e565b61071f565b610268610ac7565b80516000036102b25760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b818110156102f1576102e18382815181106102d4576102d4610e18565b6020026020010151610566565b6102ea81610e44565b90506102b7565b505050565b6102fe610ac7565b806001600160a01b03811661034d5760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016102a9565b606580546001600160a01b0319166001600160a01b0384169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a25050565b6103a0610ac7565b6103aa6000610b21565b565b600054610100900460ff16158080156103cc5750600054600160ff909116105b806103e65750303b1580156103e6575060005460ff166001145b6104495760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102a9565b6000805460ff19166001179055801561046c576000805461ff0019166101001790555b610474610b73565b6001600160a01b0382166104d55760405162461bcd60e51b815260206004820152602260248201527f70797468206f7261636c652063616e6e6f74206265207a65726f206164647265604482015261737360f01b60648201526084016102a9565b606580546001600160a01b0319166001600160a01b0384169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a28015610562576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61056e610ac7565b60208101516001600160a01b0381166105c15760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016102a9565b816040015167ffffffffffffffff1660000361061f5760405162461bcd60e51b815260206004820152601c60248201527f6d6178207374616c6520706572696f642063616e6e6f7420626520300000000060448201526064016102a9565b602082810180516001600160a01b03908116600090815260669093526040808420865180825593516001909101805483890151929094166001600160e01b03199094168417600160a01b67ffffffffffffffff909316928302179055905190937f559091caed5aa983e358fdf18e8cefbc8ea71f64ea252477cf32778ae4c398b291a45050565b6106ae610ac7565b6001600160a01b0381166107135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102a9565b61071c81610b21565b50565b6065546000906001600160a01b031661077a5760405162461bcd60e51b815260206004820152601b60248201527f50797468206f7261636c65206973207a65726f2061646472657373000000000060448201526064016102a9565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036107d5575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb905060126108a1565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610813573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108379190610e5d565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b9190610e7a565b60ff1690505b6001600160a01b03808316600090815260666020526040902060018101549091166109045760405162461bcd60e51b8152602060048201526013602482015272185cdcd95d08191bd95cdb89dd08195e1a5cdd606a1b60448201526064016102a9565b6065548154600183015460405163052571af60e51b81526004810192909252600160a01b900467ffffffffffffffff1660248201526000916001600160a01b03169063a4ae35e090604401608060405180830381865afa15801561096c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109909190610e9d565b905060006109a4826000015160070b610ba2565b905060008111610a015760405162461bcd60e51b815260206004820152602260248201527f50797468206f7261636c65207072696365206d75737420626520706f73697469604482015261766560f01b60648201526084016102a9565b6000826040015160030b1315610a7257610a1c846012610f29565b610a2790600a611024565b610a5d610a3a846040015160030b610ba2565b610a4590600a611024565b610a5784670de0b6b3a7640000610bf8565b90610bf8565b610a679190611030565b979650505050505050565b610a7d846012610f29565b610a8890600a611024565b610a5d610aa48460400151610a9c9061104f565b60030b610ba2565b610aaf90600a611024565b610ac184670de0b6b3a7640000610bf8565b90610c0d565b6033546001600160a01b031633146103aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102a9565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b9a5760405162461bcd60e51b81526004016102a990611072565b6103aa610c19565b600080821215610bf45760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016102a9565b5090565b6000610c048284611030565b90505b92915050565b6000610c0482846110bd565b600054610100900460ff16610c405760405162461bcd60e51b81526004016102a990611072565b6103aa33610b21565b6001600160a01b038116811461071c57600080fd5b600060208284031215610c7057600080fd5b8135610c7b81610c49565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610cc157610cc1610c82565b604052919050565b67ffffffffffffffff8116811461071c57600080fd5b600060608284031215610cf157600080fd5b6040516060810181811067ffffffffffffffff82111715610d1457610d14610c82565b604052823581529050806020830135610d2c81610c49565b60208201526040830135610d3f81610cc9565b6040919091015292915050565b60006020808385031215610d5f57600080fd5b823567ffffffffffffffff80821115610d7757600080fd5b818501915085601f830112610d8b57600080fd5b813581811115610d9d57610d9d610c82565b610dab848260051b01610c98565b81815284810192506060918202840185019188831115610dca57600080fd5b938501935b82851015610df057610de18986610cdf565b84529384019392850192610dcf565b50979650505050505050565b600060608284031215610e0e57600080fd5b610c048383610cdf565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610e5657610e56610e2e565b5060010190565b600060208284031215610e6f57600080fd5b8151610c7b81610c49565b600060208284031215610e8c57600080fd5b815160ff81168114610c7b57600080fd5b600060808284031215610eaf57600080fd5b6040516080810181811067ffffffffffffffff82111715610ed257610ed2610c82565b6040528251600781900b8114610ee757600080fd5b81526020830151610ef781610cc9565b60208201526040830151600381900b8114610f1157600080fd5b60408201526060928301519281019290925250919050565b600082821015610f3b57610f3b610e2e565b500390565b600181815b80851115610f7b578160001904821115610f6157610f61610e2e565b80851615610f6e57918102915b93841c9390800290610f45565b509250929050565b600082610f9257506001610c07565b81610f9f57506000610c07565b8160018114610fb55760028114610fbf57610fdb565b6001915050610c07565b60ff841115610fd057610fd0610e2e565b50506001821b610c07565b5060208310610133831016604e8410600b8410161715610ffe575081810a610c07565b6110088383610f40565b806000190482111561101c5761101c610e2e565b029392505050565b6000610c048383610f83565b600081600019048311821515161561104a5761104a610e2e565b500290565b60008160030b637fffffff19810361106957611069610e2e565b60000392915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000826110da57634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212201b890eba312b655ef669c5c8c11dedd2af763ce166a017cec945c79fdb45107d64736f6c634300080d0033",
|
|
337
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063715018a61161008c578063c4d66de811610066578063c4d66de814610214578063eb8bee7014610227578063f2fde38b1461023a578063fc57d4df1461024d57600080fd5b8063715018a6146101de5780638da5cb5b146101e6578063bbba205d146101f757600080fd5b80631b69dc5f146100d45780633e83b6b81461014957806356fa5a561461017c5780635ba3792d1461018f5780636a8c7d35146101b6578063703ae1b9146101cb575b600080fd5b6101176100e2366004610c5e565b606660205260009081526040902080546001909101546001600160a01b03811690600160a01b900467ffffffffffffffff1683565b604080519384526001600160a01b03909216602084015267ffffffffffffffff16908201526060015b60405180910390f35b61016473bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b039091168152602001610140565b606554610164906001600160a01b031681565b6101647f000000000000000000000000000000000000000000000000000000000000000081565b6101c96101c4366004610d4c565b610260565b005b6101c96101d9366004610c5e565b6102f6565b6101c9610398565b6033546001600160a01b0316610164565b610206670de0b6b3a764000081565b604051908152602001610140565b6101c9610222366004610c5e565b6103ac565b6101c9610235366004610dfc565b610566565b6101c9610248366004610c5e565b6106a6565b61020661025b366004610c5e565b61071f565b610268610ac7565b80516000036102b25760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b818110156102f1576102e18382815181106102d4576102d4610e18565b6020026020010151610566565b6102ea81610e44565b90506102b7565b505050565b6102fe610ac7565b806001600160a01b03811661034d5760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016102a9565b606580546001600160a01b0319166001600160a01b0384169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a25050565b6103a0610ac7565b6103aa6000610b21565b565b600054610100900460ff16158080156103cc5750600054600160ff909116105b806103e65750303b1580156103e6575060005460ff166001145b6104495760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102a9565b6000805460ff19166001179055801561046c576000805461ff0019166101001790555b610474610b73565b6001600160a01b0382166104d55760405162461bcd60e51b815260206004820152602260248201527f70797468206f7261636c652063616e6e6f74206265207a65726f206164647265604482015261737360f01b60648201526084016102a9565b606580546001600160a01b0319166001600160a01b0384169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a28015610562576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b61056e610ac7565b60208101516001600160a01b0381166105c15760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016102a9565b816040015167ffffffffffffffff1660000361061f5760405162461bcd60e51b815260206004820152601c60248201527f6d6178207374616c6520706572696f642063616e6e6f7420626520300000000060448201526064016102a9565b602082810180516001600160a01b03908116600090815260669093526040808420865180825593516001909101805483890151929094166001600160e01b03199094168417600160a01b67ffffffffffffffff909316928302179055905190937f559091caed5aa983e358fdf18e8cefbc8ea71f64ea252477cf32778ae4c398b291a45050565b6106ae610ac7565b6001600160a01b0381166107135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102a9565b61071c81610b21565b50565b6065546000906001600160a01b031661077a5760405162461bcd60e51b815260206004820152601b60248201527f50797468206f7261636c65206973207a65726f2061646472657373000000000060448201526064016102a9565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036107d5575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb905060126108a1565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610813573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108379190610e5d565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b9190610e7a565b60ff1690505b6001600160a01b03808316600090815260666020526040902060018101549091166109045760405162461bcd60e51b8152602060048201526013602482015272185cdcd95d08191bd95cdb89dd08195e1a5cdd606a1b60448201526064016102a9565b6065548154600183015460405163052571af60e51b81526004810192909252600160a01b900467ffffffffffffffff1660248201526000916001600160a01b03169063a4ae35e090604401608060405180830381865afa15801561096c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109909190610e9d565b905060006109a4826000015160070b610ba2565b905060008111610a015760405162461bcd60e51b815260206004820152602260248201527f50797468206f7261636c65207072696365206d75737420626520706f73697469604482015261766560f01b60648201526084016102a9565b6000826040015160030b1315610a7257610a1c846012610f29565b610a2790600a611024565b610a5d610a3a846040015160030b610ba2565b610a4590600a611024565b610a5784670de0b6b3a7640000610bf8565b90610bf8565b610a679190611030565b979650505050505050565b610a7d846012610f29565b610a8890600a611024565b610a5d610aa48460400151610a9c9061104f565b60030b610ba2565b610aaf90600a611024565b610ac184670de0b6b3a7640000610bf8565b90610c0d565b6033546001600160a01b031633146103aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102a9565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b9a5760405162461bcd60e51b81526004016102a990611072565b6103aa610c19565b600080821215610bf45760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016102a9565b5090565b6000610c048284611030565b90505b92915050565b6000610c0482846110bd565b600054610100900460ff16610c405760405162461bcd60e51b81526004016102a990611072565b6103aa33610b21565b6001600160a01b038116811461071c57600080fd5b600060208284031215610c7057600080fd5b8135610c7b81610c49565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610cc157610cc1610c82565b604052919050565b67ffffffffffffffff8116811461071c57600080fd5b600060608284031215610cf157600080fd5b6040516060810181811067ffffffffffffffff82111715610d1457610d14610c82565b604052823581529050806020830135610d2c81610c49565b60208201526040830135610d3f81610cc9565b6040919091015292915050565b60006020808385031215610d5f57600080fd5b823567ffffffffffffffff80821115610d7757600080fd5b818501915085601f830112610d8b57600080fd5b813581811115610d9d57610d9d610c82565b610dab848260051b01610c98565b81815284810192506060918202840185019188831115610dca57600080fd5b938501935b82851015610df057610de18986610cdf565b84529384019392850192610dcf565b50979650505050505050565b600060608284031215610e0e57600080fd5b610c048383610cdf565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610e5657610e56610e2e565b5060010190565b600060208284031215610e6f57600080fd5b8151610c7b81610c49565b600060208284031215610e8c57600080fd5b815160ff81168114610c7b57600080fd5b600060808284031215610eaf57600080fd5b6040516080810181811067ffffffffffffffff82111715610ed257610ed2610c82565b6040528251600781900b8114610ee757600080fd5b81526020830151610ef781610cc9565b60208201526040830151600381900b8114610f1157600080fd5b60408201526060928301519281019290925250919050565b600082821015610f3b57610f3b610e2e565b500390565b600181815b80851115610f7b578160001904821115610f6157610f61610e2e565b80851615610f6e57918102915b93841c9390800290610f45565b509250929050565b600082610f9257506001610c07565b81610f9f57506000610c07565b8160018114610fb55760028114610fbf57610fdb565b6001915050610c07565b60ff841115610fd057610fd0610e2e565b50506001821b610c07565b5060208310610133831016604e8410600b8410161715610ffe575081810a610c07565b6110088383610f40565b806000190482111561101c5761101c610e2e565b029392505050565b6000610c048383610f83565b600081600019048311821515161561104a5761104a610e2e565b500290565b60008160030b637fffffff19810361106957611069610e2e565b60000392915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000826110da57634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212201b890eba312b655ef669c5c8c11dedd2af763ce166a017cec945c79fdb45107d64736f6c634300080d0033",
|
|
462
|
+
"solcInputHash": "30f2cb3e89e183b8669f05bddf9426d9",
|
|
463
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vBnbAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"vaiAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPythOracle\",\"type\":\"address\"}],\"name\":\"PythOracleSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BNB_ADDR\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EXP_SCALE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"getUnderlyingPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingPythOracle_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"internalType\":\"struct TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"internalType\":\"struct TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"underlyingPythOracle_\",\"type\":\"address\"}],\"name\":\"setUnderlyingPythOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenConfigs\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"pythId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxStalePeriod\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"underlyingPythOracle\",\"outputs\":[{\"internalType\":\"contract IPyth\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBnb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vai\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\",\"params\":{\"vBnbAddress\":\"The address of the vBNB\",\"vaiAddress\":\"The address of the VAI\"}},\"getUnderlyingPrice(address)\":{\"custom:error\":\"Zero address error thrown if underlyingPythOracle address is nullZero address error thrown if asset address is nullRange error thrown if price of Pyth oracle is not greater than zero\",\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price Underlying price with a precision of 10 decimals\"}},\"initialize(address,address)\":{\"params\":{\"accessControlManager_\":\"Address of the access control manager contract\",\"underlyingPythOracle_\":\"Address of the Pyth oracle\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"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\"}},\"setTokenConfig((bytes32,address,uint64))\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Range error is thrown if max stale period is zeroNotNullAddress error is thrown if asset address is null\",\"params\":{\"tokenConfig\":\"Token config struct\"}},\"setTokenConfigs((bytes32,address,uint64)[])\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Zero length error is thrown if length of the array in parameter is 0\",\"params\":{\"tokenConfigs_\":\"Token config array\"}},\"setUnderlyingPythOracle(address)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress error thrown if underlyingPythOracle_ address is zero\",\"custom:event\":\"Emits PythOracleSet event with address of Pyth oracle.\",\"params\":{\"underlyingPythOracle_\":\"Pyth oracle contract address\"}},\"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.\"}},\"stateVariables\":{\"vBnb\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vai\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"PythOracleSet(address)\":{\"notice\":\"Emit when setting a new pyth oracle address\"},\"TokenConfigAdded(address,bytes32,uint64)\":{\"notice\":\"Emit when a token config is added\"}},\"kind\":\"user\",\"methods\":{\"BNB_ADDR()\":{\"notice\":\"Set this as asset address for BNB. This is the underlying for vBNB\"},\"EXP_SCALE()\":{\"notice\":\"Exponent scale (decimal precision) of prices\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract. Sets immutable variables.\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Get price of underlying asset of the input vToken, under the hood this function get price from Pyth contract, the prices of which are updated externally\"},\"initialize(address,address)\":{\"notice\":\"Initializes the owner of the contract and sets required contracts\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setTokenConfig((bytes32,address,uint64))\":{\"notice\":\"Set single token config. `maxStalePeriod` cannot be 0 and `vToken` can be a null address\"},\"setTokenConfigs((bytes32,address,uint64)[])\":{\"notice\":\"Batch set token configs\"},\"setUnderlyingPythOracle(address)\":{\"notice\":\"Set the underlying Pyth oracle contract address\"},\"tokenConfigs(address)\":{\"notice\":\"Token configs by asset address\"},\"underlyingPythOracle()\":{\"notice\":\"The actual pyth oracle address fetch & store the prices\"},\"vBnb()\":{\"notice\":\"vBNB address\"},\"vai()\":{\"notice\":\"VAI address\"}},\"notice\":\"PythOracle contract reads prices from actual Pyth oracle contract which accepts, verifies and stores the updated prices from external sources\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/PythOracle.sol\":\"PythOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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() external {\\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\":\"0xd712fb45b3ea0ab49679164e3895037adc26ce12879d5184feb040e01c1c07a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\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\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return 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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (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 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\":\"0x2edcb41c121abc510932e8d83ff8b82cf9cdde35e7c297622f5c29ef0af25183\",\"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.6.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(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"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\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n require(downcasted == value, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x52a8cfb0f5239d11b457dcdd1b326992ef672714ca8da71a157255bddd13f3ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0f633a0223d9a1dcccfcf38a64c9de0874dfcbfac0c6941ccf074d63a2ce0e1e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/Governance/AccessControlled.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManager.sol\\\";\\n\\nabstract contract AccessControlled is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManager 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 /**\\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 (IAccessControlManager) {\\n return _accessControlManager;\\n }\\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 * @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 = IAccessControlManager(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\":\"0xe33ff93b01b61b8e0f330b6f54351a0d566f2c429148acd1195be133a8bcba82\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManager.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\ninterface IAccessControlManager 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\":\"0x1fbf610bfa135da099b27e601ff9add0bd518888d0d3a72a1b8804f02351b760\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\ninterface OracleInterface {\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address vToken) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address vToken,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8ac0bda5d5789c320bf219dc6691eef0e6617e9653bc0e24f407a44e4281edda\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/PythInterface.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n// SPDX-FileCopyrightText: 2021 Pyth Data Foundation\\npragma solidity 0.8.13;\\n\\ncontract PythStructs {\\n // A price with a degree of uncertainty, represented as a price +- a confidence interval.\\n //\\n // The confidence interval roughly corresponds to the standard error of a normal distribution.\\n // Both the price and confidence are stored in a fixed-point numeric representation,\\n // `x * (10^expo)`, where `expo` is the exponent.\\n //\\n // Please refer to the documentation at https://docs.pyth.network/consumers/best-practices for how\\n // to how this price safely.\\n struct Price {\\n // Price\\n int64 price;\\n // Confidence interval around the price\\n uint64 conf;\\n // Price exponent\\n int32 expo;\\n // Unix timestamp describing when the price was published\\n uint256 publishTime;\\n }\\n\\n // PriceFeed represents a current aggregate price from pyth publisher feeds.\\n struct PriceFeed {\\n // The price ID.\\n bytes32 id;\\n // Latest available price\\n Price price;\\n // Latest available exponentially-weighted moving average price\\n Price emaPrice;\\n }\\n}\\n\\n/// @title Consume prices from the Pyth Network (https://pyth.network/).\\n/// @dev Please refer to the guidance at https://docs.pyth.network/consumers/best-practices\\n/// for how to consume prices safely.\\n/// @author Pyth Data Association\\ninterface IPyth {\\n /// @dev Emitted when an update for price feed with `id` is processed successfully.\\n /// @param id The Pyth Price Feed ID.\\n /// @param fresh True if the price update is more recent and stored.\\n /// @param chainId ID of the source chain that the batch price update containing this price.\\n /// This value comes from Wormhole, and you can find the corresponding chains\\n /// at https://docs.wormholenetwork.com/wormhole/contracts.\\n /// @param sequenceNumber Sequence number of the batch price update containing this price.\\n /// @param lastPublishTime Publish time of the previously stored price.\\n /// @param publishTime Publish time of the given price update.\\n /// @param price Price of the given price update.\\n /// @param conf Confidence interval of the given price update.\\n event PriceFeedUpdate(\\n bytes32 indexed id,\\n bool indexed fresh,\\n uint16 chainId,\\n uint64 sequenceNumber,\\n uint256 lastPublishTime,\\n uint256 publishTime,\\n int64 price,\\n uint64 conf\\n );\\n\\n /// @dev Emitted when a batch price update is processed successfully.\\n /// @param chainId ID of the source chain that the batch price update comes from.\\n /// @param sequenceNumber Sequence number of the batch price update.\\n /// @param batchSize Number of prices within the batch price update.\\n /// @param freshPricesInBatch Number of prices that were more recent and were stored.\\n event BatchPriceFeedUpdate(uint16 chainId, uint64 sequenceNumber, uint256 batchSize, uint256 freshPricesInBatch);\\n\\n /// @dev Emitted when a call to `updatePriceFeeds` is processed successfully.\\n /// @param sender Sender of the call (`msg.sender`).\\n /// @param batchCount Number of batches that this function processed.\\n /// @param fee Amount of paid fee for updating the prices.\\n event UpdatePriceFeeds(address indexed sender, uint256 batchCount, uint256 fee);\\n\\n /// @notice Returns the period (in seconds) that a price feed is considered valid since its publish time\\n function getValidTimePeriod() external view returns (uint256 validTimePeriod);\\n\\n /// @notice Returns the price and confidence interval.\\n /// @dev Reverts if the price has not been updated within the last `getValidTimePeriod()` seconds.\\n /// @param id The Pyth Price Feed ID of which to fetch the price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPrice(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price and confidence interval.\\n /// @dev Reverts if the EMA price is not available.\\n /// @param id The Pyth Price Feed ID of which to fetch the EMA price and confidence interval.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPrice(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price of a price feed without any sanity checks.\\n /// @dev This function returns the most recent price update in this contract without any recency checks.\\n /// This function is unsafe as the returned price update may be arbitrarily far in the past.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getPrice` or `getPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the price that is no older than `age` seconds of the current time.\\n /// @dev This function is a sanity-checked version of `getPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getPriceNoOlderThan(bytes32 id, uint256 age) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price of a price feed without any sanity checks.\\n /// @dev This function returns the same price as `getEmaPrice` in the case where the price is available.\\n /// However, if the price is not recent this function returns the latest available price.\\n ///\\n /// The returned price can be from arbitrarily far in the past; this function makes no guarantees that\\n /// the returned price is recent or useful for any particular application.\\n ///\\n /// Users of this function should check the `publishTime` in the price to ensure that the returned price is\\n /// sufficiently recent for their application. If you are considering using this function, it may be\\n /// safer / easier to use either `getEmaPrice` or `getEmaPriceNoOlderThan`.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Returns the exponentially-weighted moving average price that is no older than `age` seconds\\n /// of the current time.\\n /// @dev This function is a sanity-checked version of `getEmaPriceUnsafe` which is useful in\\n /// applications that require a sufficiently-recent price. Reverts if the price wasn't updated sufficiently\\n /// recently.\\n /// @return price - please read the documentation of PythStructs.Price to understand how to use this safely.\\n function getEmaPriceNoOlderThan(bytes32 id, uint256 age) external view returns (PythStructs.Price memory price);\\n\\n /// @notice Update price feeds with given update messages.\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n /// Prices will be updated if they are more recent than the current stored prices.\\n /// The call will succeed even if the update is not the most recent.\\n /// @dev Reverts if the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n function updatePriceFeeds(bytes[] calldata updateData) external payable;\\n\\n /// @notice Wrapper around updatePriceFeeds that rejects fast if a price update is not necessary. A price update is\\n /// necessary if the current on-chain publishTime is older than the given publishTime. It relies solely on the\\n /// given `publishTimes` for the price feeds and does not read the actual price\\n /// update publish time within `updateData`.\\n ///\\n /// This method requires the caller to pay a fee in wei; the required fee can be computed by calling\\n /// `getUpdateFee` with the length of the `updateData` array.\\n ///\\n /// `priceIds` and `publishTimes` are two arrays with the same size that correspond to senders known publishTime\\n /// of each priceId when calling this method. If all of price feeds within `priceIds` have updated and have\\n /// a newer or equal publish time than the given publish time, it will reject the transaction to save gas.\\n /// Otherwise, it calls updatePriceFeeds method to update the prices.\\n ///\\n /// @dev Reverts if update is not needed or the transferred fee is not sufficient or the updateData is invalid.\\n /// @param updateData Array of price update data.\\n /// @param priceIds Array of price ids.\\n /// @param publishTimes Array of publishTimes. `publishTimes[i]` corresponds to known `publishTime` of `priceIds[i]`\\n function updatePriceFeedsIfNecessary(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64[] calldata publishTimes\\n ) external payable;\\n\\n /// @notice Returns the required fee to update an array of price updates.\\n /// @param updateDataSize Number of price updates.\\n /// @return feeAmount The required fee in Wei.\\n function getUpdateFee(uint256 updateDataSize) external view returns (uint256 feeAmount);\\n}\\n\\nabstract contract AbstractPyth is IPyth {\\n /// @notice Returns the price feed with given id.\\n /// @dev Reverts if the price does not exist.\\n /// @param id The Pyth Price Feed ID of which to fetch the PriceFeed.\\n function queryPriceFeed(bytes32 id) public view virtual returns (PythStructs.PriceFeed memory priceFeed);\\n\\n /// @notice Returns true if a price feed with the given id exists.\\n /// @param id The Pyth Price Feed ID of which to check its existence.\\n function priceFeedExists(bytes32 id) public view virtual returns (bool exists);\\n\\n function getValidTimePeriod() public view virtual override returns (uint256 validTimePeriod);\\n\\n function getPrice(bytes32 id) external view override returns (PythStructs.Price memory price) {\\n return getPriceNoOlderThan(id, getValidTimePeriod());\\n }\\n\\n function getEmaPrice(bytes32 id) external view override returns (PythStructs.Price memory price) {\\n return getEmaPriceNoOlderThan(id, getValidTimePeriod());\\n }\\n\\n function getPriceUnsafe(bytes32 id) public view override returns (PythStructs.Price memory price) {\\n PythStructs.PriceFeed memory priceFeed = queryPriceFeed(id);\\n return priceFeed.price;\\n }\\n\\n function getPriceNoOlderThan(\\n bytes32 id,\\n uint256 age\\n ) public view override returns (PythStructs.Price memory price) {\\n price = getPriceUnsafe(id);\\n\\n require(diff(block.timestamp, price.publishTime) <= age, \\\"no price available which is recent enough\\\");\\n\\n return price;\\n }\\n\\n function getEmaPriceUnsafe(bytes32 id) public view override returns (PythStructs.Price memory price) {\\n PythStructs.PriceFeed memory priceFeed = queryPriceFeed(id);\\n return priceFeed.emaPrice;\\n }\\n\\n function getEmaPriceNoOlderThan(\\n bytes32 id,\\n uint256 age\\n ) public view override returns (PythStructs.Price memory price) {\\n price = getEmaPriceUnsafe(id);\\n\\n require(diff(block.timestamp, price.publishTime) <= age, \\\"no ema price available which is recent enough\\\");\\n\\n return price;\\n }\\n\\n function diff(uint256 x, uint256 y) internal pure returns (uint256) {\\n if (x > y) {\\n return x - y;\\n } else {\\n return y - x;\\n }\\n }\\n\\n // Access modifier is overridden to public to be able to call it locally.\\n function updatePriceFeeds(bytes[] calldata updateData) public payable virtual override;\\n\\n function updatePriceFeedsIfNecessary(\\n bytes[] calldata updateData,\\n bytes32[] calldata priceIds,\\n uint64[] calldata publishTimes\\n ) external payable override {\\n require(priceIds.length == publishTimes.length, \\\"priceIds and publishTimes arrays should have same length\\\");\\n\\n bool updateNeeded = false;\\n for (uint256 i = 0; i < priceIds.length; i++) {\\n if (!priceFeedExists(priceIds[i]) || queryPriceFeed(priceIds[i]).price.publishTime < publishTimes[i]) {\\n updateNeeded = true;\\n break;\\n }\\n }\\n\\n require(updateNeeded, \\\"no prices in the submitted batch have fresh prices, so this update will have no effect\\\");\\n\\n updatePriceFeeds(updateData);\\n }\\n}\\n\",\"keccak256\":\"0xdeaab73694af7b3b05087891b2391c5c486e1065e3912b9b586623523b60ae31\",\"license\":\"Apache-2.0\"},\"contracts/interfaces/VBep20Interface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\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\":\"0x3f845cd51b2d82f7932ac6c0ab714df97f733b01ce50f6fb0adb4c28447d4618\",\"license\":\"BSD-3-Clause\"},\"contracts/oracles/PythOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SignedMath.sol\\\";\\nimport \\\"../interfaces/PythInterface.sol\\\";\\nimport \\\"../interfaces/OracleInterface.sol\\\";\\nimport \\\"../interfaces/VBep20Interface.sol\\\";\\nimport \\\"../Governance/AccessControlled.sol\\\";\\n\\nstruct TokenConfig {\\n bytes32 pythId;\\n address asset;\\n uint64 maxStalePeriod;\\n}\\n\\n/**\\n * PythOracle contract reads prices from actual Pyth oracle contract which accepts, verifies and stores the\\n * updated prices from external sources\\n */\\ncontract PythOracle is AccessControlled, OracleInterface {\\n using SafeMath for uint256;\\n\\n // To calculate 10 ** n(which is a signed type)\\n using SignedMath for int256;\\n\\n // To cast int64/int8 types from Pyth to unsigned types\\n using SafeCast for int256;\\n\\n /// @notice Exponent scale (decimal precision) of prices\\n uint256 public constant EXP_SCALE = 1e18;\\n\\n /// @notice vBNB address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vBnb;\\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 BNB. This is the underlying for vBNB\\n address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n /// @notice The actual pyth oracle address fetch & store the prices\\n IPyth public underlyingPythOracle;\\n\\n /// @notice Token configs by asset address\\n mapping(address => TokenConfig) public tokenConfigs;\\n\\n /// @notice Emit when setting a new pyth oracle address\\n event PythOracleSet(address indexed newPythOracle);\\n\\n /// @notice Emit when a token config is added\\n event TokenConfigAdded(address indexed vToken, bytes32 indexed pythId, uint64 indexed maxStalePeriod);\\n\\n modifier notNullAddress(address someone) {\\n require(someone != address(0), \\\"can't be zero address\\\");\\n _;\\n }\\n\\n /// @notice Constructor for the implementation contract. Sets immutable variables.\\n /// @param vBnbAddress The address of the vBNB\\n /// @param vaiAddress The address of the VAI\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address vBnbAddress, address vaiAddress) notNullAddress(vBnbAddress) notNullAddress(vaiAddress) {\\n vBnb = vBnbAddress;\\n vai = vaiAddress;\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Batch set token configs\\n * @param tokenConfigs_ Token config array\\n * @custom:access Only Governance\\n * @custom:error Zero length error is thrown if length of the array in parameter is 0\\n */\\n function setTokenConfigs(TokenConfig[] memory tokenConfigs_) external {\\n _checkAccessAllowed(\\\"setTokenConfigs(TokenConfig[])\\\");\\n require(tokenConfigs_.length != 0, \\\"length can't be 0\\\");\\n uint256 numTokenConfigs = tokenConfigs_.length;\\n for (uint256 i; i < numTokenConfigs; ++i) {\\n setTokenConfig(tokenConfigs_[i]);\\n }\\n }\\n\\n /**\\n * @notice Set the underlying Pyth oracle contract address\\n * @param underlyingPythOracle_ Pyth oracle contract address\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error thrown if underlyingPythOracle_ address is zero\\n * @custom:event Emits PythOracleSet event with address of Pyth oracle.\\n */\\n function setUnderlyingPythOracle(\\n IPyth underlyingPythOracle_\\n ) external notNullAddress(address(underlyingPythOracle_)) {\\n _checkAccessAllowed(\\\"setUnderlyingPythOracle(IPyth)\\\");\\n underlyingPythOracle = underlyingPythOracle_;\\n emit PythOracleSet(address(underlyingPythOracle_));\\n }\\n\\n /**\\n * @notice Initializes the owner of the contract and sets required contracts\\n * @param underlyingPythOracle_ Address of the Pyth oracle\\n * @param accessControlManager_ Address of the access control manager contract\\n */\\n function initialize(address underlyingPythOracle_, address accessControlManager_) public initializer {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n\\n require(underlyingPythOracle_ != address(0), \\\"pyth oracle cannot be zero address\\\");\\n underlyingPythOracle = IPyth(underlyingPythOracle_);\\n emit PythOracleSet(underlyingPythOracle_);\\n }\\n\\n /**\\n * @notice Set single token config. `maxStalePeriod` cannot be 0 and `vToken` can be a null address\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error Range error is thrown if max stale period is zero\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n */\\n function setTokenConfig(TokenConfig memory tokenConfig) public notNullAddress(tokenConfig.asset) {\\n _checkAccessAllowed(\\\"setTokenConfig(TokenConfig)\\\");\\n require(tokenConfig.maxStalePeriod != 0, \\\"max stale period cannot be 0\\\");\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(tokenConfig.asset, tokenConfig.pythId, tokenConfig.maxStalePeriod);\\n }\\n\\n /**\\n * @notice Get price of underlying asset of the input vToken, under the hood this function\\n * get price from Pyth contract, the prices of which are updated externally\\n * @param vToken vToken address\\n * @return price Underlying price with a precision of 10 decimals\\n * @custom:error Zero address error thrown if underlyingPythOracle address is null\\n * @custom:error Zero address error thrown if asset address is null\\n * @custom:error Range error thrown if price of Pyth oracle is not greater than zero\\n */\\n function getUnderlyingPrice(address vToken) public view override returns (uint256) {\\n require(address(underlyingPythOracle) != address(0), \\\"Pyth oracle is zero address\\\");\\n\\n address asset;\\n uint256 decimals;\\n\\n // VBNB token doesn't have `underlying` method\\n if (address(vToken) == vBnb) {\\n asset = BNB_ADDR;\\n decimals = 18;\\n } else if (address(vToken) == vai) {\\n asset = vai;\\n decimals = 18;\\n } else {\\n asset = VBep20Interface(vToken).underlying();\\n decimals = VBep20Interface(asset).decimals();\\n }\\n\\n TokenConfig storage tokenConfig = tokenConfigs[asset];\\n require(tokenConfig.asset != address(0), \\\"asset doesn't exist\\\");\\n\\n // if the price is expired after it's compared against `maxStalePeriod`, the following call will revert\\n PythStructs.Price memory priceInfo = underlyingPythOracle.getPriceNoOlderThan(\\n tokenConfig.pythId,\\n tokenConfig.maxStalePeriod\\n );\\n\\n uint256 price = int256(priceInfo.price).toUint256();\\n\\n require(price > 0, \\\"Pyth oracle price must be positive\\\");\\n\\n // the price returned from Pyth is price ** 10^expo, which is the real dollar price of the assets\\n // we need to multiply it by 1e18 to make the price 18 decimals\\n if (priceInfo.expo > 0) {\\n return price.mul(EXP_SCALE).mul(10 ** int256(priceInfo.expo).toUint256()) * (10 ** (18 - decimals));\\n } else {\\n return price.mul(EXP_SCALE).div(10 ** int256(-priceInfo.expo).toUint256()) * (10 ** (18 - decimals));\\n }\\n }\\n}\\n\",\"keccak256\":\"0x904fe957acf240ea1f2dc3c46444e626f77f0a4e87d1bf65d3bcced90b8a3450\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
464
|
+
"bytecode": "0x60c06040523480156200001157600080fd5b506040516200185a3803806200185a8339810160408190526200003491620001ed565b816001600160a01b038116620000915760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f2061646472657373000000000000000000000060448201526064015b60405180910390fd5b816001600160a01b038116620000ea5760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f20616464726573730000000000000000000000604482015260640162000088565b6001600160a01b03808516608052831660a0526200010762000111565b5050505062000225565b600054610100900460ff16156200017b5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000088565b60005460ff9081161015620001ce576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114620001e857600080fd5b919050565b600080604083850312156200020157600080fd5b6200020c83620001d0565b91506200021c60208401620001d0565b90509250929050565b60805160a0516115fa6200026060003960008181610282015281816109ac01526109e6015260008181610203015261095401526115fa6000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806379ba5097116100a2578063bbba205d11610071578063bbba205d146102a4578063e30c3978146102c1578063eb8bee70146102d2578063f2fde38b146102e5578063fc57d4df146102f857600080fd5b806379ba5097146102535780638da5cb5b1461025b578063b4a0bdf31461026c578063b62e4c921461027d57600080fd5b806356fa5a56116100e957806356fa5a56146101eb5780635ba3792d146101fe5780636a8c7d3514610225578063703ae1b914610238578063715018a61461024b57600080fd5b80630e32cb861461011b5780631b69dc5f146101305780633e83b6b8146101a5578063485cc955146101d8575b600080fd5b61012e61012936600461103a565b61030b565b005b61017361013e36600461103a565b60ca60205260009081526040902080546001909101546001600160a01b03811690600160a01b900467ffffffffffffffff1683565b604080519384526001600160a01b03909216602084015267ffffffffffffffff16908201526060015b60405180910390f35b6101c073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b03909116815260200161019c565b61012e6101e636600461105e565b61031f565b60c9546101c0906001600160a01b031681565b6101c07f000000000000000000000000000000000000000000000000000000000000000081565b61012e610233366004611161565b6104e8565b61012e61024636600461103a565b6105aa565b61012e610682565b61012e610696565b6033546001600160a01b03166101c0565b6097546001600160a01b03166101c0565b6101c07f000000000000000000000000000000000000000000000000000000000000000081565b6102b3670de0b6b3a764000081565b60405190815260200161019c565b6065546001600160a01b03166101c0565b61012e6102e0366004611211565b61070d565b61012e6102f336600461103a565b610883565b6102b361030636600461103a565b6108f4565b610313610d00565b61031c81610d5a565b50565b600054610100900460ff161580801561033f5750600054600160ff909116105b806103595750303b158015610359575060005460ff166001145b6103c15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156103e4576000805461ff0019166101001790555b6103ec610e1f565b6103f582610e4e565b6001600160a01b0383166104565760405162461bcd60e51b815260206004820152602260248201527f70797468206f7261636c652063616e6e6f74206265207a65726f206164647265604482015261737360f01b60648201526084016103b8565b60c980546001600160a01b0319166001600160a01b0385169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a280156104e3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6105266040518060400160405280601e81526020017f736574546f6b656e436f6e6669677328546f6b656e436f6e6669675b5d290000815250610e75565b805160000361056b5760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064016103b8565b805160005b818110156104e35761059a83828151811061058d5761058d61122d565b602002602001015161070d565b6105a381611259565b9050610570565b806001600160a01b0381166105f95760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016103b8565b6106376040518060400160405280601e81526020017f736574556e6465726c79696e67507974684f7261636c65284950797468290000815250610e75565b60c980546001600160a01b0319166001600160a01b0384169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a25050565b61068a610d00565b6106946000610f13565b565b60655433906001600160a01b031681146107045760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016103b8565b61031c81610f13565b60208101516001600160a01b0381166107605760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016103b8565b61079e6040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e666967290000000000815250610e75565b816040015167ffffffffffffffff166000036107fc5760405162461bcd60e51b815260206004820152601c60248201527f6d6178207374616c6520706572696f642063616e6e6f7420626520300000000060448201526064016103b8565b602082810180516001600160a01b03908116600090815260ca9093526040808420865180825593516001909101805483890151929094166001600160e01b03199094168417600160a01b67ffffffffffffffff909316928302179055905190937f559091caed5aa983e358fdf18e8cefbc8ea71f64ea252477cf32778ae4c398b291a45050565b61088b610d00565b606580546001600160a01b0383166001600160a01b031990911681179091556108bc6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60c9546000906001600160a01b031661094f5760405162461bcd60e51b815260206004820152601b60248201527f50797468206f7261636c65206973207a65726f2061646472657373000000000060448201526064016103b8565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036109aa575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb90506012610ada565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610a0e57507f000000000000000000000000000000000000000000000000000000000000000090506012610ada565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190611272565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad4919061128f565b60ff1690505b6001600160a01b03808316600090815260ca602052604090206001810154909116610b3d5760405162461bcd60e51b8152602060048201526013602482015272185cdcd95d08191bd95cdb89dd08195e1a5cdd606a1b60448201526064016103b8565b60c9548154600183015460405163052571af60e51b81526004810192909252600160a01b900467ffffffffffffffff1660248201526000916001600160a01b03169063a4ae35e090604401608060405180830381865afa158015610ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc991906112b2565b90506000610bdd826000015160070b610f2c565b905060008111610c3a5760405162461bcd60e51b815260206004820152602260248201527f50797468206f7261636c65207072696365206d75737420626520706f73697469604482015261766560f01b60648201526084016103b8565b6000826040015160030b1315610cab57610c5584601261133e565b610c6090600a611439565b610c96610c73846040015160030b610f2c565b610c7e90600a611439565b610c9084670de0b6b3a7640000610f82565b90610f82565b610ca09190611445565b979650505050505050565b610cb684601261133e565b610cc190600a611439565b610c96610cdd8460400151610cd590611464565b60030b610f2c565b610ce890600a611439565b610cfa84670de0b6b3a7640000610f82565b90610f97565b6033546001600160a01b031633146106945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b8565b6001600160a01b038116610dbe5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b60648201526084016103b8565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610e465760405162461bcd60e51b81526004016103b890611487565b610694610fa3565b600054610100900460ff166103135760405162461bcd60e51b81526004016103b890611487565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610ea8903390869060040161151f565b602060405180830381865afa158015610ec5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee9919061154b565b905080610f0f57333083604051634a3fa29360e01b81526004016103b89392919061156d565b5050565b606580546001600160a01b031916905561031c81610fd3565b600080821215610f7e5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016103b8565b5090565b6000610f8e8284611445565b90505b92915050565b6000610f8e82846115a2565b600054610100900460ff16610fca5760405162461bcd60e51b81526004016103b890611487565b61069433610f13565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038116811461031c57600080fd5b60006020828403121561104c57600080fd5b813561105781611025565b9392505050565b6000806040838503121561107157600080fd5b823561107c81611025565b9150602083013561108c81611025565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110d6576110d6611097565b604052919050565b67ffffffffffffffff8116811461031c57600080fd5b60006060828403121561110657600080fd5b6040516060810181811067ffffffffffffffff8211171561112957611129611097565b60405282358152905080602083013561114181611025565b60208201526040830135611154816110de565b6040919091015292915050565b6000602080838503121561117457600080fd5b823567ffffffffffffffff8082111561118c57600080fd5b818501915085601f8301126111a057600080fd5b8135818111156111b2576111b2611097565b6111c0848260051b016110ad565b818152848101925060609182028401850191888311156111df57600080fd5b938501935b82851015611205576111f689866110f4565b845293840193928501926111e4565b50979650505050505050565b60006060828403121561122357600080fd5b610f8e83836110f4565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161126b5761126b611243565b5060010190565b60006020828403121561128457600080fd5b815161105781611025565b6000602082840312156112a157600080fd5b815160ff8116811461105757600080fd5b6000608082840312156112c457600080fd5b6040516080810181811067ffffffffffffffff821117156112e7576112e7611097565b6040528251600781900b81146112fc57600080fd5b8152602083015161130c816110de565b60208201526040830151600381900b811461132657600080fd5b60408201526060928301519281019290925250919050565b60008282101561135057611350611243565b500390565b600181815b8085111561139057816000190482111561137657611376611243565b8085161561138357918102915b93841c939080029061135a565b509250929050565b6000826113a757506001610f91565b816113b457506000610f91565b81600181146113ca57600281146113d4576113f0565b6001915050610f91565b60ff8411156113e5576113e5611243565b50506001821b610f91565b5060208310610133831016604e8410600b8410161715611413575081810a610f91565b61141d8383611355565b806000190482111561143157611431611243565b029392505050565b6000610f8e8383611398565b600081600019048311821515161561145f5761145f611243565b500290565b60008160030b637fffffff19810361147e5761147e611243565b60000392915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000815180845260005b818110156114f8576020818501810151868301820152016114dc565b8181111561150a576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0383168152604060208201819052600090611543908301846114d2565b949350505050565b60006020828403121561155d57600080fd5b8151801515811461105757600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611599908301846114d2565b95945050505050565b6000826115bf57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122073239f0d9fe42221e069d1e651eb5a8b079778af1b4ebca26e41e2db5a53b92164736f6c634300080d0033",
|
|
465
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806379ba5097116100a2578063bbba205d11610071578063bbba205d146102a4578063e30c3978146102c1578063eb8bee70146102d2578063f2fde38b146102e5578063fc57d4df146102f857600080fd5b806379ba5097146102535780638da5cb5b1461025b578063b4a0bdf31461026c578063b62e4c921461027d57600080fd5b806356fa5a56116100e957806356fa5a56146101eb5780635ba3792d146101fe5780636a8c7d3514610225578063703ae1b914610238578063715018a61461024b57600080fd5b80630e32cb861461011b5780631b69dc5f146101305780633e83b6b8146101a5578063485cc955146101d8575b600080fd5b61012e61012936600461103a565b61030b565b005b61017361013e36600461103a565b60ca60205260009081526040902080546001909101546001600160a01b03811690600160a01b900467ffffffffffffffff1683565b604080519384526001600160a01b03909216602084015267ffffffffffffffff16908201526060015b60405180910390f35b6101c073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b03909116815260200161019c565b61012e6101e636600461105e565b61031f565b60c9546101c0906001600160a01b031681565b6101c07f000000000000000000000000000000000000000000000000000000000000000081565b61012e610233366004611161565b6104e8565b61012e61024636600461103a565b6105aa565b61012e610682565b61012e610696565b6033546001600160a01b03166101c0565b6097546001600160a01b03166101c0565b6101c07f000000000000000000000000000000000000000000000000000000000000000081565b6102b3670de0b6b3a764000081565b60405190815260200161019c565b6065546001600160a01b03166101c0565b61012e6102e0366004611211565b61070d565b61012e6102f336600461103a565b610883565b6102b361030636600461103a565b6108f4565b610313610d00565b61031c81610d5a565b50565b600054610100900460ff161580801561033f5750600054600160ff909116105b806103595750303b158015610359575060005460ff166001145b6103c15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff1916600117905580156103e4576000805461ff0019166101001790555b6103ec610e1f565b6103f582610e4e565b6001600160a01b0383166104565760405162461bcd60e51b815260206004820152602260248201527f70797468206f7261636c652063616e6e6f74206265207a65726f206164647265604482015261737360f01b60648201526084016103b8565b60c980546001600160a01b0319166001600160a01b0385169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a280156104e3576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6105266040518060400160405280601e81526020017f736574546f6b656e436f6e6669677328546f6b656e436f6e6669675b5d290000815250610e75565b805160000361056b5760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064016103b8565b805160005b818110156104e35761059a83828151811061058d5761058d61122d565b602002602001015161070d565b6105a381611259565b9050610570565b806001600160a01b0381166105f95760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016103b8565b6106376040518060400160405280601e81526020017f736574556e6465726c79696e67507974684f7261636c65284950797468290000815250610e75565b60c980546001600160a01b0319166001600160a01b0384169081179091556040517fad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c190600090a25050565b61068a610d00565b6106946000610f13565b565b60655433906001600160a01b031681146107045760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016103b8565b61031c81610f13565b60208101516001600160a01b0381166107605760405162461bcd60e51b815260206004820152601560248201527463616e2774206265207a65726f206164647265737360581b60448201526064016103b8565b61079e6040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e666967290000000000815250610e75565b816040015167ffffffffffffffff166000036107fc5760405162461bcd60e51b815260206004820152601c60248201527f6d6178207374616c6520706572696f642063616e6e6f7420626520300000000060448201526064016103b8565b602082810180516001600160a01b03908116600090815260ca9093526040808420865180825593516001909101805483890151929094166001600160e01b03199094168417600160a01b67ffffffffffffffff909316928302179055905190937f559091caed5aa983e358fdf18e8cefbc8ea71f64ea252477cf32778ae4c398b291a45050565b61088b610d00565b606580546001600160a01b0383166001600160a01b031990911681179091556108bc6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60c9546000906001600160a01b031661094f5760405162461bcd60e51b815260206004820152601b60248201527f50797468206f7261636c65206973207a65726f2061646472657373000000000060448201526064016103b8565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316036109aa575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb90506012610ada565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610a0e57507f000000000000000000000000000000000000000000000000000000000000000090506012610ada565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190611272565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad4919061128f565b60ff1690505b6001600160a01b03808316600090815260ca602052604090206001810154909116610b3d5760405162461bcd60e51b8152602060048201526013602482015272185cdcd95d08191bd95cdb89dd08195e1a5cdd606a1b60448201526064016103b8565b60c9548154600183015460405163052571af60e51b81526004810192909252600160a01b900467ffffffffffffffff1660248201526000916001600160a01b03169063a4ae35e090604401608060405180830381865afa158015610ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc991906112b2565b90506000610bdd826000015160070b610f2c565b905060008111610c3a5760405162461bcd60e51b815260206004820152602260248201527f50797468206f7261636c65207072696365206d75737420626520706f73697469604482015261766560f01b60648201526084016103b8565b6000826040015160030b1315610cab57610c5584601261133e565b610c6090600a611439565b610c96610c73846040015160030b610f2c565b610c7e90600a611439565b610c9084670de0b6b3a7640000610f82565b90610f82565b610ca09190611445565b979650505050505050565b610cb684601261133e565b610cc190600a611439565b610c96610cdd8460400151610cd590611464565b60030b610f2c565b610ce890600a611439565b610cfa84670de0b6b3a7640000610f82565b90610f97565b6033546001600160a01b031633146106945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b8565b6001600160a01b038116610dbe5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b60648201526084016103b8565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610e465760405162461bcd60e51b81526004016103b890611487565b610694610fa3565b600054610100900460ff166103135760405162461bcd60e51b81526004016103b890611487565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610ea8903390869060040161151f565b602060405180830381865afa158015610ec5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee9919061154b565b905080610f0f57333083604051634a3fa29360e01b81526004016103b89392919061156d565b5050565b606580546001600160a01b031916905561031c81610fd3565b600080821215610f7e5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f73697469766560448201526064016103b8565b5090565b6000610f8e8284611445565b90505b92915050565b6000610f8e82846115a2565b600054610100900460ff16610fca5760405162461bcd60e51b81526004016103b890611487565b61069433610f13565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038116811461031c57600080fd5b60006020828403121561104c57600080fd5b813561105781611025565b9392505050565b6000806040838503121561107157600080fd5b823561107c81611025565b9150602083013561108c81611025565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110d6576110d6611097565b604052919050565b67ffffffffffffffff8116811461031c57600080fd5b60006060828403121561110657600080fd5b6040516060810181811067ffffffffffffffff8211171561112957611129611097565b60405282358152905080602083013561114181611025565b60208201526040830135611154816110de565b6040919091015292915050565b6000602080838503121561117457600080fd5b823567ffffffffffffffff8082111561118c57600080fd5b818501915085601f8301126111a057600080fd5b8135818111156111b2576111b2611097565b6111c0848260051b016110ad565b818152848101925060609182028401850191888311156111df57600080fd5b938501935b82851015611205576111f689866110f4565b845293840193928501926111e4565b50979650505050505050565b60006060828403121561122357600080fd5b610f8e83836110f4565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161126b5761126b611243565b5060010190565b60006020828403121561128457600080fd5b815161105781611025565b6000602082840312156112a157600080fd5b815160ff8116811461105757600080fd5b6000608082840312156112c457600080fd5b6040516080810181811067ffffffffffffffff821117156112e7576112e7611097565b6040528251600781900b81146112fc57600080fd5b8152602083015161130c816110de565b60208201526040830151600381900b811461132657600080fd5b60408201526060928301519281019290925250919050565b60008282101561135057611350611243565b500390565b600181815b8085111561139057816000190482111561137657611376611243565b8085161561138357918102915b93841c939080029061135a565b509250929050565b6000826113a757506001610f91565b816113b457506000610f91565b81600181146113ca57600281146113d4576113f0565b6001915050610f91565b60ff8411156113e5576113e5611243565b50506001821b610f91565b5060208310610133831016604e8410600b8410161715611413575081810a610f91565b61141d8383611355565b806000190482111561143157611431611243565b029392505050565b6000610f8e8383611398565b600081600019048311821515161561145f5761145f611243565b500290565b60008160030b637fffffff19810361147e5761147e611243565b60000392915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000815180845260005b818110156114f8576020818501810151868301820152016114dc565b8181111561150a576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0383168152604060208201819052600090611543908301846114d2565b949350505050565b60006020828403121561155d57600080fd5b8151801515811461105757600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611599908301846114d2565b95945050505050565b6000826115bf57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122073239f0d9fe42221e069d1e651eb5a8b079778af1b4ebca26e41e2db5a53b92164736f6c634300080d0033",
|
|
338
466
|
"devdoc": {
|
|
339
467
|
"kind": "dev",
|
|
340
468
|
"methods": {
|
|
469
|
+
"acceptOwnership()": {
|
|
470
|
+
"details": "The new owner accepts the ownership transfer."
|
|
471
|
+
},
|
|
341
472
|
"constructor": {
|
|
342
473
|
"custom:oz-upgrades-unsafe-allow": "constructor",
|
|
343
474
|
"params": {
|
|
344
|
-
"vBnbAddress": "The address of the vBNB"
|
|
475
|
+
"vBnbAddress": "The address of the vBNB",
|
|
476
|
+
"vaiAddress": "The address of the VAI"
|
|
345
477
|
}
|
|
346
478
|
},
|
|
347
479
|
"getUnderlyingPrice(address)": {
|
|
@@ -353,17 +485,29 @@
|
|
|
353
485
|
"_0": "price Underlying price with a precision of 10 decimals"
|
|
354
486
|
}
|
|
355
487
|
},
|
|
356
|
-
"initialize(address)": {
|
|
488
|
+
"initialize(address,address)": {
|
|
357
489
|
"params": {
|
|
490
|
+
"accessControlManager_": "Address of the access control manager contract",
|
|
358
491
|
"underlyingPythOracle_": "Address of the Pyth oracle"
|
|
359
492
|
}
|
|
360
493
|
},
|
|
361
494
|
"owner()": {
|
|
362
495
|
"details": "Returns the address of the current owner."
|
|
363
496
|
},
|
|
497
|
+
"pendingOwner()": {
|
|
498
|
+
"details": "Returns the address of the pending owner."
|
|
499
|
+
},
|
|
364
500
|
"renounceOwnership()": {
|
|
365
501
|
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
|
|
366
502
|
},
|
|
503
|
+
"setAccessControlManager(address)": {
|
|
504
|
+
"custom:access": "Only Governance",
|
|
505
|
+
"custom:event": "Emits NewAccessControlManager event",
|
|
506
|
+
"details": "Admin function to set address of AccessControlManager",
|
|
507
|
+
"params": {
|
|
508
|
+
"accessControlManager_": "The new address of the AccessControlManager"
|
|
509
|
+
}
|
|
510
|
+
},
|
|
367
511
|
"setTokenConfig((bytes32,address,uint64))": {
|
|
368
512
|
"custom:access": "Only Governance",
|
|
369
513
|
"custom:error": "Range error is thrown if max stale period is zeroNotNullAddress error is thrown if asset address is null",
|
|
@@ -387,18 +531,31 @@
|
|
|
387
531
|
}
|
|
388
532
|
},
|
|
389
533
|
"transferOwnership(address)": {
|
|
390
|
-
"details": "
|
|
534
|
+
"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."
|
|
391
535
|
}
|
|
392
536
|
},
|
|
393
537
|
"stateVariables": {
|
|
394
538
|
"vBnb": {
|
|
395
539
|
"custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
|
|
540
|
+
},
|
|
541
|
+
"vai": {
|
|
542
|
+
"custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
|
|
396
543
|
}
|
|
397
544
|
},
|
|
398
545
|
"version": 1
|
|
399
546
|
},
|
|
400
547
|
"userdoc": {
|
|
548
|
+
"errors": {
|
|
549
|
+
"Unauthorized(address,address,string)": [
|
|
550
|
+
{
|
|
551
|
+
"notice": "Thrown when the action is prohibited by AccessControlManager"
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
401
555
|
"events": {
|
|
556
|
+
"NewAccessControlManager(address,address)": {
|
|
557
|
+
"notice": "Emitted when access control manager contract address is changed"
|
|
558
|
+
},
|
|
402
559
|
"PythOracleSet(address)": {
|
|
403
560
|
"notice": "Emit when setting a new pyth oracle address"
|
|
404
561
|
},
|
|
@@ -414,15 +571,21 @@
|
|
|
414
571
|
"EXP_SCALE()": {
|
|
415
572
|
"notice": "Exponent scale (decimal precision) of prices"
|
|
416
573
|
},
|
|
574
|
+
"accessControlManager()": {
|
|
575
|
+
"notice": "Returns the address of the access control manager contract"
|
|
576
|
+
},
|
|
417
577
|
"constructor": {
|
|
418
578
|
"notice": "Constructor for the implementation contract. Sets immutable variables."
|
|
419
579
|
},
|
|
420
580
|
"getUnderlyingPrice(address)": {
|
|
421
581
|
"notice": "Get price of underlying asset of the input vToken, under the hood this function get price from Pyth contract, the prices of which are updated externally"
|
|
422
582
|
},
|
|
423
|
-
"initialize(address)": {
|
|
583
|
+
"initialize(address,address)": {
|
|
424
584
|
"notice": "Initializes the owner of the contract and sets required contracts"
|
|
425
585
|
},
|
|
586
|
+
"setAccessControlManager(address)": {
|
|
587
|
+
"notice": "Sets the address of AccessControlManager"
|
|
588
|
+
},
|
|
426
589
|
"setTokenConfig((bytes32,address,uint64))": {
|
|
427
590
|
"notice": "Set single token config. `maxStalePeriod` cannot be 0 and `vToken` can be a null address"
|
|
428
591
|
},
|
|
@@ -440,6 +603,9 @@
|
|
|
440
603
|
},
|
|
441
604
|
"vBnb()": {
|
|
442
605
|
"notice": "vBNB address"
|
|
606
|
+
},
|
|
607
|
+
"vai()": {
|
|
608
|
+
"notice": "VAI address"
|
|
443
609
|
}
|
|
444
610
|
},
|
|
445
611
|
"notice": "PythOracle contract reads prices from actual Pyth oracle contract which accepts, verifies and stores the updated prices from external sources",
|
|
@@ -448,7 +614,7 @@
|
|
|
448
614
|
"storageLayout": {
|
|
449
615
|
"storage": [
|
|
450
616
|
{
|
|
451
|
-
"astId":
|
|
617
|
+
"astId": 347,
|
|
452
618
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
453
619
|
"label": "_initialized",
|
|
454
620
|
"offset": 0,
|
|
@@ -456,7 +622,7 @@
|
|
|
456
622
|
"type": "t_uint8"
|
|
457
623
|
},
|
|
458
624
|
{
|
|
459
|
-
"astId":
|
|
625
|
+
"astId": 350,
|
|
460
626
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
461
627
|
"label": "_initializing",
|
|
462
628
|
"offset": 1,
|
|
@@ -464,7 +630,7 @@
|
|
|
464
630
|
"type": "t_bool"
|
|
465
631
|
},
|
|
466
632
|
{
|
|
467
|
-
"astId":
|
|
633
|
+
"astId": 961,
|
|
468
634
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
469
635
|
"label": "__gap",
|
|
470
636
|
"offset": 0,
|
|
@@ -472,7 +638,7 @@
|
|
|
472
638
|
"type": "t_array(t_uint256)50_storage"
|
|
473
639
|
},
|
|
474
640
|
{
|
|
475
|
-
"astId":
|
|
641
|
+
"astId": 219,
|
|
476
642
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
477
643
|
"label": "_owner",
|
|
478
644
|
"offset": 0,
|
|
@@ -480,7 +646,7 @@
|
|
|
480
646
|
"type": "t_address"
|
|
481
647
|
},
|
|
482
648
|
{
|
|
483
|
-
"astId":
|
|
649
|
+
"astId": 339,
|
|
484
650
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
485
651
|
"label": "__gap",
|
|
486
652
|
"offset": 0,
|
|
@@ -488,20 +654,52 @@
|
|
|
488
654
|
"type": "t_array(t_uint256)49_storage"
|
|
489
655
|
},
|
|
490
656
|
{
|
|
491
|
-
"astId":
|
|
657
|
+
"astId": 128,
|
|
492
658
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
493
|
-
"label": "
|
|
659
|
+
"label": "_pendingOwner",
|
|
494
660
|
"offset": 0,
|
|
495
661
|
"slot": "101",
|
|
496
|
-
"type": "
|
|
662
|
+
"type": "t_address"
|
|
497
663
|
},
|
|
498
664
|
{
|
|
499
|
-
"astId":
|
|
665
|
+
"astId": 207,
|
|
500
666
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
501
|
-
"label": "
|
|
667
|
+
"label": "__gap",
|
|
502
668
|
"offset": 0,
|
|
503
669
|
"slot": "102",
|
|
504
|
-
"type": "
|
|
670
|
+
"type": "t_array(t_uint256)49_storage"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"astId": 5289,
|
|
674
|
+
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
675
|
+
"label": "_accessControlManager",
|
|
676
|
+
"offset": 0,
|
|
677
|
+
"slot": "151",
|
|
678
|
+
"type": "t_contract(IAccessControlManager)5473"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"astId": 5294,
|
|
682
|
+
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
683
|
+
"label": "__gap",
|
|
684
|
+
"offset": 0,
|
|
685
|
+
"slot": "152",
|
|
686
|
+
"type": "t_array(t_uint256)49_storage"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"astId": 8182,
|
|
690
|
+
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
691
|
+
"label": "underlyingPythOracle",
|
|
692
|
+
"offset": 0,
|
|
693
|
+
"slot": "201",
|
|
694
|
+
"type": "t_contract(IPyth)6552"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"astId": 8188,
|
|
698
|
+
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
699
|
+
"label": "tokenConfigs",
|
|
700
|
+
"offset": 0,
|
|
701
|
+
"slot": "202",
|
|
702
|
+
"type": "t_mapping(t_address,t_struct(TokenConfig)8150_storage)"
|
|
505
703
|
}
|
|
506
704
|
],
|
|
507
705
|
"types": {
|
|
@@ -532,24 +730,29 @@
|
|
|
532
730
|
"label": "bytes32",
|
|
533
731
|
"numberOfBytes": "32"
|
|
534
732
|
},
|
|
535
|
-
"t_contract(
|
|
733
|
+
"t_contract(IAccessControlManager)5473": {
|
|
734
|
+
"encoding": "inplace",
|
|
735
|
+
"label": "contract IAccessControlManager",
|
|
736
|
+
"numberOfBytes": "20"
|
|
737
|
+
},
|
|
738
|
+
"t_contract(IPyth)6552": {
|
|
536
739
|
"encoding": "inplace",
|
|
537
740
|
"label": "contract IPyth",
|
|
538
741
|
"numberOfBytes": "20"
|
|
539
742
|
},
|
|
540
|
-
"t_mapping(t_address,t_struct(TokenConfig)
|
|
743
|
+
"t_mapping(t_address,t_struct(TokenConfig)8150_storage)": {
|
|
541
744
|
"encoding": "mapping",
|
|
542
745
|
"key": "t_address",
|
|
543
746
|
"label": "mapping(address => struct TokenConfig)",
|
|
544
747
|
"numberOfBytes": "32",
|
|
545
|
-
"value": "t_struct(TokenConfig)
|
|
748
|
+
"value": "t_struct(TokenConfig)8150_storage"
|
|
546
749
|
},
|
|
547
|
-
"t_struct(TokenConfig)
|
|
750
|
+
"t_struct(TokenConfig)8150_storage": {
|
|
548
751
|
"encoding": "inplace",
|
|
549
752
|
"label": "struct TokenConfig",
|
|
550
753
|
"members": [
|
|
551
754
|
{
|
|
552
|
-
"astId":
|
|
755
|
+
"astId": 8145,
|
|
553
756
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
554
757
|
"label": "pythId",
|
|
555
758
|
"offset": 0,
|
|
@@ -557,7 +760,7 @@
|
|
|
557
760
|
"type": "t_bytes32"
|
|
558
761
|
},
|
|
559
762
|
{
|
|
560
|
-
"astId":
|
|
763
|
+
"astId": 8147,
|
|
561
764
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
562
765
|
"label": "asset",
|
|
563
766
|
"offset": 0,
|
|
@@ -565,7 +768,7 @@
|
|
|
565
768
|
"type": "t_address"
|
|
566
769
|
},
|
|
567
770
|
{
|
|
568
|
-
"astId":
|
|
771
|
+
"astId": 8149,
|
|
569
772
|
"contract": "contracts/oracles/PythOracle.sol:PythOracle",
|
|
570
773
|
"label": "maxStalePeriod",
|
|
571
774
|
"offset": 20,
|