/// BasicAllowance implements Allowance with a one-time grant of coins /// that optionally expires. The grantee can use up to SpendLimit to cover fees. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BasicAllowance { /// spend_limit specifies the maximum amount of coins that can be spent /// by this allowance and will be updated as coins are spent. If it is /// empty, there is no spend limit and any amount of coins can be spent. #[prost(message, repeated, tag = "1")] pub spend_limit: ::prost::alloc::vec::Vec, /// expiration specifies an optional time when this allowance expires #[prost(message, optional, tag = "2")] pub expiration: ::core::option::Option<::prost_types::Timestamp>, } /// PeriodicAllowance extends Allowance to allow for both a maximum cap, /// as well as a limit per time period. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeriodicAllowance { /// basic specifies a struct of `BasicAllowance` #[prost(message, optional, tag = "1")] pub basic: ::core::option::Option, /// period specifies the time duration in which period_spend_limit coins can /// be spent before that allowance is reset #[prost(message, optional, tag = "2")] pub period: ::core::option::Option<::prost_types::Duration>, /// period_spend_limit specifies the maximum number of coins that can be spent /// in the period #[prost(message, repeated, tag = "3")] pub period_spend_limit: ::prost::alloc::vec::Vec, /// period_can_spend is the number of coins left to be spent before the period_reset time #[prost(message, repeated, tag = "4")] pub period_can_spend: ::prost::alloc::vec::Vec, /// period_reset is the time at which this period resets and a new one begins, /// it is calculated from the start time of the first transaction after the /// last period ended #[prost(message, optional, tag = "5")] pub period_reset: ::core::option::Option<::prost_types::Timestamp>, } /// AllowedMsgAllowance creates allowance only for specified message types. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllowedMsgAllowance { /// allowance can be any of basic and periodic fee allowance. #[prost(message, optional, tag = "1")] pub allowance: ::core::option::Option<::prost_types::Any>, /// allowed_messages are the messages for which the grantee has the access. #[prost(string, repeated, tag = "2")] pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// Grant is stored in the KVStore to record a grant with full context #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Grant { /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// grantee is the address of the user being granted an allowance of another user's funds. #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] pub allowance: ::core::option::Option<::prost_types::Any>, } /// GenesisState contains a set of fee allowances, persisted from the store #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, repeated, tag = "1")] pub allowances: ::prost::alloc::vec::Vec, } /// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowanceRequest { /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// grantee is the address of the user being granted an allowance of another user's funds. #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, } /// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowanceResponse { /// allowance is a allowance granted for grantee by granter. #[prost(message, optional, tag = "1")] pub allowance: ::core::option::Option, } /// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesRequest { #[prost(string, tag = "1")] pub grantee: ::prost::alloc::string::String, /// pagination defines an pagination for the request. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesResponse { /// allowances are allowance's granted for grantee by granter. #[prost(message, repeated, tag = "1")] pub allowances: ::prost::alloc::vec::Vec, /// pagination defines an pagination for the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesByGranterRequest { #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// pagination defines an pagination for the request. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllowancesByGranterResponse { /// allowances that have been issued by the granter. #[prost(message, repeated, tag = "1")] pub allowances: ::prost::alloc::vec::Vec, /// pagination defines an pagination for the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// Generated client implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; /// Query defines the gRPC querier service. #[derive(Debug, Clone)] pub struct QueryClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: std::convert::TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_origin(inner: T, origin: Uri) -> Self { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } pub fn with_interceptor( inner: T, interceptor: F, ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Allowance returns fee granted to the grantee by the granter. pub async fn allowance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowance"); self.inner.unary(request.into_request(), path, codec).await } /// Allowances returns all the grants for address. pub async fn allowances( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Query/Allowances"); self.inner.unary(request.into_request(), path, codec).await } /// AllowancesByGranter returns all the grants given by an address /// /// Since: cosmos-sdk 0.46 pub async fn allowances_by_granter( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", ); self.inner.unary(request.into_request(), path, codec).await } } } /// Generated server implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] pub trait Query: Send + Sync + 'static { /// Allowance returns fee granted to the grantee by the granter. async fn allowance( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Allowances returns all the grants for address. async fn allowances( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// AllowancesByGranter returns all the grants given by an address /// /// Since: cosmos-sdk 0.46 async fn allowances_by_granter( &self, request: tonic::Request, ) -> Result, tonic::Status>; } /// Query defines the gRPC querier service. #[derive(Debug)] pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, } struct _Inner(Arc); impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } } impl tonic::codegen::Service> for QueryServer where T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/cosmos.feegrant.v1beta1.Query/Allowance" => { #[allow(non_camel_case_types)] struct AllowanceSvc(pub Arc); impl tonic::server::UnaryService for AllowanceSvc { type Response = super::QueryAllowanceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).allowance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllowanceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/cosmos.feegrant.v1beta1.Query/Allowances" => { #[allow(non_camel_case_types)] struct AllowancesSvc(pub Arc); impl tonic::server::UnaryService for AllowancesSvc { type Response = super::QueryAllowancesResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).allowances(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllowancesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter" => { #[allow(non_camel_case_types)] struct AllowancesByGranterSvc(pub Arc); impl tonic::server::UnaryService for AllowancesByGranterSvc { type Response = super::QueryAllowancesByGranterResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).allowances_by_granter(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllowancesByGranterSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => Box::pin(async move { Ok(http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap()) }), } } } impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(self.0.clone()) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for QueryServer { const NAME: &'static str = "cosmos.feegrant.v1beta1.Query"; } } /// MsgGrantAllowance adds permission for Grantee to spend up to Allowance /// of fees from the account of Granter. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantAllowance { /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// grantee is the address of the user being granted an allowance of another user's funds. #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, /// allowance can be any of basic, periodic, allowed fee allowance. #[prost(message, optional, tag = "3")] pub allowance: ::core::option::Option<::prost_types::Any>, } /// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgGrantAllowanceResponse {} /// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowance { /// granter is the address of the user granting an allowance of their funds. #[prost(string, tag = "1")] pub granter: ::prost::alloc::string::String, /// grantee is the address of the user being granted an allowance of another user's funds. #[prost(string, tag = "2")] pub grantee: ::prost::alloc::string::String, } /// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRevokeAllowanceResponse {} /// Generated client implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; /// Msg defines the feegrant msg service. #[derive(Debug, Clone)] pub struct MsgClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: std::convert::TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_origin(inner: T, origin: Uri) -> Self { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// GrantAllowance grants fee allowance to the grantee on the granter's /// account with the provided expiration time. pub async fn grant_allowance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/cosmos.feegrant.v1beta1.Msg/GrantAllowance"); self.inner.unary(request.into_request(), path, codec).await } /// RevokeAllowance revokes any fee allowance of granter's account that /// has been granted to the grantee. pub async fn revoke_allowance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance", ); self.inner.unary(request.into_request(), path, codec).await } } } /// Generated server implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] pub trait Msg: Send + Sync + 'static { /// GrantAllowance grants fee allowance to the grantee on the granter's /// account with the provided expiration time. async fn grant_allowance( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// RevokeAllowance revokes any fee allowance of granter's account that /// has been granted to the grantee. async fn revoke_allowance( &self, request: tonic::Request, ) -> Result, tonic::Status>; } /// Msg defines the feegrant msg service. #[derive(Debug)] pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, } struct _Inner(Arc); impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } } impl tonic::codegen::Service> for MsgServer where T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/cosmos.feegrant.v1beta1.Msg/GrantAllowance" => { #[allow(non_camel_case_types)] struct GrantAllowanceSvc(pub Arc); impl tonic::server::UnaryService for GrantAllowanceSvc { type Response = super::MsgGrantAllowanceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).grant_allowance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = GrantAllowanceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/cosmos.feegrant.v1beta1.Msg/RevokeAllowance" => { #[allow(non_camel_case_types)] struct RevokeAllowanceSvc(pub Arc); impl tonic::server::UnaryService for RevokeAllowanceSvc { type Response = super::MsgRevokeAllowanceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).revoke_allowance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = RevokeAllowanceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => Box::pin(async move { Ok(http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap()) }), } } } impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(self.0.clone()) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for MsgServer { const NAME: &'static str = "cosmos.feegrant.v1beta1.Msg"; } }