ipld-eth-server/pkg/core/client.go
Rob Mulholand 63434f6bc9 Add tests for pkg/geth/blockchain
- inject dependencies instead of initializing them in the constructor
2018-07-18 16:34:13 -05:00

17 lines
482 B
Go

package core
import (
"context"
"math/big"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/core/types"
)
type Client interface {
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
}