@venusprotocol/oracle 1.6.12-dev.5 → 1.6.12-dev.6

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 (76) hide show
  1. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +1 -1
  2. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +1 -1
  3. package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +1 -1
  4. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +1 -1
  5. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +1 -1
  6. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
  7. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
  8. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
  9. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
  10. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +1 -1
  11. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +1 -1
  12. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +1 -1
  13. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +1 -1
  14. package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +1 -1
  15. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
  16. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +1 -1
  17. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
  18. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
  19. package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
  20. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
  21. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
  22. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +1 -1
  23. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +1 -1
  24. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +1 -1
  25. package/artifacts/build-info/{e6185827013b85f715ee874203b21fc8.json → 7a4d64cb8f73c393198539e98d6224d7.json} +1 -1
  26. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
  27. package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +2 -2
  28. package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +1 -1
  29. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
  30. package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +1 -1
  31. package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
  32. package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
  33. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
  34. package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.json +1 -1
  35. package/artifacts/contracts/interfaces/PublicResolverInterface.sol/PublicResolverInterface.dbg.json +1 -1
  36. package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +1 -1
  37. package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +1 -1
  38. package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +1 -1
  39. package/artifacts/contracts/interfaces/SIDRegistryInterface.sol/SIDRegistryInterface.dbg.json +1 -1
  40. package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +1 -1
  41. package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +1 -1
  42. package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +1 -1
  43. package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +1 -1
  44. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +1 -1
  45. package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +9 -8
  46. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +1 -1
  47. package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +2 -2
  48. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +1 -1
  49. package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +2 -2
  50. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +1 -1
  51. package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +2 -2
  52. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +1 -1
  53. package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +2 -2
  54. package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +1 -1
  55. package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +1 -1
  56. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +1 -1
  57. package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +2 -2
  58. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +1 -1
  59. package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +2 -2
  60. package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +1 -1
  61. package/artifacts/contracts/test/AccessControlManager.sol/AccessControlManagerScenario.dbg.json +1 -1
  62. package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +1 -1
  63. package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +1 -1
  64. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +1 -1
  65. package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.json +2 -2
  66. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +1 -1
  67. package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.json +2 -2
  68. package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +1 -1
  69. package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +1 -1
  70. package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +1 -1
  71. package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +1 -1
  72. package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +1 -1
  73. package/contracts/interfaces/OracleInterface.sol +2 -2
  74. package/contracts/oracles/BinanceOracle.sol +10 -10
  75. package/contracts/oracles/ChainlinkOracle.sol +5 -5
  76. package/package.json +1 -1
@@ -117,8 +117,8 @@
117
117
  "type": "function"
118
118
  }
119
119
  ],
120
- "bytecode": "0x608060405234801561001057600080fd5b5061025e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806328d0ef671461005c57806379c5e512146100a05780638146bf7f146100db57806397c7033e1461005c578063a050bcb3146100e8575b600080fd5b61008a61006a366004610151565b50506001600160a01b031660009081526020819052604090205460ff1690565b60405161009791906101a1565b60405180910390f35b6100d96100ae3660046101c2565b6001600160a01b03919091166000908152602081905260409020805460ff1916911515919091179055565b005b60015461008a9060ff1681565b61008a6100f63660046101ff565b60006020819052908152604090205460ff1681565b60006001600160a01b0382165b92915050565b6101278161010b565b811461013257600080fd5b50565b80356101188161011e565b80610127565b803561011881610140565b60008060006060848603121561016957610169600080fd5b60006101758686610135565b935050602061018686828701610146565b925050604061019786828701610146565b9150509250925092565b811515815260208101610118565b801515610127565b8035610118816101af565b600080604083850312156101d8576101d8600080fd5b60006101e48585610135565b92505060206101f5858286016101b7565b9150509250929050565b60006020828403121561021457610214600080fd5b60006102208484610135565b94935050505056fea2646970667358221220eb324a5f7de5fac855ef5ac3cfaf6bd5d789514c7e369d027e48f6088f4dbeff64736f6c634300080d0033",
121
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806328d0ef671461005c57806379c5e512146100a05780638146bf7f146100db57806397c7033e1461005c578063a050bcb3146100e8575b600080fd5b61008a61006a366004610151565b50506001600160a01b031660009081526020819052604090205460ff1690565b60405161009791906101a1565b60405180910390f35b6100d96100ae3660046101c2565b6001600160a01b03919091166000908152602081905260409020805460ff1916911515919091179055565b005b60015461008a9060ff1681565b61008a6100f63660046101ff565b60006020819052908152604090205460ff1681565b60006001600160a01b0382165b92915050565b6101278161010b565b811461013257600080fd5b50565b80356101188161011e565b80610127565b803561011881610140565b60008060006060848603121561016957610169600080fd5b60006101758686610135565b935050602061018686828701610146565b925050604061019786828701610146565b9150509250925092565b811515815260208101610118565b801515610127565b8035610118816101af565b600080604083850312156101d8576101d8600080fd5b60006101e48585610135565b92505060206101f5858286016101b7565b9150509250929050565b60006020828403121561021457610214600080fd5b60006102208484610135565b94935050505056fea2646970667358221220eb324a5f7de5fac855ef5ac3cfaf6bd5d789514c7e369d027e48f6088f4dbeff64736f6c634300080d0033",
120
+ "bytecode": "0x608060405234801561001057600080fd5b5061025e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806328d0ef671461005c57806379c5e512146100a05780638146bf7f146100db57806397c7033e1461005c578063a050bcb3146100e8575b600080fd5b61008a61006a366004610151565b50506001600160a01b031660009081526020819052604090205460ff1690565b60405161009791906101a1565b60405180910390f35b6100d96100ae3660046101c2565b6001600160a01b03919091166000908152602081905260409020805460ff1916911515919091179055565b005b60015461008a9060ff1681565b61008a6100f63660046101ff565b60006020819052908152604090205460ff1681565b60006001600160a01b0382165b92915050565b6101278161010b565b811461013257600080fd5b50565b80356101188161011e565b80610127565b803561011881610140565b60008060006060848603121561016957610169600080fd5b60006101758686610135565b935050602061018686828701610146565b925050604061019786828701610146565b9150509250925092565b811515815260208101610118565b801515610127565b8035610118816101af565b600080604083850312156101d8576101d8600080fd5b60006101e48585610135565b92505060206101f5858286016101b7565b9150509250929050565b60006020828403121561021457610214600080fd5b60006102208484610135565b94935050505056fea26469706673582212202be5a6e285a886aa73c1a806458f7fe2b264eece6782e1b83ceaa71511a611e264736f6c634300080d0033",
121
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806328d0ef671461005c57806379c5e512146100a05780638146bf7f146100db57806397c7033e1461005c578063a050bcb3146100e8575b600080fd5b61008a61006a366004610151565b50506001600160a01b031660009081526020819052604090205460ff1690565b60405161009791906101a1565b60405180910390f35b6100d96100ae3660046101c2565b6001600160a01b03919091166000908152602081905260409020805460ff1916911515919091179055565b005b60015461008a9060ff1681565b61008a6100f63660046101ff565b60006020819052908152604090205460ff1681565b60006001600160a01b0382165b92915050565b6101278161010b565b811461013257600080fd5b50565b80356101188161011e565b80610127565b803561011881610140565b60008060006060848603121561016957610169600080fd5b60006101758686610135565b935050602061018686828701610146565b925050604061019786828701610146565b9150509250925092565b811515815260208101610118565b801515610127565b8035610118816101af565b600080604083850312156101d8576101d8600080fd5b60006101e48585610135565b92505060206101f5858286016101b7565b9150509250929050565b60006020828403121561021457610214600080fd5b60006102208484610135565b94935050505056fea26469706673582212202be5a6e285a886aa73c1a806458f7fe2b264eece6782e1b83ceaa71511a611e264736f6c634300080d0033",
122
122
  "linkReferences": {},
123
123
  "deployedLinkReferences": {}
124
124
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e6185827013b85f715ee874203b21fc8.json"
3
+ "buildInfo": "../../../build-info/7a4d64cb8f73c393198539e98d6224d7.json"
4
4
  }
@@ -84,8 +84,8 @@
84
84
  "type": "function"
85
85
  }
86
86
  ],
87
- "bytecode": "0x608060405234801561001057600080fd5b506101c9806100206000396000f3fe608060405234801561001057600080fd5b506004361061004b5760003560e01c8062e4768b1461005057806341976e091461007c578063cfed246b146100bb578063fc57d4df1461007c575b600080fd5b61007a61005e366004610121565b6001600160a01b03909116600090815260208190526040902055565b005b6100a561008a36600461015e565b6001600160a01b031660009081526020819052604090205490565b6040516100b29190610187565b60405180910390f35b6100a56100c936600461015e565b60006020819052908152604090205481565b60006001600160a01b0382165b92915050565b6100f7816100db565b811461010257600080fd5b50565b80356100e8816100ee565b806100f7565b80356100e881610110565b6000806040838503121561013757610137600080fd5b60006101438585610105565b925050602061015485828601610116565b9150509250929050565b60006020828403121561017357610173600080fd5b600061017f8484610105565b949350505050565b818152602081016100e856fea2646970667358221220d9ff4fcce9cdcb7d0ebd9e889def8385cc4cc5bc93ced5bec82592b0eb9eb7dc64736f6c634300080d0033",
88
- "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004b5760003560e01c8062e4768b1461005057806341976e091461007c578063cfed246b146100bb578063fc57d4df1461007c575b600080fd5b61007a61005e366004610121565b6001600160a01b03909116600090815260208190526040902055565b005b6100a561008a36600461015e565b6001600160a01b031660009081526020819052604090205490565b6040516100b29190610187565b60405180910390f35b6100a56100c936600461015e565b60006020819052908152604090205481565b60006001600160a01b0382165b92915050565b6100f7816100db565b811461010257600080fd5b50565b80356100e8816100ee565b806100f7565b80356100e881610110565b6000806040838503121561013757610137600080fd5b60006101438585610105565b925050602061015485828601610116565b9150509250929050565b60006020828403121561017357610173600080fd5b600061017f8484610105565b949350505050565b818152602081016100e856fea2646970667358221220d9ff4fcce9cdcb7d0ebd9e889def8385cc4cc5bc93ced5bec82592b0eb9eb7dc64736f6c634300080d0033",
87
+ "bytecode": "0x608060405234801561001057600080fd5b506101c9806100206000396000f3fe608060405234801561001057600080fd5b506004361061004b5760003560e01c8062e4768b1461005057806341976e091461007c578063cfed246b146100bb578063fc57d4df1461007c575b600080fd5b61007a61005e366004610121565b6001600160a01b03909116600090815260208190526040902055565b005b6100a561008a36600461015e565b6001600160a01b031660009081526020819052604090205490565b6040516100b29190610187565b60405180910390f35b6100a56100c936600461015e565b60006020819052908152604090205481565b60006001600160a01b0382165b92915050565b6100f7816100db565b811461010257600080fd5b50565b80356100e8816100ee565b806100f7565b80356100e881610110565b6000806040838503121561013757610137600080fd5b60006101438585610105565b925050602061015485828601610116565b9150509250929050565b60006020828403121561017357610173600080fd5b600061017f8484610105565b949350505050565b818152602081016100e856fea2646970667358221220e0cfd810ff1538a2275a553d8f1a8b6367498b7ce53ae885e0bd9f47dd06abf564736f6c634300080d0033",
88
+ "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004b5760003560e01c8062e4768b1461005057806341976e091461007c578063cfed246b146100bb578063fc57d4df1461007c575b600080fd5b61007a61005e366004610121565b6001600160a01b03909116600090815260208190526040902055565b005b6100a561008a36600461015e565b6001600160a01b031660009081526020819052604090205490565b6040516100b29190610187565b60405180910390f35b6100a56100c936600461015e565b60006020819052908152604090205481565b60006001600160a01b0382165b92915050565b6100f7816100db565b811461010257600080fd5b50565b80356100e8816100ee565b806100f7565b80356100e881610110565b6000806040838503121561013757610137600080fd5b60006101438585610105565b925050602061015485828601610116565b9150509250929050565b60006020828403121561017357610173600080fd5b600061017f8484610105565b949350505050565b818152602081016100e856fea2646970667358221220e0cfd810ff1538a2275a553d8f1a8b6367498b7ce53ae885e0bd9f47dd06abf564736f6c634300080d0033",
89
89
  "linkReferences": {},
90
90
  "deployedLinkReferences": {}
91
91
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e6185827013b85f715ee874203b21fc8.json"
3
+ "buildInfo": "../../../build-info/7a4d64cb8f73c393198539e98d6224d7.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e6185827013b85f715ee874203b21fc8.json"
3
+ "buildInfo": "../../../build-info/7a4d64cb8f73c393198539e98d6224d7.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e6185827013b85f715ee874203b21fc8.json"
3
+ "buildInfo": "../../../build-info/7a4d64cb8f73c393198539e98d6224d7.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e6185827013b85f715ee874203b21fc8.json"
3
+ "buildInfo": "../../../build-info/7a4d64cb8f73c393198539e98d6224d7.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/e6185827013b85f715ee874203b21fc8.json"
3
+ "buildInfo": "../../../build-info/7a4d64cb8f73c393198539e98d6224d7.json"
4
4
  }
@@ -12,12 +12,12 @@ interface ResilientOracleInterface is OracleInterface {
12
12
  }
13
13
 
14
14
  interface TwapInterface is OracleInterface {
15
- function updateTwap(address vToken) external returns (uint256);
15
+ function updateTwap(address asset) external returns (uint256);
16
16
  }
17
17
 
18
18
  interface BoundValidatorInterface {
19
19
  function validatePriceWithAnchorPrice(
20
- address vToken,
20
+ address asset,
21
21
  uint256 reporterPrice,
22
22
  uint256 anchorPrice
23
23
  ) external view returns (bool);
@@ -24,12 +24,13 @@ contract BinanceOracle is AccessControlledV8, OracleInterface {
24
24
  /// @notice Quote address for USD
25
25
  address public constant USD_ADDR = 0x0000000000000000000000000000000000000348;
26
26
 
27
+ /// @notice Address of WBNB contract
28
+ /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
29
+ address public immutable WBNB;
30
+
27
31
  /// @notice Max stale period configuration for assets
28
32
  mapping(string => uint256) public maxStalePeriod;
29
33
 
30
- /// @notice Address of WBNB contract
31
- address public WBNB;
32
-
33
34
  event MaxStalePeriodAdded(string indexed asset, uint256 maxStalePeriod);
34
35
 
35
36
  /**
@@ -40,9 +41,11 @@ contract BinanceOracle is AccessControlledV8, OracleInterface {
40
41
  _;
41
42
  }
42
43
 
43
- /// @notice Constructor for the implementation contract.
44
+ /// @notice Constructor for the implementation contract. Sets immutable variables.
45
+ /// @param wBnbAddress The address of the WBNB
44
46
  /// @custom:oz-upgrades-unsafe-allow constructor
45
- constructor() {
47
+ constructor(address wBnbAddress) notNullAddress(wBnbAddress) {
48
+ WBNB = wBnbAddress;
46
49
  _disableInitializers();
47
50
  }
48
51
 
@@ -64,15 +67,12 @@ contract BinanceOracle is AccessControlledV8, OracleInterface {
64
67
  * @notice Sets the contracts required to fetch prices
65
68
  * @param _sidRegistryAddress Address of SID registry
66
69
  * @param _accessControlManager Address of the access control manager contract
67
- * @param _WBNB Address of the wBNB contract
68
70
  */
69
71
  function initialize(
70
72
  address _sidRegistryAddress,
71
- address _accessControlManager,
72
- address _WBNB
73
- ) external reinitializer(2) notNullAddress(_sidRegistryAddress) notNullAddress(_WBNB) {
73
+ address _accessControlManager
74
+ ) external reinitializer(2) notNullAddress(_sidRegistryAddress) {
74
75
  sidRegistryAddress = _sidRegistryAddress;
75
- WBNB = _WBNB;
76
76
  __AccessControlled_init(_accessControlManager);
77
77
  }
78
78
 
@@ -128,19 +128,19 @@ contract ChainlinkOracle is AccessControlledV8, OracleInterface {
128
128
 
129
129
  /**
130
130
  * @notice Gets the Chainlink price for a given asset
131
- * @param token address of the asset
131
+ * @param asset address of the asset
132
132
  * @param decimals decimals of the asset
133
133
  * @return price Asset price in USD or a manually set price of the asset
134
134
  */
135
- function _getPriceInternal(address token, uint256 decimals) internal view returns (uint256 price) {
136
- uint256 tokenPrice = prices[token];
135
+ function _getPriceInternal(address asset, uint256 decimals) internal view returns (uint256 price) {
136
+ uint256 tokenPrice = prices[asset];
137
137
  if (tokenPrice != 0) {
138
138
  price = tokenPrice;
139
139
  } else {
140
- price = _getChainlinkPrice(token);
140
+ price = _getChainlinkPrice(asset);
141
141
  }
142
142
 
143
- uint256 decimalDelta = 18 - uint256(decimals);
143
+ uint256 decimalDelta = 18 - decimals;
144
144
  return price * (10 ** decimalDelta);
145
145
  }
146
146
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@venusprotocol/oracle",
3
3
  "description": "Venus Protocol Price Oracle",
4
- "version": "1.6.12-dev.5",
4
+ "version": "1.6.12-dev.6",
5
5
  "author": "Venus",
6
6
  "engines": {
7
7
  "node": ">=18.x.x"