-
Notifications
You must be signed in to change notification settings - Fork 50
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
improve(OP): More generic OP chain adapter deployment #714
base: master
Are you sure you want to change the base?
Conversation
nb. This only touches constants and deployment scripts, so there should be no audit sensitivity. Contract addresses are being moved around though, so it's important that they're correct. I've checked myself but it'd be good to have a 2nd set of eyes on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked also and the bridge addresses check out.
This change permits an incremental step towards a totally generic chain adapter deployment for OP stack chains. It does this be restructuring the address mappings for OP stack chains, such that the L1 contract addresses can be resolved solely with the combination of HubPool and SpokPool chain IDs. It also updates the new OP_Adapter deployment script to support a runtime-defined SpokePool chain ID. This is clunkily supplied via the environment because hardhat deploy doesn't seem to permit arbitrary runtime arguments being supplied, but that aside, this should ease subsequent deployments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'm guessing we are just keeping the deploy_[op network]_adapter
scripts for the sake of bookkeeping at this point?
Kinda, yeah. I do think we could additionally consolidate:
Blast is a total snowflake of course, and Redstone now seems to have an upgradable USDC deployment here, so in theory we could remove the Redstone Adapter in favour of the OP Adapter (even irrespective of whether we support USDC there). However...I probably don't expect many (or any) new chain deployments to fit the Optimism/Base pattern or the Zora/Mode pattern, so I think this optimisation for the OP Stack + upgradable USDC combination gives us the most benefit for the least effort. |
This change permits an incremental step towards a totally generic chain adapter deployment for OP stack chains. It does this be restructuring the address mappings for OP stack chains, such that the L1 contract addresses can be resolved solely with the combination of HubPool and SpokPool chain IDs. It also updates the new OP_Adapter deployment script to support a runtime-defined SpokePool chain ID. This is clunkily supplied via the environment because hardhat deploy doesn't seem to permit arbitrary runtime arguments being supplied, but that aside, this should ease subsequent deployments.