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
5f7f44ca
Unverified
Commit
5f7f44ca
authored
Oct 18, 2024
by
Matthew Slipper
Committed by
GitHub
Oct 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-deployer: Remove irrelevant flags (#12525)
We only need a `--artifacts-locator` flag now.
parent
f99424de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
23 deletions
+16
-23
bootstrap.go
op-deployer/pkg/deployer/bootstrap/bootstrap.go
+10
-10
flags.go
op-deployer/pkg/deployer/bootstrap/flags.go
+6
-13
No files found.
op-deployer/pkg/deployer/bootstrap/bootstrap.go
View file @
5f7f44ca
...
...
@@ -31,7 +31,6 @@ type OPCMConfig struct {
PrivateKey
string
Logger
log
.
Logger
ArtifactsLocator
*
opcm
.
ArtifactsLocator
ContractsRelease
string
privateKeyECDSA
*
ecdsa
.
PrivateKey
}
...
...
@@ -59,10 +58,6 @@ func (c *OPCMConfig) Check() error {
return
fmt
.
Errorf
(
"artifacts locator must be specified"
)
}
if
c
.
ContractsRelease
==
""
{
return
fmt
.
Errorf
(
"contracts release must be specified"
)
}
return
nil
}
...
...
@@ -73,12 +68,11 @@ func OPCMCLI(cliCtx *cli.Context) error {
l1RPCUrl
:=
cliCtx
.
String
(
deployer
.
L1RPCURLFlagName
)
privateKey
:=
cliCtx
.
String
(
deployer
.
PrivateKeyFlagName
)
artifactsURLStr
:=
cliCtx
.
String
(
Artifacts
URL
FlagName
)
artifactsURLStr
:=
cliCtx
.
String
(
Artifacts
Locator
FlagName
)
artifactsLocator
:=
new
(
opcm
.
ArtifactsLocator
)
if
err
:=
artifactsLocator
.
UnmarshalText
([]
byte
(
artifactsURLStr
));
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to parse artifacts URL: %w"
,
err
)
}
contractsRelease
:=
cliCtx
.
String
(
ContractsReleaseFlagName
)
ctx
:=
ctxinterrupt
.
WithCancelOnInterrupt
(
cliCtx
.
Context
)
...
...
@@ -87,7 +81,6 @@ func OPCMCLI(cliCtx *cli.Context) error {
PrivateKey
:
privateKey
,
Logger
:
l
,
ArtifactsLocator
:
artifactsLocator
,
ContractsRelease
:
contractsRelease
,
})
}
...
...
@@ -138,7 +131,14 @@ func OPCM(ctx context.Context, cfg OPCMConfig) error {
signer
:=
opcrypto
.
SignerFnFromBind
(
opcrypto
.
PrivateKeySignerFn
(
cfg
.
privateKeyECDSA
,
chainID
))
chainDeployer
:=
crypto
.
PubkeyToAddress
(
cfg
.
privateKeyECDSA
.
PublicKey
)
lgr
.
Info
(
"deploying OPCM"
,
"release"
,
cfg
.
ContractsRelease
)
var
release
string
if
cfg
.
ArtifactsLocator
.
IsTag
()
{
release
=
cfg
.
ArtifactsLocator
.
Tag
}
else
{
release
=
"dev"
}
lgr
.
Info
(
"deploying OPCM"
,
"release"
,
release
)
var
dio
opcm
.
DeployImplementationsOutput
err
=
pipeline
.
CallScriptBroadcast
(
...
...
@@ -181,7 +181,7 @@ func OPCM(ctx context.Context, cfg OPCMConfig) error {
ChallengePeriodSeconds
:
big
.
NewInt
(
86400
),
ProofMaturityDelaySeconds
:
big
.
NewInt
(
604800
),
DisputeGameFinalityDelaySeconds
:
big
.
NewInt
(
302400
),
Release
:
cfg
.
ContractsR
elease
,
Release
:
r
elease
,
SuperchainConfigProxy
:
superchainConfigAddr
,
ProtocolVersionsProxy
:
protocolVersionsAddr
,
OpcmProxyOwner
:
opcmProxyOwnerAddr
,
...
...
op-deployer/pkg/deployer/bootstrap/flags.go
View file @
5f7f44ca
...
...
@@ -7,28 +7,21 @@ import (
)
const
(
ArtifactsURLFlagName
=
"artifacts-url"
ContractsReleaseFlagName
=
"contracts-release"
ArtifactsLocatorFlagName
=
"artifacts-locator"
)
var
(
ArtifactsURLFlag
=
&
cli
.
StringFlag
{
Name
:
ArtifactsURLFlagName
,
Usage
:
"URL to the artifacts directory."
,
EnvVars
:
deployer
.
PrefixEnvVar
(
"ARTIFACTS_URL"
),
}
ContractsReleaseFlag
=
&
cli
.
StringFlag
{
Name
:
ContractsReleaseFlagName
,
Usage
:
"Release of the contracts to deploy."
,
EnvVars
:
deployer
.
PrefixEnvVar
(
"CONTRACTS_RELEASE"
),
ArtifactsLocatorFlag
=
&
cli
.
StringFlag
{
Name
:
ArtifactsLocatorFlagName
,
Usage
:
"Locator for artifacts."
,
EnvVars
:
deployer
.
PrefixEnvVar
(
"ARTIFACTS_LOCATOR"
),
}
)
var
OPCMFlags
=
[]
cli
.
Flag
{
deployer
.
L1RPCURLFlag
,
deployer
.
PrivateKeyFlag
,
ArtifactsURLFlag
,
ContractsReleaseFlag
,
ArtifactsLocatorFlag
,
}
var
Commands
=
[]
*
cli
.
Command
{
...
...
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