From 7ecc9b4e52bb1291cfd08254c006a22e3a8685c9 Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Wed, 10 Jan 2024 07:47:11 +0400 Subject: [PATCH] update to solidity 0.8.23 --- .solhint.json | 2 +- contracts/BasePaymaster.sol | 2 +- contracts/common/Errors.sol | 2 +- contracts/deployer/Create3.sol | 2 +- contracts/deployer/Deployer.sol | 2 +- contracts/interfaces/IWETH9.sol | 2 +- .../interfaces/paymasters/IBiconomyTokenPaymaster.sol | 2 +- .../interfaces/paymasters/ISponsorshipPaymaster.sol | 2 +- contracts/libs/AddressUtils.sol | 2 +- contracts/libs/CalldataHelper.sol | 2 +- contracts/libs/MathLib.sol | 2 +- contracts/references/AdvancedVerifyingPaymaster.sol | 2 +- contracts/references/infinitism/OracleHelper.sol | 2 +- contracts/references/infinitism/SampleTokenPaymaster.sol | 2 +- contracts/references/infinitism/UniswapHelper.sol | 2 +- contracts/references/pimlico/IOracle.sol | 2 +- contracts/references/pimlico/PimlicoERC20Paymaster.sol | 2 +- contracts/references/soul/IPriceOracle.sol | 2 +- contracts/references/soul/ITokenPaymaster.sol | 2 +- contracts/references/soul/PriceOracle.sol | 2 +- contracts/references/soul/TokenPaymaster.sol | 2 +- contracts/sponsorship/PaymasterHelpers.sol | 2 +- contracts/sponsorship/SponsorshipPaymaster.sol | 2 +- contracts/test/accounts/BiconomyAccountFactory.sol | 2 +- contracts/test/accounts/BiconomyAccountImpl.sol | 2 +- contracts/test/accounts/SimpleAccount.sol | 2 +- contracts/test/dex/UniV3Integration.sol | 2 +- contracts/test/dex/UniswapV3SwapExamples.sol | 2 +- contracts/test/helpers/MockOracle.sol | 2 +- contracts/test/helpers/MockPriceFeed.sol | 2 +- contracts/test/helpers/MockStaleOracle.sol | 2 +- contracts/test/helpers/MockStalePriceFeed.sol | 2 +- contracts/test/helpers/MockToken.sol | 2 +- contracts/token/BiconomyTokenPaymaster.sol | 2 +- contracts/token/TokenPaymasterErrors.sol | 2 +- contracts/token/adapters/IUniversalRouter.sol | 2 +- contracts/token/adapters/UniswapExample.sol | 2 +- contracts/token/feemanager/FeeManager.sol | 2 +- contracts/token/oracles/DerivedPriceFeed.sol | 2 +- contracts/token/oracles/FeedInterface.sol | 2 +- contracts/token/oracles/IOracleAggregator.sol | 2 +- contracts/token/oracles/IPriceOracle.sol | 2 +- contracts/token/oracles/OracleAggregator.sol | 2 +- contracts/utils/Exec.sol | 2 +- contracts/utils/LibAddress.sol | 2 +- contracts/utils/SafeTransferLib.sol | 2 +- foundry.toml | 1 + hardhat.config.ts | 9 +-------- test/foundry/base/SATestBase.sol | 2 +- 49 files changed, 49 insertions(+), 55 deletions(-) diff --git a/.solhint.json b/.solhint.json index 3a95e12..6018f40 100644 --- a/.solhint.json +++ b/.solhint.json @@ -1,7 +1,7 @@ { "extends": "solhint:recommended", "rules": { - "compiler-version": ["error", "0.8.20"], + "compiler-version": ["error", "0.8.23"], "func-visibility": ["warn", { "ignoreConstructors": true }], "reentrancy": "error", "state-visibility": "error", diff --git a/contracts/BasePaymaster.sol b/contracts/BasePaymaster.sol index 14e6e2a..d2dc8d0 100644 --- a/contracts/BasePaymaster.sol +++ b/contracts/BasePaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /* solhint-disable reason-string */ diff --git a/contracts/common/Errors.sol b/contracts/common/Errors.sol index b2d41a7..d6735f0 100644 --- a/contracts/common/Errors.sol +++ b/contracts/common/Errors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; contract BasePaymasterErrors { /** diff --git a/contracts/deployer/Create3.sol b/contracts/deployer/Create3.sol index f435718..97c3cb9 100644 --- a/contracts/deployer/Create3.sol +++ b/contracts/deployer/Create3.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: Unlicense -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /** * @title A library for deploying contracts EIP-3171 style. diff --git a/contracts/deployer/Deployer.sol b/contracts/deployer/Deployer.sol index a5b8338..421f28a 100644 --- a/contracts/deployer/Deployer.sol +++ b/contracts/deployer/Deployer.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: Unlicense -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "./Create3.sol"; diff --git a/contracts/interfaces/IWETH9.sol b/contracts/interfaces/IWETH9.sol index 6f40ece..a6999b4 100644 --- a/contracts/interfaces/IWETH9.sol +++ b/contracts/interfaces/IWETH9.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/contracts/interfaces/paymasters/IBiconomyTokenPaymaster.sol b/contracts/interfaces/paymasters/IBiconomyTokenPaymaster.sol index 5210ae3..7dcb253 100644 --- a/contracts/interfaces/paymasters/IBiconomyTokenPaymaster.sol +++ b/contracts/interfaces/paymasters/IBiconomyTokenPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; interface IBiconomyTokenPaymaster { /** diff --git a/contracts/interfaces/paymasters/ISponsorshipPaymaster.sol b/contracts/interfaces/paymasters/ISponsorshipPaymaster.sol index 1ac077e..b36b238 100644 --- a/contracts/interfaces/paymasters/ISponsorshipPaymaster.sol +++ b/contracts/interfaces/paymasters/ISponsorshipPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; interface ISponsorshipPaymaster { event EPGasOverheadChanged(uint256 indexed _oldValue, uint256 indexed _newValue); diff --git a/contracts/libs/AddressUtils.sol b/contracts/libs/AddressUtils.sol index 9ac2150..9858d8c 100644 --- a/contracts/libs/AddressUtils.sol +++ b/contracts/libs/AddressUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /** * Utility library of inline functions on addresses diff --git a/contracts/libs/CalldataHelper.sol b/contracts/libs/CalldataHelper.sol index c3e5bda..3f9bf81 100644 --- a/contracts/libs/CalldataHelper.sol +++ b/contracts/libs/CalldataHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; library CalldataHelper { function calldataKeccak(bytes calldata data) internal pure returns (bytes32 ret) { diff --git a/contracts/libs/MathLib.sol b/contracts/libs/MathLib.sol index ac3a359..cfc5db7 100644 --- a/contracts/libs/MathLib.sol +++ b/contracts/libs/MathLib.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; library MathLib { function minuint256(uint256 a, uint256 b) internal pure returns (uint256 result) { diff --git a/contracts/references/AdvancedVerifyingPaymaster.sol b/contracts/references/AdvancedVerifyingPaymaster.sol index d4c6233..59a50c7 100644 --- a/contracts/references/AdvancedVerifyingPaymaster.sol +++ b/contracts/references/AdvancedVerifyingPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import {IEntryPoint} from "@account-abstraction/contracts/interfaces/IEntryPoint.sol"; import {UserOperation} from "@account-abstraction/contracts/interfaces/UserOperation.sol"; diff --git a/contracts/references/infinitism/OracleHelper.sol b/contracts/references/infinitism/OracleHelper.sol index 661bc44..6da54f7 100644 --- a/contracts/references/infinitism/OracleHelper.sol +++ b/contracts/references/infinitism/OracleHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /* solhint-disable not-rely-on-time */ diff --git a/contracts/references/infinitism/SampleTokenPaymaster.sol b/contracts/references/infinitism/SampleTokenPaymaster.sol index b90b62d..6c2019a 100644 --- a/contracts/references/infinitism/SampleTokenPaymaster.sol +++ b/contracts/references/infinitism/SampleTokenPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; // Import the required libraries and contracts import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; diff --git a/contracts/references/infinitism/UniswapHelper.sol b/contracts/references/infinitism/UniswapHelper.sol index f68f248..281bae0 100644 --- a/contracts/references/infinitism/UniswapHelper.sol +++ b/contracts/references/infinitism/UniswapHelper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /* solhint-disable not-rely-on-time */ diff --git a/contracts/references/pimlico/IOracle.sol b/contracts/references/pimlico/IOracle.sol index eb15ab8..35413bf 100644 --- a/contracts/references/pimlico/IOracle.sol +++ b/contracts/references/pimlico/IOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; interface IOracle { function decimals() external view returns (uint8); diff --git a/contracts/references/pimlico/PimlicoERC20Paymaster.sol b/contracts/references/pimlico/PimlicoERC20Paymaster.sol index 9225b2d..bb71b54 100644 --- a/contracts/references/pimlico/PimlicoERC20Paymaster.sol +++ b/contracts/references/pimlico/PimlicoERC20Paymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; // Import the required libraries and contracts import "@account-abstraction/contracts/core/BasePaymaster.sol"; diff --git a/contracts/references/soul/IPriceOracle.sol b/contracts/references/soul/IPriceOracle.sol index f781a3e..3f05184 100644 --- a/contracts/references/soul/IPriceOracle.sol +++ b/contracts/references/soul/IPriceOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; interface IPriceOracle { function exchangePrice(address _token) external view returns (uint256 price, uint8 decimals); diff --git a/contracts/references/soul/ITokenPaymaster.sol b/contracts/references/soul/ITokenPaymaster.sol index 0791372..5b6272d 100644 --- a/contracts/references/soul/ITokenPaymaster.sol +++ b/contracts/references/soul/ITokenPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@account-abstraction/contracts/interfaces/IPaymaster.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; diff --git a/contracts/references/soul/PriceOracle.sol b/contracts/references/soul/PriceOracle.sol index 4f5a058..bf0a78c 100644 --- a/contracts/references/soul/PriceOracle.sol +++ b/contracts/references/soul/PriceOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "./IPriceOracle.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; diff --git a/contracts/references/soul/TokenPaymaster.sol b/contracts/references/soul/TokenPaymaster.sol index 78b958a..6258a63 100644 --- a/contracts/references/soul/TokenPaymaster.sol +++ b/contracts/references/soul/TokenPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ITokenPaymaster.sol"; diff --git a/contracts/sponsorship/PaymasterHelpers.sol b/contracts/sponsorship/PaymasterHelpers.sol index aee1220..5b533ba 100644 --- a/contracts/sponsorship/PaymasterHelpers.sol +++ b/contracts/sponsorship/PaymasterHelpers.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {UserOperation} from "@account-abstraction/contracts/interfaces/UserOperation.sol"; diff --git a/contracts/sponsorship/SponsorshipPaymaster.sol b/contracts/sponsorship/SponsorshipPaymaster.sol index ddc4266..29493f7 100644 --- a/contracts/sponsorship/SponsorshipPaymaster.sol +++ b/contracts/sponsorship/SponsorshipPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /* solhint-disable reason-string */ /* solhint-disable no-inline-assembly */ diff --git a/contracts/test/accounts/BiconomyAccountFactory.sol b/contracts/test/accounts/BiconomyAccountFactory.sol index 58846b8..bd12df7 100644 --- a/contracts/test/accounts/BiconomyAccountFactory.sol +++ b/contracts/test/accounts/BiconomyAccountFactory.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; // temp +pragma solidity ^0.8.23; // temp // Could also use published package or added submodule. diff --git a/contracts/test/accounts/BiconomyAccountImpl.sol b/contracts/test/accounts/BiconomyAccountImpl.sol index fc56520..9eca396 100644 --- a/contracts/test/accounts/BiconomyAccountImpl.sol +++ b/contracts/test/accounts/BiconomyAccountImpl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import {IEntryPoint} from "@account-abstraction/contracts/interfaces/IEntryPoint.sol"; import {SmartAccount} from "@biconomy-devx/account-contracts-v2/contracts/smart-account/SmartAccount.sol"; diff --git a/contracts/test/accounts/SimpleAccount.sol b/contracts/test/accounts/SimpleAccount.sol index 3c2aa17..4f42104 100644 --- a/contracts/test/accounts/SimpleAccount.sol +++ b/contracts/test/accounts/SimpleAccount.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /* solhint-disable avoid-low-level-calls */ /* solhint-disable no-inline-assembly */ diff --git a/contracts/test/dex/UniV3Integration.sol b/contracts/test/dex/UniV3Integration.sol index 26f5c1a..2f95f8c 100644 --- a/contracts/test/dex/UniV3Integration.sol +++ b/contracts/test/dex/UniV3Integration.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; diff --git a/contracts/test/dex/UniswapV3SwapExamples.sol b/contracts/test/dex/UniswapV3SwapExamples.sol index 761fd5c..3a55965 100644 --- a/contracts/test/dex/UniswapV3SwapExamples.sol +++ b/contracts/test/dex/UniswapV3SwapExamples.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; // swap reference: https://solidity-by-example.org/defi/uniswap-v3-swap/ for adding tests // https://docs.uniswap.org/contracts/v3/reference/periphery/SwapRouter diff --git a/contracts/test/helpers/MockOracle.sol b/contracts/test/helpers/MockOracle.sol index 769d52c..b36a2f3 100644 --- a/contracts/test/helpers/MockOracle.sol +++ b/contracts/test/helpers/MockOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; diff --git a/contracts/test/helpers/MockPriceFeed.sol b/contracts/test/helpers/MockPriceFeed.sol index 2cc3ff5..05b5526 100644 --- a/contracts/test/helpers/MockPriceFeed.sol +++ b/contracts/test/helpers/MockPriceFeed.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; diff --git a/contracts/test/helpers/MockStaleOracle.sol b/contracts/test/helpers/MockStaleOracle.sol index 3de9837..efcca4c 100644 --- a/contracts/test/helpers/MockStaleOracle.sol +++ b/contracts/test/helpers/MockStaleOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; diff --git a/contracts/test/helpers/MockStalePriceFeed.sol b/contracts/test/helpers/MockStalePriceFeed.sol index a96344c..f323ea7 100644 --- a/contracts/test/helpers/MockStalePriceFeed.sol +++ b/contracts/test/helpers/MockStalePriceFeed.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; diff --git a/contracts/test/helpers/MockToken.sol b/contracts/test/helpers/MockToken.sol index ba8b7e3..75e212f 100644 --- a/contracts/test/helpers/MockToken.sol +++ b/contracts/test/helpers/MockToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/contracts/token/BiconomyTokenPaymaster.sol b/contracts/token/BiconomyTokenPaymaster.sol index 27a3585..b805115 100644 --- a/contracts/token/BiconomyTokenPaymaster.sol +++ b/contracts/token/BiconomyTokenPaymaster.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; diff --git a/contracts/token/TokenPaymasterErrors.sol b/contracts/token/TokenPaymasterErrors.sol index 2ab9dfe..5168678 100644 --- a/contracts/token/TokenPaymasterErrors.sol +++ b/contracts/token/TokenPaymasterErrors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; contract TokenPaymasterErrors { /** diff --git a/contracts/token/adapters/IUniversalRouter.sol b/contracts/token/adapters/IUniversalRouter.sol index da822e3..b8bbd70 100644 --- a/contracts/token/adapters/IUniversalRouter.sol +++ b/contracts/token/adapters/IUniversalRouter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; diff --git a/contracts/token/adapters/UniswapExample.sol b/contracts/token/adapters/UniswapExample.sol index 723267a..a4390d3 100644 --- a/contracts/token/adapters/UniswapExample.sol +++ b/contracts/token/adapters/UniswapExample.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; diff --git a/contracts/token/feemanager/FeeManager.sol b/contracts/token/feemanager/FeeManager.sol index 3d6d183..928daaa 100644 --- a/contracts/token/feemanager/FeeManager.sol +++ b/contracts/token/feemanager/FeeManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/contracts/token/oracles/DerivedPriceFeed.sol b/contracts/token/oracles/DerivedPriceFeed.sol index 4123dbf..cae09ba 100644 --- a/contracts/token/oracles/DerivedPriceFeed.sol +++ b/contracts/token/oracles/DerivedPriceFeed.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; diff --git a/contracts/token/oracles/FeedInterface.sol b/contracts/token/oracles/FeedInterface.sol index e5a11a7..24585e8 100644 --- a/contracts/token/oracles/FeedInterface.sol +++ b/contracts/token/oracles/FeedInterface.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /** */ diff --git a/contracts/token/oracles/IOracleAggregator.sol b/contracts/token/oracles/IOracleAggregator.sol index 765c516..71cce8e 100644 --- a/contracts/token/oracles/IOracleAggregator.sol +++ b/contracts/token/oracles/IOracleAggregator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; interface IOracleAggregator { error MismatchInBaseAndQuoteDecimals(); diff --git a/contracts/token/oracles/IPriceOracle.sol b/contracts/token/oracles/IPriceOracle.sol index f25067c..f6260bb 100644 --- a/contracts/token/oracles/IPriceOracle.sol +++ b/contracts/token/oracles/IPriceOracle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; interface IPriceOracle { function latestRoundData() diff --git a/contracts/token/oracles/OracleAggregator.sol b/contracts/token/oracles/OracleAggregator.sol index 4180218..9f3a720 100644 --- a/contracts/token/oracles/OracleAggregator.sol +++ b/contracts/token/oracles/OracleAggregator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IOracleAggregator.sol"; diff --git a/contracts/utils/Exec.sol b/contracts/utils/Exec.sol index d7b0cde..d746246 100644 --- a/contracts/utils/Exec.sol +++ b/contracts/utils/Exec.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: LGPL-3.0-only -pragma solidity 0.8.20; +pragma solidity ^0.8.23; /** * Utility functions helpful when making different kinds of contract calls in Solidity. diff --git a/contracts/utils/LibAddress.sol b/contracts/utils/LibAddress.sol index 30afb10..720b443 100644 --- a/contracts/utils/LibAddress.sol +++ b/contracts/utils/LibAddress.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; library LibAddress { /** diff --git a/contracts/utils/SafeTransferLib.sol b/contracts/utils/SafeTransferLib.sol index 47f04e4..6cb57c0 100644 --- a/contracts/utils/SafeTransferLib.sol +++ b/contracts/utils/SafeTransferLib.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol) diff --git a/foundry.toml b/foundry.toml index cb66db4..4acd029 100644 --- a/foundry.toml +++ b/foundry.toml @@ -6,4 +6,5 @@ test = 'test/foundry' cache_path = 'forge-cache' viaIr = true evm_version = "paris" +auto_detect_solc = true # See more config options https://book.getfoundry.sh/reference/config.html diff --git a/hardhat.config.ts b/hardhat.config.ts index 5dc25c2..17a86e1 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -21,14 +21,7 @@ const config: HardhatUserConfig = { solidity: { compilers: [ { - version: "0.8.17", - settings: { - optimizer: { enabled: true, runs: 800 }, - viaIR: true, - }, - }, - { - version: "0.8.20", + version: "0.8.23", settings: { optimizer: { enabled: true, runs: 800 }, evmVersion: "paris", diff --git a/test/foundry/base/SATestBase.sol b/test/foundry/base/SATestBase.sol index de4e674..ca1e086 100644 --- a/test/foundry/base/SATestBase.sol +++ b/test/foundry/base/SATestBase.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.23; import {Test, Vm} from "forge-std/Test.sol"; import {MockToken} from "../../../contracts/test/helpers/MockToken.sol";