// Code generated by mockery. DO NOT EDIT.

package mockseth

import (
	context "context"

	common "github.com/ethereum/go-ethereum/common"

	etherman "github.com/0xPolygonHermez/zkevm-node/etherman"

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

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

type CallDataExtractor_Expecter struct {
	mock *mock.Mock
}

func (_m *CallDataExtractor) EXPECT() *CallDataExtractor_Expecter {
	return &CallDataExtractor_Expecter{mock: &_m.Mock}
}

// ExtractCallData provides a mock function with given fields: ctx, blockHash, txHash, txIndex
func (_m *CallDataExtractor) ExtractCallData(ctx context.Context, blockHash common.Hash, txHash common.Hash, txIndex uint) (*etherman.CallData, error) {
	ret := _m.Called(ctx, blockHash, txHash, txIndex)

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

	var r0 *etherman.CallData
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Hash, uint) (*etherman.CallData, error)); ok {
		return rf(ctx, blockHash, txHash, txIndex)
	}
	if rf, ok := ret.Get(0).(func(context.Context, common.Hash, common.Hash, uint) *etherman.CallData); ok {
		r0 = rf(ctx, blockHash, txHash, txIndex)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*etherman.CallData)
		}
	}

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

	return r0, r1
}

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

// ExtractCallData is a helper method to define mock.On call
//   - ctx context.Context
//   - blockHash common.Hash
//   - txHash common.Hash
//   - txIndex uint
func (_e *CallDataExtractor_Expecter) ExtractCallData(ctx interface{}, blockHash interface{}, txHash interface{}, txIndex interface{}) *CallDataExtractor_ExtractCallData_Call {
	return &CallDataExtractor_ExtractCallData_Call{Call: _e.mock.On("ExtractCallData", ctx, blockHash, txHash, txIndex)}
}

func (_c *CallDataExtractor_ExtractCallData_Call) Run(run func(ctx context.Context, blockHash common.Hash, txHash common.Hash, txIndex uint)) *CallDataExtractor_ExtractCallData_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Hash), args[3].(uint))
	})
	return _c
}

func (_c *CallDataExtractor_ExtractCallData_Call) Return(_a0 *etherman.CallData, _a1 error) *CallDataExtractor_ExtractCallData_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *CallDataExtractor_ExtractCallData_Call) RunAndReturn(run func(context.Context, common.Hash, common.Hash, uint) (*etherman.CallData, error)) *CallDataExtractor_ExtractCallData_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
