Skip to content

Commit

Permalink
Constrain FullMath pragma to <0.8.0 (Uniswap#525)
Browse files Browse the repository at this point in the history
* Constrain FullMath pragma to <0.8.0

* constrain TickMath <0.8.0

* add a few more pragma restrictions

Co-authored-by: Noah Zinsmeister <[email protected]>
  • Loading branch information
wilsoncusack and NoahZinsmeister authored Jan 26, 2022
1 parent 9161f9a commit fc2107b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/libraries/FullMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0;
pragma solidity >=0.4.0 <0.8.0;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/Oracle.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;
pragma solidity >=0.5.0 <0.8.0;

/// @title Oracle
/// @notice Provides price and liquidity data useful for a wide variety of system designs
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/Position.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;
pragma solidity >=0.5.0 <0.8.0;

import './FullMath.sol';
import './FixedPoint128.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/Tick.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;
pragma solidity >=0.5.0 <0.8.0;

import './LowGasSafeMath.sol';
import './SafeCast.sol';
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/TickMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
pragma solidity >=0.5.0 <0.8.0;

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
Expand Down

0 comments on commit fc2107b

Please sign in to comment.