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

ctb: Add removeDeployerFromSafe method to deploy scripts #10620

Merged
merged 3 commits into from
May 23, 2024

Conversation

maurelian
Copy link
Contributor

@maurelian maurelian commented May 22, 2024

Adds a new removeDeployerFromSafe() method, to be used with the keepDeployer option on the deploySafe() method.

Copy link
Contributor Author

maurelian commented May 22, 2024

Copy link

semgrep-app bot commented May 22, 2024

Semgrep found 1 todos_require_linear finding:

  • packages/core-utils/src/common/bn.ts

Please create a GitHub ticket for this TODO.

Ignore this finding from todos_require_linear.

@maurelian maurelian force-pushed the maur/ownership-refac-2 branch 4 times, most recently from 3f25851 to d3def62 Compare May 22, 2024 20:53
@maurelian maurelian marked this pull request as ready for review May 22, 2024 21:00
@maurelian maurelian requested a review from a team as a code owner May 22, 2024 21:00
@maurelian maurelian requested review from mds1 and removed request for a team May 22, 2024 21:00
Base automatically changed from maur/ownership-refac-2 to develop May 23, 2024 00:23
Copy link
Contributor

coderabbitai bot commented May 23, 2024

Walkthrough

Walkthrough

The updates encompass modifications to the deployment and configuration scripts for contracts. They introduce new functionalities for managing ownership and security, including the addition of the OwnerManager import, new functions for removing deployers, renaming and restructuring configuration structs, and adding new deployment and configuration functions for Guardian Safe. Additionally, tests have been updated with new helper functions and assertions to ensure the correct configuration and ownership properties.

Changes

File Path Change Summary
.../contracts-bedrock/scripts/Deploy.s.sol Added OwnerManager import, introduced removeDeployerFromSafe function, and updated comments for clarity in the Deploy contract.
.../contracts-bedrock/scripts/DeployOwnership.s.sol Renamed SecurityCouncilConfig to GuardianConfig, adjusted related configurations, and added functions for deploying and configuring the Guardian Safe.
.../contracts-bedrock/test/Safe/DeployOwnership.t.sol Added GuardianConfig import, new helper functions for Safe config assertions, and tests for Foundation, Security Council, and Guardian Safe configurations. Added checks to ensure msg.sender is not an owner of the safe.

Recent Review Details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits Files that changed from the base of the PR and between b917499 and 29ef7cf.
Files selected for processing (1)
  • packages/contracts-bedrock/test/Safe/DeployOwnership.t.sol (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/contracts-bedrock/test/Safe/DeployOwnership.t.sol

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.26%. Comparing base (df2aeba) to head (29ef7cf).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #10620       +/-   ##
============================================
- Coverage    55.13%   39.26%   -15.88%     
============================================
  Files           37       27       -10     
  Lines         2900     1821     -1079     
  Branches       415      415               
============================================
- Hits          1599      715      -884     
+ Misses        1269     1106      -163     
+ Partials        32        0       -32     
Flag Coverage Δ
cannon-go-tests ?
chain-mon-tests 27.14% <ø> (ø)
sdk-tests 40.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 10 files with indirect coverage changes

Copy link

semgrep-app bot commented May 23, 2024

Semgrep found 2 invalid-usage-of-modified-variable findings:

Variable unsafeInNode is likely modified and later used on error. In some cases this could result in panics due to a nil dereference

Ignore this finding from invalid-usage-of-modified-variable.

@maurelian maurelian enabled auto-merge May 23, 2024 16:55
@maurelian maurelian added this pull request to the merge queue May 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 23, 2024
@maurelian maurelian added this pull request to the merge queue May 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 23, 2024
@maurelian maurelian added this pull request to the merge queue May 23, 2024
Merged via the queue into develop with commit 09db90e May 23, 2024
69 checks passed
@maurelian maurelian deleted the maur/ownership-refac-3 branch May 23, 2024 20:58
tarunkhasnavis pushed a commit that referenced this pull request May 28, 2024
* ctb: Add removeDeployerFromSafe() method

* Delete extra line

* ctb: Add check to ensure deploy is removed from Safe
rdovgan pushed a commit to rdovgan/optimism that referenced this pull request Jun 24, 2024
…timism#10620)

* ctb: Add removeDeployerFromSafe() method

* Delete extra line

* ctb: Add check to ensure deploy is removed from Safe
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.

None yet

2 participants