Skip to content

Commit

Permalink
chore: make POCBase usable with ^0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
1kresh committed Nov 11, 2024
1 parent ae741fa commit 4875a2e
Show file tree
Hide file tree
Showing 16 changed files with 184 additions and 131 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/common/Registry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;
pragma solidity ^0.8.25;

import {IRegistry} from "../../interfaces/common/IRegistry.sol";

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/common/StaticDelegateCallable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;
pragma solidity ^0.8.25;

import {IStaticDelegateCallable} from "../../interfaces/common/IStaticDelegateCallable.sol";

Expand Down
4 changes: 3 additions & 1 deletion test/POC.t.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {POCBaseTest} from "./POCBase.t.sol";

Expand All @@ -12,6 +12,8 @@ contract POCTest is POCBaseTest {
using Subnetwork for bytes32;
using Subnetwork for address;

constructor() POCBaseTest("") {}

function setUp() public override {
// There are 4 initially deployed Vaults:
// 1. With NetworkRestakeDelegator, with Slasher - 7 days vault epoch (can be used with vault1, delegator1, slasher1 variables)
Expand Down
284 changes: 168 additions & 116 deletions test/POCBase.t.sol

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/mocks/DAILikeToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

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

Expand Down
2 changes: 1 addition & 1 deletion test/mocks/FakeEntity.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

contract FakeEntity {
address public immutable FACTORY;
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/FeeOnTransferToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

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

Expand Down
2 changes: 1 addition & 1 deletion test/mocks/PermitToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/RebaseToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/SimpleBurner.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {IBurner} from "../../src/interfaces/slasher/IBurner.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/mocks/SimpleFullRestakeDelegatorHook.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {IFullRestakeDelegator} from "../../src/interfaces/delegator/IFullRestakeDelegator.sol";
import {IDelegatorHook} from "../../src/interfaces/delegator/IDelegatorHook.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/SimpleNetworkRestakeDelegatorHook.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {INetworkRestakeDelegator} from "../../src/interfaces/delegator/INetworkRestakeDelegator.sol";
import {IDelegatorHook} from "../../src/interfaces/delegator/IDelegatorHook.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/SimpleOperatorSpecificDelegatorHook.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

import {IOperatorSpecificDelegator} from "../../src/interfaces/delegator/IOperatorSpecificDelegator.sol";
import {IDelegatorHook} from "../../src/interfaces/delegator/IDelegatorHook.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/SimpleRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.25;

import {Registry} from "../../src/contracts/common/Registry.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/mocks/Token.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.0;

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

Expand Down

0 comments on commit 4875a2e

Please sign in to comment.