Skip to content

Commit

Permalink
chore(op-dispute-mon): bind enrichers (#9908)
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell authored Mar 19, 2024
1 parent 6322c02 commit 96a269b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions op-dispute-mon/mon/extract/balance_enricher.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import (
"github.com/ethereum/go-ethereum/common"
)

var _ Enricher = (*BalanceEnricher)(nil)

type BalanceCaller interface {
GetBalance(context.Context, rpcblock.Block) (*big.Int, common.Address, error)
}

type BalanceEnricher struct {
}
type BalanceEnricher struct{}

func NewBalanceEnricher() *BalanceEnricher {
return &BalanceEnricher{}
Expand Down
6 changes: 4 additions & 2 deletions op-dispute-mon/mon/extract/bond_enricher.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import (
"golang.org/x/exp/maps"
)

var _ Enricher = (*BondEnricher)(nil)

var ErrIncorrectCreditCount = errors.New("incorrect credit count")

type BondCaller interface {
GetCredits(context.Context, rpcblock.Block, ...common.Address) ([]*big.Int, error)
}
type BondEnricher struct {
}

type BondEnricher struct{}

func NewBondEnricher() *BondEnricher {
return &BondEnricher{}
Expand Down
2 changes: 2 additions & 0 deletions op-dispute-mon/mon/extract/head_enricher.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"github.com/ethereum/go-ethereum/core/types"
)

var _ Enricher = (*L1HeadBlockNumEnricher)(nil)

type BlockFetcher interface {
HeaderByHash(ctx context.Context, block common.Hash) (*types.Header, error)
}
Expand Down

0 comments on commit 96a269b

Please sign in to comment.