fake

package
v0.0.0-...-ced8335 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2018 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fake is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallArgs

type CallArgs struct {
	From     common.Address  `json:"from"`
	To       *common.Address `json:"to"`
	Gas      hexutil.Uint64  `json:"gas"`
	GasPrice hexutil.Big     `json:"gasPrice"`
	Value    hexutil.Big     `json:"value"`
	Data     hexutil.Bytes   `json:"data"`
}

CallArgs copied from module go-ethereum/internal/ethapi

type MockPublicTransactionPoolAPI

type MockPublicTransactionPoolAPI struct {
	// contains filtered or unexported fields
}

MockPublicTransactionPoolAPI is a mock of PublicTransactionPoolAPI interface

func NewMockPublicTransactionPoolAPI

func NewMockPublicTransactionPoolAPI(ctrl *gomock.Controller) *MockPublicTransactionPoolAPI

NewMockPublicTransactionPoolAPI creates a new mock instance

func NewTestServer

func NewTestServer(ctrl *gomock.Controller) (*rpc.Server, *MockPublicTransactionPoolAPI)

NewTestServer returns a mocked test server

func (*MockPublicTransactionPoolAPI) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockPublicTransactionPoolAPI) EstimateGas

EstimateGas mocks base method

func (*MockPublicTransactionPoolAPI) GasPrice

func (m *MockPublicTransactionPoolAPI) GasPrice(arg0 context.Context) (*big.Int, error)

GasPrice mocks base method

func (*MockPublicTransactionPoolAPI) GetTransactionCount

func (m *MockPublicTransactionPoolAPI) GetTransactionCount(arg0 context.Context, arg1 common.Address, arg2 rpc.BlockNumber) (*hexutil.Uint64, error)

GetTransactionCount mocks base method

func (*MockPublicTransactionPoolAPI) SendRawTransaction

func (m *MockPublicTransactionPoolAPI) SendRawTransaction(arg0 context.Context, arg1 hexutil.Bytes) (common.Hash, error)

SendRawTransaction mocks base method

type MockPublicTransactionPoolAPIMockRecorder

type MockPublicTransactionPoolAPIMockRecorder struct {
	// contains filtered or unexported fields
}

MockPublicTransactionPoolAPIMockRecorder is the mock recorder for MockPublicTransactionPoolAPI

func (*MockPublicTransactionPoolAPIMockRecorder) EstimateGas

func (mr *MockPublicTransactionPoolAPIMockRecorder) EstimateGas(arg0, arg1 interface{}) *gomock.Call

EstimateGas indicates an expected call of EstimateGas

func (*MockPublicTransactionPoolAPIMockRecorder) GasPrice

func (mr *MockPublicTransactionPoolAPIMockRecorder) GasPrice(arg0 interface{}) *gomock.Call

GasPrice indicates an expected call of GasPrice

func (*MockPublicTransactionPoolAPIMockRecorder) GetTransactionCount

func (mr *MockPublicTransactionPoolAPIMockRecorder) GetTransactionCount(arg0, arg1, arg2 interface{}) *gomock.Call

GetTransactionCount indicates an expected call of GetTransactionCount

func (*MockPublicTransactionPoolAPIMockRecorder) SendRawTransaction

func (mr *MockPublicTransactionPoolAPIMockRecorder) SendRawTransaction(arg0, arg1 interface{}) *gomock.Call

SendRawTransaction indicates an expected call of SendRawTransaction

type PublicTransactionPoolAPI

type PublicTransactionPoolAPI interface {
	GasPrice(ctx context.Context) (*big.Int, error)
	EstimateGas(ctx context.Context, args CallArgs) (hexutil.Uint64, error)
	GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*hexutil.Uint64, error)
	SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error)
}

PublicTransactionPoolAPI used to generate mock by mockgen util. This was done because PublicTransactionPoolAPI is located in internal/ethapi module and there is no easy way to generate mocks from internal modules.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL