Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve(finalizer): remove hardcoded constants #1610

Merged
merged 11 commits into from
Jun 13, 2024

Conversation

bmzig
Copy link
Contributor

@bmzig bmzig commented Jun 11, 2024

In preparation for NCA, we should remove all instances where we hardcode the chain IDs so that the bots will not automatically assume we are on mainnet.

Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

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

Looks good - couple of small comments.

@bmzig bmzig requested a review from pxrl June 11, 2024 23:08
Signed-off-by: bennett <[email protected]>
@pxrl
Copy link
Contributor

pxrl commented Jun 12, 2024

@bmzig Looking good! I see some additional hardcoding in:

  • src/finalizer/utils/opStack.ts
  • src/clients/bridges/ArbitrumAdapter.ts
  • src/clients/bridges/op-stack/optimism/OptimismAdapter.ts
  • src/clients/bridges/BaseAdapter.ts
  • src/dataworker/Dataworker.ts: unpermissioned: Number(chainId) === 1

(I also found a few more and dropped them in this PR: #1611)

@bmzig
Copy link
Contributor Author

bmzig commented Jun 12, 2024

@bmzig Looking good! I see some additional hardcoding in:

  • src/finalizer/utils/opStack.ts
  • src/clients/bridges/ArbitrumAdapter.ts
  • src/clients/bridges/op-stack/optimism/OptimismAdapter.ts
  • src/clients/bridges/BaseAdapter.ts
  • src/dataworker/Dataworker.ts: unpermissioned: Number(chainId) === 1

(I also found a few more and dropped them in this PR: #1611)

@bmzig Looking good! I see some additional hardcoding in:

  • src/finalizer/utils/opStack.ts
  • src/clients/bridges/ArbitrumAdapter.ts
  • src/clients/bridges/op-stack/optimism/OptimismAdapter.ts
  • src/clients/bridges/BaseAdapter.ts
  • src/dataworker/Dataworker.ts: unpermissioned: Number(chainId) === 1

(I also found a few more and dropped them in this PR: #1611)

@bmzig Looking good! I see some additional hardcoding in:

  • src/finalizer/utils/opStack.ts
  • src/clients/bridges/ArbitrumAdapter.ts
  • src/clients/bridges/op-stack/optimism/OptimismAdapter.ts
  • src/clients/bridges/BaseAdapter.ts
  • src/dataworker/Dataworker.ts: unpermissioned: Number(chainId) === 1

(I also found a few more and dropped them in this PR: #1611)

@bmzig Looking good! I see some additional hardcoding in:

  • src/finalizer/utils/opStack.ts
  • src/clients/bridges/ArbitrumAdapter.ts
  • src/clients/bridges/op-stack/optimism/OptimismAdapter.ts
  • src/clients/bridges/BaseAdapter.ts
  • src/dataworker/Dataworker.ts: unpermissioned: Number(chainId) === 1

(I also found a few more and dropped them in this PR: #1611)

The top/bottom are fixed here: a584a4b

I'm saving all the hardcoded values in bridges/* for #1524, since I'm aiming to lean down the code/make those instances of hardcoded values generic.

Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

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

Just found that I had these comments pending. I'll circle over the PR again now.

Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

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

LGTM subject to some straggling hardcoded chain IDs, and potentially revisiting the OVM_CHAIN_ID (or add a comment describing the typeof operation).

@bmzig bmzig merged commit e20d11d into master Jun 13, 2024
4 checks passed
@bmzig bmzig deleted the bz/removeHardcodedConstants branch June 13, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants