/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring /// See ICS004: #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Metadata { /// fee_version defines the ICS29 fee version #[prost(string, tag = "1")] pub fee_version: ::prost::alloc::string::String, /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring #[prost(string, tag = "2")] pub app_version: ::prost::alloc::string::String, } /// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IncentivizedAcknowledgement { /// the underlying app acknowledgement bytes #[prost(bytes = "vec", tag = "1")] pub app_acknowledgement: ::prost::alloc::vec::Vec, /// the relayer address which submits the recv packet message #[prost(string, tag = "2")] pub forward_relayer_address: ::prost::alloc::string::String, /// success flag of the base application callback #[prost(bool, tag = "3")] pub underlying_app_success: bool, } /// Fee defines the ICS29 receive, acknowledgement and timeout fees #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Fee { /// the packet receive fee #[prost(message, repeated, tag = "1")] pub recv_fee: ::prost::alloc::vec::Vec, /// the packet acknowledgement fee #[prost(message, repeated, tag = "2")] pub ack_fee: ::prost::alloc::vec::Vec, /// the packet timeout fee #[prost(message, repeated, tag = "3")] pub timeout_fee: ::prost::alloc::vec::Vec, } /// PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketFee { /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet #[prost(message, optional, tag = "1")] pub fee: ::core::option::Option, /// the refund address for unspent fees #[prost(string, tag = "2")] pub refund_address: ::prost::alloc::string::String, /// optional list of relayers permitted to receive fees #[prost(string, repeated, tag = "3")] pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// PacketFees contains a list of type PacketFee #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PacketFees { /// list of packet fees #[prost(message, repeated, tag = "1")] pub packet_fees: ::prost::alloc::vec::Vec, } /// IdentifiedPacketFees contains a list of type PacketFee and associated PacketId #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IdentifiedPacketFees { /// unique packet identifier comprised of the channel ID, port ID and sequence #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option, /// list of packet fees #[prost(message, repeated, tag = "2")] pub packet_fees: ::prost::alloc::vec::Vec, } /// GenesisState defines the ICS29 fee middleware genesis state #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { /// list of identified packet fees #[prost(message, repeated, tag = "1")] pub identified_fees: ::prost::alloc::vec::Vec, /// list of fee enabled channels #[prost(message, repeated, tag = "2")] pub fee_enabled_channels: ::prost::alloc::vec::Vec, /// list of registered payees #[prost(message, repeated, tag = "3")] pub registered_payees: ::prost::alloc::vec::Vec, /// list of registered counterparty payees #[prost(message, repeated, tag = "4")] pub registered_counterparty_payees: ::prost::alloc::vec::Vec, /// list of forward relayer addresses #[prost(message, repeated, tag = "5")] pub forward_relayers: ::prost::alloc::vec::Vec, } /// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct FeeEnabledChannel { /// unique port identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, /// unique channel identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, } /// RegisteredPayee contains the relayer address and payee address for a specific channel #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisteredPayee { /// unique channel identifier #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, /// the relayer address #[prost(string, tag = "2")] pub relayer: ::prost::alloc::string::String, /// the payee address #[prost(string, tag = "3")] pub payee: ::prost::alloc::string::String, } /// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used /// for recv fee distribution) #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisteredCounterpartyPayee { /// unique channel identifier #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, /// the relayer address #[prost(string, tag = "2")] pub relayer: ::prost::alloc::string::String, /// the counterparty payee address #[prost(string, tag = "3")] pub counterparty_payee: ::prost::alloc::string::String, } /// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ForwardRelayerAddress { /// the forward relayer address #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, /// unique packet identifer comprised of the channel ID, port ID and sequence #[prost(message, optional, tag = "2")] pub packet_id: ::core::option::Option, } /// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIncentivizedPacketsRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, /// block height at which to query #[prost(uint64, tag = "2")] pub query_height: u64, } /// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIncentivizedPacketsResponse { /// list of identified fees for incentivized packets #[prost(message, repeated, tag = "1")] pub incentivized_packets: ::prost::alloc::vec::Vec, } /// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIncentivizedPacketRequest { /// unique packet identifier comprised of channel ID, port ID and sequence #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option, /// block height at which to query #[prost(uint64, tag = "2")] pub query_height: u64, } /// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIncentivizedPacketResponse { /// the identified fees for the incentivized packet #[prost(message, optional, tag = "1")] pub incentivized_packet: ::core::option::Option, } /// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets /// for a specific channel #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIncentivizedPacketsForChannelRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, #[prost(string, tag = "2")] pub port_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub channel_id: ::prost::alloc::string::String, /// Height to query at #[prost(uint64, tag = "4")] pub query_height: u64, } /// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIncentivizedPacketsForChannelResponse { /// Map of all incentivized_packets #[prost(message, repeated, tag = "1")] pub incentivized_packets: ::prost::alloc::vec::Vec, } /// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalRecvFeesRequest { /// the packet identifier for the associated fees #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option, } /// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalRecvFeesResponse { /// the total packet receive fees #[prost(message, repeated, tag = "1")] pub recv_fees: ::prost::alloc::vec::Vec, } /// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalAckFeesRequest { /// the packet identifier for the associated fees #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option, } /// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalAckFeesResponse { /// the total packet acknowledgement fees #[prost(message, repeated, tag = "1")] pub ack_fees: ::prost::alloc::vec::Vec, } /// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalTimeoutFeesRequest { /// the packet identifier for the associated fees #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option, } /// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryTotalTimeoutFeesResponse { /// the total packet timeout fees #[prost(message, repeated, tag = "1")] pub timeout_fees: ::prost::alloc::vec::Vec, } /// QueryPayeeRequest defines the request type for the Payee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPayeeRequest { /// unique channel identifier #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, /// the relayer address to which the distribution address is registered #[prost(string, tag = "2")] pub relayer: ::prost::alloc::string::String, } /// QueryPayeeResponse defines the response type for the Payee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPayeeResponse { /// the payee address to which packet fees are paid out #[prost(string, tag = "1")] pub payee_address: ::prost::alloc::string::String, } /// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCounterpartyPayeeRequest { /// unique channel identifier #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, /// the relayer address to which the counterparty is registered #[prost(string, tag = "2")] pub relayer: ::prost::alloc::string::String, } /// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryCounterpartyPayeeResponse { /// the counterparty payee address used to compensate forward relaying #[prost(string, tag = "1")] pub counterparty_payee: ::prost::alloc::string::String, } /// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryFeeEnabledChannelsRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, /// block height at which to query #[prost(uint64, tag = "2")] pub query_height: u64, } /// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryFeeEnabledChannelsResponse { /// list of fee enabled channels #[prost(message, repeated, tag = "1")] pub fee_enabled_channels: ::prost::alloc::vec::Vec, } /// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryFeeEnabledChannelRequest { /// unique port identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, /// unique channel identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, } /// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryFeeEnabledChannelResponse { /// boolean flag representing the fee enabled channel status #[prost(bool, tag = "1")] pub fee_enabled: bool, } /// 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 ICS29 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 } /// IncentivizedPackets returns all incentivized packets and their associated fees pub async fn incentivized_packets( &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( "/ibc.applications.fee.v1.Query/IncentivizedPackets", ); self.inner.unary(request.into_request(), path, codec).await } /// IncentivizedPacket returns all packet fees for a packet given its identifier pub async fn incentivized_packet( &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( "/ibc.applications.fee.v1.Query/IncentivizedPacket", ); self.inner.unary(request.into_request(), path, codec).await } /// Gets all incentivized packets for a specific channel pub async fn incentivized_packets_for_channel( &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( "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel", ); self.inner.unary(request.into_request(), path, codec).await } /// TotalRecvFees returns the total receive fees for a packet given its identifier pub async fn total_recv_fees( &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( "/ibc.applications.fee.v1.Query/TotalRecvFees", ); self.inner.unary(request.into_request(), path, codec).await } /// TotalAckFees returns the total acknowledgement fees for a packet given its identifier pub async fn total_ack_fees( &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("/ibc.applications.fee.v1.Query/TotalAckFees"); self.inner.unary(request.into_request(), path, codec).await } /// TotalTimeoutFees returns the total timeout fees for a packet given its identifier pub async fn total_timeout_fees( &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( "/ibc.applications.fee.v1.Query/TotalTimeoutFees", ); self.inner.unary(request.into_request(), path, codec).await } /// Payee returns the registered payee address for a specific channel given the relayer address pub async fn payee( &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("/ibc.applications.fee.v1.Query/Payee"); self.inner.unary(request.into_request(), path, codec).await } /// CounterpartyPayee returns the registered counterparty payee for forward relaying pub async fn counterparty_payee( &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( "/ibc.applications.fee.v1.Query/CounterpartyPayee", ); self.inner.unary(request.into_request(), path, codec).await } /// FeeEnabledChannels returns a list of all fee enabled channels pub async fn fee_enabled_channels( &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( "/ibc.applications.fee.v1.Query/FeeEnabledChannels", ); self.inner.unary(request.into_request(), path, codec).await } /// FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel pub async fn fee_enabled_channel( &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( "/ibc.applications.fee.v1.Query/FeeEnabledChannel", ); 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 { /// IncentivizedPackets returns all incentivized packets and their associated fees async fn incentivized_packets( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// IncentivizedPacket returns all packet fees for a packet given its identifier async fn incentivized_packet( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Gets all incentivized packets for a specific channel async fn incentivized_packets_for_channel( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// TotalRecvFees returns the total receive fees for a packet given its identifier async fn total_recv_fees( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// TotalAckFees returns the total acknowledgement fees for a packet given its identifier async fn total_ack_fees( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// TotalTimeoutFees returns the total timeout fees for a packet given its identifier async fn total_timeout_fees( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Payee returns the registered payee address for a specific channel given the relayer address async fn payee( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// CounterpartyPayee returns the registered counterparty payee for forward relaying async fn counterparty_payee( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// FeeEnabledChannels returns a list of all fee enabled channels async fn fee_enabled_channels( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel async fn fee_enabled_channel( &self, request: tonic::Request, ) -> Result, tonic::Status>; } /// Query defines the ICS29 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() { "/ibc.applications.fee.v1.Query/IncentivizedPackets" => { #[allow(non_camel_case_types)] struct IncentivizedPacketsSvc(pub Arc); impl tonic::server::UnaryService for IncentivizedPacketsSvc { type Response = super::QueryIncentivizedPacketsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).incentivized_packets(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 = IncentivizedPacketsSvc(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) } "/ibc.applications.fee.v1.Query/IncentivizedPacket" => { #[allow(non_camel_case_types)] struct IncentivizedPacketSvc(pub Arc); impl tonic::server::UnaryService for IncentivizedPacketSvc { type Response = super::QueryIncentivizedPacketResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).incentivized_packet(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 = IncentivizedPacketSvc(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) } "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel" => { #[allow(non_camel_case_types)] struct IncentivizedPacketsForChannelSvc(pub Arc); impl tonic::server::UnaryService< super::QueryIncentivizedPacketsForChannelRequest, > for IncentivizedPacketsForChannelSvc { type Response = super::QueryIncentivizedPacketsForChannelResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< super::QueryIncentivizedPacketsForChannelRequest, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).incentivized_packets_for_channel(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 = IncentivizedPacketsForChannelSvc(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) } "/ibc.applications.fee.v1.Query/TotalRecvFees" => { #[allow(non_camel_case_types)] struct TotalRecvFeesSvc(pub Arc); impl tonic::server::UnaryService for TotalRecvFeesSvc { type Response = super::QueryTotalRecvFeesResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).total_recv_fees(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 = TotalRecvFeesSvc(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) } "/ibc.applications.fee.v1.Query/TotalAckFees" => { #[allow(non_camel_case_types)] struct TotalAckFeesSvc(pub Arc); impl tonic::server::UnaryService for TotalAckFeesSvc { type Response = super::QueryTotalAckFeesResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).total_ack_fees(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 = TotalAckFeesSvc(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) } "/ibc.applications.fee.v1.Query/TotalTimeoutFees" => { #[allow(non_camel_case_types)] struct TotalTimeoutFeesSvc(pub Arc); impl tonic::server::UnaryService for TotalTimeoutFeesSvc { type Response = super::QueryTotalTimeoutFeesResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).total_timeout_fees(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 = TotalTimeoutFeesSvc(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) } "/ibc.applications.fee.v1.Query/Payee" => { #[allow(non_camel_case_types)] struct PayeeSvc(pub Arc); impl tonic::server::UnaryService for PayeeSvc { type Response = super::QueryPayeeResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).payee(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 = PayeeSvc(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) } "/ibc.applications.fee.v1.Query/CounterpartyPayee" => { #[allow(non_camel_case_types)] struct CounterpartyPayeeSvc(pub Arc); impl tonic::server::UnaryService for CounterpartyPayeeSvc { type Response = super::QueryCounterpartyPayeeResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).counterparty_payee(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 = CounterpartyPayeeSvc(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) } "/ibc.applications.fee.v1.Query/FeeEnabledChannels" => { #[allow(non_camel_case_types)] struct FeeEnabledChannelsSvc(pub Arc); impl tonic::server::UnaryService for FeeEnabledChannelsSvc { type Response = super::QueryFeeEnabledChannelsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).fee_enabled_channels(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 = FeeEnabledChannelsSvc(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) } "/ibc.applications.fee.v1.Query/FeeEnabledChannel" => { #[allow(non_camel_case_types)] struct FeeEnabledChannelSvc(pub Arc); impl tonic::server::UnaryService for FeeEnabledChannelSvc { type Response = super::QueryFeeEnabledChannelResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).fee_enabled_channel(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 = FeeEnabledChannelSvc(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 = "ibc.applications.fee.v1.Query"; } } /// MsgRegisterPayee defines the request type for the RegisterPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRegisterPayee { /// unique port identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, /// unique channel identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, /// the relayer address #[prost(string, tag = "3")] pub relayer: ::prost::alloc::string::String, /// the payee address #[prost(string, tag = "4")] pub payee: ::prost::alloc::string::String, } /// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRegisterPayeeResponse {} /// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRegisterCounterpartyPayee { /// unique port identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, /// unique channel identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, /// the relayer address #[prost(string, tag = "3")] pub relayer: ::prost::alloc::string::String, /// the counterparty payee address #[prost(string, tag = "4")] pub counterparty_payee: ::prost::alloc::string::String, } /// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRegisterCounterpartyPayeeResponse {} /// MsgPayPacketFee defines the request type for the PayPacketFee rpc /// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be /// paid for #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgPayPacketFee { /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet #[prost(message, optional, tag = "1")] pub fee: ::core::option::Option, /// the source port unique identifier #[prost(string, tag = "2")] pub source_port_id: ::prost::alloc::string::String, /// the source channel unique identifer #[prost(string, tag = "3")] pub source_channel_id: ::prost::alloc::string::String, /// account address to refund fee if necessary #[prost(string, tag = "4")] pub signer: ::prost::alloc::string::String, /// optional list of relayers permitted to the receive packet fees #[prost(string, repeated, tag = "5")] pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } /// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgPayPacketFeeResponse {} /// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc /// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgPayPacketFeeAsync { /// unique packet identifier comprised of the channel ID, port ID and sequence #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option, /// the packet fee associated with a particular IBC packet #[prost(message, optional, tag = "2")] pub packet_fee: ::core::option::Option, } /// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgPayPacketFeeAsyncResponse {} /// 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 ICS29 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 } /// RegisterPayee defines a rpc handler method for MsgRegisterPayee /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on /// the source chain from which packets originate as this is where fee distribution takes place. This function may be /// called more than once by a relayer, in which case, the latest payee is always used. pub async fn register_payee( &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("/ibc.applications.fee.v1.Msg/RegisterPayee"); self.inner.unary(request.into_request(), path, codec).await } /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty /// payee address before relaying. This ensures they will be properly compensated for forward relaying since /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. pub async fn register_counterparty_payee( &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( "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", ); self.inner.unary(request.into_request(), path, codec).await } /// PayPacketFee defines a rpc handler method for MsgPayPacketFee /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to /// incentivize the relaying of the packet at the next sequence /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows /// initiates the lifecycle of the incentivized packet pub async fn pay_packet_fee( &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("/ibc.applications.fee.v1.Msg/PayPacketFee"); self.inner.unary(request.into_request(), path, codec).await } /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to /// incentivize the relaying of a known packet (i.e. at a particular sequence) pub async fn pay_packet_fee_async( &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( "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", ); 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 { /// RegisterPayee defines a rpc handler method for MsgRegisterPayee /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on /// the source chain from which packets originate as this is where fee distribution takes place. This function may be /// called more than once by a relayer, in which case, the latest payee is always used. async fn register_payee( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty /// payee address before relaying. This ensures they will be properly compensated for forward relaying since /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. async fn register_counterparty_payee( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// PayPacketFee defines a rpc handler method for MsgPayPacketFee /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to /// incentivize the relaying of the packet at the next sequence /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows /// initiates the lifecycle of the incentivized packet async fn pay_packet_fee( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to /// incentivize the relaying of a known packet (i.e. at a particular sequence) async fn pay_packet_fee_async( &self, request: tonic::Request, ) -> Result, tonic::Status>; } /// Msg defines the ICS29 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() { "/ibc.applications.fee.v1.Msg/RegisterPayee" => { #[allow(non_camel_case_types)] struct RegisterPayeeSvc(pub Arc); impl tonic::server::UnaryService for RegisterPayeeSvc { type Response = super::MsgRegisterPayeeResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).register_payee(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 = RegisterPayeeSvc(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) } "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee" => { #[allow(non_camel_case_types)] struct RegisterCounterpartyPayeeSvc(pub Arc); impl tonic::server::UnaryService for RegisterCounterpartyPayeeSvc { type Response = super::MsgRegisterCounterpartyPayeeResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).register_counterparty_payee(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 = RegisterCounterpartyPayeeSvc(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) } "/ibc.applications.fee.v1.Msg/PayPacketFee" => { #[allow(non_camel_case_types)] struct PayPacketFeeSvc(pub Arc); impl tonic::server::UnaryService for PayPacketFeeSvc { type Response = super::MsgPayPacketFeeResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).pay_packet_fee(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 = PayPacketFeeSvc(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) } "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync" => { #[allow(non_camel_case_types)] struct PayPacketFeeAsyncSvc(pub Arc); impl tonic::server::UnaryService for PayPacketFeeAsyncSvc { type Response = super::MsgPayPacketFeeAsyncResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).pay_packet_fee_async(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 = PayPacketFeeAsyncSvc(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 = "ibc.applications.fee.v1.Msg"; } }