Documentation ¶
Index ¶
- type DbTxMock
- func (_m *DbTxMock) Begin(ctx context.Context) (pgx.Tx, error)
- func (_m *DbTxMock) BeginFunc(ctx context.Context, f func(pgx.Tx) error) error
- func (_m *DbTxMock) Commit(ctx context.Context) error
- func (_m *DbTxMock) Conn() *pgx.Conn
- func (_m *DbTxMock) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (_m *DbTxMock) Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
- func (_m *DbTxMock) LargeObjects() pgx.LargeObjects
- func (_m *DbTxMock) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
- func (_m *DbTxMock) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
- func (_m *DbTxMock) QueryFunc(ctx context.Context, sql string, args []interface{}, scans []interface{}, ...) (pgconn.CommandTag, error)
- func (_m *DbTxMock) QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
- func (_m *DbTxMock) Rollback(ctx context.Context) error
- func (_m *DbTxMock) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
- type EthermanMock
- func (_m *EthermanMock) EstimateGasSequenceBatches(sequences []types.Sequence) (*coretypes.Transaction, error)
- func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error)
- func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error)
- func (_m *EthermanMock) GetLatestBlockNumber(ctx context.Context) (uint64, error)
- func (_m *EthermanMock) GetLatestBlockTimestamp(ctx context.Context) (uint64, error)
- func (_m *EthermanMock) GetSendSequenceFee() (*big.Int, error)
- func (_m *EthermanMock) TrustedSequencer() (common.Address, error)
- type GasPriceEstimatorMock
- type PoolMock
- func (_m *PoolMock) DeleteTxsByHashes(ctx context.Context, hashes []common.Hash) error
- func (_m *PoolMock) GetPendingTxs(ctx context.Context, isClaims bool, limit uint64) ([]pool.Transaction, error)
- func (_m *PoolMock) GetTxFromAddressFromByHash(ctx context.Context, hash common.Hash) (common.Address, uint64, error)
- func (_m *PoolMock) GetTxs(ctx context.Context, filterStatus pool.TxStatus, isClaims bool, ...) ([]*pool.Transaction, error)
- func (_m *PoolMock) IncrementFailedCounter(ctx context.Context, hashes []string) error
- func (_m *PoolMock) IsTxPending(ctx context.Context, hash common.Hash) (bool, error)
- func (_m *PoolMock) MarkReorgedTxsAsPending(ctx context.Context) error
- func (_m *PoolMock) UpdateTxStatus(ctx context.Context, hash common.Hash, newStatus pool.TxStatus) error
- func (_m *PoolMock) UpdateTxsStatus(ctx context.Context, hashes []string, newStatus pool.TxStatus) error
- type StateMock
- func (_m *StateMock) BeginStateTransaction(ctx context.Context) (pgx.Tx, error)
- func (_m *StateMock) CloseBatch(ctx context.Context, receipt state.ProcessingReceipt, dbTx pgx.Tx) error
- func (_m *StateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *StateMock) GetBlockNumAndMainnetExitRootByGER(ctx context.Context, ger common.Hash, dbTx pgx.Tx) (uint64, common.Hash, error)
- func (_m *StateMock) GetLastBatch(ctx context.Context, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *StateMock) GetLastBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastL2BlockNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastVirtualBatchNum(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLatestGlobalExitRoot(ctx context.Context, maxBlockNumber uint64, dbTx pgx.Tx) (state.GlobalExitRoot, time.Time, error)
- func (_m *StateMock) GetNonce(ctx context.Context, address common.Address, blockNumber uint64, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetStateRootByBatchNumber(ctx context.Context, batchNum uint64, dbTx pgx.Tx) (common.Hash, error)
- func (_m *StateMock) GetTimeForLatestBatchVirtualization(ctx context.Context, dbTx pgx.Tx) (time.Time, error)
- func (_m *StateMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]types.Transaction, error)
- func (_m *StateMock) GetTxsOlderThanNL1Blocks(ctx context.Context, nL1Blocks uint64, dbTx pgx.Tx) ([]common.Hash, error)
- func (_m *StateMock) IsBatchClosed(ctx context.Context, batchNum uint64, dbTx pgx.Tx) (bool, error)
- func (_m *StateMock) IsBatchVirtualized(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (bool, error)
- func (_m *StateMock) OpenBatch(ctx context.Context, processingContext state.ProcessingContext, dbTx pgx.Tx) error
- func (_m *StateMock) ProcessSequencerBatch(ctx context.Context, batchNumber uint64, txs []types.Transaction, dbTx pgx.Tx) (*state.ProcessBatchResponse, error)
- func (_m *StateMock) StoreTransactions(ctx context.Context, batchNum uint64, ...) error
- func (_m *StateMock) UpdateGERInOpenBatch(ctx context.Context, ger common.Hash, dbTx pgx.Tx) error
- type TxmanagerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbTxMock ¶
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) 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) 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
type EthermanMock ¶
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) EstimateGasSequenceBatches ¶
func (_m *EthermanMock) EstimateGasSequenceBatches(sequences []types.Sequence) (*coretypes.Transaction, error)
EstimateGasSequenceBatches provides a mock function with given fields: 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() (*big.Int, error)
GetSendSequenceFee provides a mock function with given fields:
func (*EthermanMock) TrustedSequencer ¶
func (_m *EthermanMock) TrustedSequencer() (common.Address, error)
TrustedSequencer provides a mock function with given fields:
type GasPriceEstimatorMock ¶
GasPriceEstimatorMock is an autogenerated mock type for the gasPriceEstimator type
func NewGasPriceEstimatorMock ¶
func NewGasPriceEstimatorMock(t mockConstructorTestingTNewGasPriceEstimatorMock) *GasPriceEstimatorMock
NewGasPriceEstimatorMock creates a new instance of GasPriceEstimatorMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*GasPriceEstimatorMock) GetAvgGasPrice ¶
GetAvgGasPrice provides a mock function with given fields: ctx
type PoolMock ¶
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 ¶
DeleteTxsByHashes provides a mock function with given fields: ctx, hashes
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 ¶
IncrementFailedCounter provides a mock function with given fields: ctx, hashes
func (*PoolMock) IsTxPending ¶
IsTxPending provides a mock function with given fields: ctx, hash
func (*PoolMock) MarkReorgedTxsAsPending ¶
MarkReorgedTxsAsPending provides a mock function with given fields: ctx
type StateMock ¶
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 ¶
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 ¶
GetLastBatch provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastBatchNumber ¶
GetLastBatchNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastL2BlockNumber ¶
GetLastL2BlockNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastVirtualBatchNum ¶
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 ¶
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) (*state.ProcessBatchResponse, error)
ProcessSequencerBatch provides a mock function with given fields: ctx, batchNumber, txs, dbTx
type TxmanagerMock ¶
TxmanagerMock is an autogenerated mock type for the txManager type
func NewTxmanagerMock ¶
func NewTxmanagerMock(t mockConstructorTestingTNewTxmanagerMock) *TxmanagerMock
NewTxmanagerMock creates a new instance of TxmanagerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*TxmanagerMock) SequenceBatches ¶
SequenceBatches provides a mock function with given fields: ctx, sequences