mocks

package
v0.0.3-RC18 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: GPL-3.0 Imports: 10 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 Etherman

type Etherman struct {
	mock.Mock
}

Etherman is an autogenerated mock type for the etherman type

func NewEtherman

func NewEtherman(t mockConstructorTestingTNewEtherman) *Etherman

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

func (*Etherman) BuildTrustedVerifyBatchesTxData

func (_m *Etherman) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch uint64, newVerifiedBatch uint64, inputs *types.FinalProofInputs) (*common.Address, []byte, error)

BuildTrustedVerifyBatchesTxData provides a mock function with given fields: lastVerifiedBatch, newVerifiedBatch, inputs

func (*Etherman) GetLatestVerifiedBatchNum

func (_m *Etherman) GetLatestVerifiedBatchNum() (uint64, error)

GetLatestVerifiedBatchNum provides a mock function with given fields:

type ProfitabilityCheckerMock

type ProfitabilityCheckerMock struct {
	mock.Mock
}

ProfitabilityCheckerMock is an autogenerated mock type for the aggregatorTxProfitabilityChecker type

func NewProfitabilityCheckerMock

func NewProfitabilityCheckerMock(t mockConstructorTestingTNewProfitabilityCheckerMock) *ProfitabilityCheckerMock

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

func (*ProfitabilityCheckerMock) IsProfitable

func (_m *ProfitabilityCheckerMock) IsProfitable(_a0 context.Context, _a1 *big.Int) (bool, error)

IsProfitable provides a mock function with given fields: _a0, _a1

type ProverMock

type ProverMock struct {
	mock.Mock
}

ProverMock is an autogenerated mock type for the proverInterface type

func NewProverMock

func NewProverMock(t mockConstructorTestingTNewProverMock) *ProverMock

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

func (*ProverMock) Addr

func (_m *ProverMock) Addr() string

Addr provides a mock function with given fields:

func (*ProverMock) AggregatedProof

func (_m *ProverMock) AggregatedProof(inputProof1 string, inputProof2 string) (*string, error)

AggregatedProof provides a mock function with given fields: inputProof1, inputProof2

func (*ProverMock) BatchProof

func (_m *ProverMock) BatchProof(input *pb.InputProver) (*string, error)

BatchProof provides a mock function with given fields: input

func (*ProverMock) FinalProof

func (_m *ProverMock) FinalProof(inputProof string, aggregatorAddr string) (*string, error)

FinalProof provides a mock function with given fields: inputProof, aggregatorAddr

func (*ProverMock) ID

func (_m *ProverMock) ID() string

ID provides a mock function with given fields:

func (*ProverMock) IsIdle

func (_m *ProverMock) IsIdle() (bool, error)

IsIdle provides a mock function with given fields:

func (*ProverMock) Name

func (_m *ProverMock) Name() string

Name provides a mock function with given fields:

func (*ProverMock) WaitFinalProof

func (_m *ProverMock) WaitFinalProof(ctx context.Context, proofID string) (*pb.FinalProof, error)

WaitFinalProof provides a mock function with given fields: ctx, proofID

func (*ProverMock) WaitRecursiveProof

func (_m *ProverMock) WaitRecursiveProof(ctx context.Context, proofID string) (string, error)

WaitRecursiveProof provides a mock function with given fields: ctx, proofID

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) AddGeneratedProof

func (_m *StateMock) AddGeneratedProof(ctx context.Context, proof *state.Proof, dbTx pgx.Tx) error

AddGeneratedProof provides a mock function with given fields: ctx, proof, dbTx

func (*StateMock) BeginStateTransaction

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

BeginStateTransaction provides a mock function with given fields: ctx

func (*StateMock) CheckProofContainsCompleteSequences

func (_m *StateMock) CheckProofContainsCompleteSequences(ctx context.Context, proof *state.Proof, dbTx pgx.Tx) (bool, error)

CheckProofContainsCompleteSequences provides a mock function with given fields: ctx, proof, dbTx

func (*StateMock) CleanupGeneratedProofs

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

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

func (*StateMock) CleanupLockedProofs

func (_m *StateMock) CleanupLockedProofs(ctx context.Context, duration string, dbTx pgx.Tx) (int64, error)

CleanupLockedProofs provides a mock function with given fields: ctx, duration, dbTx

func (*StateMock) DeleteGeneratedProofs

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

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

func (*StateMock) DeleteUngeneratedProofs

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

DeleteUngeneratedProofs provides a mock function with given fields: ctx, 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) 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) GetProofReadyToVerify

func (_m *StateMock) GetProofReadyToVerify(ctx context.Context, lastVerfiedBatchNumber uint64, dbTx pgx.Tx) (*state.Proof, error)

GetProofReadyToVerify provides a mock function with given fields: ctx, lastVerfiedBatchNumber, dbTx

func (*StateMock) GetProofsToAggregate

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

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

func (*StateMock) GetVirtualBatchToProve

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

GetVirtualBatchToProve provides a mock function with given fields: ctx, lastVerfiedBatchNumber, dbTx

func (*StateMock) UpdateGeneratedProof

func (_m *StateMock) UpdateGeneratedProof(ctx context.Context, proof *state.Proof, dbTx pgx.Tx) error

UpdateGeneratedProof provides a mock function with given fields: ctx, proof, dbTx

Jump to

Keyboard shortcuts

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