Commit 96a269bc authored by refcell's avatar refcell Committed by GitHub

chore(op-dispute-mon): bind enrichers (#9908)

parent 6322c026
...@@ -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{}
......
...@@ -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{}
......
...@@ -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)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment