@venusprotocol/oracle 1.6.11 → 1.6.12

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 (126) hide show
  1. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +4 -0
  2. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.json +138 -0
  3. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +4 -0
  4. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.json +249 -0
  5. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +4 -0
  6. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.json +122 -0
  7. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
  8. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
  9. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
  10. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
  11. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +4 -0
  12. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +297 -0
  13. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +4 -0
  14. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +194 -0
  15. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +4 -0
  16. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +233 -0
  17. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
  18. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
  19. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
  20. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
  21. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
  22. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
  23. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
  24. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
  25. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
  26. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
  27. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +4 -0
  28. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +10 -0
  29. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +4 -0
  30. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +10 -0
  31. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
  32. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
  33. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +4 -0
  34. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +76 -0
  35. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +4 -0
  36. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +24 -0
  37. package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +4 -0
  38. package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.json +63 -0
  39. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +4 -0
  40. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +10 -0
  41. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +4 -0
  42. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +24 -0
  43. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
  44. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
  45. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +4 -0
  46. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +181 -0
  47. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +4 -0
  48. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +282 -0
  49. package/artifacts/build-info/fc01a49cbd804e304740a46d676189d0.json +1 -0
  50. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +4 -0
  51. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +617 -0
  52. package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +4 -0
  53. package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.json +79 -0
  54. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +4 -0
  55. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +40 -0
  56. package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +4 -0
  57. package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.json +30 -0
  58. package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +4 -0
  59. package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +43 -0
  60. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +4 -0
  61. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.json +49 -0
  62. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.dbg.json +4 -0
  63. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.json +30 -0
  64. package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +4 -0
  65. package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.json +545 -0
  66. package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +4 -0
  67. package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.json +446 -0
  68. package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +4 -0
  69. package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.json +10 -0
  70. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.dbg.json +4 -0
  71. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.json +30 -0
  72. package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +4 -0
  73. package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.json +246 -0
  74. package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +4 -0
  75. package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.json +10 -0
  76. package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +4 -0
  77. package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.json +60 -0
  78. package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +4 -0
  79. package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.json +10 -0
  80. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +4 -0
  81. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +342 -0
  82. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +4 -0
  83. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +392 -0
  84. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +4 -0
  85. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +462 -0
  86. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +4 -0
  87. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +445 -0
  88. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +4 -0
  89. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +663 -0
  90. package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +4 -0
  91. package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.json +116 -0
  92. package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +4 -0
  93. package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.json +144 -0
  94. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +4 -0
  95. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +144 -0
  96. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +4 -0
  97. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +163 -0
  98. package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +4 -0
  99. package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.json +163 -0
  100. package/artifacts/contracts/test/AccessControlManager.sol/AccessControlManagerScenario.dbg.json +4 -0
  101. package/artifacts/contracts/test/AccessControlManager.sol/AccessControlManagerScenario.json +364 -0
  102. package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +4 -0
  103. package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.json +328 -0
  104. package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +4 -0
  105. package/artifacts/contracts/test/MockPyth.sol/MockPyth.json +684 -0
  106. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +4 -0
  107. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.json +95 -0
  108. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +4 -0
  109. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.json +72 -0
  110. package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +4 -0
  111. package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.json +306 -0
  112. package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +4 -0
  113. package/artifacts/contracts/test/PancakePairHarness.sol/Math.json +10 -0
  114. package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +4 -0
  115. package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.json +158 -0
  116. package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +4 -0
  117. package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.json +10 -0
  118. package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +4 -0
  119. package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.json +346 -0
  120. package/contracts/ResilientOracle.sol +20 -21
  121. package/contracts/oracles/BinanceOracle.sol +4 -0
  122. package/contracts/oracles/BoundValidator.sol +3 -2
  123. package/contracts/oracles/ChainlinkOracle.sol +1 -1
  124. package/deployments/bscmainnet/BinanceOracle_Implementation.json +1 -1
  125. package/deployments/bsctestnet/BinanceOracle_Implementation.json +1 -1
  126. package/package.json +2 -2
@@ -0,0 +1,158 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "PancakePairHarness",
4
+ "sourceName": "contracts/test/PancakePairHarness.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "currentBlockTimestamp",
9
+ "outputs": [
10
+ {
11
+ "internalType": "uint32",
12
+ "name": "",
13
+ "type": "uint32"
14
+ }
15
+ ],
16
+ "stateMutability": "view",
17
+ "type": "function"
18
+ },
19
+ {
20
+ "inputs": [],
21
+ "name": "getReserves",
22
+ "outputs": [
23
+ {
24
+ "internalType": "uint112",
25
+ "name": "_reserve0",
26
+ "type": "uint112"
27
+ },
28
+ {
29
+ "internalType": "uint112",
30
+ "name": "_reserve1",
31
+ "type": "uint112"
32
+ },
33
+ {
34
+ "internalType": "uint32",
35
+ "name": "_blockTimestampLast",
36
+ "type": "uint32"
37
+ }
38
+ ],
39
+ "stateMutability": "view",
40
+ "type": "function"
41
+ },
42
+ {
43
+ "inputs": [
44
+ {
45
+ "internalType": "address",
46
+ "name": "_token0",
47
+ "type": "address"
48
+ },
49
+ {
50
+ "internalType": "address",
51
+ "name": "_token1",
52
+ "type": "address"
53
+ }
54
+ ],
55
+ "name": "initialize",
56
+ "outputs": [],
57
+ "stateMutability": "nonpayable",
58
+ "type": "function"
59
+ },
60
+ {
61
+ "inputs": [],
62
+ "name": "kLast",
63
+ "outputs": [
64
+ {
65
+ "internalType": "uint256",
66
+ "name": "",
67
+ "type": "uint256"
68
+ }
69
+ ],
70
+ "stateMutability": "view",
71
+ "type": "function"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "price0CumulativeLast",
76
+ "outputs": [
77
+ {
78
+ "internalType": "uint256",
79
+ "name": "",
80
+ "type": "uint256"
81
+ }
82
+ ],
83
+ "stateMutability": "view",
84
+ "type": "function"
85
+ },
86
+ {
87
+ "inputs": [],
88
+ "name": "price1CumulativeLast",
89
+ "outputs": [
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "",
93
+ "type": "uint256"
94
+ }
95
+ ],
96
+ "stateMutability": "view",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "token0",
102
+ "outputs": [
103
+ {
104
+ "internalType": "address",
105
+ "name": "",
106
+ "type": "address"
107
+ }
108
+ ],
109
+ "stateMutability": "view",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [],
114
+ "name": "token1",
115
+ "outputs": [
116
+ {
117
+ "internalType": "address",
118
+ "name": "",
119
+ "type": "address"
120
+ }
121
+ ],
122
+ "stateMutability": "view",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [
127
+ {
128
+ "internalType": "uint256",
129
+ "name": "balance0",
130
+ "type": "uint256"
131
+ },
132
+ {
133
+ "internalType": "uint256",
134
+ "name": "balance1",
135
+ "type": "uint256"
136
+ },
137
+ {
138
+ "internalType": "uint112",
139
+ "name": "_reserve0",
140
+ "type": "uint112"
141
+ },
142
+ {
143
+ "internalType": "uint112",
144
+ "name": "_reserve1",
145
+ "type": "uint112"
146
+ }
147
+ ],
148
+ "name": "update",
149
+ "outputs": [],
150
+ "stateMutability": "nonpayable",
151
+ "type": "function"
152
+ }
153
+ ],
154
+ "bytecode": "0x608060405234801561001057600080fd5b506105c6806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635a3d5493116100665780635a3d5493146101495780637464fc3d14610152578063abf812721461015b578063d21220a714610170578063d9fc83c61461018357600080fd5b80630902f1ac146100985780630dfe1681146100d5578063485cc955146100f55780635909c0d514610133575b600080fd5b6002546040516100cc916001600160701b0380821692600160701b830490911691600160e01b900463ffffffff169061035a565b60405180910390f35b6000546100e8906001600160a01b031681565b6040516100cc91906103a4565b6101316101033660046103d4565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b005b61013c60035481565b6040516100cc9190610417565b61013c60045481565b61013c60055481565b610163610196565b6040516100cc9190610425565b6001546100e8906001600160a01b031681565b61013161019136600461045e565b6101ac565b60006101a7640100000000426104d8565b905090565b6001600160701b0384118015906101ca57506001600160701b038311155b6101ef5760405162461bcd60e51b81526004016101e6906104ec565b60405180910390fd5b6000610200640100000000426104d8565b60025490915063ffffffff600160e01b909104811682039081161580159061023057506001600160701b03841615155b801561024457506001600160701b03831615155b156102af578063ffffffff1661026c8561025d86610302565b6001600160e01b031690610321565b600380546001600160e01b03929092169290920201905563ffffffff81166102978461025d87610302565b600480546001600160e01b0392909216929092020190555b506002805463ffffffff909216600160e01b026001600160e01b036001600160701b03968716600160701b026001600160e01b031990941696909716959095179190911794909416929092179092555050565b600061031b600160701b6001600160701b038416610533565b92915050565b60006103366001600160701b0383168461056f565b9392505050565b6001600160701b0381165b82525050565b63ffffffff8116610348565b60608101610368828661033d565b610375602083018561033d565b610382604083018461034e565b949350505050565b60006001600160a01b03821661031b565b6103488161038a565b6020810161031b828461039b565b6103bb8161038a565b81146103c657600080fd5b50565b803561031b816103b2565b600080604083850312156103ea576103ea600080fd5b60006103f685856103c9565b9250506020610407858286016103c9565b9150509250929050565b80610348565b6020810161031b8284610411565b6020810161031b828461034e565b806103bb565b803561031b81610433565b6001600160701b0381166103bb565b803561031b81610444565b6000806000806080858703121561047757610477600080fd5b60006104838787610439565b945050602061049487828801610439565b93505060406104a587828801610453565b92505060606104b687828801610453565b91505092959194509250565b634e487b7160e01b600052601260045260246000fd5b6000826104e7576104e76104c2565b500690565b6020808252810161031b81601381527250616e63616b6556323a204f564552464c4f5760681b602082015260400190565b634e487b7160e01b600052601160045260246000fd5b60006001600160e01b03821691506001600160e01b0383169250816001600160e01b03048311821515161561056a5761056a61051d565b500290565b6001600160e01b03918216911660008261058b5761058b6104c2565b50049056fea26469706673582212206e9b26bf5b7a7719090836cf52f105a8d4c0357d5e574350080f3d7e95689e0764736f6c634300080d0033",
155
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635a3d5493116100665780635a3d5493146101495780637464fc3d14610152578063abf812721461015b578063d21220a714610170578063d9fc83c61461018357600080fd5b80630902f1ac146100985780630dfe1681146100d5578063485cc955146100f55780635909c0d514610133575b600080fd5b6002546040516100cc916001600160701b0380821692600160701b830490911691600160e01b900463ffffffff169061035a565b60405180910390f35b6000546100e8906001600160a01b031681565b6040516100cc91906103a4565b6101316101033660046103d4565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b005b61013c60035481565b6040516100cc9190610417565b61013c60045481565b61013c60055481565b610163610196565b6040516100cc9190610425565b6001546100e8906001600160a01b031681565b61013161019136600461045e565b6101ac565b60006101a7640100000000426104d8565b905090565b6001600160701b0384118015906101ca57506001600160701b038311155b6101ef5760405162461bcd60e51b81526004016101e6906104ec565b60405180910390fd5b6000610200640100000000426104d8565b60025490915063ffffffff600160e01b909104811682039081161580159061023057506001600160701b03841615155b801561024457506001600160701b03831615155b156102af578063ffffffff1661026c8561025d86610302565b6001600160e01b031690610321565b600380546001600160e01b03929092169290920201905563ffffffff81166102978461025d87610302565b600480546001600160e01b0392909216929092020190555b506002805463ffffffff909216600160e01b026001600160e01b036001600160701b03968716600160701b026001600160e01b031990941696909716959095179190911794909416929092179092555050565b600061031b600160701b6001600160701b038416610533565b92915050565b60006103366001600160701b0383168461056f565b9392505050565b6001600160701b0381165b82525050565b63ffffffff8116610348565b60608101610368828661033d565b610375602083018561033d565b610382604083018461034e565b949350505050565b60006001600160a01b03821661031b565b6103488161038a565b6020810161031b828461039b565b6103bb8161038a565b81146103c657600080fd5b50565b803561031b816103b2565b600080604083850312156103ea576103ea600080fd5b60006103f685856103c9565b9250506020610407858286016103c9565b9150509250929050565b80610348565b6020810161031b8284610411565b6020810161031b828461034e565b806103bb565b803561031b81610433565b6001600160701b0381166103bb565b803561031b81610444565b6000806000806080858703121561047757610477600080fd5b60006104838787610439565b945050602061049487828801610439565b93505060406104a587828801610453565b92505060606104b687828801610453565b91505092959194509250565b634e487b7160e01b600052601260045260246000fd5b6000826104e7576104e76104c2565b500690565b6020808252810161031b81601381527250616e63616b6556323a204f564552464c4f5760681b602082015260400190565b634e487b7160e01b600052601160045260246000fd5b60006001600160e01b03821691506001600160e01b0383169250816001600160e01b03048311821515161561056a5761056a61051d565b500290565b6001600160e01b03918216911660008261058b5761058b6104c2565b50049056fea26469706673582212206e9b26bf5b7a7719090836cf52f105a8d4c0357d5e574350080f3d7e95689e0764736f6c634300080d0033",
156
+ "linkReferences": {},
157
+ "deployedLinkReferences": {}
158
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/fc01a49cbd804e304740a46d676189d0.json"
4
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "UQ112x112",
4
+ "sourceName": "contracts/test/PancakePairHarness.sol",
5
+ "abi": [],
6
+ "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200a6a8fc691d6e00bd7d6ab40dd7cc349b0a999a66c80bd7e2c1698c07f6ca21664736f6c634300080d0033",
7
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200a6a8fc691d6e00bd7d6ab40dd7cc349b0a999a66c80bd7e2c1698c07f6ca21664736f6c634300080d0033",
8
+ "linkReferences": {},
9
+ "deployedLinkReferences": {}
10
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/fc01a49cbd804e304740a46d676189d0.json"
4
+ }
@@ -0,0 +1,346 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "VBEP20Harness",
4
+ "sourceName": "contracts/test/VBEP20Harness.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "string",
10
+ "name": "name_",
11
+ "type": "string"
12
+ },
13
+ {
14
+ "internalType": "string",
15
+ "name": "symbol_",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "internalType": "uint8",
20
+ "name": "decimals",
21
+ "type": "uint8"
22
+ },
23
+ {
24
+ "internalType": "address",
25
+ "name": "underlying_",
26
+ "type": "address"
27
+ }
28
+ ],
29
+ "stateMutability": "nonpayable",
30
+ "type": "constructor"
31
+ },
32
+ {
33
+ "anonymous": false,
34
+ "inputs": [
35
+ {
36
+ "indexed": true,
37
+ "internalType": "address",
38
+ "name": "owner",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "indexed": true,
43
+ "internalType": "address",
44
+ "name": "spender",
45
+ "type": "address"
46
+ },
47
+ {
48
+ "indexed": false,
49
+ "internalType": "uint256",
50
+ "name": "value",
51
+ "type": "uint256"
52
+ }
53
+ ],
54
+ "name": "Approval",
55
+ "type": "event"
56
+ },
57
+ {
58
+ "anonymous": false,
59
+ "inputs": [
60
+ {
61
+ "indexed": true,
62
+ "internalType": "address",
63
+ "name": "from",
64
+ "type": "address"
65
+ },
66
+ {
67
+ "indexed": true,
68
+ "internalType": "address",
69
+ "name": "to",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "indexed": false,
74
+ "internalType": "uint256",
75
+ "name": "value",
76
+ "type": "uint256"
77
+ }
78
+ ],
79
+ "name": "Transfer",
80
+ "type": "event"
81
+ },
82
+ {
83
+ "inputs": [
84
+ {
85
+ "internalType": "address",
86
+ "name": "owner",
87
+ "type": "address"
88
+ },
89
+ {
90
+ "internalType": "address",
91
+ "name": "spender",
92
+ "type": "address"
93
+ }
94
+ ],
95
+ "name": "allowance",
96
+ "outputs": [
97
+ {
98
+ "internalType": "uint256",
99
+ "name": "",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "stateMutability": "view",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [
108
+ {
109
+ "internalType": "address",
110
+ "name": "spender",
111
+ "type": "address"
112
+ },
113
+ {
114
+ "internalType": "uint256",
115
+ "name": "amount",
116
+ "type": "uint256"
117
+ }
118
+ ],
119
+ "name": "approve",
120
+ "outputs": [
121
+ {
122
+ "internalType": "bool",
123
+ "name": "",
124
+ "type": "bool"
125
+ }
126
+ ],
127
+ "stateMutability": "nonpayable",
128
+ "type": "function"
129
+ },
130
+ {
131
+ "inputs": [
132
+ {
133
+ "internalType": "address",
134
+ "name": "account",
135
+ "type": "address"
136
+ }
137
+ ],
138
+ "name": "balanceOf",
139
+ "outputs": [
140
+ {
141
+ "internalType": "uint256",
142
+ "name": "",
143
+ "type": "uint256"
144
+ }
145
+ ],
146
+ "stateMutability": "view",
147
+ "type": "function"
148
+ },
149
+ {
150
+ "inputs": [],
151
+ "name": "decimals",
152
+ "outputs": [
153
+ {
154
+ "internalType": "uint8",
155
+ "name": "",
156
+ "type": "uint8"
157
+ }
158
+ ],
159
+ "stateMutability": "view",
160
+ "type": "function"
161
+ },
162
+ {
163
+ "inputs": [],
164
+ "name": "decimalsInternal",
165
+ "outputs": [
166
+ {
167
+ "internalType": "uint8",
168
+ "name": "",
169
+ "type": "uint8"
170
+ }
171
+ ],
172
+ "stateMutability": "view",
173
+ "type": "function"
174
+ },
175
+ {
176
+ "inputs": [
177
+ {
178
+ "internalType": "address",
179
+ "name": "spender",
180
+ "type": "address"
181
+ },
182
+ {
183
+ "internalType": "uint256",
184
+ "name": "subtractedValue",
185
+ "type": "uint256"
186
+ }
187
+ ],
188
+ "name": "decreaseAllowance",
189
+ "outputs": [
190
+ {
191
+ "internalType": "bool",
192
+ "name": "",
193
+ "type": "bool"
194
+ }
195
+ ],
196
+ "stateMutability": "nonpayable",
197
+ "type": "function"
198
+ },
199
+ {
200
+ "inputs": [
201
+ {
202
+ "internalType": "uint256",
203
+ "name": "amount",
204
+ "type": "uint256"
205
+ }
206
+ ],
207
+ "name": "faucet",
208
+ "outputs": [],
209
+ "stateMutability": "nonpayable",
210
+ "type": "function"
211
+ },
212
+ {
213
+ "inputs": [
214
+ {
215
+ "internalType": "address",
216
+ "name": "spender",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "internalType": "uint256",
221
+ "name": "addedValue",
222
+ "type": "uint256"
223
+ }
224
+ ],
225
+ "name": "increaseAllowance",
226
+ "outputs": [
227
+ {
228
+ "internalType": "bool",
229
+ "name": "",
230
+ "type": "bool"
231
+ }
232
+ ],
233
+ "stateMutability": "nonpayable",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [],
238
+ "name": "name",
239
+ "outputs": [
240
+ {
241
+ "internalType": "string",
242
+ "name": "",
243
+ "type": "string"
244
+ }
245
+ ],
246
+ "stateMutability": "view",
247
+ "type": "function"
248
+ },
249
+ {
250
+ "inputs": [],
251
+ "name": "symbol",
252
+ "outputs": [
253
+ {
254
+ "internalType": "string",
255
+ "name": "",
256
+ "type": "string"
257
+ }
258
+ ],
259
+ "stateMutability": "view",
260
+ "type": "function"
261
+ },
262
+ {
263
+ "inputs": [],
264
+ "name": "totalSupply",
265
+ "outputs": [
266
+ {
267
+ "internalType": "uint256",
268
+ "name": "",
269
+ "type": "uint256"
270
+ }
271
+ ],
272
+ "stateMutability": "view",
273
+ "type": "function"
274
+ },
275
+ {
276
+ "inputs": [
277
+ {
278
+ "internalType": "address",
279
+ "name": "to",
280
+ "type": "address"
281
+ },
282
+ {
283
+ "internalType": "uint256",
284
+ "name": "amount",
285
+ "type": "uint256"
286
+ }
287
+ ],
288
+ "name": "transfer",
289
+ "outputs": [
290
+ {
291
+ "internalType": "bool",
292
+ "name": "",
293
+ "type": "bool"
294
+ }
295
+ ],
296
+ "stateMutability": "nonpayable",
297
+ "type": "function"
298
+ },
299
+ {
300
+ "inputs": [
301
+ {
302
+ "internalType": "address",
303
+ "name": "from",
304
+ "type": "address"
305
+ },
306
+ {
307
+ "internalType": "address",
308
+ "name": "to",
309
+ "type": "address"
310
+ },
311
+ {
312
+ "internalType": "uint256",
313
+ "name": "amount",
314
+ "type": "uint256"
315
+ }
316
+ ],
317
+ "name": "transferFrom",
318
+ "outputs": [
319
+ {
320
+ "internalType": "bool",
321
+ "name": "",
322
+ "type": "bool"
323
+ }
324
+ ],
325
+ "stateMutability": "nonpayable",
326
+ "type": "function"
327
+ },
328
+ {
329
+ "inputs": [],
330
+ "name": "underlying",
331
+ "outputs": [
332
+ {
333
+ "internalType": "address",
334
+ "name": "",
335
+ "type": "address"
336
+ }
337
+ ],
338
+ "stateMutability": "view",
339
+ "type": "function"
340
+ }
341
+ ],
342
+ "bytecode": "0x60806040526005805460ff191660121790553480156200001e57600080fd5b5060405162000f5038038062000f508339810160408190526200004191620002e5565b838383828281600390805190602001906200005e929190620000b1565b50805162000074906004906020840190620000b1565b5050600580546001600160a01b03909616610100026001600160a81b031990961660ff9093169290921794909417905550620003d0945050505050565b828054620000bf90620003a0565b90600052602060002090601f016020900481019282620000e357600085556200012e565b82601f10620000fe57805160ff19168380011785556200012e565b828001600101855582156200012e579182015b828111156200012e57825182559160200191906001019062000111565b506200013c92915062000140565b5090565b5b808211156200013c576000815560010162000141565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b038211171562000195576200019562000157565b6040525050565b6000620001a860405190565b9050620001b682826200016d565b919050565b60006001600160401b03821115620001d757620001d762000157565b601f19601f83011660200192915050565b60005b8381101562000205578181015183820152602001620001eb565b8381111562000215576000848401525b50505050565b6000620002326200022c84620001bb565b6200019c565b9050828152602081018484840111156200024f576200024f600080fd5b6200025c848285620001e8565b509392505050565b600082601f8301126200027a576200027a600080fd5b81516200028c8482602086016200021b565b949350505050565b60ff81165b8114620002a557600080fd5b50565b8051620002b58162000294565b92915050565b60006001600160a01b038216620002b5565b6200029981620002bb565b8051620002b581620002cd565b60008060008060808587031215620003005762000300600080fd5b84516001600160401b038111156200031b576200031b600080fd5b620003298782880162000264565b94505060208501516001600160401b038111156200034a576200034a600080fd5b620003588782880162000264565b93505060406200036b87828801620002a8565b92505060606200037e87828801620002d8565b91505092959194509250565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620003b557607f821691505b602082108103620003ca57620003ca6200038a565b50919050565b610b7080620003e06000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063579158971161008c57806395d89b411161006657806395d89b41146101e8578063a457c2d7146101f0578063a9059cbb14610203578063dd62ed3e1461021657600080fd5b806357915897146101855780636f307dc31461019a57806370a08231146101bf57600080fd5b806323b872dd116100c857806323b872dd1461013e578063313ce5671461015157806339509351146101655780634511bf6b1461017857600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd1461012d575b600080fd5b6100f7610229565b6040516101049190610698565b60405180910390f35b61012061011b3660046106f1565b6102bb565b6040516101049190610738565b6002545b604051610104919061074c565b61012061014c36600461075a565b6102d5565b60055460ff165b60405161010491906107b3565b6101206101733660046106f1565b6102f9565b6005546101589060ff1681565b6101986101933660046107c1565b61031b565b005b6005546101b29061010090046001600160a01b031681565b60405161010491906107f3565b6101316101cd366004610801565b6001600160a01b031660009081526020819052604090205490565b6100f7610328565b6101206101fe3660046106f1565b610337565b6101206102113660046106f1565b61037d565b610131610224366004610822565b61038b565b6060600380546102389061086b565b80601f01602080910402602001604051908101604052809291908181526020018280546102649061086b565b80156102b15780601f10610286576101008083540402835291602001916102b1565b820191906000526020600020905b81548152906001019060200180831161029457829003601f168201915b5050505050905090565b6000336102c98185856103b6565b60019150505b92915050565b6000336102e385828561046a565b6102ee8585856104b4565b506001949350505050565b6000336102c981858561030c838361038b565b61031691906108ad565b6103b6565b61032533826105a4565b50565b6060600480546102389061086b565b60003381610345828661038b565b9050838110156103705760405162461bcd60e51b81526004016103679061090a565b60405180910390fd5b6102ee82868684036103b6565b6000336102c98185856104b4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103dc5760405162461bcd60e51b81526004016103679061095b565b6001600160a01b0382166104025760405162461bcd60e51b8152600401610367906109aa565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061045d90859061074c565b60405180910390a3505050565b6000610476848461038b565b905060001981146104ae57818110156104a15760405162461bcd60e51b8152600401610367906109f1565b6104ae84848484036103b6565b50505050565b6001600160a01b0383166104da5760405162461bcd60e51b815260040161036790610a43565b6001600160a01b0382166105005760405162461bcd60e51b815260040161036790610a93565b6001600160a01b038316600090815260208190526040902054818110156105395760405162461bcd60e51b815260040161036790610ae6565b6001600160a01b0380851660008181526020819052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061059790869061074c565b60405180910390a36104ae565b6001600160a01b0382166105ca5760405162461bcd60e51b815260040161036790610b2a565b80600260008282546105dc91906108ad565b90915550506001600160a01b038216600081815260208190526040808220805485019055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061062e90859061074c565b60405180910390a35050565b60005b8381101561065557818101518382015260200161063d565b838111156104ae5750506000910152565b6000610670825190565b80845260208401935061068781856020860161063a565b601f01601f19169290920192915050565b602080825281016106a98184610666565b9392505050565b60006001600160a01b0382166102cf565b6106ca816106b0565b811461032557600080fd5b80356102cf816106c1565b806106ca565b80356102cf816106e0565b6000806040838503121561070757610707600080fd5b600061071385856106d5565b9250506020610724858286016106e6565b9150509250929050565b8015155b82525050565b602081016102cf828461072e565b80610732565b602081016102cf8284610746565b60008060006060848603121561077257610772600080fd5b600061077e86866106d5565b935050602061078f868287016106d5565b92505060406107a0868287016106e6565b9150509250925092565b60ff8116610732565b602081016102cf82846107aa565b6000602082840312156107d6576107d6600080fd5b60006107e284846106e6565b949350505050565b610732816106b0565b602081016102cf82846107ea565b60006020828403121561081657610816600080fd5b60006107e284846106d5565b6000806040838503121561083857610838600080fd5b600061084485856106d5565b9250506020610724858286016106d5565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061087f57607f821691505b60208210810361089157610891610855565b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156108c0576108c0610897565b500190565b602581526000602082017f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77815264207a65726f60d81b602082015291505b5060400190565b602080825281016102cf816108c5565b602481526000602082017f45524332303a20617070726f76652066726f6d20746865207a65726f206164648152637265737360e01b60208201529150610903565b602080825281016102cf8161091a565b602281526000602082017f45524332303a20617070726f766520746f20746865207a65726f206164647265815261737360f01b60208201529150610903565b602080825281016102cf8161096b565b601d81526000602082017f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000815291505b5060200190565b602080825281016102cf816109ba565b602581526000602082017f45524332303a207472616e736665722066726f6d20746865207a65726f206164815264647265737360d81b60208201529150610903565b602080825281016102cf81610a01565b602381526000602082017f45524332303a207472616e7366657220746f20746865207a65726f206164647281526265737360e81b60208201529150610903565b602080825281016102cf81610a53565b602681526000602082017f45524332303a207472616e7366657220616d6f756e7420657863656564732062815265616c616e636560d01b60208201529150610903565b602080825281016102cf81610aa3565b601f81526000602082017f45524332303a206d696e7420746f20746865207a65726f206164647265737300815291506109ea565b602080825281016102cf81610af656fea2646970667358221220e0222b87c9304c004fd0700da26b696ee0872dd387d7cd051c66f9d20b847a1f64736f6c634300080d0033",
343
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063579158971161008c57806395d89b411161006657806395d89b41146101e8578063a457c2d7146101f0578063a9059cbb14610203578063dd62ed3e1461021657600080fd5b806357915897146101855780636f307dc31461019a57806370a08231146101bf57600080fd5b806323b872dd116100c857806323b872dd1461013e578063313ce5671461015157806339509351146101655780634511bf6b1461017857600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd1461012d575b600080fd5b6100f7610229565b6040516101049190610698565b60405180910390f35b61012061011b3660046106f1565b6102bb565b6040516101049190610738565b6002545b604051610104919061074c565b61012061014c36600461075a565b6102d5565b60055460ff165b60405161010491906107b3565b6101206101733660046106f1565b6102f9565b6005546101589060ff1681565b6101986101933660046107c1565b61031b565b005b6005546101b29061010090046001600160a01b031681565b60405161010491906107f3565b6101316101cd366004610801565b6001600160a01b031660009081526020819052604090205490565b6100f7610328565b6101206101fe3660046106f1565b610337565b6101206102113660046106f1565b61037d565b610131610224366004610822565b61038b565b6060600380546102389061086b565b80601f01602080910402602001604051908101604052809291908181526020018280546102649061086b565b80156102b15780601f10610286576101008083540402835291602001916102b1565b820191906000526020600020905b81548152906001019060200180831161029457829003601f168201915b5050505050905090565b6000336102c98185856103b6565b60019150505b92915050565b6000336102e385828561046a565b6102ee8585856104b4565b506001949350505050565b6000336102c981858561030c838361038b565b61031691906108ad565b6103b6565b61032533826105a4565b50565b6060600480546102389061086b565b60003381610345828661038b565b9050838110156103705760405162461bcd60e51b81526004016103679061090a565b60405180910390fd5b6102ee82868684036103b6565b6000336102c98185856104b4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103dc5760405162461bcd60e51b81526004016103679061095b565b6001600160a01b0382166104025760405162461bcd60e51b8152600401610367906109aa565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061045d90859061074c565b60405180910390a3505050565b6000610476848461038b565b905060001981146104ae57818110156104a15760405162461bcd60e51b8152600401610367906109f1565b6104ae84848484036103b6565b50505050565b6001600160a01b0383166104da5760405162461bcd60e51b815260040161036790610a43565b6001600160a01b0382166105005760405162461bcd60e51b815260040161036790610a93565b6001600160a01b038316600090815260208190526040902054818110156105395760405162461bcd60e51b815260040161036790610ae6565b6001600160a01b0380851660008181526020819052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061059790869061074c565b60405180910390a36104ae565b6001600160a01b0382166105ca5760405162461bcd60e51b815260040161036790610b2a565b80600260008282546105dc91906108ad565b90915550506001600160a01b038216600081815260208190526040808220805485019055517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061062e90859061074c565b60405180910390a35050565b60005b8381101561065557818101518382015260200161063d565b838111156104ae5750506000910152565b6000610670825190565b80845260208401935061068781856020860161063a565b601f01601f19169290920192915050565b602080825281016106a98184610666565b9392505050565b60006001600160a01b0382166102cf565b6106ca816106b0565b811461032557600080fd5b80356102cf816106c1565b806106ca565b80356102cf816106e0565b6000806040838503121561070757610707600080fd5b600061071385856106d5565b9250506020610724858286016106e6565b9150509250929050565b8015155b82525050565b602081016102cf828461072e565b80610732565b602081016102cf8284610746565b60008060006060848603121561077257610772600080fd5b600061077e86866106d5565b935050602061078f868287016106d5565b92505060406107a0868287016106e6565b9150509250925092565b60ff8116610732565b602081016102cf82846107aa565b6000602082840312156107d6576107d6600080fd5b60006107e284846106e6565b949350505050565b610732816106b0565b602081016102cf82846107ea565b60006020828403121561081657610816600080fd5b60006107e284846106d5565b6000806040838503121561083857610838600080fd5b600061084485856106d5565b9250506020610724858286016106d5565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061087f57607f821691505b60208210810361089157610891610855565b50919050565b634e487b7160e01b600052601160045260246000fd5b600082198211156108c0576108c0610897565b500190565b602581526000602082017f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77815264207a65726f60d81b602082015291505b5060400190565b602080825281016102cf816108c5565b602481526000602082017f45524332303a20617070726f76652066726f6d20746865207a65726f206164648152637265737360e01b60208201529150610903565b602080825281016102cf8161091a565b602281526000602082017f45524332303a20617070726f766520746f20746865207a65726f206164647265815261737360f01b60208201529150610903565b602080825281016102cf8161096b565b601d81526000602082017f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000815291505b5060200190565b602080825281016102cf816109ba565b602581526000602082017f45524332303a207472616e736665722066726f6d20746865207a65726f206164815264647265737360d81b60208201529150610903565b602080825281016102cf81610a01565b602381526000602082017f45524332303a207472616e7366657220746f20746865207a65726f206164647281526265737360e81b60208201529150610903565b602080825281016102cf81610a53565b602681526000602082017f45524332303a207472616e7366657220616d6f756e7420657863656564732062815265616c616e636560d01b60208201529150610903565b602080825281016102cf81610aa3565b601f81526000602082017f45524332303a206d696e7420746f20746865207a65726f206164647265737300815291506109ea565b602080825281016102cf81610af656fea2646970667358221220e0222b87c9304c004fd0700da26b696ee0872dd387d7cd051c66f9d20b847a1f64736f6c634300080d0033",
344
+ "linkReferences": {},
345
+ "deployedLinkReferences": {}
346
+ }
@@ -10,26 +10,25 @@ import "@venusprotocol/governance-contracts/contracts/Governance/AccessControlle
10
10
  /**
11
11
  * @title ResilientOracle
12
12
  * @author Venus
13
- * @notice Resillient oracle is the price oracle that the protocol interacts with for fetching price of assets.
13
+ * @notice The Resilient Oracle is the main contract that the protocol uses to fetch prices of assets.
14
14
  *
15
- * DeFi Protocols are usually vulnerable to price oracles reporting incorrect prices. There are various ways in which
16
- * oracle prices can be manipulated depending on the type of price oracle used which can create a single point of
17
- * failure and opens several ways for attacking the protocol.
15
+ * DeFi protocols are vulnerable to price oracle failures including oracle manipulation and incorrectly
16
+ * reported prices. If only one oracle is used, this creates a single point of failure and opens a vector
17
+ * for attacking the protocol.
18
18
  *
19
- * Keeping this in mind, we have designed a resilient oracle which uses multiple oracle sources to validate prices
20
- * and fallback mechanisms to provide accurate prices and protect from oracle attacks. Currently it includes
21
- * integrations with Chainlink, Pyth, Binance Oracle and TWAP (Time-Weighted Average Price) oracles. TWAP uses
22
- * PancakeSwap as the on-chain price source.
19
+ * The Resilient Oracle uses multiple sources and fallback mechanisms to provide accurate prices and protect
20
+ * the protocol from oracle attacks. Currently it includes integrations with Chainlink, Pyth, Binance Oracle
21
+ * and TWAP (Time-Weighted Average Price) oracles. TWAP uses PancakeSwap as the on-chain price source.
23
22
  *
24
- * The way the Resilient Oracle works is for every market (vToken) we configure the main, pivot and fallback oracles.
25
- * The main oracle oracle is the most trustworthy price source, the pivot oracle is is used as a loose sanity
26
- * checker and the fallback oracle is used as a backup price source.
23
+ * For every market (vToken) we configure the main, pivot and fallback oracles. The main oracle oracle is the
24
+ * most trustworthy price source, the pivot oracle is used as a loose sanity checker and the fallback oracle
25
+ * is used as a backup price source.
27
26
  *
28
- * To validate the price between two oracles we set an **upper** and **lower** bound ratio for every market. The
29
- * **upper bound ratio** represents the **deviation** between **reported prices** (price from oracle that’s being
30
- * validated) and anchor price (price from oracle we are validating against) beyond which the reported price will
31
- * be invalidated. And the **lower bound ratio** presents the **deviation** between **reported price and anchor price**
32
- * below which the reported price will be invalidated. So for oracle price to be considered valid the below statement
27
+ * To validate prices returned from two oracles, we use an upper and lower bound ratio that is set for every
28
+ * market. The upper bound ratio represents the deviation between reported price (the price that’s being
29
+ * validated) and the anchor price (the price we are validating against) above which the reported price will
30
+ * be invalidated. The lower bound ratio presents the deviation between reported price and anchor price below
31
+ * which the reported price will be invalidated. So for oracle price to be considered valid the below statement
33
32
  * should be true:
34
33
 
35
34
  ```
@@ -37,12 +36,12 @@ anchorRatio = anchorPrice/reporterPrice
37
36
  isValid = anchorRatio <= upperBoundAnchorRatio && anchorRatio >= lowerBoundAnchorRatio
38
37
  ```
39
38
 
40
- * We usually use Chainlink as the main oracle, TWAP or Pyth oracle as pivot oracle depending on which supports the
41
- * given market and Binance oracle is used as the fallback oracle. For some markets we may use Pyth or TWAP as the
42
- * main oracle if the token price is not supported by Chainlink or Binance oracle.
39
+ * In most cases, Chainlink is used as the main oracle, TWAP or Pyth oracles are used as the pivot oracle depending
40
+ * on which supports the given market and Binance oracle is used as the fallback oracle. For some markets we may
41
+ * use Pyth or TWAP as the main oracle if the token price is not supported by Chainlink or Binance oracles.
43
42
  *
44
- * When fetching an oracle price, for the price to be valid it must be positive and not stagnant. If the price is
45
- * invalid then we consider the oracle to be stagnant and treat it like it's disabled.
43
+ * For a fetched price to be valid it must be positive and not stagnant. If the price is invalid then we consider the
44
+ * oracle to be stagnant and treat it like it's disabled.
46
45
  */
47
46
  contract ResilientOracle is PausableUpgradeable, AccessControlledV8, ResilientOracleInterface {
48
47
  /**
@@ -92,6 +92,10 @@ contract BinanceOracle is AccessControlledV8, OracleInterface {
92
92
  symbol = "BNB";
93
93
  }
94
94
 
95
+ if (compare(symbol, "wBETH")) {
96
+ symbol = "WBETH";
97
+ }
98
+
95
99
  FeedRegistryInterface feedRegistry = FeedRegistryInterface(getFeedRegistryAddress());
96
100
 
97
101
  (, int256 answer, , uint256 updatedAt, ) = feedRegistry.latestRoundDataByName(symbol, "USD");
@@ -8,8 +8,9 @@ import "@venusprotocol/governance-contracts/contracts/Governance/AccessControlle
8
8
  /**
9
9
  * @title BoundValidator
10
10
  * @author Venus
11
- * @notice This contracts is used to validate prices from two different sources. We need to set upper
12
- * and lower bound ratios config for each vToken in this contract.
11
+ * @notice The BoundValidator contract is used to validate prices fetched from two different sources.
12
+ * Each asset has an upper and lower bound ratio set in the config. In order for a price to be valid
13
+ * it must fall within this range of the validator price.
13
14
  */
14
15
  contract BoundValidator is AccessControlledV8, BoundValidatorInterface {
15
16
  struct ValidateConfig {
@@ -9,7 +9,7 @@ import "@venusprotocol/governance-contracts/contracts/Governance/AccessControlle
9
9
  /**
10
10
  * @title ChainlinkOracle
11
11
  * @author Venus
12
- * @notice This oracle fetches price of assets from Chainlink.
12
+ * @notice This oracle fetches prices of assets from the Chainlink oracle.
13
13
  */
14
14
  contract ChainlinkOracle is AccessControlledV8, OracleInterface {
15
15
  struct TokenConfig {
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "0x73760D55bF10cf9D265A126D349bdd5f64326c0e",
2
+ "address": "0xe38AbE42948ef249E84f4e935e4f56483C1EE3B9",
3
3
  "abi": [
4
4
  {
5
5
  "inputs": [