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

feat: Replace deployImplementations with call to DeployImplementations.run() #12260

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

maurelian
Copy link
Contributor

feat: Rename setupSuperchain to deploySuperchain

feat: Replace deployImplementations with call to DeployImplementations.run()

Copy link
Contributor Author

maurelian commented Oct 2, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @maurelian and the rest of your teammates on Graphite Graphite

@maurelian maurelian changed the title feat: Rename setupSuperchain to deploySuperchain feat: Replace deployImplementations with call to DeployImplementations.run() Oct 2, 2024
@maurelian maurelian marked this pull request as ready for review October 2, 2024 19:05
@maurelian maurelian requested a review from a team as a code owner October 2, 2024 19:05
Copy link
Contributor Author

Merge activity

  • Oct 2, 4:13 PM EDT: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

@maurelian maurelian marked this pull request as draft October 2, 2024 20:18
@maurelian maurelian changed the base branch from develop to opcm/init-superchain-impls October 2, 2024 20:48
Copy link
Contributor

semgrep-app bot commented Oct 2, 2024

Semgrep found 2 sol-style-require-reason findings:

require() must include a reason string

Ignore this finding from sol-style-require-reason.

Base automatically changed from opcm/init-superchain-impls to develop October 2, 2024 21:52
Copy link
Contributor

semgrep-app bot commented Oct 3, 2024

Semgrep found 138 sol-style-require-reason findings:

require() must include a reason string

Ignore this finding from sol-style-require-reason.

@maurelian maurelian changed the base branch from develop to chain-assertions/ux October 3, 2024 15:54
@maurelian maurelian changed the base branch from chain-assertions/ux to delete-fpacops October 3, 2024 16:21
@@ -215,6 +243,15 @@ library ChainAssertions {
require(factory.owner() == _expectedOwner, "CHECK-DG-20");
}

/// @notice Asserts that the PreimageOracle is setup correctly
function checkPreimageOracle(IPreimageOracle _oracle, DeployConfig _cfg) internal view {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a singleton, and is not currently exposed in the _proxiesUnstrict() getter, so unlike other functions in this file I'm just passing in the contract rather than a struct with all of the contracts.

I may add a PR on top of this to clean up those getters a bit.

@@ -640,61 +649,6 @@ contract Deploy is Deployer {
ChainAssertions.checkOptimismPortal({ _contracts: contracts, _cfg: cfg, _isProxy: false });
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still need this for the legacy system tests which OPCM does not support.

Base automatically changed from delete-fpacops to develop October 3, 2024 17:20
} else {
deployImplementations();
}
deployImplementations({ _isInterop: cfg.useInterop() });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Passing in this arg is somewhat overkill, as cfg is already available in the deployImplementations function, but my goal is to have all of the cfg.use_() flags visible here rather than buried in function calls.

@@ -311,7 +333,7 @@ contract Deploy is Deployer {
dsi.set(dsi.recommendedProtocolVersion.selector, ProtocolVersion.wrap(cfg.recommendedProtocolVersion()));

// Run the deployment script.
deploySuperchain.run(dsi, dso);
ds.run(dsi, dso);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I renamed setupSuperchain to deploySuperchain for consistency, I had a shadowed declaration warning.

ChainAssertions.checkSystemConfigInterop({ _contracts: contracts, _cfg: cfg, _isProxy: false });
} else {
ChainAssertions.checkSystemConfig({ _contracts: contracts, _cfg: cfg, _isProxy: false });
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For every deploy_() function which was deleted below, I add (and if necessary created) a corresponding ChainAssertions check here.

@maurelian maurelian marked this pull request as ready for review October 3, 2024 17:51
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