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

op-deployer: add 'inspect superchain-registry' subcommand #12736

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

bitwiseguy
Copy link
Contributor

@bitwiseguy bitwiseguy commented Oct 30, 2024

Closes #12612

Adds the following command to generate a .env file (written to /<working-dir>/superchain-registry.env:

./bin/op-deployer inspect superchain-registry <chain-id>

The .env output file can then be copied over to the superchain-registry and used for the just add-chain command.

Tests

I manually tested that the just add-chain command runs without failure up until the point where it tries to start making contract calls, which it cannot complete since the contracts in the test are only deployed to a local env

@bitwiseguy bitwiseguy requested a review from mslipper October 30, 2024 02:27
@mslipper
Copy link
Collaborator

A couple of notes on this:

  • The intent file describes how you want your chain to look on L1. Only values required to actually deploy a chain should exist in the intent.
  • The state file describes what steps op-deployer has taken for a given deployment, and their outputs. Similarly, only values required for a deployment should exist in state.
  • Inspect commands read the state and intent files plus whatever additional context is needed from the user, then return some output.

Given the above, there's no need to modify the pipeline, state, or intent code to fulfill the requirements of this ticket. All you have to do is define an inspect command that read the state/intent, and takes some CLI flags to populate the other env vars.

@bitwiseguy
Copy link
Contributor Author

there's no need to modify the pipeline, state, or intent code to fulfill the requirements of this ticket

I'm confused by this since there is this bullet item in the DoD for the ticket associated with this work. Can you help clarify?

Add fields to the intent relevant to the registry, e.g. SCR_CHAIN_NAME.

@bitwiseguy bitwiseguy force-pushed the ss/deploy-scr-subcommand branch from 5d3254d to d693d61 Compare October 31, 2024 02:56
@bitwiseguy bitwiseguy marked this pull request as ready for review October 31, 2024 03:15
Copy link
Collaborator

@mslipper mslipper left a comment

Choose a reason for hiding this comment

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

lgtm

@mslipper mslipper added this pull request to the merge queue Oct 31, 2024
Merged via the queue into develop with commit caf63ce Oct 31, 2024
48 checks passed
@mslipper mslipper deleted the ss/deploy-scr-subcommand branch October 31, 2024 16:27
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…ptimism#12736)

* op-deployer: add 'inspect superchain-registry' subcommand

* op-deployer: generate artifacts at runtime of superchain-registry cmd

* op-deployer: add missing err handler

* op-deployer: add Printf to prompt user to populate .env vals

* op-deployer: reformat addresses to superchain.AddressList
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.

Add a subcommand to generate superchain-registry artifacts
2 participants