Skip to content

contracts-bedrock: L2 contract deployments#5314

Merged
tynes merged 14 commits intodevelopfrom
feat/l2-deployments
Apr 3, 2023
Merged

contracts-bedrock: L2 contract deployments#5314
tynes merged 14 commits intodevelopfrom
feat/l2-deployments

Conversation

@tynes
Copy link
Contributor

@tynes tynes commented Mar 31, 2023

Description

L2 contract deployments post Sherlock. A following PR will include a script to update the implementations in the L2 proxies.

The following command can be used to deploy the contracts

#!/bin/bash

export L1_RPC=
export PRIVATE_KEY_DEPLOYER=
export L2_RPC=
export ETHERSCAN_API_KEY=

npx hardhat deploy \
    --network optimism-goerli \
    --tags l2

npx hardhat forge-contract-verify --network optimism-goerli

#5316 will let us delete the copy/paste of the deploy config json.
Edit: the above PR was pulled into this PR

The following command shows how to run the upgrade script + tests

#!/bin/bash

export ETH_RPC_URL=
SENDER=
SAFE=0xE534ccA2753aCFbcDBCeB2291F596fc60495257e
PROXY_ADMIN=0x4200000000000000000000000000000000000018

forge script \
    scripts/upgrades/PostSherlockL2.s.sol \
    -vvvvv \
    --rpc-url $ETH_RPC_URL \
    --sig 'run(address,address)' \
    --ledger \
    --broadcast \
    --sender $SENDER \
    $SAFE \
    $PROXY_ADMIN

Be sure to set the sender to the multisig key

forge test -vvv \
    --contracts scripts/upgrades \
    --rpc-url $ETH_RPC_URL \
    --match-contract PostSherlockL2

@changeset-bot
Copy link

changeset-bot bot commented Mar 31, 2023

🦋 Changeset detected

Latest commit: cc35044

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/hardhat-deploy-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Mar 31, 2023

Deploy Preview for opstack-docs canceled.

Name Link
🔨 Latest commit cc35044
🔍 Latest deploy log https://app.netlify.com/sites/opstack-docs/deploys/642b0c6408b60500081e30e3

@tynes tynes force-pushed the feat/l2-deployments branch 2 times, most recently from f0dbb75 to c8241a3 Compare March 31, 2023 14:16
@tynes tynes changed the title wip: l2 deployements contracts-bedrock: L2 contract deployments Mar 31, 2023
@tynes tynes marked this pull request as ready for review March 31, 2023 15:51
@tynes tynes requested a review from a team as a code owner March 31, 2023 15:51
@tynes tynes requested a review from smartcontracts March 31, 2023 15:51
tynes added 3 commits April 1, 2023 04:12
Predeploy implementations
Also update the deploy config. The deploy config
is copy/pasted from the goerli network one. There
isn't a good way to get "companion network's" deploy
config.
@tynes tynes force-pushed the feat/l2-deployments branch from 168b15b to 43b70f4 Compare April 1, 2023 11:12
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #5314 (cc35044) into develop (6ad7267) will decrease coverage by 0.38%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5314      +/-   ##
===========================================
- Coverage    40.34%   39.96%   -0.38%     
===========================================
  Files          387      355      -32     
  Lines        24494    23522     -972     
  Branches       838      668     -170     
===========================================
- Hits          9881     9400     -481     
+ Misses       13879    13383     -496     
- Partials       734      739       +5     
Flag Coverage Δ
bedrock-go-tests 36.68% <ø> (-0.05%) ⬇️
common-ts-tests ?
contracts-bedrock-tests 51.32% <ø> (ø)
contracts-tests 98.86% <ø> (ø)
core-utils-tests ?
dtl-tests 47.15% <ø> (ø)
fault-detector-tests 33.88% <ø> (ø)
sdk-tests 38.86% <ø> (ø)

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

see 35 files with indirect coverage changes

Add a getter to the `hre.deployConfig` object
that gives access to alternative network's deploy
configs. This is useful because multiple networks
can be linked and share config. In particular when
L2 networks are used with L1 networks, the entire
deploy config has be be shared with both networks
so it results in a copy paste.
@tynes tynes requested a review from a team as a code owner April 3, 2023 09:51
tynes added 2 commits April 3, 2023 03:22
Add ability to get other network's deploy configs, good
to pair with companion networks feature from hh deploy.
@tynes
Copy link
Contributor Author

tynes commented Apr 3, 2023

I pulled #5316 into this PR to use its functionality

tynes and others added 3 commits April 3, 2023 03:28
@tynes
Copy link
Contributor Author

tynes commented Apr 3, 2023

I pulled #5327 into this PR due to the build problems with adding solady and the gnosis safe deps. Instead, the minimal code is vendored into the repo instead of including the full deps because doing that somehow breaks the build in CI

Copy link
Contributor

@clabby clabby left a comment

Choose a reason for hiding this comment

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

LGTM. Sanity checked the deploy scripts and they look good, and have also tested the L2 predeploy upgrade script.

@tynes tynes merged commit e30fd3f into develop Apr 3, 2023
@tynes tynes deleted the feat/l2-deployments branch April 3, 2023 19:04
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