mocks

package
v0.0.0-...-3674750 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	mock.Mock
}

Config is an autogenerated mock type for the ChainConfig type

func NewConfig

func NewConfig(t interface {
	mock.TestingT
	Cleanup(func())
}) *Config

NewConfig creates a new instance of Config. 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 (*Config) ChainType

func (_m *Config) ChainType() config.ChainType

ChainType provides a mock function with given fields:

func (*Config) FinalityDepth

func (_m *Config) FinalityDepth() uint32

FinalityDepth provides a mock function with given fields:

func (*Config) FinalityTagEnabled

func (_m *Config) FinalityTagEnabled() bool

FinalityTagEnabled provides a mock function with given fields:

func (*Config) NonceAutoSync

func (_m *Config) NonceAutoSync() bool

NonceAutoSync provides a mock function with given fields:

func (*Config) RPCDefaultBatchSize

func (_m *Config) RPCDefaultBatchSize() uint32

RPCDefaultBatchSize provides a mock function with given fields:

type EvmTxStore

type EvmTxStore struct {
	mock.Mock
}

EvmTxStore is an autogenerated mock type for the EvmTxStore type

func NewEvmTxStore

func NewEvmTxStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *EvmTxStore

NewEvmTxStore creates a new instance of EvmTxStore. 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 (*EvmTxStore) Abandon

func (_m *EvmTxStore) Abandon(ctx context.Context, id *big.Int, addr common.Address) error

Abandon provides a mock function with given fields: ctx, id, addr

func (*EvmTxStore) CheckTxQueueCapacity

func (_m *EvmTxStore) CheckTxQueueCapacity(ctx context.Context, fromAddress common.Address, maxQueuedTransactions uint64, chainID *big.Int) error

CheckTxQueueCapacity provides a mock function with given fields: ctx, fromAddress, maxQueuedTransactions, chainID

func (*EvmTxStore) Close

func (_m *EvmTxStore) Close()

Close provides a mock function with given fields:

func (*EvmTxStore) CountTransactionsByState

func (_m *EvmTxStore) CountTransactionsByState(ctx context.Context, state types.TxState, chainID *big.Int) (uint32, error)

CountTransactionsByState provides a mock function with given fields: ctx, state, chainID

func (*EvmTxStore) CountUnconfirmedTransactions

func (_m *EvmTxStore) CountUnconfirmedTransactions(ctx context.Context, fromAddress common.Address, chainID *big.Int) (uint32, error)

CountUnconfirmedTransactions provides a mock function with given fields: ctx, fromAddress, chainID

func (*EvmTxStore) CountUnstartedTransactions

func (_m *EvmTxStore) CountUnstartedTransactions(ctx context.Context, fromAddress common.Address, chainID *big.Int) (uint32, error)

CountUnstartedTransactions provides a mock function with given fields: ctx, fromAddress, chainID

func (*EvmTxStore) CreateTransaction

func (_m *EvmTxStore) CreateTransaction(ctx context.Context, txRequest types.TxRequest[common.Address, common.Hash], chainID *big.Int) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

CreateTransaction provides a mock function with given fields: ctx, txRequest, chainID

func (*EvmTxStore) DeleteInProgressAttempt

func (_m *EvmTxStore) DeleteInProgressAttempt(ctx context.Context, attempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error

DeleteInProgressAttempt provides a mock function with given fields: ctx, attempt

func (*EvmTxStore) FindEarliestUnconfirmedBroadcastTime

func (_m *EvmTxStore) FindEarliestUnconfirmedBroadcastTime(ctx context.Context, chainID *big.Int) (null.Time, error)

FindEarliestUnconfirmedBroadcastTime provides a mock function with given fields: ctx, chainID

func (*EvmTxStore) FindEarliestUnconfirmedTxAttemptBlock

func (_m *EvmTxStore) FindEarliestUnconfirmedTxAttemptBlock(ctx context.Context, chainID *big.Int) (null.Int, error)

FindEarliestUnconfirmedTxAttemptBlock provides a mock function with given fields: ctx, chainID

func (*EvmTxStore) FindLatestSequence

func (_m *EvmTxStore) FindLatestSequence(ctx context.Context, fromAddress common.Address, chainId *big.Int) (evmtypes.Nonce, error)

FindLatestSequence provides a mock function with given fields: ctx, fromAddress, chainId

func (*EvmTxStore) FindNextUnstartedTransactionFromAddress

func (_m *EvmTxStore) FindNextUnstartedTransactionFromAddress(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], fromAddress common.Address, chainID *big.Int) error

FindNextUnstartedTransactionFromAddress provides a mock function with given fields: ctx, etx, fromAddress, chainID

func (*EvmTxStore) FindTransactionsConfirmedInBlockRange

func (_m *EvmTxStore) FindTransactionsConfirmedInBlockRange(ctx context.Context, highBlockNumber int64, lowBlockNumber int64, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTransactionsConfirmedInBlockRange provides a mock function with given fields: ctx, highBlockNumber, lowBlockNumber, chainID

func (*EvmTxStore) FindTxAttempt

FindTxAttempt provides a mock function with given fields: hash

func (*EvmTxStore) FindTxAttemptConfirmedByTxIDs

func (_m *EvmTxStore) FindTxAttemptConfirmedByTxIDs(ids []int64) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxAttemptConfirmedByTxIDs provides a mock function with given fields: ids

func (*EvmTxStore) FindTxAttemptsConfirmedMissingReceipt

func (_m *EvmTxStore) FindTxAttemptsConfirmedMissingReceipt(ctx context.Context, chainID *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxAttemptsConfirmedMissingReceipt provides a mock function with given fields: ctx, chainID

func (*EvmTxStore) FindTxAttemptsRequiringReceiptFetch

func (_m *EvmTxStore) FindTxAttemptsRequiringReceiptFetch(ctx context.Context, chainID *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxAttemptsRequiringReceiptFetch provides a mock function with given fields: ctx, chainID

func (*EvmTxStore) FindTxAttemptsRequiringResend

func (_m *EvmTxStore) FindTxAttemptsRequiringResend(ctx context.Context, olderThan time.Time, maxInFlightTransactions uint32, chainID *big.Int, address common.Address) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxAttemptsRequiringResend provides a mock function with given fields: ctx, olderThan, maxInFlightTransactions, chainID, address

func (*EvmTxStore) FindTxByHash

FindTxByHash provides a mock function with given fields: hash

func (*EvmTxStore) FindTxWithAttempts

func (_m *EvmTxStore) FindTxWithAttempts(etxID int64) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxWithAttempts provides a mock function with given fields: etxID

func (*EvmTxStore) FindTxWithIdempotencyKey

func (_m *EvmTxStore) FindTxWithIdempotencyKey(ctx context.Context, idempotencyKey string, chainID *big.Int) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxWithIdempotencyKey provides a mock function with given fields: ctx, idempotencyKey, chainID

func (*EvmTxStore) FindTxWithSequence

func (_m *EvmTxStore) FindTxWithSequence(ctx context.Context, fromAddress common.Address, seq evmtypes.Nonce) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxWithSequence provides a mock function with given fields: ctx, fromAddress, seq

func (*EvmTxStore) FindTxesByMetaFieldAndStates

func (_m *EvmTxStore) FindTxesByMetaFieldAndStates(ctx context.Context, metaField string, metaValue string, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxesByMetaFieldAndStates provides a mock function with given fields: ctx, metaField, metaValue, states, chainID

func (*EvmTxStore) FindTxesPendingCallback

func (_m *EvmTxStore) FindTxesPendingCallback(ctx context.Context, blockNum int64, chainID *big.Int) ([]types.ReceiptPlus[*evmtypes.Receipt], error)

FindTxesPendingCallback provides a mock function with given fields: ctx, blockNum, chainID

func (*EvmTxStore) FindTxesWithAttemptsAndReceiptsByIdsAndState

func (_m *EvmTxStore) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx context.Context, ids []big.Int, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxesWithAttemptsAndReceiptsByIdsAndState provides a mock function with given fields: ctx, ids, states, chainID

func (*EvmTxStore) FindTxesWithMetaFieldByReceiptBlockNum

func (_m *EvmTxStore) FindTxesWithMetaFieldByReceiptBlockNum(ctx context.Context, metaField string, blockNum int64, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxesWithMetaFieldByReceiptBlockNum provides a mock function with given fields: ctx, metaField, blockNum, chainID

func (*EvmTxStore) FindTxesWithMetaFieldByStates

func (_m *EvmTxStore) FindTxesWithMetaFieldByStates(ctx context.Context, metaField string, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxesWithMetaFieldByStates provides a mock function with given fields: ctx, metaField, states, chainID

func (*EvmTxStore) FindTxsRequiringGasBump

func (_m *EvmTxStore) FindTxsRequiringGasBump(ctx context.Context, address common.Address, blockNum int64, gasBumpThreshold int64, depth int64, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxsRequiringGasBump provides a mock function with given fields: ctx, address, blockNum, gasBumpThreshold, depth, chainID

func (*EvmTxStore) FindTxsRequiringResubmissionDueToInsufficientFunds

func (_m *EvmTxStore) FindTxsRequiringResubmissionDueToInsufficientFunds(ctx context.Context, address common.Address, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

FindTxsRequiringResubmissionDueToInsufficientFunds provides a mock function with given fields: ctx, address, chainID

func (*EvmTxStore) GetInProgressTxAttempts

func (_m *EvmTxStore) GetInProgressTxAttempts(ctx context.Context, address common.Address, chainID *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

GetInProgressTxAttempts provides a mock function with given fields: ctx, address, chainID

func (*EvmTxStore) GetNonFatalTransactions

func (_m *EvmTxStore) GetNonFatalTransactions(ctx context.Context, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

GetNonFatalTransactions provides a mock function with given fields: ctx, chainID

func (*EvmTxStore) GetTxByID

GetTxByID provides a mock function with given fields: ctx, id

func (*EvmTxStore) GetTxInProgress

func (_m *EvmTxStore) GetTxInProgress(ctx context.Context, fromAddress common.Address) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)

GetTxInProgress provides a mock function with given fields: ctx, fromAddress

func (*EvmTxStore) HasInProgressTransaction

func (_m *EvmTxStore) HasInProgressTransaction(ctx context.Context, account common.Address, chainID *big.Int) (bool, error)

HasInProgressTransaction provides a mock function with given fields: ctx, account, chainID

func (*EvmTxStore) IsTxFinalized

func (_m *EvmTxStore) IsTxFinalized(ctx context.Context, blockHeight int64, txID int64, chainID *big.Int) (bool, error)

IsTxFinalized provides a mock function with given fields: ctx, blockHeight, txID, chainID

func (*EvmTxStore) LoadTxAttempts

LoadTxAttempts provides a mock function with given fields: ctx, etx

func (*EvmTxStore) MarkAllConfirmedMissingReceipt

func (_m *EvmTxStore) MarkAllConfirmedMissingReceipt(ctx context.Context, chainID *big.Int) error

MarkAllConfirmedMissingReceipt provides a mock function with given fields: ctx, chainID

func (*EvmTxStore) MarkOldTxesMissingReceiptAsErrored

func (_m *EvmTxStore) MarkOldTxesMissingReceiptAsErrored(ctx context.Context, blockNum int64, finalityDepth uint32, chainID *big.Int) error

MarkOldTxesMissingReceiptAsErrored provides a mock function with given fields: ctx, blockNum, finalityDepth, chainID

func (*EvmTxStore) PreloadTxes

PreloadTxes provides a mock function with given fields: ctx, attempts

func (*EvmTxStore) PruneUnstartedTxQueue

func (_m *EvmTxStore) PruneUnstartedTxQueue(ctx context.Context, queueSize uint32, subject uuid.UUID) (int64, error)

PruneUnstartedTxQueue provides a mock function with given fields: ctx, queueSize, subject

func (*EvmTxStore) ReapTxHistory

func (_m *EvmTxStore) ReapTxHistory(ctx context.Context, minBlockNumberToKeep int64, timeThreshold time.Time, chainID *big.Int) error

ReapTxHistory provides a mock function with given fields: ctx, minBlockNumberToKeep, timeThreshold, chainID

func (*EvmTxStore) SaveConfirmedMissingReceiptAttempt

func (_m *EvmTxStore) SaveConfirmedMissingReceiptAttempt(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time) error

SaveConfirmedMissingReceiptAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt

func (*EvmTxStore) SaveFetchedReceipts

func (_m *EvmTxStore) SaveFetchedReceipts(ctx context.Context, receipts []*evmtypes.Receipt, chainID *big.Int) error

SaveFetchedReceipts provides a mock function with given fields: ctx, receipts, chainID

func (*EvmTxStore) SaveInProgressAttempt

func (_m *EvmTxStore) SaveInProgressAttempt(ctx context.Context, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error

SaveInProgressAttempt provides a mock function with given fields: ctx, attempt

func (*EvmTxStore) SaveInsufficientFundsAttempt

func (_m *EvmTxStore) SaveInsufficientFundsAttempt(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time) error

SaveInsufficientFundsAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt

func (*EvmTxStore) SaveReplacementInProgressAttempt

func (_m *EvmTxStore) SaveReplacementInProgressAttempt(ctx context.Context, oldAttempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], replacementAttempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error

SaveReplacementInProgressAttempt provides a mock function with given fields: ctx, oldAttempt, replacementAttempt

func (*EvmTxStore) SaveSentAttempt

func (_m *EvmTxStore) SaveSentAttempt(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time) error

SaveSentAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt

func (*EvmTxStore) SetBroadcastBeforeBlockNum

func (_m *EvmTxStore) SetBroadcastBeforeBlockNum(ctx context.Context, blockNum int64, chainID *big.Int) error

SetBroadcastBeforeBlockNum provides a mock function with given fields: ctx, blockNum, chainID

func (*EvmTxStore) Transactions

func (_m *EvmTxStore) Transactions(offset int, limit int) ([]types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error)

Transactions provides a mock function with given fields: offset, limit

func (*EvmTxStore) TransactionsWithAttempts

func (_m *EvmTxStore) TransactionsWithAttempts(offset int, limit int) ([]types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error)

TransactionsWithAttempts provides a mock function with given fields: offset, limit

func (*EvmTxStore) TxAttempts

func (_m *EvmTxStore) TxAttempts(offset int, limit int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error)

TxAttempts provides a mock function with given fields: offset, limit

func (*EvmTxStore) UpdateBroadcastAts

func (_m *EvmTxStore) UpdateBroadcastAts(ctx context.Context, now time.Time, etxIDs []int64) error

UpdateBroadcastAts provides a mock function with given fields: ctx, now, etxIDs

func (*EvmTxStore) UpdateTxAttemptInProgressToBroadcast

func (_m *EvmTxStore) UpdateTxAttemptInProgressToBroadcast(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], attempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], NewAttemptState types.TxAttemptState) error

UpdateTxAttemptInProgressToBroadcast provides a mock function with given fields: ctx, etx, attempt, NewAttemptState

func (*EvmTxStore) UpdateTxCallbackCompleted

func (_m *EvmTxStore) UpdateTxCallbackCompleted(ctx context.Context, pipelineTaskRunRid uuid.UUID, chainId *big.Int) error

UpdateTxCallbackCompleted provides a mock function with given fields: ctx, pipelineTaskRunRid, chainId

func (*EvmTxStore) UpdateTxFatalError

func (_m *EvmTxStore) UpdateTxFatalError(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error

UpdateTxFatalError provides a mock function with given fields: ctx, etx

func (*EvmTxStore) UpdateTxForRebroadcast

UpdateTxForRebroadcast provides a mock function with given fields: ctx, etx, etxAttempt

func (*EvmTxStore) UpdateTxUnstartedToInProgress

UpdateTxUnstartedToInProgress provides a mock function with given fields: ctx, etx, attempt

func (*EvmTxStore) UpdateTxsUnconfirmed

func (_m *EvmTxStore) UpdateTxsUnconfirmed(ctx context.Context, ids []int64) error

UpdateTxsUnconfirmed provides a mock function with given fields: ctx, ids

Jump to

Keyboard shortcuts

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