mocks

package
v0.0.2-RC3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbTxMock

type DbTxMock struct {
	mock.Mock
}

DbTxMock is an autogenerated mock type for the Tx type

func NewDbTxMock

func NewDbTxMock(t mockConstructorTestingTNewDbTxMock) *DbTxMock

NewDbTxMock creates a new instance of DbTxMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DbTxMock) Begin

func (_m *DbTxMock) Begin(ctx context.Context) (pgx.Tx, error)

Begin provides a mock function with given fields: ctx

func (*DbTxMock) BeginFunc

func (_m *DbTxMock) BeginFunc(ctx context.Context, f func(pgx.Tx) error) error

BeginFunc provides a mock function with given fields: ctx, f

func (*DbTxMock) Commit

func (_m *DbTxMock) Commit(ctx context.Context) error

Commit provides a mock function with given fields: ctx

func (*DbTxMock) Conn

func (_m *DbTxMock) Conn() *pgx.Conn

Conn provides a mock function with given fields:

func (*DbTxMock) CopyFrom

func (_m *DbTxMock) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)

CopyFrom provides a mock function with given fields: ctx, tableName, columnNames, rowSrc

func (*DbTxMock) Exec

func (_m *DbTxMock) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)

Exec provides a mock function with given fields: ctx, sql, arguments

func (*DbTxMock) LargeObjects

func (_m *DbTxMock) LargeObjects() pgx.LargeObjects

LargeObjects provides a mock function with given fields:

func (*DbTxMock) Prepare

func (_m *DbTxMock) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)

Prepare provides a mock function with given fields: ctx, name, sql

func (*DbTxMock) Query

func (_m *DbTxMock) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)

Query provides a mock function with given fields: ctx, sql, args

func (*DbTxMock) QueryFunc

func (_m *DbTxMock) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, f func(pgx.QueryFuncRow) error) (pgconn.CommandTag, error)

QueryFunc provides a mock function with given fields: ctx, sql, args, scans, f

func (*DbTxMock) QueryRow

func (_m *DbTxMock) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row

QueryRow provides a mock function with given fields: ctx, sql, args

func (*DbTxMock) Rollback

func (_m *DbTxMock) Rollback(ctx context.Context) error

Rollback provides a mock function with given fields: ctx

func (*DbTxMock) SendBatch

func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults

SendBatch provides a mock function with given fields: ctx, b

type EthTxManager

type EthTxManager struct {
	mock.Mock
}

EthTxManager is an autogenerated mock type for the ethTxManager type

func NewEthTxManager

func NewEthTxManager(t mockConstructorTestingTNewEthTxManager) *EthTxManager

NewEthTxManager creates a new instance of EthTxManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EthTxManager) Add

func (_m *EthTxManager) Add(ctx context.Context, owner string, id string, from common.Address, to *common.Address, value *big.Int, data []byte, dbTx pgx.Tx) error

Add provides a mock function with given fields: ctx, owner, id, from, to, value, data, dbTx

func (*EthTxManager) ProcessPendingMonitoredTxs

func (_m *EthTxManager) ProcessPendingMonitoredTxs(ctx context.Context, owner string, failedResultHandler ethtxmanager.ResultHandler, dbTx pgx.Tx)

ProcessPendingMonitoredTxs provides a mock function with given fields: ctx, owner, failedResultHandler, dbTx

func (*EthTxManager) Result

func (_m *EthTxManager) Result(ctx context.Context, owner string, id string, dbTx pgx.Tx) (ethtxmanager.MonitoredTxResult, error)

Result provides a mock function with given fields: ctx, owner, id, dbTx

func (*EthTxManager) ResultsByStatus

func (_m *EthTxManager) ResultsByStatus(ctx context.Context, owner string, statuses []ethtxmanager.MonitoredTxStatus, dbTx pgx.Tx) ([]ethtxmanager.MonitoredTxResult, error)

ResultsByStatus provides a mock function with given fields: ctx, owner, statuses, dbTx

type EthermanMock

type EthermanMock struct {
	mock.Mock
}

EthermanMock is an autogenerated mock type for the etherman type

func NewEthermanMock

func NewEthermanMock(t mockConstructorTestingTNewEthermanMock) *EthermanMock

NewEthermanMock creates a new instance of EthermanMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EthermanMock) BuildSequenceBatchesTxData

func (_m *EthermanMock) BuildSequenceBatchesTxData(sender common.Address, sequences []types.Sequence) (*common.Address, []byte, error)

BuildSequenceBatchesTxData provides a mock function with given fields: sender, sequences

func (*EthermanMock) EstimateGasSequenceBatches

func (_m *EthermanMock) EstimateGasSequenceBatches(sender common.Address, sequences []types.Sequence) (*coretypes.Transaction, error)

EstimateGasSequenceBatches provides a mock function with given fields: sender, sequences

func (*EthermanMock) GetLastBatchTimestamp

func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error)

GetLastBatchTimestamp provides a mock function with given fields:

func (*EthermanMock) GetLatestBatchNumber

func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error)

GetLatestBatchNumber provides a mock function with given fields:

func (*EthermanMock) GetLatestBlockNumber

func (_m *EthermanMock) GetLatestBlockNumber(ctx context.Context) (uint64, error)

GetLatestBlockNumber provides a mock function with given fields: ctx

func (*EthermanMock) GetLatestBlockTimestamp

func (_m *EthermanMock) GetLatestBlockTimestamp(ctx context.Context) (uint64, error)

GetLatestBlockTimestamp provides a mock function with given fields: ctx

func (*EthermanMock) GetSendSequenceFee

func (_m *EthermanMock) GetSendSequenceFee(numBatches uint64) (*big.Int, error)

GetSendSequenceFee provides a mock function with given fields: numBatches

func (*EthermanMock) TrustedSequencer

func (_m *EthermanMock) TrustedSequencer() (common.Address, error)

TrustedSequencer provides a mock function with given fields:

type PoolMock

type PoolMock struct {
	mock.Mock
}

PoolMock is an autogenerated mock type for the txPool type

func NewPoolMock

func NewPoolMock(t mockConstructorTestingTNewPoolMock) *PoolMock

NewPoolMock creates a new instance of PoolMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PoolMock) DeleteTxsByHashes

func (_m *PoolMock) DeleteTxsByHashes(ctx context.Context, hashes []common.Hash) error

DeleteTxsByHashes provides a mock function with given fields: ctx, hashes

func (*PoolMock) GetGasPrice

func (_m *PoolMock) GetGasPrice(ctx context.Context) (uint64, error)

GetGasPrice provides a mock function with given fields: ctx

func (*PoolMock) GetPendingTxs

func (_m *PoolMock) GetPendingTxs(ctx context.Context, isClaims bool, limit uint64) ([]pool.Transaction, error)

GetPendingTxs provides a mock function with given fields: ctx, isClaims, limit

func (*PoolMock) GetTxFromAddressFromByHash

func (_m *PoolMock) GetTxFromAddressFromByHash(ctx context.Context, hash common.Hash) (common.Address, uint64, error)

GetTxFromAddressFromByHash provides a mock function with given fields: ctx, hash

func (*PoolMock) GetTxs

func (_m *PoolMock) GetTxs(ctx context.Context, filterStatus pool.TxStatus, isClaims bool, minGasPrice uint64, limit uint64) ([]*pool.Transaction, error)

GetTxs provides a mock function with given fields: ctx, filterStatus, isClaims, minGasPrice, limit

func (*PoolMock) IncrementFailedCounter

func (_m *PoolMock) IncrementFailedCounter(ctx context.Context, hashes []string) error

IncrementFailedCounter provides a mock function with given fields: ctx, hashes

func (*PoolMock) IsTxPending

func (_m *PoolMock) IsTxPending(ctx context.Context, hash common.Hash) (bool, error)

IsTxPending provides a mock function with given fields: ctx, hash

func (*PoolMock) MarkReorgedTxsAsPending

func (_m *PoolMock) MarkReorgedTxsAsPending(ctx context.Context) error

MarkReorgedTxsAsPending provides a mock function with given fields: ctx

func (*PoolMock) UpdateTxStatus

func (_m *PoolMock) UpdateTxStatus(ctx context.Context, hash common.Hash, newStatus pool.TxStatus) error

UpdateTxStatus provides a mock function with given fields: ctx, hash, newStatus

func (*PoolMock) UpdateTxsStatus

func (_m *PoolMock) UpdateTxsStatus(ctx context.Context, hashes []string, newStatus pool.TxStatus) error

UpdateTxsStatus provides a mock function with given fields: ctx, hashes, newStatus

type StateMock

type StateMock struct {
	mock.Mock
}

StateMock is an autogenerated mock type for the stateInterface type

func NewStateMock

func NewStateMock(t mockConstructorTestingTNewStateMock) *StateMock

NewStateMock creates a new instance of StateMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*StateMock) BeginStateTransaction

func (_m *StateMock) BeginStateTransaction(ctx context.Context) (pgx.Tx, error)

BeginStateTransaction provides a mock function with given fields: ctx

func (*StateMock) CloseBatch

func (_m *StateMock) CloseBatch(ctx context.Context, receipt state.ProcessingReceipt, dbTx pgx.Tx) error

CloseBatch provides a mock function with given fields: ctx, receipt, dbTx

func (*StateMock) GetBatchByNumber

func (_m *StateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)

GetBatchByNumber provides a mock function with given fields: ctx, batchNumber, dbTx

func (*StateMock) GetBlockNumAndMainnetExitRootByGER

func (_m *StateMock) GetBlockNumAndMainnetExitRootByGER(ctx context.Context, ger common.Hash, dbTx pgx.Tx) (uint64, common.Hash, error)

GetBlockNumAndMainnetExitRootByGER provides a mock function with given fields: ctx, ger, dbTx

func (*StateMock) GetLastBatch

func (_m *StateMock) GetLastBatch(ctx context.Context, dbTx pgx.Tx) (*state.Batch, error)

GetLastBatch provides a mock function with given fields: ctx, dbTx

func (*StateMock) GetLastBatchNumber

func (_m *StateMock) GetLastBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)

GetLastBatchNumber provides a mock function with given fields: ctx, dbTx

func (*StateMock) GetLastL2BlockNumber

func (_m *StateMock) GetLastL2BlockNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)

GetLastL2BlockNumber provides a mock function with given fields: ctx, dbTx

func (*StateMock) GetLastVirtualBatchNum

func (_m *StateMock) GetLastVirtualBatchNum(ctx context.Context, dbTx pgx.Tx) (uint64, error)

GetLastVirtualBatchNum provides a mock function with given fields: ctx, dbTx

func (*StateMock) GetLatestGlobalExitRoot

func (_m *StateMock) GetLatestGlobalExitRoot(ctx context.Context, maxBlockNumber uint64, dbTx pgx.Tx) (state.GlobalExitRoot, time.Time, error)

GetLatestGlobalExitRoot provides a mock function with given fields: ctx, maxBlockNumber, dbTx

func (*StateMock) GetNonce

func (_m *StateMock) GetNonce(ctx context.Context, address common.Address, blockNumber uint64, dbTx pgx.Tx) (uint64, error)

GetNonce provides a mock function with given fields: ctx, address, blockNumber, dbTx

func (*StateMock) GetStateRootByBatchNumber

func (_m *StateMock) GetStateRootByBatchNumber(ctx context.Context, batchNum uint64, dbTx pgx.Tx) (common.Hash, error)

GetStateRootByBatchNumber provides a mock function with given fields: ctx, batchNum, dbTx

func (*StateMock) GetTimeForLatestBatchVirtualization

func (_m *StateMock) GetTimeForLatestBatchVirtualization(ctx context.Context, dbTx pgx.Tx) (time.Time, error)

GetTimeForLatestBatchVirtualization provides a mock function with given fields: ctx, dbTx

func (*StateMock) GetTransactionsByBatchNumber

func (_m *StateMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]types.Transaction, error)

GetTransactionsByBatchNumber provides a mock function with given fields: ctx, batchNumber, dbTx

func (*StateMock) GetTxsOlderThanNL1Blocks

func (_m *StateMock) GetTxsOlderThanNL1Blocks(ctx context.Context, nL1Blocks uint64, dbTx pgx.Tx) ([]common.Hash, error)

GetTxsOlderThanNL1Blocks provides a mock function with given fields: ctx, nL1Blocks, dbTx

func (*StateMock) IsBatchClosed

func (_m *StateMock) IsBatchClosed(ctx context.Context, batchNum uint64, dbTx pgx.Tx) (bool, error)

IsBatchClosed provides a mock function with given fields: ctx, batchNum, dbTx

func (*StateMock) IsBatchVirtualized

func (_m *StateMock) IsBatchVirtualized(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (bool, error)

IsBatchVirtualized provides a mock function with given fields: ctx, batchNumber, dbTx

func (*StateMock) OpenBatch

func (_m *StateMock) OpenBatch(ctx context.Context, processingContext state.ProcessingContext, dbTx pgx.Tx) error

OpenBatch provides a mock function with given fields: ctx, processingContext, dbTx

func (*StateMock) ProcessSequencerBatch

func (_m *StateMock) ProcessSequencerBatch(ctx context.Context, batchNumber uint64, txs []types.Transaction, dbTx pgx.Tx, caller state.CallerLabel) (*state.ProcessBatchResponse, error)

ProcessSequencerBatch provides a mock function with given fields: ctx, batchNumber, txs, dbTx, caller

func (*StateMock) StoreTransactions

func (_m *StateMock) StoreTransactions(ctx context.Context, batchNum uint64, processedTxs []*state.ProcessTransactionResponse, dbTx pgx.Tx) error

StoreTransactions provides a mock function with given fields: ctx, batchNum, processedTxs, dbTx

func (*StateMock) UpdateGERInOpenBatch

func (_m *StateMock) UpdateGERInOpenBatch(ctx context.Context, ger common.Hash, dbTx pgx.Tx) error

UpdateGERInOpenBatch provides a mock function with given fields: ctx, ger, dbTx

Jump to

Keyboard shortcuts

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