@venusprotocol/oracle 1.6.11-dev.9 → 1.6.12-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +33 -10
  2. package/contracts/ResilientOracle.sol +36 -0
  3. package/contracts/oracles/BinanceOracle.sol +5 -0
  4. package/contracts/oracles/BoundValidator.sol +7 -2
  5. package/contracts/oracles/ChainlinkOracle.sol +5 -0
  6. package/contracts/oracles/PythOracle.sol +4 -2
  7. package/contracts/oracles/TwapOracle.sol +6 -1
  8. package/deployments/bscmainnet/BinanceOracle.json +45 -45
  9. package/deployments/bscmainnet/BinanceOracle_Implementation.json +34 -34
  10. package/deployments/bscmainnet/BinanceOracle_Proxy.json +43 -43
  11. package/deployments/bscmainnet/BoundValidator.json +46 -46
  12. package/deployments/bscmainnet/BoundValidator_Implementation.json +44 -52
  13. package/deployments/bscmainnet/BoundValidator_Proxy.json +43 -43
  14. package/deployments/bscmainnet/ChainlinkOracle.json +46 -52
  15. package/deployments/bscmainnet/ChainlinkOracle_Implementation.json +45 -51
  16. package/deployments/bscmainnet/ChainlinkOracle_Proxy.json +43 -43
  17. package/deployments/bscmainnet/DefaultProxyAdmin.json +15 -15
  18. package/deployments/bscmainnet/PythOracle.json +61 -54
  19. package/deployments/bscmainnet/PythOracle_Implementation.json +54 -48
  20. package/deployments/bscmainnet/PythOracle_Proxy.json +52 -51
  21. package/deployments/bscmainnet/ResilientOracle.json +47 -52
  22. package/deployments/bscmainnet/ResilientOracle_Implementation.json +62 -65
  23. package/deployments/bscmainnet/ResilientOracle_Proxy.json +45 -45
  24. package/deployments/bscmainnet/TwapOracle.json +67 -67
  25. package/deployments/bscmainnet/TwapOracle_Implementation.json +83 -83
  26. package/deployments/bscmainnet/TwapOracle_Proxy.json +44 -44
  27. package/deployments/bscmainnet/solcInputs/{3c9df0f4b407c3d8079629dd6ddb913e.json → aae9f1601b873a5a4704ede73ede10cb.json} +9 -54
  28. package/deployments/bsctestnet/BinanceOracle.json +35 -35
  29. package/deployments/bsctestnet/BinanceOracle_Implementation.json +31 -31
  30. package/deployments/bsctestnet/BinanceOracle_Proxy.json +33 -33
  31. package/deployments/bsctestnet/BoundValidator.json +36 -36
  32. package/deployments/bsctestnet/BoundValidator_Implementation.json +44 -52
  33. package/deployments/bsctestnet/BoundValidator_Proxy.json +33 -33
  34. package/deployments/bsctestnet/ChainlinkOracle.json +36 -42
  35. package/deployments/bsctestnet/ChainlinkOracle_Implementation.json +42 -48
  36. package/deployments/bsctestnet/ChainlinkOracle_Proxy.json +33 -33
  37. package/deployments/bsctestnet/DefaultProxyAdmin.json +11 -11
  38. package/deployments/bsctestnet/PythOracle.json +48 -41
  39. package/deployments/bsctestnet/PythOracle_Implementation.json +51 -45
  40. package/deployments/bsctestnet/PythOracle_Proxy.json +39 -38
  41. package/deployments/bsctestnet/ResilientOracle.json +36 -41
  42. package/deployments/bsctestnet/ResilientOracle_Implementation.json +63 -66
  43. package/deployments/bsctestnet/ResilientOracle_Proxy.json +34 -34
  44. package/deployments/bsctestnet/TwapOracle.json +56 -56
  45. package/deployments/bsctestnet/TwapOracle_Implementation.json +81 -81
  46. package/deployments/bsctestnet/TwapOracle_Proxy.json +33 -33
  47. package/deployments/bsctestnet/solcInputs/{f35da22a430a956ee338e720b5898e3d.json → 131f58942628e21632de19506977a910.json} +7 -13
  48. package/deployments/bsctestnet/solcInputs/{4769dd98af512bf3b6b6504ad0c3bd74.json → 144b49e8aec3add79553ba273ea32d00.json} +4 -10
  49. package/deployments/bsctestnet/solcInputs/503f2e4e766f3be923fadf8030a5470f.json +78 -0
  50. package/deployments/bsctestnet/solcInputs/b39d33092f7dd383ae3a042566194132.json +75 -0
  51. package/package.json +1 -1
  52. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +0 -4
  53. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.json +0 -138
  54. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +0 -4
  55. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.json +0 -249
  56. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +0 -4
  57. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.json +0 -122
  58. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +0 -4
  59. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +0 -215
  60. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +0 -4
  61. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +0 -183
  62. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +0 -4
  63. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +0 -297
  64. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +0 -4
  65. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +0 -194
  66. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +0 -4
  67. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +0 -233
  68. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +0 -4
  69. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +0 -10
  70. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +0 -4
  71. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +0 -10
  72. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +0 -4
  73. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +0 -30
  74. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +0 -4
  75. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +0 -30
  76. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +0 -4
  77. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +0 -10
  78. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +0 -4
  79. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +0 -10
  80. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +0 -4
  81. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +0 -10
  82. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +0 -4
  83. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +0 -115
  84. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +0 -4
  85. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +0 -76
  86. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +0 -4
  87. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +0 -24
  88. package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +0 -4
  89. package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.json +0 -63
  90. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +0 -4
  91. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +0 -10
  92. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +0 -4
  93. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +0 -24
  94. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +0 -4
  95. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +0 -369
  96. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +0 -4
  97. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +0 -181
  98. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +0 -4
  99. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +0 -282
  100. package/artifacts/build-info/0137d0ff3ae413641739f9f6322cc2b3.json +0 -1
  101. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +0 -4
  102. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +0 -617
  103. package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +0 -4
  104. package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.json +0 -79
  105. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +0 -4
  106. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +0 -40
  107. package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +0 -4
  108. package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.json +0 -30
  109. package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +0 -4
  110. package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +0 -43
  111. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +0 -4
  112. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.json +0 -49
  113. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.dbg.json +0 -4
  114. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.json +0 -30
  115. package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +0 -4
  116. package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.json +0 -545
  117. package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +0 -4
  118. package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.json +0 -446
  119. package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +0 -4
  120. package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.json +0 -10
  121. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.dbg.json +0 -4
  122. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.json +0 -30
  123. package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +0 -4
  124. package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.json +0 -246
  125. package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +0 -4
  126. package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.json +0 -10
  127. package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +0 -4
  128. package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.json +0 -60
  129. package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +0 -4
  130. package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.json +0 -10
  131. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +0 -4
  132. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +0 -342
  133. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +0 -4
  134. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +0 -392
  135. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +0 -4
  136. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +0 -462
  137. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +0 -4
  138. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +0 -445
  139. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +0 -4
  140. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +0 -663
  141. package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +0 -4
  142. package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.json +0 -116
  143. package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +0 -4
  144. package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.json +0 -144
  145. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +0 -4
  146. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +0 -144
  147. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +0 -4
  148. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +0 -163
  149. package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +0 -4
  150. package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.json +0 -163
  151. package/artifacts/contracts/test/AccessControlManager.sol/AccessControlManagerScenario.dbg.json +0 -4
  152. package/artifacts/contracts/test/AccessControlManager.sol/AccessControlManagerScenario.json +0 -364
  153. package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +0 -4
  154. package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.json +0 -328
  155. package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +0 -4
  156. package/artifacts/contracts/test/MockPyth.sol/MockPyth.json +0 -684
  157. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +0 -4
  158. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.json +0 -95
  159. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +0 -4
  160. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.json +0 -72
  161. package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +0 -4
  162. package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.json +0 -306
  163. package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +0 -4
  164. package/artifacts/contracts/test/PancakePairHarness.sol/Math.json +0 -10
  165. package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +0 -4
  166. package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.json +0 -158
  167. package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +0 -4
  168. package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.json +0 -10
  169. package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +0 -4
  170. package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.json +0 -346
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "0x786B9a0E499aD119710fb71e3bAB9a2E6077BD40",
2
+ "address": "0xfE872ddeAe0A53486c25ed882786D592e302d80C",
3
3
  "abi": [
4
4
  {
5
5
  "inputs": [
@@ -12,6 +12,11 @@
12
12
  "internalType": "address",
13
13
  "name": "vaiAddress",
14
14
  "type": "address"
15
+ },
16
+ {
17
+ "internalType": "contract BoundValidatorInterface",
18
+ "name": "_boundValidator",
19
+ "type": "address"
15
20
  }
16
21
  ],
17
22
  "stateMutability": "nonpayable",
@@ -383,11 +388,6 @@
383
388
  },
384
389
  {
385
390
  "inputs": [
386
- {
387
- "internalType": "contract BoundValidatorInterface",
388
- "name": "_boundValidator",
389
- "type": "address"
390
- },
391
391
  {
392
392
  "internalType": "address",
393
393
  "name": "accessControlManager_",
@@ -608,39 +608,43 @@
608
608
  "type": "function"
609
609
  }
610
610
  ],
611
- "transactionHash": "0xa9edc275717a6ad0b6c45794ac3fe73e4a8dc83228056147ee9cda7e889f877a",
611
+ "transactionHash": "0x6612750d01a13fb2c84521dd776a3d23b857612a08c83afbe2b6648bfcfc54a5",
612
612
  "receipt": {
613
613
  "to": null,
614
614
  "from": "0xa05f990d647287e4E84715b813BC000aEA970467",
615
- "contractAddress": "0x786B9a0E499aD119710fb71e3bAB9a2E6077BD40",
615
+ "contractAddress": "0xfE872ddeAe0A53486c25ed882786D592e302d80C",
616
616
  "transactionIndex": 64,
617
- "gasUsed": "1858869",
618
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000001000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400",
619
- "blockHash": "0x4bb3ddbf1943d197cd25bc842989f1145ceaa79210284c007ee61fe122327c8a",
620
- "transactionHash": "0xa9edc275717a6ad0b6c45794ac3fe73e4a8dc83228056147ee9cda7e889f877a",
617
+ "gasUsed": "1819695",
618
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000800000040000000000000000000000000000000000000000000000000000000000000000000",
619
+ "blockHash": "0xccbfff1b1981808ac1a975e206506779cee760a558049b5108f252ea5d6b0441",
620
+ "transactionHash": "0x6612750d01a13fb2c84521dd776a3d23b857612a08c83afbe2b6648bfcfc54a5",
621
621
  "logs": [
622
622
  {
623
623
  "transactionIndex": 64,
624
- "blockNumber": 27541059,
625
- "transactionHash": "0xa9edc275717a6ad0b6c45794ac3fe73e4a8dc83228056147ee9cda7e889f877a",
626
- "address": "0x786B9a0E499aD119710fb71e3bAB9a2E6077BD40",
624
+ "blockNumber": 28525791,
625
+ "transactionHash": "0x6612750d01a13fb2c84521dd776a3d23b857612a08c83afbe2b6648bfcfc54a5",
626
+ "address": "0xfE872ddeAe0A53486c25ed882786D592e302d80C",
627
627
  "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
628
628
  "data": "0x00000000000000000000000000000000000000000000000000000000000000ff",
629
- "logIndex": 166,
630
- "blockHash": "0x4bb3ddbf1943d197cd25bc842989f1145ceaa79210284c007ee61fe122327c8a"
629
+ "logIndex": 153,
630
+ "blockHash": "0xccbfff1b1981808ac1a975e206506779cee760a558049b5108f252ea5d6b0441"
631
631
  }
632
632
  ],
633
- "blockNumber": 27541059,
634
- "cumulativeGasUsed": "7693935",
633
+ "blockNumber": 28525791,
634
+ "cumulativeGasUsed": "7668931",
635
635
  "status": 1,
636
636
  "byzantium": true
637
637
  },
638
- "args": ["0xA07c5b74C9B40447a954e1466938b865b6BBea36", "0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7"],
638
+ "args": [
639
+ "0xA07c5b74C9B40447a954e1466938b865b6BBea36",
640
+ "0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7",
641
+ "0x6E332fF0bB52475304494E4AE5063c1051c7d735"
642
+ ],
639
643
  "numDeployments": 1,
640
- "solcInputHash": "3c9df0f4b407c3d8079629dd6ddb913e",
641
- "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\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"role\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"enable\",\"type\":\"bool\"}],\"name\":\"OracleEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"role\",\"type\":\"uint256\"}],\"name\":\"OracleSet\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"mainOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pivotOracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fallbackOracle\",\"type\":\"address\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BNB_ADDR\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INVALID_PRICE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"boundValidator\",\"outputs\":[{\"internalType\":\"contract BoundValidatorInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"enable\",\"type\":\"bool\"}],\"name\":\"enableOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"getTokenConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":\"contract BoundValidatorInterface\",\"name\":\"_boundValidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"updatePrice\",\"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\"}},\"enableOracle(address,uint8,bool)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress error is thrown if asset address is nullTokenConfigExistance error is thrown if token config is not set\",\"params\":{\"asset\":\"Asset address\",\"enable\":\"Enabled boolean of the oracle\",\"role\":\"Oracle role\"}},\"getOracle(address,uint8)\":{\"params\":{\"role\":\"Oracle role\",\"vToken\":\"vToken address\"},\"returns\":{\"enabled\":\"Enabled flag of the oracle based on token config\",\"oracle\":\"Oracle address based on role\"}},\"getTokenConfig(address)\":{\"details\":\"Gets token config by vToken address\",\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"tokenConfig Config for the vToken\"}},\"getUnderlyingPrice(address)\":{\"custom:error\":\"Paused error is thrown when resilent oracle is pausedInvalid resilient oracle price error is thrown if fetched prices from oracle is invalid\",\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price USD price in scaled decimal places.\"}},\"initialize(address,address)\":{\"params\":{\"_boundValidator\":\"Address of the bound validator contract\",\"accessControlManager_\":\"Address of the access control manager contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only Governance\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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\"}},\"setOracle(address,address,uint8)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Null address error if main-role oracle address is nullNotNullAddress error is thrown if asset address is nullTokenConfigExistance error is thrown if token config is not set\",\"custom:event\":\"Emits OracleSet event with asset address, oracle address and role of the oracle for the asset\",\"details\":\"Supplied vToken **must** exist and main oracle may not be null\",\"params\":{\"asset\":\"Asset address\",\"oracle\":\"Oracle address\",\"role\":\"Oracle role\"}},\"setTokenConfig((address,address[3],bool[3]))\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress is thrown if asset address is nullNotNullAddress is thrown if main-role oracle address for asset is null\",\"custom:event\":\"Emits TokenConfigAdded event when vToken config is set successfully by governnace\",\"details\":\"main oracle **must not** be a null address\",\"params\":{\"tokenConfig\":\"Token config struct\"}},\"setTokenConfigs((address,address[3],bool[3])[])\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Throws a length error if the lenght of the token configs array is 0\",\"params\":{\"tokenConfigs_\":\"Token config array\"}},\"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.\"},\"unpause()\":{\"custom:access\":\"Only Governance\"},\"updatePrice(address)\":{\"details\":\"This function should always be called before calling getUnderlyingPrice\",\"params\":{\"vToken\":\"vToken address\"}}},\"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\"},\"OracleEnabled(address,uint256,bool)\":{\"notice\":\"Event emitted when an oracle is enabled or disabled\"},\"OracleSet(address,address,uint256)\":{\"notice\":\"Event emitted when an oracle is set\"}},\"kind\":\"user\",\"methods\":{\"BNB_ADDR()\":{\"notice\":\"Set this as asset address for BNB. This is the underlying for vBNB\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract. Sets immutable variables.\"},\"enableOracle(address,uint8,bool)\":{\"notice\":\"Enables/ disables oracle for the input vToken, input vToken **must** exist\"},\"getOracle(address,uint8)\":{\"notice\":\"Gets oracle and enabled status by vToken address\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Gets price of the underlying asset for a given vToken. Validation flow: - Check if the oracle is paused globally - Validate price from main oracle against pivot oracle - Validate price from fallback oracle against pivot oracle or main oracle if the first validation failed In the case that the pivot oracle is not available but main price is available and validation is successful, main oracle price is returned.\"},\"initialize(address,address)\":{\"notice\":\"Initializes the contract admin and sets the BoundValidator contract address\"},\"pause()\":{\"notice\":\"Pauses oracle\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setOracle(address,address,uint8)\":{\"notice\":\"Sets oracle for a given vToken and role.\"},\"setTokenConfig((address,address[3],bool[3]))\":{\"notice\":\"Sets/resets single token configs.\"},\"setTokenConfigs((address,address[3],bool[3])[])\":{\"notice\":\"Batch sets token configs\"},\"unpause()\":{\"notice\":\"Unpauses oracle\"},\"updatePrice(address)\":{\"notice\":\"Updates the pivot oracle price. Currently using TWAP\"},\"vBnb()\":{\"notice\":\"vBNB address\"},\"vai()\":{\"notice\":\"VAI address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ResilientOracle.sol\":\"ResilientOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() external {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd712fb45b3ea0ab49679164e3895037adc26ce12879d5184feb040e01c1c07a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.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\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.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 \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title Venus Access Control Contract.\\n * @dev The AccessControlledV8 contract is a wrapper around the OpenZeppelin AccessControl contract\\n * It provides a standardized way to control access to methods within the Venus Smart Contract Ecosystem.\\n * The contract allows the owner to set an AccessControlManager contract address.\\n * It can restrict method calls based on the sender's role and the method's signature.\\n */\\n\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x618d942756b93e02340a42f3c80aa99fc56be1a96861f5464dc23a76bf30b3a5\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x41deef84d1839590b243b66506691fde2fb938da01eabde53e82d3b8316fdaf9\",\"license\":\"BSD-3-Clause\"},\"contracts/ResilientOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n// SPDX-FileCopyrightText: 2022 Venus\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"./interfaces/VBep20Interface.sol\\\";\\nimport \\\"./interfaces/OracleInterface.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\n\\ncontract ResilientOracle is PausableUpgradeable, AccessControlledV8, ResilientOracleInterface {\\n /**\\n * @dev Oracle roles:\\n * **main**: The most trustworthy price source\\n * **pivot**: Price oracle used as a loose sanity checker\\n * **fallback**: The backup source when main oracle price is invalidated\\n */\\n enum OracleRole {\\n MAIN,\\n PIVOT,\\n FALLBACK\\n }\\n\\n struct TokenConfig {\\n /// @notice asset address\\n address asset;\\n /// @notice `oracles` stores the oracles based on their role in the following order:\\n /// [main, pivot, fallback],\\n /// It can be indexed with the corresponding enum OracleRole value\\n address[3] oracles;\\n /// @notice `enableFlagsForOracles` stores the enabled state\\n /// for each oracle in the same order as `oracles`\\n bool[3] enableFlagsForOracles;\\n }\\n\\n uint256 public constant INVALID_PRICE = 0;\\n\\n /// @notice vBNB address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vBnb;\\n\\n /// @notice VAI address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vai;\\n\\n /// @notice Set this as asset address for BNB. This is the underlying for vBNB\\n address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n BoundValidatorInterface public boundValidator;\\n\\n mapping(address => TokenConfig) private tokenConfigs;\\n\\n event TokenConfigAdded(\\n address indexed asset,\\n address indexed mainOracle,\\n address indexed pivotOracle,\\n address fallbackOracle\\n );\\n\\n /// Event emitted when an oracle is set\\n event OracleSet(address indexed asset, address indexed oracle, uint256 indexed role);\\n\\n /// Event emitted when an oracle is enabled or disabled\\n event OracleEnabled(address indexed asset, uint256 indexed role, bool indexed enable);\\n\\n /**\\n * @notice Checks whether an address is null or not\\n */\\n modifier notNullAddress(address someone) {\\n if (someone == address(0)) revert(\\\"can't be zero address\\\");\\n _;\\n }\\n\\n /**\\n * @notice Checks whether token config exists by checking whether vToken is null address\\n * @dev vToken can't be null, so it's suitable to be used to check the validity of the config\\n * @param asset asset address\\n */\\n modifier checkTokenConfigExistence(address asset) {\\n if (tokenConfigs[asset].asset == address(0)) revert(\\\"token config must exist\\\");\\n _;\\n }\\n\\n /// @notice Constructor for the implementation contract. Sets immutable variables.\\n /// @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) {\\n vBnb = vBnbAddress;\\n vai = vaiAddress;\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Pauses oracle\\n * @custom:access Only Governance\\n */\\n function pause() external {\\n _checkAccessAllowed(\\\"pause()\\\");\\n _pause();\\n }\\n\\n /**\\n * @notice Unpauses oracle\\n * @custom:access Only Governance\\n */\\n function unpause() external {\\n _checkAccessAllowed(\\\"unpause()\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Batch sets token configs\\n * @param tokenConfigs_ Token config array\\n * @custom:access Only Governance\\n * @custom:error Throws a length error if the lenght of the token configs array is 0\\n */\\n function setTokenConfigs(TokenConfig[] memory tokenConfigs_) external {\\n _checkAccessAllowed(\\\"setTokenConfigs(TokenConfig[])\\\");\\n if (tokenConfigs_.length == 0) revert(\\\"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 Sets oracle for a given vToken and role.\\n * @dev Supplied vToken **must** exist and main oracle may not be null\\n * @param asset Asset address\\n * @param oracle Oracle address\\n * @param role Oracle role\\n * @custom:access Only Governance\\n * @custom:error Null address error if main-role oracle address is null\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error TokenConfigExistance error is thrown if token config is not set\\n * @custom:event Emits OracleSet event with asset address, oracle address and role of the oracle for the asset\\n */\\n function setOracle(\\n address asset,\\n address oracle,\\n OracleRole role\\n ) external notNullAddress(asset) checkTokenConfigExistence(asset) {\\n _checkAccessAllowed(\\\"setOracle(address,address,OracleRole)\\\");\\n if (oracle == address(0) && role == OracleRole.MAIN) revert(\\\"can't set zero address to main oracle\\\");\\n tokenConfigs[asset].oracles[uint256(role)] = oracle;\\n emit OracleSet(asset, oracle, uint256(role));\\n }\\n\\n /**\\n * @notice Enables/ disables oracle for the input vToken, input vToken **must** exist\\n * @param asset Asset address\\n * @param role Oracle role\\n * @param enable Enabled boolean of the oracle\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error TokenConfigExistance error is thrown if token config is not set\\n */\\n function enableOracle(\\n address asset,\\n OracleRole role,\\n bool enable\\n ) external notNullAddress(asset) checkTokenConfigExistence(asset) {\\n _checkAccessAllowed(\\\"enableOracle(address,OracleRole,bool)\\\");\\n tokenConfigs[asset].enableFlagsForOracles[uint256(role)] = enable;\\n emit OracleEnabled(asset, uint256(role), enable);\\n }\\n\\n /**\\n * @notice Updates the pivot oracle price. Currently using TWAP\\n * @dev This function should always be called before calling getUnderlyingPrice\\n * @param vToken vToken address\\n */\\n function updatePrice(address vToken) external override {\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n if (pivotOracle != address(0) && pivotOracleEnabled) {\\n //if **pivot** oracle is PythOrcle it will revert so we need to catch the revert\\n try TwapInterface(pivotOracle).updateTwap(vToken) {} catch {}\\n }\\n }\\n\\n /**\\n * @dev Gets token config by vToken address\\n * @param vToken vToken address\\n * @return tokenConfig Config for the vToken\\n */\\n function getTokenConfig(address vToken) external view returns (TokenConfig memory) {\\n address asset = _getUnderlyingAsset(vToken);\\n return tokenConfigs[asset];\\n }\\n\\n /**\\n * @notice Gets price of the underlying asset for a given vToken. Validation flow:\\n * - Check if the oracle is paused globally\\n * - Validate price from main oracle against pivot oracle\\n * - Validate price from fallback oracle against pivot oracle or main oracle if the first validation failed\\n * In the case that the pivot oracle is not available but main price is available and validation is successful,\\n * main oracle price is returned.\\n * @param vToken vToken address\\n * @return price USD price in scaled decimal places.\\n * @custom:error Paused error is thrown when resilent oracle is paused\\n * @custom:error Invalid resilient oracle price error is thrown if fetched prices from oracle is invalid\\n */\\n function getUnderlyingPrice(address vToken) external view override returns (uint256) {\\n if (paused()) revert(\\\"resilient oracle is paused\\\");\\n uint256 pivotPrice = INVALID_PRICE;\\n\\n // Get pivot oracle price, Invalid price if not available or error\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n if (pivotOracleEnabled && pivotOracle != address(0)) {\\n try OracleInterface(pivotOracle).getUnderlyingPrice(vToken) returns (uint256 pricePivot) {\\n pivotPrice = pricePivot;\\n } catch {}\\n }\\n\\n // Compare main price and pivot price, return main price and if validation was successful\\n // note: In case pivot oracle is not available but main price is available and\\n // validation is successful, the main oracle price is returned.\\n (uint256 mainPrice, bool validatedPivotMain) = _getMainOraclePrice(\\n vToken,\\n pivotPrice,\\n pivotOracleEnabled && pivotOracle != address(0)\\n );\\n if (mainPrice != INVALID_PRICE && validatedPivotMain) return mainPrice;\\n\\n // Compare fallback and pivot if main oracle comparision fails with pivot\\n // Return fallback price when fallback price is validated successfully with pivot oracle\\n (uint256 fallbackPrice, bool validatedPivotFallback) = _getFallbackOraclePrice(vToken, pivotPrice);\\n if (fallbackPrice != INVALID_PRICE && validatedPivotFallback) return fallbackPrice;\\n\\n // Lastly compare main price and fallback price\\n if (\\n mainPrice != INVALID_PRICE &&\\n fallbackPrice != INVALID_PRICE &&\\n boundValidator.validatePriceWithAnchorPrice(vToken, fallbackPrice, mainPrice)\\n ) {\\n return mainPrice;\\n }\\n\\n revert(\\\"invalid resilient oracle price\\\");\\n }\\n\\n /**\\n * @notice Initializes the contract admin and sets the BoundValidator contract address\\n * @param _boundValidator Address of the bound validator contract\\n * @param accessControlManager_ Address of the access control manager contract\\n */\\n function initialize(BoundValidatorInterface _boundValidator, address accessControlManager_) public initializer {\\n if (address(_boundValidator) == address(0)) revert(\\\"invalid bound validator address\\\");\\n boundValidator = _boundValidator;\\n\\n __AccessControlled_init(accessControlManager_);\\n __Pausable_init();\\n }\\n\\n /**\\n * @notice Sets/resets single token configs.\\n * @dev main oracle **must not** be a null address\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress is thrown if asset address is null\\n * @custom:error NotNullAddress is thrown if main-role oracle address for asset is null\\n * @custom:event Emits TokenConfigAdded event when vToken config is set successfully by governnace\\n */\\n function setTokenConfig(\\n TokenConfig memory tokenConfig\\n ) public notNullAddress(tokenConfig.asset) notNullAddress(tokenConfig.oracles[uint256(OracleRole.MAIN)]) {\\n _checkAccessAllowed(\\\"setTokenConfig(TokenConfig)\\\");\\n\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(\\n tokenConfig.asset,\\n tokenConfig.oracles[uint256(OracleRole.MAIN)],\\n tokenConfig.oracles[uint256(OracleRole.PIVOT)],\\n tokenConfig.oracles[uint256(OracleRole.FALLBACK)]\\n );\\n }\\n\\n /**\\n * @notice Gets oracle and enabled status by vToken address\\n * @param vToken vToken address\\n * @param role Oracle role\\n * @return oracle Oracle address based on role\\n * @return enabled Enabled flag of the oracle based on token config\\n */\\n function getOracle(address vToken, OracleRole role) public view returns (address oracle, bool enabled) {\\n address asset = _getUnderlyingAsset(vToken);\\n\\n oracle = tokenConfigs[asset].oracles[uint256(role)];\\n enabled = tokenConfigs[asset].enableFlagsForOracles[uint256(role)];\\n }\\n\\n /**\\n * @notice Gets underlying asset price for the provided vToken\\n * @dev This function won't revert when price is 0, because the fallback oracle may still be\\n * able to fetch a correct price\\n * @param vToken vToken address\\n * @param pivotPrice Pivot oracle price\\n * @param pivotEnabled If pivot oracle is not empty and enabled\\n * @return price USD price in scaled decimals\\n * e.g. vToken decimals is 8 then price is returned as 10**18 * 10**(18-8) = 10**28 decimals\\n * @return pivotValidated Boolean representing if the validation of main oracle price\\n * and pivot oracle price were successful\\n * @custom:error Invalid price error is thrown if main oracle fails to fetch price of underlying asset\\n * @custom:error Invalid price error is thrown if main oracle is not enabled or main oracle\\n * address is null\\n */\\n function _getMainOraclePrice(\\n address vToken,\\n uint256 pivotPrice,\\n bool pivotEnabled\\n ) internal view returns (uint256, bool) {\\n (address mainOracle, bool mainOracleEnabled) = getOracle(vToken, OracleRole.MAIN);\\n if (mainOracleEnabled && mainOracle != address(0)) {\\n try OracleInterface(mainOracle).getUnderlyingPrice(vToken) returns (uint256 mainOraclePrice) {\\n if (!pivotEnabled) {\\n return (mainOraclePrice, true);\\n }\\n if (pivotPrice == INVALID_PRICE) {\\n return (mainOraclePrice, false);\\n }\\n return (\\n mainOraclePrice,\\n boundValidator.validatePriceWithAnchorPrice(vToken, mainOraclePrice, pivotPrice)\\n );\\n } catch {\\n return (INVALID_PRICE, false);\\n }\\n }\\n\\n return (INVALID_PRICE, false);\\n }\\n\\n /**\\n * @dev This function won't revert when the price is 0 because getUnderlyingPrice checks if price is > 0\\n * @param vToken vToken address\\n * @return price USD price in 18 decimals\\n * @return pivotValidated Boolean representing if the validation of fallback oracle price\\n * and pivot oracle price were successfull\\n * @custom:error Invalid price error is thrown if fallback oracle fails to fetch price of underlying asset\\n * @custom:error Invalid price error is thrown if fallback oracle is not enabled or fallback oracle\\n * address is null\\n */\\n function _getFallbackOraclePrice(address vToken, uint256 pivotPrice) internal view returns (uint256, bool) {\\n (address fallbackOracle, bool fallbackEnabled) = getOracle(vToken, OracleRole.FALLBACK);\\n if (fallbackEnabled && fallbackOracle != address(0)) {\\n try OracleInterface(fallbackOracle).getUnderlyingPrice(vToken) returns (uint256 fallbackOraclePrice) {\\n if (pivotPrice == INVALID_PRICE) {\\n return (fallbackOraclePrice, false);\\n }\\n return (\\n fallbackOraclePrice,\\n boundValidator.validatePriceWithAnchorPrice(vToken, fallbackOraclePrice, pivotPrice)\\n );\\n } catch {\\n return (INVALID_PRICE, false);\\n }\\n }\\n\\n return (INVALID_PRICE, false);\\n }\\n\\n /**\\n * @dev This function returns the underlying asset of a vToken\\n * @param vToken vToken address\\n * @return asset underlying asset address\\n */\\n function _getUnderlyingAsset(address vToken) internal view returns (address asset) {\\n if (address(vToken) == vBnb) {\\n asset = BNB_ADDR;\\n } else if (address(vToken) == vai) {\\n asset = vai;\\n } else {\\n asset = VBep20Interface(vToken).underlying();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd8268b7c302482a49ada88d9f2bf47f2cfb5bae020c01d20f3b2452f6abfb9c3\",\"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\"}},\"version\":1}",
642
- "bytecode": "0x60c06040523480156200001157600080fd5b506040516200222238038062002222833981016040819052620000349162000193565b816001600160a01b038116620000915760405162461bcd60e51b815260206004820152601560248201527f63616e2774206265207a65726f2061646472657373000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03808416608052821660a052620000ae620000b7565b505050620001cb565b600054610100900460ff1615620001215760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000088565b60005460ff908116101562000174576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b03811681146200018e57600080fd5b919050565b60008060408385031215620001a757600080fd5b620001b28362000176565b9150620001c26020840162000176565b90509250929050565b60805160a05161201c62000206600039600081816102fb0152818161137201526113ac01526000818161022c015261131e015261201c6000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806379ba5097116100c3578063b4a0bdf31161007c578063b4a0bdf3146102e5578063b62e4c92146102f6578063cb67e3b11461031d578063e30c39781461033d578063f2fde38b1461034e578063fc57d4df1461036157600080fd5b806379ba50971461026c5780638456cb59146102745780638b855da41461027c5780638da5cb5b146102ae57806396e85ced146102bf578063a6b1344a146102d257600080fd5b8063485cc95511610115578063485cc955146101eb5780634b932b8f146101fe5780634bf39cba146102115780635ba3792d146102275780635c975abb1461024e578063715018a61461026457600080fd5b80630e32cb861461015d5780632cfa387114610172578063333a21b01461018557806333d33494146101985780633e83b6b8146101c85780633f4ba83a146101e3575b600080fd5b61017061016b3660046119e8565b610374565b005b610170610180366004611b7a565b610388565b610170610193366004611c2a565b610454565b60fb546101ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101ab73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6101706105a6565b6101706101f9366004611c46565b6105da565b61017061020c366004611c8e565b610766565b610219600081565b6040519081526020016101bf565b6101ab7f000000000000000000000000000000000000000000000000000000000000000081565b60335460ff1660405190151581526020016101bf565b6101706108bf565b6101706108d1565b610170610948565b61028f61028a366004611cd7565b610978565b604080516001600160a01b0390931683529015156020830152016101bf565b6065546001600160a01b03166101ab565b6101706102cd3660046119e8565b610a2a565b6101706102e0366004611d0c565b610ac6565b60c9546001600160a01b03166101ab565b6101ab7f000000000000000000000000000000000000000000000000000000000000000081565b61033061032b3660046119e8565b610cab565b6040516101bf9190611d53565b6097546001600160a01b03166101ab565b61017061035c3660046119e8565b610d8d565b61021961036f3660046119e8565b610dfe565b61037c61104e565b610385816110a8565b50565b6103c66040518060400160405280601e81526020017f736574546f6b656e436f6e6669677328546f6b656e436f6e6669675b5d29000081525061116d565b80516000036104105760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b8181101561044f5761043f83828151811061043257610432611dce565b6020026020010151610454565b61044881611de4565b9050610415565b505050565b80516001600160a01b03811661047c5760405162461bcd60e51b815260040161040790611e0b565b6020820151516001600160a01b0381166104a85760405162461bcd60e51b815260040161040790611e0b565b6104e66040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e66696729000000000081525061116d565b82516001600160a01b03908116600090815260fc60209081526040909120855181546001600160a01b03191693169290921782558401518491906105309060018301906003611886565b50604082015161054690600483019060036118de565b505050602083810151808201518151865160409384015193516001600160a01b039485168152928416949184169316917fa51ad01e2270c314a7b78f0c60fe66c723f2d06c121d63fcdce776e654878fc1910160405180910390a4505050565b6105d060405180604001604052806009815260200168756e7061757365282960b81b81525061116d565b6105d861120b565b565b600054610100900460ff16158080156105fa5750600054600160ff909116105b806106145750303b158015610614575060005460ff166001145b6106775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610407565b6000805460ff19166001179055801561069a576000805461ff0019166101001790555b6001600160a01b0383166106f05760405162461bcd60e51b815260206004820152601f60248201527f696e76616c696420626f756e642076616c696461746f722061646472657373006044820152606401610407565b60fb80546001600160a01b0319166001600160a01b0385161790556107148261125d565b61071c611295565b801561044f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b826001600160a01b03811661078d5760405162461bcd60e51b815260040161040790611e0b565b6001600160a01b03808516600090815260fc60205260409020548591166107f05760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b6044820152606401610407565b610811604051806060016040528060258152602001611f9d6025913961116d565b6001600160a01b038516600090815260fc60205260409020839060040185600281111561084057610840611e3a565b6003811061085057610850611dce565b602091828204019190066101000a81548160ff02191690831515021790555082151584600281111561088457610884611e3a565b6040516001600160a01b038816907fcf3cad1ec87208efbde5d82a0557484a78d4182c3ad16926a5463bc1f7234b3d90600090a45050505050565b6108c761104e565b6105d860006112c4565b60975433906001600160a01b0316811461093f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610407565b610385816112c4565b610970604051806040016040528060078152602001667061757365282960c81b81525061116d565b6105d86112dd565b60008060006109868561131a565b6001600160a01b038116600090815260fc602052604090209091506001018460028111156109b6576109b6611e3a565b600381106109c6576109c6611dce565b01546001600160a01b03828116600090815260fc60205260409020911693506004018460028111156109fa576109fa611e3a565b60038110610a0a57610a0a611dce565b602091828204019190069054906101000a900460ff169150509250929050565b600080610a38836001610978565b90925090506001600160a01b03821615801590610a525750805b1561044f5760405163725068a560e01b81526001600160a01b03848116600483015283169063725068a5906024016020604051808303816000875af1925050508015610abb575060408051601f3d908101601f19168201909252610ab891810190611e50565b60015b1561044f5750505050565b826001600160a01b038116610aed5760405162461bcd60e51b815260040161040790611e0b565b6001600160a01b03808516600090815260fc6020526040902054859116610b505760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b6044820152606401610407565b610b71604051806060016040528060258152602001611fc26025913961116d565b6001600160a01b038416158015610b9957506000836002811115610b9757610b97611e3a565b145b15610bf45760405162461bcd60e51b815260206004820152602560248201527f63616e277420736574207a65726f206164647265737320746f206d61696e206f6044820152647261636c6560d81b6064820152608401610407565b6001600160a01b038516600090815260fc602052604090208490600101846002811115610c2357610c23611e3a565b60038110610c3357610c33611dce565b0180546001600160a01b0319166001600160a01b0392909216919091179055826002811115610c6457610c64611e3a565b846001600160a01b0316866001600160a01b03167fea681d3efb830ef032a9c29a7215b5ceeeb546250d2c463dbf87817aecda1bf160405160405180910390a45050505050565b610cb361196b565b6000610cbe8361131a565b6001600160a01b03818116600090815260fc6020908152604091829020825160608082018552825490951681528351948501938490529495509290840191600184019060039082845b81546001600160a01b03168152600190910190602001808311610d07575050509183525050604080516060810191829052602090920191906004840190600390826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610d4c579050505050505081525050915050919050565b610d9561104e565b609780546001600160a01b0383166001600160a01b03199091168117909155610dc66065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000610e0c60335460ff1690565b15610e595760405162461bcd60e51b815260206004820152601a60248201527f726573696c69656e74206f7261636c65206973207061757365640000000000006044820152606401610407565b60008080610e68856001610978565b91509150808015610e8157506001600160a01b03821615155b15610ef05760405163fc57d4df60e01b81526001600160a01b03868116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610ee8575060408051601f3d908101601f19168201909252610ee591810190611e50565b60015b15610ef05792505b600080610f128786858015610f0d57506001600160a01b03871615155b61143a565b9150915060008214158015610f245750805b15610f33575095945050505050565b600080610f40898861159d565b9150915060008214158015610f525750805b15610f635750979650505050505050565b8315801590610f7157508115155b8015610ff4575060fb54604051634be3819f60e11b81526001600160a01b038b811660048301526024820185905260448201879052909116906397c7033e90606401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190611e69565b15611006575091979650505050505050565b60405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726573696c69656e74206f7261636c6520707269636500006044820152606401610407565b6065546001600160a01b031633146105d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610407565b6001600160a01b03811661110c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b6064820152608401610407565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab906111a09033908690600401611ed3565b602060405180830381865afa1580156111bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e19190611e69565b90508061120757333083604051634a3fa29360e01b815260040161040793929190611eff565b5050565b6112136116ec565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff166112845760405162461bcd60e51b815260040161040790611f34565b61128c611735565b61038581611764565b600054610100900460ff166112bc5760405162461bcd60e51b815260040161040790611f34565b6105d861178b565b609780546001600160a01b0319169055610385816117be565b6112e5611810565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112403390565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031603611370575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036113d057507f0000000000000000000000000000000000000000000000000000000000000000919050565b816001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114329190611f7f565b90505b919050565b60008060008061144b876000610978565b9150915080801561146457506001600160a01b03821615155b1561158b5760405163fc57d4df60e01b81526001600160a01b03888116600483015283169063fc57d4df90602401602060405180830381865afa9250505080156114cb575060408051601f3d908101601f191682019092526114c891810190611e50565b60015b6114dd57600080935093505050611595565b856114f057935060019250611595915050565b8661150357935060009250611595915050565b60fb54604051634be3819f60e11b81526001600160a01b038a8116600483015260248201849052604482018a9052839216906397c7033e90606401602060405180830381865afa15801561155b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157f9190611e69565b94509450505050611595565b6000809350935050505b935093915050565b6000806000806115ae866002610978565b915091508080156115c757506001600160a01b03821615155b156116db5760405163fc57d4df60e01b81526001600160a01b03878116600483015283169063fc57d4df90602401602060405180830381865afa92505050801561162e575060408051601f3d908101601f1916820190925261162b91810190611e50565b60015b611640576000809350935050506116e5565b85611653579350600092506116e5915050565b60fb54604051634be3819f60e11b81526001600160a01b0389811660048301526024820184905260448201899052839216906397c7033e90606401602060405180830381865afa1580156116ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cf9190611e69565b945094505050506116e5565b6000809350935050505b9250929050565b60335460ff166105d85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610407565b600054610100900460ff1661175c5760405162461bcd60e51b815260040161040790611f34565b6105d8611856565b600054610100900460ff1661037c5760405162461bcd60e51b815260040161040790611f34565b600054610100900460ff166117b25760405162461bcd60e51b815260040161040790611f34565b6033805460ff19169055565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60335460ff16156105d85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610407565b600054610100900460ff1661187d5760405162461bcd60e51b815260040161040790611f34565b6105d8336112c4565b82600381019282156118ce579160200282015b828111156118ce57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611899565b506118da9291506119a0565b5090565b6001830191839082156118ce5791602002820160005b8382111561193157835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026118f4565b801561195e5782816101000a81549060ff0219169055600101602081600001049283019260010302611931565b50506118da9291506119a0565b604051806060016040528060006001600160a01b0316815260200161198e6119b5565b815260200161199b6119b5565b905290565b5b808211156118da57600081556001016119a1565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461038557600080fd5b6000602082840312156119fa57600080fd5b8135611a05816119d3565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611a4557611a45611a0c565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a7457611a74611a0c565b604052919050565b801515811461038557600080fd5b600082601f830112611a9b57600080fd5b611aa3611a22565b806060840185811115611ab557600080fd5b845b81811015611ad8578035611aca81611a7c565b845260209384019301611ab7565b509095945050505050565b600060e08284031215611af557600080fd5b611afd611a22565b90508135611b0a816119d3565b81526020603f83018413611b1d57600080fd5b611b25611a22565b806080850186811115611b3757600080fd5b8386015b81811015611b5b578035611b4e816119d3565b8452928401928401611b3b565b508184860152611b6b8782611a8a565b60408601525050505092915050565b60006020808385031215611b8d57600080fd5b823567ffffffffffffffff80821115611ba557600080fd5b818501915085601f830112611bb957600080fd5b813581811115611bcb57611bcb611a0c565b611bd9848260051b01611a4b565b818152848101925060e0918202840185019188831115611bf857600080fd5b938501935b82851015611c1e57611c0f8986611ae3565b84529384019392850192611bfd565b50979650505050505050565b600060e08284031215611c3c57600080fd5b611a058383611ae3565b60008060408385031215611c5957600080fd5b8235611c64816119d3565b91506020830135611c74816119d3565b809150509250929050565b80356003811061143557600080fd5b600080600060608486031215611ca357600080fd5b8335611cae816119d3565b9250611cbc60208501611c7f565b91506040840135611ccc81611a7c565b809150509250925092565b60008060408385031215611cea57600080fd5b8235611cf5816119d3565b9150611d0360208401611c7f565b90509250929050565b600080600060608486031215611d2157600080fd5b8335611d2c816119d3565b92506020840135611d3c816119d3565b9150611d4a60408501611c7f565b90509250925092565b81516001600160a01b03908116825260208084015160e0840192919081850160005b6003811015611d94578251851682529183019190830190600101611d75565b505050604085015191506080840160005b6003811015611dc4578351151582529282019290820190600101611da5565b5050505092915050565b634e487b7160e01b600052603260045260246000fd5b600060018201611e0457634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215611e6257600080fd5b5051919050565b600060208284031215611e7b57600080fd5b8151611a0581611a7c565b6000815180845260005b81811015611eac57602081850181015186830182015201611e90565b81811115611ebe576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0383168152604060208201819052600090611ef790830184611e86565b949350505050565b6001600160a01b03848116825283166020820152606060408201819052600090611f2b90830184611e86565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600060208284031215611f9157600080fd5b8151611a05816119d356fe656e61626c654f7261636c6528616464726573732c4f7261636c65526f6c652c626f6f6c297365744f7261636c6528616464726573732c616464726573732c4f7261636c65526f6c6529a2646970667358221220d74b241835f929d98046b4d1012c8086c34304506a01dc86a4aa013a2256f24764736f6c634300080d0033",
643
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101585760003560e01c806379ba5097116100c3578063b4a0bdf31161007c578063b4a0bdf3146102e5578063b62e4c92146102f6578063cb67e3b11461031d578063e30c39781461033d578063f2fde38b1461034e578063fc57d4df1461036157600080fd5b806379ba50971461026c5780638456cb59146102745780638b855da41461027c5780638da5cb5b146102ae57806396e85ced146102bf578063a6b1344a146102d257600080fd5b8063485cc95511610115578063485cc955146101eb5780634b932b8f146101fe5780634bf39cba146102115780635ba3792d146102275780635c975abb1461024e578063715018a61461026457600080fd5b80630e32cb861461015d5780632cfa387114610172578063333a21b01461018557806333d33494146101985780633e83b6b8146101c85780633f4ba83a146101e3575b600080fd5b61017061016b3660046119e8565b610374565b005b610170610180366004611b7a565b610388565b610170610193366004611c2a565b610454565b60fb546101ab906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101ab73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b6101706105a6565b6101706101f9366004611c46565b6105da565b61017061020c366004611c8e565b610766565b610219600081565b6040519081526020016101bf565b6101ab7f000000000000000000000000000000000000000000000000000000000000000081565b60335460ff1660405190151581526020016101bf565b6101706108bf565b6101706108d1565b610170610948565b61028f61028a366004611cd7565b610978565b604080516001600160a01b0390931683529015156020830152016101bf565b6065546001600160a01b03166101ab565b6101706102cd3660046119e8565b610a2a565b6101706102e0366004611d0c565b610ac6565b60c9546001600160a01b03166101ab565b6101ab7f000000000000000000000000000000000000000000000000000000000000000081565b61033061032b3660046119e8565b610cab565b6040516101bf9190611d53565b6097546001600160a01b03166101ab565b61017061035c3660046119e8565b610d8d565b61021961036f3660046119e8565b610dfe565b61037c61104e565b610385816110a8565b50565b6103c66040518060400160405280601e81526020017f736574546f6b656e436f6e6669677328546f6b656e436f6e6669675b5d29000081525061116d565b80516000036104105760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b8181101561044f5761043f83828151811061043257610432611dce565b6020026020010151610454565b61044881611de4565b9050610415565b505050565b80516001600160a01b03811661047c5760405162461bcd60e51b815260040161040790611e0b565b6020820151516001600160a01b0381166104a85760405162461bcd60e51b815260040161040790611e0b565b6104e66040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e66696729000000000081525061116d565b82516001600160a01b03908116600090815260fc60209081526040909120855181546001600160a01b03191693169290921782558401518491906105309060018301906003611886565b50604082015161054690600483019060036118de565b505050602083810151808201518151865160409384015193516001600160a01b039485168152928416949184169316917fa51ad01e2270c314a7b78f0c60fe66c723f2d06c121d63fcdce776e654878fc1910160405180910390a4505050565b6105d060405180604001604052806009815260200168756e7061757365282960b81b81525061116d565b6105d861120b565b565b600054610100900460ff16158080156105fa5750600054600160ff909116105b806106145750303b158015610614575060005460ff166001145b6106775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610407565b6000805460ff19166001179055801561069a576000805461ff0019166101001790555b6001600160a01b0383166106f05760405162461bcd60e51b815260206004820152601f60248201527f696e76616c696420626f756e642076616c696461746f722061646472657373006044820152606401610407565b60fb80546001600160a01b0319166001600160a01b0385161790556107148261125d565b61071c611295565b801561044f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b826001600160a01b03811661078d5760405162461bcd60e51b815260040161040790611e0b565b6001600160a01b03808516600090815260fc60205260409020548591166107f05760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b6044820152606401610407565b610811604051806060016040528060258152602001611f9d6025913961116d565b6001600160a01b038516600090815260fc60205260409020839060040185600281111561084057610840611e3a565b6003811061085057610850611dce565b602091828204019190066101000a81548160ff02191690831515021790555082151584600281111561088457610884611e3a565b6040516001600160a01b038816907fcf3cad1ec87208efbde5d82a0557484a78d4182c3ad16926a5463bc1f7234b3d90600090a45050505050565b6108c761104e565b6105d860006112c4565b60975433906001600160a01b0316811461093f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610407565b610385816112c4565b610970604051806040016040528060078152602001667061757365282960c81b81525061116d565b6105d86112dd565b60008060006109868561131a565b6001600160a01b038116600090815260fc602052604090209091506001018460028111156109b6576109b6611e3a565b600381106109c6576109c6611dce565b01546001600160a01b03828116600090815260fc60205260409020911693506004018460028111156109fa576109fa611e3a565b60038110610a0a57610a0a611dce565b602091828204019190069054906101000a900460ff169150509250929050565b600080610a38836001610978565b90925090506001600160a01b03821615801590610a525750805b1561044f5760405163725068a560e01b81526001600160a01b03848116600483015283169063725068a5906024016020604051808303816000875af1925050508015610abb575060408051601f3d908101601f19168201909252610ab891810190611e50565b60015b1561044f5750505050565b826001600160a01b038116610aed5760405162461bcd60e51b815260040161040790611e0b565b6001600160a01b03808516600090815260fc6020526040902054859116610b505760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b6044820152606401610407565b610b71604051806060016040528060258152602001611fc26025913961116d565b6001600160a01b038416158015610b9957506000836002811115610b9757610b97611e3a565b145b15610bf45760405162461bcd60e51b815260206004820152602560248201527f63616e277420736574207a65726f206164647265737320746f206d61696e206f6044820152647261636c6560d81b6064820152608401610407565b6001600160a01b038516600090815260fc602052604090208490600101846002811115610c2357610c23611e3a565b60038110610c3357610c33611dce565b0180546001600160a01b0319166001600160a01b0392909216919091179055826002811115610c6457610c64611e3a565b846001600160a01b0316866001600160a01b03167fea681d3efb830ef032a9c29a7215b5ceeeb546250d2c463dbf87817aecda1bf160405160405180910390a45050505050565b610cb361196b565b6000610cbe8361131a565b6001600160a01b03818116600090815260fc6020908152604091829020825160608082018552825490951681528351948501938490529495509290840191600184019060039082845b81546001600160a01b03168152600190910190602001808311610d07575050509183525050604080516060810191829052602090920191906004840190600390826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610d4c579050505050505081525050915050919050565b610d9561104e565b609780546001600160a01b0383166001600160a01b03199091168117909155610dc66065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000610e0c60335460ff1690565b15610e595760405162461bcd60e51b815260206004820152601a60248201527f726573696c69656e74206f7261636c65206973207061757365640000000000006044820152606401610407565b60008080610e68856001610978565b91509150808015610e8157506001600160a01b03821615155b15610ef05760405163fc57d4df60e01b81526001600160a01b03868116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610ee8575060408051601f3d908101601f19168201909252610ee591810190611e50565b60015b15610ef05792505b600080610f128786858015610f0d57506001600160a01b03871615155b61143a565b9150915060008214158015610f245750805b15610f33575095945050505050565b600080610f40898861159d565b9150915060008214158015610f525750805b15610f635750979650505050505050565b8315801590610f7157508115155b8015610ff4575060fb54604051634be3819f60e11b81526001600160a01b038b811660048301526024820185905260448201879052909116906397c7033e90606401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190611e69565b15611006575091979650505050505050565b60405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726573696c69656e74206f7261636c6520707269636500006044820152606401610407565b6065546001600160a01b031633146105d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610407565b6001600160a01b03811661110c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b6064820152608401610407565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab906111a09033908690600401611ed3565b602060405180830381865afa1580156111bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e19190611e69565b90508061120757333083604051634a3fa29360e01b815260040161040793929190611eff565b5050565b6112136116ec565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054610100900460ff166112845760405162461bcd60e51b815260040161040790611f34565b61128c611735565b61038581611764565b600054610100900460ff166112bc5760405162461bcd60e51b815260040161040790611f34565b6105d861178b565b609780546001600160a01b0319169055610385816117be565b6112e5611810565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586112403390565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031603611370575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036113d057507f0000000000000000000000000000000000000000000000000000000000000000919050565b816001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561140e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114329190611f7f565b90505b919050565b60008060008061144b876000610978565b9150915080801561146457506001600160a01b03821615155b1561158b5760405163fc57d4df60e01b81526001600160a01b03888116600483015283169063fc57d4df90602401602060405180830381865afa9250505080156114cb575060408051601f3d908101601f191682019092526114c891810190611e50565b60015b6114dd57600080935093505050611595565b856114f057935060019250611595915050565b8661150357935060009250611595915050565b60fb54604051634be3819f60e11b81526001600160a01b038a8116600483015260248201849052604482018a9052839216906397c7033e90606401602060405180830381865afa15801561155b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157f9190611e69565b94509450505050611595565b6000809350935050505b935093915050565b6000806000806115ae866002610978565b915091508080156115c757506001600160a01b03821615155b156116db5760405163fc57d4df60e01b81526001600160a01b03878116600483015283169063fc57d4df90602401602060405180830381865afa92505050801561162e575060408051601f3d908101601f1916820190925261162b91810190611e50565b60015b611640576000809350935050506116e5565b85611653579350600092506116e5915050565b60fb54604051634be3819f60e11b81526001600160a01b0389811660048301526024820184905260448201899052839216906397c7033e90606401602060405180830381865afa1580156116ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cf9190611e69565b945094505050506116e5565b6000809350935050505b9250929050565b60335460ff166105d85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610407565b600054610100900460ff1661175c5760405162461bcd60e51b815260040161040790611f34565b6105d8611856565b600054610100900460ff1661037c5760405162461bcd60e51b815260040161040790611f34565b600054610100900460ff166117b25760405162461bcd60e51b815260040161040790611f34565b6033805460ff19169055565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60335460ff16156105d85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610407565b600054610100900460ff1661187d5760405162461bcd60e51b815260040161040790611f34565b6105d8336112c4565b82600381019282156118ce579160200282015b828111156118ce57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611899565b506118da9291506119a0565b5090565b6001830191839082156118ce5791602002820160005b8382111561193157835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026118f4565b801561195e5782816101000a81549060ff0219169055600101602081600001049283019260010302611931565b50506118da9291506119a0565b604051806060016040528060006001600160a01b0316815260200161198e6119b5565b815260200161199b6119b5565b905290565b5b808211156118da57600081556001016119a1565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461038557600080fd5b6000602082840312156119fa57600080fd5b8135611a05816119d3565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611a4557611a45611a0c565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a7457611a74611a0c565b604052919050565b801515811461038557600080fd5b600082601f830112611a9b57600080fd5b611aa3611a22565b806060840185811115611ab557600080fd5b845b81811015611ad8578035611aca81611a7c565b845260209384019301611ab7565b509095945050505050565b600060e08284031215611af557600080fd5b611afd611a22565b90508135611b0a816119d3565b81526020603f83018413611b1d57600080fd5b611b25611a22565b806080850186811115611b3757600080fd5b8386015b81811015611b5b578035611b4e816119d3565b8452928401928401611b3b565b508184860152611b6b8782611a8a565b60408601525050505092915050565b60006020808385031215611b8d57600080fd5b823567ffffffffffffffff80821115611ba557600080fd5b818501915085601f830112611bb957600080fd5b813581811115611bcb57611bcb611a0c565b611bd9848260051b01611a4b565b818152848101925060e0918202840185019188831115611bf857600080fd5b938501935b82851015611c1e57611c0f8986611ae3565b84529384019392850192611bfd565b50979650505050505050565b600060e08284031215611c3c57600080fd5b611a058383611ae3565b60008060408385031215611c5957600080fd5b8235611c64816119d3565b91506020830135611c74816119d3565b809150509250929050565b80356003811061143557600080fd5b600080600060608486031215611ca357600080fd5b8335611cae816119d3565b9250611cbc60208501611c7f565b91506040840135611ccc81611a7c565b809150509250925092565b60008060408385031215611cea57600080fd5b8235611cf5816119d3565b9150611d0360208401611c7f565b90509250929050565b600080600060608486031215611d2157600080fd5b8335611d2c816119d3565b92506020840135611d3c816119d3565b9150611d4a60408501611c7f565b90509250925092565b81516001600160a01b03908116825260208084015160e0840192919081850160005b6003811015611d94578251851682529183019190830190600101611d75565b505050604085015191506080840160005b6003811015611dc4578351151582529282019290820190600101611da5565b5050505092915050565b634e487b7160e01b600052603260045260246000fd5b600060018201611e0457634e487b7160e01b600052601160045260246000fd5b5060010190565b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215611e6257600080fd5b5051919050565b600060208284031215611e7b57600080fd5b8151611a0581611a7c565b6000815180845260005b81811015611eac57602081850181015186830182015201611e90565b81811115611ebe576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0383168152604060208201819052600090611ef790830184611e86565b949350505050565b6001600160a01b03848116825283166020820152606060408201819052600090611f2b90830184611e86565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600060208284031215611f9157600080fd5b8151611a05816119d356fe656e61626c654f7261636c6528616464726573732c4f7261636c65526f6c652c626f6f6c297365744f7261636c6528616464726573732c616464726573732c4f7261636c65526f6c6529a2646970667358221220d74b241835f929d98046b4d1012c8086c34304506a01dc86a4aa013a2256f24764736f6c634300080d0033",
644
+ "solcInputHash": "aae9f1601b873a5a4704ede73ede10cb",
645
+ "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\"},{\"internalType\":\"contract BoundValidatorInterface\",\"name\":\"_boundValidator\",\"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\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"role\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"enable\",\"type\":\"bool\"}],\"name\":\"OracleEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"role\",\"type\":\"uint256\"}],\"name\":\"OracleSet\",\"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\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"mainOracle\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pivotOracle\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fallbackOracle\",\"type\":\"address\"}],\"name\":\"TokenConfigAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BNB_ADDR\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INVALID_PRICE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"boundValidator\",\"outputs\":[{\"internalType\":\"contract BoundValidatorInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"enable\",\"type\":\"bool\"}],\"name\":\"enableOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"getTokenConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"enum ResilientOracle.OracleRole\",\"name\":\"role\",\"type\":\"uint8\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig\",\"name\":\"tokenConfig\",\"type\":\"tuple\"}],\"name\":\"setTokenConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"address[3]\",\"name\":\"oracles\",\"type\":\"address[3]\"},{\"internalType\":\"bool[3]\",\"name\":\"enableFlagsForOracles\",\"type\":\"bool[3]\"}],\"internalType\":\"struct ResilientOracle.TokenConfig[]\",\"name\":\"tokenConfigs_\",\"type\":\"tuple[]\"}],\"name\":\"setTokenConfigs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"updatePrice\",\"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\":{\"_boundValidator\":\"Address of the bound validator contract\",\"vBnbAddress\":\"The address of the vBNB\",\"vaiAddress\":\"The address of the VAI\"}},\"enableOracle(address,uint8,bool)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress error is thrown if asset address is nullTokenConfigExistance error is thrown if token config is not set\",\"params\":{\"asset\":\"Asset address\",\"enable\":\"Enabled boolean of the oracle\",\"role\":\"Oracle role\"}},\"getOracle(address,uint8)\":{\"params\":{\"role\":\"Oracle role\",\"vToken\":\"vToken address\"},\"returns\":{\"enabled\":\"Enabled flag of the oracle based on token config\",\"oracle\":\"Oracle address based on role\"}},\"getTokenConfig(address)\":{\"details\":\"Gets token config by vToken address\",\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"tokenConfig Config for the vToken\"}},\"getUnderlyingPrice(address)\":{\"custom:error\":\"Paused error is thrown when resilent oracle is pausedInvalid resilient oracle price error is thrown if fetched prices from oracle is invalid\",\"params\":{\"vToken\":\"vToken address\"},\"returns\":{\"_0\":\"price USD price in scaled decimal places.\"}},\"initialize(address)\":{\"params\":{\"accessControlManager_\":\"Address of the access control manager contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"custom:access\":\"Only Governance\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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\"}},\"setOracle(address,address,uint8)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Null address error if main-role oracle address is nullNotNullAddress error is thrown if asset address is nullTokenConfigExistance error is thrown if token config is not set\",\"custom:event\":\"Emits OracleSet event with asset address, oracle address and role of the oracle for the asset\",\"details\":\"Supplied vToken **must** exist and main oracle may not be null\",\"params\":{\"asset\":\"Asset address\",\"oracle\":\"Oracle address\",\"role\":\"Oracle role\"}},\"setTokenConfig((address,address[3],bool[3]))\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"NotNullAddress is thrown if asset address is nullNotNullAddress is thrown if main-role oracle address for asset is null\",\"custom:event\":\"Emits TokenConfigAdded event when vToken config is set successfully by governnace\",\"details\":\"main oracle **must not** be a null address\",\"params\":{\"tokenConfig\":\"Token config struct\"}},\"setTokenConfigs((address,address[3],bool[3])[])\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Throws a length error if the length of the token configs array is 0\",\"params\":{\"tokenConfigs_\":\"Token config array\"}},\"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.\"},\"unpause()\":{\"custom:access\":\"Only Governance\"},\"updatePrice(address)\":{\"details\":\"This function should always be called before calling getUnderlyingPrice\",\"params\":{\"vToken\":\"vToken address\"}}},\"stateVariables\":{\"boundValidator\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"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\"},\"OracleEnabled(address,uint256,bool)\":{\"notice\":\"Event emitted when an oracle is enabled or disabled\"},\"OracleSet(address,address,uint256)\":{\"notice\":\"Event emitted when an oracle is set\"}},\"kind\":\"user\",\"methods\":{\"BNB_ADDR()\":{\"notice\":\"Set this as asset address for BNB. This is the underlying for vBNB\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"boundValidator()\":{\"notice\":\"Bound validator contract address\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract. Sets immutable variables.\"},\"enableOracle(address,uint8,bool)\":{\"notice\":\"Enables/ disables oracle for the input vToken, input vToken **must** exist\"},\"getOracle(address,uint8)\":{\"notice\":\"Gets oracle and enabled status by vToken address\"},\"getUnderlyingPrice(address)\":{\"notice\":\"Gets price of the underlying asset for a given vToken. Validation flow: - Check if the oracle is paused globally - Validate price from main oracle against pivot oracle - Validate price from fallback oracle against pivot oracle if the first validation failed - Validate price from main oracle against fallback oracle if the second validation failed In the case that the pivot oracle is not available but main price is available and validation is successful, main oracle price is returned.\"},\"initialize(address)\":{\"notice\":\"Initializes the contract admin and sets the BoundValidator contract address\"},\"pause()\":{\"notice\":\"Pauses oracle\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setOracle(address,address,uint8)\":{\"notice\":\"Sets oracle for a given vToken and role.\"},\"setTokenConfig((address,address[3],bool[3]))\":{\"notice\":\"Sets/resets single token configs.\"},\"setTokenConfigs((address,address[3],bool[3])[])\":{\"notice\":\"Batch sets token configs\"},\"unpause()\":{\"notice\":\"Unpauses oracle\"},\"updatePrice(address)\":{\"notice\":\"Updates the TWAP pivot oracle price.\"},\"vBnb()\":{\"notice\":\"vBNB address\"},\"vai()\":{\"notice\":\"VAI address\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ResilientOracle.sol\":\"ResilientOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OwnableUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n function __Ownable2Step_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n address private _pendingOwner;\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n return _pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n _pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n delete _pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() external {\\n address sender = _msgSender();\\n require(pendingOwner() == sender, \\\"Ownable2Step: caller is not the new owner\\\");\\n _transferOwnership(sender);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd712fb45b3ea0ab49679164e3895037adc26ce12879d5184feb040e01c1c07a9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x247c62047745915c0af6b955470a72d1696ebad4352d7d3011aef1a2463cd888\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x037c334add4b033ad3493038c25be1682d78c00992e1acb0e2795caff3925271\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.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\"},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.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 \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title Venus Access Control Contract.\\n * @dev The AccessControlledV8 contract is a wrapper around the OpenZeppelin AccessControl contract\\n * It provides a standardized way to control access to methods within the Venus Smart Contract Ecosystem.\\n * The contract allows the owner to set an AccessControlManager contract address.\\n * It can restrict method calls based on the sender's role and the method's signature.\\n */\\n\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _accessControlManager;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n\\n /// @notice Emitted when access control manager contract address is changed\\n event NewAccessControlManager(address oldAccessControlManager, address newAccessControlManager);\\n\\n /// @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n function __AccessControlled_init(address accessControlManager_) internal onlyInitializing {\\n __Ownable2Step_init();\\n __AccessControlled_init_unchained(accessControlManager_);\\n }\\n\\n function __AccessControlled_init_unchained(address accessControlManager_) internal onlyInitializing {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Sets the address of AccessControlManager\\n * @dev Admin function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n * @custom:event Emits NewAccessControlManager event\\n * @custom:access Only Governance\\n */\\n function setAccessControlManager(address accessControlManager_) external onlyOwner {\\n _setAccessControlManager(accessControlManager_);\\n }\\n\\n /**\\n * @notice Returns the address of the access control manager contract\\n */\\n function accessControlManager() external view returns (IAccessControlManagerV8) {\\n return _accessControlManager;\\n }\\n\\n /**\\n * @dev Internal function to set address of AccessControlManager\\n * @param accessControlManager_ The new address of the AccessControlManager\\n */\\n function _setAccessControlManager(address accessControlManager_) internal {\\n require(address(accessControlManager_) != address(0), \\\"invalid acess control manager address\\\");\\n address oldAccessControlManager = address(_accessControlManager);\\n _accessControlManager = IAccessControlManagerV8(accessControlManager_);\\n emit NewAccessControlManager(oldAccessControlManager, accessControlManager_);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = _accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x618d942756b93e02340a42f3c80aa99fc56be1a96861f5464dc23a76bf30b3a5\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x41deef84d1839590b243b66506691fde2fb938da01eabde53e82d3b8316fdaf9\",\"license\":\"BSD-3-Clause\"},\"contracts/ResilientOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n// SPDX-FileCopyrightText: 2022 Venus\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"./interfaces/VBep20Interface.sol\\\";\\nimport \\\"./interfaces/OracleInterface.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\n\\ncontract ResilientOracle is PausableUpgradeable, AccessControlledV8, ResilientOracleInterface {\\n /**\\n * @dev Oracle roles:\\n * **main**: The most trustworthy price source\\n * **pivot**: Price oracle used as a loose sanity checker\\n * **fallback**: The backup source when main oracle price is invalidated\\n */\\n enum OracleRole {\\n MAIN,\\n PIVOT,\\n FALLBACK\\n }\\n\\n struct TokenConfig {\\n /// @notice asset address\\n address asset;\\n /// @notice `oracles` stores the oracles based on their role in the following order:\\n /// [main, pivot, fallback],\\n /// It can be indexed with the corresponding enum OracleRole value\\n address[3] oracles;\\n /// @notice `enableFlagsForOracles` stores the enabled state\\n /// for each oracle in the same order as `oracles`\\n bool[3] enableFlagsForOracles;\\n }\\n\\n uint256 public constant INVALID_PRICE = 0;\\n\\n /// @notice vBNB address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vBnb;\\n\\n /// @notice VAI address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable vai;\\n\\n /// @notice Set this as asset address for BNB. This is the underlying for vBNB\\n address public constant BNB_ADDR = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB;\\n\\n /// @notice Bound validator contract address\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n BoundValidatorInterface public immutable boundValidator;\\n\\n mapping(address => TokenConfig) private tokenConfigs;\\n\\n event TokenConfigAdded(\\n address indexed asset,\\n address indexed mainOracle,\\n address indexed pivotOracle,\\n address fallbackOracle\\n );\\n\\n /// Event emitted when an oracle is set\\n event OracleSet(address indexed asset, address indexed oracle, uint256 indexed role);\\n\\n /// Event emitted when an oracle is enabled or disabled\\n event OracleEnabled(address indexed asset, uint256 indexed role, bool indexed enable);\\n\\n /**\\n * @notice Checks whether an address is null or not\\n */\\n modifier notNullAddress(address someone) {\\n if (someone == address(0)) revert(\\\"can't be zero address\\\");\\n _;\\n }\\n\\n /**\\n * @notice Checks whether token config exists by checking whether vToken is null address\\n * @dev vToken can't be null, so it's suitable to be used to check the validity of the config\\n * @param asset asset address\\n */\\n modifier checkTokenConfigExistence(address asset) {\\n if (tokenConfigs[asset].asset == address(0)) revert(\\\"token config must exist\\\");\\n _;\\n }\\n\\n /// @notice Constructor for the implementation contract. Sets immutable variables.\\n /// @param vBnbAddress The address of the vBNB\\n /// @param vaiAddress The address of the VAI\\n /// @param _boundValidator Address of the bound validator contract\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(\\n address vBnbAddress,\\n address vaiAddress,\\n BoundValidatorInterface _boundValidator\\n ) notNullAddress(vBnbAddress) notNullAddress(vaiAddress) notNullAddress(address(_boundValidator)) {\\n vBnb = vBnbAddress;\\n vai = vaiAddress;\\n boundValidator = _boundValidator;\\n\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice Initializes the contract admin and sets the BoundValidator contract address\\n * @param accessControlManager_ Address of the access control manager contract\\n */\\n function initialize(address accessControlManager_) external initializer {\\n __AccessControlled_init(accessControlManager_);\\n __Pausable_init();\\n }\\n\\n /**\\n * @notice Pauses oracle\\n * @custom:access Only Governance\\n */\\n function pause() external {\\n _checkAccessAllowed(\\\"pause()\\\");\\n _pause();\\n }\\n\\n /**\\n * @notice Unpauses oracle\\n * @custom:access Only Governance\\n */\\n function unpause() external {\\n _checkAccessAllowed(\\\"unpause()\\\");\\n _unpause();\\n }\\n\\n /**\\n * @notice Batch sets token configs\\n * @param tokenConfigs_ Token config array\\n * @custom:access Only Governance\\n * @custom:error Throws a length error if the length of the token configs array is 0\\n */\\n function setTokenConfigs(TokenConfig[] memory tokenConfigs_) external {\\n if (tokenConfigs_.length == 0) revert(\\\"length can't be 0\\\");\\n uint256 numTokenConfigs = tokenConfigs_.length;\\n for (uint256 i; i < numTokenConfigs; ) {\\n setTokenConfig(tokenConfigs_[i]);\\n unchecked {\\n ++i;\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets oracle for a given vToken and role.\\n * @dev Supplied vToken **must** exist and main oracle may not be null\\n * @param asset Asset address\\n * @param oracle Oracle address\\n * @param role Oracle role\\n * @custom:access Only Governance\\n * @custom:error Null address error if main-role oracle address is null\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error TokenConfigExistance error is thrown if token config is not set\\n * @custom:event Emits OracleSet event with asset address, oracle address and role of the oracle for the asset\\n */\\n function setOracle(\\n address asset,\\n address oracle,\\n OracleRole role\\n ) external notNullAddress(asset) checkTokenConfigExistence(asset) {\\n _checkAccessAllowed(\\\"setOracle(address,address,uint8)\\\");\\n if (oracle == address(0) && role == OracleRole.MAIN) revert(\\\"can't set zero address to main oracle\\\");\\n tokenConfigs[asset].oracles[uint256(role)] = oracle;\\n emit OracleSet(asset, oracle, uint256(role));\\n }\\n\\n /**\\n * @notice Enables/ disables oracle for the input vToken, input vToken **must** exist\\n * @param asset Asset address\\n * @param role Oracle role\\n * @param enable Enabled boolean of the oracle\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress error is thrown if asset address is null\\n * @custom:error TokenConfigExistance error is thrown if token config is not set\\n */\\n function enableOracle(\\n address asset,\\n OracleRole role,\\n bool enable\\n ) external notNullAddress(asset) checkTokenConfigExistence(asset) {\\n _checkAccessAllowed(\\\"enableOracle(address,uint8,bool)\\\");\\n tokenConfigs[asset].enableFlagsForOracles[uint256(role)] = enable;\\n emit OracleEnabled(asset, uint256(role), enable);\\n }\\n\\n /**\\n * @notice Updates the TWAP pivot oracle price.\\n * @dev This function should always be called before calling getUnderlyingPrice\\n * @param vToken vToken address\\n */\\n function updatePrice(address vToken) external override {\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n if (pivotOracle != address(0) && pivotOracleEnabled) {\\n //if pivot oracle is not TwapOracle it will revert so we need to catch the revert\\n try TwapInterface(pivotOracle).updateTwap(vToken) {} catch {}\\n }\\n }\\n\\n /**\\n * @dev Gets token config by vToken address\\n * @param vToken vToken address\\n * @return tokenConfig Config for the vToken\\n */\\n function getTokenConfig(address vToken) external view returns (TokenConfig memory) {\\n address asset = _getUnderlyingAsset(vToken);\\n return tokenConfigs[asset];\\n }\\n\\n /**\\n * @notice Gets price of the underlying asset for a given vToken. Validation flow:\\n * - Check if the oracle is paused globally\\n * - Validate price from main oracle against pivot oracle\\n * - Validate price from fallback oracle against pivot oracle if the first validation failed\\n * - Validate price from main oracle against fallback oracle if the second validation failed\\n * In the case that the pivot oracle is not available but main price is available and validation is successful,\\n * main oracle price is returned.\\n * @param vToken vToken address\\n * @return price USD price in scaled decimal places.\\n * @custom:error Paused error is thrown when resilent oracle is paused\\n * @custom:error Invalid resilient oracle price error is thrown if fetched prices from oracle is invalid\\n */\\n function getUnderlyingPrice(address vToken) external view override returns (uint256) {\\n if (paused()) revert(\\\"resilient oracle is paused\\\");\\n uint256 pivotPrice = INVALID_PRICE;\\n\\n // Get pivot oracle price, Invalid price if not available or error\\n (address pivotOracle, bool pivotOracleEnabled) = getOracle(vToken, OracleRole.PIVOT);\\n if (pivotOracleEnabled && pivotOracle != address(0)) {\\n try OracleInterface(pivotOracle).getUnderlyingPrice(vToken) returns (uint256 pricePivot) {\\n pivotPrice = pricePivot;\\n } catch {}\\n }\\n\\n // Compare main price and pivot price, return main price and if validation was successful\\n // note: In case pivot oracle is not available but main price is available and\\n // validation is successful, the main oracle price is returned.\\n (uint256 mainPrice, bool validatedPivotMain) = _getMainOraclePrice(\\n vToken,\\n pivotPrice,\\n pivotOracleEnabled && pivotOracle != address(0)\\n );\\n if (mainPrice != INVALID_PRICE && validatedPivotMain) return mainPrice;\\n\\n // Compare fallback and pivot if main oracle comparision fails with pivot\\n // Return fallback price when fallback price is validated successfully with pivot oracle\\n (uint256 fallbackPrice, bool validatedPivotFallback) = _getFallbackOraclePrice(vToken, pivotPrice);\\n if (fallbackPrice != INVALID_PRICE && validatedPivotFallback) return fallbackPrice;\\n\\n // Lastly compare main price and fallback price\\n if (\\n mainPrice != INVALID_PRICE &&\\n fallbackPrice != INVALID_PRICE &&\\n boundValidator.validatePriceWithAnchorPrice(vToken, mainPrice, fallbackPrice)\\n ) {\\n return mainPrice;\\n }\\n\\n revert(\\\"invalid resilient oracle price\\\");\\n }\\n\\n /**\\n * @notice Sets/resets single token configs.\\n * @dev main oracle **must not** be a null address\\n * @param tokenConfig Token config struct\\n * @custom:access Only Governance\\n * @custom:error NotNullAddress is thrown if asset address is null\\n * @custom:error NotNullAddress is thrown if main-role oracle address for asset is null\\n * @custom:event Emits TokenConfigAdded event when vToken config is set successfully by governnace\\n */\\n function setTokenConfig(\\n TokenConfig memory tokenConfig\\n ) public notNullAddress(tokenConfig.asset) notNullAddress(tokenConfig.oracles[uint256(OracleRole.MAIN)]) {\\n _checkAccessAllowed(\\\"setTokenConfig(TokenConfig)\\\");\\n\\n tokenConfigs[tokenConfig.asset] = tokenConfig;\\n emit TokenConfigAdded(\\n tokenConfig.asset,\\n tokenConfig.oracles[uint256(OracleRole.MAIN)],\\n tokenConfig.oracles[uint256(OracleRole.PIVOT)],\\n tokenConfig.oracles[uint256(OracleRole.FALLBACK)]\\n );\\n }\\n\\n /**\\n * @notice Gets oracle and enabled status by vToken address\\n * @param vToken vToken address\\n * @param role Oracle role\\n * @return oracle Oracle address based on role\\n * @return enabled Enabled flag of the oracle based on token config\\n */\\n function getOracle(address vToken, OracleRole role) public view returns (address oracle, bool enabled) {\\n address asset = _getUnderlyingAsset(vToken);\\n\\n oracle = tokenConfigs[asset].oracles[uint256(role)];\\n enabled = tokenConfigs[asset].enableFlagsForOracles[uint256(role)];\\n }\\n\\n /**\\n * @notice Gets underlying asset price for the provided vToken\\n * @dev This function won't revert when price is 0, because the fallback oracle may still be\\n * able to fetch a correct price\\n * @param vToken vToken address\\n * @param pivotPrice Pivot oracle price\\n * @param pivotEnabled If pivot oracle is not empty and enabled\\n * @return price USD price in scaled decimals\\n * e.g. vToken decimals is 8 then price is returned as 10**18 * 10**(18-8) = 10**28 decimals\\n * @return pivotValidated Boolean representing if the validation of main oracle price\\n * and pivot oracle price were successful\\n * @custom:error Invalid price error is thrown if main oracle fails to fetch price of underlying asset\\n * @custom:error Invalid price error is thrown if main oracle is not enabled or main oracle\\n * address is null\\n */\\n function _getMainOraclePrice(\\n address vToken,\\n uint256 pivotPrice,\\n bool pivotEnabled\\n ) private view returns (uint256, bool) {\\n (address mainOracle, bool mainOracleEnabled) = getOracle(vToken, OracleRole.MAIN);\\n if (mainOracleEnabled && mainOracle != address(0)) {\\n try OracleInterface(mainOracle).getUnderlyingPrice(vToken) returns (uint256 mainOraclePrice) {\\n if (!pivotEnabled) {\\n return (mainOraclePrice, true);\\n }\\n if (pivotPrice == INVALID_PRICE) {\\n return (mainOraclePrice, false);\\n }\\n return (\\n mainOraclePrice,\\n boundValidator.validatePriceWithAnchorPrice(vToken, mainOraclePrice, pivotPrice)\\n );\\n } catch {\\n return (INVALID_PRICE, false);\\n }\\n }\\n\\n return (INVALID_PRICE, false);\\n }\\n\\n /**\\n * @dev This function won't revert when the price is 0 because getUnderlyingPrice checks if price is > 0\\n * @param vToken vToken address\\n * @return price USD price in 18 decimals\\n * @return pivotValidated Boolean representing if the validation of fallback oracle price\\n * and pivot oracle price were successfull\\n * @custom:error Invalid price error is thrown if fallback oracle fails to fetch price of underlying asset\\n * @custom:error Invalid price error is thrown if fallback oracle is not enabled or fallback oracle\\n * address is null\\n */\\n function _getFallbackOraclePrice(address vToken, uint256 pivotPrice) private view returns (uint256, bool) {\\n (address fallbackOracle, bool fallbackEnabled) = getOracle(vToken, OracleRole.FALLBACK);\\n if (fallbackEnabled && fallbackOracle != address(0)) {\\n try OracleInterface(fallbackOracle).getUnderlyingPrice(vToken) returns (uint256 fallbackOraclePrice) {\\n if (pivotPrice == INVALID_PRICE) {\\n return (fallbackOraclePrice, false);\\n }\\n return (\\n fallbackOraclePrice,\\n boundValidator.validatePriceWithAnchorPrice(vToken, fallbackOraclePrice, pivotPrice)\\n );\\n } catch {\\n return (INVALID_PRICE, false);\\n }\\n }\\n\\n return (INVALID_PRICE, false);\\n }\\n\\n /**\\n * @dev This function returns the underlying asset of a vToken\\n * @param vToken vToken address\\n * @return asset underlying asset address\\n */\\n function _getUnderlyingAsset(address vToken) private view returns (address asset) {\\n if (address(vToken) == vBnb) {\\n asset = BNB_ADDR;\\n } else if (address(vToken) == vai) {\\n asset = vai;\\n } else {\\n asset = VBep20Interface(vToken).underlying();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc9891f48046ad3dbfa4513b87fdb16f488cd5a4a4e5d227b153194279ed0bbc8\",\"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\"}},\"version\":1}",
646
+ "bytecode": "0x60e06040523480156200001157600080fd5b506040516200224038038062002240833981016040819052620000349162000217565b826001600160a01b038116620000805760405162461bcd60e51b815260206004820152601560248201526000805160206200222083398151915260448201526064015b60405180910390fd5b826001600160a01b038116620000c85760405162461bcd60e51b8152602060048201526015602482015260008051602062002220833981519152604482015260640162000077565b826001600160a01b038116620001105760405162461bcd60e51b8152602060048201526015602482015260008051602062002220833981519152604482015260640162000077565b6001600160a01b0380871660805285811660a052841660c052620001336200013f565b5050505050506200026b565b600054610100900460ff1615620001a95760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000077565b60005460ff9081161015620001fc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146200021457600080fd5b50565b6000806000606084860312156200022d57600080fd5b83516200023a81620001fe565b60208501519093506200024d81620001fe565b60408501519092506200026081620001fe565b809150509250925092565b60805160a05160c051611f5b620002c56000396000818161019d01528181610f3d015281816114db015261164b0152600081816102fc015281816112b401526112ee01526000818161022d01526112600152611f5b6000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80638456cb59116100c3578063b62e4c921161007c578063b62e4c92146102f7578063c4d66de81461031e578063cb67e3b114610331578063e30c397814610351578063f2fde38b14610362578063fc57d4df1461037557600080fd5b80638456cb59146102755780638b855da41461027d5780638da5cb5b146102af57806396e85ced146102c0578063a6b1344a146102d3578063b4a0bdf3146102e657600080fd5b80634b932b8f116101155780634b932b8f146101ff5780634bf39cba146102125780635ba3792d146102285780635c975abb1461024f578063715018a61461026557806379ba50971461026d57600080fd5b80630e32cb861461015d5780632cfa387114610172578063333a21b01461018557806333d33494146101985780633e83b6b8146101dc5780633f4ba83a146101f7575b600080fd5b61017061016b3660046119d1565b610388565b005b610170610180366004611b63565b61039c565b610170610193366004611c13565b610422565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101bf73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b610170610574565b61017061020d366004611c3e565b6105a8565b61021a600081565b6040519081526020016101d3565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b60335460ff1660405190151581526020016101d3565b61017061071e565b610170610730565b6101706107a7565b61029061028b366004611c87565b6107d7565b604080516001600160a01b0390931683529015156020830152016101d3565b6065546001600160a01b03166101bf565b6101706102ce3660046119d1565b610889565b6101706102e1366004611cbc565b610925565b60c9546001600160a01b03166101bf565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b61017061032c3660046119d1565b610b27565b61034461033f3660046119d1565b610c43565b6040516101d39190611d03565b6097546001600160a01b03166101bf565b6101706103703660046119d1565b610d25565b61021a6103833660046119d1565b610d96565b610390611002565b6103998161105c565b50565b80516000036103e65760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b8181101561041d5761041583828151811061040857610408611d7e565b6020026020010151610422565b6001016103eb565b505050565b80516001600160a01b03811661044a5760405162461bcd60e51b81526004016103dd90611d94565b6020820151516001600160a01b0381166104765760405162461bcd60e51b81526004016103dd90611d94565b6104b46040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e66696729000000000081525061111a565b82516001600160a01b03908116600090815260fb60209081526040909120855181546001600160a01b03191693169290921782558401518491906104fe906001830190600361186f565b50604082015161051490600483019060036118c7565b505050602083810151808201518151865160409384015193516001600160a01b039485168152928416949184169316917fa51ad01e2270c314a7b78f0c60fe66c723f2d06c121d63fcdce776e654878fc1910160405180910390a4505050565b61059e60405180604001604052806009815260200168756e7061757365282960b81b81525061111a565b6105a66111b4565b565b826001600160a01b0381166105cf5760405162461bcd60e51b81526004016103dd90611d94565b6001600160a01b03808516600090815260fb60205260409020548591166106325760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016103dd565b6106706040518060400160405280602081526020017f656e61626c654f7261636c6528616464726573732c75696e74382c626f6f6c2981525061111a565b6001600160a01b038516600090815260fb60205260409020839060040185600281111561069f5761069f611dc3565b600381106106af576106af611d7e565b602091828204019190066101000a81548160ff0219169083151502179055508215158460028111156106e3576106e3611dc3565b6040516001600160a01b038816907fcf3cad1ec87208efbde5d82a0557484a78d4182c3ad16926a5463bc1f7234b3d90600090a45050505050565b610726611002565b6105a66000611206565b60975433906001600160a01b0316811461079e5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016103dd565b61039981611206565b6107cf604051806040016040528060078152602001667061757365282960c81b81525061111a565b6105a661121f565b60008060006107e58561125c565b6001600160a01b038116600090815260fb6020526040902090915060010184600281111561081557610815611dc3565b6003811061082557610825611d7e565b01546001600160a01b03828116600090815260fb602052604090209116935060040184600281111561085957610859611dc3565b6003811061086957610869611d7e565b602091828204019190069054906101000a900460ff169150509250929050565b6000806108978360016107d7565b90925090506001600160a01b038216158015906108b15750805b1561041d5760405163725068a560e01b81526001600160a01b03848116600483015283169063725068a5906024016020604051808303816000875af192505050801561091a575060408051601f3d908101601f1916820190925261091791810190611dd9565b60015b1561041d5750505050565b826001600160a01b03811661094c5760405162461bcd60e51b81526004016103dd90611d94565b6001600160a01b03808516600090815260fb60205260409020548591166109af5760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016103dd565b6109ed6040518060400160405280602081526020017f7365744f7261636c6528616464726573732c616464726573732c75696e74382981525061111a565b6001600160a01b038416158015610a1557506000836002811115610a1357610a13611dc3565b145b15610a705760405162461bcd60e51b815260206004820152602560248201527f63616e277420736574207a65726f206164647265737320746f206d61696e206f6044820152647261636c6560d81b60648201526084016103dd565b6001600160a01b038516600090815260fb602052604090208490600101846002811115610a9f57610a9f611dc3565b60038110610aaf57610aaf611d7e565b0180546001600160a01b0319166001600160a01b0392909216919091179055826002811115610ae057610ae0611dc3565b846001600160a01b0316866001600160a01b03167fea681d3efb830ef032a9c29a7215b5ceeeb546250d2c463dbf87817aecda1bf160405160405180910390a45050505050565b600054610100900460ff1615808015610b475750600054600160ff909116105b80610b615750303b158015610b61575060005460ff166001145b610bc45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103dd565b6000805460ff191660011790558015610be7576000805461ff0019166101001790555b610bf08261137c565b610bf86113b4565b8015610c3f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b610c4b611954565b6000610c568361125c565b6001600160a01b03818116600090815260fb6020908152604091829020825160608082018552825490951681528351948501938490529495509290840191600184019060039082845b81546001600160a01b03168152600190910190602001808311610c9f575050509183525050604080516060810191829052602090920191906004840190600390826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610ce4579050505050505081525050915050919050565b610d2d611002565b609780546001600160a01b0383166001600160a01b03199091168117909155610d5e6065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000610da460335460ff1690565b15610df15760405162461bcd60e51b815260206004820152601a60248201527f726573696c69656e74206f7261636c652069732070617573656400000000000060448201526064016103dd565b60008080610e008560016107d7565b91509150808015610e1957506001600160a01b03821615155b15610e885760405163fc57d4df60e01b81526001600160a01b03868116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610e80575060408051601f3d908101601f19168201909252610e7d91810190611dd9565b60015b15610e885792505b600080610eaa8786858015610ea557506001600160a01b03871615155b6113e3565b9150915060008214158015610ebc5750805b15610ecb575095945050505050565b600080610ed88988611566565b9150915060008214158015610eea5750805b15610efb5750979650505050505050565b8315801590610f0957508115155b8015610fa85750604051634be3819f60e11b81526001600160a01b038a8116600483015260248201869052604482018490527f000000000000000000000000000000000000000000000000000000000000000016906397c7033e90606401602060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa89190611df2565b15610fba575091979650505050505050565b60405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726573696c69656e74206f7261636c65207072696365000060448201526064016103dd565b6065546001600160a01b031633146105a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103dd565b6001600160a01b0381166110c05760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b60648201526084016103dd565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610c36565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061114d9033908690600401611e5c565b602060405180830381865afa15801561116a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118e9190611df2565b905080610c3f57333083604051634a3fa29360e01b81526004016103dd93929190611e88565b6111bc6116d5565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b609780546001600160a01b03191690556103998161171e565b611227611770565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111e93390565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036112b2575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361131257507f0000000000000000000000000000000000000000000000000000000000000000919050565b816001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113749190611ebd565b90505b919050565b600054610100900460ff166113a35760405162461bcd60e51b81526004016103dd90611eda565b6113ab6117b6565b610399816117e5565b600054610100900460ff166113db5760405162461bcd60e51b81526004016103dd90611eda565b6105a661180c565b6000806000806113f48760006107d7565b9150915080801561140d57506001600160a01b03821615155b156115545760405163fc57d4df60e01b81526001600160a01b03888116600483015283169063fc57d4df90602401602060405180830381865afa925050508015611474575060408051601f3d908101601f1916820190925261147191810190611dd9565b60015b6114865760008093509350505061155e565b856114995793506001925061155e915050565b866114ac5793506000925061155e915050565b604051634be3819f60e11b81526001600160a01b038981166004830152602482018390526044820189905282917f0000000000000000000000000000000000000000000000000000000000000000909116906397c7033e90606401602060405180830381865afa158015611524573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115489190611df2565b9450945050505061155e565b6000809350935050505b935093915050565b6000806000806115778660026107d7565b9150915080801561159057506001600160a01b03821615155b156116c45760405163fc57d4df60e01b81526001600160a01b03878116600483015283169063fc57d4df90602401602060405180830381865afa9250505080156115f7575060408051601f3d908101601f191682019092526115f491810190611dd9565b60015b611609576000809350935050506116ce565b8561161c579350600092506116ce915050565b604051634be3819f60e11b81526001600160a01b038881166004830152602482018390526044820188905282917f0000000000000000000000000000000000000000000000000000000000000000909116906397c7033e90606401602060405180830381865afa158015611694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b89190611df2565b945094505050506116ce565b6000809350935050505b9250929050565b60335460ff166105a65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103dd565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60335460ff16156105a65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103dd565b600054610100900460ff166117dd5760405162461bcd60e51b81526004016103dd90611eda565b6105a661183f565b600054610100900460ff166103905760405162461bcd60e51b81526004016103dd90611eda565b600054610100900460ff166118335760405162461bcd60e51b81526004016103dd90611eda565b6033805460ff19169055565b600054610100900460ff166118665760405162461bcd60e51b81526004016103dd90611eda565b6105a633611206565b82600381019282156118b7579160200282015b828111156118b757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611882565b506118c3929150611989565b5090565b6001830191839082156118b75791602002820160005b8382111561191a57835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026118dd565b80156119475782816101000a81549060ff021916905560010160208160000104928301926001030261191a565b50506118c3929150611989565b604051806060016040528060006001600160a01b0316815260200161197761199e565b815260200161198461199e565b905290565b5b808211156118c3576000815560010161198a565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461039957600080fd5b6000602082840312156119e357600080fd5b81356119ee816119bc565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611a2e57611a2e6119f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a5d57611a5d6119f5565b604052919050565b801515811461039957600080fd5b600082601f830112611a8457600080fd5b611a8c611a0b565b806060840185811115611a9e57600080fd5b845b81811015611ac1578035611ab381611a65565b845260209384019301611aa0565b509095945050505050565b600060e08284031215611ade57600080fd5b611ae6611a0b565b90508135611af3816119bc565b81526020603f83018413611b0657600080fd5b611b0e611a0b565b806080850186811115611b2057600080fd5b8386015b81811015611b44578035611b37816119bc565b8452928401928401611b24565b508184860152611b548782611a73565b60408601525050505092915050565b60006020808385031215611b7657600080fd5b823567ffffffffffffffff80821115611b8e57600080fd5b818501915085601f830112611ba257600080fd5b813581811115611bb457611bb46119f5565b611bc2848260051b01611a34565b818152848101925060e0918202840185019188831115611be157600080fd5b938501935b82851015611c0757611bf88986611acc565b84529384019392850192611be6565b50979650505050505050565b600060e08284031215611c2557600080fd5b6119ee8383611acc565b80356003811061137757600080fd5b600080600060608486031215611c5357600080fd5b8335611c5e816119bc565b9250611c6c60208501611c2f565b91506040840135611c7c81611a65565b809150509250925092565b60008060408385031215611c9a57600080fd5b8235611ca5816119bc565b9150611cb360208401611c2f565b90509250929050565b600080600060608486031215611cd157600080fd5b8335611cdc816119bc565b92506020840135611cec816119bc565b9150611cfa60408501611c2f565b90509250925092565b81516001600160a01b03908116825260208084015160e0840192919081850160005b6003811015611d44578251851682529183019190830190600101611d25565b505050604085015191506080840160005b6003811015611d74578351151582529282019290820190600101611d55565b5050505092915050565b634e487b7160e01b600052603260045260246000fd5b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215611deb57600080fd5b5051919050565b600060208284031215611e0457600080fd5b81516119ee81611a65565b6000815180845260005b81811015611e3557602081850181015186830182015201611e19565b81811115611e47576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0383168152604060208201819052600090611e8090830184611e0f565b949350505050565b6001600160a01b03848116825283166020820152606060408201819052600090611eb490830184611e0f565b95945050505050565b600060208284031215611ecf57600080fd5b81516119ee816119bc565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220e79186f27c02864972a9c0dbea0e8a74a094aee6ad9ab92dc5e80958c2c891e864736f6c634300080d003363616e2774206265207a65726f20616464726573730000000000000000000000",
647
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101585760003560e01c80638456cb59116100c3578063b62e4c921161007c578063b62e4c92146102f7578063c4d66de81461031e578063cb67e3b114610331578063e30c397814610351578063f2fde38b14610362578063fc57d4df1461037557600080fd5b80638456cb59146102755780638b855da41461027d5780638da5cb5b146102af57806396e85ced146102c0578063a6b1344a146102d3578063b4a0bdf3146102e657600080fd5b80634b932b8f116101155780634b932b8f146101ff5780634bf39cba146102125780635ba3792d146102285780635c975abb1461024f578063715018a61461026557806379ba50971461026d57600080fd5b80630e32cb861461015d5780632cfa387114610172578063333a21b01461018557806333d33494146101985780633e83b6b8146101dc5780633f4ba83a146101f7575b600080fd5b61017061016b3660046119d1565b610388565b005b610170610180366004611b63565b61039c565b610170610193366004611c13565b610422565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101bf73bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb81565b610170610574565b61017061020d366004611c3e565b6105a8565b61021a600081565b6040519081526020016101d3565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b60335460ff1660405190151581526020016101d3565b61017061071e565b610170610730565b6101706107a7565b61029061028b366004611c87565b6107d7565b604080516001600160a01b0390931683529015156020830152016101d3565b6065546001600160a01b03166101bf565b6101706102ce3660046119d1565b610889565b6101706102e1366004611cbc565b610925565b60c9546001600160a01b03166101bf565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b61017061032c3660046119d1565b610b27565b61034461033f3660046119d1565b610c43565b6040516101d39190611d03565b6097546001600160a01b03166101bf565b6101706103703660046119d1565b610d25565b61021a6103833660046119d1565b610d96565b610390611002565b6103998161105c565b50565b80516000036103e65760405162461bcd60e51b815260206004820152601160248201527006c656e6774682063616e2774206265203607c1b60448201526064015b60405180910390fd5b805160005b8181101561041d5761041583828151811061040857610408611d7e565b6020026020010151610422565b6001016103eb565b505050565b80516001600160a01b03811661044a5760405162461bcd60e51b81526004016103dd90611d94565b6020820151516001600160a01b0381166104765760405162461bcd60e51b81526004016103dd90611d94565b6104b46040518060400160405280601b81526020017f736574546f6b656e436f6e66696728546f6b656e436f6e66696729000000000081525061111a565b82516001600160a01b03908116600090815260fb60209081526040909120855181546001600160a01b03191693169290921782558401518491906104fe906001830190600361186f565b50604082015161051490600483019060036118c7565b505050602083810151808201518151865160409384015193516001600160a01b039485168152928416949184169316917fa51ad01e2270c314a7b78f0c60fe66c723f2d06c121d63fcdce776e654878fc1910160405180910390a4505050565b61059e60405180604001604052806009815260200168756e7061757365282960b81b81525061111a565b6105a66111b4565b565b826001600160a01b0381166105cf5760405162461bcd60e51b81526004016103dd90611d94565b6001600160a01b03808516600090815260fb60205260409020548591166106325760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016103dd565b6106706040518060400160405280602081526020017f656e61626c654f7261636c6528616464726573732c75696e74382c626f6f6c2981525061111a565b6001600160a01b038516600090815260fb60205260409020839060040185600281111561069f5761069f611dc3565b600381106106af576106af611d7e565b602091828204019190066101000a81548160ff0219169083151502179055508215158460028111156106e3576106e3611dc3565b6040516001600160a01b038816907fcf3cad1ec87208efbde5d82a0557484a78d4182c3ad16926a5463bc1f7234b3d90600090a45050505050565b610726611002565b6105a66000611206565b60975433906001600160a01b0316811461079e5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b60648201526084016103dd565b61039981611206565b6107cf604051806040016040528060078152602001667061757365282960c81b81525061111a565b6105a661121f565b60008060006107e58561125c565b6001600160a01b038116600090815260fb6020526040902090915060010184600281111561081557610815611dc3565b6003811061082557610825611d7e565b01546001600160a01b03828116600090815260fb602052604090209116935060040184600281111561085957610859611dc3565b6003811061086957610869611d7e565b602091828204019190069054906101000a900460ff169150509250929050565b6000806108978360016107d7565b90925090506001600160a01b038216158015906108b15750805b1561041d5760405163725068a560e01b81526001600160a01b03848116600483015283169063725068a5906024016020604051808303816000875af192505050801561091a575060408051601f3d908101601f1916820190925261091791810190611dd9565b60015b1561041d5750505050565b826001600160a01b03811661094c5760405162461bcd60e51b81526004016103dd90611d94565b6001600160a01b03808516600090815260fb60205260409020548591166109af5760405162461bcd60e51b81526020600482015260176024820152761d1bdad95b8818dbdb999a59c81b5d5cdd08195e1a5cdd604a1b60448201526064016103dd565b6109ed6040518060400160405280602081526020017f7365744f7261636c6528616464726573732c616464726573732c75696e74382981525061111a565b6001600160a01b038416158015610a1557506000836002811115610a1357610a13611dc3565b145b15610a705760405162461bcd60e51b815260206004820152602560248201527f63616e277420736574207a65726f206164647265737320746f206d61696e206f6044820152647261636c6560d81b60648201526084016103dd565b6001600160a01b038516600090815260fb602052604090208490600101846002811115610a9f57610a9f611dc3565b60038110610aaf57610aaf611d7e565b0180546001600160a01b0319166001600160a01b0392909216919091179055826002811115610ae057610ae0611dc3565b846001600160a01b0316866001600160a01b03167fea681d3efb830ef032a9c29a7215b5ceeeb546250d2c463dbf87817aecda1bf160405160405180910390a45050505050565b600054610100900460ff1615808015610b475750600054600160ff909116105b80610b615750303b158015610b61575060005460ff166001145b610bc45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103dd565b6000805460ff191660011790558015610be7576000805461ff0019166101001790555b610bf08261137c565b610bf86113b4565b8015610c3f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b610c4b611954565b6000610c568361125c565b6001600160a01b03818116600090815260fb6020908152604091829020825160608082018552825490951681528351948501938490529495509290840191600184019060039082845b81546001600160a01b03168152600190910190602001808311610c9f575050509183525050604080516060810191829052602090920191906004840190600390826000855b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610ce4579050505050505081525050915050919050565b610d2d611002565b609780546001600160a01b0383166001600160a01b03199091168117909155610d5e6065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000610da460335460ff1690565b15610df15760405162461bcd60e51b815260206004820152601a60248201527f726573696c69656e74206f7261636c652069732070617573656400000000000060448201526064016103dd565b60008080610e008560016107d7565b91509150808015610e1957506001600160a01b03821615155b15610e885760405163fc57d4df60e01b81526001600160a01b03868116600483015283169063fc57d4df90602401602060405180830381865afa925050508015610e80575060408051601f3d908101601f19168201909252610e7d91810190611dd9565b60015b15610e885792505b600080610eaa8786858015610ea557506001600160a01b03871615155b6113e3565b9150915060008214158015610ebc5750805b15610ecb575095945050505050565b600080610ed88988611566565b9150915060008214158015610eea5750805b15610efb5750979650505050505050565b8315801590610f0957508115155b8015610fa85750604051634be3819f60e11b81526001600160a01b038a8116600483015260248201869052604482018490527f000000000000000000000000000000000000000000000000000000000000000016906397c7033e90606401602060405180830381865afa158015610f84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa89190611df2565b15610fba575091979650505050505050565b60405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726573696c69656e74206f7261636c65207072696365000060448201526064016103dd565b6065546001600160a01b031633146105a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103dd565b6001600160a01b0381166110c05760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b60648201526084016103dd565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09101610c36565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab9061114d9033908690600401611e5c565b602060405180830381865afa15801561116a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118e9190611df2565b905080610c3f57333083604051634a3fa29360e01b81526004016103dd93929190611e88565b6111bc6116d5565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b609780546001600160a01b03191690556103998161171e565b611227611770565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111e93390565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036112b2575073bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb919050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361131257507f0000000000000000000000000000000000000000000000000000000000000000919050565b816001600160a01b0316636f307dc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611350573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113749190611ebd565b90505b919050565b600054610100900460ff166113a35760405162461bcd60e51b81526004016103dd90611eda565b6113ab6117b6565b610399816117e5565b600054610100900460ff166113db5760405162461bcd60e51b81526004016103dd90611eda565b6105a661180c565b6000806000806113f48760006107d7565b9150915080801561140d57506001600160a01b03821615155b156115545760405163fc57d4df60e01b81526001600160a01b03888116600483015283169063fc57d4df90602401602060405180830381865afa925050508015611474575060408051601f3d908101601f1916820190925261147191810190611dd9565b60015b6114865760008093509350505061155e565b856114995793506001925061155e915050565b866114ac5793506000925061155e915050565b604051634be3819f60e11b81526001600160a01b038981166004830152602482018390526044820189905282917f0000000000000000000000000000000000000000000000000000000000000000909116906397c7033e90606401602060405180830381865afa158015611524573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115489190611df2565b9450945050505061155e565b6000809350935050505b935093915050565b6000806000806115778660026107d7565b9150915080801561159057506001600160a01b03821615155b156116c45760405163fc57d4df60e01b81526001600160a01b03878116600483015283169063fc57d4df90602401602060405180830381865afa9250505080156115f7575060408051601f3d908101601f191682019092526115f491810190611dd9565b60015b611609576000809350935050506116ce565b8561161c579350600092506116ce915050565b604051634be3819f60e11b81526001600160a01b038881166004830152602482018390526044820188905282917f0000000000000000000000000000000000000000000000000000000000000000909116906397c7033e90606401602060405180830381865afa158015611694573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b89190611df2565b945094505050506116ce565b6000809350935050505b9250929050565b60335460ff166105a65760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103dd565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60335460ff16156105a65760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103dd565b600054610100900460ff166117dd5760405162461bcd60e51b81526004016103dd90611eda565b6105a661183f565b600054610100900460ff166103905760405162461bcd60e51b81526004016103dd90611eda565b600054610100900460ff166118335760405162461bcd60e51b81526004016103dd90611eda565b6033805460ff19169055565b600054610100900460ff166118665760405162461bcd60e51b81526004016103dd90611eda565b6105a633611206565b82600381019282156118b7579160200282015b828111156118b757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611882565b506118c3929150611989565b5090565b6001830191839082156118b75791602002820160005b8382111561191a57835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026118dd565b80156119475782816101000a81549060ff021916905560010160208160000104928301926001030261191a565b50506118c3929150611989565b604051806060016040528060006001600160a01b0316815260200161197761199e565b815260200161198461199e565b905290565b5b808211156118c3576000815560010161198a565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461039957600080fd5b6000602082840312156119e357600080fd5b81356119ee816119bc565b9392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611a2e57611a2e6119f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611a5d57611a5d6119f5565b604052919050565b801515811461039957600080fd5b600082601f830112611a8457600080fd5b611a8c611a0b565b806060840185811115611a9e57600080fd5b845b81811015611ac1578035611ab381611a65565b845260209384019301611aa0565b509095945050505050565b600060e08284031215611ade57600080fd5b611ae6611a0b565b90508135611af3816119bc565b81526020603f83018413611b0657600080fd5b611b0e611a0b565b806080850186811115611b2057600080fd5b8386015b81811015611b44578035611b37816119bc565b8452928401928401611b24565b508184860152611b548782611a73565b60408601525050505092915050565b60006020808385031215611b7657600080fd5b823567ffffffffffffffff80821115611b8e57600080fd5b818501915085601f830112611ba257600080fd5b813581811115611bb457611bb46119f5565b611bc2848260051b01611a34565b818152848101925060e0918202840185019188831115611be157600080fd5b938501935b82851015611c0757611bf88986611acc565b84529384019392850192611be6565b50979650505050505050565b600060e08284031215611c2557600080fd5b6119ee8383611acc565b80356003811061137757600080fd5b600080600060608486031215611c5357600080fd5b8335611c5e816119bc565b9250611c6c60208501611c2f565b91506040840135611c7c81611a65565b809150509250925092565b60008060408385031215611c9a57600080fd5b8235611ca5816119bc565b9150611cb360208401611c2f565b90509250929050565b600080600060608486031215611cd157600080fd5b8335611cdc816119bc565b92506020840135611cec816119bc565b9150611cfa60408501611c2f565b90509250925092565b81516001600160a01b03908116825260208084015160e0840192919081850160005b6003811015611d44578251851682529183019190830190600101611d25565b505050604085015191506080840160005b6003811015611d74578351151582529282019290820190600101611d55565b5050505092915050565b634e487b7160e01b600052603260045260246000fd5b60208082526015908201527463616e2774206265207a65726f206164647265737360581b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215611deb57600080fd5b5051919050565b600060208284031215611e0457600080fd5b81516119ee81611a65565b6000815180845260005b81811015611e3557602081850181015186830182015201611e19565b81811115611e47576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0383168152604060208201819052600090611e8090830184611e0f565b949350505050565b6001600160a01b03848116825283166020820152606060408201819052600090611eb490830184611e0f565b95945050505050565b600060208284031215611ecf57600080fd5b81516119ee816119bc565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220e79186f27c02864972a9c0dbea0e8a74a094aee6ad9ab92dc5e80958c2c891e864736f6c634300080d0033",
644
648
  "devdoc": {
645
649
  "kind": "dev",
646
650
  "methods": {
@@ -650,6 +654,7 @@
650
654
  "constructor": {
651
655
  "custom:oz-upgrades-unsafe-allow": "constructor",
652
656
  "params": {
657
+ "_boundValidator": "Address of the bound validator contract",
653
658
  "vBnbAddress": "The address of the vBNB",
654
659
  "vaiAddress": "The address of the VAI"
655
660
  }
@@ -691,9 +696,8 @@
691
696
  "_0": "price USD price in scaled decimal places."
692
697
  }
693
698
  },
694
- "initialize(address,address)": {
699
+ "initialize(address)": {
695
700
  "params": {
696
- "_boundValidator": "Address of the bound validator contract",
697
701
  "accessControlManager_": "Address of the access control manager contract"
698
702
  }
699
703
  },
@@ -742,7 +746,7 @@
742
746
  },
743
747
  "setTokenConfigs((address,address[3],bool[3])[])": {
744
748
  "custom:access": "Only Governance",
745
- "custom:error": "Throws a length error if the lenght of the token configs array is 0",
749
+ "custom:error": "Throws a length error if the length of the token configs array is 0",
746
750
  "params": {
747
751
  "tokenConfigs_": "Token config array"
748
752
  }
@@ -761,6 +765,9 @@
761
765
  }
762
766
  },
763
767
  "stateVariables": {
768
+ "boundValidator": {
769
+ "custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
770
+ },
764
771
  "vBnb": {
765
772
  "custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
766
773
  },
@@ -797,6 +804,9 @@
797
804
  "accessControlManager()": {
798
805
  "notice": "Returns the address of the access control manager contract"
799
806
  },
807
+ "boundValidator()": {
808
+ "notice": "Bound validator contract address"
809
+ },
800
810
  "constructor": {
801
811
  "notice": "Constructor for the implementation contract. Sets immutable variables."
802
812
  },
@@ -807,9 +817,9 @@
807
817
  "notice": "Gets oracle and enabled status by vToken address"
808
818
  },
809
819
  "getUnderlyingPrice(address)": {
810
- "notice": "Gets price of the underlying asset for a given vToken. Validation flow: - Check if the oracle is paused globally - Validate price from main oracle against pivot oracle - Validate price from fallback oracle against pivot oracle or main oracle if the first validation failed In the case that the pivot oracle is not available but main price is available and validation is successful, main oracle price is returned."
820
+ "notice": "Gets price of the underlying asset for a given vToken. Validation flow: - Check if the oracle is paused globally - Validate price from main oracle against pivot oracle - Validate price from fallback oracle against pivot oracle if the first validation failed - Validate price from main oracle against fallback oracle if the second validation failed In the case that the pivot oracle is not available but main price is available and validation is successful, main oracle price is returned."
811
821
  },
812
- "initialize(address,address)": {
822
+ "initialize(address)": {
813
823
  "notice": "Initializes the contract admin and sets the BoundValidator contract address"
814
824
  },
815
825
  "pause()": {
@@ -831,7 +841,7 @@
831
841
  "notice": "Unpauses oracle"
832
842
  },
833
843
  "updatePrice(address)": {
834
- "notice": "Updates the pivot oracle price. Currently using TWAP"
844
+ "notice": "Updates the TWAP pivot oracle price."
835
845
  },
836
846
  "vBnb()": {
837
847
  "notice": "vBNB address"
@@ -845,7 +855,7 @@
845
855
  "storageLayout": {
846
856
  "storage": [
847
857
  {
848
- "astId": 347,
858
+ "astId": 290,
849
859
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
850
860
  "label": "_initialized",
851
861
  "offset": 0,
@@ -853,7 +863,7 @@
853
863
  "type": "t_uint8"
854
864
  },
855
865
  {
856
- "astId": 350,
866
+ "astId": 293,
857
867
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
858
868
  "label": "_initializing",
859
869
  "offset": 1,
@@ -861,7 +871,7 @@
861
871
  "type": "t_bool"
862
872
  },
863
873
  {
864
- "astId": 961,
874
+ "astId": 904,
865
875
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
866
876
  "label": "__gap",
867
877
  "offset": 0,
@@ -869,7 +879,7 @@
869
879
  "type": "t_array(t_uint256)50_storage"
870
880
  },
871
881
  {
872
- "astId": 530,
882
+ "astId": 473,
873
883
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
874
884
  "label": "_paused",
875
885
  "offset": 0,
@@ -877,7 +887,7 @@
877
887
  "type": "t_bool"
878
888
  },
879
889
  {
880
- "astId": 635,
890
+ "astId": 578,
881
891
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
882
892
  "label": "__gap",
883
893
  "offset": 0,
@@ -885,7 +895,7 @@
885
895
  "type": "t_array(t_uint256)49_storage"
886
896
  },
887
897
  {
888
- "astId": 219,
898
+ "astId": 162,
889
899
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
890
900
  "label": "_owner",
891
901
  "offset": 0,
@@ -893,7 +903,7 @@
893
903
  "type": "t_address"
894
904
  },
895
905
  {
896
- "astId": 339,
906
+ "astId": 282,
897
907
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
898
908
  "label": "__gap",
899
909
  "offset": 0,
@@ -901,7 +911,7 @@
901
911
  "type": "t_array(t_uint256)49_storage"
902
912
  },
903
913
  {
904
- "astId": 128,
914
+ "astId": 71,
905
915
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
906
916
  "label": "_pendingOwner",
907
917
  "offset": 0,
@@ -909,7 +919,7 @@
909
919
  "type": "t_address"
910
920
  },
911
921
  {
912
- "astId": 207,
922
+ "astId": 150,
913
923
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
914
924
  "label": "__gap",
915
925
  "offset": 0,
@@ -917,15 +927,15 @@
917
927
  "type": "t_array(t_uint256)49_storage"
918
928
  },
919
929
  {
920
- "astId": 4978,
930
+ "astId": 3350,
921
931
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
922
932
  "label": "_accessControlManager",
923
933
  "offset": 0,
924
934
  "slot": "201",
925
- "type": "t_contract(IAccessControlManagerV8)5162"
935
+ "type": "t_contract(IAccessControlManagerV8)3534"
926
936
  },
927
937
  {
928
- "astId": 4983,
938
+ "astId": 3355,
929
939
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
930
940
  "label": "__gap",
931
941
  "offset": 0,
@@ -933,20 +943,12 @@
933
943
  "type": "t_array(t_uint256)49_storage"
934
944
  },
935
945
  {
936
- "astId": 5208,
937
- "contract": "contracts/ResilientOracle.sol:ResilientOracle",
938
- "label": "boundValidator",
939
- "offset": 0,
940
- "slot": "251",
941
- "type": "t_contract(BoundValidatorInterface)6066"
942
- },
943
- {
944
- "astId": 5213,
946
+ "astId": 3586,
945
947
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
946
948
  "label": "tokenConfigs",
947
949
  "offset": 0,
948
- "slot": "252",
949
- "type": "t_mapping(t_address,t_struct(TokenConfig)5192_storage)"
950
+ "slot": "251",
951
+ "type": "t_mapping(t_address,t_struct(TokenConfig)3564_storage)"
950
952
  }
951
953
  ],
952
954
  "types": {
@@ -984,29 +986,24 @@
984
986
  "label": "bool",
985
987
  "numberOfBytes": "1"
986
988
  },
987
- "t_contract(BoundValidatorInterface)6066": {
988
- "encoding": "inplace",
989
- "label": "contract BoundValidatorInterface",
990
- "numberOfBytes": "20"
991
- },
992
- "t_contract(IAccessControlManagerV8)5162": {
989
+ "t_contract(IAccessControlManagerV8)3534": {
993
990
  "encoding": "inplace",
994
991
  "label": "contract IAccessControlManagerV8",
995
992
  "numberOfBytes": "20"
996
993
  },
997
- "t_mapping(t_address,t_struct(TokenConfig)5192_storage)": {
994
+ "t_mapping(t_address,t_struct(TokenConfig)3564_storage)": {
998
995
  "encoding": "mapping",
999
996
  "key": "t_address",
1000
997
  "label": "mapping(address => struct ResilientOracle.TokenConfig)",
1001
998
  "numberOfBytes": "32",
1002
- "value": "t_struct(TokenConfig)5192_storage"
999
+ "value": "t_struct(TokenConfig)3564_storage"
1003
1000
  },
1004
- "t_struct(TokenConfig)5192_storage": {
1001
+ "t_struct(TokenConfig)3564_storage": {
1005
1002
  "encoding": "inplace",
1006
1003
  "label": "struct ResilientOracle.TokenConfig",
1007
1004
  "members": [
1008
1005
  {
1009
- "astId": 5181,
1006
+ "astId": 3553,
1010
1007
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
1011
1008
  "label": "asset",
1012
1009
  "offset": 0,
@@ -1014,7 +1011,7 @@
1014
1011
  "type": "t_address"
1015
1012
  },
1016
1013
  {
1017
- "astId": 5186,
1014
+ "astId": 3558,
1018
1015
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
1019
1016
  "label": "oracles",
1020
1017
  "offset": 0,
@@ -1022,7 +1019,7 @@
1022
1019
  "type": "t_array(t_address)3_storage"
1023
1020
  },
1024
1021
  {
1025
- "astId": 5191,
1022
+ "astId": 3563,
1026
1023
  "contract": "contracts/ResilientOracle.sol:ResilientOracle",
1027
1024
  "label": "enableFlagsForOracles",
1028
1025
  "offset": 0,