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 (
"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{}
......
......@@ -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{}
......
......@@ -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)
}
......
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