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

chore: Simplify op-deployer scripts: DeploySuperchain [1/N] #15014

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

janjakubnanista
Copy link
Contributor

Description

An investigation PR focused on reducing the complexity of deploy scripts, taking DeploySuperchain as a test subject. Instead of modifying the original script, DeploySuperchain2 has been introduced to allow for step-by-step migration and side-by-side comparison.

  • Simplifies the interface
    • Removes the input/output contracts and replaces them with input/output structs defined per script contract
    • Places the assertion logic closer to the deployment logic, directly on the deploy script
  • Adds a BaseDeploy abstract contract that isolates common deployment logic. This contract also allows us to test the deployment scripts themselves (see code comments)

Relates to #14976

Notes

  • Currently, the deploy script contract (DeploySuperchain) has partial public functions besides the main entrypoint (and partial assertion functions). To impose a cleaner interface, I propose no such partial functions - instead, separate deployment script contracts should be defined (could be in the same file), each with only one public function (run). This way, the convention runs all the way through the codebase.

Copy link

codecov bot commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.61%. Comparing base (c665f83) to head (6c6d3ec).
Report is 11 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (c665f83) and HEAD (6c6d3ec). Click for more details.

HEAD has 9 uploads less than BASE
Flag BASE (c665f83) HEAD (6c6d3ec)
cannon-go-tests-64 3 0
cannon-go-tests-32 3 0
2 1
contracts-bedrock-tests 2 0
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #15014       +/-   ##
============================================
- Coverage    46.43%    8.61%   -37.83%     
============================================
  Files         1157        4     -1153     
  Lines        99124      534    -98590     
============================================
- Hits         46031       46    -45985     
+ Misses       49785      471    -49314     
+ Partials      3308       17     -3291     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests ?

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

see 1155 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant