fake

package
v0.26.0-alpha.22 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: MPL-2.0 Imports: 6 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

GasPrice mocks base method

func (*MockPublicTransactionPoolAPI) GetTransactionCount

func (m *MockPublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*hexutil.Uint64, error)

GetTransactionCount mocks base method

func (*MockPublicTransactionPoolAPI) SendRawTransaction

func (m *MockPublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx 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(ctx, args interface{}) *gomock.Call

EstimateGas indicates an expected call of EstimateGas

func (*MockPublicTransactionPoolAPIMockRecorder) GasPrice

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

GasPrice indicates an expected call of GasPrice

func (*MockPublicTransactionPoolAPIMockRecorder) GetTransactionCount

func (mr *MockPublicTransactionPoolAPIMockRecorder) GetTransactionCount(ctx, address, blockNr interface{}) *gomock.Call

GetTransactionCount indicates an expected call of GetTransactionCount

func (*MockPublicTransactionPoolAPIMockRecorder) SendRawTransaction

func (mr *MockPublicTransactionPoolAPIMockRecorder) SendRawTransaction(ctx, encodedTx interface{}) *gomock.Call

SendRawTransaction indicates an expected call of SendRawTransaction

type PublicTransactionPoolAPI

type PublicTransactionPoolAPI interface {
	GasPrice(ctx context.Context) (*hexutil.Big, 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