diff --git a/src/libraries/RoutesLib.sol b/src/libraries/RoutesLib.sol index cc8bbf8..6daa8fe 100644 --- a/src/libraries/RoutesLib.sol +++ b/src/libraries/RoutesLib.sol @@ -28,8 +28,8 @@ library RoutesLib { } // Assumes that aDecimalDifference is between -18 and 18 - // Assumes that aPrice is between 1 and 1e36 - // Assumes that aRewardThreshold is <= Constants.BP_SCALE + // Assumes that aPrice is between 1 and `Constants.MAX_SUPPORTED_PRICE` + // Assumes that aRewardThreshold is <= `Constants.BP_SCALE` function packSimplePrice(int256 aDecimalDifference, uint256 aPrice, uint256 aRewardThreshold) internal pure diff --git a/test/unit/libraries/RoutesLib.t.sol b/test/unit/libraries/RoutesLib.t.sol index df0540c..05a6e32 100644 --- a/test/unit/libraries/RoutesLib.t.sol +++ b/test/unit/libraries/RoutesLib.t.sol @@ -38,7 +38,7 @@ contract RoutesLibTest is Test { function testPackSimplePrice(int8 aDiff, uint256 aPrice) external pure { // assume - uint256 lPrice = bound(aPrice, 1, 1e36); + uint256 lPrice = bound(aPrice, 1, Constants.MAX_SUPPORTED_PRICE); // act bytes32 lResult = int256(aDiff).packSimplePrice(lPrice, Constants.BP_SCALE);