mocks

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlock

func NewBlock(height uint64) *types.Block

func NewReceipt

func NewReceipt(height uint64, ID common.Hash) *gethTypes.Receipt

func NewTransaction

func NewTransaction(nonce uint64) models.Transaction

Types

type AccountIndexer

type AccountIndexer struct {
	mock.Mock
}

AccountIndexer is an autogenerated mock type for the AccountIndexer type

func NewAccountIndexer

func NewAccountIndexer(t interface {
	mock.TestingT
	Cleanup(func())
}) *AccountIndexer

NewAccountIndexer creates a new instance of AccountIndexer. 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 (*AccountIndexer) GetBalance

func (_m *AccountIndexer) GetBalance(address *common.Address) (*big.Int, error)

GetBalance provides a mock function with given fields: address

func (*AccountIndexer) GetNonce

func (_m *AccountIndexer) GetNonce(address *common.Address) (uint64, error)

GetNonce provides a mock function with given fields: address

func (*AccountIndexer) Update

func (_m *AccountIndexer) Update(tx models.Transaction, receipt *types.Receipt) error

Update provides a mock function with given fields: tx, receipt

type BlockIndexer

type BlockIndexer struct {
	mock.Mock
}

BlockIndexer is an autogenerated mock type for the BlockIndexer type

func NewBlockIndexer

func NewBlockIndexer(t interface {
	mock.TestingT
	Cleanup(func())
}) *BlockIndexer

NewBlockIndexer creates a new instance of BlockIndexer. 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 (*BlockIndexer) GetByHeight

func (_m *BlockIndexer) GetByHeight(height uint64) (*types.Block, error)

GetByHeight provides a mock function with given fields: height

func (*BlockIndexer) GetByID

func (_m *BlockIndexer) GetByID(ID common.Hash) (*types.Block, error)

GetByID provides a mock function with given fields: ID

func (*BlockIndexer) GetCadenceHeight

func (_m *BlockIndexer) GetCadenceHeight(evmHeight uint64) (uint64, error)

GetCadenceHeight provides a mock function with given fields: evmHeight

func (*BlockIndexer) GetHeightByID added in v0.7.0

func (_m *BlockIndexer) GetHeightByID(ID common.Hash) (uint64, error)

GetHeightByID provides a mock function with given fields: ID

func (*BlockIndexer) LatestCadenceHeight

func (_m *BlockIndexer) LatestCadenceHeight() (uint64, error)

LatestCadenceHeight provides a mock function with given fields:

func (*BlockIndexer) LatestEVMHeight

func (_m *BlockIndexer) LatestEVMHeight() (uint64, error)

LatestEVMHeight provides a mock function with given fields:

func (*BlockIndexer) SetLatestCadenceHeight added in v0.2.0

func (_m *BlockIndexer) SetLatestCadenceHeight(height uint64) error

SetLatestCadenceHeight provides a mock function with given fields: height

func (*BlockIndexer) Store

func (_m *BlockIndexer) Store(cadenceHeight uint64, block *types.Block) error

Store provides a mock function with given fields: cadenceHeight, block

type ReceiptIndexer

type ReceiptIndexer struct {
	mock.Mock
}

ReceiptIndexer is an autogenerated mock type for the ReceiptIndexer type

func NewReceiptIndexer

func NewReceiptIndexer(t interface {
	mock.TestingT
	Cleanup(func())
}) *ReceiptIndexer

NewReceiptIndexer creates a new instance of ReceiptIndexer. 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 (*ReceiptIndexer) BloomsForBlockRange

func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*types.Bloom, []*big.Int, error)

BloomsForBlockRange provides a mock function with given fields: start, end

func (*ReceiptIndexer) GetByBlockHeight

func (_m *ReceiptIndexer) GetByBlockHeight(height *big.Int) ([]*types.Receipt, error)

GetByBlockHeight provides a mock function with given fields: height

func (*ReceiptIndexer) GetByTransactionID

func (_m *ReceiptIndexer) GetByTransactionID(ID common.Hash) (*types.Receipt, error)

GetByTransactionID provides a mock function with given fields: ID

func (*ReceiptIndexer) Store

func (_m *ReceiptIndexer) Store(receipt *types.Receipt) error

Store provides a mock function with given fields: receipt

type TransactionIndexer

type TransactionIndexer struct {
	mock.Mock
}

TransactionIndexer is an autogenerated mock type for the TransactionIndexer type

func NewTransactionIndexer

func NewTransactionIndexer(t interface {
	mock.TestingT
	Cleanup(func())
}) *TransactionIndexer

NewTransactionIndexer creates a new instance of TransactionIndexer. 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 (*TransactionIndexer) Get

Get provides a mock function with given fields: ID

func (*TransactionIndexer) Store

Store provides a mock function with given fields: tx

Jump to

Keyboard shortcuts

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