From 5a8a555d97cad8cb44a903dc9c7af6df17114c67 Mon Sep 17 00:00:00 2001 From: Max Levitskiy Date: Mon, 26 Jun 2023 11:46:10 +0200 Subject: [PATCH] State and chain mocks added --- contract/pkg/mock/substrate_chain.go | 171 ++++++++++ contract/pkg/mock/substrate_state.go | 486 +++++++++++++++++++++++++++ 2 files changed, 657 insertions(+) create mode 100644 contract/pkg/mock/substrate_chain.go create mode 100644 contract/pkg/mock/substrate_state.go diff --git a/contract/pkg/mock/substrate_chain.go b/contract/pkg/mock/substrate_chain.go new file mode 100644 index 0000000..b764704 --- /dev/null +++ b/contract/pkg/mock/substrate_chain.go @@ -0,0 +1,171 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/centrifuge/go-substrate-rpc-client/v4/rpc/chain (interfaces: Chain) + +// Package mock is a generated GoMock package. +package mock + +import ( + reflect "reflect" + + chain "github.com/centrifuge/go-substrate-rpc-client/v4/rpc/chain" + types "github.com/centrifuge/go-substrate-rpc-client/v4/types" + gomock "github.com/golang/mock/gomock" +) + +// MockChain is a mock of Chain interface. +type MockChain struct { + ctrl *gomock.Controller + recorder *MockChainMockRecorder +} + +// MockChainMockRecorder is the mock recorder for MockChain. +type MockChainMockRecorder struct { + mock *MockChain +} + +// NewMockChain creates a new mock instance. +func NewMockChain(ctrl *gomock.Controller) *MockChain { + mock := &MockChain{ctrl: ctrl} + mock.recorder = &MockChainMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockChain) EXPECT() *MockChainMockRecorder { + return m.recorder +} + +// GetBlock mocks base method. +func (m *MockChain) GetBlock(arg0 types.Hash) (*types.SignedBlock, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBlock", arg0) + ret0, _ := ret[0].(*types.SignedBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBlock indicates an expected call of GetBlock. +func (mr *MockChainMockRecorder) GetBlock(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockChain)(nil).GetBlock), arg0) +} + +// GetBlockHash mocks base method. +func (m *MockChain) GetBlockHash(arg0 uint64) (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBlockHash", arg0) + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBlockHash indicates an expected call of GetBlockHash. +func (mr *MockChainMockRecorder) GetBlockHash(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockHash", reflect.TypeOf((*MockChain)(nil).GetBlockHash), arg0) +} + +// GetBlockHashLatest mocks base method. +func (m *MockChain) GetBlockHashLatest() (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBlockHashLatest") + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBlockHashLatest indicates an expected call of GetBlockHashLatest. +func (mr *MockChainMockRecorder) GetBlockHashLatest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockHashLatest", reflect.TypeOf((*MockChain)(nil).GetBlockHashLatest)) +} + +// GetBlockLatest mocks base method. +func (m *MockChain) GetBlockLatest() (*types.SignedBlock, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBlockLatest") + ret0, _ := ret[0].(*types.SignedBlock) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBlockLatest indicates an expected call of GetBlockLatest. +func (mr *MockChainMockRecorder) GetBlockLatest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockLatest", reflect.TypeOf((*MockChain)(nil).GetBlockLatest)) +} + +// GetFinalizedHead mocks base method. +func (m *MockChain) GetFinalizedHead() (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetFinalizedHead") + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetFinalizedHead indicates an expected call of GetFinalizedHead. +func (mr *MockChainMockRecorder) GetFinalizedHead() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFinalizedHead", reflect.TypeOf((*MockChain)(nil).GetFinalizedHead)) +} + +// GetHeader mocks base method. +func (m *MockChain) GetHeader(arg0 types.Hash) (*types.Header, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetHeader", arg0) + ret0, _ := ret[0].(*types.Header) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetHeader indicates an expected call of GetHeader. +func (mr *MockChainMockRecorder) GetHeader(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHeader", reflect.TypeOf((*MockChain)(nil).GetHeader), arg0) +} + +// GetHeaderLatest mocks base method. +func (m *MockChain) GetHeaderLatest() (*types.Header, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetHeaderLatest") + ret0, _ := ret[0].(*types.Header) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetHeaderLatest indicates an expected call of GetHeaderLatest. +func (mr *MockChainMockRecorder) GetHeaderLatest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHeaderLatest", reflect.TypeOf((*MockChain)(nil).GetHeaderLatest)) +} + +// SubscribeFinalizedHeads mocks base method. +func (m *MockChain) SubscribeFinalizedHeads() (*chain.FinalizedHeadsSubscription, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeFinalizedHeads") + ret0, _ := ret[0].(*chain.FinalizedHeadsSubscription) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubscribeFinalizedHeads indicates an expected call of SubscribeFinalizedHeads. +func (mr *MockChainMockRecorder) SubscribeFinalizedHeads() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeFinalizedHeads", reflect.TypeOf((*MockChain)(nil).SubscribeFinalizedHeads)) +} + +// SubscribeNewHeads mocks base method. +func (m *MockChain) SubscribeNewHeads() (*chain.NewHeadsSubscription, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeNewHeads") + ret0, _ := ret[0].(*chain.NewHeadsSubscription) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubscribeNewHeads indicates an expected call of SubscribeNewHeads. +func (mr *MockChainMockRecorder) SubscribeNewHeads() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeNewHeads", reflect.TypeOf((*MockChain)(nil).SubscribeNewHeads)) +} diff --git a/contract/pkg/mock/substrate_state.go b/contract/pkg/mock/substrate_state.go new file mode 100644 index 0000000..36dd724 --- /dev/null +++ b/contract/pkg/mock/substrate_state.go @@ -0,0 +1,486 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/centrifuge/go-substrate-rpc-client/v4/rpc/state (interfaces: State) + +// Package mock is a generated GoMock package. +package mock + +import ( + reflect "reflect" + + state "github.com/centrifuge/go-substrate-rpc-client/v4/rpc/state" + types "github.com/centrifuge/go-substrate-rpc-client/v4/types" + gomock "github.com/golang/mock/gomock" +) + +// MockState is a mock of State interface. +type MockState struct { + ctrl *gomock.Controller + recorder *MockStateMockRecorder +} + +// MockStateMockRecorder is the mock recorder for MockState. +type MockStateMockRecorder struct { + mock *MockState +} + +// NewMockState creates a new mock instance. +func NewMockState(ctrl *gomock.Controller) *MockState { + mock := &MockState{ctrl: ctrl} + mock.recorder = &MockStateMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockState) EXPECT() *MockStateMockRecorder { + return m.recorder +} + +// GetChildKeys mocks base method. +func (m *MockState) GetChildKeys(arg0, arg1 types.StorageKey, arg2 types.Hash) ([]types.StorageKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildKeys", arg0, arg1, arg2) + ret0, _ := ret[0].([]types.StorageKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildKeys indicates an expected call of GetChildKeys. +func (mr *MockStateMockRecorder) GetChildKeys(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildKeys", reflect.TypeOf((*MockState)(nil).GetChildKeys), arg0, arg1, arg2) +} + +// GetChildKeysLatest mocks base method. +func (m *MockState) GetChildKeysLatest(arg0, arg1 types.StorageKey) ([]types.StorageKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildKeysLatest", arg0, arg1) + ret0, _ := ret[0].([]types.StorageKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildKeysLatest indicates an expected call of GetChildKeysLatest. +func (mr *MockStateMockRecorder) GetChildKeysLatest(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildKeysLatest", reflect.TypeOf((*MockState)(nil).GetChildKeysLatest), arg0, arg1) +} + +// GetChildStorage mocks base method. +func (m *MockState) GetChildStorage(arg0, arg1 types.StorageKey, arg2 interface{}, arg3 types.Hash) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorage", arg0, arg1, arg2, arg3) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorage indicates an expected call of GetChildStorage. +func (mr *MockStateMockRecorder) GetChildStorage(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorage", reflect.TypeOf((*MockState)(nil).GetChildStorage), arg0, arg1, arg2, arg3) +} + +// GetChildStorageHash mocks base method. +func (m *MockState) GetChildStorageHash(arg0, arg1 types.StorageKey, arg2 types.Hash) (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageHash", arg0, arg1, arg2) + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageHash indicates an expected call of GetChildStorageHash. +func (mr *MockStateMockRecorder) GetChildStorageHash(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageHash", reflect.TypeOf((*MockState)(nil).GetChildStorageHash), arg0, arg1, arg2) +} + +// GetChildStorageHashLatest mocks base method. +func (m *MockState) GetChildStorageHashLatest(arg0, arg1 types.StorageKey) (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageHashLatest", arg0, arg1) + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageHashLatest indicates an expected call of GetChildStorageHashLatest. +func (mr *MockStateMockRecorder) GetChildStorageHashLatest(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageHashLatest", reflect.TypeOf((*MockState)(nil).GetChildStorageHashLatest), arg0, arg1) +} + +// GetChildStorageLatest mocks base method. +func (m *MockState) GetChildStorageLatest(arg0, arg1 types.StorageKey, arg2 interface{}) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageLatest", arg0, arg1, arg2) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageLatest indicates an expected call of GetChildStorageLatest. +func (mr *MockStateMockRecorder) GetChildStorageLatest(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageLatest", reflect.TypeOf((*MockState)(nil).GetChildStorageLatest), arg0, arg1, arg2) +} + +// GetChildStorageRaw mocks base method. +func (m *MockState) GetChildStorageRaw(arg0, arg1 types.StorageKey, arg2 types.Hash) (*types.StorageDataRaw, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageRaw", arg0, arg1, arg2) + ret0, _ := ret[0].(*types.StorageDataRaw) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageRaw indicates an expected call of GetChildStorageRaw. +func (mr *MockStateMockRecorder) GetChildStorageRaw(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageRaw", reflect.TypeOf((*MockState)(nil).GetChildStorageRaw), arg0, arg1, arg2) +} + +// GetChildStorageRawLatest mocks base method. +func (m *MockState) GetChildStorageRawLatest(arg0, arg1 types.StorageKey) (*types.StorageDataRaw, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageRawLatest", arg0, arg1) + ret0, _ := ret[0].(*types.StorageDataRaw) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageRawLatest indicates an expected call of GetChildStorageRawLatest. +func (mr *MockStateMockRecorder) GetChildStorageRawLatest(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageRawLatest", reflect.TypeOf((*MockState)(nil).GetChildStorageRawLatest), arg0, arg1) +} + +// GetChildStorageSize mocks base method. +func (m *MockState) GetChildStorageSize(arg0, arg1 types.StorageKey, arg2 types.Hash) (types.U64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageSize", arg0, arg1, arg2) + ret0, _ := ret[0].(types.U64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageSize indicates an expected call of GetChildStorageSize. +func (mr *MockStateMockRecorder) GetChildStorageSize(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageSize", reflect.TypeOf((*MockState)(nil).GetChildStorageSize), arg0, arg1, arg2) +} + +// GetChildStorageSizeLatest mocks base method. +func (m *MockState) GetChildStorageSizeLatest(arg0, arg1 types.StorageKey) (types.U64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetChildStorageSizeLatest", arg0, arg1) + ret0, _ := ret[0].(types.U64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChildStorageSizeLatest indicates an expected call of GetChildStorageSizeLatest. +func (mr *MockStateMockRecorder) GetChildStorageSizeLatest(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildStorageSizeLatest", reflect.TypeOf((*MockState)(nil).GetChildStorageSizeLatest), arg0, arg1) +} + +// GetKeys mocks base method. +func (m *MockState) GetKeys(arg0 types.StorageKey, arg1 types.Hash) ([]types.StorageKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetKeys", arg0, arg1) + ret0, _ := ret[0].([]types.StorageKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetKeys indicates an expected call of GetKeys. +func (mr *MockStateMockRecorder) GetKeys(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKeys", reflect.TypeOf((*MockState)(nil).GetKeys), arg0, arg1) +} + +// GetKeysLatest mocks base method. +func (m *MockState) GetKeysLatest(arg0 types.StorageKey) ([]types.StorageKey, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetKeysLatest", arg0) + ret0, _ := ret[0].([]types.StorageKey) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetKeysLatest indicates an expected call of GetKeysLatest. +func (mr *MockStateMockRecorder) GetKeysLatest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetKeysLatest", reflect.TypeOf((*MockState)(nil).GetKeysLatest), arg0) +} + +// GetMetadata mocks base method. +func (m *MockState) GetMetadata(arg0 types.Hash) (*types.Metadata, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMetadata", arg0) + ret0, _ := ret[0].(*types.Metadata) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMetadata indicates an expected call of GetMetadata. +func (mr *MockStateMockRecorder) GetMetadata(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadata", reflect.TypeOf((*MockState)(nil).GetMetadata), arg0) +} + +// GetMetadataLatest mocks base method. +func (m *MockState) GetMetadataLatest() (*types.Metadata, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetMetadataLatest") + ret0, _ := ret[0].(*types.Metadata) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetMetadataLatest indicates an expected call of GetMetadataLatest. +func (mr *MockStateMockRecorder) GetMetadataLatest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetadataLatest", reflect.TypeOf((*MockState)(nil).GetMetadataLatest)) +} + +// GetRuntimeVersion mocks base method. +func (m *MockState) GetRuntimeVersion(arg0 types.Hash) (*types.RuntimeVersion, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRuntimeVersion", arg0) + ret0, _ := ret[0].(*types.RuntimeVersion) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRuntimeVersion indicates an expected call of GetRuntimeVersion. +func (mr *MockStateMockRecorder) GetRuntimeVersion(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRuntimeVersion", reflect.TypeOf((*MockState)(nil).GetRuntimeVersion), arg0) +} + +// GetRuntimeVersionLatest mocks base method. +func (m *MockState) GetRuntimeVersionLatest() (*types.RuntimeVersion, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetRuntimeVersionLatest") + ret0, _ := ret[0].(*types.RuntimeVersion) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRuntimeVersionLatest indicates an expected call of GetRuntimeVersionLatest. +func (mr *MockStateMockRecorder) GetRuntimeVersionLatest() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRuntimeVersionLatest", reflect.TypeOf((*MockState)(nil).GetRuntimeVersionLatest)) +} + +// GetStorage mocks base method. +func (m *MockState) GetStorage(arg0 types.StorageKey, arg1 interface{}, arg2 types.Hash) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorage", arg0, arg1, arg2) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorage indicates an expected call of GetStorage. +func (mr *MockStateMockRecorder) GetStorage(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorage", reflect.TypeOf((*MockState)(nil).GetStorage), arg0, arg1, arg2) +} + +// GetStorageHash mocks base method. +func (m *MockState) GetStorageHash(arg0 types.StorageKey, arg1 types.Hash) (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageHash", arg0, arg1) + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageHash indicates an expected call of GetStorageHash. +func (mr *MockStateMockRecorder) GetStorageHash(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageHash", reflect.TypeOf((*MockState)(nil).GetStorageHash), arg0, arg1) +} + +// GetStorageHashLatest mocks base method. +func (m *MockState) GetStorageHashLatest(arg0 types.StorageKey) (types.Hash, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageHashLatest", arg0) + ret0, _ := ret[0].(types.Hash) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageHashLatest indicates an expected call of GetStorageHashLatest. +func (mr *MockStateMockRecorder) GetStorageHashLatest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageHashLatest", reflect.TypeOf((*MockState)(nil).GetStorageHashLatest), arg0) +} + +// GetStorageLatest mocks base method. +func (m *MockState) GetStorageLatest(arg0 types.StorageKey, arg1 interface{}) (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageLatest", arg0, arg1) + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageLatest indicates an expected call of GetStorageLatest. +func (mr *MockStateMockRecorder) GetStorageLatest(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageLatest", reflect.TypeOf((*MockState)(nil).GetStorageLatest), arg0, arg1) +} + +// GetStorageRaw mocks base method. +func (m *MockState) GetStorageRaw(arg0 types.StorageKey, arg1 types.Hash) (*types.StorageDataRaw, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageRaw", arg0, arg1) + ret0, _ := ret[0].(*types.StorageDataRaw) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageRaw indicates an expected call of GetStorageRaw. +func (mr *MockStateMockRecorder) GetStorageRaw(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageRaw", reflect.TypeOf((*MockState)(nil).GetStorageRaw), arg0, arg1) +} + +// GetStorageRawLatest mocks base method. +func (m *MockState) GetStorageRawLatest(arg0 types.StorageKey) (*types.StorageDataRaw, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageRawLatest", arg0) + ret0, _ := ret[0].(*types.StorageDataRaw) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageRawLatest indicates an expected call of GetStorageRawLatest. +func (mr *MockStateMockRecorder) GetStorageRawLatest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageRawLatest", reflect.TypeOf((*MockState)(nil).GetStorageRawLatest), arg0) +} + +// GetStorageSize mocks base method. +func (m *MockState) GetStorageSize(arg0 types.StorageKey, arg1 types.Hash) (types.U64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageSize", arg0, arg1) + ret0, _ := ret[0].(types.U64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageSize indicates an expected call of GetStorageSize. +func (mr *MockStateMockRecorder) GetStorageSize(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageSize", reflect.TypeOf((*MockState)(nil).GetStorageSize), arg0, arg1) +} + +// GetStorageSizeLatest mocks base method. +func (m *MockState) GetStorageSizeLatest(arg0 types.StorageKey) (types.U64, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetStorageSizeLatest", arg0) + ret0, _ := ret[0].(types.U64) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetStorageSizeLatest indicates an expected call of GetStorageSizeLatest. +func (mr *MockStateMockRecorder) GetStorageSizeLatest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStorageSizeLatest", reflect.TypeOf((*MockState)(nil).GetStorageSizeLatest), arg0) +} + +// QueryStorage mocks base method. +func (m *MockState) QueryStorage(arg0 []types.StorageKey, arg1, arg2 types.Hash) ([]types.StorageChangeSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryStorage", arg0, arg1, arg2) + ret0, _ := ret[0].([]types.StorageChangeSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryStorage indicates an expected call of QueryStorage. +func (mr *MockStateMockRecorder) QueryStorage(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStorage", reflect.TypeOf((*MockState)(nil).QueryStorage), arg0, arg1, arg2) +} + +// QueryStorageAt mocks base method. +func (m *MockState) QueryStorageAt(arg0 []types.StorageKey, arg1 types.Hash) ([]types.StorageChangeSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryStorageAt", arg0, arg1) + ret0, _ := ret[0].([]types.StorageChangeSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryStorageAt indicates an expected call of QueryStorageAt. +func (mr *MockStateMockRecorder) QueryStorageAt(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStorageAt", reflect.TypeOf((*MockState)(nil).QueryStorageAt), arg0, arg1) +} + +// QueryStorageAtLatest mocks base method. +func (m *MockState) QueryStorageAtLatest(arg0 []types.StorageKey) ([]types.StorageChangeSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryStorageAtLatest", arg0) + ret0, _ := ret[0].([]types.StorageChangeSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryStorageAtLatest indicates an expected call of QueryStorageAtLatest. +func (mr *MockStateMockRecorder) QueryStorageAtLatest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStorageAtLatest", reflect.TypeOf((*MockState)(nil).QueryStorageAtLatest), arg0) +} + +// QueryStorageLatest mocks base method. +func (m *MockState) QueryStorageLatest(arg0 []types.StorageKey, arg1 types.Hash) ([]types.StorageChangeSet, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "QueryStorageLatest", arg0, arg1) + ret0, _ := ret[0].([]types.StorageChangeSet) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// QueryStorageLatest indicates an expected call of QueryStorageLatest. +func (mr *MockStateMockRecorder) QueryStorageLatest(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStorageLatest", reflect.TypeOf((*MockState)(nil).QueryStorageLatest), arg0, arg1) +} + +// SubscribeRuntimeVersion mocks base method. +func (m *MockState) SubscribeRuntimeVersion() (*state.RuntimeVersionSubscription, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeRuntimeVersion") + ret0, _ := ret[0].(*state.RuntimeVersionSubscription) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubscribeRuntimeVersion indicates an expected call of SubscribeRuntimeVersion. +func (mr *MockStateMockRecorder) SubscribeRuntimeVersion() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeRuntimeVersion", reflect.TypeOf((*MockState)(nil).SubscribeRuntimeVersion)) +} + +// SubscribeStorageRaw mocks base method. +func (m *MockState) SubscribeStorageRaw(arg0 []types.StorageKey) (*state.StorageSubscription, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SubscribeStorageRaw", arg0) + ret0, _ := ret[0].(*state.StorageSubscription) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SubscribeStorageRaw indicates an expected call of SubscribeStorageRaw. +func (mr *MockStateMockRecorder) SubscribeStorageRaw(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeStorageRaw", reflect.TypeOf((*MockState)(nil).SubscribeStorageRaw), arg0) +}