Skip to content

Commit

Permalink
Cleanup chain reader errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 authored and reductionista committed Dec 1, 2023
1 parent cd64523 commit 02446b8
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions pkg/types/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package types

import (
"context"
"errors"
"time"

"google.golang.org/grpc/status"
Expand All @@ -25,26 +26,8 @@ func UnwrapClientError(err error) error {
return err
}

// Errors used only by relay plugins

type ErrorChainReaderUnsupported struct{}

func (e ErrorChainReaderUnsupported) Error() string {
return "ChainReader is not supported by the relay"
}

type ErrorNoChainReaderInJobSpec struct{}

func (e ErrorNoChainReaderInJobSpec) Error() string {
return "There is no ChainReader configuration defined in the job spec"
}

var ErrInvalidConfig = errors.New("invalid configuration")

func (e ErrorChainReaderInvalidConfig) Error() string {
return "Invalid ChainReader configuration"
}

type ChainReader interface {
// returnVal should satisfy Marshaller interface
GetLatestValue(ctx context.Context, bc BoundContract, method string, params, returnVal any) error
Expand Down

0 comments on commit 02446b8

Please sign in to comment.