mocks

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlock

func NewBlock(height uint64) *models.Block

func NewReceipt

func NewReceipt(height uint64, ID common.Hash) *models.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 *models.Receipt, batch *pebble.Batch) error

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

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) (*models.Block, error)

GetByHeight provides a mock function with given fields: height

func (*BlockIndexer) GetByID

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

GetByID provides a mock function with given fields: ID

func (*BlockIndexer) GetCadenceHeight

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

GetCadenceHeight provides a mock function with given fields: height

func (*BlockIndexer) GetCadenceID added in v0.16.0

func (_m *BlockIndexer) GetCadenceID(height uint64) (flow.Identifier, error)

GetCadenceID provides a mock function with given fields: height

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(cadenceHeight uint64, batch *pebble.Batch) error

SetLatestCadenceHeight provides a mock function with given fields: cadenceHeight, batch

func (*BlockIndexer) Store

func (_m *BlockIndexer) Store(cadenceHeight uint64, cadenceID flow.Identifier, block *models.Block, batch *pebble.Batch) error

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

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 uint64, end uint64) ([]*models.BloomsHeight, error)

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

func (*ReceiptIndexer) GetByBlockHeight

func (_m *ReceiptIndexer) GetByBlockHeight(height uint64) ([]*models.Receipt, error)

GetByBlockHeight provides a mock function with given fields: height

func (*ReceiptIndexer) GetByTransactionID

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

GetByTransactionID provides a mock function with given fields: ID

func (*ReceiptIndexer) Store

func (_m *ReceiptIndexer) Store(receipts []*models.Receipt, batch *pebble.Batch) error

Store provides a mock function with given fields: receipts, batch

type TraceIndexer added in v0.16.0

type TraceIndexer struct {
	mock.Mock
}

TraceIndexer is an autogenerated mock type for the TraceIndexer type

func NewTraceIndexer added in v0.16.0

func NewTraceIndexer(t interface {
	mock.TestingT
	Cleanup(func())
}) *TraceIndexer

NewTraceIndexer creates a new instance of TraceIndexer. 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 (*TraceIndexer) GetTransaction added in v0.16.0

func (_m *TraceIndexer) GetTransaction(ID common.Hash) (json.RawMessage, error)

GetTransaction provides a mock function with given fields: ID

func (*TraceIndexer) StoreTransaction added in v0.16.0

func (_m *TraceIndexer) StoreTransaction(ID common.Hash, trace json.RawMessage, batch *pebble.Batch) error

StoreTransaction provides a mock function with given fields: ID, trace, batch

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

func (_m *TransactionIndexer) Store(tx models.Transaction, batch *pebble.Batch) error

Store provides a mock function with given fields: tx, batch

Jump to

Keyboard shortcuts

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