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 PoolMock
- func (_m *PoolMock) AddTx(ctx context.Context, tx types.Transaction, ip string) error
- func (_m *PoolMock) CountPendingTransactions(ctx context.Context) (uint64, error)
- func (_m *PoolMock) GetGasPrice(ctx context.Context) (uint64, error)
- func (_m *PoolMock) GetNonce(ctx context.Context, address common.Address) (uint64, error)
- func (_m *PoolMock) GetPendingTxHashesSince(ctx context.Context, since time.Time) ([]common.Hash, error)
- func (_m *PoolMock) GetPendingTxs(ctx context.Context, isClaims bool, limit uint64) ([]pool.Transaction, error)
- func (_m *PoolMock) GetTxByHash(ctx context.Context, hash common.Hash) (*pool.Transaction, error)
- type StateMock
- func (_m *StateMock) BatchNumberByL2BlockNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) BeginStateTransaction(ctx context.Context) (pgx.Tx, error)
- func (_m *StateMock) DebugTransaction(ctx context.Context, transactionHash common.Hash, ...) (*runtime.ExecutionResult, error)
- func (_m *StateMock) EstimateGas(transaction *coretypes.Transaction, senderAddress common.Address, ...) (uint64, error)
- func (_m *StateMock) GetBalance(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
- func (_m *StateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error)
- func (_m *StateMock) GetCode(ctx context.Context, address common.Address, root common.Hash) ([]byte, error)
- func (_m *StateMock) GetExitRootByGlobalExitRoot(ctx context.Context, ger common.Hash, dbTx pgx.Tx) (*state.GlobalExitRoot, error)
- func (_m *StateMock) GetL2BlockByHash(ctx context.Context, hash common.Hash, dbTx pgx.Tx) (*coretypes.Block, error)
- func (_m *StateMock) GetL2BlockByNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (*coretypes.Block, error)
- func (_m *StateMock) GetL2BlockHashesSince(ctx context.Context, since time.Time, dbTx pgx.Tx) ([]common.Hash, error)
- func (_m *StateMock) GetL2BlockHeaderByNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (*coretypes.Header, error)
- func (_m *StateMock) GetL2BlockTransactionCountByHash(ctx context.Context, hash common.Hash, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetL2BlockTransactionCountByNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastConsolidatedL2BlockNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastL2Block(ctx context.Context, dbTx pgx.Tx) (*coretypes.Block, error)
- func (_m *StateMock) GetLastL2BlockNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLastVerifiedBatch(ctx context.Context, dbTx pgx.Tx) (*state.VerifiedBatch, error)
- func (_m *StateMock) GetLastVirtualBatchNum(ctx context.Context, dbTx pgx.Tx) (uint64, error)
- func (_m *StateMock) GetLogs(ctx context.Context, fromBlock uint64, toBlock uint64, ...) ([]*coretypes.Log, error)
- func (_m *StateMock) GetNonce(ctx context.Context, address common.Address, root common.Hash) (uint64, error)
- func (_m *StateMock) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, ...) (*big.Int, error)
- func (_m *StateMock) GetSyncingInfo(ctx context.Context, dbTx pgx.Tx) (state.SyncingInfo, error)
- func (_m *StateMock) GetTransactionByHash(ctx context.Context, transactionHash common.Hash, dbTx pgx.Tx) (*coretypes.Transaction, error)
- func (_m *StateMock) GetTransactionByL2BlockHashAndIndex(ctx context.Context, blockHash common.Hash, index uint64, dbTx pgx.Tx) (*coretypes.Transaction, error)
- func (_m *StateMock) GetTransactionByL2BlockNumberAndIndex(ctx context.Context, blockNumber uint64, index uint64, dbTx pgx.Tx) (*coretypes.Transaction, error)
- func (_m *StateMock) GetTransactionReceipt(ctx context.Context, transactionHash common.Hash, dbTx pgx.Tx) (*coretypes.Receipt, error)
- func (_m *StateMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]coretypes.Transaction, error)
- func (_m *StateMock) GetVerifiedBatch(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.VerifiedBatch, error)
- func (_m *StateMock) GetVirtualBatch(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.VirtualBatch, error)
- func (_m *StateMock) IsL2BlockConsolidated(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (bool, error)
- func (_m *StateMock) IsL2BlockVirtualized(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (bool, error)
- func (_m *StateMock) PrepareWebSocket()
- func (_m *StateMock) ProcessUnsignedTransaction(ctx context.Context, tx *coretypes.Transaction, senderAddress common.Address, ...) (*runtime.ExecutionResult, error)
- func (_m *StateMock) RegisterNewL2BlockEventHandler(h state.NewL2BlockEventHandler)
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 PoolMock ¶
PoolMock is an autogenerated mock type for the PoolInterface 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) CountPendingTransactions ¶
CountPendingTransactions provides a mock function with given fields: ctx
func (*PoolMock) GetGasPrice ¶
GetGasPrice provides a mock function with given fields: ctx
func (*PoolMock) GetPendingTxHashesSince ¶
func (_m *PoolMock) GetPendingTxHashesSince(ctx context.Context, since time.Time) ([]common.Hash, error)
GetPendingTxHashesSince provides a mock function with given fields: ctx, since
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) GetTxByHash ¶
GetTxByHash provides a mock function with given fields: ctx, hash
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) BatchNumberByL2BlockNumber ¶
func (_m *StateMock) BatchNumberByL2BlockNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (uint64, error)
BatchNumberByL2BlockNumber provides a mock function with given fields: ctx, blockNumber, dbTx
func (*StateMock) BeginStateTransaction ¶
BeginStateTransaction provides a mock function with given fields: ctx
func (*StateMock) DebugTransaction ¶
func (_m *StateMock) DebugTransaction(ctx context.Context, transactionHash common.Hash, traceConfig state.TraceConfig, dbTx pgx.Tx) (*runtime.ExecutionResult, error)
DebugTransaction provides a mock function with given fields: ctx, transactionHash, traceConfig, dbTx
func (*StateMock) EstimateGas ¶
func (_m *StateMock) EstimateGas(transaction *coretypes.Transaction, senderAddress common.Address, l2BlockNumber *uint64, dbTx pgx.Tx) (uint64, error)
EstimateGas provides a mock function with given fields: transaction, senderAddress, l2BlockNumber, dbTx
func (*StateMock) GetBalance ¶
func (_m *StateMock) GetBalance(ctx context.Context, address common.Address, root common.Hash) (*big.Int, error)
GetBalance provides a mock function with given fields: ctx, address, root
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) GetCode ¶
func (_m *StateMock) GetCode(ctx context.Context, address common.Address, root common.Hash) ([]byte, error)
GetCode provides a mock function with given fields: ctx, address, root
func (*StateMock) GetExitRootByGlobalExitRoot ¶
func (_m *StateMock) GetExitRootByGlobalExitRoot(ctx context.Context, ger common.Hash, dbTx pgx.Tx) (*state.GlobalExitRoot, error)
GetExitRootByGlobalExitRoot provides a mock function with given fields: ctx, ger, dbTx
func (*StateMock) GetL2BlockByHash ¶
func (_m *StateMock) GetL2BlockByHash(ctx context.Context, hash common.Hash, dbTx pgx.Tx) (*coretypes.Block, error)
GetL2BlockByHash provides a mock function with given fields: ctx, hash, dbTx
func (*StateMock) GetL2BlockByNumber ¶
func (_m *StateMock) GetL2BlockByNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (*coretypes.Block, error)
GetL2BlockByNumber provides a mock function with given fields: ctx, blockNumber, dbTx
func (*StateMock) GetL2BlockHashesSince ¶
func (_m *StateMock) GetL2BlockHashesSince(ctx context.Context, since time.Time, dbTx pgx.Tx) ([]common.Hash, error)
GetL2BlockHashesSince provides a mock function with given fields: ctx, since, dbTx
func (*StateMock) GetL2BlockHeaderByNumber ¶
func (_m *StateMock) GetL2BlockHeaderByNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (*coretypes.Header, error)
GetL2BlockHeaderByNumber provides a mock function with given fields: ctx, blockNumber, dbTx
func (*StateMock) GetL2BlockTransactionCountByHash ¶
func (_m *StateMock) GetL2BlockTransactionCountByHash(ctx context.Context, hash common.Hash, dbTx pgx.Tx) (uint64, error)
GetL2BlockTransactionCountByHash provides a mock function with given fields: ctx, hash, dbTx
func (*StateMock) GetL2BlockTransactionCountByNumber ¶
func (_m *StateMock) GetL2BlockTransactionCountByNumber(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (uint64, error)
GetL2BlockTransactionCountByNumber provides a mock function with given fields: ctx, blockNumber, dbTx
func (*StateMock) GetLastBatchNumber ¶
GetLastBatchNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastConsolidatedL2BlockNumber ¶
func (_m *StateMock) GetLastConsolidatedL2BlockNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error)
GetLastConsolidatedL2BlockNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastL2Block ¶
GetLastL2Block provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastL2BlockNumber ¶
GetLastL2BlockNumber provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastVerifiedBatch ¶
func (_m *StateMock) GetLastVerifiedBatch(ctx context.Context, dbTx pgx.Tx) (*state.VerifiedBatch, error)
GetLastVerifiedBatch provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLastVirtualBatchNum ¶
GetLastVirtualBatchNum provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetLogs ¶
func (_m *StateMock) GetLogs(ctx context.Context, fromBlock uint64, toBlock uint64, addresses []common.Address, topics [][]common.Hash, blockHash *common.Hash, since *time.Time, dbTx pgx.Tx) ([]*coretypes.Log, error)
GetLogs provides a mock function with given fields: ctx, fromBlock, toBlock, addresses, topics, blockHash, since, dbTx
func (*StateMock) GetNonce ¶
func (_m *StateMock) GetNonce(ctx context.Context, address common.Address, root common.Hash) (uint64, error)
GetNonce provides a mock function with given fields: ctx, address, root
func (*StateMock) GetStorageAt ¶
func (_m *StateMock) GetStorageAt(ctx context.Context, address common.Address, position *big.Int, root common.Hash) (*big.Int, error)
GetStorageAt provides a mock function with given fields: ctx, address, position, root
func (*StateMock) GetSyncingInfo ¶
GetSyncingInfo provides a mock function with given fields: ctx, dbTx
func (*StateMock) GetTransactionByHash ¶
func (_m *StateMock) GetTransactionByHash(ctx context.Context, transactionHash common.Hash, dbTx pgx.Tx) (*coretypes.Transaction, error)
GetTransactionByHash provides a mock function with given fields: ctx, transactionHash, dbTx
func (*StateMock) GetTransactionByL2BlockHashAndIndex ¶
func (_m *StateMock) GetTransactionByL2BlockHashAndIndex(ctx context.Context, blockHash common.Hash, index uint64, dbTx pgx.Tx) (*coretypes.Transaction, error)
GetTransactionByL2BlockHashAndIndex provides a mock function with given fields: ctx, blockHash, index, dbTx
func (*StateMock) GetTransactionByL2BlockNumberAndIndex ¶
func (_m *StateMock) GetTransactionByL2BlockNumberAndIndex(ctx context.Context, blockNumber uint64, index uint64, dbTx pgx.Tx) (*coretypes.Transaction, error)
GetTransactionByL2BlockNumberAndIndex provides a mock function with given fields: ctx, blockNumber, index, dbTx
func (*StateMock) GetTransactionReceipt ¶
func (_m *StateMock) GetTransactionReceipt(ctx context.Context, transactionHash common.Hash, dbTx pgx.Tx) (*coretypes.Receipt, error)
GetTransactionReceipt provides a mock function with given fields: ctx, transactionHash, dbTx
func (*StateMock) GetTransactionsByBatchNumber ¶
func (_m *StateMock) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]coretypes.Transaction, error)
GetTransactionsByBatchNumber provides a mock function with given fields: ctx, batchNumber, dbTx
func (*StateMock) GetVerifiedBatch ¶
func (_m *StateMock) GetVerifiedBatch(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.VerifiedBatch, error)
GetVerifiedBatch provides a mock function with given fields: ctx, batchNumber, dbTx
func (*StateMock) GetVirtualBatch ¶
func (_m *StateMock) GetVirtualBatch(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.VirtualBatch, error)
GetVirtualBatch provides a mock function with given fields: ctx, batchNumber, dbTx
func (*StateMock) IsL2BlockConsolidated ¶
func (_m *StateMock) IsL2BlockConsolidated(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (bool, error)
IsL2BlockConsolidated provides a mock function with given fields: ctx, blockNumber, dbTx
func (*StateMock) IsL2BlockVirtualized ¶
func (_m *StateMock) IsL2BlockVirtualized(ctx context.Context, blockNumber uint64, dbTx pgx.Tx) (bool, error)
IsL2BlockVirtualized provides a mock function with given fields: ctx, blockNumber, dbTx
func (*StateMock) PrepareWebSocket ¶
func (_m *StateMock) PrepareWebSocket()
PrepareWebSocket provides a mock function with given fields:
func (*StateMock) ProcessUnsignedTransaction ¶
func (_m *StateMock) ProcessUnsignedTransaction(ctx context.Context, tx *coretypes.Transaction, senderAddress common.Address, l2BlockNumber *uint64, noZKEVMCounters bool, dbTx pgx.Tx) (*runtime.ExecutionResult, error)
ProcessUnsignedTransaction provides a mock function with given fields: ctx, tx, senderAddress, l2BlockNumber, noZKEVMCounters, dbTx
func (*StateMock) RegisterNewL2BlockEventHandler ¶
func (_m *StateMock) RegisterNewL2BlockEventHandler(h state.NewL2BlockEventHandler)
RegisterNewL2BlockEventHandler provides a mock function with given fields: h