hermez-node/eth/interface.go
eth/interface.goRaw
1package eth
2
3import (
4 "context"
5 "math/big"
6
7 "github.com/ethereum/go-ethereum/core/types"
8 "github.com/hermeznetwork/hermez-node/common"
9)
10
11// ClientInterface is the eth Client interface used by hermez-node modules to
12// interact with Ethereum Blockchain and smart contracts.
13type ClientInterface interface {
14 CurrentBlock() (*big.Int, error)
15 HeaderByNumber(context.Context, *big.Int) (*types.Header, error)
16 BlockByNumber(context.Context, *big.Int) (*common.Block, error)
17 ForgeCall(*common.CallDataForge) ([]byte, error)
18}