Skip to content

Commit

Permalink
Merge pull request #61 from lidofinance/feature/project-org
Browse files Browse the repository at this point in the history
Solidity bump and OZ submodule
  • Loading branch information
Psirex authored Jul 17, 2024
2 parents 1e6814f + 1fe57db commit c222802
Show file tree
Hide file tree
Showing 69 changed files with 70 additions and 68 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "lib/kontrol-cheatcodes"]
path = lib/kontrol-cheatcodes
url = https://github.com/runtimeverification/kontrol-cheatcodes
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
2 changes: 1 addition & 1 deletion contracts/Configuration.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Durations, Duration} from "./types/Duration.sol";
import {IConfiguration, DualGovernanceConfig} from "./interfaces/IConfiguration.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/ConfigurationProvider.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {IConfiguration} from "./interfaces/IConfiguration.sol";

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

import {Duration} from "./types/Duration.sol";
import {Timestamp} from "./types/Timestamp.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/EmergencyProtectedTimelock.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Duration} from "./types/Duration.sol";
import {Timestamp} from "./types/Timestamp.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/Escrow.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

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

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/ResealManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {ISealable} from "./interfaces/ISealable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/SingleGovernance.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {IGovernance, ITimelock} from "./interfaces/ITimelock.sol";

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

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {HashConsensus} from "./HashConsensus.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/committees/EmergencyExecutionCommittee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {HashConsensus} from "./HashConsensus.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/committees/HashConsensus.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/committees/ProposalsList.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {EnumerableProposals, Proposal} from "../libraries/EnumerableProposals.sol";

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

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {HashConsensus} from "./HashConsensus.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/committees/TiebreakerCore.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {HashConsensus} from "./HashConsensus.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/committees/TiebreakerSubCommittee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {HashConsensus} from "./HashConsensus.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IConfiguration.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Duration} from "../types/Duration.sol";

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

import {Duration} from "../types/Duration.sol";

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

struct ExecutorCall {
address target;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IGateSeal.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

interface IGateSeal {
function seal(address[] calldata sealables) external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IOwnable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

interface IOwnable {
function transferOwnership(address newOwner) external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IResealManager.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

interface IResealManager {
function resume(address sealable) external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/ISealable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

interface ISealable {
function resume() external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IStETH.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

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

import {Timestamp} from "../types/Timestamp.sol";
import {ExecutorCall} from "./IExecutor.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IWithdrawalQueue.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

struct WithdrawalRequestStatus {
uint256 amountOfStETH;
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IWstETH.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

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

import {ETHValue, ETHValues} from "../types/ETHValue.sol";
import {SharesValue, SharesValues} from "../types/SharesValue.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/DualGovernanceState.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol";

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

import {Duration, Durations} from "../types/Duration.sol";
import {Timestamp, Timestamps} from "../types/Timestamp.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/EnumerableProposals.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

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

import {Duration} from "../types/Duration.sol";
import {Timestamp, Timestamps} from "../types/Timestamp.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/Proposers.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

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

import {ISealable} from "../interfaces/ISealable.sol";

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

interface IResealManger {
function resume(address sealable) external;
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/WithdrawalBatchesQueue.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/Duration.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {Timestamp, Timestamps} from "./Timestamp.sol";

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

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

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

type IndexOneBased is uint32;

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

uint256 constant BATCH_SIZE_LENGTH = 16;
uint256 constant BATCH_SIZE_MASK = 2 ** BATCH_SIZE_LENGTH - 1;
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/SharesValue.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {ETHValue, ETHValues} from "./ETHValue.sol";

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

type Timestamp is uint40;

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

library ArrayUtils {
function sum(uint256[] calldata values) internal pure returns (uint256 res) {
Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
solc-version = "0.8.23"
solc-version = "0.8.26"
no-match-path = 'test/kontrol/*'

[profile.kprove]
Expand Down
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at dbb610
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,5 @@
"solhint": "^4.1.1",
"solhint-plugin-lido": "^0.0.4",
"solidity-coverage": "^0.8.4"
},
"dependencies": {
"@openzeppelin/contracts": "5.0.1"
}
}
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@openzeppelin/=lib/openzeppelin-contracts/
2 changes: 1 addition & 1 deletion test/kontrol/VetoSignalling.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import "forge-std/Vm.sol";
import "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/GateSealMock.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {ISealable} from "contracts/interfaces/ISealable.sol";
import {IGateSeal} from "contracts/interfaces/IGateSeal.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/scenario/agent-timelock.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {ExecutorCall, ScenarioTestBlueprint, ExecutorCall} from "../utils/scenario-test-blueprint.sol";

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

import {WithdrawalRequestStatus} from "../utils/interfaces.sol";
import {Duration as DurationType} from "contracts/types/Duration.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/scenario/gov-state-transitions.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {ScenarioTestBlueprint, percents, Durations} from "../utils/scenario-test-blueprint.sol";

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

import {
EmergencyState,
Expand Down
2 changes: 1 addition & 1 deletion test/scenario/happy-path.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

import {
Utils,
Expand Down
2 changes: 1 addition & 1 deletion test/scenario/last-moment-malicious-proposal.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

import {
ScenarioTestBlueprint, percents, ExecutorCall, ExecutorCallHelpers
Expand Down
2 changes: 1 addition & 1 deletion test/scenario/veto-cooldown-mechanics.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
pragma solidity 0.8.26;

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

import {Vm} from "forge-std/Test.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
Expand Down
Loading

0 comments on commit c222802

Please sign in to comment.