Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump pragma #155

Merged
merged 5 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
test:
strategy:
fail-fast: true
matrix:
profile: [solc-0.7.6,default]

name: Foundry project
runs-on: ubuntu-latest
Expand All @@ -50,13 +52,17 @@ jobs:
with:
version: nightly

- name: Run Forge build
run: |
forge --version
forge build --sizes
- name: Run Forge build with ${{ matrix.profile }}
# We always build with 0.7.6 to ensure that the project is compatible with the oldest version
run: >
( forge --version ) &&
(( [ "${{ matrix.profile }}" == "solc-0.7.6" ] &&
forge build --use 0.7.6 --sizes --skip 'test/*' ) ||
( forge build --sizes ))
mfw78 marked this conversation as resolved.
Show resolved Hide resolved
id: build

- name: Run Forge tests
if: matrix.profile != 'solc-0.7.6'
run: |
forge test -vvv
id: test
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"solidity.packageDefaultDependenciesDirectory": ["node_modules", "lib"],
mfw78 marked this conversation as resolved.
Show resolved Hide resolved
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
Expand Down
1 change: 0 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ out = "out"
libs = ["node_modules", "lib"]

# Compiler settings
solc = "0.7.6"
via_ir = false
optimizer = true
optimizer_runs = 1000000
2 changes: 1 addition & 1 deletion src/contracts/GPv2AllowListAuthentication.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "./interfaces/GPv2Authentication.sol";
import "./libraries/GPv2EIP1967.sol";
Expand Down
4 changes: 2 additions & 2 deletions src/contracts/GPv2Settlement.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "./GPv2VaultRelayer.sol";
Expand Down Expand Up @@ -250,7 +250,7 @@ contract GPv2Settlement is GPv2Signing, ReentrancyGuard, StorageAccessible {
function invalidateOrder(bytes calldata orderUid) external {
(, address owner, ) = orderUid.extractOrderUidParams();
require(owner == msg.sender, "GPv2: caller does not own order");
filledAmount[orderUid] = uint256(-1);
filledAmount[orderUid] = type(uint256).max;
emit OrderInvalidated(owner, orderUid);
}

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/GPv2VaultRelayer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "./interfaces/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/interfaces/GPv2Authentication.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/// @title Gnosis Protocol v2 Authentication Interface
/// @author Gnosis Developers
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/interfaces/GPv2EIP1271.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

library GPv2EIP1271 {
/// @dev Value returned by a call to `isValidSignature` if the signature
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/interfaces/IERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// - Added `name`, `symbol` and `decimals` function declarations
// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/token/ERC20/IERC20.sol>

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/**
* @dev Interface of the ERC20 standard as defined in the EIP.
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/interfaces/IVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "./IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/GPv2EIP1967.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

library GPv2EIP1967 {
/// @dev The storage slot where the proxy administrator is stored, defined
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/GPv2Interaction.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/// @title Gnosis Protocol v2 Interaction Library
/// @author Gnosis Developers
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/GPv2Order.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../interfaces/IERC20.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/GPv2SafeERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../interfaces/IERC20.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/GPv2Trade.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../interfaces/IERC20.sol";
import "../mixins/GPv2Signing.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/GPv2Transfer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../interfaces/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/SafeCast.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// - Convert to `type(*).*` notation
// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/utils/SafeCast.sol>

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/**
* @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/libraries/SafeMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// - Added `ceilDiv` method
// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/math/SafeMath.sol>

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/mixins/GPv2Signing.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../interfaces/GPv2EIP1271.sol";
import "../libraries/GPv2Order.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/mixins/Initializable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// - Inlined `Address.isContract` implementation
// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/proxy/Initializable.sol>

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/mixins/ReentrancyGuard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// - Formatted code
// <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/utils/ReentrancyGuard.sol>

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/**
* @dev Contract module that helps prevent reentrant calls to a function.
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/mixins/StorageAccessible.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// - Added linter directives to ignore low level call and assembly warnings
// <https://github.com/gnosis/util-contracts/blob/v3.1.0-solc-7/contracts/StorageAccessible.sol>

pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/// @title ViewStorageAccessible - Interface on top of StorageAccessible base class to allow simulations from view functions
interface ViewStorageAccessible {
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/reader/AllowListStorageReader.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

/// @title Gnosis Protocol v2 Allow List Storage Reader
/// @author Gnosis Developers
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/reader/GPv2TradeSimulator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../GPv2Settlement.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/reader/SettlementStorageReader.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

/// @title Gnosis Protocol v2 Settlement Storage Reader
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/EventEmitter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

contract EventEmitter {
event Event(uint256 value, uint256 number);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../GPv2AllowListAuthentication.sol";
import "../libraries/GPv2EIP1967.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2AllowListAuthenticationV2.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../GPv2AllowListAuthentication.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2InteractionTestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../libraries/GPv2Interaction.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2OrderTestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../libraries/GPv2Order.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2SafeERC20TestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../interfaces/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2SettlementTestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../GPv2Settlement.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2SigningTestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../libraries/GPv2Order.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2TradeTestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../libraries/GPv2Order.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/GPv2TransferTestInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../libraries/GPv2Transfer.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/NonPayable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

contract NonPayable {
// solhint-disable-next-line no-empty-blocks, payable-fallback
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/NonStandardERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../libraries/SafeMath.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/SmartSellOrder.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;
pragma abicoder v2;

import "../interfaces/GPv2EIP1271.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/StateChangingERC1271.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity ^0.7.6;
pragma solidity >=0.7.6 <0.9.0;

import "../interfaces/GPv2EIP1271.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/test/vendor/StorageAccessibleWrapper.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
pragma solidity >=0.7.6 <0.9.0;

import "../../mixins/StorageAccessible.sol";

Expand Down
4 changes: 2 additions & 2 deletions test/TestNoOp.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.7.6;
// SPDX-License-Identifier: LGPL-3.0-or-later
pragma solidity >=0.7.6 <0.9.0;

/// @dev No-op contract for start of forgifying contracts. Delete this!
contract TestNoOp {
Expand Down
Loading