Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c2951daa
Commit
c2951daa
authored
Dec 07, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-upgrade: more cleanup
parent
7e9c0f86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
main.go
op-chain-ops/cmd/op-upgrade-extended-pause/main.go
+1
-0
l1.go
op-chain-ops/upgrades/l1.go
+23
-13
No files found.
op-chain-ops/cmd/op-upgrade-extended-pause/main.go
View file @
c2951daa
...
...
@@ -6,6 +6,7 @@ import (
"fmt"
"os"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/mattn/go-isatty"
"github.com/urfave/cli/v2"
...
...
op-chain-ops/upgrades/l1.go
View file @
c2951daa
...
...
@@ -21,6 +21,11 @@ const upgradeAndCall = "upgradeAndCall(address,address,bytes)"
// storageSetterAddr represents the address of the StorageSetter contract.
var
storageSetterAddr
=
common
.
HexToAddress
(
"0xd81f43eDBCAcb4c29a9bA38a13Ee5d79278270cC"
)
// superchainConfigProxy refers to the address of the Sepolia superchain config proxy.
// NOTE: this is currently hardcoded and we will need to move this to the superchain-registry
// and have 1 deployed for each superchain target.
var
superchainConfigProxy
=
common
.
HexToAddress
(
"0xC2Be75506d5724086DEB7245bd260Cc9753911Be"
)
// L1 will add calls for upgrading each of the L1 contracts.
func
L1
(
batch
*
safe
.
Batch
,
implementations
superchain
.
ImplementationList
,
list
superchain
.
AddressList
,
config
*
genesis
.
DeployConfig
,
chainConfig
*
superchain
.
ChainConfig
,
backend
bind
.
ContractBackend
)
error
{
if
err
:=
L1CrossDomainMessenger
(
batch
,
implementations
,
list
,
config
,
chainConfig
,
backend
);
err
!=
nil
{
...
...
@@ -54,7 +59,8 @@ func L1CrossDomainMessenger(batch *safe.Batch, implementations superchain.Implem
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
@@ -93,7 +99,7 @@ func L1CrossDomainMessenger(batch *safe.Batch, implementations superchain.Implem
return
err
}
calldata
,
err
:=
l1CrossDomainMessengerABI
.
Pack
(
"initialize"
,
common
.
HexToAddress
(
list
.
OptimismPortalProxy
.
String
())
)
calldata
,
err
:=
l1CrossDomainMessengerABI
.
Pack
(
"initialize"
,
superchainConfigProxy
)
if
err
!=
nil
{
return
err
}
...
...
@@ -119,7 +125,8 @@ func L1ERC721Bridge(batch *safe.Batch, implementations superchain.Implementation
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
@@ -146,7 +153,7 @@ func L1ERC721Bridge(batch *safe.Batch, implementations superchain.Implementation
return
err
}
calldata
,
err
:=
l1ERC721BridgeABI
.
Pack
(
"initialize"
,
common
.
HexToAddress
(
list
.
L1CrossDomainMessengerProxy
.
String
())
)
calldata
,
err
:=
l1ERC721BridgeABI
.
Pack
(
"initialize"
,
superchainConfigProxy
)
if
err
!=
nil
{
return
err
}
...
...
@@ -172,7 +179,8 @@ func L1StandardBridge(batch *safe.Batch, implementations superchain.Implementati
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
@@ -211,7 +219,7 @@ func L1StandardBridge(batch *safe.Batch, implementations superchain.Implementati
return
err
}
calldata
,
err
:=
l1StandardBridgeABI
.
Pack
(
"initialize"
,
common
.
HexToAddress
(
list
.
L1CrossDomainMessengerProxy
.
String
())
)
calldata
,
err
:=
l1StandardBridgeABI
.
Pack
(
"initialize"
,
superchainConfigProxy
)
if
err
!=
nil
{
return
err
}
...
...
@@ -237,7 +245,8 @@ func L2OutputOracle(batch *safe.Batch, implementations superchain.Implementation
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
@@ -343,7 +352,8 @@ func OptimismMintableERC20Factory(batch *safe.Batch, implementations superchain.
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
@@ -396,7 +406,8 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
@@ -445,9 +456,7 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
return
err
}
// TODO: superchain config address
superchainConfig
:=
common
.
Address
{}
calldata
,
err
:=
optimismPortalABI
.
Pack
(
"initialize"
,
superchainConfig
)
calldata
,
err
:=
optimismPortalABI
.
Pack
(
"initialize"
,
superchainConfigProxy
)
if
err
!=
nil
{
return
err
}
...
...
@@ -473,7 +482,8 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
return
err
}
if
chainConfig
.
ChainID
==
10
||
chainConfig
.
ChainID
==
420
{
// 2 Step Upgrade
{
storageSetterABI
,
err
:=
bindings
.
StorageSetterMetaData
.
GetAbi
()
if
err
!=
nil
{
return
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment