Skip to content

Commit

Permalink
chore: upgrade solidity version to 0.8.26 and modify version for library
Browse files Browse the repository at this point in the history
  • Loading branch information
alex0207s committed Jul 2, 2024
1 parent 51b4f8f commit 703d6b9
Show file tree
Hide file tree
Showing 48 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion contracts/AllowanceTarget.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/CoordinatedTaker.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { TokenCollector } from "./abstracts/TokenCollector.sol";
import { AdminManagement } from "./abstracts/AdminManagement.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/GenericSwap.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { TokenCollector } from "./abstracts/TokenCollector.sol";
import { EIP712 } from "./abstracts/EIP712.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/LimitOrderSwap.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/RFQ.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { Address } from "@openzeppelin/contracts/utils/Address.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/SmartOrderStrategy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/abstracts/TokenCollector.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IAllowanceTarget.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

/// @title IAllowanceTarget Interface
/// @author imToken Labs
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ICoordinatedTaker.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

import { LimitOrder } from "../libraries/LimitOrder.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IERC1271Wallet.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface IERC1271Wallet {
function isValidSignature(bytes32 _hash, bytes calldata _signature) external view returns (bytes4 magicValue);
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IGenericSwap.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

import { GenericSwapData } from "../libraries/GenericSwapData.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ILimitOrderSwap.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

import { LimitOrder } from "../libraries/LimitOrder.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IRFQ.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

import { RFQOffer } from "../libraries/RFQOffer.sol";
import { RFQTx } from "../libraries/RFQTx.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ISmartOrderStrategy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

import { IStrategy } from "./IStrategy.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IStrategy.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

/// @title IStrategy Interface
/// @author imToken Labs
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IUniswapPermit2.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface IUniswapPermit2 {
/// @notice Thrown when an allowance on a token has expired.
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IWETH.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface IWETH {
function balanceOf(address account) external view returns (uint256);
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
src = 'contracts' # the source directory
cache = true # whether to cache builds or not
force = false # whether to ignore the cache (clean build)
solc_version = "0.8.17"
solc_version = "0.8.26"
optimizer = true # enable or disable the solc optimizer
optimizer_runs = 1000 # the number of optimizer runs
verbosity = 3 # The verbosity of tests
Expand Down
2 changes: 1 addition & 1 deletion test/AdminManagement.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/AllowanceTarget.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/Signing.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { AllowFill, ALLOWFILL_DATA_TYPEHASH } from "contracts/libraries/AllowFill.sol";
import { GenericSwapData, GS_DATA_TYPEHASH } from "contracts/libraries/GenericSwapData.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/GenericSwap.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { Test } from "forge-std/Test.sol";
import { Tokens } from "test/utils/Tokens.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/CancelOrder.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { getLimitOrderHash } from "contracts/libraries/LimitOrder.sol";
import { ILimitOrderSwap } from "contracts/interfaces/ILimitOrderSwap.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/CoordinatedTaker.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { ILimitOrderSwap } from "contracts/interfaces/ILimitOrderSwap.sol";
import { ICoordinatedTaker } from "contracts/interfaces/ICoordinatedTaker.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/Fill.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/FullOrKill.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { ILimitOrderSwap } from "contracts/interfaces/ILimitOrderSwap.sol";
import { Constant } from "contracts/libraries/Constant.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/GroupFill.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { ILimitOrderSwap } from "contracts/interfaces/ILimitOrderSwap.sol";
import { IUniswapPermit2 } from "contracts/interfaces/IUniswapPermit2.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/Management.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { ILimitOrderSwap } from "contracts/interfaces/ILimitOrderSwap.sol";
import { Ownable } from "contracts/abstracts/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/LimitOrderSwap/Setup.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { Test } from "forge-std/Test.sol";
import { Tokens } from "test/utils/Tokens.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/RFQ.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { Test } from "forge-std/Test.sol";
import { Tokens } from "test/utils/Tokens.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/SmartOrderStrategy/AMMs.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/SmartOrderStrategy/IntegrationV6.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/SmartOrderStrategy/Setup.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { Test } from "forge-std/Test.sol";
import { SmartOrderStrategy } from "contracts/SmartOrderStrategy.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/SmartOrderStrategy/Validation.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { SmartOrderStrategyTest } from "./Setup.t.sol";
import { ISmartOrderStrategy } from "contracts/interfaces/ISmartOrderStrategy.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/forkMainnet/TokenCollector.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { AllowanceTarget } from "contracts/AllowanceTarget.sol";
import { TokenCollector } from "contracts/abstracts/TokenCollector.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/libraries/SignatureValidator.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { Test } from "forge-std/Test.sol";
import { IERC1271Wallet } from "contracts/interfaces/IERC1271Wallet.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/ICurveFi.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface ICurveFi {
function get_virtual_price() external returns (uint256 out);
Expand Down
2 changes: 1 addition & 1 deletion test/utils/ICurveFiV2.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface ICurveFiV2 {
function get_dy(uint256 i, uint256 j, uint256 dx) external view returns (uint256 out);
Expand Down
2 changes: 1 addition & 1 deletion test/utils/IUniswapSwapRouter02.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface IUniswapSwapRouter02 {
function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to) external payable returns (uint256 amountOut);
Expand Down
2 changes: 1 addition & 1 deletion test/utils/IUniswapUniversalRouter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface IUniversalRouter {
error TransactionDeadlinePassed();
Expand Down
2 changes: 1 addition & 1 deletion test/utils/IUniswapV2Router.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

interface IUniswapV2Router {
function swapExactTokensForTokens(
Expand Down
2 changes: 1 addition & 1 deletion test/utils/IUniswapV3Quoter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
pragma solidity ^0.8.0;

/// @title Quoter Interface
/// @notice Supports quoting the calculated amounts from exact input or exact output swaps
Expand Down
2 changes: 1 addition & 1 deletion test/utils/IUniswapV3SwapRouter.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.8.0;
pragma solidity ^0.8.0;

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Permit2Helper.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { IUniswapPermit2 } from "contracts/interfaces/IUniswapPermit2.sol";
import { TokenCollector } from "contracts/abstracts/TokenCollector.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Sig.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

function getEIP712Hash(bytes32 domainSeparator, bytes32 structHash) pure returns (bytes32) {
string memory EIP191_HEADER = "\x19\x01";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/SigHelper.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity 0.8.26;

import { AllowFill, getAllowFillHash } from "contracts/libraries/AllowFill.sol";
import { GenericSwapData, getGSDataHash } from "contracts/libraries/GenericSwapData.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/utils/UniswapCommands.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
pragma solidity ^0.8.0;

library UniswapCommands {
bytes1 internal constant FLAG_ALLOW_REVERT = 0x80;
Expand Down
2 changes: 1 addition & 1 deletion test/utils/UniswapV2Library.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
pragma solidity ^0.8.0;

interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint256 value);
Expand Down

0 comments on commit 703d6b9

Please sign in to comment.