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
2e077818
Unverified
Commit
2e077818
authored
Dec 08, 2023
by
Maurelian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-upgrade: DRY method string definition
parent
12261091
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
l1.go
op-chain-ops/upgrades/l1.go
+9
-7
No files found.
op-chain-ops/upgrades/l1.go
View file @
2e077818
...
@@ -20,6 +20,8 @@ const (
...
@@ -20,6 +20,8 @@ const (
upgradeAndCall
=
"upgradeAndCall(address,address,bytes)"
upgradeAndCall
=
"upgradeAndCall(address,address,bytes)"
// upgrade represents the signature of the upgrade function on the ProxyAdmin contract.
// upgrade represents the signature of the upgrade function on the ProxyAdmin contract.
upgrade
=
"upgrade(address,address)"
upgrade
=
"upgrade(address,address)"
method
=
"setBytes32"
)
)
var
(
var
(
...
@@ -85,7 +87,7 @@ func L1CrossDomainMessenger(batch *safe.Batch, implementations superchain.Implem
...
@@ -85,7 +87,7 @@ func L1CrossDomainMessenger(batch *safe.Batch, implementations superchain.Implem
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -146,7 +148,7 @@ func L1ERC721Bridge(batch *safe.Batch, implementations superchain.Implementation
...
@@ -146,7 +148,7 @@ func L1ERC721Bridge(batch *safe.Batch, implementations superchain.Implementation
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"setBytes32: %w"
,
err
)
return
fmt
.
Errorf
(
"setBytes32: %w"
,
err
)
}
}
...
@@ -212,7 +214,7 @@ func L1StandardBridge(batch *safe.Batch, implementations superchain.Implementati
...
@@ -212,7 +214,7 @@ func L1StandardBridge(batch *safe.Batch, implementations superchain.Implementati
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -283,7 +285,7 @@ func L2OutputOracle(batch *safe.Batch, implementations superchain.Implementation
...
@@ -283,7 +285,7 @@ func L2OutputOracle(batch *safe.Batch, implementations superchain.Implementation
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -367,7 +369,7 @@ func OptimismMintableERC20Factory(batch *safe.Batch, implementations superchain.
...
@@ -367,7 +369,7 @@ func OptimismMintableERC20Factory(batch *safe.Batch, implementations superchain.
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -432,7 +434,7 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
...
@@ -432,7 +434,7 @@ func OptimismPortal(batch *safe.Batch, implementations superchain.Implementation
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -533,7 +535,7 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
...
@@ -533,7 +535,7 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
},
},
}
}
calldata
,
err
:=
storageSetterABI
.
Pack
(
"setBytes32"
,
input
)
calldata
,
err
:=
storageSetterABI
.
Pack
(
method
,
input
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
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