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

Local network: pass mgmt contract to l2 contract deploy script #1664

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

BedrockSquirrel
Copy link
Collaborator

Why this change is needed

Didn't realise the L2 contract deployer was called from this other place, hadn't added the new mgmt contract address arg.

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link

coderabbitai bot commented Nov 23, 2023

Walkthrough

The changes across the two files indicate an update to the management contract address used within a testnet launcher and a contract deployer tool. A new parameter for specifying the management contract address has been introduced to the Start function in the testnet launcher, and the main configuration in the contract deployer tool has been updated to include a new management contract address.

Changes

File Path Change Summary
.../launcher/docker.go Introduced a new parameter l2cd.WithManagementContractAddress to the Start function to specify a management contract address.
.../launcher/l2contractdeployer/cmd/main.go Updated the main function to configure the WithManagementContractAddress with a new management contract address.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d37c0c7 and 43f2fbc.
Files selected for processing (2)
  • testnet/launcher/docker.go (1 hunks)
  • testnet/launcher/l2contractdeployer/cmd/main.go (1 hunks)
Additional comments: 1
testnet/launcher/l2contractdeployer/cmd/main.go (1)
  • 16-22:
    The addition of the management contract address to the L2 contract deployment configuration is correctly implemented.

Comment on lines 124 to 130
l2cd.WithL2Host("sequencer-host"),
l2cd.WithL2WSPort(81),
l2cd.WithL1PrivateKey("f52e5418e349dccdda29b6ac8b0abe6576bb7713886aa85abea6181ba731f9bb"),
l2cd.WithManagementContractAddress("0xeDa66Cc53bd2f26896f6Ba6b736B1Ca325DE04eF"),
l2cd.WithMessageBusContractAddress("0xFD03804faCA2538F4633B3EBdfEfc38adafa259B"),
l2cd.WithL2PrivateKey("8dfb8083da6275ae3e4f41e3e8a8c19d028d32c9247e24530933782f2a05035b"),
l2cd.WithHocPKString("6e384a07a01263518a09a5424c7b6bbfc3604ba7d93f47e3a455cbdd7f9f0682"),
Copy link

Choose a reason for hiding this comment

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

Consider using a configuration file or environment variable for the management contract address to avoid hardcoding it and to facilitate easier updates or configurations for different environments.

@BedrockSquirrel BedrockSquirrel merged commit 34221a5 into main Nov 27, 2023
1 of 2 checks passed
@BedrockSquirrel BedrockSquirrel deleted the matt/fix-local-netw-l2-contracts branch November 27, 2023 10:17
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.

2 participants