Skip to content

Commit

Permalink
Merge pull request #32 from chainbound/wip/std-input
Browse files Browse the repository at this point in the history
fix: use separate dependency versions of OpenZeppelin
  • Loading branch information
merklefruit authored Jan 27, 2025
2 parents 0e9c963 + 5aff377 commit e0fdc66
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target
.env
.DS_Store
9 changes: 6 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "smart-contracts/lib/openzeppelin-contracts"]
path = smart-contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "smart-contracts/lib/openzeppelin-contracts-upgradeable"]
path = smart-contracts/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
Expand All @@ -20,3 +17,9 @@
[submodule "smart-contracts/lib/forge-std"]
path = smart-contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "smart-contracts/lib/openzeppelin-contracts-v5.0.0"]
path = smart-contracts/lib/openzeppelin-contracts-v5.0.0
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "smart-contracts/lib/openzeppelin-contracts-v4.9.0"]
path = smart-contracts/lib/openzeppelin-contracts-v4.9.0
url = https://github.com/OpenZeppelin/openzeppelin-contracts
12 changes: 8 additions & 4 deletions smart-contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ ignored_warnings_from = ["lib/openzeppelin-contracts/contracts"]

remappings = [
# Bolt-Registry remappings
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin-v4.9.0/=lib/openzeppelin-contracts-v4.9.0/",
"@openzeppelin-v5.0.0/=lib/openzeppelin-contracts-v5.0.0/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/foundry-upgrades/=lib/openzeppelin-foundry-upgrades/",
"@symbiotic/middleware-sdk/=lib/middleware-sdk/src/",
"@symbiotic/core/=lib/core/src/",

"@eigenlayer/=lib/eigenlayer-contracts/",

# Access the EigenLayer dependencies. Needed for tests.
Expand All @@ -29,12 +29,16 @@ remappings = [
"lib/openzeppelin-contracts/:@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"lib/openzeppelin-contracts-upgradeable/:@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",

# Symbiotic remappings contexts
"lib/middleware-sdk/:@symbiotic/=lib/core/src/",

# EigenLayer remapping contexts
"lib/eigenlayer-contracts/:@openzeppelin-upgrades/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/",
"lib/eigenlayer-contracts/:@openzeppelin/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-v4.9.0/",
# Note: we pin the openzeppelin version used for EL to 4.9.0. When/if EL upgrades to v5, we need to update this.
# "lib/eigenlayer-contracts/:@openzeppelin/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-v4.9.0/",
"lib/eigenlayer-contracts/:@openzeppelin/=lib/openzeppelin-contracts-v4.9.0",
"lib/eigenlayer-contracts/:ds-test/=lib/eigenlayer-contracts/lib/ds-test/src/",
"lib/eigenlayer-contracts/:forge-std/=lib/eigenlayer-contracts/lib/forge-std/src/",
"lib/eigenlayer-contracts/:forge-std/=lib/eigenlayer-contracts/lib/forge-std/src/"
]

[rpc_endpoints]
Expand Down
1 change: 0 additions & 1 deletion smart-contracts/lib/openzeppelin-contracts
Submodule openzeppelin-contracts deleted from 332bcb
1 change: 1 addition & 0 deletions smart-contracts/lib/openzeppelin-contracts-v4.9.0
1 change: 1 addition & 0 deletions smart-contracts/lib/openzeppelin-contracts-v5.0.0
4 changes: 2 additions & 2 deletions smart-contracts/src/contracts/EigenLayerMiddlewareV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
pragma solidity ^0.8.27;

import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
import {Time} from "@openzeppelin/contracts/utils/types/Time.sol";
import {UUPSUpgradeable} from "@openzeppelin-v5.0.0/contracts/proxy/utils/UUPSUpgradeable.sol";
import {Time} from "@openzeppelin-v5.0.0/contracts/utils/types/Time.sol";

import {PauseableEnumerableSet} from "@symbiotic/middleware-sdk/libraries/PauseableEnumerableSet.sol";

Expand Down
2 changes: 1 addition & 1 deletion smart-contracts/test/holesky/EigenLayerMiddlewareV1.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.27;

import {Test, console} from "forge-std/Test.sol";
import {IERC20} from "@openzeppelin/contracts-eigenlayer/token/ERC20/IERC20.sol";
import {IERC20} from "@openzeppelin-v4.9.0/contracts/token/ERC20/IERC20.sol";
import {
IAllocationManager, IAllocationManagerTypes
} from "@eigenlayer/src/contracts/interfaces/IAllocationManager.sol";
Expand Down
2 changes: 1 addition & 1 deletion smart-contracts/test/holesky/SymbioticMiddleware.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {INetworkRegistry} from "@symbiotic/core/interfaces/INetworkRegistry.sol"
import {IBaseDelegator} from "@symbiotic/core/interfaces/delegator/IBaseDelegator.sol";
import {Subnetwork} from "@symbiotic/core/contracts/libraries/Subnetwork.sol";

import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
import {IERC20} from "@openzeppelin-v4.9.0/contracts/interfaces/IERC20.sol";

contract SymbioticMiddlewareHoleskyTest is Test {
using Subnetwork for address;
Expand Down
2 changes: 1 addition & 1 deletion smart-contracts/test/mainnet/EigenLayerMiddlewareV1.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.27;

import {Test, console} from "forge-std/Test.sol";
import {IERC20} from "@openzeppelin/contracts-eigenlayer/token/ERC20/IERC20.sol";
import {IERC20} from "@openzeppelin-v4.9.0/contracts/token/ERC20/IERC20.sol";
import {
IAllocationManager, IAllocationManagerTypes
} from "@eigenlayer/src/contracts/interfaces/IAllocationManager.sol";
Expand Down
2 changes: 1 addition & 1 deletion smart-contracts/test/mainnet/SymbioticMiddleware.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {INetworkRegistry} from "@symbiotic/core/interfaces/INetworkRegistry.sol"
import {IBaseDelegator} from "@symbiotic/core/interfaces/delegator/IBaseDelegator.sol";
import {Subnetwork} from "@symbiotic/core/contracts/libraries/Subnetwork.sol";

import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
import {IERC20} from "@openzeppelin-v4.9.0/contracts/interfaces/IERC20.sol";

contract SymbioticMiddlewareMainnetTest is Test {
using Subnetwork for address;
Expand Down
Empty file added stdinput_raw.json
Empty file.

0 comments on commit e0fdc66

Please sign in to comment.