diff --git a/golang/iotexapi/mock_iotexapi/mock_iotexapi.go b/golang/iotexapi/mock_iotexapi/mock_iotexapi.go index eea8dda..a73114d 100644 --- a/golang/iotexapi/mock_iotexapi/mock_iotexapi.go +++ b/golang/iotexapi/mock_iotexapi/mock_iotexapi.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/iotexproject/iotex-proto/golang/iotexapi (interfaces: APIServiceServer) +// Source: github.com/iotexproject/iotex-proto/golang/iotexapi (interfaces: APIServiceServer,APIServiceClient) // Package mock_iotexapi is a generated GoMock package. package mock_iotexapi @@ -10,6 +10,7 @@ import ( gomock "github.com/golang/mock/gomock" iotexapi "github.com/iotexproject/iotex-proto/golang/iotexapi" + grpc "google.golang.org/grpc" ) // MockAPIServiceServer is a mock of APIServiceServer interface. @@ -407,3 +408,526 @@ func (mr *MockAPIServiceServerMockRecorder) TraceTransactionStructLogs(arg0, arg mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TraceTransactionStructLogs", reflect.TypeOf((*MockAPIServiceServer)(nil).TraceTransactionStructLogs), arg0, arg1) } + +// MockAPIServiceClient is a mock of APIServiceClient interface. +type MockAPIServiceClient struct { + ctrl *gomock.Controller + recorder *MockAPIServiceClientMockRecorder +} + +// MockAPIServiceClientMockRecorder is the mock recorder for MockAPIServiceClient. +type MockAPIServiceClientMockRecorder struct { + mock *MockAPIServiceClient +} + +// NewMockAPIServiceClient creates a new mock instance. +func NewMockAPIServiceClient(ctrl *gomock.Controller) *MockAPIServiceClient { + mock := &MockAPIServiceClient{ctrl: ctrl} + mock.recorder = &MockAPIServiceClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAPIServiceClient) EXPECT() *MockAPIServiceClientMockRecorder { + return m.recorder +} + +// EstimateActionGasConsumption mocks base method. +func (m *MockAPIServiceClient) EstimateActionGasConsumption(arg0 context.Context, arg1 *iotexapi.EstimateActionGasConsumptionRequest, arg2 ...grpc.CallOption) (*iotexapi.EstimateActionGasConsumptionResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "EstimateActionGasConsumption", varargs...) + ret0, _ := ret[0].(*iotexapi.EstimateActionGasConsumptionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EstimateActionGasConsumption indicates an expected call of EstimateActionGasConsumption. +func (mr *MockAPIServiceClientMockRecorder) EstimateActionGasConsumption(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimateActionGasConsumption", reflect.TypeOf((*MockAPIServiceClient)(nil).EstimateActionGasConsumption), varargs...) +} + +// EstimateGasForAction mocks base method. +func (m *MockAPIServiceClient) EstimateGasForAction(arg0 context.Context, arg1 *iotexapi.EstimateGasForActionRequest, arg2 ...grpc.CallOption) (*iotexapi.EstimateGasForActionResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "EstimateGasForAction", varargs...) + ret0, _ := ret[0].(*iotexapi.EstimateGasForActionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// EstimateGasForAction indicates an expected call of EstimateGasForAction. +func (mr *MockAPIServiceClientMockRecorder) EstimateGasForAction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EstimateGasForAction", reflect.TypeOf((*MockAPIServiceClient)(nil).EstimateGasForAction), varargs...) +} + +// GetAccount mocks base method. +func (m *MockAPIServiceClient) GetAccount(arg0 context.Context, arg1 *iotexapi.GetAccountRequest, arg2 ...grpc.CallOption) (*iotexapi.GetAccountResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetAccount", varargs...) + ret0, _ := ret[0].(*iotexapi.GetAccountResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockAPIServiceClientMockRecorder) GetAccount(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAPIServiceClient)(nil).GetAccount), varargs...) +} + +// GetActPoolActions mocks base method. +func (m *MockAPIServiceClient) GetActPoolActions(arg0 context.Context, arg1 *iotexapi.GetActPoolActionsRequest, arg2 ...grpc.CallOption) (*iotexapi.GetActPoolActionsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetActPoolActions", varargs...) + ret0, _ := ret[0].(*iotexapi.GetActPoolActionsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetActPoolActions indicates an expected call of GetActPoolActions. +func (mr *MockAPIServiceClientMockRecorder) GetActPoolActions(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActPoolActions", reflect.TypeOf((*MockAPIServiceClient)(nil).GetActPoolActions), varargs...) +} + +// GetActions mocks base method. +func (m *MockAPIServiceClient) GetActions(arg0 context.Context, arg1 *iotexapi.GetActionsRequest, arg2 ...grpc.CallOption) (*iotexapi.GetActionsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetActions", varargs...) + ret0, _ := ret[0].(*iotexapi.GetActionsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetActions indicates an expected call of GetActions. +func (mr *MockAPIServiceClientMockRecorder) GetActions(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActions", reflect.TypeOf((*MockAPIServiceClient)(nil).GetActions), varargs...) +} + +// GetBlockMetas mocks base method. +func (m *MockAPIServiceClient) GetBlockMetas(arg0 context.Context, arg1 *iotexapi.GetBlockMetasRequest, arg2 ...grpc.CallOption) (*iotexapi.GetBlockMetasResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetBlockMetas", varargs...) + ret0, _ := ret[0].(*iotexapi.GetBlockMetasResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetBlockMetas indicates an expected call of GetBlockMetas. +func (mr *MockAPIServiceClientMockRecorder) GetBlockMetas(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockMetas", reflect.TypeOf((*MockAPIServiceClient)(nil).GetBlockMetas), varargs...) +} + +// GetChainMeta mocks base method. +func (m *MockAPIServiceClient) GetChainMeta(arg0 context.Context, arg1 *iotexapi.GetChainMetaRequest, arg2 ...grpc.CallOption) (*iotexapi.GetChainMetaResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetChainMeta", varargs...) + ret0, _ := ret[0].(*iotexapi.GetChainMetaResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetChainMeta indicates an expected call of GetChainMeta. +func (mr *MockAPIServiceClientMockRecorder) GetChainMeta(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChainMeta", reflect.TypeOf((*MockAPIServiceClient)(nil).GetChainMeta), varargs...) +} + +// GetElectionBuckets mocks base method. +func (m *MockAPIServiceClient) GetElectionBuckets(arg0 context.Context, arg1 *iotexapi.GetElectionBucketsRequest, arg2 ...grpc.CallOption) (*iotexapi.GetElectionBucketsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetElectionBuckets", varargs...) + ret0, _ := ret[0].(*iotexapi.GetElectionBucketsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetElectionBuckets indicates an expected call of GetElectionBuckets. +func (mr *MockAPIServiceClientMockRecorder) GetElectionBuckets(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetElectionBuckets", reflect.TypeOf((*MockAPIServiceClient)(nil).GetElectionBuckets), varargs...) +} + +// GetEpochMeta mocks base method. +func (m *MockAPIServiceClient) GetEpochMeta(arg0 context.Context, arg1 *iotexapi.GetEpochMetaRequest, arg2 ...grpc.CallOption) (*iotexapi.GetEpochMetaResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetEpochMeta", varargs...) + ret0, _ := ret[0].(*iotexapi.GetEpochMetaResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetEpochMeta indicates an expected call of GetEpochMeta. +func (mr *MockAPIServiceClientMockRecorder) GetEpochMeta(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEpochMeta", reflect.TypeOf((*MockAPIServiceClient)(nil).GetEpochMeta), varargs...) +} + +// GetEvmTransfersByActionHash mocks base method. +func (m *MockAPIServiceClient) GetEvmTransfersByActionHash(arg0 context.Context, arg1 *iotexapi.GetEvmTransfersByActionHashRequest, arg2 ...grpc.CallOption) (*iotexapi.GetEvmTransfersByActionHashResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetEvmTransfersByActionHash", varargs...) + ret0, _ := ret[0].(*iotexapi.GetEvmTransfersByActionHashResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetEvmTransfersByActionHash indicates an expected call of GetEvmTransfersByActionHash. +func (mr *MockAPIServiceClientMockRecorder) GetEvmTransfersByActionHash(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEvmTransfersByActionHash", reflect.TypeOf((*MockAPIServiceClient)(nil).GetEvmTransfersByActionHash), varargs...) +} + +// GetEvmTransfersByBlockHeight mocks base method. +func (m *MockAPIServiceClient) GetEvmTransfersByBlockHeight(arg0 context.Context, arg1 *iotexapi.GetEvmTransfersByBlockHeightRequest, arg2 ...grpc.CallOption) (*iotexapi.GetEvmTransfersByBlockHeightResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetEvmTransfersByBlockHeight", varargs...) + ret0, _ := ret[0].(*iotexapi.GetEvmTransfersByBlockHeightResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetEvmTransfersByBlockHeight indicates an expected call of GetEvmTransfersByBlockHeight. +func (mr *MockAPIServiceClientMockRecorder) GetEvmTransfersByBlockHeight(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEvmTransfersByBlockHeight", reflect.TypeOf((*MockAPIServiceClient)(nil).GetEvmTransfersByBlockHeight), varargs...) +} + +// GetLogs mocks base method. +func (m *MockAPIServiceClient) GetLogs(arg0 context.Context, arg1 *iotexapi.GetLogsRequest, arg2 ...grpc.CallOption) (*iotexapi.GetLogsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetLogs", varargs...) + ret0, _ := ret[0].(*iotexapi.GetLogsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetLogs indicates an expected call of GetLogs. +func (mr *MockAPIServiceClientMockRecorder) GetLogs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogs", reflect.TypeOf((*MockAPIServiceClient)(nil).GetLogs), varargs...) +} + +// GetRawBlocks mocks base method. +func (m *MockAPIServiceClient) GetRawBlocks(arg0 context.Context, arg1 *iotexapi.GetRawBlocksRequest, arg2 ...grpc.CallOption) (*iotexapi.GetRawBlocksResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetRawBlocks", varargs...) + ret0, _ := ret[0].(*iotexapi.GetRawBlocksResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetRawBlocks indicates an expected call of GetRawBlocks. +func (mr *MockAPIServiceClientMockRecorder) GetRawBlocks(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRawBlocks", reflect.TypeOf((*MockAPIServiceClient)(nil).GetRawBlocks), varargs...) +} + +// GetReceiptByAction mocks base method. +func (m *MockAPIServiceClient) GetReceiptByAction(arg0 context.Context, arg1 *iotexapi.GetReceiptByActionRequest, arg2 ...grpc.CallOption) (*iotexapi.GetReceiptByActionResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetReceiptByAction", varargs...) + ret0, _ := ret[0].(*iotexapi.GetReceiptByActionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetReceiptByAction indicates an expected call of GetReceiptByAction. +func (mr *MockAPIServiceClientMockRecorder) GetReceiptByAction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReceiptByAction", reflect.TypeOf((*MockAPIServiceClient)(nil).GetReceiptByAction), varargs...) +} + +// GetServerMeta mocks base method. +func (m *MockAPIServiceClient) GetServerMeta(arg0 context.Context, arg1 *iotexapi.GetServerMetaRequest, arg2 ...grpc.CallOption) (*iotexapi.GetServerMetaResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetServerMeta", varargs...) + ret0, _ := ret[0].(*iotexapi.GetServerMetaResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetServerMeta indicates an expected call of GetServerMeta. +func (mr *MockAPIServiceClientMockRecorder) GetServerMeta(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerMeta", reflect.TypeOf((*MockAPIServiceClient)(nil).GetServerMeta), varargs...) +} + +// GetTransactionLogByActionHash mocks base method. +func (m *MockAPIServiceClient) GetTransactionLogByActionHash(arg0 context.Context, arg1 *iotexapi.GetTransactionLogByActionHashRequest, arg2 ...grpc.CallOption) (*iotexapi.GetTransactionLogByActionHashResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetTransactionLogByActionHash", varargs...) + ret0, _ := ret[0].(*iotexapi.GetTransactionLogByActionHashResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetTransactionLogByActionHash indicates an expected call of GetTransactionLogByActionHash. +func (mr *MockAPIServiceClientMockRecorder) GetTransactionLogByActionHash(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionLogByActionHash", reflect.TypeOf((*MockAPIServiceClient)(nil).GetTransactionLogByActionHash), varargs...) +} + +// GetTransactionLogByBlockHeight mocks base method. +func (m *MockAPIServiceClient) GetTransactionLogByBlockHeight(arg0 context.Context, arg1 *iotexapi.GetTransactionLogByBlockHeightRequest, arg2 ...grpc.CallOption) (*iotexapi.GetTransactionLogByBlockHeightResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetTransactionLogByBlockHeight", varargs...) + ret0, _ := ret[0].(*iotexapi.GetTransactionLogByBlockHeightResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetTransactionLogByBlockHeight indicates an expected call of GetTransactionLogByBlockHeight. +func (mr *MockAPIServiceClientMockRecorder) GetTransactionLogByBlockHeight(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransactionLogByBlockHeight", reflect.TypeOf((*MockAPIServiceClient)(nil).GetTransactionLogByBlockHeight), varargs...) +} + +// ReadContract mocks base method. +func (m *MockAPIServiceClient) ReadContract(arg0 context.Context, arg1 *iotexapi.ReadContractRequest, arg2 ...grpc.CallOption) (*iotexapi.ReadContractResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ReadContract", varargs...) + ret0, _ := ret[0].(*iotexapi.ReadContractResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadContract indicates an expected call of ReadContract. +func (mr *MockAPIServiceClientMockRecorder) ReadContract(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadContract", reflect.TypeOf((*MockAPIServiceClient)(nil).ReadContract), varargs...) +} + +// ReadContractStorage mocks base method. +func (m *MockAPIServiceClient) ReadContractStorage(arg0 context.Context, arg1 *iotexapi.ReadContractStorageRequest, arg2 ...grpc.CallOption) (*iotexapi.ReadContractStorageResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ReadContractStorage", varargs...) + ret0, _ := ret[0].(*iotexapi.ReadContractStorageResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadContractStorage indicates an expected call of ReadContractStorage. +func (mr *MockAPIServiceClientMockRecorder) ReadContractStorage(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadContractStorage", reflect.TypeOf((*MockAPIServiceClient)(nil).ReadContractStorage), varargs...) +} + +// ReadState mocks base method. +func (m *MockAPIServiceClient) ReadState(arg0 context.Context, arg1 *iotexapi.ReadStateRequest, arg2 ...grpc.CallOption) (*iotexapi.ReadStateResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ReadState", varargs...) + ret0, _ := ret[0].(*iotexapi.ReadStateResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadState indicates an expected call of ReadState. +func (mr *MockAPIServiceClientMockRecorder) ReadState(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockAPIServiceClient)(nil).ReadState), varargs...) +} + +// SendAction mocks base method. +func (m *MockAPIServiceClient) SendAction(arg0 context.Context, arg1 *iotexapi.SendActionRequest, arg2 ...grpc.CallOption) (*iotexapi.SendActionResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SendAction", varargs...) + ret0, _ := ret[0].(*iotexapi.SendActionResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SendAction indicates an expected call of SendAction. +func (mr *MockAPIServiceClientMockRecorder) SendAction(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendAction", reflect.TypeOf((*MockAPIServiceClient)(nil).SendAction), varargs...) +} + +// StreamBlocks mocks base method. +func (m *MockAPIServiceClient) StreamBlocks(arg0 context.Context, arg1 *iotexapi.StreamBlocksRequest, arg2 ...grpc.CallOption) (iotexapi.APIService_StreamBlocksClient, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "StreamBlocks", varargs...) + ret0, _ := ret[0].(iotexapi.APIService_StreamBlocksClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StreamBlocks indicates an expected call of StreamBlocks. +func (mr *MockAPIServiceClientMockRecorder) StreamBlocks(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamBlocks", reflect.TypeOf((*MockAPIServiceClient)(nil).StreamBlocks), varargs...) +} + +// StreamLogs mocks base method. +func (m *MockAPIServiceClient) StreamLogs(arg0 context.Context, arg1 *iotexapi.StreamLogsRequest, arg2 ...grpc.CallOption) (iotexapi.APIService_StreamLogsClient, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "StreamLogs", varargs...) + ret0, _ := ret[0].(iotexapi.APIService_StreamLogsClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StreamLogs indicates an expected call of StreamLogs. +func (mr *MockAPIServiceClientMockRecorder) StreamLogs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamLogs", reflect.TypeOf((*MockAPIServiceClient)(nil).StreamLogs), varargs...) +} + +// SuggestGasPrice mocks base method. +func (m *MockAPIServiceClient) SuggestGasPrice(arg0 context.Context, arg1 *iotexapi.SuggestGasPriceRequest, arg2 ...grpc.CallOption) (*iotexapi.SuggestGasPriceResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SuggestGasPrice", varargs...) + ret0, _ := ret[0].(*iotexapi.SuggestGasPriceResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SuggestGasPrice indicates an expected call of SuggestGasPrice. +func (mr *MockAPIServiceClientMockRecorder) SuggestGasPrice(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SuggestGasPrice", reflect.TypeOf((*MockAPIServiceClient)(nil).SuggestGasPrice), varargs...) +} + +// TraceTransactionStructLogs mocks base method. +func (m *MockAPIServiceClient) TraceTransactionStructLogs(arg0 context.Context, arg1 *iotexapi.TraceTransactionStructLogsRequest, arg2 ...grpc.CallOption) (*iotexapi.TraceTransactionStructLogsResponse, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "TraceTransactionStructLogs", varargs...) + ret0, _ := ret[0].(*iotexapi.TraceTransactionStructLogsResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TraceTransactionStructLogs indicates an expected call of TraceTransactionStructLogs. +func (mr *MockAPIServiceClientMockRecorder) TraceTransactionStructLogs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TraceTransactionStructLogs", reflect.TypeOf((*MockAPIServiceClient)(nil).TraceTransactionStructLogs), varargs...) +} diff --git a/misc/scripts/mockgen.sh b/misc/scripts/mockgen.sh index b54b964..dcdcb05 100755 --- a/misc/scripts/mockgen.sh +++ b/misc/scripts/mockgen.sh @@ -3,4 +3,4 @@ mkdir -p ./golang/iotexapi/mock_iotexapi mockgen -destination=./golang/iotexapi/mock_iotexapi/mock_iotexapi.go \ github.com/iotexproject/iotex-proto/golang/iotexapi \ - APIServiceServer + APIServiceServer,APIServiceClient