mocks

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20

type ERC20 struct {
	mock.Mock
}

ERC20 is an autogenerated mock type for the ERC20 type

func NewERC20

func NewERC20(t interface {
	mock.TestingT
	Cleanup(func())
}) *ERC20

NewERC20 creates a new instance of ERC20. 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 (*ERC20) Allowance

func (_m *ERC20) Allowance(ctx context.Context, owner common.Address, spender common.Address) big.Int

Allowance provides a mock function with given fields: ctx, owner, spender

func (*ERC20) Approve

func (_m *ERC20) Approve(ctx context.Context, spender common.Address, amount big.Int) error

Approve provides a mock function with given fields: ctx, spender, amount

func (*ERC20) BalanceOf

func (_m *ERC20) BalanceOf(ctx context.Context, address common.Address) big.Int

BalanceOf provides a mock function with given fields: ctx, address

func (*ERC20) Decimals

func (_m *ERC20) Decimals(ctx context.Context) uint8

Decimals provides a mock function with given fields: ctx

func (*ERC20) EXPECT

func (_m *ERC20) EXPECT() *ERC20_Expecter

func (*ERC20) Name

func (_m *ERC20) Name(ctx context.Context) string

Name provides a mock function with given fields: ctx

func (*ERC20) Symbol

func (_m *ERC20) Symbol(ctx context.Context) string

Symbol provides a mock function with given fields: ctx

func (*ERC20) TotalSupply

func (_m *ERC20) TotalSupply(ctx context.Context) big.Int

TotalSupply provides a mock function with given fields: ctx

func (*ERC20) TransferFrom

func (_m *ERC20) TransferFrom(ctx context.Context, idempotencyKey string, from common.Address, to common.Address, amount big.Int) error

TransferFrom provides a mock function with given fields: ctx, idempotencyKey, from, to, amount

type ERC20_Allowance_Call

type ERC20_Allowance_Call struct {
	*mock.Call
}

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

func (*ERC20_Allowance_Call) Return

func (*ERC20_Allowance_Call) Run

func (_c *ERC20_Allowance_Call) Run(run func(ctx context.Context, owner common.Address, spender common.Address)) *ERC20_Allowance_Call

func (*ERC20_Allowance_Call) RunAndReturn

type ERC20_Approve_Call

type ERC20_Approve_Call struct {
	*mock.Call
}

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

func (*ERC20_Approve_Call) Return

func (_c *ERC20_Approve_Call) Return(_a0 error) *ERC20_Approve_Call

func (*ERC20_Approve_Call) Run

func (_c *ERC20_Approve_Call) Run(run func(ctx context.Context, spender common.Address, amount big.Int)) *ERC20_Approve_Call

func (*ERC20_Approve_Call) RunAndReturn

type ERC20_BalanceOf_Call

type ERC20_BalanceOf_Call struct {
	*mock.Call
}

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

func (*ERC20_BalanceOf_Call) Return

func (*ERC20_BalanceOf_Call) Run

func (_c *ERC20_BalanceOf_Call) Run(run func(ctx context.Context, address common.Address)) *ERC20_BalanceOf_Call

func (*ERC20_BalanceOf_Call) RunAndReturn

type ERC20_Decimals_Call

type ERC20_Decimals_Call struct {
	*mock.Call
}

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

func (*ERC20_Decimals_Call) Return

func (*ERC20_Decimals_Call) Run

func (_c *ERC20_Decimals_Call) Run(run func(ctx context.Context)) *ERC20_Decimals_Call

func (*ERC20_Decimals_Call) RunAndReturn

func (_c *ERC20_Decimals_Call) RunAndReturn(run func(context.Context) uint8) *ERC20_Decimals_Call

type ERC20_Expecter

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

func (*ERC20_Expecter) Allowance

func (_e *ERC20_Expecter) Allowance(ctx interface{}, owner interface{}, spender interface{}) *ERC20_Allowance_Call

Allowance is a helper method to define mock.On call

  • ctx context.Context
  • owner common.Address
  • spender common.Address

func (*ERC20_Expecter) Approve

func (_e *ERC20_Expecter) Approve(ctx interface{}, spender interface{}, amount interface{}) *ERC20_Approve_Call

Approve is a helper method to define mock.On call

  • ctx context.Context
  • spender common.Address
  • amount big.Int

func (*ERC20_Expecter) BalanceOf

func (_e *ERC20_Expecter) BalanceOf(ctx interface{}, address interface{}) *ERC20_BalanceOf_Call

BalanceOf is a helper method to define mock.On call

  • ctx context.Context
  • address common.Address

func (*ERC20_Expecter) Decimals

func (_e *ERC20_Expecter) Decimals(ctx interface{}) *ERC20_Decimals_Call

Decimals is a helper method to define mock.On call

  • ctx context.Context

func (*ERC20_Expecter) Name

func (_e *ERC20_Expecter) Name(ctx interface{}) *ERC20_Name_Call

Name is a helper method to define mock.On call

  • ctx context.Context

func (*ERC20_Expecter) Symbol

func (_e *ERC20_Expecter) Symbol(ctx interface{}) *ERC20_Symbol_Call

Symbol is a helper method to define mock.On call

  • ctx context.Context

func (*ERC20_Expecter) TotalSupply

func (_e *ERC20_Expecter) TotalSupply(ctx interface{}) *ERC20_TotalSupply_Call

TotalSupply is a helper method to define mock.On call

  • ctx context.Context

func (*ERC20_Expecter) TransferFrom

func (_e *ERC20_Expecter) TransferFrom(ctx interface{}, idempotencyKey interface{}, from interface{}, to interface{}, amount interface{}) *ERC20_TransferFrom_Call

TransferFrom is a helper method to define mock.On call

  • ctx context.Context
  • idempotencyKey string
  • from common.Address
  • to common.Address
  • amount big.Int

type ERC20_Name_Call

type ERC20_Name_Call struct {
	*mock.Call
}

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

func (*ERC20_Name_Call) Return

func (_c *ERC20_Name_Call) Return(_a0 string) *ERC20_Name_Call

func (*ERC20_Name_Call) Run

func (_c *ERC20_Name_Call) Run(run func(ctx context.Context)) *ERC20_Name_Call

func (*ERC20_Name_Call) RunAndReturn

func (_c *ERC20_Name_Call) RunAndReturn(run func(context.Context) string) *ERC20_Name_Call

type ERC20_Symbol_Call

type ERC20_Symbol_Call struct {
	*mock.Call
}

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

func (*ERC20_Symbol_Call) Return

func (_c *ERC20_Symbol_Call) Return(_a0 string) *ERC20_Symbol_Call

func (*ERC20_Symbol_Call) Run

func (_c *ERC20_Symbol_Call) Run(run func(ctx context.Context)) *ERC20_Symbol_Call

func (*ERC20_Symbol_Call) RunAndReturn

func (_c *ERC20_Symbol_Call) RunAndReturn(run func(context.Context) string) *ERC20_Symbol_Call

type ERC20_TotalSupply_Call

type ERC20_TotalSupply_Call struct {
	*mock.Call
}

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

func (*ERC20_TotalSupply_Call) Return

func (*ERC20_TotalSupply_Call) Run

func (*ERC20_TotalSupply_Call) RunAndReturn

func (_c *ERC20_TotalSupply_Call) RunAndReturn(run func(context.Context) big.Int) *ERC20_TotalSupply_Call

type ERC20_TransferFrom_Call

type ERC20_TransferFrom_Call struct {
	*mock.Call
}

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

func (*ERC20_TransferFrom_Call) Return

func (*ERC20_TransferFrom_Call) Run

func (_c *ERC20_TransferFrom_Call) Run(run func(ctx context.Context, idempotencyKey string, from common.Address, to common.Address, amount big.Int)) *ERC20_TransferFrom_Call

func (*ERC20_TransferFrom_Call) RunAndReturn

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *Store

NewStore creates a new instance of Store. 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 (*Store) CompleteMempoolEntry

func (_m *Store) CompleteMempoolEntry(ctx context.Context, txHash []byte) error

CompleteMempoolEntry provides a mock function with given fields: ctx, txHash

func (*Store) EXPECT

func (_m *Store) EXPECT() *Store_Expecter

func (*Store) FailMempoolEntry

func (_m *Store) FailMempoolEntry(ctx context.Context, txHash []byte, errMsg string) error

FailMempoolEntry provides a mock function with given fields: ctx, txHash, errMsg

func (*Store) GetMempoolEntriesByStatus

func (_m *Store) GetMempoolEntriesByStatus(ctx context.Context, status ethrpc.MempoolStatus, limit int) ([]ethrpc.MempoolEntry, error)

GetMempoolEntriesByStatus provides a mock function with given fields: ctx, status, limit

type Store_CompleteMempoolEntry_Call

type Store_CompleteMempoolEntry_Call struct {
	*mock.Call
}

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

func (*Store_CompleteMempoolEntry_Call) Return

func (*Store_CompleteMempoolEntry_Call) Run

func (*Store_CompleteMempoolEntry_Call) RunAndReturn

type Store_Expecter

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

func (*Store_Expecter) CompleteMempoolEntry

func (_e *Store_Expecter) CompleteMempoolEntry(ctx interface{}, txHash interface{}) *Store_CompleteMempoolEntry_Call

CompleteMempoolEntry is a helper method to define mock.On call

  • ctx context.Context
  • txHash []byte

func (*Store_Expecter) FailMempoolEntry

func (_e *Store_Expecter) FailMempoolEntry(ctx interface{}, txHash interface{}, errMsg interface{}) *Store_FailMempoolEntry_Call

FailMempoolEntry is a helper method to define mock.On call

  • ctx context.Context
  • txHash []byte
  • errMsg string

func (*Store_Expecter) GetMempoolEntriesByStatus

func (_e *Store_Expecter) GetMempoolEntriesByStatus(ctx interface{}, status interface{}, limit interface{}) *Store_GetMempoolEntriesByStatus_Call

GetMempoolEntriesByStatus is a helper method to define mock.On call

  • ctx context.Context
  • status ethrpc.MempoolStatus
  • limit int

type Store_FailMempoolEntry_Call

type Store_FailMempoolEntry_Call struct {
	*mock.Call
}

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

func (*Store_FailMempoolEntry_Call) Return

func (*Store_FailMempoolEntry_Call) Run

func (_c *Store_FailMempoolEntry_Call) Run(run func(ctx context.Context, txHash []byte, errMsg string)) *Store_FailMempoolEntry_Call

func (*Store_FailMempoolEntry_Call) RunAndReturn

type Store_GetMempoolEntriesByStatus_Call

type Store_GetMempoolEntriesByStatus_Call struct {
	*mock.Call
}

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

func (*Store_GetMempoolEntriesByStatus_Call) Return

func (*Store_GetMempoolEntriesByStatus_Call) Run

func (*Store_GetMempoolEntriesByStatus_Call) RunAndReturn

type TokenService

type TokenService struct {
	mock.Mock
}

TokenService is an autogenerated mock type for the TokenService type

func NewTokenService

func NewTokenService(t interface {
	mock.TestingT
	Cleanup(func())
}) *TokenService

NewTokenService creates a new instance of TokenService. 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 (*TokenService) ERC20

func (_m *TokenService) ERC20(address common.Address) (token.ERC20, error)

ERC20 provides a mock function with given fields: address

func (*TokenService) EXPECT

func (_m *TokenService) EXPECT() *TokenService_Expecter

type TokenService_ERC20_Call

type TokenService_ERC20_Call struct {
	*mock.Call
}

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

func (*TokenService_ERC20_Call) Return

func (*TokenService_ERC20_Call) Run

func (_c *TokenService_ERC20_Call) Run(run func(address common.Address)) *TokenService_ERC20_Call

func (*TokenService_ERC20_Call) RunAndReturn

type TokenService_Expecter

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

func (*TokenService_Expecter) ERC20

func (_e *TokenService_Expecter) ERC20(address interface{}) *TokenService_ERC20_Call

ERC20 is a helper method to define mock.On call

  • address common.Address

Jump to

Keyboard shortcuts

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