// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/ChainSafe/gossamer/dot/state (interfaces: StorageState)
//
// Generated by this command:
//
//	mockgen -destination=mock_storage_state_test.go -package babe github.com/ChainSafe/gossamer/dot/state StorageState
//

// Package babe is a generated GoMock package.
package babe

import (
	reflect "reflect"

	state "github.com/ChainSafe/gossamer/dot/state"
	types "github.com/ChainSafe/gossamer/dot/types"
	common "github.com/ChainSafe/gossamer/lib/common"
	storage "github.com/ChainSafe/gossamer/lib/runtime/storage"
	trie "github.com/ChainSafe/gossamer/pkg/trie"
	gomock "go.uber.org/mock/gomock"
)

// MockStorageState is a mock of StorageState interface.
type MockStorageState struct {
	ctrl     *gomock.Controller
	recorder *MockStorageStateMockRecorder
	isgomock struct{}
}

// MockStorageStateMockRecorder is the mock recorder for MockStorageState.
type MockStorageStateMockRecorder struct {
	mock *MockStorageState
}

// NewMockStorageState creates a new mock instance.
func NewMockStorageState(ctrl *gomock.Controller) *MockStorageState {
	mock := &MockStorageState{ctrl: ctrl}
	mock.recorder = &MockStorageStateMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockStorageState) EXPECT() *MockStorageStateMockRecorder {
	return m.recorder
}

// Entries mocks base method.
func (m *MockStorageState) Entries(root *common.Hash) (map[string][]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Entries", root)
	ret0, _ := ret[0].(map[string][]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Entries indicates an expected call of Entries.
func (mr *MockStorageStateMockRecorder) Entries(root any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Entries", reflect.TypeOf((*MockStorageState)(nil).Entries), root)
}

// GenerateTrieProof mocks base method.
func (m *MockStorageState) GenerateTrieProof(stateRoot common.Hash, keys [][]byte) ([][]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GenerateTrieProof", stateRoot, keys)
	ret0, _ := ret[0].([][]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GenerateTrieProof indicates an expected call of GenerateTrieProof.
func (mr *MockStorageStateMockRecorder) GenerateTrieProof(stateRoot, keys any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateTrieProof", reflect.TypeOf((*MockStorageState)(nil).GenerateTrieProof), stateRoot, keys)
}

// GetKeysWithPrefix mocks base method.
func (m *MockStorageState) GetKeysWithPrefix(root *common.Hash, prefix []byte) ([][]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetKeysWithPrefix", root, prefix)
	ret0, _ := ret[0].([][]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetKeysWithPrefix indicates an expected call of GetKeysWithPrefix.
func (mr *MockStorageStateMockRecorder) GetKeysWithPrefix(root, prefix any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKeysWithPrefix", reflect.TypeOf((*MockStorageState)(nil).GetKeysWithPrefix), root, prefix)
}

// GetStateRootFromBlock mocks base method.
func (m *MockStorageState) GetStateRootFromBlock(bhash *common.Hash) (*common.Hash, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetStateRootFromBlock", bhash)
	ret0, _ := ret[0].(*common.Hash)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetStateRootFromBlock indicates an expected call of GetStateRootFromBlock.
func (mr *MockStorageStateMockRecorder) GetStateRootFromBlock(bhash any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateRootFromBlock", reflect.TypeOf((*MockStorageState)(nil).GetStateRootFromBlock), bhash)
}

// GetStorage mocks base method.
func (m *MockStorageState) GetStorage(root *common.Hash, key []byte) ([]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetStorage", root, key)
	ret0, _ := ret[0].([]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetStorage indicates an expected call of GetStorage.
func (mr *MockStorageStateMockRecorder) GetStorage(root, key any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorage", reflect.TypeOf((*MockStorageState)(nil).GetStorage), root, key)
}

// GetStorageByBlockHash mocks base method.
func (m *MockStorageState) GetStorageByBlockHash(bhash *common.Hash, key []byte) ([]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetStorageByBlockHash", bhash, key)
	ret0, _ := ret[0].([]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetStorageByBlockHash indicates an expected call of GetStorageByBlockHash.
func (mr *MockStorageStateMockRecorder) GetStorageByBlockHash(bhash, key any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageByBlockHash", reflect.TypeOf((*MockStorageState)(nil).GetStorageByBlockHash), bhash, key)
}

// GetStorageChild mocks base method.
func (m *MockStorageState) GetStorageChild(root *common.Hash, keyToChild []byte) (trie.Trie, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetStorageChild", root, keyToChild)
	ret0, _ := ret[0].(trie.Trie)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetStorageChild indicates an expected call of GetStorageChild.
func (mr *MockStorageStateMockRecorder) GetStorageChild(root, keyToChild any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageChild", reflect.TypeOf((*MockStorageState)(nil).GetStorageChild), root, keyToChild)
}

// GetStorageFromChild mocks base method.
func (m *MockStorageState) GetStorageFromChild(root *common.Hash, keyToChild, key []byte) ([]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetStorageFromChild", root, keyToChild, key)
	ret0, _ := ret[0].([]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetStorageFromChild indicates an expected call of GetStorageFromChild.
func (mr *MockStorageStateMockRecorder) GetStorageFromChild(root, keyToChild, key any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageFromChild", reflect.TypeOf((*MockStorageState)(nil).GetStorageFromChild), root, keyToChild, key)
}

// LoadCode mocks base method.
func (m *MockStorageState) LoadCode(hash *common.Hash) ([]byte, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LoadCode", hash)
	ret0, _ := ret[0].([]byte)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// LoadCode indicates an expected call of LoadCode.
func (mr *MockStorageStateMockRecorder) LoadCode(hash any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadCode", reflect.TypeOf((*MockStorageState)(nil).LoadCode), hash)
}

// LoadCodeHash mocks base method.
func (m *MockStorageState) LoadCodeHash(hash *common.Hash) (common.Hash, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LoadCodeHash", hash)
	ret0, _ := ret[0].(common.Hash)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// LoadCodeHash indicates an expected call of LoadCodeHash.
func (mr *MockStorageStateMockRecorder) LoadCodeHash(hash any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadCodeHash", reflect.TypeOf((*MockStorageState)(nil).LoadCodeHash), hash)
}

// Lock mocks base method.
func (m *MockStorageState) Lock() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Lock")
}

// Lock indicates an expected call of Lock.
func (mr *MockStorageStateMockRecorder) Lock() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Lock", reflect.TypeOf((*MockStorageState)(nil).Lock))
}

// RegisterStorageObserver mocks base method.
func (m *MockStorageState) RegisterStorageObserver(o state.Observer) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "RegisterStorageObserver", o)
}

// RegisterStorageObserver indicates an expected call of RegisterStorageObserver.
func (mr *MockStorageStateMockRecorder) RegisterStorageObserver(o any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterStorageObserver", reflect.TypeOf((*MockStorageState)(nil).RegisterStorageObserver), o)
}

// StorageRoot mocks base method.
func (m *MockStorageState) StorageRoot() (common.Hash, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StorageRoot")
	ret0, _ := ret[0].(common.Hash)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// StorageRoot indicates an expected call of StorageRoot.
func (mr *MockStorageStateMockRecorder) StorageRoot() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageRoot", reflect.TypeOf((*MockStorageState)(nil).StorageRoot))
}

// StoreTrie mocks base method.
func (m *MockStorageState) StoreTrie(arg0 storage.TrieState, arg1 *types.Header) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StoreTrie", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}

// StoreTrie indicates an expected call of StoreTrie.
func (mr *MockStorageStateMockRecorder) StoreTrie(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreTrie", reflect.TypeOf((*MockStorageState)(nil).StoreTrie), arg0, arg1)
}

// TrieState mocks base method.
func (m *MockStorageState) TrieState(root *common.Hash) (storage.TrieState, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "TrieState", root)
	ret0, _ := ret[0].(storage.TrieState)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// TrieState indicates an expected call of TrieState.
func (mr *MockStorageStateMockRecorder) TrieState(root any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TrieState", reflect.TypeOf((*MockStorageState)(nil).TrieState), root)
}

// Unlock mocks base method.
func (m *MockStorageState) Unlock() {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "Unlock")
}

// Unlock indicates an expected call of Unlock.
func (mr *MockStorageStateMockRecorder) Unlock() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unlock", reflect.TypeOf((*MockStorageState)(nil).Unlock))
}

// UnregisterStorageObserver mocks base method.
func (m *MockStorageState) UnregisterStorageObserver(o state.Observer) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "UnregisterStorageObserver", o)
}

// UnregisterStorageObserver indicates an expected call of UnregisterStorageObserver.
func (mr *MockStorageStateMockRecorder) UnregisterStorageObserver(o any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnregisterStorageObserver", reflect.TypeOf((*MockStorageState)(nil).UnregisterStorageObserver), o)
}
