Skip to content

Commit

Permalink
fix: layout in StandardBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
maurelian committed Oct 29, 2024
1 parent ce7923b commit 8f1b1c5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
[
{
"bytes": "1",
"label": "_initialized",
"bytes": "32",
"label": "spacer_0_0_32",
"offset": 0,
"slot": "0",
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "bool"
},
{
"bytes": "30",
"label": "spacer_0_2_30",
"offset": 2,
"slot": "0",
"type": "bytes30"
"type": "bytes32"
},
{
"bytes": "20",
Expand Down Expand Up @@ -55,10 +41,24 @@
"slot": "5",
"type": "uint256[45]"
},
{
"bytes": "1",
"label": "_initialized",
"offset": 0,
"slot": "50",
"type": "uint8"
},
{
"bytes": "1",
"label": "_initializing",
"offset": 1,
"slot": "50",
"type": "bool"
},

This comment has been minimized.

Copy link
@maurelian

maurelian Oct 29, 2024

Author Contributor

This is broken, unfortunately it will be ugly to fix without Initializable v5, we'll need to define a new contract which is a thing layer wrapping the L1StandardBridge, just to inherit from initializable.

{
"bytes": "20",
"label": "superchainConfig",
"offset": 0,
"offset": 2,
"slot": "50",
"type": "contract ISuperchainConfig"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[
{
"bytes": "30",
"label": "spacer_0_2_30",
"bytes": "32",
"label": "spacer_0_0_32",
"offset": 0,
"slot": "0",
"type": "bytes30"
"type": "bytes32"
},
{
"bytes": "20",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[
{
"bytes": "30",
"label": "spacer_0_2_30",
"bytes": "32",
"label": "spacer_0_0_32",
"offset": 0,
"slot": "0",
"type": "bytes30"
"type": "bytes32"
},
{
"bytes": "20",
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/src/L1/L1StandardBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable
/// NOTE: this contract is not intended to support all variations of ERC20 tokens. Examples
/// of some token types that may not be properly supported by this contract include, but are
/// not limited to: tokens with transfer fees, rebasing tokens, and tokens with blocklists.
contract L1StandardBridge is Initializable, StandardBridge, ISemver {
contract L1StandardBridge is StandardBridge, ISemver, Initializable {
/// @custom:legacy
/// @notice Emitted whenever a deposit of ETH from L1 into L2 is initiated.
/// @param from Address of the depositor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract contract StandardBridge {
/// @custom:legacy
/// @custom:spacer messenger + initializable
/// @notice Spacer for backwards compatibility.
bytes30 private spacer_0_0_32;
bytes32 private spacer_0_0_32;

/// @custom:legacy
/// @custom:spacer l2TokenBridge
Expand Down

0 comments on commit 8f1b1c5

Please sign in to comment.