diff --git a/agglayer/mock_agglayer_client.go b/agglayer/mock_agglayer_client.go index 6c5a3fbf..8b8c8689 100644 --- a/agglayer/mock_agglayer_client.go +++ b/agglayer/mock_agglayer_client.go @@ -81,7 +81,7 @@ func (_c *AgglayerClientMock_GetCertificateHeader_Call) RunAndReturn(run func(co return _c } -// GetEpochConfiguration provides a mock function with given fields: +// GetEpochConfiguration provides a mock function with no fields func (_m *AgglayerClientMock) GetEpochConfiguration() (*ClockConfiguration, error) { ret := _m.Called() diff --git a/aggregator/mocks/mock_eth_tx_manager.go b/aggregator/mocks/mock_eth_tx_manager.go index 8db7a440..47dabe1c 100644 --- a/aggregator/mocks/mock_eth_tx_manager.go +++ b/aggregator/mocks/mock_eth_tx_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -24,6 +24,14 @@ type EthTxManagerClientMock struct { mock.Mock } +type EthTxManagerClientMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EthTxManagerClientMock) EXPECT() *EthTxManagerClientMock_Expecter { + return &EthTxManagerClientMock_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, to, value, data, gasOffset, sidecar func (_m *EthTxManagerClientMock) Add(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar) (common.Hash, error) { ret := _m.Called(ctx, to, value, data, gasOffset, sidecar) @@ -54,6 +62,39 @@ func (_m *EthTxManagerClientMock) Add(ctx context.Context, to *common.Address, v return r0, r1 } +// EthTxManagerClientMock_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type EthTxManagerClientMock_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - to *common.Address +// - value *big.Int +// - data []byte +// - gasOffset uint64 +// - sidecar *types.BlobTxSidecar +func (_e *EthTxManagerClientMock_Expecter) Add(ctx interface{}, to interface{}, value interface{}, data interface{}, gasOffset interface{}, sidecar interface{}) *EthTxManagerClientMock_Add_Call { + return &EthTxManagerClientMock_Add_Call{Call: _e.mock.On("Add", ctx, to, value, data, gasOffset, sidecar)} +} + +func (_c *EthTxManagerClientMock_Add_Call) Run(run func(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar)) *EthTxManagerClientMock_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*common.Address), args[2].(*big.Int), args[3].([]byte), args[4].(uint64), args[5].(*types.BlobTxSidecar)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_Add_Call) Return(_a0 common.Hash, _a1 error) *EthTxManagerClientMock_Add_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerClientMock_Add_Call) RunAndReturn(run func(context.Context, *common.Address, *big.Int, []byte, uint64, *types.BlobTxSidecar) (common.Hash, error)) *EthTxManagerClientMock_Add_Call { + _c.Call.Return(run) + return _c +} + // AddWithGas provides a mock function with given fields: ctx, to, value, data, gasOffset, sidecar, gas func (_m *EthTxManagerClientMock) AddWithGas(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar, gas uint64) (common.Hash, error) { ret := _m.Called(ctx, to, value, data, gasOffset, sidecar, gas) @@ -84,6 +125,40 @@ func (_m *EthTxManagerClientMock) AddWithGas(ctx context.Context, to *common.Add return r0, r1 } +// EthTxManagerClientMock_AddWithGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddWithGas' +type EthTxManagerClientMock_AddWithGas_Call struct { + *mock.Call +} + +// AddWithGas is a helper method to define mock.On call +// - ctx context.Context +// - to *common.Address +// - value *big.Int +// - data []byte +// - gasOffset uint64 +// - sidecar *types.BlobTxSidecar +// - gas uint64 +func (_e *EthTxManagerClientMock_Expecter) AddWithGas(ctx interface{}, to interface{}, value interface{}, data interface{}, gasOffset interface{}, sidecar interface{}, gas interface{}) *EthTxManagerClientMock_AddWithGas_Call { + return &EthTxManagerClientMock_AddWithGas_Call{Call: _e.mock.On("AddWithGas", ctx, to, value, data, gasOffset, sidecar, gas)} +} + +func (_c *EthTxManagerClientMock_AddWithGas_Call) Run(run func(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar, gas uint64)) *EthTxManagerClientMock_AddWithGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*common.Address), args[2].(*big.Int), args[3].([]byte), args[4].(uint64), args[5].(*types.BlobTxSidecar), args[6].(uint64)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_AddWithGas_Call) Return(_a0 common.Hash, _a1 error) *EthTxManagerClientMock_AddWithGas_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerClientMock_AddWithGas_Call) RunAndReturn(run func(context.Context, *common.Address, *big.Int, []byte, uint64, *types.BlobTxSidecar, uint64) (common.Hash, error)) *EthTxManagerClientMock_AddWithGas_Call { + _c.Call.Return(run) + return _c +} + // EncodeBlobData provides a mock function with given fields: data func (_m *EthTxManagerClientMock) EncodeBlobData(data []byte) (kzg4844.Blob, error) { ret := _m.Called(data) @@ -114,6 +189,34 @@ func (_m *EthTxManagerClientMock) EncodeBlobData(data []byte) (kzg4844.Blob, err return r0, r1 } +// EthTxManagerClientMock_EncodeBlobData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EncodeBlobData' +type EthTxManagerClientMock_EncodeBlobData_Call struct { + *mock.Call +} + +// EncodeBlobData is a helper method to define mock.On call +// - data []byte +func (_e *EthTxManagerClientMock_Expecter) EncodeBlobData(data interface{}) *EthTxManagerClientMock_EncodeBlobData_Call { + return &EthTxManagerClientMock_EncodeBlobData_Call{Call: _e.mock.On("EncodeBlobData", data)} +} + +func (_c *EthTxManagerClientMock_EncodeBlobData_Call) Run(run func(data []byte)) *EthTxManagerClientMock_EncodeBlobData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_EncodeBlobData_Call) Return(_a0 kzg4844.Blob, _a1 error) *EthTxManagerClientMock_EncodeBlobData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerClientMock_EncodeBlobData_Call) RunAndReturn(run func([]byte) (kzg4844.Blob, error)) *EthTxManagerClientMock_EncodeBlobData_Call { + _c.Call.Return(run) + return _c +} + // MakeBlobSidecar provides a mock function with given fields: blobs func (_m *EthTxManagerClientMock) MakeBlobSidecar(blobs []kzg4844.Blob) *types.BlobTxSidecar { ret := _m.Called(blobs) @@ -134,11 +237,68 @@ func (_m *EthTxManagerClientMock) MakeBlobSidecar(blobs []kzg4844.Blob) *types.B return r0 } +// EthTxManagerClientMock_MakeBlobSidecar_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MakeBlobSidecar' +type EthTxManagerClientMock_MakeBlobSidecar_Call struct { + *mock.Call +} + +// MakeBlobSidecar is a helper method to define mock.On call +// - blobs []kzg4844.Blob +func (_e *EthTxManagerClientMock_Expecter) MakeBlobSidecar(blobs interface{}) *EthTxManagerClientMock_MakeBlobSidecar_Call { + return &EthTxManagerClientMock_MakeBlobSidecar_Call{Call: _e.mock.On("MakeBlobSidecar", blobs)} +} + +func (_c *EthTxManagerClientMock_MakeBlobSidecar_Call) Run(run func(blobs []kzg4844.Blob)) *EthTxManagerClientMock_MakeBlobSidecar_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]kzg4844.Blob)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_MakeBlobSidecar_Call) Return(_a0 *types.BlobTxSidecar) *EthTxManagerClientMock_MakeBlobSidecar_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EthTxManagerClientMock_MakeBlobSidecar_Call) RunAndReturn(run func([]kzg4844.Blob) *types.BlobTxSidecar) *EthTxManagerClientMock_MakeBlobSidecar_Call { + _c.Call.Return(run) + return _c +} + // ProcessPendingMonitoredTxs provides a mock function with given fields: ctx, resultHandler func (_m *EthTxManagerClientMock) ProcessPendingMonitoredTxs(ctx context.Context, resultHandler ethtxmanager.ResultHandler) { _m.Called(ctx, resultHandler) } +// EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessPendingMonitoredTxs' +type EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call struct { + *mock.Call +} + +// ProcessPendingMonitoredTxs is a helper method to define mock.On call +// - ctx context.Context +// - resultHandler ethtxmanager.ResultHandler +func (_e *EthTxManagerClientMock_Expecter) ProcessPendingMonitoredTxs(ctx interface{}, resultHandler interface{}) *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call { + return &EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call{Call: _e.mock.On("ProcessPendingMonitoredTxs", ctx, resultHandler)} +} + +func (_c *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call) Run(run func(ctx context.Context, resultHandler ethtxmanager.ResultHandler)) *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethtxmanager.ResultHandler)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call) Return() *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call { + _c.Call.Return() + return _c +} + +func (_c *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call) RunAndReturn(run func(context.Context, ethtxmanager.ResultHandler)) *EthTxManagerClientMock_ProcessPendingMonitoredTxs_Call { + _c.Run(run) + return _c +} + // Remove provides a mock function with given fields: ctx, id func (_m *EthTxManagerClientMock) Remove(ctx context.Context, id common.Hash) error { ret := _m.Called(ctx, id) @@ -157,6 +317,35 @@ func (_m *EthTxManagerClientMock) Remove(ctx context.Context, id common.Hash) er return r0 } +// EthTxManagerClientMock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' +type EthTxManagerClientMock_Remove_Call struct { + *mock.Call +} + +// Remove is a helper method to define mock.On call +// - ctx context.Context +// - id common.Hash +func (_e *EthTxManagerClientMock_Expecter) Remove(ctx interface{}, id interface{}) *EthTxManagerClientMock_Remove_Call { + return &EthTxManagerClientMock_Remove_Call{Call: _e.mock.On("Remove", ctx, id)} +} + +func (_c *EthTxManagerClientMock_Remove_Call) Run(run func(ctx context.Context, id common.Hash)) *EthTxManagerClientMock_Remove_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_Remove_Call) Return(_a0 error) *EthTxManagerClientMock_Remove_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EthTxManagerClientMock_Remove_Call) RunAndReturn(run func(context.Context, common.Hash) error) *EthTxManagerClientMock_Remove_Call { + _c.Call.Return(run) + return _c +} + // RemoveAll provides a mock function with given fields: ctx func (_m *EthTxManagerClientMock) RemoveAll(ctx context.Context) error { ret := _m.Called(ctx) @@ -175,6 +364,34 @@ func (_m *EthTxManagerClientMock) RemoveAll(ctx context.Context) error { return r0 } +// EthTxManagerClientMock_RemoveAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAll' +type EthTxManagerClientMock_RemoveAll_Call struct { + *mock.Call +} + +// RemoveAll is a helper method to define mock.On call +// - ctx context.Context +func (_e *EthTxManagerClientMock_Expecter) RemoveAll(ctx interface{}) *EthTxManagerClientMock_RemoveAll_Call { + return &EthTxManagerClientMock_RemoveAll_Call{Call: _e.mock.On("RemoveAll", ctx)} +} + +func (_c *EthTxManagerClientMock_RemoveAll_Call) Run(run func(ctx context.Context)) *EthTxManagerClientMock_RemoveAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_RemoveAll_Call) Return(_a0 error) *EthTxManagerClientMock_RemoveAll_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EthTxManagerClientMock_RemoveAll_Call) RunAndReturn(run func(context.Context) error) *EthTxManagerClientMock_RemoveAll_Call { + _c.Call.Return(run) + return _c +} + // Result provides a mock function with given fields: ctx, id func (_m *EthTxManagerClientMock) Result(ctx context.Context, id common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error) { ret := _m.Called(ctx, id) @@ -203,6 +420,35 @@ func (_m *EthTxManagerClientMock) Result(ctx context.Context, id common.Hash) (z return r0, r1 } +// EthTxManagerClientMock_Result_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Result' +type EthTxManagerClientMock_Result_Call struct { + *mock.Call +} + +// Result is a helper method to define mock.On call +// - ctx context.Context +// - id common.Hash +func (_e *EthTxManagerClientMock_Expecter) Result(ctx interface{}, id interface{}) *EthTxManagerClientMock_Result_Call { + return &EthTxManagerClientMock_Result_Call{Call: _e.mock.On("Result", ctx, id)} +} + +func (_c *EthTxManagerClientMock_Result_Call) Run(run func(ctx context.Context, id common.Hash)) *EthTxManagerClientMock_Result_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_Result_Call) Return(_a0 zkevm_ethtx_managertypes.MonitoredTxResult, _a1 error) *EthTxManagerClientMock_Result_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerClientMock_Result_Call) RunAndReturn(run func(context.Context, common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error)) *EthTxManagerClientMock_Result_Call { + _c.Call.Return(run) + return _c +} + // ResultsByStatus provides a mock function with given fields: ctx, statuses func (_m *EthTxManagerClientMock) ResultsByStatus(ctx context.Context, statuses []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error) { ret := _m.Called(ctx, statuses) @@ -233,16 +479,99 @@ func (_m *EthTxManagerClientMock) ResultsByStatus(ctx context.Context, statuses return r0, r1 } -// Start provides a mock function with given fields: +// EthTxManagerClientMock_ResultsByStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResultsByStatus' +type EthTxManagerClientMock_ResultsByStatus_Call struct { + *mock.Call +} + +// ResultsByStatus is a helper method to define mock.On call +// - ctx context.Context +// - statuses []zkevm_ethtx_managertypes.MonitoredTxStatus +func (_e *EthTxManagerClientMock_Expecter) ResultsByStatus(ctx interface{}, statuses interface{}) *EthTxManagerClientMock_ResultsByStatus_Call { + return &EthTxManagerClientMock_ResultsByStatus_Call{Call: _e.mock.On("ResultsByStatus", ctx, statuses)} +} + +func (_c *EthTxManagerClientMock_ResultsByStatus_Call) Run(run func(ctx context.Context, statuses []zkevm_ethtx_managertypes.MonitoredTxStatus)) *EthTxManagerClientMock_ResultsByStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]zkevm_ethtx_managertypes.MonitoredTxStatus)) + }) + return _c +} + +func (_c *EthTxManagerClientMock_ResultsByStatus_Call) Return(_a0 []zkevm_ethtx_managertypes.MonitoredTxResult, _a1 error) *EthTxManagerClientMock_ResultsByStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerClientMock_ResultsByStatus_Call) RunAndReturn(run func(context.Context, []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error)) *EthTxManagerClientMock_ResultsByStatus_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with no fields func (_m *EthTxManagerClientMock) Start() { _m.Called() } -// Stop provides a mock function with given fields: +// EthTxManagerClientMock_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type EthTxManagerClientMock_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +func (_e *EthTxManagerClientMock_Expecter) Start() *EthTxManagerClientMock_Start_Call { + return &EthTxManagerClientMock_Start_Call{Call: _e.mock.On("Start")} +} + +func (_c *EthTxManagerClientMock_Start_Call) Run(run func()) *EthTxManagerClientMock_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EthTxManagerClientMock_Start_Call) Return() *EthTxManagerClientMock_Start_Call { + _c.Call.Return() + return _c +} + +func (_c *EthTxManagerClientMock_Start_Call) RunAndReturn(run func()) *EthTxManagerClientMock_Start_Call { + _c.Run(run) + return _c +} + +// Stop provides a mock function with no fields func (_m *EthTxManagerClientMock) Stop() { _m.Called() } +// EthTxManagerClientMock_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' +type EthTxManagerClientMock_Stop_Call struct { + *mock.Call +} + +// Stop is a helper method to define mock.On call +func (_e *EthTxManagerClientMock_Expecter) Stop() *EthTxManagerClientMock_Stop_Call { + return &EthTxManagerClientMock_Stop_Call{Call: _e.mock.On("Stop")} +} + +func (_c *EthTxManagerClientMock_Stop_Call) Run(run func()) *EthTxManagerClientMock_Stop_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EthTxManagerClientMock_Stop_Call) Return() *EthTxManagerClientMock_Stop_Call { + _c.Call.Return() + return _c +} + +func (_c *EthTxManagerClientMock_Stop_Call) RunAndReturn(run func()) *EthTxManagerClientMock_Stop_Call { + _c.Run(run) + return _c +} + // NewEthTxManagerClientMock creates a new instance of EthTxManagerClientMock. 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 NewEthTxManagerClientMock(t interface { diff --git a/aggregator/mocks/mock_etherman.go b/aggregator/mocks/mock_etherman.go index 351acef3..2982430d 100644 --- a/aggregator/mocks/mock_etherman.go +++ b/aggregator/mocks/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type EthermanMock struct { mock.Mock } +type EthermanMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EthermanMock) EXPECT() *EthermanMock_Expecter { + return &EthermanMock_Expecter{mock: &_m.Mock} +} + // BuildTrustedVerifyBatchesTxData provides a mock function with given fields: lastVerifiedBatch, newVerifiedBatch, inputs, beneficiary func (_m *EthermanMock) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch uint64, newVerifiedBatch uint64, inputs *ethmantypes.FinalProofInputs, beneficiary common.Address) (*common.Address, []byte, error) { ret := _m.Called(lastVerifiedBatch, newVerifiedBatch, inputs, beneficiary) @@ -59,6 +67,37 @@ func (_m *EthermanMock) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch uint64 return r0, r1, r2 } +// EthermanMock_BuildTrustedVerifyBatchesTxData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuildTrustedVerifyBatchesTxData' +type EthermanMock_BuildTrustedVerifyBatchesTxData_Call struct { + *mock.Call +} + +// BuildTrustedVerifyBatchesTxData is a helper method to define mock.On call +// - lastVerifiedBatch uint64 +// - newVerifiedBatch uint64 +// - inputs *ethmantypes.FinalProofInputs +// - beneficiary common.Address +func (_e *EthermanMock_Expecter) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch interface{}, newVerifiedBatch interface{}, inputs interface{}, beneficiary interface{}) *EthermanMock_BuildTrustedVerifyBatchesTxData_Call { + return &EthermanMock_BuildTrustedVerifyBatchesTxData_Call{Call: _e.mock.On("BuildTrustedVerifyBatchesTxData", lastVerifiedBatch, newVerifiedBatch, inputs, beneficiary)} +} + +func (_c *EthermanMock_BuildTrustedVerifyBatchesTxData_Call) Run(run func(lastVerifiedBatch uint64, newVerifiedBatch uint64, inputs *ethmantypes.FinalProofInputs, beneficiary common.Address)) *EthermanMock_BuildTrustedVerifyBatchesTxData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(uint64), args[2].(*ethmantypes.FinalProofInputs), args[3].(common.Address)) + }) + return _c +} + +func (_c *EthermanMock_BuildTrustedVerifyBatchesTxData_Call) Return(to *common.Address, data []byte, err error) *EthermanMock_BuildTrustedVerifyBatchesTxData_Call { + _c.Call.Return(to, data, err) + return _c +} + +func (_c *EthermanMock_BuildTrustedVerifyBatchesTxData_Call) RunAndReturn(run func(uint64, uint64, *ethmantypes.FinalProofInputs, common.Address) (*common.Address, []byte, error)) *EthermanMock_BuildTrustedVerifyBatchesTxData_Call { + _c.Call.Return(run) + return _c +} + // GetBatchAccInputHash provides a mock function with given fields: ctx, batchNumber func (_m *EthermanMock) GetBatchAccInputHash(ctx context.Context, batchNumber uint64) (common.Hash, error) { ret := _m.Called(ctx, batchNumber) @@ -89,6 +128,35 @@ func (_m *EthermanMock) GetBatchAccInputHash(ctx context.Context, batchNumber ui return r0, r1 } +// EthermanMock_GetBatchAccInputHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBatchAccInputHash' +type EthermanMock_GetBatchAccInputHash_Call struct { + *mock.Call +} + +// GetBatchAccInputHash is a helper method to define mock.On call +// - ctx context.Context +// - batchNumber uint64 +func (_e *EthermanMock_Expecter) GetBatchAccInputHash(ctx interface{}, batchNumber interface{}) *EthermanMock_GetBatchAccInputHash_Call { + return &EthermanMock_GetBatchAccInputHash_Call{Call: _e.mock.On("GetBatchAccInputHash", ctx, batchNumber)} +} + +func (_c *EthermanMock_GetBatchAccInputHash_Call) Run(run func(ctx context.Context, batchNumber uint64)) *EthermanMock_GetBatchAccInputHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *EthermanMock_GetBatchAccInputHash_Call) Return(_a0 common.Hash, _a1 error) *EthermanMock_GetBatchAccInputHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_GetBatchAccInputHash_Call) RunAndReturn(run func(context.Context, uint64) (common.Hash, error)) *EthermanMock_GetBatchAccInputHash_Call { + _c.Call.Return(run) + return _c +} + // GetLatestBlockHeader provides a mock function with given fields: ctx func (_m *EthermanMock) GetLatestBlockHeader(ctx context.Context) (*types.Header, error) { ret := _m.Called(ctx) @@ -119,7 +187,35 @@ func (_m *EthermanMock) GetLatestBlockHeader(ctx context.Context) (*types.Header return r0, r1 } -// GetLatestVerifiedBatchNum provides a mock function with given fields: +// EthermanMock_GetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockHeader' +type EthermanMock_GetLatestBlockHeader_Call struct { + *mock.Call +} + +// GetLatestBlockHeader is a helper method to define mock.On call +// - ctx context.Context +func (_e *EthermanMock_Expecter) GetLatestBlockHeader(ctx interface{}) *EthermanMock_GetLatestBlockHeader_Call { + return &EthermanMock_GetLatestBlockHeader_Call{Call: _e.mock.On("GetLatestBlockHeader", ctx)} +} + +func (_c *EthermanMock_GetLatestBlockHeader_Call) Run(run func(ctx context.Context)) *EthermanMock_GetLatestBlockHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EthermanMock_GetLatestBlockHeader_Call) Return(_a0 *types.Header, _a1 error) *EthermanMock_GetLatestBlockHeader_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_GetLatestBlockHeader_Call) RunAndReturn(run func(context.Context) (*types.Header, error)) *EthermanMock_GetLatestBlockHeader_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestVerifiedBatchNum provides a mock function with no fields func (_m *EthermanMock) GetLatestVerifiedBatchNum() (uint64, error) { ret := _m.Called() @@ -147,7 +243,34 @@ func (_m *EthermanMock) GetLatestVerifiedBatchNum() (uint64, error) { return r0, r1 } -// GetRollupId provides a mock function with given fields: +// EthermanMock_GetLatestVerifiedBatchNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVerifiedBatchNum' +type EthermanMock_GetLatestVerifiedBatchNum_Call struct { + *mock.Call +} + +// GetLatestVerifiedBatchNum is a helper method to define mock.On call +func (_e *EthermanMock_Expecter) GetLatestVerifiedBatchNum() *EthermanMock_GetLatestVerifiedBatchNum_Call { + return &EthermanMock_GetLatestVerifiedBatchNum_Call{Call: _e.mock.On("GetLatestVerifiedBatchNum")} +} + +func (_c *EthermanMock_GetLatestVerifiedBatchNum_Call) Run(run func()) *EthermanMock_GetLatestVerifiedBatchNum_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EthermanMock_GetLatestVerifiedBatchNum_Call) Return(_a0 uint64, _a1 error) *EthermanMock_GetLatestVerifiedBatchNum_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_GetLatestVerifiedBatchNum_Call) RunAndReturn(run func() (uint64, error)) *EthermanMock_GetLatestVerifiedBatchNum_Call { + _c.Call.Return(run) + return _c +} + +// GetRollupId provides a mock function with no fields func (_m *EthermanMock) GetRollupId() uint32 { ret := _m.Called() @@ -165,6 +288,33 @@ func (_m *EthermanMock) GetRollupId() uint32 { return r0 } +// EthermanMock_GetRollupId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRollupId' +type EthermanMock_GetRollupId_Call struct { + *mock.Call +} + +// GetRollupId is a helper method to define mock.On call +func (_e *EthermanMock_Expecter) GetRollupId() *EthermanMock_GetRollupId_Call { + return &EthermanMock_GetRollupId_Call{Call: _e.mock.On("GetRollupId")} +} + +func (_c *EthermanMock_GetRollupId_Call) Run(run func()) *EthermanMock_GetRollupId_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EthermanMock_GetRollupId_Call) Return(_a0 uint32) *EthermanMock_GetRollupId_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EthermanMock_GetRollupId_Call) RunAndReturn(run func() uint32) *EthermanMock_GetRollupId_Call { + _c.Call.Return(run) + return _c +} + // HeaderByNumber provides a mock function with given fields: ctx, number func (_m *EthermanMock) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) { ret := _m.Called(ctx, number) @@ -195,6 +345,35 @@ func (_m *EthermanMock) HeaderByNumber(ctx context.Context, number *big.Int) (*t return r0, r1 } +// EthermanMock_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber' +type EthermanMock_HeaderByNumber_Call struct { + *mock.Call +} + +// HeaderByNumber is a helper method to define mock.On call +// - ctx context.Context +// - number *big.Int +func (_e *EthermanMock_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *EthermanMock_HeaderByNumber_Call { + return &EthermanMock_HeaderByNumber_Call{Call: _e.mock.On("HeaderByNumber", ctx, number)} +} + +func (_c *EthermanMock_HeaderByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *EthermanMock_HeaderByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EthermanMock_HeaderByNumber_Call) Return(_a0 *types.Header, _a1 error) *EthermanMock_HeaderByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_HeaderByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Header, error)) *EthermanMock_HeaderByNumber_Call { + _c.Call.Return(run) + return _c +} + // 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. // The first argument is typically a *testing.T value. func NewEthermanMock(t interface { diff --git a/aggregator/mocks/mock_prover.go b/aggregator/mocks/mock_prover.go index b6ce1011..7939667d 100644 --- a/aggregator/mocks/mock_prover.go +++ b/aggregator/mocks/mock_prover.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,7 +17,15 @@ type ProverInterfaceMock struct { mock.Mock } -// Addr provides a mock function with given fields: +type ProverInterfaceMock_Expecter struct { + mock *mock.Mock +} + +func (_m *ProverInterfaceMock) EXPECT() *ProverInterfaceMock_Expecter { + return &ProverInterfaceMock_Expecter{mock: &_m.Mock} +} + +// Addr provides a mock function with no fields func (_m *ProverInterfaceMock) Addr() string { ret := _m.Called() @@ -35,6 +43,33 @@ func (_m *ProverInterfaceMock) Addr() string { return r0 } +// ProverInterfaceMock_Addr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Addr' +type ProverInterfaceMock_Addr_Call struct { + *mock.Call +} + +// Addr is a helper method to define mock.On call +func (_e *ProverInterfaceMock_Expecter) Addr() *ProverInterfaceMock_Addr_Call { + return &ProverInterfaceMock_Addr_Call{Call: _e.mock.On("Addr")} +} + +func (_c *ProverInterfaceMock_Addr_Call) Run(run func()) *ProverInterfaceMock_Addr_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ProverInterfaceMock_Addr_Call) Return(_a0 string) *ProverInterfaceMock_Addr_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProverInterfaceMock_Addr_Call) RunAndReturn(run func() string) *ProverInterfaceMock_Addr_Call { + _c.Call.Return(run) + return _c +} + // AggregatedProof provides a mock function with given fields: inputProof1, inputProof2 func (_m *ProverInterfaceMock) AggregatedProof(inputProof1 string, inputProof2 string) (*string, error) { ret := _m.Called(inputProof1, inputProof2) @@ -65,6 +100,35 @@ func (_m *ProverInterfaceMock) AggregatedProof(inputProof1 string, inputProof2 s return r0, r1 } +// ProverInterfaceMock_AggregatedProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AggregatedProof' +type ProverInterfaceMock_AggregatedProof_Call struct { + *mock.Call +} + +// AggregatedProof is a helper method to define mock.On call +// - inputProof1 string +// - inputProof2 string +func (_e *ProverInterfaceMock_Expecter) AggregatedProof(inputProof1 interface{}, inputProof2 interface{}) *ProverInterfaceMock_AggregatedProof_Call { + return &ProverInterfaceMock_AggregatedProof_Call{Call: _e.mock.On("AggregatedProof", inputProof1, inputProof2)} +} + +func (_c *ProverInterfaceMock_AggregatedProof_Call) Run(run func(inputProof1 string, inputProof2 string)) *ProverInterfaceMock_AggregatedProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *ProverInterfaceMock_AggregatedProof_Call) Return(_a0 *string, _a1 error) *ProverInterfaceMock_AggregatedProof_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProverInterfaceMock_AggregatedProof_Call) RunAndReturn(run func(string, string) (*string, error)) *ProverInterfaceMock_AggregatedProof_Call { + _c.Call.Return(run) + return _c +} + // BatchProof provides a mock function with given fields: input func (_m *ProverInterfaceMock) BatchProof(input *prover.StatelessInputProver) (*string, error) { ret := _m.Called(input) @@ -95,6 +159,34 @@ func (_m *ProverInterfaceMock) BatchProof(input *prover.StatelessInputProver) (* return r0, r1 } +// ProverInterfaceMock_BatchProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchProof' +type ProverInterfaceMock_BatchProof_Call struct { + *mock.Call +} + +// BatchProof is a helper method to define mock.On call +// - input *prover.StatelessInputProver +func (_e *ProverInterfaceMock_Expecter) BatchProof(input interface{}) *ProverInterfaceMock_BatchProof_Call { + return &ProverInterfaceMock_BatchProof_Call{Call: _e.mock.On("BatchProof", input)} +} + +func (_c *ProverInterfaceMock_BatchProof_Call) Run(run func(input *prover.StatelessInputProver)) *ProverInterfaceMock_BatchProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*prover.StatelessInputProver)) + }) + return _c +} + +func (_c *ProverInterfaceMock_BatchProof_Call) Return(_a0 *string, _a1 error) *ProverInterfaceMock_BatchProof_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProverInterfaceMock_BatchProof_Call) RunAndReturn(run func(*prover.StatelessInputProver) (*string, error)) *ProverInterfaceMock_BatchProof_Call { + _c.Call.Return(run) + return _c +} + // FinalProof provides a mock function with given fields: inputProof, aggregatorAddr func (_m *ProverInterfaceMock) FinalProof(inputProof string, aggregatorAddr string) (*string, error) { ret := _m.Called(inputProof, aggregatorAddr) @@ -125,7 +217,36 @@ func (_m *ProverInterfaceMock) FinalProof(inputProof string, aggregatorAddr stri return r0, r1 } -// ID provides a mock function with given fields: +// ProverInterfaceMock_FinalProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalProof' +type ProverInterfaceMock_FinalProof_Call struct { + *mock.Call +} + +// FinalProof is a helper method to define mock.On call +// - inputProof string +// - aggregatorAddr string +func (_e *ProverInterfaceMock_Expecter) FinalProof(inputProof interface{}, aggregatorAddr interface{}) *ProverInterfaceMock_FinalProof_Call { + return &ProverInterfaceMock_FinalProof_Call{Call: _e.mock.On("FinalProof", inputProof, aggregatorAddr)} +} + +func (_c *ProverInterfaceMock_FinalProof_Call) Run(run func(inputProof string, aggregatorAddr string)) *ProverInterfaceMock_FinalProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *ProverInterfaceMock_FinalProof_Call) Return(_a0 *string, _a1 error) *ProverInterfaceMock_FinalProof_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProverInterfaceMock_FinalProof_Call) RunAndReturn(run func(string, string) (*string, error)) *ProverInterfaceMock_FinalProof_Call { + _c.Call.Return(run) + return _c +} + +// ID provides a mock function with no fields func (_m *ProverInterfaceMock) ID() string { ret := _m.Called() @@ -143,7 +264,34 @@ func (_m *ProverInterfaceMock) ID() string { return r0 } -// IsIdle provides a mock function with given fields: +// ProverInterfaceMock_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' +type ProverInterfaceMock_ID_Call struct { + *mock.Call +} + +// ID is a helper method to define mock.On call +func (_e *ProverInterfaceMock_Expecter) ID() *ProverInterfaceMock_ID_Call { + return &ProverInterfaceMock_ID_Call{Call: _e.mock.On("ID")} +} + +func (_c *ProverInterfaceMock_ID_Call) Run(run func()) *ProverInterfaceMock_ID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ProverInterfaceMock_ID_Call) Return(_a0 string) *ProverInterfaceMock_ID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProverInterfaceMock_ID_Call) RunAndReturn(run func() string) *ProverInterfaceMock_ID_Call { + _c.Call.Return(run) + return _c +} + +// IsIdle provides a mock function with no fields func (_m *ProverInterfaceMock) IsIdle() (bool, error) { ret := _m.Called() @@ -171,7 +319,34 @@ func (_m *ProverInterfaceMock) IsIdle() (bool, error) { return r0, r1 } -// Name provides a mock function with given fields: +// ProverInterfaceMock_IsIdle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsIdle' +type ProverInterfaceMock_IsIdle_Call struct { + *mock.Call +} + +// IsIdle is a helper method to define mock.On call +func (_e *ProverInterfaceMock_Expecter) IsIdle() *ProverInterfaceMock_IsIdle_Call { + return &ProverInterfaceMock_IsIdle_Call{Call: _e.mock.On("IsIdle")} +} + +func (_c *ProverInterfaceMock_IsIdle_Call) Run(run func()) *ProverInterfaceMock_IsIdle_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ProverInterfaceMock_IsIdle_Call) Return(_a0 bool, _a1 error) *ProverInterfaceMock_IsIdle_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProverInterfaceMock_IsIdle_Call) RunAndReturn(run func() (bool, error)) *ProverInterfaceMock_IsIdle_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with no fields func (_m *ProverInterfaceMock) Name() string { ret := _m.Called() @@ -189,6 +364,33 @@ func (_m *ProverInterfaceMock) Name() string { return r0 } +// ProverInterfaceMock_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type ProverInterfaceMock_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *ProverInterfaceMock_Expecter) Name() *ProverInterfaceMock_Name_Call { + return &ProverInterfaceMock_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *ProverInterfaceMock_Name_Call) Run(run func()) *ProverInterfaceMock_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ProverInterfaceMock_Name_Call) Return(_a0 string) *ProverInterfaceMock_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ProverInterfaceMock_Name_Call) RunAndReturn(run func() string) *ProverInterfaceMock_Name_Call { + _c.Call.Return(run) + return _c +} + // WaitFinalProof provides a mock function with given fields: ctx, proofID func (_m *ProverInterfaceMock) WaitFinalProof(ctx context.Context, proofID string) (*prover.FinalProof, error) { ret := _m.Called(ctx, proofID) @@ -219,6 +421,35 @@ func (_m *ProverInterfaceMock) WaitFinalProof(ctx context.Context, proofID strin return r0, r1 } +// ProverInterfaceMock_WaitFinalProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitFinalProof' +type ProverInterfaceMock_WaitFinalProof_Call struct { + *mock.Call +} + +// WaitFinalProof is a helper method to define mock.On call +// - ctx context.Context +// - proofID string +func (_e *ProverInterfaceMock_Expecter) WaitFinalProof(ctx interface{}, proofID interface{}) *ProverInterfaceMock_WaitFinalProof_Call { + return &ProverInterfaceMock_WaitFinalProof_Call{Call: _e.mock.On("WaitFinalProof", ctx, proofID)} +} + +func (_c *ProverInterfaceMock_WaitFinalProof_Call) Run(run func(ctx context.Context, proofID string)) *ProverInterfaceMock_WaitFinalProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ProverInterfaceMock_WaitFinalProof_Call) Return(_a0 *prover.FinalProof, _a1 error) *ProverInterfaceMock_WaitFinalProof_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ProverInterfaceMock_WaitFinalProof_Call) RunAndReturn(run func(context.Context, string) (*prover.FinalProof, error)) *ProverInterfaceMock_WaitFinalProof_Call { + _c.Call.Return(run) + return _c +} + // WaitRecursiveProof provides a mock function with given fields: ctx, proofID func (_m *ProverInterfaceMock) WaitRecursiveProof(ctx context.Context, proofID string) (string, common.Hash, common.Hash, error) { ret := _m.Called(ctx, proofID) @@ -265,6 +496,35 @@ func (_m *ProverInterfaceMock) WaitRecursiveProof(ctx context.Context, proofID s return r0, r1, r2, r3 } +// ProverInterfaceMock_WaitRecursiveProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitRecursiveProof' +type ProverInterfaceMock_WaitRecursiveProof_Call struct { + *mock.Call +} + +// WaitRecursiveProof is a helper method to define mock.On call +// - ctx context.Context +// - proofID string +func (_e *ProverInterfaceMock_Expecter) WaitRecursiveProof(ctx interface{}, proofID interface{}) *ProverInterfaceMock_WaitRecursiveProof_Call { + return &ProverInterfaceMock_WaitRecursiveProof_Call{Call: _e.mock.On("WaitRecursiveProof", ctx, proofID)} +} + +func (_c *ProverInterfaceMock_WaitRecursiveProof_Call) Run(run func(ctx context.Context, proofID string)) *ProverInterfaceMock_WaitRecursiveProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ProverInterfaceMock_WaitRecursiveProof_Call) Return(_a0 string, _a1 common.Hash, _a2 common.Hash, _a3 error) *ProverInterfaceMock_WaitRecursiveProof_Call { + _c.Call.Return(_a0, _a1, _a2, _a3) + return _c +} + +func (_c *ProverInterfaceMock_WaitRecursiveProof_Call) RunAndReturn(run func(context.Context, string) (string, common.Hash, common.Hash, error)) *ProverInterfaceMock_WaitRecursiveProof_Call { + _c.Call.Return(run) + return _c +} + // NewProverInterfaceMock creates a new instance of ProverInterfaceMock. 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 NewProverInterfaceMock(t interface { diff --git a/aggregator/mocks/mock_rpc.go b/aggregator/mocks/mock_rpc.go index 2f3c07e4..3927b5db 100644 --- a/aggregator/mocks/mock_rpc.go +++ b/aggregator/mocks/mock_rpc.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type RPCInterfaceMock struct { mock.Mock } +type RPCInterfaceMock_Expecter struct { + mock *mock.Mock +} + +func (_m *RPCInterfaceMock) EXPECT() *RPCInterfaceMock_Expecter { + return &RPCInterfaceMock_Expecter{mock: &_m.Mock} +} + // GetBatch provides a mock function with given fields: batchNumber func (_m *RPCInterfaceMock) GetBatch(batchNumber uint64) (*types.RPCBatch, error) { ret := _m.Called(batchNumber) @@ -42,6 +50,34 @@ func (_m *RPCInterfaceMock) GetBatch(batchNumber uint64) (*types.RPCBatch, error return r0, r1 } +// RPCInterfaceMock_GetBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBatch' +type RPCInterfaceMock_GetBatch_Call struct { + *mock.Call +} + +// GetBatch is a helper method to define mock.On call +// - batchNumber uint64 +func (_e *RPCInterfaceMock_Expecter) GetBatch(batchNumber interface{}) *RPCInterfaceMock_GetBatch_Call { + return &RPCInterfaceMock_GetBatch_Call{Call: _e.mock.On("GetBatch", batchNumber)} +} + +func (_c *RPCInterfaceMock_GetBatch_Call) Run(run func(batchNumber uint64)) *RPCInterfaceMock_GetBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *RPCInterfaceMock_GetBatch_Call) Return(_a0 *types.RPCBatch, _a1 error) *RPCInterfaceMock_GetBatch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCInterfaceMock_GetBatch_Call) RunAndReturn(run func(uint64) (*types.RPCBatch, error)) *RPCInterfaceMock_GetBatch_Call { + _c.Call.Return(run) + return _c +} + // GetWitness provides a mock function with given fields: batchNumber, fullWitness func (_m *RPCInterfaceMock) GetWitness(batchNumber uint64, fullWitness bool) ([]byte, error) { ret := _m.Called(batchNumber, fullWitness) @@ -72,6 +108,35 @@ func (_m *RPCInterfaceMock) GetWitness(batchNumber uint64, fullWitness bool) ([] return r0, r1 } +// RPCInterfaceMock_GetWitness_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWitness' +type RPCInterfaceMock_GetWitness_Call struct { + *mock.Call +} + +// GetWitness is a helper method to define mock.On call +// - batchNumber uint64 +// - fullWitness bool +func (_e *RPCInterfaceMock_Expecter) GetWitness(batchNumber interface{}, fullWitness interface{}) *RPCInterfaceMock_GetWitness_Call { + return &RPCInterfaceMock_GetWitness_Call{Call: _e.mock.On("GetWitness", batchNumber, fullWitness)} +} + +func (_c *RPCInterfaceMock_GetWitness_Call) Run(run func(batchNumber uint64, fullWitness bool)) *RPCInterfaceMock_GetWitness_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(bool)) + }) + return _c +} + +func (_c *RPCInterfaceMock_GetWitness_Call) Return(_a0 []byte, _a1 error) *RPCInterfaceMock_GetWitness_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCInterfaceMock_GetWitness_Call) RunAndReturn(run func(uint64, bool) ([]byte, error)) *RPCInterfaceMock_GetWitness_Call { + _c.Call.Return(run) + return _c +} + // NewRPCInterfaceMock creates a new instance of RPCInterfaceMock. 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 NewRPCInterfaceMock(t interface { diff --git a/aggregator/mocks/mock_storage.go b/aggregator/mocks/mock_storage.go index 405cba46..2615f6bc 100644 --- a/aggregator/mocks/mock_storage.go +++ b/aggregator/mocks/mock_storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type StorageInterfaceMock struct { mock.Mock } +type StorageInterfaceMock_Expecter struct { + mock *mock.Mock +} + +func (_m *StorageInterfaceMock) EXPECT() *StorageInterfaceMock_Expecter { + return &StorageInterfaceMock_Expecter{mock: &_m.Mock} +} + // AddGeneratedProof provides a mock function with given fields: ctx, proof, dbTx func (_m *StorageInterfaceMock) AddGeneratedProof(ctx context.Context, proof *state.Proof, dbTx db.Txer) error { ret := _m.Called(ctx, proof, dbTx) @@ -36,6 +44,36 @@ func (_m *StorageInterfaceMock) AddGeneratedProof(ctx context.Context, proof *st return r0 } +// StorageInterfaceMock_AddGeneratedProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddGeneratedProof' +type StorageInterfaceMock_AddGeneratedProof_Call struct { + *mock.Call +} + +// AddGeneratedProof is a helper method to define mock.On call +// - ctx context.Context +// - proof *state.Proof +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) AddGeneratedProof(ctx interface{}, proof interface{}, dbTx interface{}) *StorageInterfaceMock_AddGeneratedProof_Call { + return &StorageInterfaceMock_AddGeneratedProof_Call{Call: _e.mock.On("AddGeneratedProof", ctx, proof, dbTx)} +} + +func (_c *StorageInterfaceMock_AddGeneratedProof_Call) Run(run func(ctx context.Context, proof *state.Proof, dbTx db.Txer)) *StorageInterfaceMock_AddGeneratedProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*state.Proof), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_AddGeneratedProof_Call) Return(_a0 error) *StorageInterfaceMock_AddGeneratedProof_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StorageInterfaceMock_AddGeneratedProof_Call) RunAndReturn(run func(context.Context, *state.Proof, db.Txer) error) *StorageInterfaceMock_AddGeneratedProof_Call { + _c.Call.Return(run) + return _c +} + // AddSequence provides a mock function with given fields: ctx, sequence, dbTx func (_m *StorageInterfaceMock) AddSequence(ctx context.Context, sequence state.Sequence, dbTx db.Txer) error { ret := _m.Called(ctx, sequence, dbTx) @@ -54,6 +92,36 @@ func (_m *StorageInterfaceMock) AddSequence(ctx context.Context, sequence state. return r0 } +// StorageInterfaceMock_AddSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSequence' +type StorageInterfaceMock_AddSequence_Call struct { + *mock.Call +} + +// AddSequence is a helper method to define mock.On call +// - ctx context.Context +// - sequence state.Sequence +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) AddSequence(ctx interface{}, sequence interface{}, dbTx interface{}) *StorageInterfaceMock_AddSequence_Call { + return &StorageInterfaceMock_AddSequence_Call{Call: _e.mock.On("AddSequence", ctx, sequence, dbTx)} +} + +func (_c *StorageInterfaceMock_AddSequence_Call) Run(run func(ctx context.Context, sequence state.Sequence, dbTx db.Txer)) *StorageInterfaceMock_AddSequence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(state.Sequence), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_AddSequence_Call) Return(_a0 error) *StorageInterfaceMock_AddSequence_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StorageInterfaceMock_AddSequence_Call) RunAndReturn(run func(context.Context, state.Sequence, db.Txer) error) *StorageInterfaceMock_AddSequence_Call { + _c.Call.Return(run) + return _c +} + // BeginTx provides a mock function with given fields: ctx, options func (_m *StorageInterfaceMock) BeginTx(ctx context.Context, options *sql.TxOptions) (db.Txer, error) { ret := _m.Called(ctx, options) @@ -84,6 +152,35 @@ func (_m *StorageInterfaceMock) BeginTx(ctx context.Context, options *sql.TxOpti return r0, r1 } +// StorageInterfaceMock_BeginTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginTx' +type StorageInterfaceMock_BeginTx_Call struct { + *mock.Call +} + +// BeginTx is a helper method to define mock.On call +// - ctx context.Context +// - options *sql.TxOptions +func (_e *StorageInterfaceMock_Expecter) BeginTx(ctx interface{}, options interface{}) *StorageInterfaceMock_BeginTx_Call { + return &StorageInterfaceMock_BeginTx_Call{Call: _e.mock.On("BeginTx", ctx, options)} +} + +func (_c *StorageInterfaceMock_BeginTx_Call) Run(run func(ctx context.Context, options *sql.TxOptions)) *StorageInterfaceMock_BeginTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sql.TxOptions)) + }) + return _c +} + +func (_c *StorageInterfaceMock_BeginTx_Call) Return(_a0 db.Txer, _a1 error) *StorageInterfaceMock_BeginTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StorageInterfaceMock_BeginTx_Call) RunAndReturn(run func(context.Context, *sql.TxOptions) (db.Txer, error)) *StorageInterfaceMock_BeginTx_Call { + _c.Call.Return(run) + return _c +} + // CheckProofContainsCompleteSequences provides a mock function with given fields: ctx, proof, dbTx func (_m *StorageInterfaceMock) CheckProofContainsCompleteSequences(ctx context.Context, proof *state.Proof, dbTx db.Txer) (bool, error) { ret := _m.Called(ctx, proof, dbTx) @@ -112,6 +209,36 @@ func (_m *StorageInterfaceMock) CheckProofContainsCompleteSequences(ctx context. return r0, r1 } +// StorageInterfaceMock_CheckProofContainsCompleteSequences_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckProofContainsCompleteSequences' +type StorageInterfaceMock_CheckProofContainsCompleteSequences_Call struct { + *mock.Call +} + +// CheckProofContainsCompleteSequences is a helper method to define mock.On call +// - ctx context.Context +// - proof *state.Proof +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) CheckProofContainsCompleteSequences(ctx interface{}, proof interface{}, dbTx interface{}) *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call { + return &StorageInterfaceMock_CheckProofContainsCompleteSequences_Call{Call: _e.mock.On("CheckProofContainsCompleteSequences", ctx, proof, dbTx)} +} + +func (_c *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call) Run(run func(ctx context.Context, proof *state.Proof, dbTx db.Txer)) *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*state.Proof), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call) Return(_a0 bool, _a1 error) *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call) RunAndReturn(run func(context.Context, *state.Proof, db.Txer) (bool, error)) *StorageInterfaceMock_CheckProofContainsCompleteSequences_Call { + _c.Call.Return(run) + return _c +} + // CheckProofExistsForBatch provides a mock function with given fields: ctx, batchNumber, dbTx func (_m *StorageInterfaceMock) CheckProofExistsForBatch(ctx context.Context, batchNumber uint64, dbTx db.Txer) (bool, error) { ret := _m.Called(ctx, batchNumber, dbTx) @@ -140,6 +267,36 @@ func (_m *StorageInterfaceMock) CheckProofExistsForBatch(ctx context.Context, ba return r0, r1 } +// StorageInterfaceMock_CheckProofExistsForBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckProofExistsForBatch' +type StorageInterfaceMock_CheckProofExistsForBatch_Call struct { + *mock.Call +} + +// CheckProofExistsForBatch is a helper method to define mock.On call +// - ctx context.Context +// - batchNumber uint64 +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) CheckProofExistsForBatch(ctx interface{}, batchNumber interface{}, dbTx interface{}) *StorageInterfaceMock_CheckProofExistsForBatch_Call { + return &StorageInterfaceMock_CheckProofExistsForBatch_Call{Call: _e.mock.On("CheckProofExistsForBatch", ctx, batchNumber, dbTx)} +} + +func (_c *StorageInterfaceMock_CheckProofExistsForBatch_Call) Run(run func(ctx context.Context, batchNumber uint64, dbTx db.Txer)) *StorageInterfaceMock_CheckProofExistsForBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_CheckProofExistsForBatch_Call) Return(_a0 bool, _a1 error) *StorageInterfaceMock_CheckProofExistsForBatch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StorageInterfaceMock_CheckProofExistsForBatch_Call) RunAndReturn(run func(context.Context, uint64, db.Txer) (bool, error)) *StorageInterfaceMock_CheckProofExistsForBatch_Call { + _c.Call.Return(run) + return _c +} + // CleanupGeneratedProofs provides a mock function with given fields: ctx, batchNumber, dbTx func (_m *StorageInterfaceMock) CleanupGeneratedProofs(ctx context.Context, batchNumber uint64, dbTx db.Txer) error { ret := _m.Called(ctx, batchNumber, dbTx) @@ -158,6 +315,36 @@ func (_m *StorageInterfaceMock) CleanupGeneratedProofs(ctx context.Context, batc return r0 } +// StorageInterfaceMock_CleanupGeneratedProofs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupGeneratedProofs' +type StorageInterfaceMock_CleanupGeneratedProofs_Call struct { + *mock.Call +} + +// CleanupGeneratedProofs is a helper method to define mock.On call +// - ctx context.Context +// - batchNumber uint64 +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) CleanupGeneratedProofs(ctx interface{}, batchNumber interface{}, dbTx interface{}) *StorageInterfaceMock_CleanupGeneratedProofs_Call { + return &StorageInterfaceMock_CleanupGeneratedProofs_Call{Call: _e.mock.On("CleanupGeneratedProofs", ctx, batchNumber, dbTx)} +} + +func (_c *StorageInterfaceMock_CleanupGeneratedProofs_Call) Run(run func(ctx context.Context, batchNumber uint64, dbTx db.Txer)) *StorageInterfaceMock_CleanupGeneratedProofs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_CleanupGeneratedProofs_Call) Return(_a0 error) *StorageInterfaceMock_CleanupGeneratedProofs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StorageInterfaceMock_CleanupGeneratedProofs_Call) RunAndReturn(run func(context.Context, uint64, db.Txer) error) *StorageInterfaceMock_CleanupGeneratedProofs_Call { + _c.Call.Return(run) + return _c +} + // CleanupLockedProofs provides a mock function with given fields: ctx, duration, dbTx func (_m *StorageInterfaceMock) CleanupLockedProofs(ctx context.Context, duration string, dbTx db.Txer) (int64, error) { ret := _m.Called(ctx, duration, dbTx) @@ -186,6 +373,36 @@ func (_m *StorageInterfaceMock) CleanupLockedProofs(ctx context.Context, duratio return r0, r1 } +// StorageInterfaceMock_CleanupLockedProofs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CleanupLockedProofs' +type StorageInterfaceMock_CleanupLockedProofs_Call struct { + *mock.Call +} + +// CleanupLockedProofs is a helper method to define mock.On call +// - ctx context.Context +// - duration string +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) CleanupLockedProofs(ctx interface{}, duration interface{}, dbTx interface{}) *StorageInterfaceMock_CleanupLockedProofs_Call { + return &StorageInterfaceMock_CleanupLockedProofs_Call{Call: _e.mock.On("CleanupLockedProofs", ctx, duration, dbTx)} +} + +func (_c *StorageInterfaceMock_CleanupLockedProofs_Call) Run(run func(ctx context.Context, duration string, dbTx db.Txer)) *StorageInterfaceMock_CleanupLockedProofs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_CleanupLockedProofs_Call) Return(_a0 int64, _a1 error) *StorageInterfaceMock_CleanupLockedProofs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StorageInterfaceMock_CleanupLockedProofs_Call) RunAndReturn(run func(context.Context, string, db.Txer) (int64, error)) *StorageInterfaceMock_CleanupLockedProofs_Call { + _c.Call.Return(run) + return _c +} + // DeleteGeneratedProofs provides a mock function with given fields: ctx, batchNumber, batchNumberFinal, dbTx func (_m *StorageInterfaceMock) DeleteGeneratedProofs(ctx context.Context, batchNumber uint64, batchNumberFinal uint64, dbTx db.Txer) error { ret := _m.Called(ctx, batchNumber, batchNumberFinal, dbTx) @@ -204,6 +421,37 @@ func (_m *StorageInterfaceMock) DeleteGeneratedProofs(ctx context.Context, batch return r0 } +// StorageInterfaceMock_DeleteGeneratedProofs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteGeneratedProofs' +type StorageInterfaceMock_DeleteGeneratedProofs_Call struct { + *mock.Call +} + +// DeleteGeneratedProofs is a helper method to define mock.On call +// - ctx context.Context +// - batchNumber uint64 +// - batchNumberFinal uint64 +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) DeleteGeneratedProofs(ctx interface{}, batchNumber interface{}, batchNumberFinal interface{}, dbTx interface{}) *StorageInterfaceMock_DeleteGeneratedProofs_Call { + return &StorageInterfaceMock_DeleteGeneratedProofs_Call{Call: _e.mock.On("DeleteGeneratedProofs", ctx, batchNumber, batchNumberFinal, dbTx)} +} + +func (_c *StorageInterfaceMock_DeleteGeneratedProofs_Call) Run(run func(ctx context.Context, batchNumber uint64, batchNumberFinal uint64, dbTx db.Txer)) *StorageInterfaceMock_DeleteGeneratedProofs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(uint64), args[3].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_DeleteGeneratedProofs_Call) Return(_a0 error) *StorageInterfaceMock_DeleteGeneratedProofs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StorageInterfaceMock_DeleteGeneratedProofs_Call) RunAndReturn(run func(context.Context, uint64, uint64, db.Txer) error) *StorageInterfaceMock_DeleteGeneratedProofs_Call { + _c.Call.Return(run) + return _c +} + // DeleteUngeneratedProofs provides a mock function with given fields: ctx, dbTx func (_m *StorageInterfaceMock) DeleteUngeneratedProofs(ctx context.Context, dbTx db.Txer) error { ret := _m.Called(ctx, dbTx) @@ -222,6 +470,35 @@ func (_m *StorageInterfaceMock) DeleteUngeneratedProofs(ctx context.Context, dbT return r0 } +// StorageInterfaceMock_DeleteUngeneratedProofs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUngeneratedProofs' +type StorageInterfaceMock_DeleteUngeneratedProofs_Call struct { + *mock.Call +} + +// DeleteUngeneratedProofs is a helper method to define mock.On call +// - ctx context.Context +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) DeleteUngeneratedProofs(ctx interface{}, dbTx interface{}) *StorageInterfaceMock_DeleteUngeneratedProofs_Call { + return &StorageInterfaceMock_DeleteUngeneratedProofs_Call{Call: _e.mock.On("DeleteUngeneratedProofs", ctx, dbTx)} +} + +func (_c *StorageInterfaceMock_DeleteUngeneratedProofs_Call) Run(run func(ctx context.Context, dbTx db.Txer)) *StorageInterfaceMock_DeleteUngeneratedProofs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_DeleteUngeneratedProofs_Call) Return(_a0 error) *StorageInterfaceMock_DeleteUngeneratedProofs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StorageInterfaceMock_DeleteUngeneratedProofs_Call) RunAndReturn(run func(context.Context, db.Txer) error) *StorageInterfaceMock_DeleteUngeneratedProofs_Call { + _c.Call.Return(run) + return _c +} + // GetProofReadyToVerify provides a mock function with given fields: ctx, lastVerfiedBatchNumber, dbTx func (_m *StorageInterfaceMock) GetProofReadyToVerify(ctx context.Context, lastVerfiedBatchNumber uint64, dbTx db.Txer) (*state.Proof, error) { ret := _m.Called(ctx, lastVerfiedBatchNumber, dbTx) @@ -252,6 +529,36 @@ func (_m *StorageInterfaceMock) GetProofReadyToVerify(ctx context.Context, lastV return r0, r1 } +// StorageInterfaceMock_GetProofReadyToVerify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProofReadyToVerify' +type StorageInterfaceMock_GetProofReadyToVerify_Call struct { + *mock.Call +} + +// GetProofReadyToVerify is a helper method to define mock.On call +// - ctx context.Context +// - lastVerfiedBatchNumber uint64 +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) GetProofReadyToVerify(ctx interface{}, lastVerfiedBatchNumber interface{}, dbTx interface{}) *StorageInterfaceMock_GetProofReadyToVerify_Call { + return &StorageInterfaceMock_GetProofReadyToVerify_Call{Call: _e.mock.On("GetProofReadyToVerify", ctx, lastVerfiedBatchNumber, dbTx)} +} + +func (_c *StorageInterfaceMock_GetProofReadyToVerify_Call) Run(run func(ctx context.Context, lastVerfiedBatchNumber uint64, dbTx db.Txer)) *StorageInterfaceMock_GetProofReadyToVerify_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_GetProofReadyToVerify_Call) Return(_a0 *state.Proof, _a1 error) *StorageInterfaceMock_GetProofReadyToVerify_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StorageInterfaceMock_GetProofReadyToVerify_Call) RunAndReturn(run func(context.Context, uint64, db.Txer) (*state.Proof, error)) *StorageInterfaceMock_GetProofReadyToVerify_Call { + _c.Call.Return(run) + return _c +} + // GetProofsToAggregate provides a mock function with given fields: ctx, dbTx func (_m *StorageInterfaceMock) GetProofsToAggregate(ctx context.Context, dbTx db.Txer) (*state.Proof, *state.Proof, error) { ret := _m.Called(ctx, dbTx) @@ -291,6 +598,35 @@ func (_m *StorageInterfaceMock) GetProofsToAggregate(ctx context.Context, dbTx d return r0, r1, r2 } +// StorageInterfaceMock_GetProofsToAggregate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProofsToAggregate' +type StorageInterfaceMock_GetProofsToAggregate_Call struct { + *mock.Call +} + +// GetProofsToAggregate is a helper method to define mock.On call +// - ctx context.Context +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) GetProofsToAggregate(ctx interface{}, dbTx interface{}) *StorageInterfaceMock_GetProofsToAggregate_Call { + return &StorageInterfaceMock_GetProofsToAggregate_Call{Call: _e.mock.On("GetProofsToAggregate", ctx, dbTx)} +} + +func (_c *StorageInterfaceMock_GetProofsToAggregate_Call) Run(run func(ctx context.Context, dbTx db.Txer)) *StorageInterfaceMock_GetProofsToAggregate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_GetProofsToAggregate_Call) Return(_a0 *state.Proof, _a1 *state.Proof, _a2 error) *StorageInterfaceMock_GetProofsToAggregate_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *StorageInterfaceMock_GetProofsToAggregate_Call) RunAndReturn(run func(context.Context, db.Txer) (*state.Proof, *state.Proof, error)) *StorageInterfaceMock_GetProofsToAggregate_Call { + _c.Call.Return(run) + return _c +} + // UpdateGeneratedProof provides a mock function with given fields: ctx, proof, dbTx func (_m *StorageInterfaceMock) UpdateGeneratedProof(ctx context.Context, proof *state.Proof, dbTx db.Txer) error { ret := _m.Called(ctx, proof, dbTx) @@ -309,6 +645,36 @@ func (_m *StorageInterfaceMock) UpdateGeneratedProof(ctx context.Context, proof return r0 } +// StorageInterfaceMock_UpdateGeneratedProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateGeneratedProof' +type StorageInterfaceMock_UpdateGeneratedProof_Call struct { + *mock.Call +} + +// UpdateGeneratedProof is a helper method to define mock.On call +// - ctx context.Context +// - proof *state.Proof +// - dbTx db.Txer +func (_e *StorageInterfaceMock_Expecter) UpdateGeneratedProof(ctx interface{}, proof interface{}, dbTx interface{}) *StorageInterfaceMock_UpdateGeneratedProof_Call { + return &StorageInterfaceMock_UpdateGeneratedProof_Call{Call: _e.mock.On("UpdateGeneratedProof", ctx, proof, dbTx)} +} + +func (_c *StorageInterfaceMock_UpdateGeneratedProof_Call) Run(run func(ctx context.Context, proof *state.Proof, dbTx db.Txer)) *StorageInterfaceMock_UpdateGeneratedProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*state.Proof), args[2].(db.Txer)) + }) + return _c +} + +func (_c *StorageInterfaceMock_UpdateGeneratedProof_Call) Return(_a0 error) *StorageInterfaceMock_UpdateGeneratedProof_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StorageInterfaceMock_UpdateGeneratedProof_Call) RunAndReturn(run func(context.Context, *state.Proof, db.Txer) error) *StorageInterfaceMock_UpdateGeneratedProof_Call { + _c.Call.Return(run) + return _c +} + // NewStorageInterfaceMock creates a new instance of StorageInterfaceMock. 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 NewStorageInterfaceMock(t interface { diff --git a/aggregator/mocks/mock_synchronizer.go b/aggregator/mocks/mock_synchronizer.go index 28811e8c..ae7735b1 100644 --- a/aggregator/mocks/mock_synchronizer.go +++ b/aggregator/mocks/mock_synchronizer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type SynchronizerInterfaceMock struct { mock.Mock } +type SynchronizerInterfaceMock_Expecter struct { + mock *mock.Mock +} + +func (_m *SynchronizerInterfaceMock) EXPECT() *SynchronizerInterfaceMock_Expecter { + return &SynchronizerInterfaceMock_Expecter{mock: &_m.Mock} +} + // GetL1BlockByNumber provides a mock function with given fields: ctx, blockNumber func (_m *SynchronizerInterfaceMock) GetL1BlockByNumber(ctx context.Context, blockNumber uint64) (*synchronizer.L1Block, error) { ret := _m.Called(ctx, blockNumber) @@ -47,6 +55,35 @@ func (_m *SynchronizerInterfaceMock) GetL1BlockByNumber(ctx context.Context, blo return r0, r1 } +// SynchronizerInterfaceMock_GetL1BlockByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetL1BlockByNumber' +type SynchronizerInterfaceMock_GetL1BlockByNumber_Call struct { + *mock.Call +} + +// GetL1BlockByNumber is a helper method to define mock.On call +// - ctx context.Context +// - blockNumber uint64 +func (_e *SynchronizerInterfaceMock_Expecter) GetL1BlockByNumber(ctx interface{}, blockNumber interface{}) *SynchronizerInterfaceMock_GetL1BlockByNumber_Call { + return &SynchronizerInterfaceMock_GetL1BlockByNumber_Call{Call: _e.mock.On("GetL1BlockByNumber", ctx, blockNumber)} +} + +func (_c *SynchronizerInterfaceMock_GetL1BlockByNumber_Call) Run(run func(ctx context.Context, blockNumber uint64)) *SynchronizerInterfaceMock_GetL1BlockByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetL1BlockByNumber_Call) Return(_a0 *synchronizer.L1Block, _a1 error) *SynchronizerInterfaceMock_GetL1BlockByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetL1BlockByNumber_Call) RunAndReturn(run func(context.Context, uint64) (*synchronizer.L1Block, error)) *SynchronizerInterfaceMock_GetL1BlockByNumber_Call { + _c.Call.Return(run) + return _c +} + // GetL1InfoRootPerIndex provides a mock function with given fields: ctx, L1InfoTreeIndex func (_m *SynchronizerInterfaceMock) GetL1InfoRootPerIndex(ctx context.Context, L1InfoTreeIndex uint32) (common.Hash, error) { ret := _m.Called(ctx, L1InfoTreeIndex) @@ -77,6 +114,35 @@ func (_m *SynchronizerInterfaceMock) GetL1InfoRootPerIndex(ctx context.Context, return r0, r1 } +// SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetL1InfoRootPerIndex' +type SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call struct { + *mock.Call +} + +// GetL1InfoRootPerIndex is a helper method to define mock.On call +// - ctx context.Context +// - L1InfoTreeIndex uint32 +func (_e *SynchronizerInterfaceMock_Expecter) GetL1InfoRootPerIndex(ctx interface{}, L1InfoTreeIndex interface{}) *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call { + return &SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call{Call: _e.mock.On("GetL1InfoRootPerIndex", ctx, L1InfoTreeIndex)} +} + +func (_c *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call) Run(run func(ctx context.Context, L1InfoTreeIndex uint32)) *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint32)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call) Return(_a0 common.Hash, _a1 error) *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call) RunAndReturn(run func(context.Context, uint32) (common.Hash, error)) *SynchronizerInterfaceMock_GetL1InfoRootPerIndex_Call { + _c.Call.Return(run) + return _c +} + // GetL1InfoTreeLeaves provides a mock function with given fields: ctx, indexLeaves func (_m *SynchronizerInterfaceMock) GetL1InfoTreeLeaves(ctx context.Context, indexLeaves []uint32) (map[uint32]synchronizer.L1InfoTreeLeaf, error) { ret := _m.Called(ctx, indexLeaves) @@ -107,6 +173,35 @@ func (_m *SynchronizerInterfaceMock) GetL1InfoTreeLeaves(ctx context.Context, in return r0, r1 } +// SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetL1InfoTreeLeaves' +type SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call struct { + *mock.Call +} + +// GetL1InfoTreeLeaves is a helper method to define mock.On call +// - ctx context.Context +// - indexLeaves []uint32 +func (_e *SynchronizerInterfaceMock_Expecter) GetL1InfoTreeLeaves(ctx interface{}, indexLeaves interface{}) *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call { + return &SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call{Call: _e.mock.On("GetL1InfoTreeLeaves", ctx, indexLeaves)} +} + +func (_c *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call) Run(run func(ctx context.Context, indexLeaves []uint32)) *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]uint32)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call) Return(_a0 map[uint32]synchronizer.L1InfoTreeLeaf, _a1 error) *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call) RunAndReturn(run func(context.Context, []uint32) (map[uint32]synchronizer.L1InfoTreeLeaf, error)) *SynchronizerInterfaceMock_GetL1InfoTreeLeaves_Call { + _c.Call.Return(run) + return _c +} + // GetLastL1Block provides a mock function with given fields: ctx func (_m *SynchronizerInterfaceMock) GetLastL1Block(ctx context.Context) (*synchronizer.L1Block, error) { ret := _m.Called(ctx) @@ -137,6 +232,34 @@ func (_m *SynchronizerInterfaceMock) GetLastL1Block(ctx context.Context) (*synch return r0, r1 } +// SynchronizerInterfaceMock_GetLastL1Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastL1Block' +type SynchronizerInterfaceMock_GetLastL1Block_Call struct { + *mock.Call +} + +// GetLastL1Block is a helper method to define mock.On call +// - ctx context.Context +func (_e *SynchronizerInterfaceMock_Expecter) GetLastL1Block(ctx interface{}) *SynchronizerInterfaceMock_GetLastL1Block_Call { + return &SynchronizerInterfaceMock_GetLastL1Block_Call{Call: _e.mock.On("GetLastL1Block", ctx)} +} + +func (_c *SynchronizerInterfaceMock_GetLastL1Block_Call) Run(run func(ctx context.Context)) *SynchronizerInterfaceMock_GetLastL1Block_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetLastL1Block_Call) Return(_a0 *synchronizer.L1Block, _a1 error) *SynchronizerInterfaceMock_GetLastL1Block_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetLastL1Block_Call) RunAndReturn(run func(context.Context) (*synchronizer.L1Block, error)) *SynchronizerInterfaceMock_GetLastL1Block_Call { + _c.Call.Return(run) + return _c +} + // GetLastestVirtualBatchNumber provides a mock function with given fields: ctx func (_m *SynchronizerInterfaceMock) GetLastestVirtualBatchNumber(ctx context.Context) (uint64, error) { ret := _m.Called(ctx) @@ -165,6 +288,34 @@ func (_m *SynchronizerInterfaceMock) GetLastestVirtualBatchNumber(ctx context.Co return r0, r1 } +// SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastestVirtualBatchNumber' +type SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call struct { + *mock.Call +} + +// GetLastestVirtualBatchNumber is a helper method to define mock.On call +// - ctx context.Context +func (_e *SynchronizerInterfaceMock_Expecter) GetLastestVirtualBatchNumber(ctx interface{}) *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call { + return &SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call{Call: _e.mock.On("GetLastestVirtualBatchNumber", ctx)} +} + +func (_c *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call) Run(run func(ctx context.Context)) *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call) Return(_a0 uint64, _a1 error) *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call) RunAndReturn(run func(context.Context) (uint64, error)) *SynchronizerInterfaceMock_GetLastestVirtualBatchNumber_Call { + _c.Call.Return(run) + return _c +} + // GetLeafsByL1InfoRoot provides a mock function with given fields: ctx, l1InfoRoot func (_m *SynchronizerInterfaceMock) GetLeafsByL1InfoRoot(ctx context.Context, l1InfoRoot common.Hash) ([]synchronizer.L1InfoTreeLeaf, error) { ret := _m.Called(ctx, l1InfoRoot) @@ -195,6 +346,35 @@ func (_m *SynchronizerInterfaceMock) GetLeafsByL1InfoRoot(ctx context.Context, l return r0, r1 } +// SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLeafsByL1InfoRoot' +type SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call struct { + *mock.Call +} + +// GetLeafsByL1InfoRoot is a helper method to define mock.On call +// - ctx context.Context +// - l1InfoRoot common.Hash +func (_e *SynchronizerInterfaceMock_Expecter) GetLeafsByL1InfoRoot(ctx interface{}, l1InfoRoot interface{}) *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call { + return &SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call{Call: _e.mock.On("GetLeafsByL1InfoRoot", ctx, l1InfoRoot)} +} + +func (_c *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call) Run(run func(ctx context.Context, l1InfoRoot common.Hash)) *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call) Return(_a0 []synchronizer.L1InfoTreeLeaf, _a1 error) *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call) RunAndReturn(run func(context.Context, common.Hash) ([]synchronizer.L1InfoTreeLeaf, error)) *SynchronizerInterfaceMock_GetLeafsByL1InfoRoot_Call { + _c.Call.Return(run) + return _c +} + // GetSequenceByBatchNumber provides a mock function with given fields: ctx, batchNumber func (_m *SynchronizerInterfaceMock) GetSequenceByBatchNumber(ctx context.Context, batchNumber uint64) (*synchronizer.SequencedBatches, error) { ret := _m.Called(ctx, batchNumber) @@ -225,6 +405,35 @@ func (_m *SynchronizerInterfaceMock) GetSequenceByBatchNumber(ctx context.Contex return r0, r1 } +// SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSequenceByBatchNumber' +type SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call struct { + *mock.Call +} + +// GetSequenceByBatchNumber is a helper method to define mock.On call +// - ctx context.Context +// - batchNumber uint64 +func (_e *SynchronizerInterfaceMock_Expecter) GetSequenceByBatchNumber(ctx interface{}, batchNumber interface{}) *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call { + return &SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call{Call: _e.mock.On("GetSequenceByBatchNumber", ctx, batchNumber)} +} + +func (_c *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call) Run(run func(ctx context.Context, batchNumber uint64)) *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call) Return(_a0 *synchronizer.SequencedBatches, _a1 error) *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call) RunAndReturn(run func(context.Context, uint64) (*synchronizer.SequencedBatches, error)) *SynchronizerInterfaceMock_GetSequenceByBatchNumber_Call { + _c.Call.Return(run) + return _c +} + // GetVirtualBatchByBatchNumber provides a mock function with given fields: ctx, batchNumber func (_m *SynchronizerInterfaceMock) GetVirtualBatchByBatchNumber(ctx context.Context, batchNumber uint64) (*synchronizer.VirtualBatch, error) { ret := _m.Called(ctx, batchNumber) @@ -255,7 +464,36 @@ func (_m *SynchronizerInterfaceMock) GetVirtualBatchByBatchNumber(ctx context.Co return r0, r1 } -// IsSynced provides a mock function with given fields: +// SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVirtualBatchByBatchNumber' +type SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call struct { + *mock.Call +} + +// GetVirtualBatchByBatchNumber is a helper method to define mock.On call +// - ctx context.Context +// - batchNumber uint64 +func (_e *SynchronizerInterfaceMock_Expecter) GetVirtualBatchByBatchNumber(ctx interface{}, batchNumber interface{}) *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call { + return &SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call{Call: _e.mock.On("GetVirtualBatchByBatchNumber", ctx, batchNumber)} +} + +func (_c *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call) Run(run func(ctx context.Context, batchNumber uint64)) *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call) Return(_a0 *synchronizer.VirtualBatch, _a1 error) *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call) RunAndReturn(run func(context.Context, uint64) (*synchronizer.VirtualBatch, error)) *SynchronizerInterfaceMock_GetVirtualBatchByBatchNumber_Call { + _c.Call.Return(run) + return _c +} + +// IsSynced provides a mock function with no fields func (_m *SynchronizerInterfaceMock) IsSynced() bool { ret := _m.Called() @@ -273,21 +511,131 @@ func (_m *SynchronizerInterfaceMock) IsSynced() bool { return r0 } +// SynchronizerInterfaceMock_IsSynced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSynced' +type SynchronizerInterfaceMock_IsSynced_Call struct { + *mock.Call +} + +// IsSynced is a helper method to define mock.On call +func (_e *SynchronizerInterfaceMock_Expecter) IsSynced() *SynchronizerInterfaceMock_IsSynced_Call { + return &SynchronizerInterfaceMock_IsSynced_Call{Call: _e.mock.On("IsSynced")} +} + +func (_c *SynchronizerInterfaceMock_IsSynced_Call) Run(run func()) *SynchronizerInterfaceMock_IsSynced_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_IsSynced_Call) Return(_a0 bool) *SynchronizerInterfaceMock_IsSynced_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *SynchronizerInterfaceMock_IsSynced_Call) RunAndReturn(run func() bool) *SynchronizerInterfaceMock_IsSynced_Call { + _c.Call.Return(run) + return _c +} + // SetCallbackOnReorgDone provides a mock function with given fields: callback func (_m *SynchronizerInterfaceMock) SetCallbackOnReorgDone(callback func(synchronizer.ReorgExecutionResult)) { _m.Called(callback) } +// SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCallbackOnReorgDone' +type SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call struct { + *mock.Call +} + +// SetCallbackOnReorgDone is a helper method to define mock.On call +// - callback func(synchronizer.ReorgExecutionResult) +func (_e *SynchronizerInterfaceMock_Expecter) SetCallbackOnReorgDone(callback interface{}) *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call { + return &SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call{Call: _e.mock.On("SetCallbackOnReorgDone", callback)} +} + +func (_c *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call) Run(run func(callback func(synchronizer.ReorgExecutionResult))) *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func(synchronizer.ReorgExecutionResult))) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call) Return() *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call { + _c.Call.Return() + return _c +} + +func (_c *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call) RunAndReturn(run func(func(synchronizer.ReorgExecutionResult))) *SynchronizerInterfaceMock_SetCallbackOnReorgDone_Call { + _c.Run(run) + return _c +} + // SetCallbackOnRollbackBatches provides a mock function with given fields: callback func (_m *SynchronizerInterfaceMock) SetCallbackOnRollbackBatches(callback func(synchronizer.RollbackBatchesData)) { _m.Called(callback) } -// Stop provides a mock function with given fields: +// SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCallbackOnRollbackBatches' +type SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call struct { + *mock.Call +} + +// SetCallbackOnRollbackBatches is a helper method to define mock.On call +// - callback func(synchronizer.RollbackBatchesData) +func (_e *SynchronizerInterfaceMock_Expecter) SetCallbackOnRollbackBatches(callback interface{}) *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call { + return &SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call{Call: _e.mock.On("SetCallbackOnRollbackBatches", callback)} +} + +func (_c *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call) Run(run func(callback func(synchronizer.RollbackBatchesData))) *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func(synchronizer.RollbackBatchesData))) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call) Return() *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call { + _c.Call.Return() + return _c +} + +func (_c *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call) RunAndReturn(run func(func(synchronizer.RollbackBatchesData))) *SynchronizerInterfaceMock_SetCallbackOnRollbackBatches_Call { + _c.Run(run) + return _c +} + +// Stop provides a mock function with no fields func (_m *SynchronizerInterfaceMock) Stop() { _m.Called() } +// SynchronizerInterfaceMock_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' +type SynchronizerInterfaceMock_Stop_Call struct { + *mock.Call +} + +// Stop is a helper method to define mock.On call +func (_e *SynchronizerInterfaceMock_Expecter) Stop() *SynchronizerInterfaceMock_Stop_Call { + return &SynchronizerInterfaceMock_Stop_Call{Call: _e.mock.On("Stop")} +} + +func (_c *SynchronizerInterfaceMock_Stop_Call) Run(run func()) *SynchronizerInterfaceMock_Stop_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_Stop_Call) Return() *SynchronizerInterfaceMock_Stop_Call { + _c.Call.Return() + return _c +} + +func (_c *SynchronizerInterfaceMock_Stop_Call) RunAndReturn(run func()) *SynchronizerInterfaceMock_Stop_Call { + _c.Run(run) + return _c +} + // Sync provides a mock function with given fields: returnOnSync func (_m *SynchronizerInterfaceMock) Sync(returnOnSync bool) error { ret := _m.Called(returnOnSync) @@ -306,6 +654,34 @@ func (_m *SynchronizerInterfaceMock) Sync(returnOnSync bool) error { return r0 } +// SynchronizerInterfaceMock_Sync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sync' +type SynchronizerInterfaceMock_Sync_Call struct { + *mock.Call +} + +// Sync is a helper method to define mock.On call +// - returnOnSync bool +func (_e *SynchronizerInterfaceMock_Expecter) Sync(returnOnSync interface{}) *SynchronizerInterfaceMock_Sync_Call { + return &SynchronizerInterfaceMock_Sync_Call{Call: _e.mock.On("Sync", returnOnSync)} +} + +func (_c *SynchronizerInterfaceMock_Sync_Call) Run(run func(returnOnSync bool)) *SynchronizerInterfaceMock_Sync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool)) + }) + return _c +} + +func (_c *SynchronizerInterfaceMock_Sync_Call) Return(_a0 error) *SynchronizerInterfaceMock_Sync_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *SynchronizerInterfaceMock_Sync_Call) RunAndReturn(run func(bool) error) *SynchronizerInterfaceMock_Sync_Call { + _c.Call.Return(run) + return _c +} + // NewSynchronizerInterfaceMock creates a new instance of SynchronizerInterfaceMock. 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 NewSynchronizerInterfaceMock(t interface { diff --git a/aggregator/mocks/mock_txer.go b/aggregator/mocks/mock_txer.go index 1de07124..39a98d03 100644 --- a/aggregator/mocks/mock_txer.go +++ b/aggregator/mocks/mock_txer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,17 +13,81 @@ type TxerMock struct { mock.Mock } +type TxerMock_Expecter struct { + mock *mock.Mock +} + +func (_m *TxerMock) EXPECT() *TxerMock_Expecter { + return &TxerMock_Expecter{mock: &_m.Mock} +} + // AddCommitCallback provides a mock function with given fields: cb func (_m *TxerMock) AddCommitCallback(cb func()) { _m.Called(cb) } +// TxerMock_AddCommitCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddCommitCallback' +type TxerMock_AddCommitCallback_Call struct { + *mock.Call +} + +// AddCommitCallback is a helper method to define mock.On call +// - cb func() +func (_e *TxerMock_Expecter) AddCommitCallback(cb interface{}) *TxerMock_AddCommitCallback_Call { + return &TxerMock_AddCommitCallback_Call{Call: _e.mock.On("AddCommitCallback", cb)} +} + +func (_c *TxerMock_AddCommitCallback_Call) Run(run func(cb func())) *TxerMock_AddCommitCallback_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func())) + }) + return _c +} + +func (_c *TxerMock_AddCommitCallback_Call) Return() *TxerMock_AddCommitCallback_Call { + _c.Call.Return() + return _c +} + +func (_c *TxerMock_AddCommitCallback_Call) RunAndReturn(run func(func())) *TxerMock_AddCommitCallback_Call { + _c.Run(run) + return _c +} + // AddRollbackCallback provides a mock function with given fields: cb func (_m *TxerMock) AddRollbackCallback(cb func()) { _m.Called(cb) } -// Commit provides a mock function with given fields: +// TxerMock_AddRollbackCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddRollbackCallback' +type TxerMock_AddRollbackCallback_Call struct { + *mock.Call +} + +// AddRollbackCallback is a helper method to define mock.On call +// - cb func() +func (_e *TxerMock_Expecter) AddRollbackCallback(cb interface{}) *TxerMock_AddRollbackCallback_Call { + return &TxerMock_AddRollbackCallback_Call{Call: _e.mock.On("AddRollbackCallback", cb)} +} + +func (_c *TxerMock_AddRollbackCallback_Call) Run(run func(cb func())) *TxerMock_AddRollbackCallback_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func())) + }) + return _c +} + +func (_c *TxerMock_AddRollbackCallback_Call) Return() *TxerMock_AddRollbackCallback_Call { + _c.Call.Return() + return _c +} + +func (_c *TxerMock_AddRollbackCallback_Call) RunAndReturn(run func(func())) *TxerMock_AddRollbackCallback_Call { + _c.Run(run) + return _c +} + +// Commit provides a mock function with no fields func (_m *TxerMock) Commit() error { ret := _m.Called() @@ -41,6 +105,33 @@ func (_m *TxerMock) Commit() error { return r0 } +// TxerMock_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit' +type TxerMock_Commit_Call struct { + *mock.Call +} + +// Commit is a helper method to define mock.On call +func (_e *TxerMock_Expecter) Commit() *TxerMock_Commit_Call { + return &TxerMock_Commit_Call{Call: _e.mock.On("Commit")} +} + +func (_c *TxerMock_Commit_Call) Run(run func()) *TxerMock_Commit_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxerMock_Commit_Call) Return(_a0 error) *TxerMock_Commit_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxerMock_Commit_Call) RunAndReturn(run func() error) *TxerMock_Commit_Call { + _c.Call.Return(run) + return _c +} + // Exec provides a mock function with given fields: query, args func (_m *TxerMock) Exec(query string, args ...interface{}) (sql.Result, error) { var _ca []interface{} @@ -74,6 +165,42 @@ func (_m *TxerMock) Exec(query string, args ...interface{}) (sql.Result, error) return r0, r1 } +// TxerMock_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec' +type TxerMock_Exec_Call struct { + *mock.Call +} + +// Exec is a helper method to define mock.On call +// - query string +// - args ...interface{} +func (_e *TxerMock_Expecter) Exec(query interface{}, args ...interface{}) *TxerMock_Exec_Call { + return &TxerMock_Exec_Call{Call: _e.mock.On("Exec", + append([]interface{}{query}, args...)...)} +} + +func (_c *TxerMock_Exec_Call) Run(run func(query string, args ...interface{})) *TxerMock_Exec_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *TxerMock_Exec_Call) Return(_a0 sql.Result, _a1 error) *TxerMock_Exec_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxerMock_Exec_Call) RunAndReturn(run func(string, ...interface{}) (sql.Result, error)) *TxerMock_Exec_Call { + _c.Call.Return(run) + return _c +} + // Query provides a mock function with given fields: query, args func (_m *TxerMock) Query(query string, args ...interface{}) (*sql.Rows, error) { var _ca []interface{} @@ -107,6 +234,42 @@ func (_m *TxerMock) Query(query string, args ...interface{}) (*sql.Rows, error) return r0, r1 } +// TxerMock_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' +type TxerMock_Query_Call struct { + *mock.Call +} + +// Query is a helper method to define mock.On call +// - query string +// - args ...interface{} +func (_e *TxerMock_Expecter) Query(query interface{}, args ...interface{}) *TxerMock_Query_Call { + return &TxerMock_Query_Call{Call: _e.mock.On("Query", + append([]interface{}{query}, args...)...)} +} + +func (_c *TxerMock_Query_Call) Run(run func(query string, args ...interface{})) *TxerMock_Query_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *TxerMock_Query_Call) Return(_a0 *sql.Rows, _a1 error) *TxerMock_Query_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxerMock_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *TxerMock_Query_Call { + _c.Call.Return(run) + return _c +} + // QueryRow provides a mock function with given fields: query, args func (_m *TxerMock) QueryRow(query string, args ...interface{}) *sql.Row { var _ca []interface{} @@ -130,7 +293,43 @@ func (_m *TxerMock) QueryRow(query string, args ...interface{}) *sql.Row { return r0 } -// Rollback provides a mock function with given fields: +// TxerMock_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow' +type TxerMock_QueryRow_Call struct { + *mock.Call +} + +// QueryRow is a helper method to define mock.On call +// - query string +// - args ...interface{} +func (_e *TxerMock_Expecter) QueryRow(query interface{}, args ...interface{}) *TxerMock_QueryRow_Call { + return &TxerMock_QueryRow_Call{Call: _e.mock.On("QueryRow", + append([]interface{}{query}, args...)...)} +} + +func (_c *TxerMock_QueryRow_Call) Run(run func(query string, args ...interface{})) *TxerMock_QueryRow_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *TxerMock_QueryRow_Call) Return(_a0 *sql.Row) *TxerMock_QueryRow_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxerMock_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *TxerMock_QueryRow_Call { + _c.Call.Return(run) + return _c +} + +// Rollback provides a mock function with no fields func (_m *TxerMock) Rollback() error { ret := _m.Called() @@ -148,6 +347,33 @@ func (_m *TxerMock) Rollback() error { return r0 } +// TxerMock_Rollback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rollback' +type TxerMock_Rollback_Call struct { + *mock.Call +} + +// Rollback is a helper method to define mock.On call +func (_e *TxerMock_Expecter) Rollback() *TxerMock_Rollback_Call { + return &TxerMock_Rollback_Call{Call: _e.mock.On("Rollback")} +} + +func (_c *TxerMock_Rollback_Call) Run(run func()) *TxerMock_Rollback_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxerMock_Rollback_Call) Return(_a0 error) *TxerMock_Rollback_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxerMock_Rollback_Call) RunAndReturn(run func() error) *TxerMock_Rollback_Call { + _c.Call.Return(run) + return _c +} + // NewTxerMock creates a new instance of TxerMock. 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 NewTxerMock(t interface { diff --git a/aggregator/prover/mocks/mock_channel.go b/aggregator/prover/mocks/mock_channel.go index d125896d..9ed3c47b 100644 --- a/aggregator/prover/mocks/mock_channel.go +++ b/aggregator/prover/mocks/mock_channel.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -16,7 +16,15 @@ type ChannelMock struct { mock.Mock } -// Context provides a mock function with given fields: +type ChannelMock_Expecter struct { + mock *mock.Mock +} + +func (_m *ChannelMock) EXPECT() *ChannelMock_Expecter { + return &ChannelMock_Expecter{mock: &_m.Mock} +} + +// Context provides a mock function with no fields func (_m *ChannelMock) Context() context.Context { ret := _m.Called() @@ -36,7 +44,34 @@ func (_m *ChannelMock) Context() context.Context { return r0 } -// Recv provides a mock function with given fields: +// ChannelMock_Context_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Context' +type ChannelMock_Context_Call struct { + *mock.Call +} + +// Context is a helper method to define mock.On call +func (_e *ChannelMock_Expecter) Context() *ChannelMock_Context_Call { + return &ChannelMock_Context_Call{Call: _e.mock.On("Context")} +} + +func (_c *ChannelMock_Context_Call) Run(run func()) *ChannelMock_Context_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChannelMock_Context_Call) Return(_a0 context.Context) *ChannelMock_Context_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChannelMock_Context_Call) RunAndReturn(run func() context.Context) *ChannelMock_Context_Call { + _c.Call.Return(run) + return _c +} + +// Recv provides a mock function with no fields func (_m *ChannelMock) Recv() (*prover.ProverMessage, error) { ret := _m.Called() @@ -66,6 +101,33 @@ func (_m *ChannelMock) Recv() (*prover.ProverMessage, error) { return r0, r1 } +// ChannelMock_Recv_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Recv' +type ChannelMock_Recv_Call struct { + *mock.Call +} + +// Recv is a helper method to define mock.On call +func (_e *ChannelMock_Expecter) Recv() *ChannelMock_Recv_Call { + return &ChannelMock_Recv_Call{Call: _e.mock.On("Recv")} +} + +func (_c *ChannelMock_Recv_Call) Run(run func()) *ChannelMock_Recv_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChannelMock_Recv_Call) Return(_a0 *prover.ProverMessage, _a1 error) *ChannelMock_Recv_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ChannelMock_Recv_Call) RunAndReturn(run func() (*prover.ProverMessage, error)) *ChannelMock_Recv_Call { + _c.Call.Return(run) + return _c +} + // RecvMsg provides a mock function with given fields: m func (_m *ChannelMock) RecvMsg(m interface{}) error { ret := _m.Called(m) @@ -84,6 +146,34 @@ func (_m *ChannelMock) RecvMsg(m interface{}) error { return r0 } +// ChannelMock_RecvMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecvMsg' +type ChannelMock_RecvMsg_Call struct { + *mock.Call +} + +// RecvMsg is a helper method to define mock.On call +// - m interface{} +func (_e *ChannelMock_Expecter) RecvMsg(m interface{}) *ChannelMock_RecvMsg_Call { + return &ChannelMock_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} +} + +func (_c *ChannelMock_RecvMsg_Call) Run(run func(m interface{})) *ChannelMock_RecvMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *ChannelMock_RecvMsg_Call) Return(_a0 error) *ChannelMock_RecvMsg_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChannelMock_RecvMsg_Call) RunAndReturn(run func(interface{}) error) *ChannelMock_RecvMsg_Call { + _c.Call.Return(run) + return _c +} + // Send provides a mock function with given fields: _a0 func (_m *ChannelMock) Send(_a0 *prover.AggregatorMessage) error { ret := _m.Called(_a0) @@ -102,6 +192,34 @@ func (_m *ChannelMock) Send(_a0 *prover.AggregatorMessage) error { return r0 } +// ChannelMock_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type ChannelMock_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - _a0 *prover.AggregatorMessage +func (_e *ChannelMock_Expecter) Send(_a0 interface{}) *ChannelMock_Send_Call { + return &ChannelMock_Send_Call{Call: _e.mock.On("Send", _a0)} +} + +func (_c *ChannelMock_Send_Call) Run(run func(_a0 *prover.AggregatorMessage)) *ChannelMock_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*prover.AggregatorMessage)) + }) + return _c +} + +func (_c *ChannelMock_Send_Call) Return(_a0 error) *ChannelMock_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChannelMock_Send_Call) RunAndReturn(run func(*prover.AggregatorMessage) error) *ChannelMock_Send_Call { + _c.Call.Return(run) + return _c +} + // SendHeader provides a mock function with given fields: _a0 func (_m *ChannelMock) SendHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) @@ -120,6 +238,34 @@ func (_m *ChannelMock) SendHeader(_a0 metadata.MD) error { return r0 } +// ChannelMock_SendHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendHeader' +type ChannelMock_SendHeader_Call struct { + *mock.Call +} + +// SendHeader is a helper method to define mock.On call +// - _a0 metadata.MD +func (_e *ChannelMock_Expecter) SendHeader(_a0 interface{}) *ChannelMock_SendHeader_Call { + return &ChannelMock_SendHeader_Call{Call: _e.mock.On("SendHeader", _a0)} +} + +func (_c *ChannelMock_SendHeader_Call) Run(run func(_a0 metadata.MD)) *ChannelMock_SendHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(metadata.MD)) + }) + return _c +} + +func (_c *ChannelMock_SendHeader_Call) Return(_a0 error) *ChannelMock_SendHeader_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChannelMock_SendHeader_Call) RunAndReturn(run func(metadata.MD) error) *ChannelMock_SendHeader_Call { + _c.Call.Return(run) + return _c +} + // SendMsg provides a mock function with given fields: m func (_m *ChannelMock) SendMsg(m interface{}) error { ret := _m.Called(m) @@ -138,6 +284,34 @@ func (_m *ChannelMock) SendMsg(m interface{}) error { return r0 } +// ChannelMock_SendMsg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMsg' +type ChannelMock_SendMsg_Call struct { + *mock.Call +} + +// SendMsg is a helper method to define mock.On call +// - m interface{} +func (_e *ChannelMock_Expecter) SendMsg(m interface{}) *ChannelMock_SendMsg_Call { + return &ChannelMock_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} +} + +func (_c *ChannelMock_SendMsg_Call) Run(run func(m interface{})) *ChannelMock_SendMsg_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *ChannelMock_SendMsg_Call) Return(_a0 error) *ChannelMock_SendMsg_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChannelMock_SendMsg_Call) RunAndReturn(run func(interface{}) error) *ChannelMock_SendMsg_Call { + _c.Call.Return(run) + return _c +} + // SetHeader provides a mock function with given fields: _a0 func (_m *ChannelMock) SetHeader(_a0 metadata.MD) error { ret := _m.Called(_a0) @@ -156,11 +330,67 @@ func (_m *ChannelMock) SetHeader(_a0 metadata.MD) error { return r0 } +// ChannelMock_SetHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHeader' +type ChannelMock_SetHeader_Call struct { + *mock.Call +} + +// SetHeader is a helper method to define mock.On call +// - _a0 metadata.MD +func (_e *ChannelMock_Expecter) SetHeader(_a0 interface{}) *ChannelMock_SetHeader_Call { + return &ChannelMock_SetHeader_Call{Call: _e.mock.On("SetHeader", _a0)} +} + +func (_c *ChannelMock_SetHeader_Call) Run(run func(_a0 metadata.MD)) *ChannelMock_SetHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(metadata.MD)) + }) + return _c +} + +func (_c *ChannelMock_SetHeader_Call) Return(_a0 error) *ChannelMock_SetHeader_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChannelMock_SetHeader_Call) RunAndReturn(run func(metadata.MD) error) *ChannelMock_SetHeader_Call { + _c.Call.Return(run) + return _c +} + // SetTrailer provides a mock function with given fields: _a0 func (_m *ChannelMock) SetTrailer(_a0 metadata.MD) { _m.Called(_a0) } +// ChannelMock_SetTrailer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTrailer' +type ChannelMock_SetTrailer_Call struct { + *mock.Call +} + +// SetTrailer is a helper method to define mock.On call +// - _a0 metadata.MD +func (_e *ChannelMock_Expecter) SetTrailer(_a0 interface{}) *ChannelMock_SetTrailer_Call { + return &ChannelMock_SetTrailer_Call{Call: _e.mock.On("SetTrailer", _a0)} +} + +func (_c *ChannelMock_SetTrailer_Call) Run(run func(_a0 metadata.MD)) *ChannelMock_SetTrailer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(metadata.MD)) + }) + return _c +} + +func (_c *ChannelMock_SetTrailer_Call) Return() *ChannelMock_SetTrailer_Call { + _c.Call.Return() + return _c +} + +func (_c *ChannelMock_SetTrailer_Call) RunAndReturn(run func(metadata.MD)) *ChannelMock_SetTrailer_Call { + _c.Run(run) + return _c +} + // NewChannelMock creates a new instance of ChannelMock. 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 NewChannelMock(t interface { diff --git a/aggsender/mocks/agg_sender_storage.go b/aggsender/mocks/agg_sender_storage.go index b6337180..9c0d20a6 100644 --- a/aggsender/mocks/agg_sender_storage.go +++ b/aggsender/mocks/agg_sender_storage.go @@ -189,7 +189,7 @@ func (_c *AggSenderStorage_GetCertificatesByStatus_Call) RunAndReturn(run func([ return _c } -// GetLastSentCertificate provides a mock function with given fields: +// GetLastSentCertificate provides a mock function with no fields func (_m *AggSenderStorage) GetLastSentCertificate() (*types.CertificateInfo, error) { ret := _m.Called() diff --git a/aggsender/mocks/block_notifier.go b/aggsender/mocks/block_notifier.go index f8fc556d..24d751b3 100644 --- a/aggsender/mocks/block_notifier.go +++ b/aggsender/mocks/block_notifier.go @@ -20,7 +20,7 @@ func (_m *BlockNotifier) EXPECT() *BlockNotifier_Expecter { return &BlockNotifier_Expecter{mock: &_m.Mock} } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *BlockNotifier) String() string { ret := _m.Called() diff --git a/aggsender/mocks/epoch_notifier.go b/aggsender/mocks/epoch_notifier.go index fb8bf35f..0da06d93 100644 --- a/aggsender/mocks/epoch_notifier.go +++ b/aggsender/mocks/epoch_notifier.go @@ -51,11 +51,11 @@ func (_c *EpochNotifier_Start_Call) Return() *EpochNotifier_Start_Call { } func (_c *EpochNotifier_Start_Call) RunAndReturn(run func(context.Context)) *EpochNotifier_Start_Call { - _c.Call.Return(run) + _c.Run(run) return _c } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *EpochNotifier) String() string { ret := _m.Called() diff --git a/aggsender/mocks/generic_subscriber.go b/aggsender/mocks/generic_subscriber.go index b4bee4b4..59a27642 100644 --- a/aggsender/mocks/generic_subscriber.go +++ b/aggsender/mocks/generic_subscriber.go @@ -46,7 +46,7 @@ func (_c *GenericSubscriber_Publish_Call[T]) Return() *GenericSubscriber_Publish } func (_c *GenericSubscriber_Publish_Call[T]) RunAndReturn(run func(T)) *GenericSubscriber_Publish_Call[T] { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/aggsender/mocks/l2_bridge_syncer.go b/aggsender/mocks/l2_bridge_syncer.go index 800007ff..b8eeb084 100644 --- a/aggsender/mocks/l2_bridge_syncer.go +++ b/aggsender/mocks/l2_bridge_syncer.go @@ -28,7 +28,7 @@ func (_m *L2BridgeSyncer) EXPECT() *L2BridgeSyncer_Expecter { return &L2BridgeSyncer_Expecter{mock: &_m.Mock} } -// BlockFinality provides a mock function with given fields: +// BlockFinality provides a mock function with no fields func (_m *L2BridgeSyncer) BlockFinality() etherman.BlockNumberFinality { ret := _m.Called() @@ -363,7 +363,7 @@ func (_c *L2BridgeSyncer_GetLastProcessedBlock_Call) RunAndReturn(run func(conte return _c } -// OriginNetwork provides a mock function with given fields: +// OriginNetwork provides a mock function with no fields func (_m *L2BridgeSyncer) OriginNetwork() uint32 { ret := _m.Called() diff --git a/aggsender/mocks/logger.go b/aggsender/mocks/logger.go index 54be6942..b2a845ca 100644 --- a/aggsender/mocks/logger.go +++ b/aggsender/mocks/logger.go @@ -55,7 +55,7 @@ func (_c *Logger_Debug_Call) Return() *Logger_Debug_Call { } func (_c *Logger_Debug_Call) RunAndReturn(run func(...interface{})) *Logger_Debug_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -99,7 +99,7 @@ func (_c *Logger_Debugf_Call) Return() *Logger_Debugf_Call { } func (_c *Logger_Debugf_Call) RunAndReturn(run func(string, ...interface{})) *Logger_Debugf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -141,7 +141,7 @@ func (_c *Logger_Error_Call) Return() *Logger_Error_Call { } func (_c *Logger_Error_Call) RunAndReturn(run func(...interface{})) *Logger_Error_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -185,7 +185,7 @@ func (_c *Logger_Errorf_Call) Return() *Logger_Errorf_Call { } func (_c *Logger_Errorf_Call) RunAndReturn(run func(string, ...interface{})) *Logger_Errorf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -229,7 +229,7 @@ func (_c *Logger_Fatalf_Call) Return() *Logger_Fatalf_Call { } func (_c *Logger_Fatalf_Call) RunAndReturn(run func(string, ...interface{})) *Logger_Fatalf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -271,7 +271,7 @@ func (_c *Logger_Info_Call) Return() *Logger_Info_Call { } func (_c *Logger_Info_Call) RunAndReturn(run func(...interface{})) *Logger_Info_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -315,7 +315,7 @@ func (_c *Logger_Infof_Call) Return() *Logger_Infof_Call { } func (_c *Logger_Infof_Call) RunAndReturn(run func(string, ...interface{})) *Logger_Infof_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -357,7 +357,7 @@ func (_c *Logger_Warn_Call) Return() *Logger_Warn_Call { } func (_c *Logger_Warn_Call) RunAndReturn(run func(...interface{})) *Logger_Warn_Call { - _c.Call.Return(run) + _c.Run(run) return _c } @@ -401,7 +401,7 @@ func (_c *Logger_Warnf_Call) Return() *Logger_Warnf_Call { } func (_c *Logger_Warnf_Call) RunAndReturn(run func(string, ...interface{})) *Logger_Warnf_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/bridgesync/mocks/bridge_contractor.go b/bridgesync/mocks/bridge_contractor.go deleted file mode 100644 index fd559850..00000000 --- a/bridgesync/mocks/bridge_contractor.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package mocks_bridgesync - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// BridgeContractor is an autogenerated mock type for the BridgeContractor type -type BridgeContractor struct { - mock.Mock -} - -type BridgeContractor_Expecter struct { - mock *mock.Mock -} - -func (_m *BridgeContractor) EXPECT() *BridgeContractor_Expecter { - return &BridgeContractor_Expecter{mock: &_m.Mock} -} - -// LastUpdatedDepositCount provides a mock function with given fields: ctx, BlockNumber -func (_m *BridgeContractor) LastUpdatedDepositCount(ctx context.Context, BlockNumber uint64) (uint32, error) { - ret := _m.Called(ctx, BlockNumber) - - if len(ret) == 0 { - panic("no return value specified for LastUpdatedDepositCount") - } - - var r0 uint32 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uint64) (uint32, error)); ok { - return rf(ctx, BlockNumber) - } - if rf, ok := ret.Get(0).(func(context.Context, uint64) uint32); ok { - r0 = rf(ctx, BlockNumber) - } else { - r0 = ret.Get(0).(uint32) - } - - if rf, ok := ret.Get(1).(func(context.Context, uint64) error); ok { - r1 = rf(ctx, BlockNumber) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BridgeContractor_LastUpdatedDepositCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastUpdatedDepositCount' -type BridgeContractor_LastUpdatedDepositCount_Call struct { - *mock.Call -} - -// LastUpdatedDepositCount is a helper method to define mock.On call -// - ctx context.Context -// - BlockNumber uint64 -func (_e *BridgeContractor_Expecter) LastUpdatedDepositCount(ctx interface{}, BlockNumber interface{}) *BridgeContractor_LastUpdatedDepositCount_Call { - return &BridgeContractor_LastUpdatedDepositCount_Call{Call: _e.mock.On("LastUpdatedDepositCount", ctx, BlockNumber)} -} - -func (_c *BridgeContractor_LastUpdatedDepositCount_Call) Run(run func(ctx context.Context, BlockNumber uint64)) *BridgeContractor_LastUpdatedDepositCount_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(uint64)) - }) - return _c -} - -func (_c *BridgeContractor_LastUpdatedDepositCount_Call) Return(_a0 uint32, _a1 error) *BridgeContractor_LastUpdatedDepositCount_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *BridgeContractor_LastUpdatedDepositCount_Call) RunAndReturn(run func(context.Context, uint64) (uint32, error)) *BridgeContractor_LastUpdatedDepositCount_Call { - _c.Call.Return(run) - return _c -} - -// NewBridgeContractor creates a new instance of BridgeContractor. 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 NewBridgeContractor(t interface { - mock.TestingT - Cleanup(func()) -}) *BridgeContractor { - mock := &BridgeContractor{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/bridgesync/mocks/eth_clienter.go b/bridgesync/mocks/eth_clienter.go index 3d208e45..12a99a98 100644 --- a/bridgesync/mocks/eth_clienter.go +++ b/bridgesync/mocks/eth_clienter.go @@ -265,7 +265,7 @@ func (_c *EthClienter_CallContract_Call) RunAndReturn(run func(context.Context, return _c } -// Client provides a mock function with given fields: +// Client provides a mock function with no fields func (_m *EthClienter) Client() *rpc.Client { ret := _m.Called() diff --git a/dataavailability/mocks_da/da_backender.go b/dataavailability/mocks_da/da_backender.go index 773e447c..d7ae9a05 100644 --- a/dataavailability/mocks_da/da_backender.go +++ b/dataavailability/mocks_da/da_backender.go @@ -85,7 +85,7 @@ func (_c *DABackender_GetSequence_Call) RunAndReturn(run func(context.Context, [ return _c } -// Init provides a mock function with given fields: +// Init provides a mock function with no fields func (_m *DABackender) Init() error { ret := _m.Called() diff --git a/l1infotreesync/mocks/eth_clienter.go b/l1infotreesync/mocks/eth_clienter.go index 3e5897f9..270c40d9 100644 --- a/l1infotreesync/mocks/eth_clienter.go +++ b/l1infotreesync/mocks/eth_clienter.go @@ -1083,4 +1083,4 @@ func NewEthClienter(t interface { t.Cleanup(func() { mock.AssertExpectations(t) }) return mock -} \ No newline at end of file +} diff --git a/l1infotreesync/mocks/mock_reorgdetector.go b/l1infotreesync/mocks/mock_reorgdetector.go index 79c6232e..74a8afc3 100644 --- a/l1infotreesync/mocks/mock_reorgdetector.go +++ b/l1infotreesync/mocks/mock_reorgdetector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks_l1infotreesync @@ -17,6 +17,14 @@ type ReorgDetectorMock struct { mock.Mock } +type ReorgDetectorMock_Expecter struct { + mock *mock.Mock +} + +func (_m *ReorgDetectorMock) EXPECT() *ReorgDetectorMock_Expecter { + return &ReorgDetectorMock_Expecter{mock: &_m.Mock} +} + // AddBlockToTrack provides a mock function with given fields: ctx, id, blockNum, blockHash func (_m *ReorgDetectorMock) AddBlockToTrack(ctx context.Context, id string, blockNum uint64, blockHash common.Hash) error { ret := _m.Called(ctx, id, blockNum, blockHash) @@ -35,6 +43,37 @@ func (_m *ReorgDetectorMock) AddBlockToTrack(ctx context.Context, id string, blo return r0 } +// ReorgDetectorMock_AddBlockToTrack_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBlockToTrack' +type ReorgDetectorMock_AddBlockToTrack_Call struct { + *mock.Call +} + +// AddBlockToTrack is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - blockNum uint64 +// - blockHash common.Hash +func (_e *ReorgDetectorMock_Expecter) AddBlockToTrack(ctx interface{}, id interface{}, blockNum interface{}, blockHash interface{}) *ReorgDetectorMock_AddBlockToTrack_Call { + return &ReorgDetectorMock_AddBlockToTrack_Call{Call: _e.mock.On("AddBlockToTrack", ctx, id, blockNum, blockHash)} +} + +func (_c *ReorgDetectorMock_AddBlockToTrack_Call) Run(run func(ctx context.Context, id string, blockNum uint64, blockHash common.Hash)) *ReorgDetectorMock_AddBlockToTrack_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(uint64), args[3].(common.Hash)) + }) + return _c +} + +func (_c *ReorgDetectorMock_AddBlockToTrack_Call) Return(_a0 error) *ReorgDetectorMock_AddBlockToTrack_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ReorgDetectorMock_AddBlockToTrack_Call) RunAndReturn(run func(context.Context, string, uint64, common.Hash) error) *ReorgDetectorMock_AddBlockToTrack_Call { + _c.Call.Return(run) + return _c +} + // Subscribe provides a mock function with given fields: id func (_m *ReorgDetectorMock) Subscribe(id string) (*reorgdetector.Subscription, error) { ret := _m.Called(id) @@ -65,6 +104,34 @@ func (_m *ReorgDetectorMock) Subscribe(id string) (*reorgdetector.Subscription, return r0, r1 } +// ReorgDetectorMock_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' +type ReorgDetectorMock_Subscribe_Call struct { + *mock.Call +} + +// Subscribe is a helper method to define mock.On call +// - id string +func (_e *ReorgDetectorMock_Expecter) Subscribe(id interface{}) *ReorgDetectorMock_Subscribe_Call { + return &ReorgDetectorMock_Subscribe_Call{Call: _e.mock.On("Subscribe", id)} +} + +func (_c *ReorgDetectorMock_Subscribe_Call) Run(run func(id string)) *ReorgDetectorMock_Subscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *ReorgDetectorMock_Subscribe_Call) Return(_a0 *reorgdetector.Subscription, _a1 error) *ReorgDetectorMock_Subscribe_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ReorgDetectorMock_Subscribe_Call) RunAndReturn(run func(string) (*reorgdetector.Subscription, error)) *ReorgDetectorMock_Subscribe_Call { + _c.Call.Return(run) + return _c +} + // NewReorgDetectorMock creates a new instance of ReorgDetectorMock. 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 NewReorgDetectorMock(t interface { diff --git a/reorgdetector/mock_eth_client.go b/reorgdetector/mock_eth_client.go index 0c561ab3..1a42104b 100644 --- a/reorgdetector/mock_eth_client.go +++ b/reorgdetector/mock_eth_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package reorgdetector @@ -20,6 +20,14 @@ type EthClientMock struct { mock.Mock } +type EthClientMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EthClientMock) EXPECT() *EthClientMock_Expecter { + return &EthClientMock_Expecter{mock: &_m.Mock} +} + // HeaderByHash provides a mock function with given fields: ctx, hash func (_m *EthClientMock) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) { ret := _m.Called(ctx, hash) @@ -50,6 +58,35 @@ func (_m *EthClientMock) HeaderByHash(ctx context.Context, hash common.Hash) (*t return r0, r1 } +// EthClientMock_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' +type EthClientMock_HeaderByHash_Call struct { + *mock.Call +} + +// HeaderByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *EthClientMock_Expecter) HeaderByHash(ctx interface{}, hash interface{}) *EthClientMock_HeaderByHash_Call { + return &EthClientMock_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, hash)} +} + +func (_c *EthClientMock_HeaderByHash_Call) Run(run func(ctx context.Context, hash common.Hash)) *EthClientMock_HeaderByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthClientMock_HeaderByHash_Call) Return(_a0 *types.Header, _a1 error) *EthClientMock_HeaderByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthClientMock_HeaderByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Header, error)) *EthClientMock_HeaderByHash_Call { + _c.Call.Return(run) + return _c +} + // HeaderByNumber provides a mock function with given fields: ctx, number func (_m *EthClientMock) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) { ret := _m.Called(ctx, number) @@ -80,6 +117,35 @@ func (_m *EthClientMock) HeaderByNumber(ctx context.Context, number *big.Int) (* return r0, r1 } +// EthClientMock_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber' +type EthClientMock_HeaderByNumber_Call struct { + *mock.Call +} + +// HeaderByNumber is a helper method to define mock.On call +// - ctx context.Context +// - number *big.Int +func (_e *EthClientMock_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *EthClientMock_HeaderByNumber_Call { + return &EthClientMock_HeaderByNumber_Call{Call: _e.mock.On("HeaderByNumber", ctx, number)} +} + +func (_c *EthClientMock_HeaderByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *EthClientMock_HeaderByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EthClientMock_HeaderByNumber_Call) Return(_a0 *types.Header, _a1 error) *EthClientMock_HeaderByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthClientMock_HeaderByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Header, error)) *EthClientMock_HeaderByNumber_Call { + _c.Call.Return(run) + return _c +} + // SubscribeNewHead provides a mock function with given fields: ctx, ch func (_m *EthClientMock) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) { ret := _m.Called(ctx, ch) @@ -110,6 +176,35 @@ func (_m *EthClientMock) SubscribeNewHead(ctx context.Context, ch chan<- *types. return r0, r1 } +// EthClientMock_SubscribeNewHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewHead' +type EthClientMock_SubscribeNewHead_Call struct { + *mock.Call +} + +// SubscribeNewHead is a helper method to define mock.On call +// - ctx context.Context +// - ch chan<- *types.Header +func (_e *EthClientMock_Expecter) SubscribeNewHead(ctx interface{}, ch interface{}) *EthClientMock_SubscribeNewHead_Call { + return &EthClientMock_SubscribeNewHead_Call{Call: _e.mock.On("SubscribeNewHead", ctx, ch)} +} + +func (_c *EthClientMock_SubscribeNewHead_Call) Run(run func(ctx context.Context, ch chan<- *types.Header)) *EthClientMock_SubscribeNewHead_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(chan<- *types.Header)) + }) + return _c +} + +func (_c *EthClientMock_SubscribeNewHead_Call) Return(_a0 ethereum.Subscription, _a1 error) *EthClientMock_SubscribeNewHead_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthClientMock_SubscribeNewHead_Call) RunAndReturn(run func(context.Context, chan<- *types.Header) (ethereum.Subscription, error)) *EthClientMock_SubscribeNewHead_Call { + _c.Call.Return(run) + return _c +} + // NewEthClientMock creates a new instance of EthClientMock. 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 NewEthClientMock(t interface { diff --git a/sequencesender/mocks/mock_etherman.go b/sequencesender/mocks/mock_etherman.go index 539ef9a7..298d96c3 100644 --- a/sequencesender/mocks/mock_etherman.go +++ b/sequencesender/mocks/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type EthermanMock struct { mock.Mock } +type EthermanMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EthermanMock) EXPECT() *EthermanMock_Expecter { + return &EthermanMock_Expecter{mock: &_m.Mock} +} + // CurrentNonce provides a mock function with given fields: ctx, address func (_m *EthermanMock) CurrentNonce(ctx context.Context, address common.Address) (uint64, error) { ret := _m.Called(ctx, address) @@ -46,6 +54,35 @@ func (_m *EthermanMock) CurrentNonce(ctx context.Context, address common.Address return r0, r1 } +// EthermanMock_CurrentNonce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CurrentNonce' +type EthermanMock_CurrentNonce_Call struct { + *mock.Call +} + +// CurrentNonce is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +func (_e *EthermanMock_Expecter) CurrentNonce(ctx interface{}, address interface{}) *EthermanMock_CurrentNonce_Call { + return &EthermanMock_CurrentNonce_Call{Call: _e.mock.On("CurrentNonce", ctx, address)} +} + +func (_c *EthermanMock_CurrentNonce_Call) Run(run func(ctx context.Context, address common.Address)) *EthermanMock_CurrentNonce_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *EthermanMock_CurrentNonce_Call) Return(_a0 uint64, _a1 error) *EthermanMock_CurrentNonce_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_CurrentNonce_Call) RunAndReturn(run func(context.Context, common.Address) (uint64, error)) *EthermanMock_CurrentNonce_Call { + _c.Call.Return(run) + return _c +} + // EstimateGas provides a mock function with given fields: ctx, from, to, value, data func (_m *EthermanMock) EstimateGas(ctx context.Context, from common.Address, to *common.Address, value *big.Int, data []byte) (uint64, error) { ret := _m.Called(ctx, from, to, value, data) @@ -74,7 +111,39 @@ func (_m *EthermanMock) EstimateGas(ctx context.Context, from common.Address, to return r0, r1 } -// GetLatestBatchNumber provides a mock function with given fields: +// EthermanMock_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas' +type EthermanMock_EstimateGas_Call struct { + *mock.Call +} + +// EstimateGas is a helper method to define mock.On call +// - ctx context.Context +// - from common.Address +// - to *common.Address +// - value *big.Int +// - data []byte +func (_e *EthermanMock_Expecter) EstimateGas(ctx interface{}, from interface{}, to interface{}, value interface{}, data interface{}) *EthermanMock_EstimateGas_Call { + return &EthermanMock_EstimateGas_Call{Call: _e.mock.On("EstimateGas", ctx, from, to, value, data)} +} + +func (_c *EthermanMock_EstimateGas_Call) Run(run func(ctx context.Context, from common.Address, to *common.Address, value *big.Int, data []byte)) *EthermanMock_EstimateGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*common.Address), args[3].(*big.Int), args[4].([]byte)) + }) + return _c +} + +func (_c *EthermanMock_EstimateGas_Call) Return(_a0 uint64, _a1 error) *EthermanMock_EstimateGas_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_EstimateGas_Call) RunAndReturn(run func(context.Context, common.Address, *common.Address, *big.Int, []byte) (uint64, error)) *EthermanMock_EstimateGas_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestBatchNumber provides a mock function with no fields func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error) { ret := _m.Called() @@ -102,6 +171,33 @@ func (_m *EthermanMock) GetLatestBatchNumber() (uint64, error) { return r0, r1 } +// EthermanMock_GetLatestBatchNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBatchNumber' +type EthermanMock_GetLatestBatchNumber_Call struct { + *mock.Call +} + +// GetLatestBatchNumber is a helper method to define mock.On call +func (_e *EthermanMock_Expecter) GetLatestBatchNumber() *EthermanMock_GetLatestBatchNumber_Call { + return &EthermanMock_GetLatestBatchNumber_Call{Call: _e.mock.On("GetLatestBatchNumber")} +} + +func (_c *EthermanMock_GetLatestBatchNumber_Call) Run(run func()) *EthermanMock_GetLatestBatchNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EthermanMock_GetLatestBatchNumber_Call) Return(_a0 uint64, _a1 error) *EthermanMock_GetLatestBatchNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_GetLatestBatchNumber_Call) RunAndReturn(run func() (uint64, error)) *EthermanMock_GetLatestBatchNumber_Call { + _c.Call.Return(run) + return _c +} + // GetLatestBlockHeader provides a mock function with given fields: ctx func (_m *EthermanMock) GetLatestBlockHeader(ctx context.Context) (*types.Header, error) { ret := _m.Called(ctx) @@ -132,6 +228,34 @@ func (_m *EthermanMock) GetLatestBlockHeader(ctx context.Context) (*types.Header return r0, r1 } +// EthermanMock_GetLatestBlockHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestBlockHeader' +type EthermanMock_GetLatestBlockHeader_Call struct { + *mock.Call +} + +// GetLatestBlockHeader is a helper method to define mock.On call +// - ctx context.Context +func (_e *EthermanMock_Expecter) GetLatestBlockHeader(ctx interface{}) *EthermanMock_GetLatestBlockHeader_Call { + return &EthermanMock_GetLatestBlockHeader_Call{Call: _e.mock.On("GetLatestBlockHeader", ctx)} +} + +func (_c *EthermanMock_GetLatestBlockHeader_Call) Run(run func(ctx context.Context)) *EthermanMock_GetLatestBlockHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EthermanMock_GetLatestBlockHeader_Call) Return(_a0 *types.Header, _a1 error) *EthermanMock_GetLatestBlockHeader_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthermanMock_GetLatestBlockHeader_Call) RunAndReturn(run func(context.Context) (*types.Header, error)) *EthermanMock_GetLatestBlockHeader_Call { + _c.Call.Return(run) + return _c +} + // 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. // The first argument is typically a *testing.T value. func NewEthermanMock(t interface { diff --git a/sequencesender/mocks/mock_ethtxmanager.go b/sequencesender/mocks/mock_ethtxmanager.go index 16de5be6..b8a58d0d 100644 --- a/sequencesender/mocks/mock_ethtxmanager.go +++ b/sequencesender/mocks/mock_ethtxmanager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type EthTxManagerMock struct { mock.Mock } +type EthTxManagerMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EthTxManagerMock) EXPECT() *EthTxManagerMock_Expecter { + return &EthTxManagerMock_Expecter{mock: &_m.Mock} +} + // AddWithGas provides a mock function with given fields: ctx, to, value, data, gasOffset, sidecar, gas func (_m *EthTxManagerMock) AddWithGas(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar, gas uint64) (common.Hash, error) { ret := _m.Called(ctx, to, value, data, gasOffset, sidecar, gas) @@ -50,6 +58,40 @@ func (_m *EthTxManagerMock) AddWithGas(ctx context.Context, to *common.Address, return r0, r1 } +// EthTxManagerMock_AddWithGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddWithGas' +type EthTxManagerMock_AddWithGas_Call struct { + *mock.Call +} + +// AddWithGas is a helper method to define mock.On call +// - ctx context.Context +// - to *common.Address +// - value *big.Int +// - data []byte +// - gasOffset uint64 +// - sidecar *types.BlobTxSidecar +// - gas uint64 +func (_e *EthTxManagerMock_Expecter) AddWithGas(ctx interface{}, to interface{}, value interface{}, data interface{}, gasOffset interface{}, sidecar interface{}, gas interface{}) *EthTxManagerMock_AddWithGas_Call { + return &EthTxManagerMock_AddWithGas_Call{Call: _e.mock.On("AddWithGas", ctx, to, value, data, gasOffset, sidecar, gas)} +} + +func (_c *EthTxManagerMock_AddWithGas_Call) Run(run func(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar, gas uint64)) *EthTxManagerMock_AddWithGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*common.Address), args[2].(*big.Int), args[3].([]byte), args[4].(uint64), args[5].(*types.BlobTxSidecar), args[6].(uint64)) + }) + return _c +} + +func (_c *EthTxManagerMock_AddWithGas_Call) Return(_a0 common.Hash, _a1 error) *EthTxManagerMock_AddWithGas_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerMock_AddWithGas_Call) RunAndReturn(run func(context.Context, *common.Address, *big.Int, []byte, uint64, *types.BlobTxSidecar, uint64) (common.Hash, error)) *EthTxManagerMock_AddWithGas_Call { + _c.Call.Return(run) + return _c +} + // Remove provides a mock function with given fields: ctx, hash func (_m *EthTxManagerMock) Remove(ctx context.Context, hash common.Hash) error { ret := _m.Called(ctx, hash) @@ -68,6 +110,35 @@ func (_m *EthTxManagerMock) Remove(ctx context.Context, hash common.Hash) error return r0 } +// EthTxManagerMock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' +type EthTxManagerMock_Remove_Call struct { + *mock.Call +} + +// Remove is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *EthTxManagerMock_Expecter) Remove(ctx interface{}, hash interface{}) *EthTxManagerMock_Remove_Call { + return &EthTxManagerMock_Remove_Call{Call: _e.mock.On("Remove", ctx, hash)} +} + +func (_c *EthTxManagerMock_Remove_Call) Run(run func(ctx context.Context, hash common.Hash)) *EthTxManagerMock_Remove_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthTxManagerMock_Remove_Call) Return(_a0 error) *EthTxManagerMock_Remove_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EthTxManagerMock_Remove_Call) RunAndReturn(run func(context.Context, common.Hash) error) *EthTxManagerMock_Remove_Call { + _c.Call.Return(run) + return _c +} + // Result provides a mock function with given fields: ctx, hash func (_m *EthTxManagerMock) Result(ctx context.Context, hash common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error) { ret := _m.Called(ctx, hash) @@ -96,6 +167,35 @@ func (_m *EthTxManagerMock) Result(ctx context.Context, hash common.Hash) (zkevm return r0, r1 } +// EthTxManagerMock_Result_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Result' +type EthTxManagerMock_Result_Call struct { + *mock.Call +} + +// Result is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *EthTxManagerMock_Expecter) Result(ctx interface{}, hash interface{}) *EthTxManagerMock_Result_Call { + return &EthTxManagerMock_Result_Call{Call: _e.mock.On("Result", ctx, hash)} +} + +func (_c *EthTxManagerMock_Result_Call) Run(run func(ctx context.Context, hash common.Hash)) *EthTxManagerMock_Result_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthTxManagerMock_Result_Call) Return(_a0 zkevm_ethtx_managertypes.MonitoredTxResult, _a1 error) *EthTxManagerMock_Result_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerMock_Result_Call) RunAndReturn(run func(context.Context, common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error)) *EthTxManagerMock_Result_Call { + _c.Call.Return(run) + return _c +} + // ResultsByStatus provides a mock function with given fields: ctx, status func (_m *EthTxManagerMock) ResultsByStatus(ctx context.Context, status []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error) { ret := _m.Called(ctx, status) @@ -126,11 +226,67 @@ func (_m *EthTxManagerMock) ResultsByStatus(ctx context.Context, status []zkevm_ return r0, r1 } -// Start provides a mock function with given fields: +// EthTxManagerMock_ResultsByStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResultsByStatus' +type EthTxManagerMock_ResultsByStatus_Call struct { + *mock.Call +} + +// ResultsByStatus is a helper method to define mock.On call +// - ctx context.Context +// - status []zkevm_ethtx_managertypes.MonitoredTxStatus +func (_e *EthTxManagerMock_Expecter) ResultsByStatus(ctx interface{}, status interface{}) *EthTxManagerMock_ResultsByStatus_Call { + return &EthTxManagerMock_ResultsByStatus_Call{Call: _e.mock.On("ResultsByStatus", ctx, status)} +} + +func (_c *EthTxManagerMock_ResultsByStatus_Call) Run(run func(ctx context.Context, status []zkevm_ethtx_managertypes.MonitoredTxStatus)) *EthTxManagerMock_ResultsByStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]zkevm_ethtx_managertypes.MonitoredTxStatus)) + }) + return _c +} + +func (_c *EthTxManagerMock_ResultsByStatus_Call) Return(_a0 []zkevm_ethtx_managertypes.MonitoredTxResult, _a1 error) *EthTxManagerMock_ResultsByStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerMock_ResultsByStatus_Call) RunAndReturn(run func(context.Context, []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error)) *EthTxManagerMock_ResultsByStatus_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with no fields func (_m *EthTxManagerMock) Start() { _m.Called() } +// EthTxManagerMock_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type EthTxManagerMock_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +func (_e *EthTxManagerMock_Expecter) Start() *EthTxManagerMock_Start_Call { + return &EthTxManagerMock_Start_Call{Call: _e.mock.On("Start")} +} + +func (_c *EthTxManagerMock_Start_Call) Run(run func()) *EthTxManagerMock_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EthTxManagerMock_Start_Call) Return() *EthTxManagerMock_Start_Call { + _c.Call.Return() + return _c +} + +func (_c *EthTxManagerMock_Start_Call) RunAndReturn(run func()) *EthTxManagerMock_Start_Call { + _c.Run(run) + return _c +} + // NewEthTxManagerMock creates a new instance of EthTxManagerMock. 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 NewEthTxManagerMock(t interface { diff --git a/sequencesender/mocks/mock_rpc.go b/sequencesender/mocks/mock_rpc.go index e06378a6..eef0188d 100644 --- a/sequencesender/mocks/mock_rpc.go +++ b/sequencesender/mocks/mock_rpc.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.39.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type RPCInterfaceMock struct { mock.Mock } +type RPCInterfaceMock_Expecter struct { + mock *mock.Mock +} + +func (_m *RPCInterfaceMock) EXPECT() *RPCInterfaceMock_Expecter { + return &RPCInterfaceMock_Expecter{mock: &_m.Mock} +} + // GetBatch provides a mock function with given fields: batchNumber func (_m *RPCInterfaceMock) GetBatch(batchNumber uint64) (*types.RPCBatch, error) { ret := _m.Called(batchNumber) @@ -43,6 +51,34 @@ func (_m *RPCInterfaceMock) GetBatch(batchNumber uint64) (*types.RPCBatch, error return r0, r1 } +// RPCInterfaceMock_GetBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBatch' +type RPCInterfaceMock_GetBatch_Call struct { + *mock.Call +} + +// GetBatch is a helper method to define mock.On call +// - batchNumber uint64 +func (_e *RPCInterfaceMock_Expecter) GetBatch(batchNumber interface{}) *RPCInterfaceMock_GetBatch_Call { + return &RPCInterfaceMock_GetBatch_Call{Call: _e.mock.On("GetBatch", batchNumber)} +} + +func (_c *RPCInterfaceMock_GetBatch_Call) Run(run func(batchNumber uint64)) *RPCInterfaceMock_GetBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64)) + }) + return _c +} + +func (_c *RPCInterfaceMock_GetBatch_Call) Return(_a0 *types.RPCBatch, _a1 error) *RPCInterfaceMock_GetBatch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCInterfaceMock_GetBatch_Call) RunAndReturn(run func(uint64) (*types.RPCBatch, error)) *RPCInterfaceMock_GetBatch_Call { + _c.Call.Return(run) + return _c +} + // GetWitness provides a mock function with given fields: batchNumber, fullWitness func (_m *RPCInterfaceMock) GetWitness(batchNumber uint64, fullWitness bool) ([]byte, error) { ret := _m.Called(batchNumber, fullWitness) @@ -73,6 +109,35 @@ func (_m *RPCInterfaceMock) GetWitness(batchNumber uint64, fullWitness bool) ([] return r0, r1 } +// RPCInterfaceMock_GetWitness_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWitness' +type RPCInterfaceMock_GetWitness_Call struct { + *mock.Call +} + +// GetWitness is a helper method to define mock.On call +// - batchNumber uint64 +// - fullWitness bool +func (_e *RPCInterfaceMock_Expecter) GetWitness(batchNumber interface{}, fullWitness interface{}) *RPCInterfaceMock_GetWitness_Call { + return &RPCInterfaceMock_GetWitness_Call{Call: _e.mock.On("GetWitness", batchNumber, fullWitness)} +} + +func (_c *RPCInterfaceMock_GetWitness_Call) Run(run func(batchNumber uint64, fullWitness bool)) *RPCInterfaceMock_GetWitness_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(uint64), args[1].(bool)) + }) + return _c +} + +func (_c *RPCInterfaceMock_GetWitness_Call) Return(_a0 []byte, _a1 error) *RPCInterfaceMock_GetWitness_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCInterfaceMock_GetWitness_Call) RunAndReturn(run func(uint64, bool) ([]byte, error)) *RPCInterfaceMock_GetWitness_Call { + _c.Call.Return(run) + return _c +} + // NewRPCInterfaceMock creates a new instance of RPCInterfaceMock. 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 NewRPCInterfaceMock(t interface { diff --git a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go index 93dadeef..86fd4366 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go @@ -79,7 +79,7 @@ func (_c *GlobalExitRootBananaContractor_L1InfoRootMap_Call) RunAndReturn(run fu return _c } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *GlobalExitRootBananaContractor) String() string { ret := _m.Called() diff --git a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go index f7aed125..57c6c157 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go @@ -79,7 +79,7 @@ func (_c *GlobalExitRootBananaZKEVMContractor_L1InfoRootMap_Call) RunAndReturn(r return _c } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *GlobalExitRootBananaZKEVMContractor) String() string { ret := _m.Called() diff --git a/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go b/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go index 846437db..32ab8ab4 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go +++ b/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go @@ -307,7 +307,7 @@ func (_c *TxBuilder_SetCondNewSeq_Call) RunAndReturn(run func(txbuilder.CondNewS return _c } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *TxBuilder) String() string { ret := _m.Called() diff --git a/sync/mock_downloader_test.go b/sync/mock_downloader_test.go index 45a53b84..662f49f7 100644 --- a/sync/mock_downloader_test.go +++ b/sync/mock_downloader_test.go @@ -53,7 +53,7 @@ func (_c *EVMDownloaderMock_Download_Call) Return() *EVMDownloaderMock_Download_ } func (_c *EVMDownloaderMock_Download_Call) RunAndReturn(run func(context.Context, uint64, chan EVMBlock)) *EVMDownloaderMock_Download_Call { - _c.Call.Return(run) + _c.Run(run) return _c } diff --git a/test/Makefile b/test/Makefile index 32a2a89d..792382b2 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,27 +1,27 @@ .PHONY: generate-mocks -generate-mocks: generate-mocks-bridgesync generate-mocks-reorgdetector generate-mocks-sequencesender \ - generate-mocks-da generate-mocks-l1infotreesync generate-mocks-helpers \ - generate-mocks-sync generate-mocks-l1infotreesync generate-mocks-aggregator \ - generate-mocks-aggsender generate-mocks-agglayer generate-mocks-bridgesync - generate-mocks-sync generate-mocks-l1infotreesync generate-mocks-aggregator \ - generate-mocks-aggsender generate-mocks-agglayer generate-mocks-bridgesync +generate-mocks: generate-mocks-bridgesync generate-mocks-reorgdetector \ + generate-mocks-sequencesender generate-mocks-da \ + generate-mocks-l1infotreesync generate-mocks-helpers \ + generate-mocks-sync generate-mocks-aggregator \ + generate-mocks-aggsender generate-mocks-agglayer .PHONY: generate-mocks-bridgesync generate-mocks-bridgesync: ## Generates mocks for bridgesync, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthClienter --dir=../bridgesync --output=../bridgesync --outpkg=bridgesync --inpackage --structname=L2Mock --filename=mock_l2_test.go + rm -Rf ../bridgesync/mocks + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../bridgesync --output ../bridgesync/mocks --outpkg mocks_bridgesync ${COMMON_MOCKERY_PARAMS} .PHONY: generate-mocks-reorgdetector generate-mocks-reorgdetector: ## Generates mocks for reorgdetector, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthClient --dir=../reorgdetector --output=../reorgdetector --outpkg=reorgdetector --inpackage --structname=EthClientMock --filename=mock_eth_client.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthClient --dir=../reorgdetector --output=../reorgdetector --outpkg=reorgdetector --inpackage --structname=EthClientMock --filename=mock_eth_client.go ${COMMON_MOCKERY_PARAMS} COMMON_MOCKERY_PARAMS=--disable-version-string --with-expecter --exported .PHONY: generate-mocks-sequencesender generate-mocks-sequencesender: ## Generates mocks for sequencesender, using mockery tool rm -Rf ../sequencesender/txbuilder/mocks_txbuilder export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../sequencesender/txbuilder --output ../sequencesender/txbuilder/mocks_txbuilder --outpkg mocks_txbuilder ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManager --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=EthTxManagerMock --filename=mock_ethtxmanager.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Etherman --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=EthermanMock --filename=mock_etherman.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=RPCInterface --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=RPCInterfaceMock --filename=mock_rpc.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManager --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=EthTxManagerMock --filename=mock_ethtxmanager.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Etherman --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=EthermanMock --filename=mock_etherman.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=RPCInterface --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=RPCInterfaceMock --filename=mock_rpc.go ${COMMON_MOCKERY_PARAMS} .PHONY: generate-mocks-da generate-mocks-da: ## Generates mocks for dataavailability, using mockery tool @@ -37,11 +37,15 @@ generate-mocks-rpc: ## Generates mocks for rpc, using mockery tool generate-mocks-l1infotreesync: ## Generates mocks for l1infotreesync, using mockery tool rm -Rf ../l1infotreesync/mocks export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../l1infotreesync --output ../l1infotreesync/mocks --outpkg mocks_l1infotreesync ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ReorgDetector --dir=../sync --output=../l1infotreesync/mocks --outpkg=mocks_l1infotreesync --structname=ReorgDetectorMock --filename=mock_reorgdetector.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ReorgDetector --dir=../sync --output=../l1infotreesync/mocks --outpkg=mocks_l1infotreesync --structname=ReorgDetectorMock --filename=mock_reorgdetector.go ${COMMON_MOCKERY_PARAMS} +.PHONY: generate-mocks-helpers +generate-mocks-helpers: ## Generates mocks for helpers, using mockery tool + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManager --dir=../aggoracle/chaingersender --output=./helpers --outpkg=helpers --structname=EthTxManagerMock --filename=mock_ethtxmanager.go ${COMMON_MOCKERY_PARAMS} + .PHONY: generate-mocks-aggoracle -generate-mocks-helpers: ## Generates mocks for helpers , using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManager --dir=../aggoracle/chaingersender --output=./helpers --outpkg=helpers --structname=EthTxManagerMock --filename=mock_ethtxmanager.go +generate-mocks-aggoracle: ## Generates mocks for aggoracle, using mockery tool + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --dir ../aggoracle/chaingersender --output ../aggoracle/chaingersender/mocks --outpkg mocks ${COMMON_MOCKERY_PARAMS} .PHONY: generate-mocks-sync generate-mocks-sync: ## Generates mocks for sync, using mockery tool @@ -53,14 +57,14 @@ generate-mocks-sync: ## Generates mocks for sync, using mockery tool .PHONY: generate-mocks-aggregator generate-mocks-aggregator: ## Generates mocks for aggregator, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ProverInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=ProverInterfaceMock --filename=mock_prover.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Etherman --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=EthermanMock --filename=mock_etherman.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=StorageInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=StorageInterfaceMock --filename=mock_storage.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Synchronizer --srcpkg=github.com/0xPolygonHermez/zkevm-synchronizer-l1/synchronizer --output=../aggregator/mocks --outpkg=mocks --structname=SynchronizerInterfaceMock --filename=mock_synchronizer.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManagerClient --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=EthTxManagerClientMock --filename=mock_eth_tx_manager.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Txer --dir=../db --output=../aggregator/mocks --outpkg=mocks --structname=TxerMock --filename=mock_txer.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=RPCInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=RPCInterfaceMock --filename=mock_rpc.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=AggregatorService_ChannelServer --dir=../aggregator/prover --output=../aggregator/prover/mocks --outpkg=mocks --structname=ChannelMock --filename=mock_channel.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ProverInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=ProverInterfaceMock --filename=mock_prover.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Etherman --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=EthermanMock --filename=mock_etherman.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=StorageInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=StorageInterfaceMock --filename=mock_storage.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Synchronizer --srcpkg=github.com/0xPolygonHermez/zkevm-synchronizer-l1/synchronizer --output=../aggregator/mocks --outpkg=mocks --structname=SynchronizerInterfaceMock --filename=mock_synchronizer.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManagerClient --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=EthTxManagerClientMock --filename=mock_eth_tx_manager.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Txer --dir=../db --output=../aggregator/mocks --outpkg=mocks --structname=TxerMock --filename=mock_txer.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=RPCInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=RPCInterfaceMock --filename=mock_rpc.go ${COMMON_MOCKERY_PARAMS} + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=AggregatorService_ChannelServer --dir=../aggregator/prover --output=../aggregator/prover/mocks --outpkg=mocks --structname=ChannelMock --filename=mock_channel.go ${COMMON_MOCKERY_PARAMS} .PHONY: generate-mocks-aggsender @@ -70,13 +74,7 @@ generate-mocks-aggsender: ## Generates mocks for aggsender, using mockery tool .PHONY: generate-mocks-agglayer generate-mocks-agglayer: ## Generates mocks for agglayer, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=AgglayerClientInterface --dir=../agglayer --output=../agglayer --outpkg=agglayer --inpackage --structname=AgglayerClientMock --filename=mock_agglayer_client.go ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-bridgesync -generate-mocks-bridgesync: ## Generates mocks for bridgesync, using mockery tool - rm -Rf ../bridgesync/mocks - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../bridgesync --output ../bridgesync/mocks --outpkg mocks_bridgesync ${COMMON_MOCKERY_PARAMS} - + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=AgglayerClientInterface --dir=../agglayer --output=../agglayer --outpkg=agglayer --inpackage --structname=AgglayerClientMock --filename=mock_agglayer_client.go ${COMMON_MOCKERY_PARAMS} .PHONY: test-e2e-fork9-validium test-e2e-fork9-validium: stop diff --git a/test/helpers/mock_ethtxmanager.go b/test/helpers/mock_ethtxmanager.go index adb21f26..ac10be2a 100644 --- a/test/helpers/mock_ethtxmanager.go +++ b/test/helpers/mock_ethtxmanager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.45.0. DO NOT EDIT. +// Code generated by mockery. DO NOT EDIT. package helpers @@ -9,11 +9,11 @@ import ( context "context" - ethtxtypes "github.com/0xPolygon/zkevm-ethtx-manager/types" - mock "github.com/stretchr/testify/mock" types "github.com/ethereum/go-ethereum/core/types" + + zkevm_ethtx_managertypes "github.com/0xPolygon/zkevm-ethtx-manager/types" ) // EthTxManagerMock is an autogenerated mock type for the EthTxManager type @@ -21,6 +21,14 @@ type EthTxManagerMock struct { mock.Mock } +type EthTxManagerMock_Expecter struct { + mock *mock.Mock +} + +func (_m *EthTxManagerMock) EXPECT() *EthTxManagerMock_Expecter { + return &EthTxManagerMock_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, to, value, data, gasOffset, sidecar func (_m *EthTxManagerMock) Add(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar) (common.Hash, error) { ret := _m.Called(ctx, to, value, data, gasOffset, sidecar) @@ -51,6 +59,39 @@ func (_m *EthTxManagerMock) Add(ctx context.Context, to *common.Address, value * return r0, r1 } +// EthTxManagerMock_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type EthTxManagerMock_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - to *common.Address +// - value *big.Int +// - data []byte +// - gasOffset uint64 +// - sidecar *types.BlobTxSidecar +func (_e *EthTxManagerMock_Expecter) Add(ctx interface{}, to interface{}, value interface{}, data interface{}, gasOffset interface{}, sidecar interface{}) *EthTxManagerMock_Add_Call { + return &EthTxManagerMock_Add_Call{Call: _e.mock.On("Add", ctx, to, value, data, gasOffset, sidecar)} +} + +func (_c *EthTxManagerMock_Add_Call) Run(run func(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar)) *EthTxManagerMock_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*common.Address), args[2].(*big.Int), args[3].([]byte), args[4].(uint64), args[5].(*types.BlobTxSidecar)) + }) + return _c +} + +func (_c *EthTxManagerMock_Add_Call) Return(_a0 common.Hash, _a1 error) *EthTxManagerMock_Add_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerMock_Add_Call) RunAndReturn(run func(context.Context, *common.Address, *big.Int, []byte, uint64, *types.BlobTxSidecar) (common.Hash, error)) *EthTxManagerMock_Add_Call { + _c.Call.Return(run) + return _c +} + // Remove provides a mock function with given fields: ctx, id func (_m *EthTxManagerMock) Remove(ctx context.Context, id common.Hash) error { ret := _m.Called(ctx, id) @@ -69,23 +110,52 @@ func (_m *EthTxManagerMock) Remove(ctx context.Context, id common.Hash) error { return r0 } +// EthTxManagerMock_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' +type EthTxManagerMock_Remove_Call struct { + *mock.Call +} + +// Remove is a helper method to define mock.On call +// - ctx context.Context +// - id common.Hash +func (_e *EthTxManagerMock_Expecter) Remove(ctx interface{}, id interface{}) *EthTxManagerMock_Remove_Call { + return &EthTxManagerMock_Remove_Call{Call: _e.mock.On("Remove", ctx, id)} +} + +func (_c *EthTxManagerMock_Remove_Call) Run(run func(ctx context.Context, id common.Hash)) *EthTxManagerMock_Remove_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthTxManagerMock_Remove_Call) Return(_a0 error) *EthTxManagerMock_Remove_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EthTxManagerMock_Remove_Call) RunAndReturn(run func(context.Context, common.Hash) error) *EthTxManagerMock_Remove_Call { + _c.Call.Return(run) + return _c +} + // Result provides a mock function with given fields: ctx, id -func (_m *EthTxManagerMock) Result(ctx context.Context, id common.Hash) (ethtxtypes.MonitoredTxResult, error) { +func (_m *EthTxManagerMock) Result(ctx context.Context, id common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error) { ret := _m.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Result") } - var r0 ethtxtypes.MonitoredTxResult + var r0 zkevm_ethtx_managertypes.MonitoredTxResult var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (ethtxtypes.MonitoredTxResult, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error)); ok { return rf(ctx, id) } - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) ethtxtypes.MonitoredTxResult); ok { + if rf, ok := ret.Get(0).(func(context.Context, common.Hash) zkevm_ethtx_managertypes.MonitoredTxResult); ok { r0 = rf(ctx, id) } else { - r0 = ret.Get(0).(ethtxtypes.MonitoredTxResult) + r0 = ret.Get(0).(zkevm_ethtx_managertypes.MonitoredTxResult) } if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { @@ -97,28 +167,57 @@ func (_m *EthTxManagerMock) Result(ctx context.Context, id common.Hash) (ethtxty return r0, r1 } +// EthTxManagerMock_Result_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Result' +type EthTxManagerMock_Result_Call struct { + *mock.Call +} + +// Result is a helper method to define mock.On call +// - ctx context.Context +// - id common.Hash +func (_e *EthTxManagerMock_Expecter) Result(ctx interface{}, id interface{}) *EthTxManagerMock_Result_Call { + return &EthTxManagerMock_Result_Call{Call: _e.mock.On("Result", ctx, id)} +} + +func (_c *EthTxManagerMock_Result_Call) Run(run func(ctx context.Context, id common.Hash)) *EthTxManagerMock_Result_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EthTxManagerMock_Result_Call) Return(_a0 zkevm_ethtx_managertypes.MonitoredTxResult, _a1 error) *EthTxManagerMock_Result_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerMock_Result_Call) RunAndReturn(run func(context.Context, common.Hash) (zkevm_ethtx_managertypes.MonitoredTxResult, error)) *EthTxManagerMock_Result_Call { + _c.Call.Return(run) + return _c +} + // ResultsByStatus provides a mock function with given fields: ctx, statuses -func (_m *EthTxManagerMock) ResultsByStatus(ctx context.Context, statuses []ethtxtypes.MonitoredTxStatus) ([]ethtxtypes.MonitoredTxResult, error) { +func (_m *EthTxManagerMock) ResultsByStatus(ctx context.Context, statuses []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error) { ret := _m.Called(ctx, statuses) if len(ret) == 0 { panic("no return value specified for ResultsByStatus") } - var r0 []ethtxtypes.MonitoredTxResult + var r0 []zkevm_ethtx_managertypes.MonitoredTxResult var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []ethtxtypes.MonitoredTxStatus) ([]ethtxtypes.MonitoredTxResult, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error)); ok { return rf(ctx, statuses) } - if rf, ok := ret.Get(0).(func(context.Context, []ethtxtypes.MonitoredTxStatus) []ethtxtypes.MonitoredTxResult); ok { + if rf, ok := ret.Get(0).(func(context.Context, []zkevm_ethtx_managertypes.MonitoredTxStatus) []zkevm_ethtx_managertypes.MonitoredTxResult); ok { r0 = rf(ctx, statuses) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]ethtxtypes.MonitoredTxResult) + r0 = ret.Get(0).([]zkevm_ethtx_managertypes.MonitoredTxResult) } } - if rf, ok := ret.Get(1).(func(context.Context, []ethtxtypes.MonitoredTxStatus) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, []zkevm_ethtx_managertypes.MonitoredTxStatus) error); ok { r1 = rf(ctx, statuses) } else { r1 = ret.Error(1) @@ -127,6 +226,35 @@ func (_m *EthTxManagerMock) ResultsByStatus(ctx context.Context, statuses []etht return r0, r1 } +// EthTxManagerMock_ResultsByStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResultsByStatus' +type EthTxManagerMock_ResultsByStatus_Call struct { + *mock.Call +} + +// ResultsByStatus is a helper method to define mock.On call +// - ctx context.Context +// - statuses []zkevm_ethtx_managertypes.MonitoredTxStatus +func (_e *EthTxManagerMock_Expecter) ResultsByStatus(ctx interface{}, statuses interface{}) *EthTxManagerMock_ResultsByStatus_Call { + return &EthTxManagerMock_ResultsByStatus_Call{Call: _e.mock.On("ResultsByStatus", ctx, statuses)} +} + +func (_c *EthTxManagerMock_ResultsByStatus_Call) Run(run func(ctx context.Context, statuses []zkevm_ethtx_managertypes.MonitoredTxStatus)) *EthTxManagerMock_ResultsByStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]zkevm_ethtx_managertypes.MonitoredTxStatus)) + }) + return _c +} + +func (_c *EthTxManagerMock_ResultsByStatus_Call) Return(_a0 []zkevm_ethtx_managertypes.MonitoredTxResult, _a1 error) *EthTxManagerMock_ResultsByStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EthTxManagerMock_ResultsByStatus_Call) RunAndReturn(run func(context.Context, []zkevm_ethtx_managertypes.MonitoredTxStatus) ([]zkevm_ethtx_managertypes.MonitoredTxResult, error)) *EthTxManagerMock_ResultsByStatus_Call { + _c.Call.Return(run) + return _c +} + // NewEthTxManagerMock creates a new instance of EthTxManagerMock. 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 NewEthTxManagerMock(t interface {