diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8deface8..0aed06e90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: echo "✅ Passed" >> $GITHUB_STEP_SUMMARY tests: - needs: ["lint", "build"] + needs: ["build"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/foundry.toml b/foundry.toml index fdbb6ebe5..217b928a2 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,7 +5,7 @@ block_gas_limit = 300000000 gas_limit = 3000000000 gas_price = 1500000000 - solc_version = "0.8.25" + solc_version = "0.8.28" evm_version = "cancun" isolate = false gas_reports = ["Atlas", "AtlasVerification", "Simulator", "Sorter", "ExecutionEnvironment"] diff --git a/script/base/deploy-base.s.sol b/script/base/deploy-base.s.sol index fb28277fb..0b5059d45 100644 --- a/script/base/deploy-base.s.sol +++ b/script/base/deploy-base.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/create-oev-demo-positions.s.sol b/script/create-oev-demo-positions.s.sol index 283309e84..be10a6bcf 100644 --- a/script/create-oev-demo-positions.s.sol +++ b/script/create-oev-demo-positions.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-atlas.s.sol b/script/deploy-atlas.s.sol index d53a6162f..b60e37e1b 100644 --- a/script/deploy-atlas.s.sol +++ b/script/deploy-atlas.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-demo-tokens.s.sol b/script/deploy-demo-tokens.s.sol index 54afc65fa..3d24baca4 100644 --- a/script/deploy-demo-tokens.s.sol +++ b/script/deploy-demo-tokens.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-exec-env.s.sol b/script/deploy-exec-env.s.sol index 337678dcd..d603a180a 100644 --- a/script/deploy-exec-env.s.sol +++ b/script/deploy-exec-env.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-fl-online-control.s.sol b/script/deploy-fl-online-control.s.sol index 3e513931a..ac9d9998a 100644 --- a/script/deploy-fl-online-control.s.sol +++ b/script/deploy-fl-online-control.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-gas-calculator.s.sol b/script/deploy-gas-calculator.s.sol index 3866bbaf1..68b9d0f01 100644 --- a/script/deploy-gas-calculator.s.sol +++ b/script/deploy-gas-calculator.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/script/deploy-oev-demo.s.sol b/script/deploy-oev-demo.s.sol index dbe42e4ee..d48fd33ba 100644 --- a/script/deploy-oev-demo.s.sol +++ b/script/deploy-oev-demo.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-solver.s.sol b/script/deploy-solver.s.sol index 499e6b733..12ef6c13e 100644 --- a/script/deploy-solver.s.sol +++ b/script/deploy-solver.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-sorter.s.sol b/script/deploy-sorter.s.sol index 3a6f2f1f8..9d9c44c48 100644 --- a/script/deploy-sorter.s.sol +++ b/script/deploy-sorter.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-swap-intent-control.s.sol b/script/deploy-swap-intent-control.s.sol index 3eb01e615..9e3b01eff 100644 --- a/script/deploy-swap-intent-control.s.sol +++ b/script/deploy-swap-intent-control.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-tx-builder.s.sol b/script/deploy-tx-builder.s.sol index c9fb32758..fe6a977a0 100644 --- a/script/deploy-tx-builder.s.sol +++ b/script/deploy-tx-builder.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/deploy-v2-reward-control.s.sol b/script/deploy-v2-reward-control.s.sol index 46db22ea6..2f6b348eb 100644 --- a/script/deploy-v2-reward-control.s.sol +++ b/script/deploy-v2-reward-control.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/log-balances.s.sol b/script/log-balances.s.sol index a8de086b7..edbe43314 100644 --- a/script/log-balances.s.sol +++ b/script/log-balances.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/mint-demo-tokens.s.sol b/script/mint-demo-tokens.s.sol index ab8ef1c4c..b7c814c7e 100644 --- a/script/mint-demo-tokens.s.sol +++ b/script/mint-demo-tokens.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/set-oev-demo-signers.s.sol b/script/set-oev-demo-signers.s.sol index e2c8ead19..b88b19038 100644 --- a/script/set-oev-demo-signers.s.sol +++ b/script/set-oev-demo-signers.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/script/solver-deposit.s.sol b/script/solver-deposit.s.sol index 01e4ecbf6..57e10b008 100644 --- a/script/solver-deposit.s.sol +++ b/script/solver-deposit.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/src/contracts/atlas/AtlETH.sol b/src/contracts/atlas/AtlETH.sol index 2bfcdd214..60bfb9eeb 100644 --- a/src/contracts/atlas/AtlETH.sol +++ b/src/contracts/atlas/AtlETH.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { SafeCast } from "openzeppelin-contracts/contracts/utils/math/SafeCast.sol"; diff --git a/src/contracts/atlas/Atlas.sol b/src/contracts/atlas/Atlas.sol index dd3bc2fd5..4d6e3be33 100644 --- a/src/contracts/atlas/Atlas.sol +++ b/src/contracts/atlas/Atlas.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { LibSort } from "solady/utils/LibSort.sol"; diff --git a/src/contracts/atlas/AtlasVerification.sol b/src/contracts/atlas/AtlasVerification.sol index 9c1b7d5cc..2bf28d6d4 100644 --- a/src/contracts/atlas/AtlasVerification.sol +++ b/src/contracts/atlas/AtlasVerification.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { EIP712 } from "openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol"; import { ECDSA } from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; diff --git a/src/contracts/atlas/DAppIntegration.sol b/src/contracts/atlas/DAppIntegration.sol index 1ffc0c8e5..447a1c863 100644 --- a/src/contracts/atlas/DAppIntegration.sol +++ b/src/contracts/atlas/DAppIntegration.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IDAppControl } from "../interfaces/IDAppControl.sol"; import { IAtlas } from "../interfaces/IAtlas.sol"; diff --git a/src/contracts/atlas/Escrow.sol b/src/contracts/atlas/Escrow.sol index 713fe336c..3bcd5da45 100644 --- a/src/contracts/atlas/Escrow.sol +++ b/src/contracts/atlas/Escrow.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { AtlETH } from "./AtlETH.sol"; import { IExecutionEnvironment } from "../interfaces/IExecutionEnvironment.sol"; @@ -573,8 +573,8 @@ abstract contract Escrow is AtlETH { bool _success; // Set the solver lock and solver address at the beginning to ensure reliability - _setSolverLock(uint256(uint160(solverOp.from))); - _setSolverTo(solverOp.solver); + t_solverLock = uint256(uint160(solverOp.from)); + t_solverTo = solverOp.solver; // ------------------------------------- // // Pre-Solver Call // diff --git a/src/contracts/atlas/Factory.sol b/src/contracts/atlas/Factory.sol index faf5cf92f..e2f1dc6b9 100644 --- a/src/contracts/atlas/Factory.sol +++ b/src/contracts/atlas/Factory.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { FactoryLib } from "./FactoryLib.sol"; diff --git a/src/contracts/atlas/FactoryLib.sol b/src/contracts/atlas/FactoryLib.sol index 0cf9495a5..a6b74e3d1 100644 --- a/src/contracts/atlas/FactoryLib.sol +++ b/src/contracts/atlas/FactoryLib.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { Mimic } from "../common/Mimic.sol"; import { AtlasEvents } from "../types/AtlasEvents.sol"; diff --git a/src/contracts/atlas/GasAccounting.sol b/src/contracts/atlas/GasAccounting.sol index ce79b62af..43e0c7ece 100644 --- a/src/contracts/atlas/GasAccounting.sol +++ b/src/contracts/atlas/GasAccounting.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { SafeCast } from "openzeppelin-contracts/contracts/utils/math/SafeCast.sol"; @@ -46,20 +46,18 @@ abstract contract GasAccounting is SafetyLocks { uint256 _rawClaims = (FIXED_GAS_OFFSET + gasMarker) * tx.gasprice; // Set any withdraws or deposits - _setClaims(_rawClaims.withSurcharge(BUNDLER_SURCHARGE_RATE)); + t_claims = _rawClaims.withSurcharge(BUNDLER_SURCHARGE_RATE); // Atlas surcharge is based on the raw claims value. - _setFees(_rawClaims.getSurcharge(ATLAS_SURCHARGE_RATE)); - _setDeposits(msg.value); - _setSolverSurcharge(0); + t_fees = _rawClaims.getSurcharge(ATLAS_SURCHARGE_RATE); + t_deposits = msg.value; - // Explicitly set writeoffs and withdrawals to 0 in case multiple metacalls in single tx. - _setWriteoffs(0); - _setWithdrawals(0); - - // Explicitly clear solverLock and solverTo in case multiple metacalls in single tx. - _setSolverLock(0); - _setSolverTo(address(0)); + // Explicitly set other transient vars to 0 in case multiple metacalls in single tx. + t_writeoffs = 0; + t_withdrawals = 0; + t_solverSurcharge = 0; + t_solverLock = 0; + t_solverTo = address(0); // The Lock slot is cleared at the end of the metacall, so no need to zero again here. } @@ -100,12 +98,12 @@ abstract contract GasAccounting is SafetyLocks { /// @return uint256 The current shortfall amount, or 0 if there is no shortfall. function shortfall() external view returns (uint256) { uint256 _currentDeficit = _deficit(); - uint256 _deposits = deposits(); + uint256 _deposits = t_deposits; return (_currentDeficit > _deposits) ? (_currentDeficit - _deposits) : 0; } function _deficit() internal view returns (uint256) { - return claims() + withdrawals() + fees() - writeoffs(); + return t_claims + t_withdrawals + t_fees - t_writeoffs; } /// @notice Allows a solver to settle any outstanding ETH owed, either to repay gas used by their solverOp or to @@ -128,7 +126,7 @@ abstract contract GasAccounting is SafetyLocks { // calls directly to the solver contract in this phase, the solver should be careful to not call malicious // contracts which may call reconcile() on their behalf, with an excessive maxApprovedGasSpend. if (_phase() != uint8(ExecutionPhase.SolverOperation)) revert WrongPhase(); - if (msg.sender != _solverTo()) revert InvalidAccess(); + if (msg.sender != t_solverTo) revert InvalidAccess(); (address _currentSolver, bool _calledBack, bool _fulfilled) = _solverLockData(); uint256 _bondedBalance = uint256(S_accessData[_currentSolver].bonded); @@ -137,12 +135,12 @@ abstract contract GasAccounting is SafetyLocks { if (maxApprovedGasSpend > _bondedBalance) maxApprovedGasSpend = _bondedBalance; uint256 _deductions = _deficit(); - uint256 _additions = deposits() + msg.value; + uint256 _additions = t_deposits + msg.value; // Add msg.value to solver's deposits // NOTE: Surplus deposits are credited back to the Solver during settlement. // NOTE: This function is called inside the solver try/catch and will be undone if solver fails. - if (msg.value > 0) _setDeposits(_additions); + if (msg.value > 0) t_deposits = _additions; // CASE: Callback verified but insufficient balance if (_deductions > _additions + maxApprovedGasSpend) { @@ -151,21 +149,21 @@ abstract contract GasAccounting is SafetyLocks { // but it does treat any msg.value as a deposit and allows for either the solver to call back with a // higher maxApprovedGasSpend or to have their deficit covered by a contribute during the postSolverOp // hook. - _setSolverLock(uint256(uint160(_currentSolver)) | _SOLVER_CALLED_BACK_MASK); + t_solverLock = (uint256(uint160(_currentSolver)) | _SOLVER_CALLED_BACK_MASK); } return _deductions - _additions; } // CASE: Callback verified and solver duty fulfilled if (!_fulfilled) { - _setSolverLock(uint256(uint160(_currentSolver)) | _SOLVER_CALLED_BACK_MASK | _SOLVER_FULFILLED_MASK); + t_solverLock = (uint256(uint160(_currentSolver)) | _SOLVER_CALLED_BACK_MASK | _SOLVER_FULFILLED_MASK); } return 0; } /// @notice Internal function to handle ETH contribution, increasing deposits if a non-zero value is sent. function _contribute() internal { - if (msg.value != 0) _setDeposits(deposits() + msg.value); + if (msg.value != 0) t_deposits += msg.value; } /// @notice Borrows ETH from the contract, transferring the specified amount to the caller if available. @@ -178,7 +176,7 @@ abstract contract GasAccounting is SafetyLocks { if (amount == 0) return true; if (address(this).balance < amount) return false; - _setWithdrawals(withdrawals() + amount); + t_withdrawals += amount; return true; } @@ -221,7 +219,7 @@ abstract contract GasAccounting is SafetyLocks { s_balanceOf[owner].unbonding = 0; _aData.bonded = 0; - _setWriteoffs(writeoffs() + deficit); + t_writeoffs += deficit; amount -= deficit; // Set amount equal to total to accurately track the changing bondedTotalSupply } else { // The unbonding balance is sufficient to cover the remaining amount owed. Draw everything from the @@ -242,7 +240,7 @@ abstract contract GasAccounting is SafetyLocks { S_accessData[owner] = _aData; S_bondedTotalSupply -= amount; - _setDeposits(deposits() + amount); + t_deposits += amount; } /// @notice Increases the owner's bonded balance by the specified amount. @@ -264,7 +262,7 @@ abstract contract GasAccounting is SafetyLocks { // Persist changes in the _aData memory struct back to storage S_accessData[owner] = _aData; - _setWithdrawals(withdrawals() + amount); + t_withdrawals += amount; } /// @notice Accounts for the gas cost of a failed SolverOperation, either by increasing writeoffs (if the bundler is @@ -293,7 +291,7 @@ abstract contract GasAccounting is SafetyLocks { if (result.bundlersFault()) { // CASE: Solver is not responsible for the failure of their operation, so we blame the bundler // and reduce the total amount refunded to the bundler - _setWriteoffs(writeoffs() + _gasUsed.withSurcharges(ATLAS_SURCHARGE_RATE, BUNDLER_SURCHARGE_RATE)); + t_writeoffs += _gasUsed.withSurcharges(ATLAS_SURCHARGE_RATE, BUNDLER_SURCHARGE_RATE); } else { // CASE: Solver failed, so we calculate what they owe. uint256 _gasUsedWithSurcharges = _gasUsed.withSurcharges(ATLAS_SURCHARGE_RATE, BUNDLER_SURCHARGE_RATE); @@ -308,13 +306,13 @@ abstract contract GasAccounting is SafetyLocks { // so that in the event of no successful solvers, any `_assign()`ed surcharges can be attributed to an // increase in Atlas' cumulative surcharge. if (_surchargesOnly > _assignDeficit) { - _setSolverSurcharge(solverSurcharge() + (_surchargesOnly - _assignDeficit)); + t_solverSurcharge += (_surchargesOnly - _assignDeficit); } } } function _writeOffBidFindGasCost(uint256 gasUsed) internal { - _setWriteoffs(writeoffs() + gasUsed.withSurcharges(ATLAS_SURCHARGE_RATE, BUNDLER_SURCHARGE_RATE)); + t_writeoffs += gasUsed.withSurcharges(ATLAS_SURCHARGE_RATE, BUNDLER_SURCHARGE_RATE); } /// @param ctx Context struct containing relevant context information for the Atlas auction. @@ -344,11 +342,11 @@ abstract contract GasAccounting is SafetyLocks { { uint256 _surcharge = S_cumulativeSurcharge; - adjustedWithdrawals = withdrawals(); - adjustedDeposits = deposits(); - adjustedClaims = claims(); - adjustedWriteoffs = writeoffs(); - uint256 _fees = fees(); + adjustedWithdrawals = t_withdrawals; + adjustedDeposits = t_deposits; + adjustedClaims = t_claims; + adjustedWriteoffs = t_writeoffs; + uint256 _fees = t_fees; uint256 _gasLeft = gasleft(); // Hold this constant for the calculations @@ -368,7 +366,7 @@ abstract contract GasAccounting is SafetyLocks { S_cumulativeSurcharge = _surcharge + netAtlasGasSurcharge; } else { // If no successful solvers, only collect partial surcharges from solver's fault failures (if any) - uint256 _solverSurcharge = solverSurcharge(); + uint256 _solverSurcharge = t_solverSurcharge; if (_solverSurcharge > 0) { netAtlasGasSurcharge = _solverSurcharge.getPortionFromTotalSurcharge({ targetSurchargeRate: ATLAS_SURCHARGE_RATE, @@ -533,6 +531,6 @@ abstract contract GasAccounting is SafetyLocks { /// correct. /// @return True if the balance is reconciled, false otherwise. function _isBalanceReconciled() internal view returns (bool) { - return deposits() >= _deficit(); + return t_deposits >= _deficit(); } } diff --git a/src/contracts/atlas/NonceManager.sol b/src/contracts/atlas/NonceManager.sol index 19fa27956..3f1b9a38c 100644 --- a/src/contracts/atlas/NonceManager.sol +++ b/src/contracts/atlas/NonceManager.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { AtlasConstants } from "../types/AtlasConstants.sol"; diff --git a/src/contracts/atlas/Permit69.sol b/src/contracts/atlas/Permit69.sol index 84ba2e599..096d7630c 100644 --- a/src/contracts/atlas/Permit69.sol +++ b/src/contracts/atlas/Permit69.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/atlas/SafetyLocks.sol b/src/contracts/atlas/SafetyLocks.sol index 6d7ec03f2..87f274eea 100644 --- a/src/contracts/atlas/SafetyLocks.sol +++ b/src/contracts/atlas/SafetyLocks.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { Storage } from "./Storage.sol"; import { CallBits } from "../libraries/CallBits.sol"; diff --git a/src/contracts/atlas/Storage.sol b/src/contracts/atlas/Storage.sol index 0359dc2f9..baca20ae2 100644 --- a/src/contracts/atlas/Storage.sol +++ b/src/contracts/atlas/Storage.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/EscrowTypes.sol"; import "../types/LockTypes.sol"; @@ -32,16 +32,17 @@ contract Storage is AtlasEvents, AtlasErrors, AtlasConstants { uint256 public constant FIXED_GAS_OFFSET = AccountingMath._FIXED_GAS_OFFSET; // Transient storage slots - bytes32 private constant _T_LOCK_SLOT = keccak256("ATLAS_LOCK"); - bytes32 private constant _T_SOLVER_LOCK_SLOT = keccak256("ATLAS_SOLVER_LOCK"); - bytes32 private constant _T_SOLVER_TO_SLOT = keccak256("ATLAS_SOLVER_TO"); - - bytes32 private constant _T_CLAIMS_SLOT = keccak256("ATLAS_CLAIMS"); - bytes32 private constant _T_FEES_SLOT = keccak256("ATLAS_FEES"); - bytes32 private constant _T_WRITEOFFS_SLOT = keccak256("ATLAS_WRITEOFFS"); - bytes32 private constant _T_WITHDRAWALS_SLOT = keccak256("ATLAS_WITHDRAWALS"); - bytes32 private constant _T_DEPOSITS_SLOT = keccak256("ATLAS_DEPOSITS"); - bytes32 private constant _T_SOLVER_SURCHARGE_SLOT = keccak256("ATLAS_SOLVER_SURCHARGE"); + uint256 internal transient t_lock; // contains activeAddress, callConfig, and phase + uint256 internal transient t_solverLock; + address internal transient t_solverTo; // current solverOp.solver contract address + + // solverSurcharge = total surcharge collected from failed solverOps due to solver fault. + uint256 internal transient t_solverSurcharge; + uint256 internal transient t_claims; + uint256 internal transient t_fees; + uint256 internal transient t_writeoffs; + uint256 internal transient t_withdrawals; + uint256 internal transient t_deposits; // AtlETH storage uint256 internal S_totalSupply; @@ -155,50 +156,26 @@ contract Storage is AtlasEvents, AtlasErrors, AtlasConstants { // Transient Internal Getters // // ---------------------------------------------------- // - function claims() internal view returns (uint256) { - return uint256(_tload(_T_CLAIMS_SLOT)); - } - - function fees() internal view returns (uint256) { - return uint256(_tload(_T_FEES_SLOT)); - } - - function writeoffs() internal view returns (uint256) { - return uint256(_tload(_T_WRITEOFFS_SLOT)); - } - - function withdrawals() internal view returns (uint256) { - return uint256(_tload(_T_WITHDRAWALS_SLOT)); - } - - function deposits() internal view returns (uint256) { - return uint256(_tload(_T_DEPOSITS_SLOT)); - } - - function solverSurcharge() internal view returns (uint256) { - return uint256(_tload(_T_SOLVER_SURCHARGE_SLOT)); - } - function _lock() internal view returns (address activeEnvironment, uint32 callConfig, uint8 phase) { - bytes32 _lockData = _tload(_T_LOCK_SLOT); - activeEnvironment = address(uint160(uint256(_lockData >> 40))); - callConfig = uint32(uint256(_lockData >> 8)); - phase = uint8(uint256(_lockData)); + uint256 _lockData = t_lock; + activeEnvironment = address(uint160(_lockData >> 40)); + callConfig = uint32(_lockData >> 8); + phase = uint8(_lockData); } function _activeEnvironment() internal view returns (address) { // right shift 40 bits to remove the callConfig and phase, only activeEnvironment remains - return address(uint160(uint256(_tload(_T_LOCK_SLOT) >> 40))); + return address(uint160(t_lock >> 40)); } function _activeCallConfig() internal view returns (uint32) { // right shift 8 bits to remove the phase, cast to uint32 to remove the activeEnvironment - return uint32(uint256(_tload(_T_LOCK_SLOT) >> 8)); + return uint32(t_lock >> 8); } function _phase() internal view returns (uint8) { // right-most 8 bits of Lock are the phase - return uint8(uint256(_tload(_T_LOCK_SLOT))); + return uint8(t_lock); } /// @notice Returns information about the current state of the solver lock. @@ -206,18 +183,14 @@ contract Storage is AtlasEvents, AtlasErrors, AtlasConstants { /// @return calledBack Boolean indicating whether the solver has called back via `reconcile`. /// @return fulfilled Boolean indicating whether the solver's outstanding debt has been repaid via `reconcile`. function _solverLockData() internal view returns (address currentSolver, bool calledBack, bool fulfilled) { - uint256 _solverLock = uint256(_tload(_T_SOLVER_LOCK_SLOT)); + uint256 _solverLock = t_solverLock; currentSolver = address(uint160(_solverLock)); calledBack = _solverLock & _SOLVER_CALLED_BACK_MASK != 0; fulfilled = _solverLock & _SOLVER_FULFILLED_MASK != 0; } - function _solverTo() internal view returns (address) { - return address(uint160(uint256(_tload(_T_SOLVER_TO_SLOT)))); - } - function _isUnlocked() internal view returns (bool) { - return _tload(_T_LOCK_SLOT) == bytes32(_UNLOCKED); + return t_lock == _UNLOCKED; } // ---------------------------------------------------- // @@ -228,70 +201,15 @@ contract Storage is AtlasEvents, AtlasErrors, AtlasConstants { // Pack the lock slot from the right: // [ 56 bits ][ 160 bits ][ 32 bits ][ 8 bits ] // [ unused bits ][ activeEnvironment ][ callConfig ][ phase ] - _tstore( - _T_LOCK_SLOT, - bytes32(uint256(uint160(activeEnvironment))) << 40 | bytes32(uint256(callConfig)) << 8 - | bytes32(uint256(phase)) - ); + t_lock = uint256(uint160(activeEnvironment)) << 40 | uint256(callConfig) << 8 | uint256(phase); } function _releaseLock() internal { - _tstore(_T_LOCK_SLOT, bytes32(_UNLOCKED)); + t_lock = _UNLOCKED; } // Sets the Lock phase without changing the activeEnvironment or callConfig. function _setLockPhase(uint8 newPhase) internal { - _tstore(_T_LOCK_SLOT, (_tload(_T_LOCK_SLOT) & _LOCK_PHASE_MASK) | bytes32(uint256(newPhase))); - } - - function _setSolverLock(uint256 newSolverLock) internal { - _tstore(_T_SOLVER_LOCK_SLOT, bytes32(newSolverLock)); - } - - function _setSolverTo(address newSolverTo) internal { - _tstore(_T_SOLVER_TO_SLOT, bytes32(uint256(uint160(newSolverTo)))); - } - - function _setClaims(uint256 newClaims) internal { - _tstore(_T_CLAIMS_SLOT, bytes32(newClaims)); - } - - function _setFees(uint256 newFees) internal { - _tstore(_T_FEES_SLOT, bytes32(newFees)); - } - - function _setWriteoffs(uint256 newWriteoffs) internal { - _tstore(_T_WRITEOFFS_SLOT, bytes32(newWriteoffs)); - } - - function _setWithdrawals(uint256 newWithdrawals) internal { - _tstore(_T_WITHDRAWALS_SLOT, bytes32(newWithdrawals)); - } - - function _setDeposits(uint256 newDeposits) internal { - _tstore(_T_DEPOSITS_SLOT, bytes32(newDeposits)); - } - - // NOTE: Only captures surcharges for failed solver Ops where - // solver is at fault - function _setSolverSurcharge(uint256 newSurcharge) internal { - _tstore(_T_SOLVER_SURCHARGE_SLOT, bytes32(newSurcharge)); - } - - // ------------------------------------------------------ // - // Transient Storage Helpers // - // ------------------------------------------------------ // - - function _tstore(bytes32 slot, bytes32 value) internal { - assembly { - tstore(slot, value) - } - } - - function _tload(bytes32 slot) internal view returns (bytes32 value) { - assembly { - value := tload(slot) - } - return value; + t_lock = (t_lock & _LOCK_PHASE_MASK) | uint256(newPhase); } } diff --git a/src/contracts/common/ExecutionBase.sol b/src/contracts/common/ExecutionBase.sol index 4bdeddec1..a1383ae9e 100644 --- a/src/contracts/common/ExecutionBase.sol +++ b/src/contracts/common/ExecutionBase.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/common/ExecutionEnvironment.sol b/src/contracts/common/ExecutionEnvironment.sol index 42945ad01..84fb2fc03 100644 --- a/src/contracts/common/ExecutionEnvironment.sol +++ b/src/contracts/common/ExecutionEnvironment.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/common/Mimic.sol b/src/contracts/common/Mimic.sol index a88446bc9..ad7f4a718 100644 --- a/src/contracts/common/Mimic.sol +++ b/src/contracts/common/Mimic.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; contract Mimic { /* diff --git a/src/contracts/dapp/ControlTemplate.sol b/src/contracts/dapp/ControlTemplate.sol index b510f7f1d..3663f915e 100644 --- a/src/contracts/dapp/ControlTemplate.sol +++ b/src/contracts/dapp/ControlTemplate.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/SolverOperation.sol"; import "../types/UserOperation.sol"; diff --git a/src/contracts/dapp/DAppControl.sol b/src/contracts/dapp/DAppControl.sol index 03c4d977e..8340bd7f4 100644 --- a/src/contracts/dapp/DAppControl.sol +++ b/src/contracts/dapp/DAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { DAppControlTemplate } from "./ControlTemplate.sol"; import { ExecutionBase } from "../common/ExecutionBase.sol"; diff --git a/src/contracts/examples/ex-post-mev-example/V2ExPost.sol b/src/contracts/examples/ex-post-mev-example/V2ExPost.sol index 7c90b9140..66b71792a 100644 --- a/src/contracts/examples/ex-post-mev-example/V2ExPost.sol +++ b/src/contracts/examples/ex-post-mev-example/V2ExPost.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/fastlane-online/BaseStorage.sol b/src/contracts/examples/fastlane-online/BaseStorage.sol index ca2514a3d..457b564a5 100644 --- a/src/contracts/examples/fastlane-online/BaseStorage.sol +++ b/src/contracts/examples/fastlane-online/BaseStorage.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../../types/SolverOperation.sol"; diff --git a/src/contracts/examples/fastlane-online/FastLaneControl.sol b/src/contracts/examples/fastlane-online/FastLaneControl.sol index 9b0388c95..183e6c350 100644 --- a/src/contracts/examples/fastlane-online/FastLaneControl.sol +++ b/src/contracts/examples/fastlane-online/FastLaneControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/fastlane-online/FastLaneOnlineErrors.sol b/src/contracts/examples/fastlane-online/FastLaneOnlineErrors.sol index 603cdff3a..436bb994a 100644 --- a/src/contracts/examples/fastlane-online/FastLaneOnlineErrors.sol +++ b/src/contracts/examples/fastlane-online/FastLaneOnlineErrors.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; contract FastLaneOnlineErrors { // FastLaneControl.sol diff --git a/src/contracts/examples/fastlane-online/FastLaneOnlineInner.sol b/src/contracts/examples/fastlane-online/FastLaneOnlineInner.sol index 492085440..b49f1f55d 100644 --- a/src/contracts/examples/fastlane-online/FastLaneOnlineInner.sol +++ b/src/contracts/examples/fastlane-online/FastLaneOnlineInner.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/fastlane-online/FastLaneOnlineOuter.sol b/src/contracts/examples/fastlane-online/FastLaneOnlineOuter.sol index b4a9efe4f..fb4f10f65 100644 --- a/src/contracts/examples/fastlane-online/FastLaneOnlineOuter.sol +++ b/src/contracts/examples/fastlane-online/FastLaneOnlineOuter.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/fastlane-online/FastLaneTypes.sol b/src/contracts/examples/fastlane-online/FastLaneTypes.sol index 13e4270f8..786e6a7e3 100644 --- a/src/contracts/examples/fastlane-online/FastLaneTypes.sol +++ b/src/contracts/examples/fastlane-online/FastLaneTypes.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // External representation of the swap intent struct SwapIntent { diff --git a/src/contracts/examples/fastlane-online/IFastLaneOnline.sol b/src/contracts/examples/fastlane-online/IFastLaneOnline.sol index c61c79508..df5d056d5 100644 --- a/src/contracts/examples/fastlane-online/IFastLaneOnline.sol +++ b/src/contracts/examples/fastlane-online/IFastLaneOnline.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../../types/UserOperation.sol"; import "../../types/SolverOperation.sol"; diff --git a/src/contracts/examples/fastlane-online/OuterHelpers.sol b/src/contracts/examples/fastlane-online/OuterHelpers.sol index 4a0544d40..976674c2f 100644 --- a/src/contracts/examples/fastlane-online/OuterHelpers.sol +++ b/src/contracts/examples/fastlane-online/OuterHelpers.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/fastlane-online/SolverGateway.sol b/src/contracts/examples/fastlane-online/SolverGateway.sol index 26e3ed80c..0e106b7b1 100644 --- a/src/contracts/examples/fastlane-online/SolverGateway.sol +++ b/src/contracts/examples/fastlane-online/SolverGateway.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/gas-filler/Filler.sol b/src/contracts/examples/gas-filler/Filler.sol index 904c11476..29f042c33 100644 --- a/src/contracts/examples/gas-filler/Filler.sol +++ b/src/contracts/examples/gas-filler/Filler.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/generalized-backrun/GeneralizedBackrunUserBundler.sol b/src/contracts/examples/generalized-backrun/GeneralizedBackrunUserBundler.sol index 22aa7620c..643fe0bea 100644 --- a/src/contracts/examples/generalized-backrun/GeneralizedBackrunUserBundler.sol +++ b/src/contracts/examples/generalized-backrun/GeneralizedBackrunUserBundler.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/intents-example/StateIntent.sol b/src/contracts/examples/intents-example/StateIntent.sol index 3083ca379..bc3984d81 100644 --- a/src/contracts/examples/intents-example/StateIntent.sol +++ b/src/contracts/examples/intents-example/StateIntent.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Atlas Base Imports import { IExecutionEnvironment } from "../../interfaces/IExecutionEnvironment.sol"; diff --git a/src/contracts/examples/intents-example/SwapIntentDAppControl.sol b/src/contracts/examples/intents-example/SwapIntentDAppControl.sol index 8250a32e0..fd98fd9fa 100644 --- a/src/contracts/examples/intents-example/SwapIntentDAppControl.sol +++ b/src/contracts/examples/intents-example/SwapIntentDAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol b/src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol index d00f82af8..daf3d5dd7 100644 --- a/src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol +++ b/src/contracts/examples/oev-example/ChainlinkAtlasWrapper.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; import { SafeERC20, IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/src/contracts/examples/oev-example/ChainlinkAtlasWrapperAlt.sol b/src/contracts/examples/oev-example/ChainlinkAtlasWrapperAlt.sol index 47cefee0d..ed3842065 100644 --- a/src/contracts/examples/oev-example/ChainlinkAtlasWrapperAlt.sol +++ b/src/contracts/examples/oev-example/ChainlinkAtlasWrapperAlt.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; import { SafeERC20, IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/src/contracts/examples/oev-example/ChainlinkDAppControl.sol b/src/contracts/examples/oev-example/ChainlinkDAppControl.sol index 18883ed99..fc6d7ef2b 100644 --- a/src/contracts/examples/oev-example/ChainlinkDAppControl.sol +++ b/src/contracts/examples/oev-example/ChainlinkDAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { ECDSA } from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; import { CallConfig } from "../../types/ConfigTypes.sol"; diff --git a/src/contracts/examples/oev-example/ChainlinkDAppControlAlt.sol b/src/contracts/examples/oev-example/ChainlinkDAppControlAlt.sol index 611e32bdc..53b699ad5 100644 --- a/src/contracts/examples/oev-example/ChainlinkDAppControlAlt.sol +++ b/src/contracts/examples/oev-example/ChainlinkDAppControlAlt.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { CallConfig } from "../../types/ConfigTypes.sol"; import "../../types/UserOperation.sol"; diff --git a/src/contracts/examples/oev-example/IChainlinkAtlasWrapper.sol b/src/contracts/examples/oev-example/IChainlinkAtlasWrapper.sol index a45b6e7b8..01fa7d141 100644 --- a/src/contracts/examples/oev-example/IChainlinkAtlasWrapper.sol +++ b/src/contracts/examples/oev-example/IChainlinkAtlasWrapper.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IChainlinkDAppControl } from "./IChainlinkDAppControl.sol"; diff --git a/src/contracts/examples/oev-example/IChainlinkDAppControl.sol b/src/contracts/examples/oev-example/IChainlinkDAppControl.sol index 3c0ff8944..663a77518 100644 --- a/src/contracts/examples/oev-example/IChainlinkDAppControl.sol +++ b/src/contracts/examples/oev-example/IChainlinkDAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; interface IChainlinkDAppControl { function verifyTransmitSigners( diff --git a/src/contracts/examples/trebleswap/TrebleSwapDAppControl.sol b/src/contracts/examples/trebleswap/TrebleSwapDAppControl.sol index 413a54af9..865b3c2ba 100644 --- a/src/contracts/examples/trebleswap/TrebleSwapDAppControl.sol +++ b/src/contracts/examples/trebleswap/TrebleSwapDAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/examples/v2-example-router/V2RewardDAppControl.sol b/src/contracts/examples/v2-example-router/V2RewardDAppControl.sol index 45a73d5d9..667e27b65 100644 --- a/src/contracts/examples/v2-example-router/V2RewardDAppControl.sol +++ b/src/contracts/examples/v2-example-router/V2RewardDAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/v2-example/V2DAppControl.sol b/src/contracts/examples/v2-example/V2DAppControl.sol index de6e2f9f6..591c68648 100644 --- a/src/contracts/examples/v2-example/V2DAppControl.sol +++ b/src/contracts/examples/v2-example/V2DAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/examples/v4-example/IHooks.sol b/src/contracts/examples/v4-example/IHooks.sol index 3f4fa5caf..03d33c679 100644 --- a/src/contracts/examples/v4-example/IHooks.sol +++ b/src/contracts/examples/v4-example/IHooks.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IPoolManager } from "./IPoolManager.sol"; diff --git a/src/contracts/examples/v4-example/IPoolManager.sol b/src/contracts/examples/v4-example/IPoolManager.sol index a2e49b34e..e9e022eba 100644 --- a/src/contracts/examples/v4-example/IPoolManager.sol +++ b/src/contracts/examples/v4-example/IPoolManager.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IHooks } from "./IHooks.sol"; diff --git a/src/contracts/examples/v4-example/UniV4Hook.sol b/src/contracts/examples/v4-example/UniV4Hook.sol index 490622e5b..7922c3745 100644 --- a/src/contracts/examples/v4-example/UniV4Hook.sol +++ b/src/contracts/examples/v4-example/UniV4Hook.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // V4 Imports import { IPoolManager } from "./IPoolManager.sol"; diff --git a/src/contracts/examples/v4-example/V4DAppControl.sol b/src/contracts/examples/v4-example/V4DAppControl.sol index 093defc0d..3eb4d198f 100644 --- a/src/contracts/examples/v4-example/V4DAppControl.sol +++ b/src/contracts/examples/v4-example/V4DAppControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Base Imports import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/gasCalculator/BaseGasCalculator.sol b/src/contracts/gasCalculator/BaseGasCalculator.sol index 97e404a66..ff9b73208 100644 --- a/src/contracts/gasCalculator/BaseGasCalculator.sol +++ b/src/contracts/gasCalculator/BaseGasCalculator.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { IL2GasCalculator } from "src/contracts/interfaces/IL2GasCalculator.sol"; diff --git a/src/contracts/helpers/DemoLendingProtocol.sol b/src/contracts/helpers/DemoLendingProtocol.sol index ebe66343b..3a6ba24f3 100644 --- a/src/contracts/helpers/DemoLendingProtocol.sol +++ b/src/contracts/helpers/DemoLendingProtocol.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeERC20, IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol"; import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; diff --git a/src/contracts/helpers/DemoToken.sol b/src/contracts/helpers/DemoToken.sol index c2e7a93d6..375783aa6 100644 --- a/src/contracts/helpers/DemoToken.sol +++ b/src/contracts/helpers/DemoToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { ERC20 } from "openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; diff --git a/src/contracts/helpers/DemoWETH.sol b/src/contracts/helpers/DemoWETH.sol index 3824bd5ea..2b9c0f15d 100644 --- a/src/contracts/helpers/DemoWETH.sol +++ b/src/contracts/helpers/DemoWETH.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { WETH } from "solady/tokens/WETH.sol"; import { Ownable } from "openzeppelin-contracts/contracts/access/Ownable.sol"; diff --git a/src/contracts/helpers/GovernanceBurner.sol b/src/contracts/helpers/GovernanceBurner.sol index fdad5a2f0..325784c09 100644 --- a/src/contracts/helpers/GovernanceBurner.sol +++ b/src/contracts/helpers/GovernanceBurner.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IDAppControl } from "../interfaces/IDAppControl.sol"; diff --git a/src/contracts/helpers/Simulator.sol b/src/contracts/helpers/Simulator.sol index 2385b8477..5ac2653d7 100644 --- a/src/contracts/helpers/Simulator.sol +++ b/src/contracts/helpers/Simulator.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; diff --git a/src/contracts/helpers/Sorter.sol b/src/contracts/helpers/Sorter.sol index b4a0fd924..43b0a9df2 100644 --- a/src/contracts/helpers/Sorter.sol +++ b/src/contracts/helpers/Sorter.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IAtlas } from "../interfaces/IAtlas.sol"; import { IDAppControl } from "../interfaces/IDAppControl.sol"; diff --git a/src/contracts/helpers/TxBuilder.sol b/src/contracts/helpers/TxBuilder.sol index dea57c90b..2d95b81fb 100644 --- a/src/contracts/helpers/TxBuilder.sol +++ b/src/contracts/helpers/TxBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IDAppControl } from "../interfaces/IDAppControl.sol"; import { IAtlas } from "../interfaces/IAtlas.sol"; diff --git a/src/contracts/helpers/Utilities.sol b/src/contracts/helpers/Utilities.sol index a04978ff7..01cb6adca 100644 --- a/src/contracts/helpers/Utilities.sol +++ b/src/contracts/helpers/Utilities.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Script.sol"; import "forge-std/Test.sol"; diff --git a/src/contracts/interfaces/IAtlas.sol b/src/contracts/interfaces/IAtlas.sol index b518a0016..d66ce2adb 100644 --- a/src/contracts/interfaces/IAtlas.sol +++ b/src/contracts/interfaces/IAtlas.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/SolverOperation.sol"; import "../types/UserOperation.sol"; diff --git a/src/contracts/interfaces/IAtlasVerification.sol b/src/contracts/interfaces/IAtlasVerification.sol index ed4f050f5..f8af0fa31 100644 --- a/src/contracts/interfaces/IAtlasVerification.sol +++ b/src/contracts/interfaces/IAtlasVerification.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/UserOperation.sol"; import "../types/ConfigTypes.sol"; diff --git a/src/contracts/interfaces/IDAppControl.sol b/src/contracts/interfaces/IDAppControl.sol index e3be1417f..20625d463 100644 --- a/src/contracts/interfaces/IDAppControl.sol +++ b/src/contracts/interfaces/IDAppControl.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/UserOperation.sol"; import "../types/SolverOperation.sol"; diff --git a/src/contracts/interfaces/IExecutionEnvironment.sol b/src/contracts/interfaces/IExecutionEnvironment.sol index 9dcdee96a..af0c7e040 100644 --- a/src/contracts/interfaces/IExecutionEnvironment.sol +++ b/src/contracts/interfaces/IExecutionEnvironment.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/SolverOperation.sol"; import "../types/UserOperation.sol"; diff --git a/src/contracts/interfaces/IL2GasCalculator.sol b/src/contracts/interfaces/IL2GasCalculator.sol index 387aab8e8..41fd7c364 100644 --- a/src/contracts/interfaces/IL2GasCalculator.sol +++ b/src/contracts/interfaces/IL2GasCalculator.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; interface IL2GasCalculator { /// @notice Calculate the cost of calldata in ETH on a L2 with a different fee structure than mainnet diff --git a/src/contracts/interfaces/ISimulator.sol b/src/contracts/interfaces/ISimulator.sol index f1d3bb8ce..ae2148744 100644 --- a/src/contracts/interfaces/ISimulator.sol +++ b/src/contracts/interfaces/ISimulator.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/SolverOperation.sol"; import "../types/UserOperation.sol"; diff --git a/src/contracts/interfaces/ISolverContract.sol b/src/contracts/interfaces/ISolverContract.sol index b055a0415..e0a87a968 100644 --- a/src/contracts/interfaces/ISolverContract.sol +++ b/src/contracts/interfaces/ISolverContract.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/SolverOperation.sol"; diff --git a/src/contracts/libraries/AccountingMath.sol b/src/contracts/libraries/AccountingMath.sol index 5706f1ddf..43a941c47 100644 --- a/src/contracts/libraries/AccountingMath.sol +++ b/src/contracts/libraries/AccountingMath.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; library AccountingMath { uint256 internal constant _MAX_BUNDLER_REFUND_RATE = 8_000_000; // out of 10_000_000 = 80% diff --git a/src/contracts/libraries/CallBits.sol b/src/contracts/libraries/CallBits.sol index f5c1d0a6e..53abaa446 100644 --- a/src/contracts/libraries/CallBits.sol +++ b/src/contracts/libraries/CallBits.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IDAppControl } from "../interfaces/IDAppControl.sol"; diff --git a/src/contracts/libraries/CallVerification.sol b/src/contracts/libraries/CallVerification.sol index ba4f4829e..4eab4c580 100644 --- a/src/contracts/libraries/CallVerification.sol +++ b/src/contracts/libraries/CallVerification.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/SolverOperation.sol"; import "../types/UserOperation.sol"; diff --git a/src/contracts/libraries/EscrowBits.sol b/src/contracts/libraries/EscrowBits.sol index d8c19356c..aa5eb28f6 100644 --- a/src/contracts/libraries/EscrowBits.sol +++ b/src/contracts/libraries/EscrowBits.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/EscrowTypes.sol"; diff --git a/src/contracts/libraries/SafeCall/SafeCall.sol b/src/contracts/libraries/SafeCall/SafeCall.sol index db83111d1..02ca156fc 100644 --- a/src/contracts/libraries/SafeCall/SafeCall.sol +++ b/src/contracts/libraries/SafeCall/SafeCall.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; /// @title SafeCall /// @author FastLane Labs diff --git a/src/contracts/libraries/SafetyBits.sol b/src/contracts/libraries/SafetyBits.sol index c9fe77717..e912807e9 100644 --- a/src/contracts/libraries/SafetyBits.sol +++ b/src/contracts/libraries/SafetyBits.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../types/LockTypes.sol"; diff --git a/src/contracts/solver/SolverBase.sol b/src/contracts/solver/SolverBase.sol index ca57036cd..ea9553bc1 100644 --- a/src/contracts/solver/SolverBase.sol +++ b/src/contracts/solver/SolverBase.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/solver/SolverBaseInvertBid.sol b/src/contracts/solver/SolverBaseInvertBid.sol index 328ffc169..8963df9f7 100644 --- a/src/contracts/solver/SolverBaseInvertBid.sol +++ b/src/contracts/solver/SolverBaseInvertBid.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/solver/src/TestSolver.sol b/src/contracts/solver/src/TestSolver.sol index 445ac3bea..5f5441a5a 100644 --- a/src/contracts/solver/src/TestSolver.sol +++ b/src/contracts/solver/src/TestSolver.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SolverBase } from "../../solver/SolverBase.sol"; diff --git a/src/contracts/solver/src/TestSolverExPost.sol b/src/contracts/solver/src/TestSolverExPost.sol index 0cdf88cc5..74dbbbe9e 100644 --- a/src/contracts/solver/src/TestSolverExPost.sol +++ b/src/contracts/solver/src/TestSolverExPost.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/src/contracts/types/AtlasConstants.sol b/src/contracts/types/AtlasConstants.sol index 25fa70fb7..b8cf43d07 100644 --- a/src/contracts/types/AtlasConstants.sol +++ b/src/contracts/types/AtlasConstants.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "./ValidCalls.sol"; @@ -18,6 +18,7 @@ contract AtlasConstants { // Atlas constants used in `_bidFindingIteration()` uint256 internal constant _BITS_FOR_INDEX = 16; + uint256 internal constant _FIRST_16_BITS_TRUE_MASK = uint256(0xFFFF); // Escrow constants uint256 internal constant _VALIDATION_GAS_LIMIT = 500_000; @@ -37,7 +38,7 @@ contract AtlasConstants { uint256 internal constant _SOLVER_FULFILLED_MASK = 1 << 162; // Used to set Lock phase without changing the activeEnvironment or callConfig. - bytes32 internal constant _LOCK_PHASE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00; + uint256 internal constant _LOCK_PHASE_MASK = uint256(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00); // ValidCalls error threshold before which the metacall reverts, and after which it returns gracefully to store // nonces as used. @@ -47,16 +48,5 @@ contract AtlasConstants { // ATLAS VERIFICATION CONSTANTS // // ------------------------------------------------------- // - uint256 internal constant _FULL_BITMAP = _FIRST_240_BITS_TRUE_MASK; - uint256 internal constant _NONCES_PER_BITMAP = 240; uint8 internal constant _MAX_SOLVERS = type(uint8).max - 1; - - // ------------------------------------------------------- // - // SHARED CONSTANTS // - // ------------------------------------------------------- // - - uint256 internal constant _FIRST_240_BITS_TRUE_MASK = - uint256(0x0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); - uint256 internal constant _FIRST_16_BITS_TRUE_MASK = uint256(0xFFFF); - uint256 internal constant _FIRST_4_BITS_TRUE_MASK = uint256(0xF); } diff --git a/src/contracts/types/AtlasErrors.sol b/src/contracts/types/AtlasErrors.sol index 582c14e89..606f7239f 100644 --- a/src/contracts/types/AtlasErrors.sol +++ b/src/contracts/types/AtlasErrors.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "./ValidCalls.sol"; diff --git a/src/contracts/types/AtlasEvents.sol b/src/contracts/types/AtlasEvents.sol index d53e93e9b..8bd9383d7 100644 --- a/src/contracts/types/AtlasEvents.sol +++ b/src/contracts/types/AtlasEvents.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; contract AtlasEvents { // Metacall diff --git a/src/contracts/types/ConfigTypes.sol b/src/contracts/types/ConfigTypes.sol index 39605bce9..f68e327b5 100644 --- a/src/contracts/types/ConfigTypes.sol +++ b/src/contracts/types/ConfigTypes.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; struct DAppConfig { address to; // Address of the DAppControl contract diff --git a/src/contracts/types/DAppOperation.sol b/src/contracts/types/DAppOperation.sol index 897563d16..82a3b1d1c 100644 --- a/src/contracts/types/DAppOperation.sol +++ b/src/contracts/types/DAppOperation.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; bytes32 constant DAPP_TYPEHASH = keccak256( "DAppOperation(address from,address to,uint256 nonce,uint256 deadline,address control,address bundler,bytes32 userOpHash,bytes32 callChainHash)" diff --git a/src/contracts/types/EscrowTypes.sol b/src/contracts/types/EscrowTypes.sol index 7568cb582..c5e8f393c 100644 --- a/src/contracts/types/EscrowTypes.sol +++ b/src/contracts/types/EscrowTypes.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // bonded = total - unbonding struct EscrowAccountBalance { diff --git a/src/contracts/types/LockTypes.sol b/src/contracts/types/LockTypes.sol index f5831ff6d..938b7199b 100644 --- a/src/contracts/types/LockTypes.sol +++ b/src/contracts/types/LockTypes.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; struct Context { bytes32 userOpHash; // not packed diff --git a/src/contracts/types/SolverOperation.sol b/src/contracts/types/SolverOperation.sol index ffd9392e6..d58c73952 100644 --- a/src/contracts/types/SolverOperation.sol +++ b/src/contracts/types/SolverOperation.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; bytes32 constant SOLVER_TYPEHASH = keccak256( "SolverOperation(address from,address to,uint256 value,uint256 gas,uint256 maxFeePerGas,uint256 deadline,address solver,address control,bytes32 userOpHash,address bidToken,uint256 bidAmount,bytes data)" diff --git a/src/contracts/types/UserOperation.sol b/src/contracts/types/UserOperation.sol index de80f5c20..3a6d06600 100644 --- a/src/contracts/types/UserOperation.sol +++ b/src/contracts/types/UserOperation.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; // Default UserOperation typehash bytes32 constant USER_TYPEHASH_DEFAULT = keccak256( diff --git a/src/contracts/types/ValidCalls.sol b/src/contracts/types/ValidCalls.sol index 43a996434..0831a98a2 100644 --- a/src/contracts/types/ValidCalls.sol +++ b/src/contracts/types/ValidCalls.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; /// @title ValidCallsResult /// @notice Enum for ValidCallsResult diff --git a/test/Accounting.t.sol b/test/Accounting.t.sol index 0ca3c5042..1006d6047 100644 --- a/test/Accounting.t.sol +++ b/test/Accounting.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/AccountingMath.t.sol b/test/AccountingMath.t.sol index 2db24f74a..1a380ca6c 100644 --- a/test/AccountingMath.t.sol +++ b/test/AccountingMath.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import "../src/contracts/libraries/AccountingMath.sol"; diff --git a/test/AtlETH.t.sol b/test/AtlETH.t.sol index 76bc505b8..9c8a8aee6 100644 --- a/test/AtlETH.t.sol +++ b/test/AtlETH.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/AtlasVerification.t.sol b/test/AtlasVerification.t.sol index c703cafc7..093098e1c 100644 --- a/test/AtlasVerification.t.sol +++ b/test/AtlasVerification.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/BidFinding.t.sol b/test/BidFinding.t.sol index c30d339e5..c31e30bc7 100644 --- a/test/BidFinding.t.sol +++ b/test/BidFinding.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import { LibSort } from "solady/utils/LibSort.sol"; diff --git a/test/DAppIntegration.t.sol b/test/DAppIntegration.t.sol index 38d93b4cf..e714d2c93 100644 --- a/test/DAppIntegration.t.sol +++ b/test/DAppIntegration.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/Escrow.t.sol b/test/Escrow.t.sol index f31c292d6..cbde8b2e1 100644 --- a/test/Escrow.t.sol +++ b/test/Escrow.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/ExPost.t.sol b/test/ExPost.t.sol index 1fce2d00b..78f5add99 100644 --- a/test/ExPost.t.sol +++ b/test/ExPost.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/ExecutionBase.t.sol b/test/ExecutionBase.t.sol index 9a9debdc7..b30d6d542 100644 --- a/test/ExecutionBase.t.sol +++ b/test/ExecutionBase.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/ExecutionEnvironment.t.sol b/test/ExecutionEnvironment.t.sol index aa94f361b..e7bac6f64 100644 --- a/test/ExecutionEnvironment.t.sol +++ b/test/ExecutionEnvironment.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import { BaseTest } from "./base/BaseTest.t.sol"; diff --git a/test/FLOnline.t.sol b/test/FLOnline.t.sol index 4f43cf480..c8f9ab6e9 100644 --- a/test/FLOnline.t.sol +++ b/test/FLOnline.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/test/Factory.t.sol b/test/Factory.t.sol index 0e770182f..7abe3a375 100644 --- a/test/Factory.t.sol +++ b/test/Factory.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/FlashLoan.t.sol b/test/FlashLoan.t.sol index a313d2abd..578741fd2 100644 --- a/test/FlashLoan.t.sol +++ b/test/FlashLoan.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/GasAccounting.t.sol b/test/GasAccounting.t.sol index 6c7cbcbc6..430471dcf 100644 --- a/test/GasAccounting.t.sol +++ b/test/GasAccounting.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; @@ -116,7 +116,7 @@ contract MockGasAccounting is TestAtlas, BaseTest { } function setSolverLock(address _solverFrom) external { - _setSolverLock(uint256(uint160(_solverFrom))); + t_solverLock = (uint256(uint160(_solverFrom))); } function _balanceOf(address account) external view returns (uint112, uint112) { @@ -315,7 +315,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { // Verify the balances after contribution assertEq(address(mockGasAccounting).balance, contributeValue); - assertEq(mockGasAccounting.getDeposits(), contributeValue); + assertEq(mockGasAccounting.deposits(), contributeValue); } function test_multipleContributes() public { @@ -334,7 +334,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { // Verify the balances after the first contribution assertEq(address(mockGasAccounting).balance, firstContributeValue); - assertEq(mockGasAccounting.getDeposits(), firstContributeValue); + assertEq(mockGasAccounting.deposits(), firstContributeValue); // Perform the second valid contribute call vm.prank(executionEnvironment); @@ -342,7 +342,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { // Verify the balances after the second contribution assertEq(address(mockGasAccounting).balance, totalContributeValue); - assertEq(mockGasAccounting.getDeposits(), totalContributeValue); + assertEq(mockGasAccounting.deposits(), totalContributeValue); } function test_contribute_withZeroValue() public { @@ -358,7 +358,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { // Verify the balances after the contribution is zero assertEq(address(mockGasAccounting).balance, contributeValue); - assertEq(mockGasAccounting.getDeposits(), contributeValue); + assertEq(mockGasAccounting.deposits(), contributeValue); } function test_borrow_preOpsPhase() public { @@ -373,7 +373,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { assertEq( solverOneEOA.balance, borrowedAmount, "Execution environment balance should be equal to borrowed amount" ); - assertEq(borrowedAmount, mockGasAccounting.getWithdrawals(), "Withdrawals should be equal to borrowed amount"); + assertEq(borrowedAmount, mockGasAccounting.withdrawals(), "Withdrawals should be equal to borrowed amount"); } function test_borrow_userOperationPhase() public { @@ -390,7 +390,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { borrowedAmount, "Execution environment balance should be equal to borrowed amount" ); - assertEq(borrowedAmount, mockGasAccounting.getWithdrawals(), "Withdrawals should be equal to borrowed amount"); + assertEq(borrowedAmount, mockGasAccounting.withdrawals(), "Withdrawals should be equal to borrowed amount"); } function test_borrow_preSolverPhase() public { @@ -407,7 +407,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { borrowedAmount, "Execution environment balance should be equal to borrowed amount" ); - assertEq(borrowedAmount, mockGasAccounting.getWithdrawals(), "Withdrawals should be equal to borrowed amount"); + assertEq(borrowedAmount, mockGasAccounting.withdrawals(), "Withdrawals should be equal to borrowed amount"); } function test_borrow_solverOperationPhase() public { @@ -423,12 +423,12 @@ contract GasAccountingTest is AtlasConstants, BaseTest { borrowedAmount, "Execution environment balance should be equal to borrowed amount" ); - assertEq(borrowedAmount, mockGasAccounting.getWithdrawals(), "Withdrawals should be equal to borrowed amount"); + assertEq(borrowedAmount, mockGasAccounting.withdrawals(), "Withdrawals should be equal to borrowed amount"); } function test_borrow_postSolverPhase_reverts() public { uint256 borrowedAmount = 1e18; - uint256 withdrawalsBefore = mockGasAccounting.getWithdrawals(); + uint256 withdrawalsBefore = mockGasAccounting.withdrawals(); fundContract(borrowedAmount); mockGasAccounting.setLock(executionEnvironment, 0, uint8(ExecutionPhase.PostSolver)); @@ -437,12 +437,12 @@ contract GasAccountingTest is AtlasConstants, BaseTest { mockGasAccounting.borrow(borrowedAmount); assertEq(executionEnvironment.balance, 0, "Execution environment balance should remain zero"); - assertEq(withdrawalsBefore, mockGasAccounting.getWithdrawals(), "Withdrawals should remain unchanged"); + assertEq(withdrawalsBefore, mockGasAccounting.withdrawals(), "Withdrawals should remain unchanged"); } function test_borrow_allocateValuePhase_reverts() public { uint256 borrowedAmount = 1e18; - uint256 withdrawalsBefore = mockGasAccounting.getWithdrawals(); + uint256 withdrawalsBefore = mockGasAccounting.withdrawals(); fundContract(borrowedAmount); mockGasAccounting.setLock(executionEnvironment, 0, uint8(ExecutionPhase.AllocateValue)); @@ -451,12 +451,12 @@ contract GasAccountingTest is AtlasConstants, BaseTest { mockGasAccounting.borrow(borrowedAmount); assertEq(executionEnvironment.balance, 0, "Execution environment balance should remain zero"); - assertEq(withdrawalsBefore, mockGasAccounting.getWithdrawals(), "Withdrawals should remain unchanged"); + assertEq(withdrawalsBefore, mockGasAccounting.withdrawals(), "Withdrawals should remain unchanged"); } function test_borrow_postOpsPhase_reverts() public { uint256 borrowedAmount = 1e18; - uint256 withdrawalsBefore = mockGasAccounting.getWithdrawals(); + uint256 withdrawalsBefore = mockGasAccounting.withdrawals(); fundContract(borrowedAmount); mockGasAccounting.setLock(executionEnvironment, 0, uint8(ExecutionPhase.PostOps)); @@ -465,7 +465,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { mockGasAccounting.borrow(borrowedAmount); assertEq(executionEnvironment.balance, 0, "Execution environment balance should remain zero"); - assertEq(withdrawalsBefore, mockGasAccounting.getWithdrawals(), "Withdrawals should remain unchanged"); + assertEq(withdrawalsBefore, mockGasAccounting.withdrawals(), "Withdrawals should remain unchanged"); } function test_multipleBorrows() public { @@ -529,7 +529,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { "Final contract balance should be initial balance minus total borrowed amount" ); assertEq( - totalBorrowAmount, mockGasAccounting.getWithdrawals(), "Withdrawals should equal total borrowed amount" + totalBorrowAmount, mockGasAccounting.withdrawals(), "Withdrawals should equal total borrowed amount" ); } @@ -661,7 +661,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { vm.prank(executionEnvironment); mockGasAccounting.contribute{ value: 10 ether }(); - assertEq(mockGasAccounting.getClaims(), 10 ether, "Claims should be set to 10 ether"); + assertEq(mockGasAccounting.claims(), 10 ether, "Claims should be set to 10 ether"); assertEq(address(mockGasAccounting).balance, 10 ether, "mockGasAccounting should have 10 ether"); } @@ -735,7 +735,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { assertEq(currentSolver, solverOneEOA, "Current solver should match execution environment"); // Verify that deposits did not increase - assertEq(mockGasAccounting.getDeposits(), initialClaims, "Deposits should remain unchanged"); + assertEq(mockGasAccounting.deposits(), initialClaims, "Deposits should remain unchanged"); } function test_reconcileWithETH() public { @@ -762,7 +762,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { assertEq(currentSolver, solverOneEOA, "Current solver should match execution environment"); // Verify that deposits increased by the reconciled amount - assertEq(mockGasAccounting.getDeposits(), initialClaims, "Deposits should match the amount sent as msg.value"); + assertEq(mockGasAccounting.deposits(), initialClaims, "Deposits should match the amount sent as msg.value"); } function test_assign_zeroAmount() public { @@ -784,7 +784,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { // Get initial values uint256 bondedTotalSupplyBefore = mockGasAccounting.bondedTotalSupply(); - uint256 depositsBefore = mockGasAccounting.getDeposits(); + uint256 depositsBefore = mockGasAccounting.deposits(); uint256 deficit = mockGasAccounting.assign(solverOp.from, assignedAmount, assignedAmount, true); assertEq(deficit, 0, "Deficit should be 0"); @@ -793,7 +793,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { assertEq(lastAccessedBlock, uint32(block.number)); uint256 bondedTotalSupplyAfter = mockGasAccounting.bondedTotalSupply(); - uint256 depositsAfter = mockGasAccounting.getDeposits(); + uint256 depositsAfter = mockGasAccounting.deposits(); assertEq(bondedTotalSupplyAfter, bondedTotalSupplyBefore - assignedAmount); assertEq(depositsAfter, depositsBefore + assignedAmount); @@ -809,7 +809,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { mockGasAccounting.increaseBondedBalance(solverOp.from, bondedAmount); // Set bonded balance to 500 uint256 bondedTotalSupplyBefore = mockGasAccounting.bondedTotalSupply(); - uint256 depositsBefore = mockGasAccounting.getDeposits(); + uint256 depositsBefore = mockGasAccounting.deposits(); // Call the assign function and capture the deficit uint256 deficit = mockGasAccounting.assign(solverOp.from, assignedAmount, assignedAmount, true); @@ -825,7 +825,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { bondedTotalSupplyBefore - assignedAmount, "Bonded total supply mismatch" ); - assertEq(mockGasAccounting.getDeposits(), depositsBefore + assignedAmount, "Deposits mismatch"); + assertEq(mockGasAccounting.deposits(), depositsBefore + assignedAmount, "Deposits mismatch"); // Retrieve and check the updated balances (uint112 bonded, uint112 unbonding) = mockGasAccounting._balanceOf(solverOp.from); @@ -843,13 +843,13 @@ contract GasAccountingTest is AtlasConstants, BaseTest { mockGasAccounting.increaseBondedBalance(solverOp.from, bondedAmount); uint256 bondedTotalSupplyBefore = mockGasAccounting.bondedTotalSupply(); - uint256 depositsBefore = mockGasAccounting.getDeposits(); + uint256 depositsBefore = mockGasAccounting.deposits(); uint256 deficit = mockGasAccounting.assign(solverOp.from, assignedAmount, assignedAmount, true); assertEq(deficit, assignedAmount - (unbondingAmount + bondedAmount)); (, uint32 lastAccessedBlock,,,) = mockGasAccounting.accessData(solverOp.from); assertEq(lastAccessedBlock, uint32(block.number)); assertEq(mockGasAccounting.bondedTotalSupply(), bondedTotalSupplyBefore - (unbondingAmount + bondedAmount)); - assertEq(mockGasAccounting.getDeposits(), depositsBefore + (unbondingAmount + bondedAmount)); + assertEq(mockGasAccounting.deposits(), depositsBefore + (unbondingAmount + bondedAmount)); (uint112 bonded, uint112 unbonding) = mockGasAccounting._balanceOf(solverOp.from); assertEq(unbonding, 0); assertEq(bonded, 0); @@ -912,14 +912,14 @@ contract GasAccountingTest is AtlasConstants, BaseTest { mockGasAccounting.increaseBondedBalance(solverOp.from, bondedAmount); uint256 bondedTotalSupplyBefore = mockGasAccounting.bondedTotalSupply(); - uint256 depositsBefore = mockGasAccounting.getDeposits(); + uint256 depositsBefore = mockGasAccounting.deposits(); (uint112 unbondingBefore,) = mockGasAccounting._balanceOf(solverOp.from); vm.expectRevert(AtlasErrors.ValueTooLarge.selector); mockGasAccounting.assign(solverOp.from, assignedAmount, assignedAmount, true); // Check assign reverted with overflow, and accounting values did not change assertEq(mockGasAccounting.bondedTotalSupply(), bondedTotalSupplyBefore); - assertEq(mockGasAccounting.getDeposits(), depositsBefore); + assertEq(mockGasAccounting.deposits(), depositsBefore); (uint112 unbonding,) = mockGasAccounting._balanceOf(solverOp.from); assertEq(unbonding, unbondingBefore); } @@ -929,7 +929,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { uint256 lastAccessedBlock; uint256 bondedTotalSupplyBefore = mockGasAccounting.bondedTotalSupply(); - uint256 withdrawalsBefore = mockGasAccounting.getWithdrawals(); + uint256 withdrawalsBefore = mockGasAccounting.withdrawals(); (uint112 bondedBefore,,,,) = mockGasAccounting.accessData(solverOp.from); (, lastAccessedBlock,,,) = mockGasAccounting.accessData(solverOp.from); assertEq(lastAccessedBlock, 0); @@ -942,7 +942,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { assertEq(lastAccessedBlock, uint32(block.number)); assertEq(mockGasAccounting.bondedTotalSupply(), bondedTotalSupplyBefore + creditedAmount); assertEq(bondedAfter, bondedBefore + uint112(creditedAmount)); - assertEq(mockGasAccounting.getWithdrawals(), withdrawalsBefore + creditedAmount); + assertEq(mockGasAccounting.withdrawals(), withdrawalsBefore + creditedAmount); // Testing uint112 boundary values for casting from uint256 to uint112 in _credit() uint256 overflowAmount = uint256(type(uint112).max) + 1; @@ -954,7 +954,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { // Setup solverOp.data = ""; uint256 gasWaterMark = gasleft() + 5000; - uint256 initialWriteoffs = mockGasAccounting.getWriteoffs(); + uint256 initialWriteoffs = mockGasAccounting.writeoffs(); // Simulate solver not responsible for failure uint256 result = EscrowBits._NO_REFUND; @@ -971,7 +971,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { uint256 expectedWriteoffs = initialWriteoffs + AccountingMath.withSurcharges(gasUsed, DEFAULT_ATLAS_SURCHARGE_RATE, DEFAULT_BUNDLER_SURCHARGE_RATE); // Verify writeoffs have increased assertApproxEqRel( - mockGasAccounting.getWriteoffs(), + mockGasAccounting.writeoffs(), expectedWriteoffs, 1e15, // 0.1% margin for error "Writeoffs should be approximately equal to expected value" @@ -1040,7 +1040,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { (uint256 claimsPaidToBundler, uint256 netGasSurcharge) = mockGasAccounting.settle(ctx); // Check final balances and perform assertions - uint256 finalClaims = mockGasAccounting.getClaims(); + uint256 finalClaims = mockGasAccounting.claims(); uint256 finalBonded = mockGasAccounting.balanceOfBonded(solverOneEOA); uint256 finalUnbonding = mockGasAccounting.balanceOfUnbonding(solverOneEOA); { @@ -1086,7 +1086,7 @@ contract GasAccountingTest is AtlasConstants, BaseTest { assertTrue(claimsPaidToBundler > 0, "Claims paid to bundler should be non-zero"); assertTrue(netGasSurcharge > 0, "Net gas surcharge should be non-zero"); assertLe( - mockGasAccounting.getClaims(), + mockGasAccounting.claims(), 3 ether, "Final claims should be less than or equal to initial claims plus deposits" ); diff --git a/test/MainTest.t.sol b/test/MainTest.t.sol index 6883c3a85..788b8ab9b 100644 --- a/test/MainTest.t.sol +++ b/test/MainTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { SafeTransferLib } from "solady/utils/SafeTransferLib.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/test/Mimic.t.sol b/test/Mimic.t.sol index f1a2445c9..c676dc6a7 100644 --- a/test/Mimic.t.sol +++ b/test/Mimic.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import { Mimic } from "../src/contracts/common/Mimic.sol"; diff --git a/test/NonceManager.t.sol b/test/NonceManager.t.sol index 083648fd6..76b60b175 100644 --- a/test/NonceManager.t.sol +++ b/test/NonceManager.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/OEV.t.sol b/test/OEV.t.sol index 0ad596d7d..267d966e4 100644 --- a/test/OEV.t.sol +++ b/test/OEV.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/OEValt.t.sol b/test/OEValt.t.sol index fc8ffa4a2..a836e5c1d 100644 --- a/test/OEValt.t.sol +++ b/test/OEValt.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/Permit69.t.sol b/test/Permit69.t.sol index 34525c60e..e88227443 100644 --- a/test/Permit69.t.sol +++ b/test/Permit69.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/SafetyLocks.t.sol b/test/SafetyLocks.t.sol index 80df01533..c4d1bd4fc 100644 --- a/test/SafetyLocks.t.sol +++ b/test/SafetyLocks.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; @@ -56,58 +56,58 @@ contract MockSafetyLocks is SafetyLocks { _setLockPhase(newPhase); } - function setClaims(uint256 _claims) external { - _setClaims(_claims); + function setSolverLock(uint256 newSolverLock) public { + t_solverLock = newSolverLock; } - function setWithdrawals(uint256 _withdrawals) external { - _setWithdrawals(_withdrawals); + function setSolverTo(address newSolverTo) public { + t_solverTo = newSolverTo; } - function setDeposits(uint256 _deposits) external { - _setDeposits(_deposits); + function setClaims(uint256 newClaims) public { + t_claims = newClaims; } - function setFees(uint256 _fees) external { - _setFees(_fees); + function setFees(uint256 newFees) public { + t_fees = newFees; } - function setWriteoffs(uint256 _writeoffs) external { - _setWriteoffs(_writeoffs); + function setWriteoffs(uint256 newWriteoffs) public { + t_writeoffs = newWriteoffs; } - function setSolverLock(uint256 newSolverLock) external { - _setSolverLock(newSolverLock); + function setWithdrawals(uint256 newWithdrawals) public { + t_withdrawals = newWithdrawals; } - function setSolverTo(address newSolverTo) external { - _setSolverTo(newSolverTo); + function setDeposits(uint256 newDeposits) public { + t_deposits = newDeposits; } - function solverTo() external view returns (address) { - return _solverTo(); - } + // Transient Var View Functions - // View functions + function claims() external view returns (uint256) { + return t_claims; + } - function getClaims() external view returns (uint256) { - return claims(); + function fees() external view returns (uint256) { + return t_fees; } - function getFees() external view returns (uint256) { - return fees(); + function writeoffs() external view returns (uint256) { + return t_writeoffs; } - function getWriteoffs() external view returns (uint256) { - return writeoffs(); + function withdrawals() external view returns (uint256) { + return t_withdrawals; } - function getWithdrawals() external view returns (uint256) { - return withdrawals(); + function deposits() external view returns (uint256) { + return t_deposits; } - function getDeposits() external view returns (uint256) { - return deposits(); + function solverTo() external view returns (address) { + return t_solverTo; } } @@ -158,7 +158,7 @@ contract SafetyLocksTest is Test { safetyLocks.setClaims(newClaims); - uint256 claims = safetyLocks.getClaims(); + uint256 claims = safetyLocks.claims(); assertEq(claims, newClaims); } @@ -167,7 +167,7 @@ contract SafetyLocksTest is Test { safetyLocks.setWithdrawals(newWithdrawals); - uint256 withdrawals = safetyLocks.getWithdrawals(); + uint256 withdrawals = safetyLocks.withdrawals(); assertEq(withdrawals, newWithdrawals); } @@ -176,7 +176,7 @@ contract SafetyLocksTest is Test { safetyLocks.setDeposits(newDeposits); - uint256 deposits = safetyLocks.getDeposits(); + uint256 deposits = safetyLocks.deposits(); assertEq(deposits, newDeposits); } @@ -185,7 +185,7 @@ contract SafetyLocksTest is Test { safetyLocks.setFees(newFees); - uint256 fees = safetyLocks.getFees(); + uint256 fees = safetyLocks.fees(); assertEq(fees, newFees); } @@ -194,7 +194,7 @@ contract SafetyLocksTest is Test { safetyLocks.setWriteoffs(newWriteoffs); - uint256 writeoffs = safetyLocks.getWriteoffs(); + uint256 writeoffs = safetyLocks.writeoffs(); assertEq(writeoffs, newWriteoffs); } @@ -245,11 +245,11 @@ contract SafetyLocksTest is Test { safetyLocks.setSolverLock(0x456); (address activeEnv, uint32 callConfig, uint8 phase) = safetyLocks.lock(); - uint256 claims = safetyLocks.getClaims(); - uint256 withdrawals = safetyLocks.getWithdrawals(); - uint256 deposits = safetyLocks.getDeposits(); - uint256 fees = safetyLocks.getFees(); - uint256 writeoffs = safetyLocks.getWriteoffs(); + uint256 claims = safetyLocks.claims(); + uint256 withdrawals = safetyLocks.withdrawals(); + uint256 deposits = safetyLocks.deposits(); + uint256 fees = safetyLocks.fees(); + uint256 writeoffs = safetyLocks.writeoffs(); (address solverTo,,) = safetyLocks.solverLockData(); assertEq(safetyLocks.isUnlocked(), false); diff --git a/test/Simulator.t.sol b/test/Simulator.t.sol index 61cae787e..1a842a92c 100644 --- a/test/Simulator.t.sol +++ b/test/Simulator.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/Sorter.t.sol b/test/Sorter.t.sol index 7f2224504..d24d52dd0 100644 --- a/test/Sorter.t.sol +++ b/test/Sorter.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { BaseTest } from "./base/BaseTest.t.sol"; diff --git a/test/Storage.t.sol b/test/Storage.t.sol index 242c04dc2..7852ae2a4 100644 --- a/test/Storage.t.sol +++ b/test/Storage.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; @@ -228,53 +228,53 @@ contract StorageTest is BaseTest { } function test_storage_transient_claims() public { - assertEq(atlas.getClaims(), 0, "claims should start at 0"); + assertEq(atlas.claims(), 0, "claims should start at 0"); atlas.setClaims(100); - assertEq(atlas.getClaims(), 100, "claims should be 100"); + assertEq(atlas.claims(), 100, "claims should be 100"); atlas.clearTransientStorage(); - assertEq(atlas.getClaims(), 0, "claims should be 0 again"); + assertEq(atlas.claims(), 0, "claims should be 0 again"); } function test_storage_transient_fees() public { - assertEq(atlas.getFees(), 0, "fees should start at 0"); + assertEq(atlas.fees(), 0, "fees should start at 0"); atlas.setFees(100); - assertEq(atlas.getFees(), 100, "fees should be 100"); + assertEq(atlas.fees(), 100, "fees should be 100"); atlas.clearTransientStorage(); - assertEq(atlas.getFees(), 0, "fees should be 0 again"); + assertEq(atlas.fees(), 0, "fees should be 0 again"); } function test_storage_transient_writeoffs() public { - assertEq(atlas.getWriteoffs(), 0, "writeoffs should start at 0"); + assertEq(atlas.writeoffs(), 0, "writeoffs should start at 0"); atlas.setWriteoffs(100); - assertEq(atlas.getWriteoffs(), 100, "writeoffs should be 100"); + assertEq(atlas.writeoffs(), 100, "writeoffs should be 100"); atlas.clearTransientStorage(); - assertEq(atlas.getWriteoffs(), 0, "writeoffs should be 0 again"); + assertEq(atlas.writeoffs(), 0, "writeoffs should be 0 again"); } function test_storage_transient_withdrawals() public { - assertEq(atlas.getWithdrawals(), 0, "withdrawals should start at 0"); + assertEq(atlas.withdrawals(), 0, "withdrawals should start at 0"); atlas.setWithdrawals(100); - assertEq(atlas.getWithdrawals(), 100, "withdrawals should be 100"); + assertEq(atlas.withdrawals(), 100, "withdrawals should be 100"); atlas.clearTransientStorage(); - assertEq(atlas.getWithdrawals(), 0, "withdrawals should be 0 again"); + assertEq(atlas.withdrawals(), 0, "withdrawals should be 0 again"); } function test_storage_transient_deposits() public { - assertEq(atlas.getDeposits(), 0, "deposits should start at 0"); + assertEq(atlas.deposits(), 0, "deposits should start at 0"); atlas.setDeposits(100); - assertEq(atlas.getDeposits(), 100, "deposits should be 100"); + assertEq(atlas.deposits(), 100, "deposits should be 100"); atlas.clearTransientStorage(); - assertEq(atlas.getDeposits(), 0, "deposits should be 0 again"); + assertEq(atlas.deposits(), 0, "deposits should be 0 again"); } function test_storage_transient_solverTo() public { @@ -391,11 +391,11 @@ contract MockStorage is Storage { // For internal view functions without external versions function solverTo() public view returns (address) { - return _solverTo(); + return t_solverTo; } function setSolverTo(address newSolverTo) public { - _setSolverTo(newSolverTo); + t_solverTo = newSolverTo; } function activeEnvironment() public view returns (address) { @@ -418,34 +418,13 @@ contract MockStorage is Storage { // To clear all transient storage vars function clearTransientStorage() public { _setLock(address(0), 0, 0); - _setSolverLock(0); - _setSolverTo(address(0)); - _setClaims(0); - _setFees(0); - _setWriteoffs(0); - _setWithdrawals(0); - _setDeposits(0); - } - - // View functions - - function getClaims() external view returns (uint256) { - return claims(); - } - - function getFees() external view returns (uint256) { - return fees(); - } - - function getWriteoffs() external view returns (uint256) { - return writeoffs(); - } - - function getWithdrawals() external view returns (uint256) { - return withdrawals(); - } - - function getDeposits() external view returns (uint256) { - return deposits(); + t_solverLock = 0; + t_solverTo = address(0); + t_claims = 0; + t_fees = 0; + t_writeoffs = 0; + t_withdrawals = 0; + t_deposits = 0; + t_solverSurcharge = 0; } } diff --git a/test/Surcharge.t.sol b/test/Surcharge.t.sol index 53ea362fe..7ee7b2749 100644 --- a/test/Surcharge.t.sol +++ b/test/Surcharge.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import { BaseTest } from "./base/BaseTest.t.sol"; diff --git a/test/SwapIntent.t.sol b/test/SwapIntent.t.sol index 37f16b513..5ae6b8ce2 100644 --- a/test/SwapIntent.t.sol +++ b/test/SwapIntent.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/SwapIntentInvertBid.t.sol b/test/SwapIntentInvertBid.t.sol index 5ab8aadf2..4af3f86fd 100644 --- a/test/SwapIntentInvertBid.t.sol +++ b/test/SwapIntentInvertBid.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; import { IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; diff --git a/test/TrebleSwap.t.sol b/test/TrebleSwap.t.sol index 79eac047f..e118e588b 100644 --- a/test/TrebleSwap.t.sol +++ b/test/TrebleSwap.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/V2Helper.sol b/test/V2Helper.sol index 18088422a..ed14f6c75 100644 --- a/test/V2Helper.sol +++ b/test/V2Helper.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { TxBuilder } from "../src/contracts/helpers/TxBuilder.sol"; diff --git a/test/V2RewardDAppControl.t.sol b/test/V2RewardDAppControl.t.sol index 4a6776273..d20e697ef 100644 --- a/test/V2RewardDAppControl.t.sol +++ b/test/V2RewardDAppControl.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/base/ArbitrageTest.t.sol b/test/base/ArbitrageTest.t.sol index eda8080e9..2d7234a8b 100644 --- a/test/base/ArbitrageTest.t.sol +++ b/test/base/ArbitrageTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/base/BaseTest.t.sol b/test/base/BaseTest.t.sol index f001698c1..77e4af407 100644 --- a/test/base/BaseTest.t.sol +++ b/test/base/BaseTest.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/base/DummyDAppControl.sol b/test/base/DummyDAppControl.sol index 99def7930..8d5dbc439 100644 --- a/test/base/DummyDAppControl.sol +++ b/test/base/DummyDAppControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { DAppControl } from "../../src/contracts/dapp/DAppControl.sol"; diff --git a/test/base/GasSponsorDAppControl.sol b/test/base/GasSponsorDAppControl.sol index c9de344cd..d6d676fbb 100644 --- a/test/base/GasSponsorDAppControl.sol +++ b/test/base/GasSponsorDAppControl.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { DAppControl } from "../../src/contracts/dapp/DAppControl.sol"; import { IAtlas } from "../../src/contracts/interfaces/IAtlas.sol"; diff --git a/test/base/TestAtlas.sol b/test/base/TestAtlas.sol index 6d2513eeb..80914b30a 100644 --- a/test/base/TestAtlas.sol +++ b/test/base/TestAtlas.sol @@ -1,5 +1,5 @@ //SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "../../src/contracts/atlas/Atlas.sol"; @@ -33,13 +33,14 @@ contract TestAtlas is Atlas { function clearTransientStorage() public { _setLock(address(0), 0, 0); - _setSolverLock(0); - _setSolverTo(address(0)); - _setClaims(0); - _setFees(0); - _setWriteoffs(0); - _setWithdrawals(0); - _setDeposits(0); + t_solverLock = 0; + t_solverTo = address(0); + t_claims = 0; + t_fees = 0; + t_writeoffs = 0; + t_withdrawals = 0; + t_deposits = 0; + t_solverSurcharge = 0; } function setLock(address activeEnvironment, uint32 callConfig, uint8 phase) public { @@ -51,52 +52,52 @@ contract TestAtlas is Atlas { } function setSolverLock(uint256 newSolverLock) public { - _setSolverLock(newSolverLock); + t_solverLock = newSolverLock; } function setSolverTo(address newSolverTo) public { - _setSolverTo(newSolverTo); + t_solverTo = newSolverTo; } function setClaims(uint256 newClaims) public { - _setClaims(newClaims); + t_claims = newClaims; } function setFees(uint256 newFees) public { - _setFees(newFees); + t_fees = newFees; } function setWriteoffs(uint256 newWriteoffs) public { - _setWriteoffs(newWriteoffs); + t_writeoffs = newWriteoffs; } function setWithdrawals(uint256 newWithdrawals) public { - _setWithdrawals(newWithdrawals); + t_withdrawals = newWithdrawals; } function setDeposits(uint256 newDeposits) public { - _setDeposits(newDeposits); + t_deposits = newDeposits; } - // View functions + // Transient Var View Functions - function getClaims() external view returns (uint256) { - return claims(); + function claims() external view returns (uint256) { + return t_claims; } - function getFees() external view returns (uint256) { - return fees(); + function fees() external view returns (uint256) { + return t_fees; } - function getWriteoffs() external view returns (uint256) { - return writeoffs(); + function writeoffs() external view returns (uint256) { + return t_writeoffs; } - function getWithdrawals() external view returns (uint256) { - return withdrawals(); + function withdrawals() external view returns (uint256) { + return t_withdrawals; } - function getDeposits() external view returns (uint256) { - return deposits(); + function deposits() external view returns (uint256) { + return t_deposits; } } diff --git a/test/base/TestUtils.sol b/test/base/TestUtils.sol index 4b6cae7ca..a3e942694 100644 --- a/test/base/TestUtils.sol +++ b/test/base/TestUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { IDAppControl } from "../../src/contracts/interfaces/IDAppControl.sol"; import { Mimic } from "../../src/contracts/common/Mimic.sol"; diff --git a/test/base/builders/DAppOperationBuilder.sol b/test/base/builders/DAppOperationBuilder.sol index 76cb6c8f4..4d45d6f94 100644 --- a/test/base/builders/DAppOperationBuilder.sol +++ b/test/base/builders/DAppOperationBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/base/builders/SolverOperationBuilder.sol b/test/base/builders/SolverOperationBuilder.sol index 9b3e9e53d..4130bb452 100644 --- a/test/base/builders/SolverOperationBuilder.sol +++ b/test/base/builders/SolverOperationBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/base/builders/UserOperationBuilder.sol b/test/base/builders/UserOperationBuilder.sol index 126892e08..791642190 100644 --- a/test/base/builders/UserOperationBuilder.sol +++ b/test/base/builders/UserOperationBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/base/interfaces/IUniswapV2Router.sol b/test/base/interfaces/IUniswapV2Router.sol index aa198cf3c..3d45d23c2 100644 --- a/test/base/interfaces/IUniswapV2Router.sol +++ b/test/base/interfaces/IUniswapV2Router.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; interface IUniswapV2Router01 { function factory() external pure returns (address); diff --git a/test/helpers/CallConfigBuilder.sol b/test/helpers/CallConfigBuilder.sol index 82800d46c..97dbc2a94 100644 --- a/test/helpers/CallConfigBuilder.sol +++ b/test/helpers/CallConfigBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { CallConfig } from "../../src/contracts/types/ConfigTypes.sol"; diff --git a/test/helpers/DummyDAppControlBuilder.sol b/test/helpers/DummyDAppControlBuilder.sol index 5ef97d908..b86cf0037 100644 --- a/test/helpers/DummyDAppControlBuilder.sol +++ b/test/helpers/DummyDAppControlBuilder.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import { DummyDAppControl } from "../base/DummyDAppControl.sol"; import { CallConfig } from "../../src/contracts/types/ConfigTypes.sol"; diff --git a/test/libraries/CallBits.t.sol b/test/libraries/CallBits.t.sol index 0c5d6f5fd..7d217a22e 100644 --- a/test/libraries/CallBits.t.sol +++ b/test/libraries/CallBits.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/libraries/CallVerification.t.sol b/test/libraries/CallVerification.t.sol index a5c7aa404..1861ee266 100644 --- a/test/libraries/CallVerification.t.sol +++ b/test/libraries/CallVerification.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/libraries/EscrowBits.t.sol b/test/libraries/EscrowBits.t.sol index ff5f829e1..254cef218 100644 --- a/test/libraries/EscrowBits.t.sol +++ b/test/libraries/EscrowBits.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol"; diff --git a/test/libraries/SafetyBits.t.sol b/test/libraries/SafetyBits.t.sol index d9f4c06f7..1ec221353 100644 --- a/test/libraries/SafetyBits.t.sol +++ b/test/libraries/SafetyBits.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.25; +pragma solidity 0.8.28; import "forge-std/Test.sol";