Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EthClienter

type EthClienter struct {
	mock.Mock
}

EthClienter is an autogenerated mock type for the EthClienter type

func NewEthClienter

func NewEthClienter(t interface {
	mock.TestingT
	Cleanup(func())
}) *EthClienter

NewEthClienter creates a new instance of EthClienter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*EthClienter) BlockByHash

func (_m *EthClienter) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)

BlockByHash provides a mock function with given fields: ctx, hash

func (*EthClienter) BlockByNumber

func (_m *EthClienter) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)

BlockByNumber provides a mock function with given fields: ctx, number

func (*EthClienter) BlockNumber

func (_m *EthClienter) BlockNumber(ctx context.Context) (uint64, error)

BlockNumber provides a mock function with given fields: ctx

func (*EthClienter) CallContract

func (_m *EthClienter) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)

CallContract provides a mock function with given fields: ctx, call, blockNumber

func (*EthClienter) Client

func (_m *EthClienter) Client() *rpc.Client

Client provides a mock function with no fields

func (*EthClienter) CodeAt

func (_m *EthClienter) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)

CodeAt provides a mock function with given fields: ctx, contract, blockNumber

func (*EthClienter) EXPECT

func (_m *EthClienter) EXPECT() *EthClienter_Expecter

func (*EthClienter) EstimateGas

func (_m *EthClienter) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)

EstimateGas provides a mock function with given fields: ctx, call

func (*EthClienter) FilterLogs

func (_m *EthClienter) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)

FilterLogs provides a mock function with given fields: ctx, q

func (*EthClienter) HeaderByHash

func (_m *EthClienter) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)

HeaderByHash provides a mock function with given fields: ctx, hash

func (*EthClienter) HeaderByNumber

func (_m *EthClienter) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

HeaderByNumber provides a mock function with given fields: ctx, number

func (*EthClienter) PendingCodeAt

func (_m *EthClienter) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)

PendingCodeAt provides a mock function with given fields: ctx, account

func (*EthClienter) PendingNonceAt

func (_m *EthClienter) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)

PendingNonceAt provides a mock function with given fields: ctx, account

func (*EthClienter) SendTransaction

func (_m *EthClienter) SendTransaction(ctx context.Context, tx *types.Transaction) error

SendTransaction provides a mock function with given fields: ctx, tx

func (*EthClienter) SubscribeFilterLogs

func (_m *EthClienter) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)

SubscribeFilterLogs provides a mock function with given fields: ctx, q, ch

func (*EthClienter) SubscribeNewHead

func (_m *EthClienter) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error)

SubscribeNewHead provides a mock function with given fields: ctx, ch

func (*EthClienter) SuggestGasPrice

func (_m *EthClienter) SuggestGasPrice(ctx context.Context) (*big.Int, error)

SuggestGasPrice provides a mock function with given fields: ctx

func (*EthClienter) SuggestGasTipCap

func (_m *EthClienter) SuggestGasTipCap(ctx context.Context) (*big.Int, error)

SuggestGasTipCap provides a mock function with given fields: ctx

func (*EthClienter) TransactionCount

func (_m *EthClienter) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error)

TransactionCount provides a mock function with given fields: ctx, blockHash

func (*EthClienter) TransactionInBlock

func (_m *EthClienter) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error)

TransactionInBlock provides a mock function with given fields: ctx, blockHash, index

type EthClienter_BlockByHash_Call

type EthClienter_BlockByHash_Call struct {
	*mock.Call
}

EthClienter_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash'

func (*EthClienter_BlockByHash_Call) Return

func (*EthClienter_BlockByHash_Call) Run

func (*EthClienter_BlockByHash_Call) RunAndReturn

type EthClienter_BlockByNumber_Call

type EthClienter_BlockByNumber_Call struct {
	*mock.Call
}

EthClienter_BlockByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByNumber'

func (*EthClienter_BlockByNumber_Call) Return

func (*EthClienter_BlockByNumber_Call) Run

func (*EthClienter_BlockByNumber_Call) RunAndReturn

type EthClienter_BlockNumber_Call

type EthClienter_BlockNumber_Call struct {
	*mock.Call
}

EthClienter_BlockNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockNumber'

func (*EthClienter_BlockNumber_Call) Return

func (*EthClienter_BlockNumber_Call) Run

func (*EthClienter_BlockNumber_Call) RunAndReturn

type EthClienter_CallContract_Call

type EthClienter_CallContract_Call struct {
	*mock.Call
}

EthClienter_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract'

func (*EthClienter_CallContract_Call) Return

func (*EthClienter_CallContract_Call) Run

func (*EthClienter_CallContract_Call) RunAndReturn

type EthClienter_Client_Call

type EthClienter_Client_Call struct {
	*mock.Call
}

EthClienter_Client_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Client'

func (*EthClienter_Client_Call) Return

func (*EthClienter_Client_Call) Run

func (_c *EthClienter_Client_Call) Run(run func()) *EthClienter_Client_Call

func (*EthClienter_Client_Call) RunAndReturn

func (_c *EthClienter_Client_Call) RunAndReturn(run func() *rpc.Client) *EthClienter_Client_Call

type EthClienter_CodeAt_Call

type EthClienter_CodeAt_Call struct {
	*mock.Call
}

EthClienter_CodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CodeAt'

func (*EthClienter_CodeAt_Call) Return

func (*EthClienter_CodeAt_Call) Run

func (_c *EthClienter_CodeAt_Call) Run(run func(ctx context.Context, contract common.Address, blockNumber *big.Int)) *EthClienter_CodeAt_Call

func (*EthClienter_CodeAt_Call) RunAndReturn

type EthClienter_EstimateGas_Call

type EthClienter_EstimateGas_Call struct {
	*mock.Call
}

EthClienter_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas'

func (*EthClienter_EstimateGas_Call) Return

func (*EthClienter_EstimateGas_Call) Run

func (*EthClienter_EstimateGas_Call) RunAndReturn

type EthClienter_Expecter

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

func (*EthClienter_Expecter) BlockByHash

func (_e *EthClienter_Expecter) BlockByHash(ctx interface{}, hash interface{}) *EthClienter_BlockByHash_Call

BlockByHash is a helper method to define mock.On call

  • ctx context.Context
  • hash common.Hash

func (*EthClienter_Expecter) BlockByNumber

func (_e *EthClienter_Expecter) BlockByNumber(ctx interface{}, number interface{}) *EthClienter_BlockByNumber_Call

BlockByNumber is a helper method to define mock.On call

  • ctx context.Context
  • number *big.Int

func (*EthClienter_Expecter) BlockNumber

func (_e *EthClienter_Expecter) BlockNumber(ctx interface{}) *EthClienter_BlockNumber_Call

BlockNumber is a helper method to define mock.On call

  • ctx context.Context

func (*EthClienter_Expecter) CallContract

func (_e *EthClienter_Expecter) CallContract(ctx interface{}, call interface{}, blockNumber interface{}) *EthClienter_CallContract_Call

CallContract is a helper method to define mock.On call

  • ctx context.Context
  • call ethereum.CallMsg
  • blockNumber *big.Int

func (*EthClienter_Expecter) Client

Client is a helper method to define mock.On call

func (*EthClienter_Expecter) CodeAt

func (_e *EthClienter_Expecter) CodeAt(ctx interface{}, contract interface{}, blockNumber interface{}) *EthClienter_CodeAt_Call

CodeAt is a helper method to define mock.On call

  • ctx context.Context
  • contract common.Address
  • blockNumber *big.Int

func (*EthClienter_Expecter) EstimateGas

func (_e *EthClienter_Expecter) EstimateGas(ctx interface{}, call interface{}) *EthClienter_EstimateGas_Call

EstimateGas is a helper method to define mock.On call

  • ctx context.Context
  • call ethereum.CallMsg

func (*EthClienter_Expecter) FilterLogs

func (_e *EthClienter_Expecter) FilterLogs(ctx interface{}, q interface{}) *EthClienter_FilterLogs_Call

FilterLogs is a helper method to define mock.On call

  • ctx context.Context
  • q ethereum.FilterQuery

func (*EthClienter_Expecter) HeaderByHash

func (_e *EthClienter_Expecter) HeaderByHash(ctx interface{}, hash interface{}) *EthClienter_HeaderByHash_Call

HeaderByHash is a helper method to define mock.On call

  • ctx context.Context
  • hash common.Hash

func (*EthClienter_Expecter) HeaderByNumber

func (_e *EthClienter_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *EthClienter_HeaderByNumber_Call

HeaderByNumber is a helper method to define mock.On call

  • ctx context.Context
  • number *big.Int

func (*EthClienter_Expecter) PendingCodeAt

func (_e *EthClienter_Expecter) PendingCodeAt(ctx interface{}, account interface{}) *EthClienter_PendingCodeAt_Call

PendingCodeAt is a helper method to define mock.On call

  • ctx context.Context
  • account common.Address

func (*EthClienter_Expecter) PendingNonceAt

func (_e *EthClienter_Expecter) PendingNonceAt(ctx interface{}, account interface{}) *EthClienter_PendingNonceAt_Call

PendingNonceAt is a helper method to define mock.On call

  • ctx context.Context
  • account common.Address

func (*EthClienter_Expecter) SendTransaction

func (_e *EthClienter_Expecter) SendTransaction(ctx interface{}, tx interface{}) *EthClienter_SendTransaction_Call

SendTransaction is a helper method to define mock.On call

  • ctx context.Context
  • tx *types.Transaction

func (*EthClienter_Expecter) SubscribeFilterLogs

func (_e *EthClienter_Expecter) SubscribeFilterLogs(ctx interface{}, q interface{}, ch interface{}) *EthClienter_SubscribeFilterLogs_Call

SubscribeFilterLogs is a helper method to define mock.On call

  • ctx context.Context
  • q ethereum.FilterQuery
  • ch chan<- types.Log

func (*EthClienter_Expecter) SubscribeNewHead

func (_e *EthClienter_Expecter) SubscribeNewHead(ctx interface{}, ch interface{}) *EthClienter_SubscribeNewHead_Call

SubscribeNewHead is a helper method to define mock.On call

  • ctx context.Context
  • ch chan<- *types.Header

func (*EthClienter_Expecter) SuggestGasPrice

func (_e *EthClienter_Expecter) SuggestGasPrice(ctx interface{}) *EthClienter_SuggestGasPrice_Call

SuggestGasPrice is a helper method to define mock.On call

  • ctx context.Context

func (*EthClienter_Expecter) SuggestGasTipCap

func (_e *EthClienter_Expecter) SuggestGasTipCap(ctx interface{}) *EthClienter_SuggestGasTipCap_Call

SuggestGasTipCap is a helper method to define mock.On call

  • ctx context.Context

func (*EthClienter_Expecter) TransactionCount

func (_e *EthClienter_Expecter) TransactionCount(ctx interface{}, blockHash interface{}) *EthClienter_TransactionCount_Call

TransactionCount is a helper method to define mock.On call

  • ctx context.Context
  • blockHash common.Hash

func (*EthClienter_Expecter) TransactionInBlock

func (_e *EthClienter_Expecter) TransactionInBlock(ctx interface{}, blockHash interface{}, index interface{}) *EthClienter_TransactionInBlock_Call

TransactionInBlock is a helper method to define mock.On call

  • ctx context.Context
  • blockHash common.Hash
  • index uint

type EthClienter_FilterLogs_Call

type EthClienter_FilterLogs_Call struct {
	*mock.Call
}

EthClienter_FilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterLogs'

func (*EthClienter_FilterLogs_Call) Return

func (*EthClienter_FilterLogs_Call) Run

func (*EthClienter_FilterLogs_Call) RunAndReturn

type EthClienter_HeaderByHash_Call

type EthClienter_HeaderByHash_Call struct {
	*mock.Call
}

EthClienter_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash'

func (*EthClienter_HeaderByHash_Call) Return

func (*EthClienter_HeaderByHash_Call) Run

func (*EthClienter_HeaderByHash_Call) RunAndReturn

type EthClienter_HeaderByNumber_Call

type EthClienter_HeaderByNumber_Call struct {
	*mock.Call
}

EthClienter_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber'

func (*EthClienter_HeaderByNumber_Call) Return

func (*EthClienter_HeaderByNumber_Call) Run

func (*EthClienter_HeaderByNumber_Call) RunAndReturn

type EthClienter_PendingCodeAt_Call

type EthClienter_PendingCodeAt_Call struct {
	*mock.Call
}

EthClienter_PendingCodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCodeAt'

func (*EthClienter_PendingCodeAt_Call) Return

func (*EthClienter_PendingCodeAt_Call) Run

func (*EthClienter_PendingCodeAt_Call) RunAndReturn

type EthClienter_PendingNonceAt_Call

type EthClienter_PendingNonceAt_Call struct {
	*mock.Call
}

EthClienter_PendingNonceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingNonceAt'

func (*EthClienter_PendingNonceAt_Call) Return

func (*EthClienter_PendingNonceAt_Call) Run

func (*EthClienter_PendingNonceAt_Call) RunAndReturn

type EthClienter_SendTransaction_Call

type EthClienter_SendTransaction_Call struct {
	*mock.Call
}

EthClienter_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction'

func (*EthClienter_SendTransaction_Call) Return

func (*EthClienter_SendTransaction_Call) Run

func (*EthClienter_SendTransaction_Call) RunAndReturn

type EthClienter_SubscribeFilterLogs_Call

type EthClienter_SubscribeFilterLogs_Call struct {
	*mock.Call
}

EthClienter_SubscribeFilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeFilterLogs'

func (*EthClienter_SubscribeFilterLogs_Call) Return

func (*EthClienter_SubscribeFilterLogs_Call) Run

func (*EthClienter_SubscribeFilterLogs_Call) RunAndReturn

type EthClienter_SubscribeNewHead_Call

type EthClienter_SubscribeNewHead_Call struct {
	*mock.Call
}

EthClienter_SubscribeNewHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewHead'

func (*EthClienter_SubscribeNewHead_Call) Return

func (*EthClienter_SubscribeNewHead_Call) Run

func (*EthClienter_SubscribeNewHead_Call) RunAndReturn

type EthClienter_SuggestGasPrice_Call

type EthClienter_SuggestGasPrice_Call struct {
	*mock.Call
}

EthClienter_SuggestGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasPrice'

func (*EthClienter_SuggestGasPrice_Call) Return

func (*EthClienter_SuggestGasPrice_Call) Run

func (*EthClienter_SuggestGasPrice_Call) RunAndReturn

type EthClienter_SuggestGasTipCap_Call

type EthClienter_SuggestGasTipCap_Call struct {
	*mock.Call
}

EthClienter_SuggestGasTipCap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasTipCap'

func (*EthClienter_SuggestGasTipCap_Call) Return

func (*EthClienter_SuggestGasTipCap_Call) Run

func (*EthClienter_SuggestGasTipCap_Call) RunAndReturn

type EthClienter_TransactionCount_Call

type EthClienter_TransactionCount_Call struct {
	*mock.Call
}

EthClienter_TransactionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionCount'

func (*EthClienter_TransactionCount_Call) Return

func (*EthClienter_TransactionCount_Call) Run

func (*EthClienter_TransactionCount_Call) RunAndReturn

type EthClienter_TransactionInBlock_Call

type EthClienter_TransactionInBlock_Call struct {
	*mock.Call
}

EthClienter_TransactionInBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionInBlock'

func (*EthClienter_TransactionInBlock_Call) Return

func (*EthClienter_TransactionInBlock_Call) Run

func (*EthClienter_TransactionInBlock_Call) RunAndReturn

type ReorgDetector

type ReorgDetector struct {
	mock.Mock
}

ReorgDetector is an autogenerated mock type for the ReorgDetector type

func NewReorgDetector

func NewReorgDetector(t interface {
	mock.TestingT
	Cleanup(func())
}) *ReorgDetector

NewReorgDetector creates a new instance of ReorgDetector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*ReorgDetector) AddBlockToTrack

func (_m *ReorgDetector) AddBlockToTrack(ctx context.Context, id string, blockNum uint64, blockHash common.Hash) error

AddBlockToTrack provides a mock function with given fields: ctx, id, blockNum, blockHash

func (*ReorgDetector) EXPECT

func (_m *ReorgDetector) EXPECT() *ReorgDetector_Expecter

func (*ReorgDetector) GetFinalizedBlockType added in v0.0.2

func (_m *ReorgDetector) GetFinalizedBlockType() etherman.BlockNumberFinality

GetFinalizedBlockType provides a mock function with no fields

func (*ReorgDetector) String added in v0.0.2

func (_m *ReorgDetector) String() string

String provides a mock function with no fields

func (*ReorgDetector) Subscribe

func (_m *ReorgDetector) Subscribe(id string) (*reorgdetector.Subscription, error)

Subscribe provides a mock function with given fields: id

type ReorgDetector_AddBlockToTrack_Call

type ReorgDetector_AddBlockToTrack_Call struct {
	*mock.Call
}

ReorgDetector_AddBlockToTrack_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBlockToTrack'

func (*ReorgDetector_AddBlockToTrack_Call) Return

func (*ReorgDetector_AddBlockToTrack_Call) Run

func (*ReorgDetector_AddBlockToTrack_Call) RunAndReturn

type ReorgDetector_Expecter

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

func (*ReorgDetector_Expecter) AddBlockToTrack

func (_e *ReorgDetector_Expecter) AddBlockToTrack(ctx interface{}, id interface{}, blockNum interface{}, blockHash interface{}) *ReorgDetector_AddBlockToTrack_Call

AddBlockToTrack is a helper method to define mock.On call

  • ctx context.Context
  • id string
  • blockNum uint64
  • blockHash common.Hash

func (*ReorgDetector_Expecter) GetFinalizedBlockType added in v0.0.2

GetFinalizedBlockType is a helper method to define mock.On call

func (*ReorgDetector_Expecter) String added in v0.0.2

String is a helper method to define mock.On call

func (*ReorgDetector_Expecter) Subscribe

func (_e *ReorgDetector_Expecter) Subscribe(id interface{}) *ReorgDetector_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • id string

type ReorgDetector_GetFinalizedBlockType_Call added in v0.0.2

type ReorgDetector_GetFinalizedBlockType_Call struct {
	*mock.Call
}

ReorgDetector_GetFinalizedBlockType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFinalizedBlockType'

func (*ReorgDetector_GetFinalizedBlockType_Call) Return added in v0.0.2

func (*ReorgDetector_GetFinalizedBlockType_Call) Run added in v0.0.2

func (*ReorgDetector_GetFinalizedBlockType_Call) RunAndReturn added in v0.0.2

type ReorgDetector_String_Call added in v0.0.2

type ReorgDetector_String_Call struct {
	*mock.Call
}

ReorgDetector_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String'

func (*ReorgDetector_String_Call) Return added in v0.0.2

func (*ReorgDetector_String_Call) Run added in v0.0.2

func (*ReorgDetector_String_Call) RunAndReturn added in v0.0.2

func (_c *ReorgDetector_String_Call) RunAndReturn(run func() string) *ReorgDetector_String_Call

type ReorgDetector_Subscribe_Call

type ReorgDetector_Subscribe_Call struct {
	*mock.Call
}

ReorgDetector_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'

func (*ReorgDetector_Subscribe_Call) Return

func (*ReorgDetector_Subscribe_Call) Run

func (*ReorgDetector_Subscribe_Call) RunAndReturn

Jump to

Keyboard shortcuts

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