Commit 5dee68b4 authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: mainnet protocol versions deployment

Deploy `ProtocolVersions` to mainnet and configure.

```bash
cast admin $(jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json)
0x543ba4aadbab8f9025686bd03993043599c6fb04

cast implementation $(jq -r .address < deployments/mainnet/ProtocolVersionsProxy.json)
0x42f0bd8313ad456a38061308857b2383fe2c72a0

jq -r .address < deployments/mainnet/ProtocolVersions.json
0x42F0bD8313ad456A38061308857b2383fe2c72a0

```

The following diff to the deploy script was used to get around
needing to do everything via multisig transactions:

```
diff --git a/packages/contracts-bedrock/scripts/Deploy.s.sol b/packages/contracts-bedrock/scripts/Deploy.s.sol
index b65ea490f..6dee882eb 100644
--- a/packages/contracts-bedrock/scripts/Deploy.s.sol
+++ b/packages/contracts-bedrock/scripts/Deploy.s.sol
@@ -353,8 +353,8 @@ contract Deploy is Deployer {
     }

     /// @notice Deploy the ProtocolVersionsProxy
-    function deployProtocolVersionsProxy() public onlyTestnetOrDevnet broadcast returns (address addr_) {
-        address proxyAdmin = mustGetAddress("ProxyAdmin");
+    function deployProtocolVersionsProxy() public broadcast returns (address addr_) {
+        address proxyAdmin = 0x354F3f4ECdcA5E0A7acE08d71348cdC1Dab48960;
         Proxy proxy = new Proxy({
             _admin: proxyAdmin
         });
@@ -458,7 +458,7 @@ contract Deploy is Deployer {
     }

     /// @notice Deploy the ProtocolVersions
-    function deployProtocolVersions() public onlyTestnetOrDevnet broadcast returns (address addr_) {
+    function deployProtocolVersions() public broadcast returns (address addr_) {
         ProtocolVersions versions = new ProtocolVersions{ salt: implSalt() }();
         save("ProtocolVersions", address(versions));
         console.log("ProtocolVersions deployed at %s", address(versions));
@@ -861,7 +861,7 @@ contract Deploy is Deployer {
         require(portal.paused() == false);
     }

-    function initializeProtocolVersions() public onlyTestnetOrDevnet broadcast {
+    function initializeProtocolVersions() public broadcast {
         address protocolVersionsProxy = mustGetAddress("ProtocolVersionsProxy");
         address protocolVersions = mustGetAddress("ProtocolVersions");

@@ -869,6 +869,19 @@ contract Deploy is Deployer {
         uint256 requiredProtocolVersion = cfg.requiredProtocolVersion();
         uint256 recommendedProtocolVersion = cfg.recommendedProtocolVersion();

+       Proxy(payable(protocolVersionsProxy)).upgradeToAndCall(
+           protocolVersions,
+            abi.encodeCall(
+                ProtocolVersions.initialize,
+                (
+                    finalSystemOwner,
+                    ProtocolVersion.wrap(requiredProtocolVersion),
+                    ProtocolVersion.wrap(recommendedProtocolVersion)
+                )
+            )
+        );
+
+        /*
         _upgradeAndCallViaSafe({
             _proxy: payable(protocolVersionsProxy),
             _implementation: protocolVersions,
@@ -881,6 +894,7 @@ contract Deploy is Deployer {
                 )
                 )
         });
+        */

         ProtocolVersions versions = ProtocolVersions(protocolVersionsProxy);
         string memory version = versions.version();

```
parent cfc3a81b
......@@ -39,5 +39,7 @@
"eip1559Denominator": 50,
"eip1559Elasticity": 6,
"l2GenesisRegolithTimeOffset": "0x0",
"systemConfigStartBlock": 17422444
"systemConfigStartBlock": 17422444,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment