# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from pyinjective.proto.injective.evm.v1 import tx_pb2 as injective_dot_evm_dot_v1_dot_tx__pb2


class MsgStub(object):
    """Msg defines the evm Msg service.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.EthereumTx = channel.unary_unary(
                '/injective.evm.v1.Msg/EthereumTx',
                request_serializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTx.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTxResponse.FromString,
                _registered_method=True)
        self.UpdateParams = channel.unary_unary(
                '/injective.evm.v1.Msg/UpdateParams',
                request_serializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgUpdateParams.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgUpdateParamsResponse.FromString,
                _registered_method=True)


class MsgServicer(object):
    """Msg defines the evm Msg service.
    """

    def EthereumTx(self, request, context):
        """EthereumTx defines a method submitting Ethereum transactions.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateParams(self, request, context):
        """UpdateParams defined a governance operation for updating the x/evm module
        parameters. The authority is hard-coded to the Cosmos SDK x/gov module
        account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MsgServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'EthereumTx': grpc.unary_unary_rpc_method_handler(
                    servicer.EthereumTx,
                    request_deserializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTx.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTxResponse.SerializeToString,
            ),
            'UpdateParams': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateParams,
                    request_deserializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgUpdateParams.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgUpdateParamsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective.evm.v1.Msg', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('injective.evm.v1.Msg', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Msg(object):
    """Msg defines the evm Msg service.
    """

    @staticmethod
    def EthereumTx(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/injective.evm.v1.Msg/EthereumTx',
            injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTx.SerializeToString,
            injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateParams(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/injective.evm.v1.Msg/UpdateParams',
            injective_dot_evm_dot_v1_dot_tx__pb2.MsgUpdateParams.SerializeToString,
            injective_dot_evm_dot_v1_dot_tx__pb2.MsgUpdateParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
