mocks

package
v2.10.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 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 added in v2.3.0

func (_m *Config) FinalityDepth() uint32

FinalityDepth provides a mock function with given fields:

func (*Config) FinalityTagEnabled added in v2.4.0

func (_m *Config) FinalityTagEnabled() bool

FinalityTagEnabled provides a mock function with given fields:

func (*Config) NonceAutoSync added in v2.3.0

func (_m *Config) NonceAutoSync() bool

NonceAutoSync provides a mock function with given fields:

func (*Config) RPCDefaultBatchSize added in v2.3.0

func (_m *Config) RPCDefaultBatchSize() uint32

RPCDefaultBatchSize provides a mock function with given fields:

type EvmTxStore added in v2.3.0

type EvmTxStore struct {
	mock.Mock
}

EvmTxStore is an autogenerated mock type for the EvmTxStore type

func NewEvmTxStore added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

func (_m *EvmTxStore) Close()

Close provides a mock function with given fields:

func (*EvmTxStore) CountTransactionsByState added in v2.8.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.8.0

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 added in v2.8.0

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 added in v2.7.0

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 added in v2.3.0

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

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

func (*EvmTxStore) FindTransactionsConfirmedInBlockRange added in v2.3.0

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 added in v2.3.0

FindTxAttempt provides a mock function with given fields: hash

func (*EvmTxStore) FindTxAttemptConfirmedByTxIDs added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

FindTxByHash provides a mock function with given fields: hash

func (*EvmTxStore) FindTxWithAttempts added in v2.6.0

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 added in v2.6.0

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 added in v2.3.0

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 added in v2.8.0

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 added in v2.8.0

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 added in v2.8.0

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 added in v2.8.0

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 added in v2.8.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.8.0

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 added in v2.8.0

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

func (*EvmTxStore) GetTxInProgress added in v2.3.0

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 added in v2.3.0

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 added in v2.8.0

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 added in v2.3.0

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

func (*EvmTxStore) MarkAllConfirmedMissingReceipt added in v2.3.0

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

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

func (*EvmTxStore) MarkOldTxesMissingReceiptAsErrored added in v2.3.0

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 added in v2.3.0

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

func (*EvmTxStore) PruneUnstartedTxQueue added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.8.0

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 added in v2.3.0

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 added in v2.3.0

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

func (*EvmTxStore) UpdateTxUnstartedToInProgress added in v2.3.0

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

func (*EvmTxStore) UpdateTxsUnconfirmed added in v2.3.0

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

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

type MockEvmTxManager added in v2.1.0

func NewMockEvmTxManager added in v2.1.0

func NewMockEvmTxManager(t *testing.T) *MockEvmTxManager

Jump to

Keyboard shortcuts

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