File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 33pragma solidity 0.8.28 ;
44
55import {AggregatorV3Interface} from 'src/dependencies/chainlink/AggregatorV3Interface.sol ' ;
6+ import {SafeCast} from 'src/dependencies/openzeppelin/SafeCast.sol ' ;
67
78/// @title UnitPriceFeed contract
89/// @author Aave Labs
910/// @notice Price feed that returns the unit price (1), with decimals precision.
1011/// @dev This price feed can be set for reserves that use the base currency as collateral.
1112contract UnitPriceFeed is AggregatorV3Interface {
13+ using SafeCast for uint256 ;
14+
1215 /// @inheritdoc AggregatorV3Interface
1316 uint8 public immutable decimals;
1417
@@ -23,7 +26,7 @@ contract UnitPriceFeed is AggregatorV3Interface {
2326 constructor (uint8 decimals_ , string memory description_ ) {
2427 decimals = decimals_;
2528 description = description_;
26- _units = int256 (10 ** decimals_);
29+ _units = (10 ** decimals_). toInt256 ( );
2730 }
2831
2932 /// @inheritdoc AggregatorV3Interface
You can’t perform that action at this time.
0 commit comments