Skip to content

Commit b4dcc59

Browse files
tynesmaurelian
authored andcommitted
contracts-bedrock: fix build (#3114)
* contracts-bedrock: fix build Standardize on the upgradable initializable since the contracts are technically upgradable it is more clear. There are no real implementation differences between the upgradable and standard initializable implementations. `OwnableUpgradable` is `initializable` imported from the upgradable package, and the `L2OutputOracle` inherits from `OwnableUpgradable`. This means that the only way to standardize on a single implementation of `Initializable` is to use the upgradable version. This also bumps the version of the openzeppelin contracts dependency because they refactored the initializable implementation and made it easier to understand. https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/releases/tag/v4.7.0 OpenZeppelin/openzeppelin-contracts#3450 * op-bindings: regenerate
1 parent fac05e9 commit b4dcc59

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

.changeset/eight-ravens-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@eth-optimism/contracts-bedrock': patch
3+
---
4+
5+
Fix build on latest foundry

op-bindings/bindings/optimismportal.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

op-bindings/bindings/optimismportal_deployed.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contracts-bedrock/contracts/L1/OptimismPortal.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.15;
33

4-
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
4+
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
55
import { ExcessivelySafeCall } from "excessively-safe-call/src/ExcessivelySafeCall.sol";
66
import { L2OutputOracle } from "./L2OutputOracle.sol";
77
import { Types } from "../libraries/Types.sol";

packages/contracts-bedrock/contracts/L1/ResourceMetering.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.15;
33

4-
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
4+
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
55
import { Math } from "@openzeppelin/contracts/utils/math/Math.sol";
66
import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol";
77
import { FixedPointMathLib } from "@rari-capital/solmate/src/utils/FixedPointMathLib.sol";

packages/contracts-bedrock/contracts/test/CommonTest.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Predeploys } from "../libraries/Predeploys.sol";
1818
import { Types } from "../libraries/Types.sol";
1919
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
2020
import { Proxy } from "../universal/Proxy.sol";
21-
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
21+
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
2222
import { ResolvedDelegateProxy } from "../legacy/ResolvedDelegateProxy.sol";
2323
import { AddressManager } from "../legacy/AddressManager.sol";
2424
import { L1ChugSplashProxy } from "../legacy/L1ChugSplashProxy.sol";

packages/contracts-bedrock/contracts/universal/StandardBridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
55
import { ERC165Checker } from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
66
import { Address } from "@openzeppelin/contracts/utils/Address.sol";
77
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
8-
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
8+
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
99
import { IRemoteToken, IL1Token } from "./SupportedInterfaces.sol";
1010
import { CrossDomainMessenger } from "./CrossDomainMessenger.sol";
1111
import { OptimismMintableERC20 } from "./OptimismMintableERC20.sol";

packages/contracts-bedrock/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"@eth-optimism/core-utils": "^0.9.2",
3939
"@ethereumjs/trie": "^5.0.0-beta.1",
4040
"@ethereumjs/util": "^8.0.0-beta.1",
41-
"@openzeppelin/contracts": "^4.5.0",
42-
"@openzeppelin/contracts-upgradeable": "^4.5.2",
41+
"@openzeppelin/contracts": "4.6.0",
42+
"@openzeppelin/contracts-upgradeable": "4.7.1",
4343
"@rari-capital/solmate": "https://github.com/rari-capital/solmate.git#8f9b23f8838670afda0fd8983f2c41e8037ae6bc",
4444
"bip39": "^3.0.4",
4545
"ds-test": "https://github.com/dapphub/ds-test.git#9310e879db8ba3ea6d5c6489a579118fd264a3f5",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,7 @@
28162816
dependencies:
28172817
"@octokit/openapi-types" "^9.5.0"
28182818

2819-
"@openzeppelin/contracts-upgradeable@4.7.1", "@openzeppelin/contracts-upgradeable@^4.3.2", "@openzeppelin/contracts-upgradeable@^4.5.2":
2819+
"@openzeppelin/contracts-upgradeable@4.7.1", "@openzeppelin/contracts-upgradeable@^4.3.2":
28202820
version "4.7.1"
28212821
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.1.tgz#f63fc384255d6ac139e0a2561aa207fd7c14183c"
28222822
integrity sha512-5EFiZld3DYFd8aTL8eeMnhnaWh1/oXLXFNuFMrgF3b1DNPshF3LCyO7VR6lc+gac2URJ0BlVcZoCfkk/3MoEfg==
@@ -2836,7 +2836,7 @@
28362836
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.5.0.tgz#3fd75d57de172b3743cdfc1206883f56430409cc"
28372837
integrity sha512-fdkzKPYMjrRiPK6K4y64e6GzULR7R7RwxSigHS8DDp7aWDeoReqsQI+cxHV1UuhAqX69L1lAaWDxenfP+xiqzA==
28382838

2839-
"@openzeppelin/contracts@4.6.0", "@openzeppelin/contracts@^4.5.0":
2839+
"@openzeppelin/contracts@4.6.0":
28402840
version "4.6.0"
28412841
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.6.0.tgz#c91cf64bc27f573836dba4122758b4743418c1b3"
28422842
integrity sha512-8vi4d50NNya/bQqCmaVzvHNmwHvS0OBKb7HNtuNwEE3scXWrP31fKQoGxNMT+KbzmrNZzatE3QK5p2gFONI/hg==

0 commit comments

Comments
 (0)