// Code generated by mockery v2.14.0. DO NOT EDIT.

package client

import (
	context "context"

	models "github.com/portto/aptos-go-sdk/models"
	mock "github.com/stretchr/testify/mock"
)

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

// CheckBasicNodeHealth provides a mock function with given fields: ctx, durationSecs, opts
func (_m *MockAptosClient) CheckBasicNodeHealth(ctx context.Context, durationSecs uint32, opts ...interface{}) (*HealthInfo, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, durationSecs)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *HealthInfo
	if rf, ok := ret.Get(0).(func(context.Context, uint32, ...interface{}) *HealthInfo); ok {
		r0 = rf(ctx, durationSecs, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*HealthInfo)
		}
	}

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

	return r0, r1
}

// EstimateGasPrice provides a mock function with given fields: ctx, opts
func (_m *MockAptosClient) EstimateGasPrice(ctx context.Context, opts ...interface{}) (uint64, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

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

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

	return r0, r1
}

// GetAccount provides a mock function with given fields: ctx, address, opts
func (_m *MockAptosClient) GetAccount(ctx context.Context, address string, opts ...interface{}) (*AccountInfo, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *AccountInfo
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) *AccountInfo); ok {
		r0 = rf(ctx, address, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*AccountInfo)
		}
	}

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

	return r0, r1
}

// GetAccountModules provides a mock function with given fields: ctx, address, opts
func (_m *MockAptosClient) GetAccountModules(ctx context.Context, address string, opts ...interface{}) ([]AccountModule, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []AccountModule
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) []AccountModule); ok {
		r0 = rf(ctx, address, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]AccountModule)
		}
	}

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

	return r0, r1
}

// GetAccountResources provides a mock function with given fields: ctx, address, opts
func (_m *MockAptosClient) GetAccountResources(ctx context.Context, address string, opts ...interface{}) ([]AccountResource, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []AccountResource
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) []AccountResource); ok {
		r0 = rf(ctx, address, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]AccountResource)
		}
	}

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

	return r0, r1
}

// GetAccountTransactions provides a mock function with given fields: ctx, address, start, limit, opts
func (_m *MockAptosClient) GetAccountTransactions(ctx context.Context, address string, start int, limit int, opts ...interface{}) ([]TransactionResp, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address, start, limit)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []TransactionResp
	if rf, ok := ret.Get(0).(func(context.Context, string, int, int, ...interface{}) []TransactionResp); ok {
		r0 = rf(ctx, address, start, limit, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]TransactionResp)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, int, int, ...interface{}) error); ok {
		r1 = rf(ctx, address, start, limit, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetBlocksByHeight provides a mock function with given fields: ctx, height, withTransactions, opts
func (_m *MockAptosClient) GetBlocksByHeight(ctx context.Context, height uint64, withTransactions bool, opts ...interface{}) (*Block, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, height, withTransactions)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *Block
	if rf, ok := ret.Get(0).(func(context.Context, uint64, bool, ...interface{}) *Block); ok {
		r0 = rf(ctx, height, withTransactions, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*Block)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, uint64, bool, ...interface{}) error); ok {
		r1 = rf(ctx, height, withTransactions, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetBlocksByVersion provides a mock function with given fields: ctx, version, withTransactions, opts
func (_m *MockAptosClient) GetBlocksByVersion(ctx context.Context, version uint64, withTransactions bool, opts ...interface{}) (*Block, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, version, withTransactions)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *Block
	if rf, ok := ret.Get(0).(func(context.Context, uint64, bool, ...interface{}) *Block); ok {
		r0 = rf(ctx, version, withTransactions, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*Block)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, uint64, bool, ...interface{}) error); ok {
		r1 = rf(ctx, version, withTransactions, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetEventsByCreationNumber provides a mock function with given fields: ctx, address, creationNumber, query, opts
func (_m *MockAptosClient) GetEventsByCreationNumber(ctx context.Context, address string, creationNumber string, query map[string]interface{}, opts ...interface{}) ([]models.Event, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address, creationNumber, query)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []models.Event
	if rf, ok := ret.Get(0).(func(context.Context, string, string, map[string]interface{}, ...interface{}) []models.Event); ok {
		r0 = rf(ctx, address, creationNumber, query, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.Event)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string, map[string]interface{}, ...interface{}) error); ok {
		r1 = rf(ctx, address, creationNumber, query, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetEventsByEventHandle provides a mock function with given fields: ctx, address, handleStruct, fieldName, start, limit, opts
func (_m *MockAptosClient) GetEventsByEventHandle(ctx context.Context, address string, handleStruct string, fieldName string, start uint64, limit uint64, opts ...interface{}) ([]models.Event, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address, handleStruct, fieldName, start, limit)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []models.Event
	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, uint64, uint64, ...interface{}) []models.Event); ok {
		r0 = rf(ctx, address, handleStruct, fieldName, start, limit, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.Event)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, uint64, uint64, ...interface{}) error); ok {
		r1 = rf(ctx, address, handleStruct, fieldName, start, limit, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetModuleByModuleID provides a mock function with given fields: ctx, address, moduleID, opts
func (_m *MockAptosClient) GetModuleByModuleID(ctx context.Context, address string, moduleID string, opts ...interface{}) (*AccountModule, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address, moduleID)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *AccountModule
	if rf, ok := ret.Get(0).(func(context.Context, string, string, ...interface{}) *AccountModule); ok {
		r0 = rf(ctx, address, moduleID, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*AccountModule)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string, ...interface{}) error); ok {
		r1 = rf(ctx, address, moduleID, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetResourceByAccountAddressAndResourceType provides a mock function with given fields: ctx, address, resourceType, opts
func (_m *MockAptosClient) GetResourceByAccountAddressAndResourceType(ctx context.Context, address string, resourceType string, opts ...interface{}) (*AccountResource, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, address, resourceType)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *AccountResource
	if rf, ok := ret.Get(0).(func(context.Context, string, string, ...interface{}) *AccountResource); ok {
		r0 = rf(ctx, address, resourceType, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*AccountResource)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, string, string, ...interface{}) error); ok {
		r1 = rf(ctx, address, resourceType, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetResourceWithCustomType provides a mock function with given fields: ctx, address, resourceType, resp, opts
func (_m *MockAptosClient) GetResourceWithCustomType(ctx context.Context, address string, resourceType string, resp interface{}, opts ...interface{}) error {
	var _ca []interface{}
	_ca = append(_ca, ctx, address, resourceType, resp)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, interface{}, ...interface{}) error); ok {
		r0 = rf(ctx, address, resourceType, resp, opts...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetTableItemByHandleAndKey provides a mock function with given fields: ctx, handle, req, resp, opts
func (_m *MockAptosClient) GetTableItemByHandleAndKey(ctx context.Context, handle string, req TableItemReq, resp interface{}, opts ...interface{}) error {
	var _ca []interface{}
	_ca = append(_ca, ctx, handle, req, resp)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, TableItemReq, interface{}, ...interface{}) error); ok {
		r0 = rf(ctx, handle, req, resp, opts...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetTransactionByHash provides a mock function with given fields: ctx, txHash, opts
func (_m *MockAptosClient) GetTransactionByHash(ctx context.Context, txHash string, opts ...interface{}) (*TransactionResp, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, txHash)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *TransactionResp
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) *TransactionResp); ok {
		r0 = rf(ctx, txHash, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*TransactionResp)
		}
	}

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

	return r0, r1
}

// GetTransactionByVersion provides a mock function with given fields: ctx, version, opts
func (_m *MockAptosClient) GetTransactionByVersion(ctx context.Context, version uint64, opts ...interface{}) (*TransactionResp, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, version)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *TransactionResp
	if rf, ok := ret.Get(0).(func(context.Context, uint64, ...interface{}) *TransactionResp); ok {
		r0 = rf(ctx, version, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*TransactionResp)
		}
	}

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

	return r0, r1
}

// GetTransactions provides a mock function with given fields: ctx, start, limit, opts
func (_m *MockAptosClient) GetTransactions(ctx context.Context, start int, limit int, opts ...interface{}) ([]TransactionResp, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, start, limit)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []TransactionResp
	if rf, ok := ret.Get(0).(func(context.Context, int, int, ...interface{}) []TransactionResp); ok {
		r0 = rf(ctx, start, limit, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]TransactionResp)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, int, int, ...interface{}) error); ok {
		r1 = rf(ctx, start, limit, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// LedgerInformation provides a mock function with given fields: ctx, opts
func (_m *MockAptosClient) LedgerInformation(ctx context.Context, opts ...interface{}) (*LedgerInfo, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *LedgerInfo
	if rf, ok := ret.Get(0).(func(context.Context, ...interface{}) *LedgerInfo); ok {
		r0 = rf(ctx, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*LedgerInfo)
		}
	}

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

	return r0, r1
}

// SimulateTransaction provides a mock function with given fields: ctx, tx, estimateGasUnitPrice, estimateMaxGasAmount, opts
func (_m *MockAptosClient) SimulateTransaction(ctx context.Context, tx models.UserTransaction, estimateGasUnitPrice bool, estimateMaxGasAmount bool, opts ...interface{}) ([]TransactionResp, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, tx, estimateGasUnitPrice, estimateMaxGasAmount)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 []TransactionResp
	if rf, ok := ret.Get(0).(func(context.Context, models.UserTransaction, bool, bool, ...interface{}) []TransactionResp); ok {
		r0 = rf(ctx, tx, estimateGasUnitPrice, estimateMaxGasAmount, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]TransactionResp)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, models.UserTransaction, bool, bool, ...interface{}) error); ok {
		r1 = rf(ctx, tx, estimateGasUnitPrice, estimateMaxGasAmount, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SubmitTransaction provides a mock function with given fields: ctx, tx, opts
func (_m *MockAptosClient) SubmitTransaction(ctx context.Context, tx models.UserTransaction, opts ...interface{}) (*TransactionResp, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, tx)
	_ca = append(_ca, opts...)
	ret := _m.Called(_ca...)

	var r0 *TransactionResp
	if rf, ok := ret.Get(0).(func(context.Context, models.UserTransaction, ...interface{}) *TransactionResp); ok {
		r0 = rf(ctx, tx, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*TransactionResp)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(context.Context, models.UserTransaction, ...interface{}) error); ok {
		r1 = rf(ctx, tx, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// WaitForTransaction provides a mock function with given fields: ctx, txHash
func (_m *MockAptosClient) WaitForTransaction(ctx context.Context, txHash string) error {
	ret := _m.Called(ctx, txHash)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = rf(ctx, txHash)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

type mockConstructorTestingTNewMockAptosClient interface {
	mock.TestingT
	Cleanup(func())
}

// NewMockAptosClient creates a new instance of MockAptosClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockAptosClient(t mockConstructorTestingTNewMockAptosClient) *MockAptosClient {
	mock := &MockAptosClient{}
	mock.Mock.Test(t)

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

	return mock
}
