// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	bridgesync "github.com/0xPolygon/cdk/bridgesync"
	common "github.com/ethereum/go-ethereum/common"

	context "context"

	etherman "github.com/0xPolygon/cdk/etherman"

	mock "github.com/stretchr/testify/mock"

	treetypes "github.com/0xPolygon/cdk/tree/types"
)

// L2BridgeSyncer is an autogenerated mock type for the L2BridgeSyncer type
type L2BridgeSyncer struct {
	mock.Mock
}

type L2BridgeSyncer_Expecter struct {
	mock *mock.Mock
}

func (_m *L2BridgeSyncer) EXPECT() *L2BridgeSyncer_Expecter {
	return &L2BridgeSyncer_Expecter{mock: &_m.Mock}
}

// BlockFinality provides a mock function with given fields:
func (_m *L2BridgeSyncer) BlockFinality() etherman.BlockNumberFinality {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for BlockFinality")
	}

	var r0 etherman.BlockNumberFinality
	if rf, ok := ret.Get(0).(func() etherman.BlockNumberFinality); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(etherman.BlockNumberFinality)
	}

	return r0
}

// L2BridgeSyncer_BlockFinality_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockFinality'
type L2BridgeSyncer_BlockFinality_Call struct {
	*mock.Call
}

// BlockFinality is a helper method to define mock.On call
func (_e *L2BridgeSyncer_Expecter) BlockFinality() *L2BridgeSyncer_BlockFinality_Call {
	return &L2BridgeSyncer_BlockFinality_Call{Call: _e.mock.On("BlockFinality")}
}

func (_c *L2BridgeSyncer_BlockFinality_Call) Run(run func()) *L2BridgeSyncer_BlockFinality_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *L2BridgeSyncer_BlockFinality_Call) Return(_a0 etherman.BlockNumberFinality) *L2BridgeSyncer_BlockFinality_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *L2BridgeSyncer_BlockFinality_Call) RunAndReturn(run func() etherman.BlockNumberFinality) *L2BridgeSyncer_BlockFinality_Call {
	_c.Call.Return(run)
	return _c
}

// GetBlockByLER provides a mock function with given fields: ctx, ler
func (_m *L2BridgeSyncer) GetBlockByLER(ctx context.Context, ler common.Hash) (uint64, error) {
	ret := _m.Called(ctx, ler)

	if len(ret) == 0 {
		panic("no return value specified for GetBlockByLER")
	}

	var r0 uint64
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (uint64, error)); ok {
		return rf(ctx, ler)
	}
	if rf, ok := ret.Get(0).(func(context.Context, common.Hash) uint64); ok {
		r0 = rf(ctx, ler)
	} else {
		r0 = ret.Get(0).(uint64)
	}

	if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok {
		r1 = rf(ctx, ler)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// L2BridgeSyncer_GetBlockByLER_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlockByLER'
type L2BridgeSyncer_GetBlockByLER_Call struct {
	*mock.Call
}

// GetBlockByLER is a helper method to define mock.On call
//   - ctx context.Context
//   - ler common.Hash
func (_e *L2BridgeSyncer_Expecter) GetBlockByLER(ctx interface{}, ler interface{}) *L2BridgeSyncer_GetBlockByLER_Call {
	return &L2BridgeSyncer_GetBlockByLER_Call{Call: _e.mock.On("GetBlockByLER", ctx, ler)}
}

func (_c *L2BridgeSyncer_GetBlockByLER_Call) Run(run func(ctx context.Context, ler common.Hash)) *L2BridgeSyncer_GetBlockByLER_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(common.Hash))
	})
	return _c
}

func (_c *L2BridgeSyncer_GetBlockByLER_Call) Return(_a0 uint64, _a1 error) *L2BridgeSyncer_GetBlockByLER_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L2BridgeSyncer_GetBlockByLER_Call) RunAndReturn(run func(context.Context, common.Hash) (uint64, error)) *L2BridgeSyncer_GetBlockByLER_Call {
	_c.Call.Return(run)
	return _c
}

// GetBridgesPublished provides a mock function with given fields: ctx, fromBlock, toBlock
func (_m *L2BridgeSyncer) GetBridgesPublished(ctx context.Context, fromBlock uint64, toBlock uint64) ([]bridgesync.Bridge, error) {
	ret := _m.Called(ctx, fromBlock, toBlock)

	if len(ret) == 0 {
		panic("no return value specified for GetBridgesPublished")
	}

	var r0 []bridgesync.Bridge
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) ([]bridgesync.Bridge, error)); ok {
		return rf(ctx, fromBlock, toBlock)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) []bridgesync.Bridge); ok {
		r0 = rf(ctx, fromBlock, toBlock)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]bridgesync.Bridge)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64, uint64) error); ok {
		r1 = rf(ctx, fromBlock, toBlock)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// L2BridgeSyncer_GetBridgesPublished_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBridgesPublished'
type L2BridgeSyncer_GetBridgesPublished_Call struct {
	*mock.Call
}

// GetBridgesPublished is a helper method to define mock.On call
//   - ctx context.Context
//   - fromBlock uint64
//   - toBlock uint64
func (_e *L2BridgeSyncer_Expecter) GetBridgesPublished(ctx interface{}, fromBlock interface{}, toBlock interface{}) *L2BridgeSyncer_GetBridgesPublished_Call {
	return &L2BridgeSyncer_GetBridgesPublished_Call{Call: _e.mock.On("GetBridgesPublished", ctx, fromBlock, toBlock)}
}

func (_c *L2BridgeSyncer_GetBridgesPublished_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock uint64)) *L2BridgeSyncer_GetBridgesPublished_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(uint64), args[2].(uint64))
	})
	return _c
}

func (_c *L2BridgeSyncer_GetBridgesPublished_Call) Return(_a0 []bridgesync.Bridge, _a1 error) *L2BridgeSyncer_GetBridgesPublished_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L2BridgeSyncer_GetBridgesPublished_Call) RunAndReturn(run func(context.Context, uint64, uint64) ([]bridgesync.Bridge, error)) *L2BridgeSyncer_GetBridgesPublished_Call {
	_c.Call.Return(run)
	return _c
}

// GetClaims provides a mock function with given fields: ctx, fromBlock, toBlock
func (_m *L2BridgeSyncer) GetClaims(ctx context.Context, fromBlock uint64, toBlock uint64) ([]bridgesync.Claim, error) {
	ret := _m.Called(ctx, fromBlock, toBlock)

	if len(ret) == 0 {
		panic("no return value specified for GetClaims")
	}

	var r0 []bridgesync.Claim
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) ([]bridgesync.Claim, error)); ok {
		return rf(ctx, fromBlock, toBlock)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint64, uint64) []bridgesync.Claim); ok {
		r0 = rf(ctx, fromBlock, toBlock)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]bridgesync.Claim)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint64, uint64) error); ok {
		r1 = rf(ctx, fromBlock, toBlock)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// L2BridgeSyncer_GetClaims_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClaims'
type L2BridgeSyncer_GetClaims_Call struct {
	*mock.Call
}

// GetClaims is a helper method to define mock.On call
//   - ctx context.Context
//   - fromBlock uint64
//   - toBlock uint64
func (_e *L2BridgeSyncer_Expecter) GetClaims(ctx interface{}, fromBlock interface{}, toBlock interface{}) *L2BridgeSyncer_GetClaims_Call {
	return &L2BridgeSyncer_GetClaims_Call{Call: _e.mock.On("GetClaims", ctx, fromBlock, toBlock)}
}

func (_c *L2BridgeSyncer_GetClaims_Call) Run(run func(ctx context.Context, fromBlock uint64, toBlock uint64)) *L2BridgeSyncer_GetClaims_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(uint64), args[2].(uint64))
	})
	return _c
}

func (_c *L2BridgeSyncer_GetClaims_Call) Return(_a0 []bridgesync.Claim, _a1 error) *L2BridgeSyncer_GetClaims_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L2BridgeSyncer_GetClaims_Call) RunAndReturn(run func(context.Context, uint64, uint64) ([]bridgesync.Claim, error)) *L2BridgeSyncer_GetClaims_Call {
	_c.Call.Return(run)
	return _c
}

// GetExitRootByIndex provides a mock function with given fields: ctx, index
func (_m *L2BridgeSyncer) GetExitRootByIndex(ctx context.Context, index uint32) (treetypes.Root, error) {
	ret := _m.Called(ctx, index)

	if len(ret) == 0 {
		panic("no return value specified for GetExitRootByIndex")
	}

	var r0 treetypes.Root
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, uint32) (treetypes.Root, error)); ok {
		return rf(ctx, index)
	}
	if rf, ok := ret.Get(0).(func(context.Context, uint32) treetypes.Root); ok {
		r0 = rf(ctx, index)
	} else {
		r0 = ret.Get(0).(treetypes.Root)
	}

	if rf, ok := ret.Get(1).(func(context.Context, uint32) error); ok {
		r1 = rf(ctx, index)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// L2BridgeSyncer_GetExitRootByIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExitRootByIndex'
type L2BridgeSyncer_GetExitRootByIndex_Call struct {
	*mock.Call
}

// GetExitRootByIndex is a helper method to define mock.On call
//   - ctx context.Context
//   - index uint32
func (_e *L2BridgeSyncer_Expecter) GetExitRootByIndex(ctx interface{}, index interface{}) *L2BridgeSyncer_GetExitRootByIndex_Call {
	return &L2BridgeSyncer_GetExitRootByIndex_Call{Call: _e.mock.On("GetExitRootByIndex", ctx, index)}
}

func (_c *L2BridgeSyncer_GetExitRootByIndex_Call) Run(run func(ctx context.Context, index uint32)) *L2BridgeSyncer_GetExitRootByIndex_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(uint32))
	})
	return _c
}

func (_c *L2BridgeSyncer_GetExitRootByIndex_Call) Return(_a0 treetypes.Root, _a1 error) *L2BridgeSyncer_GetExitRootByIndex_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L2BridgeSyncer_GetExitRootByIndex_Call) RunAndReturn(run func(context.Context, uint32) (treetypes.Root, error)) *L2BridgeSyncer_GetExitRootByIndex_Call {
	_c.Call.Return(run)
	return _c
}

// GetLastProcessedBlock provides a mock function with given fields: ctx
func (_m *L2BridgeSyncer) GetLastProcessedBlock(ctx context.Context) (uint64, error) {
	ret := _m.Called(ctx)

	if len(ret) == 0 {
		panic("no return value specified for GetLastProcessedBlock")
	}

	var r0 uint64
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) uint64); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(uint64)
	}

	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// L2BridgeSyncer_GetLastProcessedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastProcessedBlock'
type L2BridgeSyncer_GetLastProcessedBlock_Call struct {
	*mock.Call
}

// GetLastProcessedBlock is a helper method to define mock.On call
//   - ctx context.Context
func (_e *L2BridgeSyncer_Expecter) GetLastProcessedBlock(ctx interface{}) *L2BridgeSyncer_GetLastProcessedBlock_Call {
	return &L2BridgeSyncer_GetLastProcessedBlock_Call{Call: _e.mock.On("GetLastProcessedBlock", ctx)}
}

func (_c *L2BridgeSyncer_GetLastProcessedBlock_Call) Run(run func(ctx context.Context)) *L2BridgeSyncer_GetLastProcessedBlock_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *L2BridgeSyncer_GetLastProcessedBlock_Call) Return(_a0 uint64, _a1 error) *L2BridgeSyncer_GetLastProcessedBlock_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *L2BridgeSyncer_GetLastProcessedBlock_Call) RunAndReturn(run func(context.Context) (uint64, error)) *L2BridgeSyncer_GetLastProcessedBlock_Call {
	_c.Call.Return(run)
	return _c
}

// OriginNetwork provides a mock function with given fields:
func (_m *L2BridgeSyncer) OriginNetwork() uint32 {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for OriginNetwork")
	}

	var r0 uint32
	if rf, ok := ret.Get(0).(func() uint32); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(uint32)
	}

	return r0
}

// L2BridgeSyncer_OriginNetwork_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OriginNetwork'
type L2BridgeSyncer_OriginNetwork_Call struct {
	*mock.Call
}

// OriginNetwork is a helper method to define mock.On call
func (_e *L2BridgeSyncer_Expecter) OriginNetwork() *L2BridgeSyncer_OriginNetwork_Call {
	return &L2BridgeSyncer_OriginNetwork_Call{Call: _e.mock.On("OriginNetwork")}
}

func (_c *L2BridgeSyncer_OriginNetwork_Call) Run(run func()) *L2BridgeSyncer_OriginNetwork_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *L2BridgeSyncer_OriginNetwork_Call) Return(_a0 uint32) *L2BridgeSyncer_OriginNetwork_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *L2BridgeSyncer_OriginNetwork_Call) RunAndReturn(run func() uint32) *L2BridgeSyncer_OriginNetwork_Call {
	_c.Call.Return(run)
	return _c
}

// NewL2BridgeSyncer creates a new instance of L2BridgeSyncer. 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 NewL2BridgeSyncer(t interface {
	mock.TestingT
	Cleanup(func())
}) *L2BridgeSyncer {
	mock := &L2BridgeSyncer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
