@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.
Files changed (129) hide show
  1. package/LICENSE +11 -0
  2. package/README.md +107 -0
  3. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +1 -1
  4. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +1 -1
  5. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +1 -1
  6. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
  7. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
  8. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
  9. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
  10. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
  11. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
  12. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
  13. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
  14. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
  15. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
  16. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
  17. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
  18. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
  19. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
  20. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
  21. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
  22. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +1 -1
  23. package/artifacts/@openzeppelin/contracts/utils/math/SafeMath.sol/SafeMath.dbg.json +1 -1
  24. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
  25. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
  26. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
  27. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
  28. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
  29. package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
  30. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
  31. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
  32. package/artifacts/build-info/a47a69a8f108d3e7113faf89771988ff.json +1 -0
  33. package/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
  34. package/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
  35. package/artifacts/contracts/Governance/AccessControlled.sol/AccessControlled.dbg.json +4 -0
  36. package/artifacts/contracts/Governance/AccessControlled.sol/AccessControlled.json +181 -0
  37. package/artifacts/contracts/Governance/IAccessControlManager.sol/IAccessControlManager.dbg.json +4 -0
  38. package/artifacts/contracts/Governance/IAccessControlManager.sol/IAccessControlManager.json +282 -0
  39. package/artifacts/contracts/PriceOracle.sol/PriceOracle.dbg.json +1 -1
  40. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
  41. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +130 -2
  42. package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +1 -1
  43. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
  44. package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
  45. package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
  46. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
  47. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.dbg.json +4 -0
  48. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.json +30 -0
  49. package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +1 -1
  50. package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +1 -1
  51. package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +1 -1
  52. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.dbg.json +4 -0
  53. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.json +30 -0
  54. package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +1 -1
  55. package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +1 -1
  56. package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +1 -1
  57. package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +1 -1
  58. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +1 -1
  59. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +37 -6
  60. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +1 -1
  61. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +131 -2
  62. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +1 -1
  63. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +122 -6
  64. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +1 -1
  65. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +130 -2
  66. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +1 -1
  67. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +132 -3
  68. package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +1 -1
  69. package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +1 -1
  70. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +1 -1
  71. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +2 -2
  72. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +1 -1
  73. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +2 -2
  74. package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +1 -1
  75. package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +1 -1
  76. package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +1 -1
  77. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +1 -1
  78. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +1 -1
  79. package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +1 -1
  80. package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +1 -1
  81. package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +1 -1
  82. package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +1 -1
  83. package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +1 -1
  84. package/contracts/Governance/AccessControlManager.sol +99 -0
  85. package/contracts/Governance/AccessControlled.sol +75 -0
  86. package/contracts/Governance/IAccessControlManager.sol +22 -0
  87. package/contracts/ResilientOracle.sol +44 -14
  88. package/contracts/interfaces/PublicResolverInterface.sol +7 -0
  89. package/contracts/interfaces/SIDRegistryInterface.sol +7 -0
  90. package/contracts/oracles/BinanceOracle.sol +35 -7
  91. package/contracts/oracles/BoundValidator.sol +36 -8
  92. package/contracts/oracles/ChainlinkOracle.sol +31 -21
  93. package/contracts/oracles/PythOracle.sol +23 -8
  94. package/contracts/oracles/TwapOracle.sol +41 -11
  95. package/deploy/1-deploy-oracles.ts +149 -0
  96. package/deploy/2-configure-feeds.ts +209 -0
  97. package/deployments/bsctestnet/AccessControlManager.json +563 -0
  98. package/deployments/bsctestnet/BinanceOracle.json +66 -40
  99. package/deployments/bsctestnet/BinanceOracle_Implementation.json +84 -38
  100. package/deployments/bsctestnet/BinanceOracle_Proxy.json +34 -34
  101. package/deployments/bsctestnet/BoundValidator.json +177 -39
  102. package/deployments/bsctestnet/BoundValidator_Implementation.json +248 -40
  103. package/deployments/bsctestnet/BoundValidator_Proxy.json +51 -37
  104. package/deployments/bsctestnet/ChainlinkOracle.json +161 -50
  105. package/deployments/bsctestnet/ChainlinkOracle_Implementation.json +239 -47
  106. package/deployments/bsctestnet/ChainlinkOracle_Proxy.json +44 -44
  107. package/deployments/bsctestnet/DefaultProxyAdmin.json +18 -18
  108. package/deployments/bsctestnet/PythOracle.json +178 -45
  109. package/deployments/bsctestnet/PythOracle_Implementation.json +246 -43
  110. package/deployments/bsctestnet/PythOracle_Proxy.json +53 -43
  111. package/deployments/bsctestnet/ResilientOracle.json +167 -48
  112. package/deployments/bsctestnet/ResilientOracle_Implementation.json +254 -51
  113. package/deployments/bsctestnet/ResilientOracle_Proxy.json +42 -46
  114. package/deployments/bsctestnet/TwapOracle.json +178 -40
  115. package/deployments/bsctestnet/TwapOracle_Implementation.json +270 -58
  116. package/deployments/bsctestnet/TwapOracle_Proxy.json +51 -37
  117. package/deployments/bsctestnet/solcInputs/{6153c675ce838eebb6442d63350712be.json → 30f2cb3e89e183b8669f05bddf9426d9.json} +46 -7
  118. package/package.json +3 -2
  119. package/artifacts/build-info/1d7bedd9b14544f287811332b9a539d7.json +0 -1
  120. package/artifacts/build-info/57da5d39a9f98618d0dcf1f6d4ff6b0d.json +0 -1
  121. package/artifacts/build-info/f6af69795174616b8b4a6373f9f1c538.json +0 -1
  122. package/deploy/1-deploy-oracles.d.ts +0 -2
  123. package/deploy/1-deploy-oracles.d.ts.map +0 -1
  124. package/deploy/1-deploy-oracles.js +0 -128
  125. package/deploy/1-deploy-oracles.js.map +0 -1
  126. package/deploy/2-configure-feeds.d.ts +0 -2
  127. package/deploy/2-configure-feeds.d.ts.map +0 -1
  128. package/deploy/2-configure-feeds.js +0 -139
  129. package/deploy/2-configure-feeds.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "0x531A3a9D4e1fDcA4308E49197c2D4AAD15E74580",
2
+ "address": "0xD41f02c000F4F11794D4b12a9fbcafDEF2084550",
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": [
@@ -115,12 +179,19 @@
115
179
  },
116
180
  {
117
181
  "inputs": [],
118
- "name": "VAI_VALUE",
182
+ "name": "acceptOwnership",
183
+ "outputs": [],
184
+ "stateMutability": "nonpayable",
185
+ "type": "function"
186
+ },
187
+ {
188
+ "inputs": [],
189
+ "name": "accessControlManager",
119
190
  "outputs": [
120
191
  {
121
- "internalType": "uint256",
192
+ "internalType": "contract IAccessControlManager",
122
193
  "name": "",
123
- "type": "uint256"
194
+ "type": "address"
124
195
  }
125
196
  ],
126
197
  "stateMutability": "view",
@@ -146,7 +217,13 @@
146
217
  "type": "function"
147
218
  },
148
219
  {
149
- "inputs": [],
220
+ "inputs": [
221
+ {
222
+ "internalType": "address",
223
+ "name": "accessControlManager_",
224
+ "type": "address"
225
+ }
226
+ ],
150
227
  "name": "initialize",
151
228
  "outputs": [],
152
229
  "stateMutability": "nonpayable",
@@ -165,6 +242,19 @@
165
242
  "stateMutability": "view",
166
243
  "type": "function"
167
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
+ },
168
258
  {
169
259
  "inputs": [
170
260
  {
@@ -191,6 +281,19 @@
191
281
  "stateMutability": "nonpayable",
192
282
  "type": "function"
193
283
  },
284
+ {
285
+ "inputs": [
286
+ {
287
+ "internalType": "address",
288
+ "name": "accessControlManager_",
289
+ "type": "address"
290
+ }
291
+ ],
292
+ "name": "setAccessControlManager",
293
+ "outputs": [],
294
+ "stateMutability": "nonpayable",
295
+ "type": "function"
296
+ },
194
297
  {
195
298
  "inputs": [
196
299
  {
@@ -341,48 +444,65 @@
341
444
  ],
342
445
  "stateMutability": "view",
343
446
  "type": "function"
447
+ },
448
+ {
449
+ "inputs": [],
450
+ "name": "vai",
451
+ "outputs": [
452
+ {
453
+ "internalType": "address",
454
+ "name": "",
455
+ "type": "address"
456
+ }
457
+ ],
458
+ "stateMutability": "view",
459
+ "type": "function"
344
460
  }
345
461
  ],
346
- "transactionHash": "0x49237fa1cd30839fa3656c7c4b52794a6fef6960fbaa9643ed1c9aa9ed82d2d4",
462
+ "transactionHash": "0xe0e9547abd1eb741c65e14393631d49aa4b4d543254b32f49d4946feee215f1a",
347
463
  "receipt": {
348
464
  "to": null,
349
- "from": "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706",
350
- "contractAddress": "0x531A3a9D4e1fDcA4308E49197c2D4AAD15E74580",
351
- "transactionIndex": 8,
352
- "gasUsed": "1191451",
353
- "logsBloom": "0x00000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
354
- "blockHash": "0x678ab098b88ceda73ca0fc03e9b2cb3aed8b6e2c1d0dea99b522b127560b3579",
355
- "transactionHash": "0x49237fa1cd30839fa3656c7c4b52794a6fef6960fbaa9643ed1c9aa9ed82d2d4",
465
+ "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1",
466
+ "contractAddress": "0xD41f02c000F4F11794D4b12a9fbcafDEF2084550",
467
+ "transactionIndex": 0,
468
+ "gasUsed": "1308450",
469
+ "logsBloom": "0x44000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
470
+ "blockHash": "0x0403a72e6f2142426b764b6de88ca443bf27b5210b7e3753ceaa63cec7009188",
471
+ "transactionHash": "0xe0e9547abd1eb741c65e14393631d49aa4b4d543254b32f49d4946feee215f1a",
356
472
  "logs": [
357
473
  {
358
- "transactionIndex": 8,
359
- "blockNumber": 27096231,
360
- "transactionHash": "0x49237fa1cd30839fa3656c7c4b52794a6fef6960fbaa9643ed1c9aa9ed82d2d4",
361
- "address": "0x531A3a9D4e1fDcA4308E49197c2D4AAD15E74580",
474
+ "transactionIndex": 0,
475
+ "blockNumber": 28099626,
476
+ "transactionHash": "0xe0e9547abd1eb741c65e14393631d49aa4b4d543254b32f49d4946feee215f1a",
477
+ "address": "0xD41f02c000F4F11794D4b12a9fbcafDEF2084550",
362
478
  "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
363
479
  "data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
364
- "logIndex": 16,
365
- "blockHash": "0x678ab098b88ceda73ca0fc03e9b2cb3aed8b6e2c1d0dea99b522b127560b3579"
480
+ "logIndex": 0,
481
+ "blockHash": "0x0403a72e6f2142426b764b6de88ca443bf27b5210b7e3753ceaa63cec7009188"
366
482
  }
367
483
  ],
368
- "blockNumber": 27096231,
369
- "cumulativeGasUsed": "8517476",
484
+ "blockNumber": 28099626,
485
+ "cumulativeGasUsed": "1308450",
370
486
  "status": 1,
371
487
  "byzantium": true
372
488
  },
373
- "args": ["0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c"],
489
+ "args": ["0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c", "0x5fFbE5302BadED40941A403228E6AD03f93752d9"],
374
490
  "numDeployments": 1,
375
- "solcInputHash": "6153c675ce838eebb6442d63350712be",
376
- "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\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousPriceMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestedPriceMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPriceMantissa\",\"type\":\"uint256\"}],\"name\":\"PricePosted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BNB_ADDR\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VAI_VALUE\",\"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\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"prices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"setDirectPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract VBep20Interface\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"underlyingPriceMantissa\",\"type\":\"uint256\"}],\"name\":\"setUnderlyingPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenConfigs\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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)\":{\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price Underlying price in USD\"}},\"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.\"},\"setDirectPrice(address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits PricePosted event on succesfully setup of underlying price\",\"params\":{\"asset\":\"Asset address\",\"price\":\"Underlying price in 18 decimals\"}},\"setTokenConfig((address,address,uint256))\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress error is thrown if asset address is nullNotNullAddress error is thrown if token feed address is nullRange error is thrown if maxStale period of token is not greater than zero\",\"custom:event\":\"Emits TokenConfigAdded event on succesfully setting of the token config\",\"params\":{\"tokenConfig\":\"Token config struct\"}},\"setTokenConfigs((address,address,uint256)[])\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Zero length error thrown, if length of the array in parameter is 0\",\"params\":{\"tokenConfigs_\":\"config array\"}},\"setUnderlyingPrice(address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress thrown if address of vToken is null\",\"custom:event\":\"Emits PricePosted event on succesfully setup of underlying price\",\"params\":{\"underlyingPriceMantissa\":\"price in 18 decimals\",\"vToken\":\"vToken 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\":{\"PricePosted(address,uint256,uint256,uint256)\":{\"notice\":\"Emit when a price is manually set\"},\"TokenConfigAdded(address,address,uint256)\":{\"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 address for vBNB\"},\"VAI_VALUE()\":{\"notice\":\"VAI token is considered $1 constantly in oracle for now\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract. Sets immutable variables.\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Gets the Chainlink price for the underlying asset of a given vToken, revert when vToken is a null address\"},\"initialize()\":{\"notice\":\"Initializes the owner of the contract\"},\"prices(address)\":{\"notice\":\"Manually set an override price, useful under extenuating conditions such as price feed failure\"},\"setDirectPrice(address,uint256)\":{\"notice\":\"Manually set the price of a given asset\"},\"setTokenConfig((address,address,uint256))\":{\"notice\":\"Add single token config. vToken & feed cannot be null addresses and maxStalePeriod must be positive\"},\"setTokenConfigs((address,address,uint256)[])\":{\"notice\":\"Add multiple token configs at the same time\"},\"setUnderlyingPrice(address,uint256)\":{\"notice\":\"Set the forced prices of the underlying token of input vToken\"},\"tokenConfigs(address)\":{\"notice\":\"Token config by assets\"},\"vBnb()\":{\"notice\":\"vBNB address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/ChainlinkOracle.sol\":\"ChainlinkOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorInterface {\\n function latestAnswer() external view returns (int256);\\n\\n function latestTimestamp() external view returns (uint256);\\n\\n function latestRound() external view returns (uint256);\\n\\n function getAnswer(uint256 roundId) external view returns (int256);\\n\\n function getTimestamp(uint256 roundId) external view returns (uint256);\\n\\n event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);\\n\\n event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);\\n}\\n\",\"keccak256\":\"0xb496651006b9a2a07920ffe116928b11e2a6458e21361cecca51409522488ca7\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./AggregatorInterface.sol\\\";\\nimport \\\"./AggregatorV3Interface.sol\\\";\\n\\ninterface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}\\n\",\"keccak256\":\"0x4a7757ff7bbafe044cd49c2a45c7c18ec50eff7c7af6869face5e1e9cda976f2\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n}\\n\",\"keccak256\":\"0x6e6e4b0835904509406b070ee173b5bc8f677c19421b76be38aea3b1b3d30846\",\"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/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\"},\"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/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/ChainlinkOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"../interfaces/VBep20Interface.sol\\\";\\nimport \\\"../interfaces/OracleInterface.sol\\\";\\nimport \\\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol\\\";\\n\\nstruct TokenConfig {\\n /// @notice Underlying token address, which can't be a null address and can be used to check if a token is supported\\n /// @notice 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB for BNB\\n address asset;\\n /// @notice Chainlink feed address\\n address feed;\\n /// @notice Price expiration period of this asset\\n uint256 maxStalePeriod;\\n}\\n\\ncontract ChainlinkOracle is OwnableUpgradeable, OracleInterface {\\n /// @notice VAI token is considered $1 constantly in oracle for now\\n uint256 public constant VAI_VALUE = 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 address for vBNB\\n address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n /// @notice Manually set an override price, useful under extenuating conditions such as price feed failure\\n mapping(address => uint256) public prices;\\n\\n /// @notice Token config by assets\\n mapping(address => TokenConfig) public tokenConfigs;\\n\\n /// @notice Emit when a price is manually set\\n event PricePosted(\\n address asset,\\n uint256 previousPriceMantissa,\\n uint256 requestedPriceMantissa,\\n uint256 newPriceMantissa\\n );\\n\\n /// @notice Emit when a token config is added\\n event TokenConfigAdded(address asset, address feed, uint256 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 Set the forced prices of the underlying token of input vToken\\n * @param vToken vToken address\\n * @param underlyingPriceMantissa price in 18 decimals\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress thrown if address of vToken is null\\n * @custom:event Emits PricePosted event on succesfully setup of underlying price\\n */\\n function setUnderlyingPrice(\\n VBep20Interface vToken,\\n uint256 underlyingPriceMantissa\\n ) external notNullAddress(address(vToken)) onlyOwner {\\n address asset = address(vToken) == vBnb ? BNB_ADDR : address(vToken.underlying());\\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\\n prices[asset] = underlyingPriceMantissa;\\n }\\n\\n /**\\n * @notice Manually set the price of a given asset\\n * @param asset Asset address\\n * @param price Underlying price in 18 decimals\\n * @custom:access Only Governance\\n * @custom:event Emits PricePosted event on succesfully setup of underlying price\\n */\\n function setDirectPrice(address asset, uint256 price) external notNullAddress(asset) onlyOwner {\\n emit PricePosted(asset, prices[asset], price, price);\\n prices[asset] = price;\\n }\\n\\n /**\\n * @notice Add multiple token configs at the same time\\n * @param tokenConfigs_ config array\\n * @custom:access Only Governance\\n * @custom:error Zero length error 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 /// @notice Initializes the owner of the contract\\n function initialize() public initializer {\\n __Ownable_init();\\n }\\n\\n /**\\n * @notice Add single token config. vToken & feed cannot be null addresses and maxStalePeriod must be positive\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error NotNullAddress error is thrown if token feed address is null\\n * @custom:error Range error is thrown if maxStale period of token is not greater than zero\\n * @custom:event Emits TokenConfigAdded event on succesfully setting of the token config\\n */\\n function setTokenConfig(\\n TokenConfig memory tokenConfig\\n ) public onlyOwner notNullAddress(tokenConfig.asset) notNullAddress(tokenConfig.feed) {\\n require(tokenConfig.maxStalePeriod > 0, \\\"stale period can't be zero\\\");\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(tokenConfig.asset, tokenConfig.feed, tokenConfig.maxStalePeriod);\\n }\\n\\n /**\\n * @notice Gets the Chainlink price for the underlying asset of a given vToken, revert when vToken is a null address\\n * @param vToken vToken address\\n * @return price Underlying price in USD\\n */\\n function getUnderlyingPrice(address vToken) public view override returns (uint256) {\\n string memory symbol = address(vToken) != vBnb ? VBep20Interface(vToken).symbol() : \\\"BNB\\\";\\n\\n if (_compareStrings(symbol, \\\"VAI\\\")) {\\n return VAI_VALUE;\\n } else {\\n return _getUnderlyingPriceInternal(VBep20Interface(vToken));\\n }\\n }\\n\\n /**\\n * @notice Gets the Chainlink price for the underlying asset of a given vToken\\n * or the manually set price if it's been set\\n * @dev The decimals of the underlying token are considered to ensure the returned price\\n * has 18 decimals of precision\\n * @param vToken vToken address\\n * @return price Underlying price in USD\\n */\\n function _getUnderlyingPriceInternal(VBep20Interface vToken) internal view returns (uint256 price) {\\n address token;\\n uint256 decimals;\\n\\n // vBNB token doesn't have `underlying` method\\n if (address(vToken) == vBnb) {\\n token = BNB_ADDR;\\n decimals = 18;\\n } else {\\n token = vToken.underlying();\\n decimals = VBep20Interface(token).decimals();\\n }\\n\\n uint256 tokenPrice = prices[token];\\n if (tokenPrice != 0) {\\n price = tokenPrice;\\n } else {\\n price = _getChainlinkPrice(token);\\n }\\n\\n uint256 decimalDelta = uint256(18) - uint256(decimals);\\n return price * (10 ** decimalDelta);\\n }\\n\\n /**\\n * @notice Get the Chainlink price for the underlying asset of a given vToken, revert if token config doesn't exit\\n * @dev The precision of the price feed is used to ensure the returned price has 18 decimals of precision\\n * @param asset Underlying asset address\\n * @return price Underlying price in USD, with 18 decimals of precision\\n * @custom:error NotNullAddress error is thrown if the asset address is null\\n * @custom:error Price error is thrown if the Chainlink price of asset is not greater than zero\\n * @custom:error Timing error is thrown if current timestamp is less than the last updatedAt timestamp\\n * @custom:error Timing error is thrown if time difference between current time and last updated time\\n * is greater than maxStalePeriod\\n */\\n function _getChainlinkPrice(\\n address asset\\n ) internal view notNullAddress(tokenConfigs[asset].asset) returns (uint256) {\\n TokenConfig memory tokenConfig = tokenConfigs[asset];\\n AggregatorV2V3Interface feed = AggregatorV2V3Interface(tokenConfig.feed);\\n\\n // note: maxStalePeriod cannot be 0\\n uint256 maxStalePeriod = tokenConfig.maxStalePeriod;\\n\\n // Chainlink USD-denominated feeds store answers at 8 decimals, mostly\\n uint256 decimalDelta = uint256(18) - feed.decimals();\\n\\n (, int256 answer, , uint256 updatedAt, ) = feed.latestRoundData();\\n require(answer > 0, \\\"chainlink price must be positive\\\");\\n\\n require(block.timestamp >= updatedAt, \\\"updatedAt exceeds block time\\\");\\n uint256 deltaTime = block.timestamp - updatedAt;\\n require(deltaTime <= maxStalePeriod, \\\"chainlink price expired\\\");\\n\\n return uint256(answer) * (10 ** decimalDelta);\\n }\\n\\n function _compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n}\\n\",\"keccak256\":\"0xa69ea9946b3ff1a8e88f1a089bbd69fb9948dbf4fce52867dab4509a4daae0d5\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
377
- "bytecode": "0x60a06040523480156200001157600080fd5b50604051620015e2380380620015e283398101604081905262000034916200016f565b806001600160a01b038116620000915760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f2061646472657373000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216608052620000a8620000b0565b5050620001a1565b600054610100900460ff16156200011a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000088565b60005460ff90811610156200016d576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200018257600080fd5b81516001600160a01b03811681146200019a57600080fd5b9392505050565b608051611410620001d2600039600081816101dc015281816103f6015281816108130152610a5901526114106000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c578063b9de61e211610066578063b9de61e21461021f578063cfed246b1461023c578063f2fde38b1461025c578063fc57d4df1461026f57600080fd5b8063715018a6146101fe5780638129fc1c146102065780638da5cb5b1461020e57600080fd5b80631b69dc5f116100c85780631b69dc5f1461012a578063392787d2146101915780633e83b6b8146101a45780635ba3792d146101d757600080fd5b80630431710e146100ef57806309a8acb014610104578063127ffda014610117575b600080fd5b6101026100fd366004610f51565b610282565b005b610102610112366004611001565b610318565b610102610125366004611001565b6103c3565b61016661013836600461102d565b6066602052600090815260409020805460018201546002909201546001600160a01b03918216929091169083565b604080516001600160a01b039485168152939092166020840152908201526060015b60405180910390f35b61010261019f36600461104a565b61052b565b6101bf73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b039091168152602001610188565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b610102610673565b610102610687565b6033546001600160a01b03166101bf565b61022e670de0b6b3a764000081565b604051908152602001610188565b61022e61024a36600461102d565b60656020526000908152604090205481565b61010261026a36600461102d565b610798565b61022e61027d36600461102d565b61080e565b61028a61091d565b60008151116102d45760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b81811015610313576103038382815181106102f6576102f6611066565b602002602001015161052b565b61030c81611092565b90506102d9565b505050565b816001600160a01b03811661033f5760405162461bcd60e51b81526004016102cb906110ab565b61034761091d565b6001600160a01b038316600081815260656020908152604091829020548251938452908301528101839052606081018390527fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79060800160405180910390a1506001600160a01b03909116600090815260656020526040902055565b816001600160a01b0381166103ea5760405162461bcd60e51b81526004016102cb906110ab565b6103f261091d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b03161461049457836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f91906110da565b6104aa565b73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb5b6001600160a01b038116600081815260656020908152604091829020548251938452908301528101859052606081018590529091507fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79060800160405180910390a16001600160a01b03166000908152606560205260409020919091555050565b61053361091d565b80516001600160a01b03811661055b5760405162461bcd60e51b81526004016102cb906110ab565b60208201516001600160a01b0381166105865760405162461bcd60e51b81526004016102cb906110ab565b60008360400151116105da5760405162461bcd60e51b815260206004820152601a60248201527f7374616c6520706572696f642063616e2774206265207a65726f00000000000060448201526064016102cb565b82516001600160a01b03908116600090815260666020908152604091829020865181549085166001600160a01b031991821681178355838901516001840180549190971692168217909555838801516002909201829055835194855291840191909152908201527f3cc8d9cb9370a23a8b9ffa75efa24cecb65c4693980e58260841adc474983c5f9060600160405180910390a1505050565b61067b61091d565b6106856000610977565b565b600054610100900460ff16158080156106a75750600054600160ff909116105b806106c15750303b1580156106c1575060005460ff166001145b6107245760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102cb565b6000805460ff191660011790558015610747576000805461ff0019166101001790555b61074f6109c9565b8015610795576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6107a061091d565b6001600160a01b0381166108055760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cb565b61079581610977565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03160361086b576040518060400160405280600381526020016221272160e91b8152506108d1565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156108a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108d19190810190611127565b90506108f8816040518060400160405280600381526020016256414960e81b8152506109f8565b1561090d5750670de0b6b3a764000092915050565b61091683610a52565b9392505050565b6033546001600160a01b031633146106855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102cb565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166109f05760405162461bcd60e51b81526004016102cb906111bb565b610685610bdc565b600081604051602001610a0b9190611206565b6040516020818303038152906040528051906020012083604051602001610a329190611206565b604051602081830303815290604052805190602001201490505b92915050565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610aaf575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb90506012610b7b565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1191906110da565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b759190611222565b60ff1690505b6001600160a01b0382166000908152606560205260409020548015610ba257809350610bae565b610bab83610c0c565b93505b6000610bbb836012611245565b9050610bc881600a611340565b610bd2908661134c565b9695505050505050565b600054610100900460ff16610c035760405162461bcd60e51b81526004016102cb906111bb565b61068533610977565b6001600160a01b0380821660009081526066602052604081205490911680610c465760405162461bcd60e51b81526004016102cb906110ab565b6001600160a01b03808416600090815260666020908152604080832081516060810183528154861681526001820154909516858401819052600290910154858301819052825163313ce56760e01b81529251919490939092859263313ce567926004808401939192918290030181865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec9190611222565b610cfa9060ff166012611245565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610d3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d61919061138a565b5093505092505060008213610db85760405162461bcd60e51b815260206004820181905260248201527f636861696e6c696e6b207072696365206d75737420626520706f73697469766560448201526064016102cb565b80421015610e085760405162461bcd60e51b815260206004820152601c60248201527f757064617465644174206578636565647320626c6f636b2074696d650000000060448201526064016102cb565b6000610e148242611245565b905084811115610e665760405162461bcd60e51b815260206004820152601760248201527f636861696e6c696e6b207072696365206578706972656400000000000000000060448201526064016102cb565b610e7184600a611340565b610e7b908461134c565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ec857610ec8610e89565b604052919050565b6001600160a01b038116811461079557600080fd5b600060608284031215610ef757600080fd5b6040516060810181811067ffffffffffffffff82111715610f1a57610f1a610e89565b6040529050808235610f2b81610ed0565b81526020830135610f3b81610ed0565b6020820152604092830135920191909152919050565b60006020808385031215610f6457600080fd5b823567ffffffffffffffff80821115610f7c57600080fd5b818501915085601f830112610f9057600080fd5b813581811115610fa257610fa2610e89565b610fb0848260051b01610e9f565b81815284810192506060918202840185019188831115610fcf57600080fd5b938501935b82851015610ff557610fe68986610ee5565b84529384019392850192610fd4565b50979650505050505050565b6000806040838503121561101457600080fd5b823561101f81610ed0565b946020939093013593505050565b60006020828403121561103f57600080fd5b813561091681610ed0565b60006060828403121561105c57600080fd5b6109168383610ee5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110a4576110a461107c565b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b6000602082840312156110ec57600080fd5b815161091681610ed0565b60005b838110156111125781810151838201526020016110fa565b83811115611121576000848401525b50505050565b60006020828403121561113957600080fd5b815167ffffffffffffffff8082111561115157600080fd5b818401915084601f83011261116557600080fd5b81518181111561117757611177610e89565b61118a601f8201601f1916602001610e9f565b91508082528560208285010111156111a157600080fd5b6111b28160208401602086016110f7565b50949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516112188184602087016110f7565b9190910192915050565b60006020828403121561123457600080fd5b815160ff8116811461091657600080fd5b6000828210156112575761125761107c565b500390565b600181815b8085111561129757816000190482111561127d5761127d61107c565b8085161561128a57918102915b93841c9390800290611261565b509250929050565b6000826112ae57506001610a4c565b816112bb57506000610a4c565b81600181146112d157600281146112db576112f7565b6001915050610a4c565b60ff8411156112ec576112ec61107c565b50506001821b610a4c565b5060208310610133831016604e8410600b841016171561131a575081810a610a4c565b611324838361125c565b80600019048211156113385761133861107c565b029392505050565b6000610916838361129f565b60008160001904831182151516156113665761136661107c565b500290565b805169ffffffffffffffffffff8116811461138557600080fd5b919050565b600080600080600060a086880312156113a257600080fd5b6113ab8661136b565b94506020860151935060408601519250606086015191506113ce6080870161136b565b9050929550929590935056fea2646970667358221220ae8ecb6f3dc3b655ed158090fb7b84e2537fd4c114ee9714e1176514bfc9188064736f6c634300080d0033",
378
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c578063b9de61e211610066578063b9de61e21461021f578063cfed246b1461023c578063f2fde38b1461025c578063fc57d4df1461026f57600080fd5b8063715018a6146101fe5780638129fc1c146102065780638da5cb5b1461020e57600080fd5b80631b69dc5f116100c85780631b69dc5f1461012a578063392787d2146101915780633e83b6b8146101a45780635ba3792d146101d757600080fd5b80630431710e146100ef57806309a8acb014610104578063127ffda014610117575b600080fd5b6101026100fd366004610f51565b610282565b005b610102610112366004611001565b610318565b610102610125366004611001565b6103c3565b61016661013836600461102d565b6066602052600090815260409020805460018201546002909201546001600160a01b03918216929091169083565b604080516001600160a01b039485168152939092166020840152908201526060015b60405180910390f35b61010261019f36600461104a565b61052b565b6101bf73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b039091168152602001610188565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b610102610673565b610102610687565b6033546001600160a01b03166101bf565b61022e670de0b6b3a764000081565b604051908152602001610188565b61022e61024a36600461102d565b60656020526000908152604090205481565b61010261026a36600461102d565b610798565b61022e61027d36600461102d565b61080e565b61028a61091d565b60008151116102d45760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b81811015610313576103038382815181106102f6576102f6611066565b602002602001015161052b565b61030c81611092565b90506102d9565b505050565b816001600160a01b03811661033f5760405162461bcd60e51b81526004016102cb906110ab565b61034761091d565b6001600160a01b038316600081815260656020908152604091829020548251938452908301528101839052606081018390527fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79060800160405180910390a1506001600160a01b03909116600090815260656020526040902055565b816001600160a01b0381166103ea5760405162461bcd60e51b81526004016102cb906110ab565b6103f261091d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b03161461049457836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f91906110da565b6104aa565b73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb5b6001600160a01b038116600081815260656020908152604091829020548251938452908301528101859052606081018590529091507fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79060800160405180910390a16001600160a01b03166000908152606560205260409020919091555050565b61053361091d565b80516001600160a01b03811661055b5760405162461bcd60e51b81526004016102cb906110ab565b60208201516001600160a01b0381166105865760405162461bcd60e51b81526004016102cb906110ab565b60008360400151116105da5760405162461bcd60e51b815260206004820152601a60248201527f7374616c6520706572696f642063616e2774206265207a65726f00000000000060448201526064016102cb565b82516001600160a01b03908116600090815260666020908152604091829020865181549085166001600160a01b031991821681178355838901516001840180549190971692168217909555838801516002909201829055835194855291840191909152908201527f3cc8d9cb9370a23a8b9ffa75efa24cecb65c4693980e58260841adc474983c5f9060600160405180910390a1505050565b61067b61091d565b6106856000610977565b565b600054610100900460ff16158080156106a75750600054600160ff909116105b806106c15750303b1580156106c1575060005460ff166001145b6107245760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102cb565b6000805460ff191660011790558015610747576000805461ff0019166101001790555b61074f6109c9565b8015610795576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6107a061091d565b6001600160a01b0381166108055760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102cb565b61079581610977565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03160361086b576040518060400160405280600381526020016221272160e91b8152506108d1565b826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156108a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108d19190810190611127565b90506108f8816040518060400160405280600381526020016256414960e81b8152506109f8565b1561090d5750670de0b6b3a764000092915050565b61091683610a52565b9392505050565b6033546001600160a01b031633146106855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102cb565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166109f05760405162461bcd60e51b81526004016102cb906111bb565b610685610bdc565b600081604051602001610a0b9190611206565b6040516020818303038152906040528051906020012083604051602001610a329190611206565b604051602081830303815290604052805190602001201490505b92915050565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610aaf575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb90506012610b7b565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1191906110da565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b759190611222565b60ff1690505b6001600160a01b0382166000908152606560205260409020548015610ba257809350610bae565b610bab83610c0c565b93505b6000610bbb836012611245565b9050610bc881600a611340565b610bd2908661134c565b9695505050505050565b600054610100900460ff16610c035760405162461bcd60e51b81526004016102cb906111bb565b61068533610977565b6001600160a01b0380821660009081526066602052604081205490911680610c465760405162461bcd60e51b81526004016102cb906110ab565b6001600160a01b03808416600090815260666020908152604080832081516060810183528154861681526001820154909516858401819052600290910154858301819052825163313ce56760e01b81529251919490939092859263313ce567926004808401939192918290030181865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec9190611222565b610cfa9060ff166012611245565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610d3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d61919061138a565b5093505092505060008213610db85760405162461bcd60e51b815260206004820181905260248201527f636861696e6c696e6b207072696365206d75737420626520706f73697469766560448201526064016102cb565b80421015610e085760405162461bcd60e51b815260206004820152601c60248201527f757064617465644174206578636565647320626c6f636b2074696d650000000060448201526064016102cb565b6000610e148242611245565b905084811115610e665760405162461bcd60e51b815260206004820152601760248201527f636861696e6c696e6b207072696365206578706972656400000000000000000060448201526064016102cb565b610e7184600a611340565b610e7b908461134c565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610ec857610ec8610e89565b604052919050565b6001600160a01b038116811461079557600080fd5b600060608284031215610ef757600080fd5b6040516060810181811067ffffffffffffffff82111715610f1a57610f1a610e89565b6040529050808235610f2b81610ed0565b81526020830135610f3b81610ed0565b6020820152604092830135920191909152919050565b60006020808385031215610f6457600080fd5b823567ffffffffffffffff80821115610f7c57600080fd5b818501915085601f830112610f9057600080fd5b813581811115610fa257610fa2610e89565b610fb0848260051b01610e9f565b81815284810192506060918202840185019188831115610fcf57600080fd5b938501935b82851015610ff557610fe68986610ee5565b84529384019392850192610fd4565b50979650505050505050565b6000806040838503121561101457600080fd5b823561101f81610ed0565b946020939093013593505050565b60006020828403121561103f57600080fd5b813561091681610ed0565b60006060828403121561105c57600080fd5b6109168383610ee5565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016110a4576110a461107c565b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b6000602082840312156110ec57600080fd5b815161091681610ed0565b60005b838110156111125781810151838201526020016110fa565b83811115611121576000848401525b50505050565b60006020828403121561113957600080fd5b815167ffffffffffffffff8082111561115157600080fd5b818401915084601f83011261116557600080fd5b81518181111561117757611177610e89565b61118a601f8201601f1916602001610e9f565b91508082528560208285010111156111a157600080fd5b6111b28160208401602086016110f7565b50949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516112188184602087016110f7565b9190910192915050565b60006020828403121561123457600080fd5b815160ff8116811461091657600080fd5b6000828210156112575761125761107c565b500390565b600181815b8085111561129757816000190482111561127d5761127d61107c565b8085161561128a57918102915b93841c9390800290611261565b509250929050565b6000826112ae57506001610a4c565b816112bb57506000610a4c565b81600181146112d157600281146112db576112f7565b6001915050610a4c565b60ff8411156112ec576112ec61107c565b50506001821b610a4c565b5060208310610133831016604e8410600b841016171561131a575081810a610a4c565b611324838361125c565b80600019048211156113385761133861107c565b029392505050565b6000610916838361129f565b60008160001904831182151516156113665761136661107c565b500290565b805169ffffffffffffffffffff8116811461138557600080fd5b919050565b600080600080600060a086880312156113a257600080fd5b6113ab8661136b565b94506020860151935060408601519250606086015191506113ce6080870161136b565b9050929550929590935056fea2646970667358221220ae8ecb6f3dc3b655ed158090fb7b84e2537fd4c114ee9714e1176514bfc9188064736f6c634300080d0033",
491
+ "solcInputHash": "30f2cb3e89e183b8669f05bddf9426d9",
492
+ "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\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousPriceMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestedPriceMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPriceMantissa\",\"type\":\"uint256\"}],\"name\":\"PricePosted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BNB_ADDR\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"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\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"prices\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"setDirectPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"internalType\":\"struct TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract VBep20Interface\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"underlyingPriceMantissa\",\"type\":\"uint256\"}],\"name\":\"setUnderlyingPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenConfigs\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feed\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxStalePeriod\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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)\":{\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price Underlying price in USD\"}},\"initialize(address)\":{\"params\":{\"accessControlManager_\":\"Address of the access control manager contract\"}},\"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\"}},\"setDirectPrice(address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:event\":\"Emits PricePosted event on succesfully setup of underlying price\",\"params\":{\"asset\":\"Asset address\",\"price\":\"Underlying price in 18 decimals\"}},\"setTokenConfig((address,address,uint256))\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress error is thrown if asset address is nullNotNullAddress error is thrown if token feed address is nullRange error is thrown if maxStale period of token is not greater than zero\",\"custom:event\":\"Emits TokenConfigAdded event on succesfully setting of the token config\",\"params\":{\"tokenConfig\":\"Token config struct\"}},\"setTokenConfigs((address,address,uint256)[])\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Zero length error thrown, if length of the array in parameter is 0\",\"params\":{\"tokenConfigs_\":\"config array\"}},\"setUnderlyingPrice(address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress thrown if address of vToken is null\",\"custom:event\":\"Emits PricePosted event on succesfully setup of underlying price\",\"params\":{\"underlyingPriceMantissa\":\"price in 18 decimals\",\"vToken\":\"vToken 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\"},\"PricePosted(address,uint256,uint256,uint256)\":{\"notice\":\"Emit when a price is manually set\"},\"TokenConfigAdded(address,address,uint256)\":{\"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 address for vBNB\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract. Sets immutable variables.\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Gets the Chainlink price for the underlying asset of a given vToken, revert when vToken is a null address\"},\"initialize(address)\":{\"notice\":\"Initializes the owner of the contract\"},\"prices(address)\":{\"notice\":\"Manually set an override price, useful under extenuating conditions such as price feed failure\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setDirectPrice(address,uint256)\":{\"notice\":\"Manually set the price of a given asset\"},\"setTokenConfig((address,address,uint256))\":{\"notice\":\"Add single token config. vToken & feed cannot be null addresses and maxStalePeriod must be positive\"},\"setTokenConfigs((address,address,uint256)[])\":{\"notice\":\"Add multiple token configs at the same time\"},\"setUnderlyingPrice(address,uint256)\":{\"notice\":\"Set the forced prices of the underlying token of input vToken\"},\"tokenConfigs(address)\":{\"notice\":\"Token config by assets\"},\"vBnb()\":{\"notice\":\"vBNB address\"},\"vai()\":{\"notice\":\"VAI address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/ChainlinkOracle.sol\":\"ChainlinkOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorInterface {\\n function latestAnswer() external view returns (int256);\\n\\n function latestTimestamp() external view returns (uint256);\\n\\n function latestRound() external view returns (uint256);\\n\\n function getAnswer(uint256 roundId) external view returns (int256);\\n\\n function getTimestamp(uint256 roundId) external view returns (uint256);\\n\\n event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);\\n\\n event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);\\n}\\n\",\"keccak256\":\"0xb496651006b9a2a07920ffe116928b11e2a6458e21361cecca51409522488ca7\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./AggregatorInterface.sol\\\";\\nimport \\\"./AggregatorV3Interface.sol\\\";\\n\\ninterface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}\\n\",\"keccak256\":\"0x4a7757ff7bbafe044cd49c2a45c7c18ec50eff7c7af6869face5e1e9cda976f2\",\"license\":\"MIT\"},\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface AggregatorV3Interface {\\n function decimals() external view returns (uint8);\\n\\n function description() external view returns (string memory);\\n\\n function version() external view returns (uint256);\\n\\n function getRoundData(uint80 _roundId)\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n\\n function latestRoundData()\\n external\\n view\\n returns (\\n uint80 roundId,\\n int256 answer,\\n uint256 startedAt,\\n uint256 updatedAt,\\n uint80 answeredInRound\\n );\\n}\\n\",\"keccak256\":\"0x6e6e4b0835904509406b070ee173b5bc8f677c19421b76be38aea3b1b3d30846\",\"license\":\"MIT\"},\"@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\"},\"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/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/ChainlinkOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"../interfaces/VBep20Interface.sol\\\";\\nimport \\\"../interfaces/OracleInterface.sol\\\";\\nimport \\\"@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol\\\";\\nimport \\\"../Governance/AccessControlled.sol\\\";\\n\\nstruct TokenConfig {\\n /// @notice Underlying token address, which can't be a null address and can be used to check if a token is supported\\n /// @notice 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB for BNB\\n address asset;\\n /// @notice Chainlink feed address\\n address feed;\\n /// @notice Price expiration period of this asset\\n uint256 maxStalePeriod;\\n}\\n\\ncontract ChainlinkOracle is AccessControlled, OracleInterface {\\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 address for vBNB\\n address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n /// @notice Manually set an override price, useful under extenuating conditions such as price feed failure\\n mapping(address => uint256) public prices;\\n\\n /// @notice Token config by assets\\n mapping(address => TokenConfig) public tokenConfigs;\\n\\n /// @notice Emit when a price is manually set\\n event PricePosted(\\n address asset,\\n uint256 previousPriceMantissa,\\n uint256 requestedPriceMantissa,\\n uint256 newPriceMantissa\\n );\\n\\n /// @notice Emit when a token config is added\\n event TokenConfigAdded(address asset, address feed, uint256 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 Set the forced prices of the underlying token of input vToken\\n * @param vToken vToken address\\n * @param underlyingPriceMantissa price in 18 decimals\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress thrown if address of vToken is null\\n * @custom:event Emits PricePosted event on succesfully setup of underlying price\\n */\\n function setUnderlyingPrice(\\n VBep20Interface vToken,\\n uint256 underlyingPriceMantissa\\n ) external notNullAddress(address(vToken)) {\\n _checkAccessAllowed(\\\"setUnderlyingPrice(VBep20Interface,uint256)\\\");\\n\\n address asset = address(vToken) == vBnb ? BNB_ADDR : address(vToken.underlying());\\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\\n prices[asset] = underlyingPriceMantissa;\\n }\\n\\n /**\\n * @notice Manually set the price of a given asset\\n * @param asset Asset address\\n * @param price Underlying price in 18 decimals\\n * @custom:access Only Governance\\n * @custom:event Emits PricePosted event on succesfully setup of underlying price\\n */\\n function setDirectPrice(address asset, uint256 price) external notNullAddress(asset) {\\n _checkAccessAllowed(\\\"setDirectPrice(asset,price)\\\");\\n\\n prices[asset] = price;\\n emit PricePosted(asset, prices[asset], price, price);\\n }\\n\\n /**\\n * @notice Add multiple token configs at the same time\\n * @param tokenConfigs_ config array\\n * @custom:access Only Governance\\n * @custom:error Zero length error 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 Initializes the owner of the contract\\n * @param accessControlManager_ Address of the access control manager contract\\n */\\n function initialize(address accessControlManager_) public initializer {\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n /**\\n * @notice Add single token config. vToken & feed cannot be null addresses and maxStalePeriod must be positive\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error NotNullAddress error is thrown if token feed address is null\\n * @custom:error Range error is thrown if maxStale period of token is not greater than zero\\n * @custom:event Emits TokenConfigAdded event on succesfully setting of the token config\\n */\\n function setTokenConfig(\\n TokenConfig memory tokenConfig\\n ) public notNullAddress(tokenConfig.asset) notNullAddress(tokenConfig.feed) {\\n _checkAccessAllowed(\\\"setTokenConfig(TokenConfig)\\\");\\n\\n require(tokenConfig.maxStalePeriod > 0, \\\"stale period can't be zero\\\");\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(tokenConfig.asset, tokenConfig.feed, tokenConfig.maxStalePeriod);\\n }\\n\\n /**\\n * @notice Gets the Chainlink price for the underlying asset of a given vToken, revert when vToken is a null address\\n * @param vToken vToken address\\n * @return price Underlying price in USD\\n */\\n function getUnderlyingPrice(address vToken) public view override returns (uint256) {\\n return _getUnderlyingPriceInternal(VBep20Interface(vToken));\\n }\\n\\n /**\\n * @notice Gets the Chainlink price for the underlying asset of a given vToken\\n * or the manually set price if it's been set\\n * @dev The decimals of the underlying token are considered to ensure the returned price\\n * has 18 decimals of precision\\n * @param vToken vToken address\\n * @return price Underlying price in USD\\n */\\n function _getUnderlyingPriceInternal(VBep20Interface vToken) internal view returns (uint256 price) {\\n address token;\\n uint256 decimals;\\n\\n // vBNB token doesn't have `underlying` method\\n if (address(vToken) == vBnb) {\\n token = BNB_ADDR;\\n decimals = 18;\\n } else if (address(vToken) == vai) {\\n token = vai;\\n decimals = 18;\\n } else {\\n token = vToken.underlying();\\n decimals = VBep20Interface(token).decimals();\\n }\\n\\n uint256 tokenPrice = prices[token];\\n if (tokenPrice != 0) {\\n price = tokenPrice;\\n } else {\\n price = _getChainlinkPrice(token);\\n }\\n\\n uint256 decimalDelta = uint256(18) - uint256(decimals);\\n return price * (10 ** decimalDelta);\\n }\\n\\n /**\\n * @notice Get the Chainlink price for the underlying asset of a given vToken, revert if token config doesn't exit\\n * @dev The precision of the price feed is used to ensure the returned price has 18 decimals of precision\\n * @param asset Underlying asset address\\n * @return price Underlying price in USD, with 18 decimals of precision\\n * @custom:error NotNullAddress error is thrown if the asset address is null\\n * @custom:error Price error is thrown if the Chainlink price of asset is not greater than zero\\n * @custom:error Timing error is thrown if current timestamp is less than the last updatedAt timestamp\\n * @custom:error Timing error is thrown if time difference between current time and last updated time\\n * is greater than maxStalePeriod\\n */\\n function _getChainlinkPrice(\\n address asset\\n ) internal view notNullAddress(tokenConfigs[asset].asset) returns (uint256) {\\n TokenConfig memory tokenConfig = tokenConfigs[asset];\\n AggregatorV2V3Interface feed = AggregatorV2V3Interface(tokenConfig.feed);\\n\\n // note: maxStalePeriod cannot be 0\\n uint256 maxStalePeriod = tokenConfig.maxStalePeriod;\\n\\n // Chainlink USD-denominated feeds store answers at 8 decimals, mostly\\n uint256 decimalDelta = uint256(18) - feed.decimals();\\n\\n (, int256 answer, , uint256 updatedAt, ) = feed.latestRoundData();\\n require(answer > 0, \\\"chainlink price must be positive\\\");\\n\\n require(block.timestamp >= updatedAt, \\\"updatedAt exceeds block time\\\");\\n uint256 deltaTime = block.timestamp - updatedAt;\\n require(deltaTime <= maxStalePeriod, \\\"chainlink price expired\\\");\\n\\n return uint256(answer) * (10 ** decimalDelta);\\n }\\n\\n function _compareStrings(string memory a, string memory b) internal pure returns (bool) {\\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\\n }\\n}\\n\",\"keccak256\":\"0x1a5938c40ac736ceea09dedb6f25c87395cd6f28627f7eddf9621b4cea321a56\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
493
+ "bytecode": "0x60c06040523480156200001157600080fd5b506040516200188b3803806200188b8339810160408190526200003491620001ed565b816001600160a01b038116620000915760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f2061646472657373000000000000000000000060448201526064015b60405180910390fd5b816001600160a01b038116620000ea5760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f20616464726573730000000000000000000000604482015260640162000088565b6001600160a01b03808516608052831660a0526200010762000111565b5050505062000225565b600054610100900460ff16156200017b5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000088565b60005460ff9081161015620001ce576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114620001e857600080fd5b919050565b600080604083850312156200020157600080fd5b6200020c83620001d0565b91506200021c60208401620001d0565b90509250929050565b60805160a051611624620002676000396000818161027401528181610c680152610ca201526000818161021b015281816105070152610c1001526116246000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806379ba5097116100a2578063c4d66de811610071578063c4d66de814610296578063cfed246b146102a9578063e30c3978146102d7578063f2fde38b146102e8578063fc57d4df146102fb57600080fd5b806379ba5097146102455780638da5cb5b1461024d578063b4a0bdf31461025e578063b62e4c921461026f57600080fd5b80631b69dc5f116100e95780631b69dc5f14610169578063392787d2146101d05780633e83b6b8146101e35780635ba3792d14610216578063715018a61461023d57600080fd5b80630431710e1461011b57806309a8acb0146101305780630e32cb8614610143578063127ffda014610156575b600080fd5b61012e61012936600461118e565b61030e565b005b61012e61013e36600461123e565b6103da565b61012e61015136600461126a565b6104a7565b61012e61016436600461123e565b6104bb565b6101a561017736600461126a565b60ca602052600090815260409020805460018201546002909201546001600160a01b03918216929091169083565b604080516001600160a01b039485168152939092166020840152908201526060015b60405180910390f35b61012e6101de36600461128e565b61063c565b6101fe73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b0390911681526020016101c7565b6101fe7f000000000000000000000000000000000000000000000000000000000000000081565b61012e6107b2565b61012e6107c6565b6033546001600160a01b03166101fe565b6097546001600160a01b03166101fe565b6101fe7f000000000000000000000000000000000000000000000000000000000000000081565b61012e6102a436600461126a565b61083d565b6102c96102b736600461126a565b60c96020526000908152604090205481565b6040519081526020016101c7565b6065546001600160a01b03166101fe565b61012e6102f636600461126a565b610951565b6102c961030936600461126a565b6109c2565b61034c6040518060400160405280601e81526020017f736574546f6b656e436f6e6669677328546f6b656e436f6e6669675b5d2900008152506109d3565b60008151116103965760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b818110156103d5576103c58382815181106103b8576103b86112aa565b602002602001015161063c565b6103ce816112d6565b905061039b565b505050565b816001600160a01b0381166104015760405162461bcd60e51b815260040161038d906112ef565b61043f6040518060400160405280601b81526020017f73657444697265637450726963652861737365742c70726963652900000000008152506109d3565b6001600160a01b038316600081815260c96020908152604091829020859055815192835282018490528101839052606081018390527fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae7906080015b60405180910390a1505050565b6104af610a6d565b6104b881610ac7565b50565b816001600160a01b0381166104e25760405162461bcd60e51b815260040161038d906112ef565b6105036040518060600160405280602b81526020016115c4602b91396109d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146105a557836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061131e565b6105bb565b73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb5b6001600160a01b038116600081815260c96020908152604091829020548251938452908301528101859052606081018590529091507fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79060800160405180910390a16001600160a01b0316600090815260c960205260409020919091555050565b80516001600160a01b0381166106645760405162461bcd60e51b815260040161038d906112ef565b60208201516001600160a01b03811661068f5760405162461bcd60e51b815260040161038d906112ef565b6106cd6040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e6669672900000000008152506109d3565b60008360400151116107215760405162461bcd60e51b815260206004820152601a60248201527f7374616c6520706572696f642063616e2774206265207a65726f000000000000604482015260640161038d565b82516001600160a01b03908116600090815260ca6020908152604091829020865181549085166001600160a01b031991821681178355838901516001840180549190971692168217909555838801516002909201829055835194855291840191909152908201527f3cc8d9cb9370a23a8b9ffa75efa24cecb65c4693980e58260841adc474983c5f9060600161049a565b6107ba610a6d565b6107c46000610b85565b565b60655433906001600160a01b031681146108345760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161038d565b6104b881610b85565b600054610100900460ff161580801561085d5750600054600160ff909116105b806108775750303b158015610877575060005460ff166001145b6108da5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161038d565b6000805460ff1916600117905580156108fd576000805461ff0019166101001790555b61090682610b9e565b801561094d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b610959610a6d565b606580546001600160a01b0383166001600160a01b0319909116811790915561098a6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60006109cd82610c09565b92915050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610a069033908690600401611388565b602060405180830381865afa158015610a23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4791906113b4565b90508061094d57333083604051634a3fa29360e01b815260040161038d939291906113d6565b6033546001600160a01b031633146107c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038d565b6001600160a01b038116610b2b5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161038d565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610944565b606580546001600160a01b03191690556104b881610df7565b600054610100900460ff166104af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161038d565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610c66575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb90506012610d96565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610cca57507f000000000000000000000000000000000000000000000000000000000000000090506012610d96565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c919061131e565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d90919061140b565b60ff1690505b6001600160a01b038216600090815260c960205260409020548015610dbd57809350610dc9565b610dc683610e49565b93505b6000610dd683601261142e565b9050610de381600a611529565b610ded9086611535565b9695505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03808216600090815260ca602052604081205490911680610e835760405162461bcd60e51b815260040161038d906112ef565b6001600160a01b03808416600090815260ca6020908152604080832081516060810183528154861681526001820154909516858401819052600290910154858301819052825163313ce56760e01b81529251919490939092859263313ce567926004808401939192918290030181865afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f29919061140b565b610f379060ff16601261142e565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610f7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9e9190611573565b5093505092505060008213610ff55760405162461bcd60e51b815260206004820181905260248201527f636861696e6c696e6b207072696365206d75737420626520706f736974697665604482015260640161038d565b804210156110455760405162461bcd60e51b815260206004820152601c60248201527f757064617465644174206578636565647320626c6f636b2074696d6500000000604482015260640161038d565b6000611051824261142e565b9050848111156110a35760405162461bcd60e51b815260206004820152601760248201527f636861696e6c696e6b2070726963652065787069726564000000000000000000604482015260640161038d565b6110ae84600a611529565b6110b89084611535565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611105576111056110c6565b604052919050565b6001600160a01b03811681146104b857600080fd5b60006060828403121561113457600080fd5b6040516060810181811067ffffffffffffffff82111715611157576111576110c6565b60405290508082356111688161110d565b815260208301356111788161110d565b6020820152604092830135920191909152919050565b600060208083850312156111a157600080fd5b823567ffffffffffffffff808211156111b957600080fd5b818501915085601f8301126111cd57600080fd5b8135818111156111df576111df6110c6565b6111ed848260051b016110dc565b8181528481019250606091820284018501918883111561120c57600080fd5b938501935b82851015611232576112238986611122565b84529384019392850192611211565b50979650505050505050565b6000806040838503121561125157600080fd5b823561125c8161110d565b946020939093013593505050565b60006020828403121561127c57600080fd5b81356112878161110d565b9392505050565b6000606082840312156112a057600080fd5b6112878383611122565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016112e8576112e86112c0565b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b60006020828403121561133057600080fd5b81516112878161110d565b6000815180845260005b8181101561136157602081850181015186830182015201611345565b81811115611373576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b03831681526040602082018190526000906113ac9083018461133b565b949350505050565b6000602082840312156113c657600080fd5b8151801515811461128757600080fd5b6001600160a01b038481168252831660208201526060604082018190526000906114029083018461133b565b95945050505050565b60006020828403121561141d57600080fd5b815160ff8116811461128757600080fd5b600082821015611440576114406112c0565b500390565b600181815b80851115611480578160001904821115611466576114666112c0565b8085161561147357918102915b93841c939080029061144a565b509250929050565b600082611497575060016109cd565b816114a4575060006109cd565b81600181146114ba57600281146114c4576114e0565b60019150506109cd565b60ff8411156114d5576114d56112c0565b50506001821b6109cd565b5060208310610133831016604e8410600b8410161715611503575081810a6109cd565b61150d8383611445565b8060001904821115611521576115216112c0565b029392505050565b60006112878383611488565b600081600019048311821515161561154f5761154f6112c0565b500290565b805169ffffffffffffffffffff8116811461156e57600080fd5b919050565b600080600080600060a0868803121561158b57600080fd5b61159486611554565b94506020860151935060408601519250606086015191506115b760808701611554565b9050929550929590935056fe736574556e6465726c79696e67507269636528564265703230496e746572666163652c75696e7432353629a2646970667358221220f929de7b448cafd7786ca71175d6da8c924b7cf6c30717bee9b71bf63aeb964764736f6c634300080d0033",
494
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806379ba5097116100a2578063c4d66de811610071578063c4d66de814610296578063cfed246b146102a9578063e30c3978146102d7578063f2fde38b146102e8578063fc57d4df146102fb57600080fd5b806379ba5097146102455780638da5cb5b1461024d578063b4a0bdf31461025e578063b62e4c921461026f57600080fd5b80631b69dc5f116100e95780631b69dc5f14610169578063392787d2146101d05780633e83b6b8146101e35780635ba3792d14610216578063715018a61461023d57600080fd5b80630431710e1461011b57806309a8acb0146101305780630e32cb8614610143578063127ffda014610156575b600080fd5b61012e61012936600461118e565b61030e565b005b61012e61013e36600461123e565b6103da565b61012e61015136600461126a565b6104a7565b61012e61016436600461123e565b6104bb565b6101a561017736600461126a565b60ca602052600090815260409020805460018201546002909201546001600160a01b03918216929091169083565b604080516001600160a01b039485168152939092166020840152908201526060015b60405180910390f35b61012e6101de36600461128e565b61063c565b6101fe73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6040516001600160a01b0390911681526020016101c7565b6101fe7f000000000000000000000000000000000000000000000000000000000000000081565b61012e6107b2565b61012e6107c6565b6033546001600160a01b03166101fe565b6097546001600160a01b03166101fe565b6101fe7f000000000000000000000000000000000000000000000000000000000000000081565b61012e6102a436600461126a565b61083d565b6102c96102b736600461126a565b60c96020526000908152604090205481565b6040519081526020016101c7565b6065546001600160a01b03166101fe565b61012e6102f636600461126a565b610951565b6102c961030936600461126a565b6109c2565b61034c6040518060400160405280601e81526020017f736574546f6b656e436f6e6669677328546f6b656e436f6e6669675b5d2900008152506109d3565b60008151116103965760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b818110156103d5576103c58382815181106103b8576103b86112aa565b602002602001015161063c565b6103ce816112d6565b905061039b565b505050565b816001600160a01b0381166104015760405162461bcd60e51b815260040161038d906112ef565b61043f6040518060400160405280601b81526020017f73657444697265637450726963652861737365742c70726963652900000000008152506109d3565b6001600160a01b038316600081815260c96020908152604091829020859055815192835282018490528101839052606081018390527fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae7906080015b60405180910390a1505050565b6104af610a6d565b6104b881610ac7565b50565b816001600160a01b0381166104e25760405162461bcd60e51b815260040161038d906112ef565b6105036040518060600160405280602b81526020016115c4602b91396109d3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146105a557836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561057c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a0919061131e565b6105bb565b73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb5b6001600160a01b038116600081815260c96020908152604091829020548251938452908301528101859052606081018590529091507fdd71a1d19fcba687442a1d5c58578f1e409af71a79d10fd95a4d66efd8fa9ae79060800160405180910390a16001600160a01b0316600090815260c960205260409020919091555050565b80516001600160a01b0381166106645760405162461bcd60e51b815260040161038d906112ef565b60208201516001600160a01b03811661068f5760405162461bcd60e51b815260040161038d906112ef565b6106cd6040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e6669672900000000008152506109d3565b60008360400151116107215760405162461bcd60e51b815260206004820152601a60248201527f7374616c6520706572696f642063616e2774206265207a65726f000000000000604482015260640161038d565b82516001600160a01b03908116600090815260ca6020908152604091829020865181549085166001600160a01b031991821681178355838901516001840180549190971692168217909555838801516002909201829055835194855291840191909152908201527f3cc8d9cb9370a23a8b9ffa75efa24cecb65c4693980e58260841adc474983c5f9060600161049a565b6107ba610a6d565b6107c46000610b85565b565b60655433906001600160a01b031681146108345760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161038d565b6104b881610b85565b600054610100900460ff161580801561085d5750600054600160ff909116105b806108775750303b158015610877575060005460ff166001145b6108da5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161038d565b6000805460ff1916600117905580156108fd576000805461ff0019166101001790555b61090682610b9e565b801561094d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b610959610a6d565b606580546001600160a01b0383166001600160a01b0319909116811790915561098a6033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60006109cd82610c09565b92915050565b6097546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610a069033908690600401611388565b602060405180830381865afa158015610a23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4791906113b4565b90508061094d57333083604051634a3fa29360e01b815260040161038d939291906113d6565b6033546001600160a01b031633146107c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038d565b6001600160a01b038116610b2b5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161038d565b609780546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610944565b606580546001600160a01b03191690556104b881610df7565b600054610100900460ff166104af5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161038d565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610c66575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb90506012610d96565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610cca57507f000000000000000000000000000000000000000000000000000000000000000090506012610d96565b836001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2c919061131e565b9150816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d90919061140b565b60ff1690505b6001600160a01b038216600090815260c960205260409020548015610dbd57809350610dc9565b610dc683610e49565b93505b6000610dd683601261142e565b9050610de381600a611529565b610ded9086611535565b9695505050505050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03808216600090815260ca602052604081205490911680610e835760405162461bcd60e51b815260040161038d906112ef565b6001600160a01b03808416600090815260ca6020908152604080832081516060810183528154861681526001820154909516858401819052600290910154858301819052825163313ce56760e01b81529251919490939092859263313ce567926004808401939192918290030181865afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f29919061140b565b610f379060ff16601261142e565b9050600080846001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610f7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9e9190611573565b5093505092505060008213610ff55760405162461bcd60e51b815260206004820181905260248201527f636861696e6c696e6b207072696365206d75737420626520706f736974697665604482015260640161038d565b804210156110455760405162461bcd60e51b815260206004820152601c60248201527f757064617465644174206578636565647320626c6f636b2074696d6500000000604482015260640161038d565b6000611051824261142e565b9050848111156110a35760405162461bcd60e51b815260206004820152601760248201527f636861696e6c696e6b2070726963652065787069726564000000000000000000604482015260640161038d565b6110ae84600a611529565b6110b89084611535565b9a9950505050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611105576111056110c6565b604052919050565b6001600160a01b03811681146104b857600080fd5b60006060828403121561113457600080fd5b6040516060810181811067ffffffffffffffff82111715611157576111576110c6565b60405290508082356111688161110d565b815260208301356111788161110d565b6020820152604092830135920191909152919050565b600060208083850312156111a157600080fd5b823567ffffffffffffffff808211156111b957600080fd5b818501915085601f8301126111cd57600080fd5b8135818111156111df576111df6110c6565b6111ed848260051b016110dc565b8181528481019250606091820284018501918883111561120c57600080fd5b938501935b82851015611232576112238986611122565b84529384019392850192611211565b50979650505050505050565b6000806040838503121561125157600080fd5b823561125c8161110d565b946020939093013593505050565b60006020828403121561127c57600080fd5b81356112878161110d565b9392505050565b6000606082840312156112a057600080fd5b6112878383611122565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016112e8576112e86112c0565b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b60006020828403121561133057600080fd5b81516112878161110d565b6000815180845260005b8181101561136157602081850181015186830182015201611345565b81811115611373576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b03831681526040602082018190526000906113ac9083018461133b565b949350505050565b6000602082840312156113c657600080fd5b8151801515811461128757600080fd5b6001600160a01b038481168252831660208201526060604082018190526000906114029083018461133b565b95945050505050565b60006020828403121561141d57600080fd5b815160ff8116811461128757600080fd5b600082821015611440576114406112c0565b500390565b600181815b80851115611480578160001904821115611466576114666112c0565b8085161561147357918102915b93841c939080029061144a565b509250929050565b600082611497575060016109cd565b816114a4575060006109cd565b81600181146114ba57600281146114c4576114e0565b60019150506109cd565b60ff8411156114d5576114d56112c0565b50506001821b6109cd565b5060208310610133831016604e8410600b8410161715611503575081810a6109cd565b61150d8383611445565b8060001904821115611521576115216112c0565b029392505050565b60006112878383611488565b600081600019048311821515161561154f5761154f6112c0565b500290565b805169ffffffffffffffffffff8116811461156e57600080fd5b919050565b600080600080600060a0868803121561158b57600080fd5b61159486611554565b94506020860151935060408601519250606086015191506115b760808701611554565b9050929550929590935056fe736574556e6465726c79696e67507269636528564265703230496e746572666163652c75696e7432353629a2646970667358221220f929de7b448cafd7786ca71175d6da8c924b7cf6c30717bee9b71bf63aeb964764736f6c634300080d0033",
379
495
  "devdoc": {
380
496
  "kind": "dev",
381
497
  "methods": {
498
+ "acceptOwnership()": {
499
+ "details": "The new owner accepts the ownership transfer."
500
+ },
382
501
  "constructor": {
383
502
  "custom:oz-upgrades-unsafe-allow": "constructor",
384
503
  "params": {
385
- "vBnbAddress": "The address of the vBNB"
504
+ "vBnbAddress": "The address of the vBNB",
505
+ "vaiAddress": "The address of the VAI"
386
506
  }
387
507
  },
388
508
  "getUnderlyingPrice(address)": {
@@ -393,12 +513,28 @@
393
513
  "_0": "price Underlying price in USD"
394
514
  }
395
515
  },
516
+ "initialize(address)": {
517
+ "params": {
518
+ "accessControlManager_": "Address of the access control manager contract"
519
+ }
520
+ },
396
521
  "owner()": {
397
522
  "details": "Returns the address of the current owner."
398
523
  },
524
+ "pendingOwner()": {
525
+ "details": "Returns the address of the pending owner."
526
+ },
399
527
  "renounceOwnership()": {
400
528
  "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."
401
529
  },
530
+ "setAccessControlManager(address)": {
531
+ "custom:access": "Only Governance",
532
+ "custom:event": "Emits NewAccessControlManager event",
533
+ "details": "Admin function to set address of AccessControlManager",
534
+ "params": {
535
+ "accessControlManager_": "The new address of the AccessControlManager"
536
+ }
537
+ },
402
538
  "setDirectPrice(address,uint256)": {
403
539
  "custom:access": "Only Governance",
404
540
  "custom:event": "Emits PricePosted event on succesfully setup of underlying price",
@@ -432,18 +568,31 @@
432
568
  }
433
569
  },
434
570
  "transferOwnership(address)": {
435
- "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
571
+ "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."
436
572
  }
437
573
  },
438
574
  "stateVariables": {
439
575
  "vBnb": {
440
576
  "custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
577
+ },
578
+ "vai": {
579
+ "custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
441
580
  }
442
581
  },
443
582
  "version": 1
444
583
  },
445
584
  "userdoc": {
585
+ "errors": {
586
+ "Unauthorized(address,address,string)": [
587
+ {
588
+ "notice": "Thrown when the action is prohibited by AccessControlManager"
589
+ }
590
+ ]
591
+ },
446
592
  "events": {
593
+ "NewAccessControlManager(address,address)": {
594
+ "notice": "Emitted when access control manager contract address is changed"
595
+ },
447
596
  "PricePosted(address,uint256,uint256,uint256)": {
448
597
  "notice": "Emit when a price is manually set"
449
598
  },
@@ -456,8 +605,8 @@
456
605
  "BNB_ADDR()": {
457
606
  "notice": "Set this as asset address for BNB. This is the underlying address for vBNB"
458
607
  },
459
- "VAI_VALUE()": {
460
- "notice": "VAI token is considered $1 constantly in oracle for now"
608
+ "accessControlManager()": {
609
+ "notice": "Returns the address of the access control manager contract"
461
610
  },
462
611
  "constructor": {
463
612
  "notice": "Constructor for the implementation contract. Sets immutable variables."
@@ -465,12 +614,15 @@
465
614
  "getUnderlyingPrice(address)": {
466
615
  "notice": "Gets the Chainlink price for the underlying asset of a given vToken, revert when vToken is a null address"
467
616
  },
468
- "initialize()": {
617
+ "initialize(address)": {
469
618
  "notice": "Initializes the owner of the contract"
470
619
  },
471
620
  "prices(address)": {
472
621
  "notice": "Manually set an override price, useful under extenuating conditions such as price feed failure"
473
622
  },
623
+ "setAccessControlManager(address)": {
624
+ "notice": "Sets the address of AccessControlManager"
625
+ },
474
626
  "setDirectPrice(address,uint256)": {
475
627
  "notice": "Manually set the price of a given asset"
476
628
  },
@@ -488,6 +640,9 @@
488
640
  },
489
641
  "vBnb()": {
490
642
  "notice": "vBNB address"
643
+ },
644
+ "vai()": {
645
+ "notice": "VAI address"
491
646
  }
492
647
  },
493
648
  "version": 1
@@ -495,7 +650,7 @@
495
650
  "storageLayout": {
496
651
  "storage": [
497
652
  {
498
- "astId": 241,
653
+ "astId": 347,
499
654
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
500
655
  "label": "_initialized",
501
656
  "offset": 0,
@@ -503,7 +658,7 @@
503
658
  "type": "t_uint8"
504
659
  },
505
660
  {
506
- "astId": 244,
661
+ "astId": 350,
507
662
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
508
663
  "label": "_initializing",
509
664
  "offset": 1,
@@ -511,7 +666,7 @@
511
666
  "type": "t_bool"
512
667
  },
513
668
  {
514
- "astId": 855,
669
+ "astId": 961,
515
670
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
516
671
  "label": "__gap",
517
672
  "offset": 0,
@@ -519,7 +674,7 @@
519
674
  "type": "t_array(t_uint256)50_storage"
520
675
  },
521
676
  {
522
- "astId": 113,
677
+ "astId": 219,
523
678
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
524
679
  "label": "_owner",
525
680
  "offset": 0,
@@ -527,7 +682,7 @@
527
682
  "type": "t_address"
528
683
  },
529
684
  {
530
- "astId": 233,
685
+ "astId": 339,
531
686
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
532
687
  "label": "__gap",
533
688
  "offset": 0,
@@ -535,20 +690,52 @@
535
690
  "type": "t_array(t_uint256)49_storage"
536
691
  },
537
692
  {
538
- "astId": 5488,
693
+ "astId": 128,
539
694
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
540
- "label": "prices",
695
+ "label": "_pendingOwner",
541
696
  "offset": 0,
542
697
  "slot": "101",
698
+ "type": "t_address"
699
+ },
700
+ {
701
+ "astId": 207,
702
+ "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
703
+ "label": "__gap",
704
+ "offset": 0,
705
+ "slot": "102",
706
+ "type": "t_array(t_uint256)49_storage"
707
+ },
708
+ {
709
+ "astId": 5289,
710
+ "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
711
+ "label": "_accessControlManager",
712
+ "offset": 0,
713
+ "slot": "151",
714
+ "type": "t_contract(IAccessControlManager)5473"
715
+ },
716
+ {
717
+ "astId": 5294,
718
+ "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
719
+ "label": "__gap",
720
+ "offset": 0,
721
+ "slot": "152",
722
+ "type": "t_array(t_uint256)49_storage"
723
+ },
724
+ {
725
+ "astId": 7642,
726
+ "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
727
+ "label": "prices",
728
+ "offset": 0,
729
+ "slot": "201",
543
730
  "type": "t_mapping(t_address,t_uint256)"
544
731
  },
545
732
  {
546
- "astId": 5494,
733
+ "astId": 7648,
547
734
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
548
735
  "label": "tokenConfigs",
549
736
  "offset": 0,
550
- "slot": "102",
551
- "type": "t_mapping(t_address,t_struct(TokenConfig)5468_storage)"
737
+ "slot": "202",
738
+ "type": "t_mapping(t_address,t_struct(TokenConfig)7623_storage)"
552
739
  }
553
740
  ],
554
741
  "types": {
@@ -574,12 +761,17 @@
574
761
  "label": "bool",
575
762
  "numberOfBytes": "1"
576
763
  },
577
- "t_mapping(t_address,t_struct(TokenConfig)5468_storage)": {
764
+ "t_contract(IAccessControlManager)5473": {
765
+ "encoding": "inplace",
766
+ "label": "contract IAccessControlManager",
767
+ "numberOfBytes": "20"
768
+ },
769
+ "t_mapping(t_address,t_struct(TokenConfig)7623_storage)": {
578
770
  "encoding": "mapping",
579
771
  "key": "t_address",
580
772
  "label": "mapping(address => struct TokenConfig)",
581
773
  "numberOfBytes": "32",
582
- "value": "t_struct(TokenConfig)5468_storage"
774
+ "value": "t_struct(TokenConfig)7623_storage"
583
775
  },
584
776
  "t_mapping(t_address,t_uint256)": {
585
777
  "encoding": "mapping",
@@ -588,12 +780,12 @@
588
780
  "numberOfBytes": "32",
589
781
  "value": "t_uint256"
590
782
  },
591
- "t_struct(TokenConfig)5468_storage": {
783
+ "t_struct(TokenConfig)7623_storage": {
592
784
  "encoding": "inplace",
593
785
  "label": "struct TokenConfig",
594
786
  "members": [
595
787
  {
596
- "astId": 5461,
788
+ "astId": 7616,
597
789
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
598
790
  "label": "asset",
599
791
  "offset": 0,
@@ -601,7 +793,7 @@
601
793
  "type": "t_address"
602
794
  },
603
795
  {
604
- "astId": 5464,
796
+ "astId": 7619,
605
797
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
606
798
  "label": "feed",
607
799
  "offset": 0,
@@ -609,7 +801,7 @@
609
801
  "type": "t_address"
610
802
  },
611
803
  {
612
- "astId": 5467,
804
+ "astId": 7622,
613
805
  "contract": "contracts/oracles/ChainlinkOracle.sol:ChainlinkOracle",
614
806
  "label": "maxStalePeriod",
615
807
  "offset": 0,