Skip to content

Conversation

@ManuelBilbao
Copy link
Contributor

Motivation

OZ's upgrade tools require the variables to be set in initializers and not in constructor/variable declaration. This should not be such a problem as it will always be initialized as 0, but with this change we avoid the tool error

Description

@ManuelBilbao ManuelBilbao requested a review from ilitteri November 3, 2025 13:25
@ManuelBilbao ManuelBilbao self-assigned this Nov 3, 2025
@ManuelBilbao ManuelBilbao added the L2 Rollup client label Nov 3, 2025
Copilot AI review requested due to automatic review settings November 3, 2025 13:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the initialization of the pendingPrivilegedTxIndex state variable in the CommonBridge contract to follow best practices for upgradeable contracts. The change removes the inline initialization at declaration and moves it to the initialize function.

  • Removes inline initialization (= 0) from the pendingPrivilegedTxIndex state variable declaration
  • Adds explicit initialization of pendingPrivilegedTxIndex in the initialize function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ManuelBilbao ManuelBilbao requested a review from a team as a code owner November 3, 2025 14:51
@ManuelBilbao ManuelBilbao added this pull request to the merge queue Nov 3, 2025
Merged via the queue into main with commit a9cd9b7 Nov 3, 2025
36 checks passed
@ManuelBilbao ManuelBilbao deleted the privileged_index_initialize branch November 3, 2025 17:40
@github-project-automation github-project-automation bot moved this to Done in ethrex_l2 Nov 3, 2025
ManuelBilbao added a commit that referenced this pull request Nov 3, 2025
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->
OZ's upgrade tools require the variables to be set in initializers and
not in constructor/variable declaration. This should not be such a
problem as it will always be initialized as 0, but with this change we
avoid the tool error

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->
xqft pushed a commit that referenced this pull request Nov 11, 2025
**Motivation**

<!-- Why does this pull request exist? What are its goals? -->
OZ's upgrade tools require the variables to be set in initializers and
not in constructor/variable declaration. This should not be such a
problem as it will always be initialized as 0, but with this change we
avoid the tool error

**Description**

<!-- A clear and concise general description of the changes this PR
introduces -->

<!-- Link to issues: Resolves #111, Resolves #222 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants