Skip to content

Commit

Permalink
update to solidity 0.8.23
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Jan 10, 2024
1 parent 528172e commit 7ecc9b4
Show file tree
Hide file tree
Showing 49 changed files with 49 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion contracts/BasePaymaster.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

/* solhint-disable reason-string */

Expand Down
2 changes: 1 addition & 1 deletion contracts/common/Errors.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.8.20;
pragma solidity ^0.8.23;

contract BasePaymasterErrors {
/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/deployer/Create3.sol
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion contracts/deployer/Deployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

import "./Create3.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IWETH9.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.20;
pragma solidity ^0.8.23;

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

interface IBiconomyTokenPaymaster {
/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/paymasters/ISponsorshipPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion contracts/libs/AddressUtils.sol
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion contracts/libs/CalldataHelper.sol
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/libs/MathLib.sol
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/AdvancedVerifyingPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/infinitism/OracleHelper.sol
Original file line number Diff line number Diff line change
@@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion contracts/references/infinitism/SampleTokenPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/infinitism/UniswapHelper.sol
Original file line number Diff line number Diff line change
@@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion contracts/references/pimlico/IOracle.sol
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/pimlico/PimlicoERC20Paymaster.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/soul/IPriceOracle.sol
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/soul/ITokenPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/soul/PriceOracle.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/references/soul/TokenPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/sponsorship/PaymasterHelpers.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/sponsorship/SponsorshipPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/accounts/BiconomyAccountFactory.sol
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/accounts/BiconomyAccountImpl.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/accounts/SimpleAccount.sol
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/dex/UniV3Integration.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/dex/UniswapV3SwapExamples.sol
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/helpers/MockOracle.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/helpers/MockPriceFeed.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/helpers/MockStaleOracle.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/helpers/MockStalePriceFeed.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/helpers/MockToken.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/token/BiconomyTokenPaymaster.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/TokenPaymasterErrors.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.8.20;
pragma solidity ^0.8.23;

contract TokenPaymasterErrors {
/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/adapters/IUniversalRouter.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.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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/adapters/UniswapExample.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/feemanager/FeeManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

import "@openzeppelin/contracts/access/Ownable.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/token/oracles/DerivedPriceFeed.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion contracts/token/oracles/FeedInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

/**
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/oracles/IOracleAggregator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

interface IOracleAggregator {
error MismatchInBaseAndQuoteDecimals();
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/oracles/IPriceOracle.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

interface IPriceOracle {
function latestRoundData()
Expand Down
2 changes: 1 addition & 1 deletion contracts/token/oracles/OracleAggregator.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/Exec.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.8.20;
pragma solidity ^0.8.23;

/**
* Utility functions helpful when making different kinds of contract calls in Solidity.
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/LibAddress.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8.23;

library LibAddress {
/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/utils/SafeTransferLib.sol
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 1 addition & 8 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/foundry/base/SATestBase.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit 7ecc9b4

Please sign in to comment.