# 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 query_pb2 as injective_dot_evm_dot_v1_dot_query__pb2
from pyinjective.proto.injective.evm.v1 import tx_pb2 as injective_dot_evm_dot_v1_dot_tx__pb2


class QueryStub(object):
    """Query defines the gRPC querier service.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Account = channel.unary_unary(
                '/injective.evm.v1.Query/Account',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryAccountRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryAccountResponse.FromString,
                _registered_method=True)
        self.CosmosAccount = channel.unary_unary(
                '/injective.evm.v1.Query/CosmosAccount',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCosmosAccountRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCosmosAccountResponse.FromString,
                _registered_method=True)
        self.ValidatorAccount = channel.unary_unary(
                '/injective.evm.v1.Query/ValidatorAccount',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryValidatorAccountRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryValidatorAccountResponse.FromString,
                _registered_method=True)
        self.Balance = channel.unary_unary(
                '/injective.evm.v1.Query/Balance',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBalanceRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBalanceResponse.FromString,
                _registered_method=True)
        self.Storage = channel.unary_unary(
                '/injective.evm.v1.Query/Storage',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryStorageRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryStorageResponse.FromString,
                _registered_method=True)
        self.Code = channel.unary_unary(
                '/injective.evm.v1.Query/Code',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCodeRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCodeResponse.FromString,
                _registered_method=True)
        self.Params = channel.unary_unary(
                '/injective.evm.v1.Query/Params',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryParamsRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryParamsResponse.FromString,
                _registered_method=True)
        self.EthCall = channel.unary_unary(
                '/injective.evm.v1.Query/EthCall',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.EthCallRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTxResponse.FromString,
                _registered_method=True)
        self.EstimateGas = channel.unary_unary(
                '/injective.evm.v1.Query/EstimateGas',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.EthCallRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.EstimateGasResponse.FromString,
                _registered_method=True)
        self.TraceTx = channel.unary_unary(
                '/injective.evm.v1.Query/TraceTx',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceTxRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceTxResponse.FromString,
                _registered_method=True)
        self.TraceBlock = channel.unary_unary(
                '/injective.evm.v1.Query/TraceBlock',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceBlockRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceBlockResponse.FromString,
                _registered_method=True)
        self.TraceCall = channel.unary_unary(
                '/injective.evm.v1.Query/TraceCall',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceCallRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceCallResponse.FromString,
                _registered_method=True)
        self.BaseFee = channel.unary_unary(
                '/injective.evm.v1.Query/BaseFee',
                request_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBaseFeeRequest.SerializeToString,
                response_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBaseFeeResponse.FromString,
                _registered_method=True)


class QueryServicer(object):
    """Query defines the gRPC querier service.
    """

    def Account(self, request, context):
        """Account queries an Ethereum account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CosmosAccount(self, request, context):
        """CosmosAccount queries an Ethereum account's Cosmos Address.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ValidatorAccount(self, request, context):
        """ValidatorAccount queries an Ethereum account's from a validator consensus
        Address.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Balance(self, request, context):
        """Balance queries the balance of a the EVM denomination for a single
        EthAccount.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Storage(self, request, context):
        """Storage queries the balance of all coins for a single account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Code(self, request, context):
        """Code queries the code of a single account.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Params(self, request, context):
        """Params queries the parameters of x/evm module.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EthCall(self, request, context):
        """EthCall implements the `eth_call` rpc api
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def EstimateGas(self, request, context):
        """EstimateGas implements the `eth_estimateGas` rpc api
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TraceTx(self, request, context):
        """TraceTx implements the `debug_traceTransaction` rpc api
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TraceBlock(self, request, context):
        """TraceBlock implements the `debug_traceBlockByNumber` and
        `debug_traceBlockByHash` rpc api
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TraceCall(self, request, context):
        """TraceCall implements the `debug_traceCall` rpc api
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BaseFee(self, request, context):
        """BaseFee queries the base fee of the parent block of the current block,
        it's similar to feemarket module's method, but also checks london hardfork
        status.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_QueryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Account': grpc.unary_unary_rpc_method_handler(
                    servicer.Account,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryAccountRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryAccountResponse.SerializeToString,
            ),
            'CosmosAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.CosmosAccount,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCosmosAccountRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCosmosAccountResponse.SerializeToString,
            ),
            'ValidatorAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.ValidatorAccount,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryValidatorAccountRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryValidatorAccountResponse.SerializeToString,
            ),
            'Balance': grpc.unary_unary_rpc_method_handler(
                    servicer.Balance,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBalanceRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBalanceResponse.SerializeToString,
            ),
            'Storage': grpc.unary_unary_rpc_method_handler(
                    servicer.Storage,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryStorageRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryStorageResponse.SerializeToString,
            ),
            'Code': grpc.unary_unary_rpc_method_handler(
                    servicer.Code,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCodeRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryCodeResponse.SerializeToString,
            ),
            'Params': grpc.unary_unary_rpc_method_handler(
                    servicer.Params,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryParamsRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryParamsResponse.SerializeToString,
            ),
            'EthCall': grpc.unary_unary_rpc_method_handler(
                    servicer.EthCall,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.EthCallRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_tx__pb2.MsgEthereumTxResponse.SerializeToString,
            ),
            'EstimateGas': grpc.unary_unary_rpc_method_handler(
                    servicer.EstimateGas,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.EthCallRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.EstimateGasResponse.SerializeToString,
            ),
            'TraceTx': grpc.unary_unary_rpc_method_handler(
                    servicer.TraceTx,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceTxRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceTxResponse.SerializeToString,
            ),
            'TraceBlock': grpc.unary_unary_rpc_method_handler(
                    servicer.TraceBlock,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceBlockRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceBlockResponse.SerializeToString,
            ),
            'TraceCall': grpc.unary_unary_rpc_method_handler(
                    servicer.TraceCall,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceCallRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceCallResponse.SerializeToString,
            ),
            'BaseFee': grpc.unary_unary_rpc_method_handler(
                    servicer.BaseFee,
                    request_deserializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBaseFeeRequest.FromString,
                    response_serializer=injective_dot_evm_dot_v1_dot_query__pb2.QueryBaseFeeResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'injective.evm.v1.Query', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('injective.evm.v1.Query', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class Query(object):
    """Query defines the gRPC querier service.
    """

    @staticmethod
    def Account(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.Query/Account',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryAccountRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CosmosAccount(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.Query/CosmosAccount',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryCosmosAccountRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryCosmosAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ValidatorAccount(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.Query/ValidatorAccount',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryValidatorAccountRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryValidatorAccountResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Balance(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.Query/Balance',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryBalanceRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryBalanceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Storage(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.Query/Storage',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryStorageRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryStorageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Code(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.Query/Code',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryCodeRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryCodeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Params(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.Query/Params',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryParamsRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryParamsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def EthCall(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.Query/EthCall',
            injective_dot_evm_dot_v1_dot_query__pb2.EthCallRequest.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 EstimateGas(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.Query/EstimateGas',
            injective_dot_evm_dot_v1_dot_query__pb2.EthCallRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.EstimateGasResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TraceTx(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.Query/TraceTx',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceTxRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceTxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TraceBlock(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.Query/TraceBlock',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceBlockRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceBlockResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TraceCall(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.Query/TraceCall',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceCallRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryTraceCallResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BaseFee(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.Query/BaseFee',
            injective_dot_evm_dot_v1_dot_query__pb2.QueryBaseFeeRequest.SerializeToString,
            injective_dot_evm_dot_v1_dot_query__pb2.QueryBaseFeeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
