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
b5a89135
Commit
b5a89135
authored
May 30, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Challenger DisputeGameFactory initialization.
parent
1b91eaf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
challenger.go
op-challenger/challenger/challenger.go
+18
-4
No files found.
op-challenger/challenger/challenger.go
View file @
b5a89135
...
...
@@ -43,9 +43,9 @@ type Challenger struct {
l2ooABI
*
abi
.
ABI
// dispute game factory contract
//
dgfContract *bindings.DisputeGameFactoryCaller
dgfContract
*
bindings
.
DisputeGameFactoryCaller
dgfContractAddr
common
.
Address
//
dgfABI *abi.ABI
dgfABI
*
abi
.
ABI
networkTimeout
time
.
Duration
}
...
...
@@ -79,6 +79,12 @@ func NewChallenger(cfg config.Config, l log.Logger, m metrics.Metricer) (*Challe
return
nil
,
err
}
dgfContract
,
err
:=
bindings
.
NewDisputeGameFactoryCaller
(
cfg
.
DGFAddress
,
l1Client
)
if
err
!=
nil
{
cancel
()
return
nil
,
err
}
cCtx
,
cCancel
:=
context
.
WithTimeout
(
ctx
,
cfg
.
NetworkTimeout
)
defer
cCancel
()
version
,
err
:=
l2ooContract
.
Version
(
&
bind
.
CallOpts
{
Context
:
cCtx
})
...
...
@@ -88,7 +94,13 @@ func NewChallenger(cfg config.Config, l log.Logger, m metrics.Metricer) (*Challe
}
l
.
Info
(
"Connected to L2OutputOracle"
,
"address"
,
cfg
.
L2OOAddress
,
"version"
,
version
)
parsed
,
err
:=
bindings
.
L2OutputOracleMetaData
.
GetAbi
()
parsedL2oo
,
err
:=
bindings
.
L2OutputOracleMetaData
.
GetAbi
()
if
err
!=
nil
{
cancel
()
return
nil
,
err
}
parsedDgf
,
err
:=
bindings
.
DisputeGameFactoryMetaData
.
GetAbi
()
if
err
!=
nil
{
cancel
()
return
nil
,
err
...
...
@@ -110,9 +122,11 @@ func NewChallenger(cfg config.Config, l log.Logger, m metrics.Metricer) (*Challe
l2ooContract
:
l2ooContract
,
l2ooContractAddr
:
cfg
.
L2OOAddress
,
l2ooABI
:
parsed
,
l2ooABI
:
parsed
L2oo
,
dgfContract
:
dgfContract
,
dgfContractAddr
:
cfg
.
DGFAddress
,
dgfABI
:
parsedDgf
,
networkTimeout
:
cfg
.
NetworkTimeout
,
},
nil
...
...
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