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
96a269bc
Unverified
Commit
96a269bc
authored
Mar 19, 2024
by
refcell
Committed by
GitHub
Mar 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(op-dispute-mon): bind enrichers (#9908)
parent
6322c026
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
balance_enricher.go
op-dispute-mon/mon/extract/balance_enricher.go
+3
-2
bond_enricher.go
op-dispute-mon/mon/extract/bond_enricher.go
+4
-2
head_enricher.go
op-dispute-mon/mon/extract/head_enricher.go
+2
-0
No files found.
op-dispute-mon/mon/extract/balance_enricher.go
View file @
96a269bc
...
@@ -10,12 +10,13 @@ import (
...
@@ -10,12 +10,13 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common"
)
)
var
_
Enricher
=
(
*
BalanceEnricher
)(
nil
)
type
BalanceCaller
interface
{
type
BalanceCaller
interface
{
GetBalance
(
context
.
Context
,
rpcblock
.
Block
)
(
*
big
.
Int
,
common
.
Address
,
error
)
GetBalance
(
context
.
Context
,
rpcblock
.
Block
)
(
*
big
.
Int
,
common
.
Address
,
error
)
}
}
type
BalanceEnricher
struct
{
type
BalanceEnricher
struct
{}
}
func
NewBalanceEnricher
()
*
BalanceEnricher
{
func
NewBalanceEnricher
()
*
BalanceEnricher
{
return
&
BalanceEnricher
{}
return
&
BalanceEnricher
{}
...
...
op-dispute-mon/mon/extract/bond_enricher.go
View file @
96a269bc
...
@@ -12,13 +12,15 @@ import (
...
@@ -12,13 +12,15 @@ import (
"golang.org/x/exp/maps"
"golang.org/x/exp/maps"
)
)
var
_
Enricher
=
(
*
BondEnricher
)(
nil
)
var
ErrIncorrectCreditCount
=
errors
.
New
(
"incorrect credit count"
)
var
ErrIncorrectCreditCount
=
errors
.
New
(
"incorrect credit count"
)
type
BondCaller
interface
{
type
BondCaller
interface
{
GetCredits
(
context
.
Context
,
rpcblock
.
Block
,
...
common
.
Address
)
([]
*
big
.
Int
,
error
)
GetCredits
(
context
.
Context
,
rpcblock
.
Block
,
...
common
.
Address
)
([]
*
big
.
Int
,
error
)
}
}
type
BondEnricher
struct
{
}
type
BondEnricher
struct
{
}
func
NewBondEnricher
()
*
BondEnricher
{
func
NewBondEnricher
()
*
BondEnricher
{
return
&
BondEnricher
{}
return
&
BondEnricher
{}
...
...
op-dispute-mon/mon/extract/head_enricher.go
View file @
96a269bc
...
@@ -10,6 +10,8 @@ import (
...
@@ -10,6 +10,8 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
)
)
var
_
Enricher
=
(
*
L1HeadBlockNumEnricher
)(
nil
)
type
BlockFetcher
interface
{
type
BlockFetcher
interface
{
HeaderByHash
(
ctx
context
.
Context
,
block
common
.
Hash
)
(
*
types
.
Header
,
error
)
HeaderByHash
(
ctx
context
.
Context
,
block
common
.
Hash
)
(
*
types
.
Header
,
error
)
}
}
...
...
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