Skip to content

Commit

Permalink
fix: addresses #9
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Dec 7, 2024
1 parent a098bb9 commit adbe551
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/libraries/RoutesLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/unit/libraries/RoutesLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit adbe551

Please sign in to comment.