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
53b3af70
Unverified
Commit
53b3af70
authored
Dec 05, 2024
by
clabby
Committed by
GitHub
Dec 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(op-challenger): Clarify `op-challenger create-game` flags (#13269)
parent
ce723807
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
create_game.go
op-challenger/cmd/create_game.go
+7
-7
No files found.
op-challenger/cmd/create_game.go
View file @
53b3af70
...
@@ -18,11 +18,11 @@ import (
...
@@ -18,11 +18,11 @@ import (
)
)
var
(
var
(
Trac
eTypeFlag
=
&
cli
.
StringFlag
{
Gam
eTypeFlag
=
&
cli
.
StringFlag
{
Name
:
"
trac
e-type"
,
Name
:
"
gam
e-type"
,
Usage
:
"
Trace types to support
."
,
Usage
:
"
Game type to create (numeric values)
."
,
EnvVars
:
opservice
.
PrefixEnvVar
(
flags
.
EnvVarPrefix
,
"TRACE_TYPE"
),
EnvVars
:
opservice
.
PrefixEnvVar
(
flags
.
EnvVarPrefix
,
"TRACE_TYPE"
),
Value
:
types
.
TraceTypeCannon
.
String
(),
Value
:
types
.
CannonGameType
.
String
(),
}
}
OutputRootFlag
=
&
cli
.
StringFlag
{
OutputRootFlag
=
&
cli
.
StringFlag
{
Name
:
"output-root"
,
Name
:
"output-root"
,
...
@@ -38,7 +38,7 @@ var (
...
@@ -38,7 +38,7 @@ var (
func
CreateGame
(
ctx
*
cli
.
Context
)
error
{
func
CreateGame
(
ctx
*
cli
.
Context
)
error
{
outputRoot
:=
common
.
HexToHash
(
ctx
.
String
(
OutputRootFlag
.
Name
))
outputRoot
:=
common
.
HexToHash
(
ctx
.
String
(
OutputRootFlag
.
Name
))
traceType
:=
ctx
.
Uint64
(
Trac
eTypeFlag
.
Name
)
gameType
:=
ctx
.
Uint64
(
Gam
eTypeFlag
.
Name
)
l2BlockNum
:=
ctx
.
Uint64
(
L2BlockNumFlag
.
Name
)
l2BlockNum
:=
ctx
.
Uint64
(
L2BlockNumFlag
.
Name
)
contract
,
txMgr
,
err
:=
NewContractWithTxMgr
[
*
contracts
.
DisputeGameFactoryContract
](
ctx
,
flags
.
FactoryAddress
,
contract
,
txMgr
,
err
:=
NewContractWithTxMgr
[
*
contracts
.
DisputeGameFactoryContract
](
ctx
,
flags
.
FactoryAddress
,
...
@@ -50,7 +50,7 @@ func CreateGame(ctx *cli.Context) error {
...
@@ -50,7 +50,7 @@ func CreateGame(ctx *cli.Context) error {
}
}
creator
:=
tools
.
NewGameCreator
(
contract
,
txMgr
)
creator
:=
tools
.
NewGameCreator
(
contract
,
txMgr
)
gameAddr
,
err
:=
creator
.
CreateGame
(
ctx
.
Context
,
outputRoot
,
trac
eType
,
l2BlockNum
)
gameAddr
,
err
:=
creator
.
CreateGame
(
ctx
.
Context
,
outputRoot
,
gam
eType
,
l2BlockNum
)
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to create game: %w"
,
err
)
return
fmt
.
Errorf
(
"failed to create game: %w"
,
err
)
}
}
...
@@ -63,7 +63,7 @@ func createGameFlags() []cli.Flag {
...
@@ -63,7 +63,7 @@ func createGameFlags() []cli.Flag {
flags
.
L1EthRpcFlag
,
flags
.
L1EthRpcFlag
,
flags
.
NetworkFlag
,
flags
.
NetworkFlag
,
flags
.
FactoryAddressFlag
,
flags
.
FactoryAddressFlag
,
Trac
eTypeFlag
,
Gam
eTypeFlag
,
OutputRootFlag
,
OutputRootFlag
,
L2BlockNumFlag
,
L2BlockNumFlag
,
}
}
...
...
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