ibc_proto/prost/
ibc.applications.fee.v1.rs

1// This file is @generated by prost-build.
2/// Fee defines the ICS29 receive, acknowledgement and timeout fees
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Fee {
5    /// the packet receive fee
6    #[prost(message, repeated, tag = "1")]
7    pub recv_fee: ::prost::alloc::vec::Vec<
8        super::super::super::super::cosmos::base::v1beta1::Coin,
9    >,
10    /// the packet acknowledgement fee
11    #[prost(message, repeated, tag = "2")]
12    pub ack_fee: ::prost::alloc::vec::Vec<
13        super::super::super::super::cosmos::base::v1beta1::Coin,
14    >,
15    /// the packet timeout fee
16    #[prost(message, repeated, tag = "3")]
17    pub timeout_fee: ::prost::alloc::vec::Vec<
18        super::super::super::super::cosmos::base::v1beta1::Coin,
19    >,
20}
21impl ::prost::Name for Fee {
22    const NAME: &'static str = "Fee";
23    const PACKAGE: &'static str = "ibc.applications.fee.v1";
24    fn full_name() -> ::prost::alloc::string::String {
25        "ibc.applications.fee.v1.Fee".into()
26    }
27    fn type_url() -> ::prost::alloc::string::String {
28        "/ibc.applications.fee.v1.Fee".into()
29    }
30}
31/// PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct PacketFee {
34    /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet
35    #[prost(message, optional, tag = "1")]
36    pub fee: ::core::option::Option<Fee>,
37    /// the refund address for unspent fees
38    #[prost(string, tag = "2")]
39    pub refund_address: ::prost::alloc::string::String,
40    /// optional list of relayers permitted to receive fees
41    #[prost(string, repeated, tag = "3")]
42    pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
43}
44impl ::prost::Name for PacketFee {
45    const NAME: &'static str = "PacketFee";
46    const PACKAGE: &'static str = "ibc.applications.fee.v1";
47    fn full_name() -> ::prost::alloc::string::String {
48        "ibc.applications.fee.v1.PacketFee".into()
49    }
50    fn type_url() -> ::prost::alloc::string::String {
51        "/ibc.applications.fee.v1.PacketFee".into()
52    }
53}
54/// PacketFees contains a list of type PacketFee
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct PacketFees {
57    /// list of packet fees
58    #[prost(message, repeated, tag = "1")]
59    pub packet_fees: ::prost::alloc::vec::Vec<PacketFee>,
60}
61impl ::prost::Name for PacketFees {
62    const NAME: &'static str = "PacketFees";
63    const PACKAGE: &'static str = "ibc.applications.fee.v1";
64    fn full_name() -> ::prost::alloc::string::String {
65        "ibc.applications.fee.v1.PacketFees".into()
66    }
67    fn type_url() -> ::prost::alloc::string::String {
68        "/ibc.applications.fee.v1.PacketFees".into()
69    }
70}
71/// IdentifiedPacketFees contains a list of type PacketFee and associated PacketId
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct IdentifiedPacketFees {
74    /// unique packet identifier comprised of the channel ID, port ID and sequence
75    #[prost(message, optional, tag = "1")]
76    pub packet_id: ::core::option::Option<
77        super::super::super::core::channel::v1::PacketId,
78    >,
79    /// list of packet fees
80    #[prost(message, repeated, tag = "2")]
81    pub packet_fees: ::prost::alloc::vec::Vec<PacketFee>,
82}
83impl ::prost::Name for IdentifiedPacketFees {
84    const NAME: &'static str = "IdentifiedPacketFees";
85    const PACKAGE: &'static str = "ibc.applications.fee.v1";
86    fn full_name() -> ::prost::alloc::string::String {
87        "ibc.applications.fee.v1.IdentifiedPacketFees".into()
88    }
89    fn type_url() -> ::prost::alloc::string::String {
90        "/ibc.applications.fee.v1.IdentifiedPacketFees".into()
91    }
92}
93/// MsgRegisterPayee defines the request type for the RegisterPayee rpc
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct MsgRegisterPayee {
96    /// unique port identifier
97    #[prost(string, tag = "1")]
98    pub port_id: ::prost::alloc::string::String,
99    /// unique channel identifier
100    #[prost(string, tag = "2")]
101    pub channel_id: ::prost::alloc::string::String,
102    /// the relayer address
103    #[prost(string, tag = "3")]
104    pub relayer: ::prost::alloc::string::String,
105    /// the payee address
106    #[prost(string, tag = "4")]
107    pub payee: ::prost::alloc::string::String,
108}
109impl ::prost::Name for MsgRegisterPayee {
110    const NAME: &'static str = "MsgRegisterPayee";
111    const PACKAGE: &'static str = "ibc.applications.fee.v1";
112    fn full_name() -> ::prost::alloc::string::String {
113        "ibc.applications.fee.v1.MsgRegisterPayee".into()
114    }
115    fn type_url() -> ::prost::alloc::string::String {
116        "/ibc.applications.fee.v1.MsgRegisterPayee".into()
117    }
118}
119/// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc
120#[derive(Clone, Copy, PartialEq, ::prost::Message)]
121pub struct MsgRegisterPayeeResponse {}
122impl ::prost::Name for MsgRegisterPayeeResponse {
123    const NAME: &'static str = "MsgRegisterPayeeResponse";
124    const PACKAGE: &'static str = "ibc.applications.fee.v1";
125    fn full_name() -> ::prost::alloc::string::String {
126        "ibc.applications.fee.v1.MsgRegisterPayeeResponse".into()
127    }
128    fn type_url() -> ::prost::alloc::string::String {
129        "/ibc.applications.fee.v1.MsgRegisterPayeeResponse".into()
130    }
131}
132/// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct MsgRegisterCounterpartyPayee {
135    /// unique port identifier
136    #[prost(string, tag = "1")]
137    pub port_id: ::prost::alloc::string::String,
138    /// unique channel identifier
139    #[prost(string, tag = "2")]
140    pub channel_id: ::prost::alloc::string::String,
141    /// the relayer address
142    #[prost(string, tag = "3")]
143    pub relayer: ::prost::alloc::string::String,
144    /// the counterparty payee address
145    #[prost(string, tag = "4")]
146    pub counterparty_payee: ::prost::alloc::string::String,
147}
148impl ::prost::Name for MsgRegisterCounterpartyPayee {
149    const NAME: &'static str = "MsgRegisterCounterpartyPayee";
150    const PACKAGE: &'static str = "ibc.applications.fee.v1";
151    fn full_name() -> ::prost::alloc::string::String {
152        "ibc.applications.fee.v1.MsgRegisterCounterpartyPayee".into()
153    }
154    fn type_url() -> ::prost::alloc::string::String {
155        "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee".into()
156    }
157}
158/// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc
159#[derive(Clone, Copy, PartialEq, ::prost::Message)]
160pub struct MsgRegisterCounterpartyPayeeResponse {}
161impl ::prost::Name for MsgRegisterCounterpartyPayeeResponse {
162    const NAME: &'static str = "MsgRegisterCounterpartyPayeeResponse";
163    const PACKAGE: &'static str = "ibc.applications.fee.v1";
164    fn full_name() -> ::prost::alloc::string::String {
165        "ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse".into()
166    }
167    fn type_url() -> ::prost::alloc::string::String {
168        "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse".into()
169    }
170}
171/// MsgPayPacketFee defines the request type for the PayPacketFee rpc
172/// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be
173/// paid for
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct MsgPayPacketFee {
176    /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet
177    #[prost(message, optional, tag = "1")]
178    pub fee: ::core::option::Option<Fee>,
179    /// the source port unique identifier
180    #[prost(string, tag = "2")]
181    pub source_port_id: ::prost::alloc::string::String,
182    /// the source channel unique identifer
183    #[prost(string, tag = "3")]
184    pub source_channel_id: ::prost::alloc::string::String,
185    /// account address to refund fee if necessary
186    #[prost(string, tag = "4")]
187    pub signer: ::prost::alloc::string::String,
188    /// optional list of relayers permitted to the receive packet fees
189    #[prost(string, repeated, tag = "5")]
190    pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
191}
192impl ::prost::Name for MsgPayPacketFee {
193    const NAME: &'static str = "MsgPayPacketFee";
194    const PACKAGE: &'static str = "ibc.applications.fee.v1";
195    fn full_name() -> ::prost::alloc::string::String {
196        "ibc.applications.fee.v1.MsgPayPacketFee".into()
197    }
198    fn type_url() -> ::prost::alloc::string::String {
199        "/ibc.applications.fee.v1.MsgPayPacketFee".into()
200    }
201}
202/// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc
203#[derive(Clone, Copy, PartialEq, ::prost::Message)]
204pub struct MsgPayPacketFeeResponse {}
205impl ::prost::Name for MsgPayPacketFeeResponse {
206    const NAME: &'static str = "MsgPayPacketFeeResponse";
207    const PACKAGE: &'static str = "ibc.applications.fee.v1";
208    fn full_name() -> ::prost::alloc::string::String {
209        "ibc.applications.fee.v1.MsgPayPacketFeeResponse".into()
210    }
211    fn type_url() -> ::prost::alloc::string::String {
212        "/ibc.applications.fee.v1.MsgPayPacketFeeResponse".into()
213    }
214}
215/// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc
216/// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send)
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct MsgPayPacketFeeAsync {
219    /// unique packet identifier comprised of the channel ID, port ID and sequence
220    #[prost(message, optional, tag = "1")]
221    pub packet_id: ::core::option::Option<
222        super::super::super::core::channel::v1::PacketId,
223    >,
224    /// the packet fee associated with a particular IBC packet
225    #[prost(message, optional, tag = "2")]
226    pub packet_fee: ::core::option::Option<PacketFee>,
227}
228impl ::prost::Name for MsgPayPacketFeeAsync {
229    const NAME: &'static str = "MsgPayPacketFeeAsync";
230    const PACKAGE: &'static str = "ibc.applications.fee.v1";
231    fn full_name() -> ::prost::alloc::string::String {
232        "ibc.applications.fee.v1.MsgPayPacketFeeAsync".into()
233    }
234    fn type_url() -> ::prost::alloc::string::String {
235        "/ibc.applications.fee.v1.MsgPayPacketFeeAsync".into()
236    }
237}
238/// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc
239#[derive(Clone, Copy, PartialEq, ::prost::Message)]
240pub struct MsgPayPacketFeeAsyncResponse {}
241impl ::prost::Name for MsgPayPacketFeeAsyncResponse {
242    const NAME: &'static str = "MsgPayPacketFeeAsyncResponse";
243    const PACKAGE: &'static str = "ibc.applications.fee.v1";
244    fn full_name() -> ::prost::alloc::string::String {
245        "ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse".into()
246    }
247    fn type_url() -> ::prost::alloc::string::String {
248        "/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse".into()
249    }
250}
251/// Generated client implementations.
252#[cfg(feature = "client")]
253pub mod msg_client {
254    #![allow(
255        unused_variables,
256        dead_code,
257        missing_docs,
258        clippy::wildcard_imports,
259        clippy::let_unit_value,
260    )]
261    use tonic::codegen::*;
262    use tonic::codegen::http::Uri;
263    /// Msg defines the ICS29 Msg service.
264    #[derive(Debug, Clone)]
265    pub struct MsgClient<T> {
266        inner: tonic::client::Grpc<T>,
267    }
268    #[cfg(feature = "transport")]
269    impl MsgClient<tonic::transport::Channel> {
270        /// Attempt to create a new client by connecting to a given endpoint.
271        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
272        where
273            D: TryInto<tonic::transport::Endpoint>,
274            D::Error: Into<StdError>,
275        {
276            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
277            Ok(Self::new(conn))
278        }
279    }
280    impl<T> MsgClient<T>
281    where
282        T: tonic::client::GrpcService<tonic::body::Body>,
283        T::Error: Into<StdError>,
284        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
285        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
286    {
287        pub fn new(inner: T) -> Self {
288            let inner = tonic::client::Grpc::new(inner);
289            Self { inner }
290        }
291        pub fn with_origin(inner: T, origin: Uri) -> Self {
292            let inner = tonic::client::Grpc::with_origin(inner, origin);
293            Self { inner }
294        }
295        pub fn with_interceptor<F>(
296            inner: T,
297            interceptor: F,
298        ) -> MsgClient<InterceptedService<T, F>>
299        where
300            F: tonic::service::Interceptor,
301            T::ResponseBody: Default,
302            T: tonic::codegen::Service<
303                http::Request<tonic::body::Body>,
304                Response = http::Response<
305                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
306                >,
307            >,
308            <T as tonic::codegen::Service<
309                http::Request<tonic::body::Body>,
310            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
311        {
312            MsgClient::new(InterceptedService::new(inner, interceptor))
313        }
314        /// Compress requests with the given encoding.
315        ///
316        /// This requires the server to support it otherwise it might respond with an
317        /// error.
318        #[must_use]
319        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
320            self.inner = self.inner.send_compressed(encoding);
321            self
322        }
323        /// Enable decompressing responses.
324        #[must_use]
325        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
326            self.inner = self.inner.accept_compressed(encoding);
327            self
328        }
329        /// Limits the maximum size of a decoded message.
330        ///
331        /// Default: `4MB`
332        #[must_use]
333        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
334            self.inner = self.inner.max_decoding_message_size(limit);
335            self
336        }
337        /// Limits the maximum size of an encoded message.
338        ///
339        /// Default: `usize::MAX`
340        #[must_use]
341        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
342            self.inner = self.inner.max_encoding_message_size(limit);
343            self
344        }
345        /// RegisterPayee defines a rpc handler method for MsgRegisterPayee
346        /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional
347        /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on
348        /// the source chain from which packets originate as this is where fee distribution takes place. This function may be
349        /// called more than once by a relayer, in which case, the latest payee is always used.
350        pub async fn register_payee(
351            &mut self,
352            request: impl tonic::IntoRequest<super::MsgRegisterPayee>,
353        ) -> std::result::Result<
354            tonic::Response<super::MsgRegisterPayeeResponse>,
355            tonic::Status,
356        > {
357            self.inner
358                .ready()
359                .await
360                .map_err(|e| {
361                    tonic::Status::unknown(
362                        format!("Service was not ready: {}", e.into()),
363                    )
364                })?;
365            let codec = tonic::codec::ProstCodec::default();
366            let path = http::uri::PathAndQuery::from_static(
367                "/ibc.applications.fee.v1.Msg/RegisterPayee",
368            );
369            let mut req = request.into_request();
370            req.extensions_mut()
371                .insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "RegisterPayee"));
372            self.inner.unary(req, path, codec).await
373        }
374        /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee
375        /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty
376        /// payee address before relaying. This ensures they will be properly compensated for forward relaying since
377        /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function
378        /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used.
379        pub async fn register_counterparty_payee(
380            &mut self,
381            request: impl tonic::IntoRequest<super::MsgRegisterCounterpartyPayee>,
382        ) -> std::result::Result<
383            tonic::Response<super::MsgRegisterCounterpartyPayeeResponse>,
384            tonic::Status,
385        > {
386            self.inner
387                .ready()
388                .await
389                .map_err(|e| {
390                    tonic::Status::unknown(
391                        format!("Service was not ready: {}", e.into()),
392                    )
393                })?;
394            let codec = tonic::codec::ProstCodec::default();
395            let path = http::uri::PathAndQuery::from_static(
396                "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee",
397            );
398            let mut req = request.into_request();
399            req.extensions_mut()
400                .insert(
401                    GrpcMethod::new(
402                        "ibc.applications.fee.v1.Msg",
403                        "RegisterCounterpartyPayee",
404                    ),
405                );
406            self.inner.unary(req, path, codec).await
407        }
408        /// PayPacketFee defines a rpc handler method for MsgPayPacketFee
409        /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to
410        /// incentivize the relaying of the packet at the next sequence
411        /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows
412        /// initiates the lifecycle of the incentivized packet
413        pub async fn pay_packet_fee(
414            &mut self,
415            request: impl tonic::IntoRequest<super::MsgPayPacketFee>,
416        ) -> std::result::Result<
417            tonic::Response<super::MsgPayPacketFeeResponse>,
418            tonic::Status,
419        > {
420            self.inner
421                .ready()
422                .await
423                .map_err(|e| {
424                    tonic::Status::unknown(
425                        format!("Service was not ready: {}", e.into()),
426                    )
427                })?;
428            let codec = tonic::codec::ProstCodec::default();
429            let path = http::uri::PathAndQuery::from_static(
430                "/ibc.applications.fee.v1.Msg/PayPacketFee",
431            );
432            let mut req = request.into_request();
433            req.extensions_mut()
434                .insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFee"));
435            self.inner.unary(req, path, codec).await
436        }
437        /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync
438        /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to
439        /// incentivize the relaying of a known packet (i.e. at a particular sequence)
440        pub async fn pay_packet_fee_async(
441            &mut self,
442            request: impl tonic::IntoRequest<super::MsgPayPacketFeeAsync>,
443        ) -> std::result::Result<
444            tonic::Response<super::MsgPayPacketFeeAsyncResponse>,
445            tonic::Status,
446        > {
447            self.inner
448                .ready()
449                .await
450                .map_err(|e| {
451                    tonic::Status::unknown(
452                        format!("Service was not ready: {}", e.into()),
453                    )
454                })?;
455            let codec = tonic::codec::ProstCodec::default();
456            let path = http::uri::PathAndQuery::from_static(
457                "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync",
458            );
459            let mut req = request.into_request();
460            req.extensions_mut()
461                .insert(
462                    GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFeeAsync"),
463                );
464            self.inner.unary(req, path, codec).await
465        }
466    }
467}
468/// Generated server implementations.
469#[cfg(feature = "server")]
470pub mod msg_server {
471    #![allow(
472        unused_variables,
473        dead_code,
474        missing_docs,
475        clippy::wildcard_imports,
476        clippy::let_unit_value,
477    )]
478    use tonic::codegen::*;
479    /// Generated trait containing gRPC methods that should be implemented for use with MsgServer.
480    #[async_trait]
481    pub trait Msg: std::marker::Send + std::marker::Sync + 'static {
482        /// RegisterPayee defines a rpc handler method for MsgRegisterPayee
483        /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional
484        /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on
485        /// the source chain from which packets originate as this is where fee distribution takes place. This function may be
486        /// called more than once by a relayer, in which case, the latest payee is always used.
487        async fn register_payee(
488            &self,
489            request: tonic::Request<super::MsgRegisterPayee>,
490        ) -> std::result::Result<
491            tonic::Response<super::MsgRegisterPayeeResponse>,
492            tonic::Status,
493        >;
494        /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee
495        /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty
496        /// payee address before relaying. This ensures they will be properly compensated for forward relaying since
497        /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function
498        /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used.
499        async fn register_counterparty_payee(
500            &self,
501            request: tonic::Request<super::MsgRegisterCounterpartyPayee>,
502        ) -> std::result::Result<
503            tonic::Response<super::MsgRegisterCounterpartyPayeeResponse>,
504            tonic::Status,
505        >;
506        /// PayPacketFee defines a rpc handler method for MsgPayPacketFee
507        /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to
508        /// incentivize the relaying of the packet at the next sequence
509        /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows
510        /// initiates the lifecycle of the incentivized packet
511        async fn pay_packet_fee(
512            &self,
513            request: tonic::Request<super::MsgPayPacketFee>,
514        ) -> std::result::Result<
515            tonic::Response<super::MsgPayPacketFeeResponse>,
516            tonic::Status,
517        >;
518        /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync
519        /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to
520        /// incentivize the relaying of a known packet (i.e. at a particular sequence)
521        async fn pay_packet_fee_async(
522            &self,
523            request: tonic::Request<super::MsgPayPacketFeeAsync>,
524        ) -> std::result::Result<
525            tonic::Response<super::MsgPayPacketFeeAsyncResponse>,
526            tonic::Status,
527        >;
528    }
529    /// Msg defines the ICS29 Msg service.
530    #[derive(Debug)]
531    pub struct MsgServer<T> {
532        inner: Arc<T>,
533        accept_compression_encodings: EnabledCompressionEncodings,
534        send_compression_encodings: EnabledCompressionEncodings,
535        max_decoding_message_size: Option<usize>,
536        max_encoding_message_size: Option<usize>,
537    }
538    impl<T> MsgServer<T> {
539        pub fn new(inner: T) -> Self {
540            Self::from_arc(Arc::new(inner))
541        }
542        pub fn from_arc(inner: Arc<T>) -> Self {
543            Self {
544                inner,
545                accept_compression_encodings: Default::default(),
546                send_compression_encodings: Default::default(),
547                max_decoding_message_size: None,
548                max_encoding_message_size: None,
549            }
550        }
551        pub fn with_interceptor<F>(
552            inner: T,
553            interceptor: F,
554        ) -> InterceptedService<Self, F>
555        where
556            F: tonic::service::Interceptor,
557        {
558            InterceptedService::new(Self::new(inner), interceptor)
559        }
560        /// Enable decompressing requests with the given encoding.
561        #[must_use]
562        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
563            self.accept_compression_encodings.enable(encoding);
564            self
565        }
566        /// Compress responses with the given encoding, if the client supports it.
567        #[must_use]
568        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
569            self.send_compression_encodings.enable(encoding);
570            self
571        }
572        /// Limits the maximum size of a decoded message.
573        ///
574        /// Default: `4MB`
575        #[must_use]
576        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
577            self.max_decoding_message_size = Some(limit);
578            self
579        }
580        /// Limits the maximum size of an encoded message.
581        ///
582        /// Default: `usize::MAX`
583        #[must_use]
584        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
585            self.max_encoding_message_size = Some(limit);
586            self
587        }
588    }
589    impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
590    where
591        T: Msg,
592        B: Body + std::marker::Send + 'static,
593        B::Error: Into<StdError> + std::marker::Send + 'static,
594    {
595        type Response = http::Response<tonic::body::Body>;
596        type Error = std::convert::Infallible;
597        type Future = BoxFuture<Self::Response, Self::Error>;
598        fn poll_ready(
599            &mut self,
600            _cx: &mut Context<'_>,
601        ) -> Poll<std::result::Result<(), Self::Error>> {
602            Poll::Ready(Ok(()))
603        }
604        fn call(&mut self, req: http::Request<B>) -> Self::Future {
605            match req.uri().path() {
606                "/ibc.applications.fee.v1.Msg/RegisterPayee" => {
607                    #[allow(non_camel_case_types)]
608                    struct RegisterPayeeSvc<T: Msg>(pub Arc<T>);
609                    impl<T: Msg> tonic::server::UnaryService<super::MsgRegisterPayee>
610                    for RegisterPayeeSvc<T> {
611                        type Response = super::MsgRegisterPayeeResponse;
612                        type Future = BoxFuture<
613                            tonic::Response<Self::Response>,
614                            tonic::Status,
615                        >;
616                        fn call(
617                            &mut self,
618                            request: tonic::Request<super::MsgRegisterPayee>,
619                        ) -> Self::Future {
620                            let inner = Arc::clone(&self.0);
621                            let fut = async move {
622                                <T as Msg>::register_payee(&inner, request).await
623                            };
624                            Box::pin(fut)
625                        }
626                    }
627                    let accept_compression_encodings = self.accept_compression_encodings;
628                    let send_compression_encodings = self.send_compression_encodings;
629                    let max_decoding_message_size = self.max_decoding_message_size;
630                    let max_encoding_message_size = self.max_encoding_message_size;
631                    let inner = self.inner.clone();
632                    let fut = async move {
633                        let method = RegisterPayeeSvc(inner);
634                        let codec = tonic::codec::ProstCodec::default();
635                        let mut grpc = tonic::server::Grpc::new(codec)
636                            .apply_compression_config(
637                                accept_compression_encodings,
638                                send_compression_encodings,
639                            )
640                            .apply_max_message_size_config(
641                                max_decoding_message_size,
642                                max_encoding_message_size,
643                            );
644                        let res = grpc.unary(method, req).await;
645                        Ok(res)
646                    };
647                    Box::pin(fut)
648                }
649                "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee" => {
650                    #[allow(non_camel_case_types)]
651                    struct RegisterCounterpartyPayeeSvc<T: Msg>(pub Arc<T>);
652                    impl<
653                        T: Msg,
654                    > tonic::server::UnaryService<super::MsgRegisterCounterpartyPayee>
655                    for RegisterCounterpartyPayeeSvc<T> {
656                        type Response = super::MsgRegisterCounterpartyPayeeResponse;
657                        type Future = BoxFuture<
658                            tonic::Response<Self::Response>,
659                            tonic::Status,
660                        >;
661                        fn call(
662                            &mut self,
663                            request: tonic::Request<super::MsgRegisterCounterpartyPayee>,
664                        ) -> Self::Future {
665                            let inner = Arc::clone(&self.0);
666                            let fut = async move {
667                                <T as Msg>::register_counterparty_payee(&inner, request)
668                                    .await
669                            };
670                            Box::pin(fut)
671                        }
672                    }
673                    let accept_compression_encodings = self.accept_compression_encodings;
674                    let send_compression_encodings = self.send_compression_encodings;
675                    let max_decoding_message_size = self.max_decoding_message_size;
676                    let max_encoding_message_size = self.max_encoding_message_size;
677                    let inner = self.inner.clone();
678                    let fut = async move {
679                        let method = RegisterCounterpartyPayeeSvc(inner);
680                        let codec = tonic::codec::ProstCodec::default();
681                        let mut grpc = tonic::server::Grpc::new(codec)
682                            .apply_compression_config(
683                                accept_compression_encodings,
684                                send_compression_encodings,
685                            )
686                            .apply_max_message_size_config(
687                                max_decoding_message_size,
688                                max_encoding_message_size,
689                            );
690                        let res = grpc.unary(method, req).await;
691                        Ok(res)
692                    };
693                    Box::pin(fut)
694                }
695                "/ibc.applications.fee.v1.Msg/PayPacketFee" => {
696                    #[allow(non_camel_case_types)]
697                    struct PayPacketFeeSvc<T: Msg>(pub Arc<T>);
698                    impl<T: Msg> tonic::server::UnaryService<super::MsgPayPacketFee>
699                    for PayPacketFeeSvc<T> {
700                        type Response = super::MsgPayPacketFeeResponse;
701                        type Future = BoxFuture<
702                            tonic::Response<Self::Response>,
703                            tonic::Status,
704                        >;
705                        fn call(
706                            &mut self,
707                            request: tonic::Request<super::MsgPayPacketFee>,
708                        ) -> Self::Future {
709                            let inner = Arc::clone(&self.0);
710                            let fut = async move {
711                                <T as Msg>::pay_packet_fee(&inner, request).await
712                            };
713                            Box::pin(fut)
714                        }
715                    }
716                    let accept_compression_encodings = self.accept_compression_encodings;
717                    let send_compression_encodings = self.send_compression_encodings;
718                    let max_decoding_message_size = self.max_decoding_message_size;
719                    let max_encoding_message_size = self.max_encoding_message_size;
720                    let inner = self.inner.clone();
721                    let fut = async move {
722                        let method = PayPacketFeeSvc(inner);
723                        let codec = tonic::codec::ProstCodec::default();
724                        let mut grpc = tonic::server::Grpc::new(codec)
725                            .apply_compression_config(
726                                accept_compression_encodings,
727                                send_compression_encodings,
728                            )
729                            .apply_max_message_size_config(
730                                max_decoding_message_size,
731                                max_encoding_message_size,
732                            );
733                        let res = grpc.unary(method, req).await;
734                        Ok(res)
735                    };
736                    Box::pin(fut)
737                }
738                "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync" => {
739                    #[allow(non_camel_case_types)]
740                    struct PayPacketFeeAsyncSvc<T: Msg>(pub Arc<T>);
741                    impl<T: Msg> tonic::server::UnaryService<super::MsgPayPacketFeeAsync>
742                    for PayPacketFeeAsyncSvc<T> {
743                        type Response = super::MsgPayPacketFeeAsyncResponse;
744                        type Future = BoxFuture<
745                            tonic::Response<Self::Response>,
746                            tonic::Status,
747                        >;
748                        fn call(
749                            &mut self,
750                            request: tonic::Request<super::MsgPayPacketFeeAsync>,
751                        ) -> Self::Future {
752                            let inner = Arc::clone(&self.0);
753                            let fut = async move {
754                                <T as Msg>::pay_packet_fee_async(&inner, request).await
755                            };
756                            Box::pin(fut)
757                        }
758                    }
759                    let accept_compression_encodings = self.accept_compression_encodings;
760                    let send_compression_encodings = self.send_compression_encodings;
761                    let max_decoding_message_size = self.max_decoding_message_size;
762                    let max_encoding_message_size = self.max_encoding_message_size;
763                    let inner = self.inner.clone();
764                    let fut = async move {
765                        let method = PayPacketFeeAsyncSvc(inner);
766                        let codec = tonic::codec::ProstCodec::default();
767                        let mut grpc = tonic::server::Grpc::new(codec)
768                            .apply_compression_config(
769                                accept_compression_encodings,
770                                send_compression_encodings,
771                            )
772                            .apply_max_message_size_config(
773                                max_decoding_message_size,
774                                max_encoding_message_size,
775                            );
776                        let res = grpc.unary(method, req).await;
777                        Ok(res)
778                    };
779                    Box::pin(fut)
780                }
781                _ => {
782                    Box::pin(async move {
783                        let mut response = http::Response::new(
784                            tonic::body::Body::default(),
785                        );
786                        let headers = response.headers_mut();
787                        headers
788                            .insert(
789                                tonic::Status::GRPC_STATUS,
790                                (tonic::Code::Unimplemented as i32).into(),
791                            );
792                        headers
793                            .insert(
794                                http::header::CONTENT_TYPE,
795                                tonic::metadata::GRPC_CONTENT_TYPE,
796                            );
797                        Ok(response)
798                    })
799                }
800            }
801        }
802    }
803    impl<T> Clone for MsgServer<T> {
804        fn clone(&self) -> Self {
805            let inner = self.inner.clone();
806            Self {
807                inner,
808                accept_compression_encodings: self.accept_compression_encodings,
809                send_compression_encodings: self.send_compression_encodings,
810                max_decoding_message_size: self.max_decoding_message_size,
811                max_encoding_message_size: self.max_encoding_message_size,
812            }
813        }
814    }
815    /// Generated gRPC service name
816    pub const SERVICE_NAME: &str = "ibc.applications.fee.v1.Msg";
817    impl<T> tonic::server::NamedService for MsgServer<T> {
818        const NAME: &'static str = SERVICE_NAME;
819    }
820}
821/// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct IncentivizedAcknowledgement {
824    /// the underlying app acknowledgement bytes
825    #[prost(bytes = "vec", tag = "1")]
826    pub app_acknowledgement: ::prost::alloc::vec::Vec<u8>,
827    /// the relayer address which submits the recv packet message
828    #[prost(string, tag = "2")]
829    pub forward_relayer_address: ::prost::alloc::string::String,
830    /// success flag of the base application callback
831    #[prost(bool, tag = "3")]
832    pub underlying_app_success: bool,
833}
834impl ::prost::Name for IncentivizedAcknowledgement {
835    const NAME: &'static str = "IncentivizedAcknowledgement";
836    const PACKAGE: &'static str = "ibc.applications.fee.v1";
837    fn full_name() -> ::prost::alloc::string::String {
838        "ibc.applications.fee.v1.IncentivizedAcknowledgement".into()
839    }
840    fn type_url() -> ::prost::alloc::string::String {
841        "/ibc.applications.fee.v1.IncentivizedAcknowledgement".into()
842    }
843}
844/// GenesisState defines the ICS29 fee middleware genesis state
845#[derive(Clone, PartialEq, ::prost::Message)]
846pub struct GenesisState {
847    /// list of identified packet fees
848    #[prost(message, repeated, tag = "1")]
849    pub identified_fees: ::prost::alloc::vec::Vec<IdentifiedPacketFees>,
850    /// list of fee enabled channels
851    #[prost(message, repeated, tag = "2")]
852    pub fee_enabled_channels: ::prost::alloc::vec::Vec<FeeEnabledChannel>,
853    /// list of registered payees
854    #[prost(message, repeated, tag = "3")]
855    pub registered_payees: ::prost::alloc::vec::Vec<RegisteredPayee>,
856    /// list of registered counterparty payees
857    #[prost(message, repeated, tag = "4")]
858    pub registered_counterparty_payees: ::prost::alloc::vec::Vec<
859        RegisteredCounterpartyPayee,
860    >,
861    /// list of forward relayer addresses
862    #[prost(message, repeated, tag = "5")]
863    pub forward_relayers: ::prost::alloc::vec::Vec<ForwardRelayerAddress>,
864}
865impl ::prost::Name for GenesisState {
866    const NAME: &'static str = "GenesisState";
867    const PACKAGE: &'static str = "ibc.applications.fee.v1";
868    fn full_name() -> ::prost::alloc::string::String {
869        "ibc.applications.fee.v1.GenesisState".into()
870    }
871    fn type_url() -> ::prost::alloc::string::String {
872        "/ibc.applications.fee.v1.GenesisState".into()
873    }
874}
875/// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel
876#[derive(Clone, PartialEq, ::prost::Message)]
877pub struct FeeEnabledChannel {
878    /// unique port identifier
879    #[prost(string, tag = "1")]
880    pub port_id: ::prost::alloc::string::String,
881    /// unique channel identifier
882    #[prost(string, tag = "2")]
883    pub channel_id: ::prost::alloc::string::String,
884}
885impl ::prost::Name for FeeEnabledChannel {
886    const NAME: &'static str = "FeeEnabledChannel";
887    const PACKAGE: &'static str = "ibc.applications.fee.v1";
888    fn full_name() -> ::prost::alloc::string::String {
889        "ibc.applications.fee.v1.FeeEnabledChannel".into()
890    }
891    fn type_url() -> ::prost::alloc::string::String {
892        "/ibc.applications.fee.v1.FeeEnabledChannel".into()
893    }
894}
895/// RegisteredPayee contains the relayer address and payee address for a specific channel
896#[derive(Clone, PartialEq, ::prost::Message)]
897pub struct RegisteredPayee {
898    /// unique channel identifier
899    #[prost(string, tag = "1")]
900    pub channel_id: ::prost::alloc::string::String,
901    /// the relayer address
902    #[prost(string, tag = "2")]
903    pub relayer: ::prost::alloc::string::String,
904    /// the payee address
905    #[prost(string, tag = "3")]
906    pub payee: ::prost::alloc::string::String,
907}
908impl ::prost::Name for RegisteredPayee {
909    const NAME: &'static str = "RegisteredPayee";
910    const PACKAGE: &'static str = "ibc.applications.fee.v1";
911    fn full_name() -> ::prost::alloc::string::String {
912        "ibc.applications.fee.v1.RegisteredPayee".into()
913    }
914    fn type_url() -> ::prost::alloc::string::String {
915        "/ibc.applications.fee.v1.RegisteredPayee".into()
916    }
917}
918/// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used
919/// for recv fee distribution)
920#[derive(Clone, PartialEq, ::prost::Message)]
921pub struct RegisteredCounterpartyPayee {
922    /// unique channel identifier
923    #[prost(string, tag = "1")]
924    pub channel_id: ::prost::alloc::string::String,
925    /// the relayer address
926    #[prost(string, tag = "2")]
927    pub relayer: ::prost::alloc::string::String,
928    /// the counterparty payee address
929    #[prost(string, tag = "3")]
930    pub counterparty_payee: ::prost::alloc::string::String,
931}
932impl ::prost::Name for RegisteredCounterpartyPayee {
933    const NAME: &'static str = "RegisteredCounterpartyPayee";
934    const PACKAGE: &'static str = "ibc.applications.fee.v1";
935    fn full_name() -> ::prost::alloc::string::String {
936        "ibc.applications.fee.v1.RegisteredCounterpartyPayee".into()
937    }
938    fn type_url() -> ::prost::alloc::string::String {
939        "/ibc.applications.fee.v1.RegisteredCounterpartyPayee".into()
940    }
941}
942/// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements
943#[derive(Clone, PartialEq, ::prost::Message)]
944pub struct ForwardRelayerAddress {
945    /// the forward relayer address
946    #[prost(string, tag = "1")]
947    pub address: ::prost::alloc::string::String,
948    /// unique packet identifer comprised of the channel ID, port ID and sequence
949    #[prost(message, optional, tag = "2")]
950    pub packet_id: ::core::option::Option<
951        super::super::super::core::channel::v1::PacketId,
952    >,
953}
954impl ::prost::Name for ForwardRelayerAddress {
955    const NAME: &'static str = "ForwardRelayerAddress";
956    const PACKAGE: &'static str = "ibc.applications.fee.v1";
957    fn full_name() -> ::prost::alloc::string::String {
958        "ibc.applications.fee.v1.ForwardRelayerAddress".into()
959    }
960    fn type_url() -> ::prost::alloc::string::String {
961        "/ibc.applications.fee.v1.ForwardRelayerAddress".into()
962    }
963}
964/// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc
965#[derive(Clone, PartialEq, ::prost::Message)]
966pub struct QueryIncentivizedPacketsRequest {
967    /// pagination defines an optional pagination for the request.
968    #[prost(message, optional, tag = "1")]
969    pub pagination: ::core::option::Option<
970        super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
971    >,
972    /// block height at which to query
973    #[prost(uint64, tag = "2")]
974    pub query_height: u64,
975}
976impl ::prost::Name for QueryIncentivizedPacketsRequest {
977    const NAME: &'static str = "QueryIncentivizedPacketsRequest";
978    const PACKAGE: &'static str = "ibc.applications.fee.v1";
979    fn full_name() -> ::prost::alloc::string::String {
980        "ibc.applications.fee.v1.QueryIncentivizedPacketsRequest".into()
981    }
982    fn type_url() -> ::prost::alloc::string::String {
983        "/ibc.applications.fee.v1.QueryIncentivizedPacketsRequest".into()
984    }
985}
986/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc
987#[derive(Clone, PartialEq, ::prost::Message)]
988pub struct QueryIncentivizedPacketsResponse {
989    /// list of identified fees for incentivized packets
990    #[prost(message, repeated, tag = "1")]
991    pub incentivized_packets: ::prost::alloc::vec::Vec<IdentifiedPacketFees>,
992    /// pagination defines the pagination in the response.
993    #[prost(message, optional, tag = "2")]
994    pub pagination: ::core::option::Option<
995        super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
996    >,
997}
998impl ::prost::Name for QueryIncentivizedPacketsResponse {
999    const NAME: &'static str = "QueryIncentivizedPacketsResponse";
1000    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1001    fn full_name() -> ::prost::alloc::string::String {
1002        "ibc.applications.fee.v1.QueryIncentivizedPacketsResponse".into()
1003    }
1004    fn type_url() -> ::prost::alloc::string::String {
1005        "/ibc.applications.fee.v1.QueryIncentivizedPacketsResponse".into()
1006    }
1007}
1008/// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc
1009#[derive(Clone, PartialEq, ::prost::Message)]
1010pub struct QueryIncentivizedPacketRequest {
1011    /// unique packet identifier comprised of channel ID, port ID and sequence
1012    #[prost(message, optional, tag = "1")]
1013    pub packet_id: ::core::option::Option<
1014        super::super::super::core::channel::v1::PacketId,
1015    >,
1016    /// block height at which to query
1017    #[prost(uint64, tag = "2")]
1018    pub query_height: u64,
1019}
1020impl ::prost::Name for QueryIncentivizedPacketRequest {
1021    const NAME: &'static str = "QueryIncentivizedPacketRequest";
1022    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1023    fn full_name() -> ::prost::alloc::string::String {
1024        "ibc.applications.fee.v1.QueryIncentivizedPacketRequest".into()
1025    }
1026    fn type_url() -> ::prost::alloc::string::String {
1027        "/ibc.applications.fee.v1.QueryIncentivizedPacketRequest".into()
1028    }
1029}
1030/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc
1031#[derive(Clone, PartialEq, ::prost::Message)]
1032pub struct QueryIncentivizedPacketResponse {
1033    /// the identified fees for the incentivized packet
1034    #[prost(message, optional, tag = "1")]
1035    pub incentivized_packet: ::core::option::Option<IdentifiedPacketFees>,
1036}
1037impl ::prost::Name for QueryIncentivizedPacketResponse {
1038    const NAME: &'static str = "QueryIncentivizedPacketResponse";
1039    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1040    fn full_name() -> ::prost::alloc::string::String {
1041        "ibc.applications.fee.v1.QueryIncentivizedPacketResponse".into()
1042    }
1043    fn type_url() -> ::prost::alloc::string::String {
1044        "/ibc.applications.fee.v1.QueryIncentivizedPacketResponse".into()
1045    }
1046}
1047/// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets
1048/// for a specific channel
1049#[derive(Clone, PartialEq, ::prost::Message)]
1050pub struct QueryIncentivizedPacketsForChannelRequest {
1051    /// pagination defines an optional pagination for the request.
1052    #[prost(message, optional, tag = "1")]
1053    pub pagination: ::core::option::Option<
1054        super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
1055    >,
1056    #[prost(string, tag = "2")]
1057    pub port_id: ::prost::alloc::string::String,
1058    #[prost(string, tag = "3")]
1059    pub channel_id: ::prost::alloc::string::String,
1060    /// Height to query at
1061    #[prost(uint64, tag = "4")]
1062    pub query_height: u64,
1063}
1064impl ::prost::Name for QueryIncentivizedPacketsForChannelRequest {
1065    const NAME: &'static str = "QueryIncentivizedPacketsForChannelRequest";
1066    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1067    fn full_name() -> ::prost::alloc::string::String {
1068        "ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest".into()
1069    }
1070    fn type_url() -> ::prost::alloc::string::String {
1071        "/ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest".into()
1072    }
1073}
1074/// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC
1075#[derive(Clone, PartialEq, ::prost::Message)]
1076pub struct QueryIncentivizedPacketsForChannelResponse {
1077    /// Map of all incentivized_packets
1078    #[prost(message, repeated, tag = "1")]
1079    pub incentivized_packets: ::prost::alloc::vec::Vec<IdentifiedPacketFees>,
1080    /// pagination defines the pagination in the response.
1081    #[prost(message, optional, tag = "2")]
1082    pub pagination: ::core::option::Option<
1083        super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
1084    >,
1085}
1086impl ::prost::Name for QueryIncentivizedPacketsForChannelResponse {
1087    const NAME: &'static str = "QueryIncentivizedPacketsForChannelResponse";
1088    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1089    fn full_name() -> ::prost::alloc::string::String {
1090        "ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse".into()
1091    }
1092    fn type_url() -> ::prost::alloc::string::String {
1093        "/ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse".into()
1094    }
1095}
1096/// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc
1097#[derive(Clone, PartialEq, ::prost::Message)]
1098pub struct QueryTotalRecvFeesRequest {
1099    /// the packet identifier for the associated fees
1100    #[prost(message, optional, tag = "1")]
1101    pub packet_id: ::core::option::Option<
1102        super::super::super::core::channel::v1::PacketId,
1103    >,
1104}
1105impl ::prost::Name for QueryTotalRecvFeesRequest {
1106    const NAME: &'static str = "QueryTotalRecvFeesRequest";
1107    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1108    fn full_name() -> ::prost::alloc::string::String {
1109        "ibc.applications.fee.v1.QueryTotalRecvFeesRequest".into()
1110    }
1111    fn type_url() -> ::prost::alloc::string::String {
1112        "/ibc.applications.fee.v1.QueryTotalRecvFeesRequest".into()
1113    }
1114}
1115/// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc
1116#[derive(Clone, PartialEq, ::prost::Message)]
1117pub struct QueryTotalRecvFeesResponse {
1118    /// the total packet receive fees
1119    #[prost(message, repeated, tag = "1")]
1120    pub recv_fees: ::prost::alloc::vec::Vec<
1121        super::super::super::super::cosmos::base::v1beta1::Coin,
1122    >,
1123}
1124impl ::prost::Name for QueryTotalRecvFeesResponse {
1125    const NAME: &'static str = "QueryTotalRecvFeesResponse";
1126    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1127    fn full_name() -> ::prost::alloc::string::String {
1128        "ibc.applications.fee.v1.QueryTotalRecvFeesResponse".into()
1129    }
1130    fn type_url() -> ::prost::alloc::string::String {
1131        "/ibc.applications.fee.v1.QueryTotalRecvFeesResponse".into()
1132    }
1133}
1134/// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc
1135#[derive(Clone, PartialEq, ::prost::Message)]
1136pub struct QueryTotalAckFeesRequest {
1137    /// the packet identifier for the associated fees
1138    #[prost(message, optional, tag = "1")]
1139    pub packet_id: ::core::option::Option<
1140        super::super::super::core::channel::v1::PacketId,
1141    >,
1142}
1143impl ::prost::Name for QueryTotalAckFeesRequest {
1144    const NAME: &'static str = "QueryTotalAckFeesRequest";
1145    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1146    fn full_name() -> ::prost::alloc::string::String {
1147        "ibc.applications.fee.v1.QueryTotalAckFeesRequest".into()
1148    }
1149    fn type_url() -> ::prost::alloc::string::String {
1150        "/ibc.applications.fee.v1.QueryTotalAckFeesRequest".into()
1151    }
1152}
1153/// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc
1154#[derive(Clone, PartialEq, ::prost::Message)]
1155pub struct QueryTotalAckFeesResponse {
1156    /// the total packet acknowledgement fees
1157    #[prost(message, repeated, tag = "1")]
1158    pub ack_fees: ::prost::alloc::vec::Vec<
1159        super::super::super::super::cosmos::base::v1beta1::Coin,
1160    >,
1161}
1162impl ::prost::Name for QueryTotalAckFeesResponse {
1163    const NAME: &'static str = "QueryTotalAckFeesResponse";
1164    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1165    fn full_name() -> ::prost::alloc::string::String {
1166        "ibc.applications.fee.v1.QueryTotalAckFeesResponse".into()
1167    }
1168    fn type_url() -> ::prost::alloc::string::String {
1169        "/ibc.applications.fee.v1.QueryTotalAckFeesResponse".into()
1170    }
1171}
1172/// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc
1173#[derive(Clone, PartialEq, ::prost::Message)]
1174pub struct QueryTotalTimeoutFeesRequest {
1175    /// the packet identifier for the associated fees
1176    #[prost(message, optional, tag = "1")]
1177    pub packet_id: ::core::option::Option<
1178        super::super::super::core::channel::v1::PacketId,
1179    >,
1180}
1181impl ::prost::Name for QueryTotalTimeoutFeesRequest {
1182    const NAME: &'static str = "QueryTotalTimeoutFeesRequest";
1183    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1184    fn full_name() -> ::prost::alloc::string::String {
1185        "ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest".into()
1186    }
1187    fn type_url() -> ::prost::alloc::string::String {
1188        "/ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest".into()
1189    }
1190}
1191/// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc
1192#[derive(Clone, PartialEq, ::prost::Message)]
1193pub struct QueryTotalTimeoutFeesResponse {
1194    /// the total packet timeout fees
1195    #[prost(message, repeated, tag = "1")]
1196    pub timeout_fees: ::prost::alloc::vec::Vec<
1197        super::super::super::super::cosmos::base::v1beta1::Coin,
1198    >,
1199}
1200impl ::prost::Name for QueryTotalTimeoutFeesResponse {
1201    const NAME: &'static str = "QueryTotalTimeoutFeesResponse";
1202    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1203    fn full_name() -> ::prost::alloc::string::String {
1204        "ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse".into()
1205    }
1206    fn type_url() -> ::prost::alloc::string::String {
1207        "/ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse".into()
1208    }
1209}
1210/// QueryPayeeRequest defines the request type for the Payee rpc
1211#[derive(Clone, PartialEq, ::prost::Message)]
1212pub struct QueryPayeeRequest {
1213    /// unique channel identifier
1214    #[prost(string, tag = "1")]
1215    pub channel_id: ::prost::alloc::string::String,
1216    /// the relayer address to which the distribution address is registered
1217    #[prost(string, tag = "2")]
1218    pub relayer: ::prost::alloc::string::String,
1219}
1220impl ::prost::Name for QueryPayeeRequest {
1221    const NAME: &'static str = "QueryPayeeRequest";
1222    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1223    fn full_name() -> ::prost::alloc::string::String {
1224        "ibc.applications.fee.v1.QueryPayeeRequest".into()
1225    }
1226    fn type_url() -> ::prost::alloc::string::String {
1227        "/ibc.applications.fee.v1.QueryPayeeRequest".into()
1228    }
1229}
1230/// QueryPayeeResponse defines the response type for the Payee rpc
1231#[derive(Clone, PartialEq, ::prost::Message)]
1232pub struct QueryPayeeResponse {
1233    /// the payee address to which packet fees are paid out
1234    #[prost(string, tag = "1")]
1235    pub payee_address: ::prost::alloc::string::String,
1236}
1237impl ::prost::Name for QueryPayeeResponse {
1238    const NAME: &'static str = "QueryPayeeResponse";
1239    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1240    fn full_name() -> ::prost::alloc::string::String {
1241        "ibc.applications.fee.v1.QueryPayeeResponse".into()
1242    }
1243    fn type_url() -> ::prost::alloc::string::String {
1244        "/ibc.applications.fee.v1.QueryPayeeResponse".into()
1245    }
1246}
1247/// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct QueryCounterpartyPayeeRequest {
1250    /// unique channel identifier
1251    #[prost(string, tag = "1")]
1252    pub channel_id: ::prost::alloc::string::String,
1253    /// the relayer address to which the counterparty is registered
1254    #[prost(string, tag = "2")]
1255    pub relayer: ::prost::alloc::string::String,
1256}
1257impl ::prost::Name for QueryCounterpartyPayeeRequest {
1258    const NAME: &'static str = "QueryCounterpartyPayeeRequest";
1259    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1260    fn full_name() -> ::prost::alloc::string::String {
1261        "ibc.applications.fee.v1.QueryCounterpartyPayeeRequest".into()
1262    }
1263    fn type_url() -> ::prost::alloc::string::String {
1264        "/ibc.applications.fee.v1.QueryCounterpartyPayeeRequest".into()
1265    }
1266}
1267/// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc
1268#[derive(Clone, PartialEq, ::prost::Message)]
1269pub struct QueryCounterpartyPayeeResponse {
1270    /// the counterparty payee address used to compensate forward relaying
1271    #[prost(string, tag = "1")]
1272    pub counterparty_payee: ::prost::alloc::string::String,
1273}
1274impl ::prost::Name for QueryCounterpartyPayeeResponse {
1275    const NAME: &'static str = "QueryCounterpartyPayeeResponse";
1276    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1277    fn full_name() -> ::prost::alloc::string::String {
1278        "ibc.applications.fee.v1.QueryCounterpartyPayeeResponse".into()
1279    }
1280    fn type_url() -> ::prost::alloc::string::String {
1281        "/ibc.applications.fee.v1.QueryCounterpartyPayeeResponse".into()
1282    }
1283}
1284/// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc
1285#[derive(Clone, PartialEq, ::prost::Message)]
1286pub struct QueryFeeEnabledChannelsRequest {
1287    /// pagination defines an optional pagination for the request.
1288    #[prost(message, optional, tag = "1")]
1289    pub pagination: ::core::option::Option<
1290        super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
1291    >,
1292    /// block height at which to query
1293    #[prost(uint64, tag = "2")]
1294    pub query_height: u64,
1295}
1296impl ::prost::Name for QueryFeeEnabledChannelsRequest {
1297    const NAME: &'static str = "QueryFeeEnabledChannelsRequest";
1298    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1299    fn full_name() -> ::prost::alloc::string::String {
1300        "ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest".into()
1301    }
1302    fn type_url() -> ::prost::alloc::string::String {
1303        "/ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest".into()
1304    }
1305}
1306/// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc
1307#[derive(Clone, PartialEq, ::prost::Message)]
1308pub struct QueryFeeEnabledChannelsResponse {
1309    /// list of fee enabled channels
1310    #[prost(message, repeated, tag = "1")]
1311    pub fee_enabled_channels: ::prost::alloc::vec::Vec<FeeEnabledChannel>,
1312    /// pagination defines the pagination in the response.
1313    #[prost(message, optional, tag = "2")]
1314    pub pagination: ::core::option::Option<
1315        super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
1316    >,
1317}
1318impl ::prost::Name for QueryFeeEnabledChannelsResponse {
1319    const NAME: &'static str = "QueryFeeEnabledChannelsResponse";
1320    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1321    fn full_name() -> ::prost::alloc::string::String {
1322        "ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse".into()
1323    }
1324    fn type_url() -> ::prost::alloc::string::String {
1325        "/ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse".into()
1326    }
1327}
1328/// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc
1329#[derive(Clone, PartialEq, ::prost::Message)]
1330pub struct QueryFeeEnabledChannelRequest {
1331    /// unique port identifier
1332    #[prost(string, tag = "1")]
1333    pub port_id: ::prost::alloc::string::String,
1334    /// unique channel identifier
1335    #[prost(string, tag = "2")]
1336    pub channel_id: ::prost::alloc::string::String,
1337}
1338impl ::prost::Name for QueryFeeEnabledChannelRequest {
1339    const NAME: &'static str = "QueryFeeEnabledChannelRequest";
1340    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1341    fn full_name() -> ::prost::alloc::string::String {
1342        "ibc.applications.fee.v1.QueryFeeEnabledChannelRequest".into()
1343    }
1344    fn type_url() -> ::prost::alloc::string::String {
1345        "/ibc.applications.fee.v1.QueryFeeEnabledChannelRequest".into()
1346    }
1347}
1348/// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc
1349#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1350pub struct QueryFeeEnabledChannelResponse {
1351    /// boolean flag representing the fee enabled channel status
1352    #[prost(bool, tag = "1")]
1353    pub fee_enabled: bool,
1354}
1355impl ::prost::Name for QueryFeeEnabledChannelResponse {
1356    const NAME: &'static str = "QueryFeeEnabledChannelResponse";
1357    const PACKAGE: &'static str = "ibc.applications.fee.v1";
1358    fn full_name() -> ::prost::alloc::string::String {
1359        "ibc.applications.fee.v1.QueryFeeEnabledChannelResponse".into()
1360    }
1361    fn type_url() -> ::prost::alloc::string::String {
1362        "/ibc.applications.fee.v1.QueryFeeEnabledChannelResponse".into()
1363    }
1364}
1365/// Generated client implementations.
1366#[cfg(feature = "client")]
1367pub mod query_client {
1368    #![allow(
1369        unused_variables,
1370        dead_code,
1371        missing_docs,
1372        clippy::wildcard_imports,
1373        clippy::let_unit_value,
1374    )]
1375    use tonic::codegen::*;
1376    use tonic::codegen::http::Uri;
1377    /// Query defines the ICS29 gRPC querier service.
1378    #[derive(Debug, Clone)]
1379    pub struct QueryClient<T> {
1380        inner: tonic::client::Grpc<T>,
1381    }
1382    #[cfg(feature = "transport")]
1383    impl QueryClient<tonic::transport::Channel> {
1384        /// Attempt to create a new client by connecting to a given endpoint.
1385        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1386        where
1387            D: TryInto<tonic::transport::Endpoint>,
1388            D::Error: Into<StdError>,
1389        {
1390            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1391            Ok(Self::new(conn))
1392        }
1393    }
1394    impl<T> QueryClient<T>
1395    where
1396        T: tonic::client::GrpcService<tonic::body::Body>,
1397        T::Error: Into<StdError>,
1398        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1399        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1400    {
1401        pub fn new(inner: T) -> Self {
1402            let inner = tonic::client::Grpc::new(inner);
1403            Self { inner }
1404        }
1405        pub fn with_origin(inner: T, origin: Uri) -> Self {
1406            let inner = tonic::client::Grpc::with_origin(inner, origin);
1407            Self { inner }
1408        }
1409        pub fn with_interceptor<F>(
1410            inner: T,
1411            interceptor: F,
1412        ) -> QueryClient<InterceptedService<T, F>>
1413        where
1414            F: tonic::service::Interceptor,
1415            T::ResponseBody: Default,
1416            T: tonic::codegen::Service<
1417                http::Request<tonic::body::Body>,
1418                Response = http::Response<
1419                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1420                >,
1421            >,
1422            <T as tonic::codegen::Service<
1423                http::Request<tonic::body::Body>,
1424            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1425        {
1426            QueryClient::new(InterceptedService::new(inner, interceptor))
1427        }
1428        /// Compress requests with the given encoding.
1429        ///
1430        /// This requires the server to support it otherwise it might respond with an
1431        /// error.
1432        #[must_use]
1433        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1434            self.inner = self.inner.send_compressed(encoding);
1435            self
1436        }
1437        /// Enable decompressing responses.
1438        #[must_use]
1439        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1440            self.inner = self.inner.accept_compressed(encoding);
1441            self
1442        }
1443        /// Limits the maximum size of a decoded message.
1444        ///
1445        /// Default: `4MB`
1446        #[must_use]
1447        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1448            self.inner = self.inner.max_decoding_message_size(limit);
1449            self
1450        }
1451        /// Limits the maximum size of an encoded message.
1452        ///
1453        /// Default: `usize::MAX`
1454        #[must_use]
1455        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1456            self.inner = self.inner.max_encoding_message_size(limit);
1457            self
1458        }
1459        /// IncentivizedPackets returns all incentivized packets and their associated fees
1460        pub async fn incentivized_packets(
1461            &mut self,
1462            request: impl tonic::IntoRequest<super::QueryIncentivizedPacketsRequest>,
1463        ) -> std::result::Result<
1464            tonic::Response<super::QueryIncentivizedPacketsResponse>,
1465            tonic::Status,
1466        > {
1467            self.inner
1468                .ready()
1469                .await
1470                .map_err(|e| {
1471                    tonic::Status::unknown(
1472                        format!("Service was not ready: {}", e.into()),
1473                    )
1474                })?;
1475            let codec = tonic::codec::ProstCodec::default();
1476            let path = http::uri::PathAndQuery::from_static(
1477                "/ibc.applications.fee.v1.Query/IncentivizedPackets",
1478            );
1479            let mut req = request.into_request();
1480            req.extensions_mut()
1481                .insert(
1482                    GrpcMethod::new(
1483                        "ibc.applications.fee.v1.Query",
1484                        "IncentivizedPackets",
1485                    ),
1486                );
1487            self.inner.unary(req, path, codec).await
1488        }
1489        /// IncentivizedPacket returns all packet fees for a packet given its identifier
1490        pub async fn incentivized_packet(
1491            &mut self,
1492            request: impl tonic::IntoRequest<super::QueryIncentivizedPacketRequest>,
1493        ) -> std::result::Result<
1494            tonic::Response<super::QueryIncentivizedPacketResponse>,
1495            tonic::Status,
1496        > {
1497            self.inner
1498                .ready()
1499                .await
1500                .map_err(|e| {
1501                    tonic::Status::unknown(
1502                        format!("Service was not ready: {}", e.into()),
1503                    )
1504                })?;
1505            let codec = tonic::codec::ProstCodec::default();
1506            let path = http::uri::PathAndQuery::from_static(
1507                "/ibc.applications.fee.v1.Query/IncentivizedPacket",
1508            );
1509            let mut req = request.into_request();
1510            req.extensions_mut()
1511                .insert(
1512                    GrpcMethod::new(
1513                        "ibc.applications.fee.v1.Query",
1514                        "IncentivizedPacket",
1515                    ),
1516                );
1517            self.inner.unary(req, path, codec).await
1518        }
1519        /// Gets all incentivized packets for a specific channel
1520        pub async fn incentivized_packets_for_channel(
1521            &mut self,
1522            request: impl tonic::IntoRequest<
1523                super::QueryIncentivizedPacketsForChannelRequest,
1524            >,
1525        ) -> std::result::Result<
1526            tonic::Response<super::QueryIncentivizedPacketsForChannelResponse>,
1527            tonic::Status,
1528        > {
1529            self.inner
1530                .ready()
1531                .await
1532                .map_err(|e| {
1533                    tonic::Status::unknown(
1534                        format!("Service was not ready: {}", e.into()),
1535                    )
1536                })?;
1537            let codec = tonic::codec::ProstCodec::default();
1538            let path = http::uri::PathAndQuery::from_static(
1539                "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel",
1540            );
1541            let mut req = request.into_request();
1542            req.extensions_mut()
1543                .insert(
1544                    GrpcMethod::new(
1545                        "ibc.applications.fee.v1.Query",
1546                        "IncentivizedPacketsForChannel",
1547                    ),
1548                );
1549            self.inner.unary(req, path, codec).await
1550        }
1551        /// TotalRecvFees returns the total receive fees for a packet given its identifier
1552        pub async fn total_recv_fees(
1553            &mut self,
1554            request: impl tonic::IntoRequest<super::QueryTotalRecvFeesRequest>,
1555        ) -> std::result::Result<
1556            tonic::Response<super::QueryTotalRecvFeesResponse>,
1557            tonic::Status,
1558        > {
1559            self.inner
1560                .ready()
1561                .await
1562                .map_err(|e| {
1563                    tonic::Status::unknown(
1564                        format!("Service was not ready: {}", e.into()),
1565                    )
1566                })?;
1567            let codec = tonic::codec::ProstCodec::default();
1568            let path = http::uri::PathAndQuery::from_static(
1569                "/ibc.applications.fee.v1.Query/TotalRecvFees",
1570            );
1571            let mut req = request.into_request();
1572            req.extensions_mut()
1573                .insert(
1574                    GrpcMethod::new("ibc.applications.fee.v1.Query", "TotalRecvFees"),
1575                );
1576            self.inner.unary(req, path, codec).await
1577        }
1578        /// TotalAckFees returns the total acknowledgement fees for a packet given its identifier
1579        pub async fn total_ack_fees(
1580            &mut self,
1581            request: impl tonic::IntoRequest<super::QueryTotalAckFeesRequest>,
1582        ) -> std::result::Result<
1583            tonic::Response<super::QueryTotalAckFeesResponse>,
1584            tonic::Status,
1585        > {
1586            self.inner
1587                .ready()
1588                .await
1589                .map_err(|e| {
1590                    tonic::Status::unknown(
1591                        format!("Service was not ready: {}", e.into()),
1592                    )
1593                })?;
1594            let codec = tonic::codec::ProstCodec::default();
1595            let path = http::uri::PathAndQuery::from_static(
1596                "/ibc.applications.fee.v1.Query/TotalAckFees",
1597            );
1598            let mut req = request.into_request();
1599            req.extensions_mut()
1600                .insert(
1601                    GrpcMethod::new("ibc.applications.fee.v1.Query", "TotalAckFees"),
1602                );
1603            self.inner.unary(req, path, codec).await
1604        }
1605        /// TotalTimeoutFees returns the total timeout fees for a packet given its identifier
1606        pub async fn total_timeout_fees(
1607            &mut self,
1608            request: impl tonic::IntoRequest<super::QueryTotalTimeoutFeesRequest>,
1609        ) -> std::result::Result<
1610            tonic::Response<super::QueryTotalTimeoutFeesResponse>,
1611            tonic::Status,
1612        > {
1613            self.inner
1614                .ready()
1615                .await
1616                .map_err(|e| {
1617                    tonic::Status::unknown(
1618                        format!("Service was not ready: {}", e.into()),
1619                    )
1620                })?;
1621            let codec = tonic::codec::ProstCodec::default();
1622            let path = http::uri::PathAndQuery::from_static(
1623                "/ibc.applications.fee.v1.Query/TotalTimeoutFees",
1624            );
1625            let mut req = request.into_request();
1626            req.extensions_mut()
1627                .insert(
1628                    GrpcMethod::new("ibc.applications.fee.v1.Query", "TotalTimeoutFees"),
1629                );
1630            self.inner.unary(req, path, codec).await
1631        }
1632        /// Payee returns the registered payee address for a specific channel given the relayer address
1633        pub async fn payee(
1634            &mut self,
1635            request: impl tonic::IntoRequest<super::QueryPayeeRequest>,
1636        ) -> std::result::Result<
1637            tonic::Response<super::QueryPayeeResponse>,
1638            tonic::Status,
1639        > {
1640            self.inner
1641                .ready()
1642                .await
1643                .map_err(|e| {
1644                    tonic::Status::unknown(
1645                        format!("Service was not ready: {}", e.into()),
1646                    )
1647                })?;
1648            let codec = tonic::codec::ProstCodec::default();
1649            let path = http::uri::PathAndQuery::from_static(
1650                "/ibc.applications.fee.v1.Query/Payee",
1651            );
1652            let mut req = request.into_request();
1653            req.extensions_mut()
1654                .insert(GrpcMethod::new("ibc.applications.fee.v1.Query", "Payee"));
1655            self.inner.unary(req, path, codec).await
1656        }
1657        /// CounterpartyPayee returns the registered counterparty payee for forward relaying
1658        pub async fn counterparty_payee(
1659            &mut self,
1660            request: impl tonic::IntoRequest<super::QueryCounterpartyPayeeRequest>,
1661        ) -> std::result::Result<
1662            tonic::Response<super::QueryCounterpartyPayeeResponse>,
1663            tonic::Status,
1664        > {
1665            self.inner
1666                .ready()
1667                .await
1668                .map_err(|e| {
1669                    tonic::Status::unknown(
1670                        format!("Service was not ready: {}", e.into()),
1671                    )
1672                })?;
1673            let codec = tonic::codec::ProstCodec::default();
1674            let path = http::uri::PathAndQuery::from_static(
1675                "/ibc.applications.fee.v1.Query/CounterpartyPayee",
1676            );
1677            let mut req = request.into_request();
1678            req.extensions_mut()
1679                .insert(
1680                    GrpcMethod::new("ibc.applications.fee.v1.Query", "CounterpartyPayee"),
1681                );
1682            self.inner.unary(req, path, codec).await
1683        }
1684        /// FeeEnabledChannels returns a list of all fee enabled channels
1685        pub async fn fee_enabled_channels(
1686            &mut self,
1687            request: impl tonic::IntoRequest<super::QueryFeeEnabledChannelsRequest>,
1688        ) -> std::result::Result<
1689            tonic::Response<super::QueryFeeEnabledChannelsResponse>,
1690            tonic::Status,
1691        > {
1692            self.inner
1693                .ready()
1694                .await
1695                .map_err(|e| {
1696                    tonic::Status::unknown(
1697                        format!("Service was not ready: {}", e.into()),
1698                    )
1699                })?;
1700            let codec = tonic::codec::ProstCodec::default();
1701            let path = http::uri::PathAndQuery::from_static(
1702                "/ibc.applications.fee.v1.Query/FeeEnabledChannels",
1703            );
1704            let mut req = request.into_request();
1705            req.extensions_mut()
1706                .insert(
1707                    GrpcMethod::new(
1708                        "ibc.applications.fee.v1.Query",
1709                        "FeeEnabledChannels",
1710                    ),
1711                );
1712            self.inner.unary(req, path, codec).await
1713        }
1714        /// FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel
1715        pub async fn fee_enabled_channel(
1716            &mut self,
1717            request: impl tonic::IntoRequest<super::QueryFeeEnabledChannelRequest>,
1718        ) -> std::result::Result<
1719            tonic::Response<super::QueryFeeEnabledChannelResponse>,
1720            tonic::Status,
1721        > {
1722            self.inner
1723                .ready()
1724                .await
1725                .map_err(|e| {
1726                    tonic::Status::unknown(
1727                        format!("Service was not ready: {}", e.into()),
1728                    )
1729                })?;
1730            let codec = tonic::codec::ProstCodec::default();
1731            let path = http::uri::PathAndQuery::from_static(
1732                "/ibc.applications.fee.v1.Query/FeeEnabledChannel",
1733            );
1734            let mut req = request.into_request();
1735            req.extensions_mut()
1736                .insert(
1737                    GrpcMethod::new("ibc.applications.fee.v1.Query", "FeeEnabledChannel"),
1738                );
1739            self.inner.unary(req, path, codec).await
1740        }
1741    }
1742}
1743/// Generated server implementations.
1744#[cfg(feature = "server")]
1745pub mod query_server {
1746    #![allow(
1747        unused_variables,
1748        dead_code,
1749        missing_docs,
1750        clippy::wildcard_imports,
1751        clippy::let_unit_value,
1752    )]
1753    use tonic::codegen::*;
1754    /// Generated trait containing gRPC methods that should be implemented for use with QueryServer.
1755    #[async_trait]
1756    pub trait Query: std::marker::Send + std::marker::Sync + 'static {
1757        /// IncentivizedPackets returns all incentivized packets and their associated fees
1758        async fn incentivized_packets(
1759            &self,
1760            request: tonic::Request<super::QueryIncentivizedPacketsRequest>,
1761        ) -> std::result::Result<
1762            tonic::Response<super::QueryIncentivizedPacketsResponse>,
1763            tonic::Status,
1764        >;
1765        /// IncentivizedPacket returns all packet fees for a packet given its identifier
1766        async fn incentivized_packet(
1767            &self,
1768            request: tonic::Request<super::QueryIncentivizedPacketRequest>,
1769        ) -> std::result::Result<
1770            tonic::Response<super::QueryIncentivizedPacketResponse>,
1771            tonic::Status,
1772        >;
1773        /// Gets all incentivized packets for a specific channel
1774        async fn incentivized_packets_for_channel(
1775            &self,
1776            request: tonic::Request<super::QueryIncentivizedPacketsForChannelRequest>,
1777        ) -> std::result::Result<
1778            tonic::Response<super::QueryIncentivizedPacketsForChannelResponse>,
1779            tonic::Status,
1780        >;
1781        /// TotalRecvFees returns the total receive fees for a packet given its identifier
1782        async fn total_recv_fees(
1783            &self,
1784            request: tonic::Request<super::QueryTotalRecvFeesRequest>,
1785        ) -> std::result::Result<
1786            tonic::Response<super::QueryTotalRecvFeesResponse>,
1787            tonic::Status,
1788        >;
1789        /// TotalAckFees returns the total acknowledgement fees for a packet given its identifier
1790        async fn total_ack_fees(
1791            &self,
1792            request: tonic::Request<super::QueryTotalAckFeesRequest>,
1793        ) -> std::result::Result<
1794            tonic::Response<super::QueryTotalAckFeesResponse>,
1795            tonic::Status,
1796        >;
1797        /// TotalTimeoutFees returns the total timeout fees for a packet given its identifier
1798        async fn total_timeout_fees(
1799            &self,
1800            request: tonic::Request<super::QueryTotalTimeoutFeesRequest>,
1801        ) -> std::result::Result<
1802            tonic::Response<super::QueryTotalTimeoutFeesResponse>,
1803            tonic::Status,
1804        >;
1805        /// Payee returns the registered payee address for a specific channel given the relayer address
1806        async fn payee(
1807            &self,
1808            request: tonic::Request<super::QueryPayeeRequest>,
1809        ) -> std::result::Result<
1810            tonic::Response<super::QueryPayeeResponse>,
1811            tonic::Status,
1812        >;
1813        /// CounterpartyPayee returns the registered counterparty payee for forward relaying
1814        async fn counterparty_payee(
1815            &self,
1816            request: tonic::Request<super::QueryCounterpartyPayeeRequest>,
1817        ) -> std::result::Result<
1818            tonic::Response<super::QueryCounterpartyPayeeResponse>,
1819            tonic::Status,
1820        >;
1821        /// FeeEnabledChannels returns a list of all fee enabled channels
1822        async fn fee_enabled_channels(
1823            &self,
1824            request: tonic::Request<super::QueryFeeEnabledChannelsRequest>,
1825        ) -> std::result::Result<
1826            tonic::Response<super::QueryFeeEnabledChannelsResponse>,
1827            tonic::Status,
1828        >;
1829        /// FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel
1830        async fn fee_enabled_channel(
1831            &self,
1832            request: tonic::Request<super::QueryFeeEnabledChannelRequest>,
1833        ) -> std::result::Result<
1834            tonic::Response<super::QueryFeeEnabledChannelResponse>,
1835            tonic::Status,
1836        >;
1837    }
1838    /// Query defines the ICS29 gRPC querier service.
1839    #[derive(Debug)]
1840    pub struct QueryServer<T> {
1841        inner: Arc<T>,
1842        accept_compression_encodings: EnabledCompressionEncodings,
1843        send_compression_encodings: EnabledCompressionEncodings,
1844        max_decoding_message_size: Option<usize>,
1845        max_encoding_message_size: Option<usize>,
1846    }
1847    impl<T> QueryServer<T> {
1848        pub fn new(inner: T) -> Self {
1849            Self::from_arc(Arc::new(inner))
1850        }
1851        pub fn from_arc(inner: Arc<T>) -> Self {
1852            Self {
1853                inner,
1854                accept_compression_encodings: Default::default(),
1855                send_compression_encodings: Default::default(),
1856                max_decoding_message_size: None,
1857                max_encoding_message_size: None,
1858            }
1859        }
1860        pub fn with_interceptor<F>(
1861            inner: T,
1862            interceptor: F,
1863        ) -> InterceptedService<Self, F>
1864        where
1865            F: tonic::service::Interceptor,
1866        {
1867            InterceptedService::new(Self::new(inner), interceptor)
1868        }
1869        /// Enable decompressing requests with the given encoding.
1870        #[must_use]
1871        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1872            self.accept_compression_encodings.enable(encoding);
1873            self
1874        }
1875        /// Compress responses with the given encoding, if the client supports it.
1876        #[must_use]
1877        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1878            self.send_compression_encodings.enable(encoding);
1879            self
1880        }
1881        /// Limits the maximum size of a decoded message.
1882        ///
1883        /// Default: `4MB`
1884        #[must_use]
1885        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1886            self.max_decoding_message_size = Some(limit);
1887            self
1888        }
1889        /// Limits the maximum size of an encoded message.
1890        ///
1891        /// Default: `usize::MAX`
1892        #[must_use]
1893        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1894            self.max_encoding_message_size = Some(limit);
1895            self
1896        }
1897    }
1898    impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
1899    where
1900        T: Query,
1901        B: Body + std::marker::Send + 'static,
1902        B::Error: Into<StdError> + std::marker::Send + 'static,
1903    {
1904        type Response = http::Response<tonic::body::Body>;
1905        type Error = std::convert::Infallible;
1906        type Future = BoxFuture<Self::Response, Self::Error>;
1907        fn poll_ready(
1908            &mut self,
1909            _cx: &mut Context<'_>,
1910        ) -> Poll<std::result::Result<(), Self::Error>> {
1911            Poll::Ready(Ok(()))
1912        }
1913        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1914            match req.uri().path() {
1915                "/ibc.applications.fee.v1.Query/IncentivizedPackets" => {
1916                    #[allow(non_camel_case_types)]
1917                    struct IncentivizedPacketsSvc<T: Query>(pub Arc<T>);
1918                    impl<
1919                        T: Query,
1920                    > tonic::server::UnaryService<super::QueryIncentivizedPacketsRequest>
1921                    for IncentivizedPacketsSvc<T> {
1922                        type Response = super::QueryIncentivizedPacketsResponse;
1923                        type Future = BoxFuture<
1924                            tonic::Response<Self::Response>,
1925                            tonic::Status,
1926                        >;
1927                        fn call(
1928                            &mut self,
1929                            request: tonic::Request<
1930                                super::QueryIncentivizedPacketsRequest,
1931                            >,
1932                        ) -> Self::Future {
1933                            let inner = Arc::clone(&self.0);
1934                            let fut = async move {
1935                                <T as Query>::incentivized_packets(&inner, request).await
1936                            };
1937                            Box::pin(fut)
1938                        }
1939                    }
1940                    let accept_compression_encodings = self.accept_compression_encodings;
1941                    let send_compression_encodings = self.send_compression_encodings;
1942                    let max_decoding_message_size = self.max_decoding_message_size;
1943                    let max_encoding_message_size = self.max_encoding_message_size;
1944                    let inner = self.inner.clone();
1945                    let fut = async move {
1946                        let method = IncentivizedPacketsSvc(inner);
1947                        let codec = tonic::codec::ProstCodec::default();
1948                        let mut grpc = tonic::server::Grpc::new(codec)
1949                            .apply_compression_config(
1950                                accept_compression_encodings,
1951                                send_compression_encodings,
1952                            )
1953                            .apply_max_message_size_config(
1954                                max_decoding_message_size,
1955                                max_encoding_message_size,
1956                            );
1957                        let res = grpc.unary(method, req).await;
1958                        Ok(res)
1959                    };
1960                    Box::pin(fut)
1961                }
1962                "/ibc.applications.fee.v1.Query/IncentivizedPacket" => {
1963                    #[allow(non_camel_case_types)]
1964                    struct IncentivizedPacketSvc<T: Query>(pub Arc<T>);
1965                    impl<
1966                        T: Query,
1967                    > tonic::server::UnaryService<super::QueryIncentivizedPacketRequest>
1968                    for IncentivizedPacketSvc<T> {
1969                        type Response = super::QueryIncentivizedPacketResponse;
1970                        type Future = BoxFuture<
1971                            tonic::Response<Self::Response>,
1972                            tonic::Status,
1973                        >;
1974                        fn call(
1975                            &mut self,
1976                            request: tonic::Request<
1977                                super::QueryIncentivizedPacketRequest,
1978                            >,
1979                        ) -> Self::Future {
1980                            let inner = Arc::clone(&self.0);
1981                            let fut = async move {
1982                                <T as Query>::incentivized_packet(&inner, request).await
1983                            };
1984                            Box::pin(fut)
1985                        }
1986                    }
1987                    let accept_compression_encodings = self.accept_compression_encodings;
1988                    let send_compression_encodings = self.send_compression_encodings;
1989                    let max_decoding_message_size = self.max_decoding_message_size;
1990                    let max_encoding_message_size = self.max_encoding_message_size;
1991                    let inner = self.inner.clone();
1992                    let fut = async move {
1993                        let method = IncentivizedPacketSvc(inner);
1994                        let codec = tonic::codec::ProstCodec::default();
1995                        let mut grpc = tonic::server::Grpc::new(codec)
1996                            .apply_compression_config(
1997                                accept_compression_encodings,
1998                                send_compression_encodings,
1999                            )
2000                            .apply_max_message_size_config(
2001                                max_decoding_message_size,
2002                                max_encoding_message_size,
2003                            );
2004                        let res = grpc.unary(method, req).await;
2005                        Ok(res)
2006                    };
2007                    Box::pin(fut)
2008                }
2009                "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel" => {
2010                    #[allow(non_camel_case_types)]
2011                    struct IncentivizedPacketsForChannelSvc<T: Query>(pub Arc<T>);
2012                    impl<
2013                        T: Query,
2014                    > tonic::server::UnaryService<
2015                        super::QueryIncentivizedPacketsForChannelRequest,
2016                    > for IncentivizedPacketsForChannelSvc<T> {
2017                        type Response = super::QueryIncentivizedPacketsForChannelResponse;
2018                        type Future = BoxFuture<
2019                            tonic::Response<Self::Response>,
2020                            tonic::Status,
2021                        >;
2022                        fn call(
2023                            &mut self,
2024                            request: tonic::Request<
2025                                super::QueryIncentivizedPacketsForChannelRequest,
2026                            >,
2027                        ) -> Self::Future {
2028                            let inner = Arc::clone(&self.0);
2029                            let fut = async move {
2030                                <T as Query>::incentivized_packets_for_channel(
2031                                        &inner,
2032                                        request,
2033                                    )
2034                                    .await
2035                            };
2036                            Box::pin(fut)
2037                        }
2038                    }
2039                    let accept_compression_encodings = self.accept_compression_encodings;
2040                    let send_compression_encodings = self.send_compression_encodings;
2041                    let max_decoding_message_size = self.max_decoding_message_size;
2042                    let max_encoding_message_size = self.max_encoding_message_size;
2043                    let inner = self.inner.clone();
2044                    let fut = async move {
2045                        let method = IncentivizedPacketsForChannelSvc(inner);
2046                        let codec = tonic::codec::ProstCodec::default();
2047                        let mut grpc = tonic::server::Grpc::new(codec)
2048                            .apply_compression_config(
2049                                accept_compression_encodings,
2050                                send_compression_encodings,
2051                            )
2052                            .apply_max_message_size_config(
2053                                max_decoding_message_size,
2054                                max_encoding_message_size,
2055                            );
2056                        let res = grpc.unary(method, req).await;
2057                        Ok(res)
2058                    };
2059                    Box::pin(fut)
2060                }
2061                "/ibc.applications.fee.v1.Query/TotalRecvFees" => {
2062                    #[allow(non_camel_case_types)]
2063                    struct TotalRecvFeesSvc<T: Query>(pub Arc<T>);
2064                    impl<
2065                        T: Query,
2066                    > tonic::server::UnaryService<super::QueryTotalRecvFeesRequest>
2067                    for TotalRecvFeesSvc<T> {
2068                        type Response = super::QueryTotalRecvFeesResponse;
2069                        type Future = BoxFuture<
2070                            tonic::Response<Self::Response>,
2071                            tonic::Status,
2072                        >;
2073                        fn call(
2074                            &mut self,
2075                            request: tonic::Request<super::QueryTotalRecvFeesRequest>,
2076                        ) -> Self::Future {
2077                            let inner = Arc::clone(&self.0);
2078                            let fut = async move {
2079                                <T as Query>::total_recv_fees(&inner, request).await
2080                            };
2081                            Box::pin(fut)
2082                        }
2083                    }
2084                    let accept_compression_encodings = self.accept_compression_encodings;
2085                    let send_compression_encodings = self.send_compression_encodings;
2086                    let max_decoding_message_size = self.max_decoding_message_size;
2087                    let max_encoding_message_size = self.max_encoding_message_size;
2088                    let inner = self.inner.clone();
2089                    let fut = async move {
2090                        let method = TotalRecvFeesSvc(inner);
2091                        let codec = tonic::codec::ProstCodec::default();
2092                        let mut grpc = tonic::server::Grpc::new(codec)
2093                            .apply_compression_config(
2094                                accept_compression_encodings,
2095                                send_compression_encodings,
2096                            )
2097                            .apply_max_message_size_config(
2098                                max_decoding_message_size,
2099                                max_encoding_message_size,
2100                            );
2101                        let res = grpc.unary(method, req).await;
2102                        Ok(res)
2103                    };
2104                    Box::pin(fut)
2105                }
2106                "/ibc.applications.fee.v1.Query/TotalAckFees" => {
2107                    #[allow(non_camel_case_types)]
2108                    struct TotalAckFeesSvc<T: Query>(pub Arc<T>);
2109                    impl<
2110                        T: Query,
2111                    > tonic::server::UnaryService<super::QueryTotalAckFeesRequest>
2112                    for TotalAckFeesSvc<T> {
2113                        type Response = super::QueryTotalAckFeesResponse;
2114                        type Future = BoxFuture<
2115                            tonic::Response<Self::Response>,
2116                            tonic::Status,
2117                        >;
2118                        fn call(
2119                            &mut self,
2120                            request: tonic::Request<super::QueryTotalAckFeesRequest>,
2121                        ) -> Self::Future {
2122                            let inner = Arc::clone(&self.0);
2123                            let fut = async move {
2124                                <T as Query>::total_ack_fees(&inner, request).await
2125                            };
2126                            Box::pin(fut)
2127                        }
2128                    }
2129                    let accept_compression_encodings = self.accept_compression_encodings;
2130                    let send_compression_encodings = self.send_compression_encodings;
2131                    let max_decoding_message_size = self.max_decoding_message_size;
2132                    let max_encoding_message_size = self.max_encoding_message_size;
2133                    let inner = self.inner.clone();
2134                    let fut = async move {
2135                        let method = TotalAckFeesSvc(inner);
2136                        let codec = tonic::codec::ProstCodec::default();
2137                        let mut grpc = tonic::server::Grpc::new(codec)
2138                            .apply_compression_config(
2139                                accept_compression_encodings,
2140                                send_compression_encodings,
2141                            )
2142                            .apply_max_message_size_config(
2143                                max_decoding_message_size,
2144                                max_encoding_message_size,
2145                            );
2146                        let res = grpc.unary(method, req).await;
2147                        Ok(res)
2148                    };
2149                    Box::pin(fut)
2150                }
2151                "/ibc.applications.fee.v1.Query/TotalTimeoutFees" => {
2152                    #[allow(non_camel_case_types)]
2153                    struct TotalTimeoutFeesSvc<T: Query>(pub Arc<T>);
2154                    impl<
2155                        T: Query,
2156                    > tonic::server::UnaryService<super::QueryTotalTimeoutFeesRequest>
2157                    for TotalTimeoutFeesSvc<T> {
2158                        type Response = super::QueryTotalTimeoutFeesResponse;
2159                        type Future = BoxFuture<
2160                            tonic::Response<Self::Response>,
2161                            tonic::Status,
2162                        >;
2163                        fn call(
2164                            &mut self,
2165                            request: tonic::Request<super::QueryTotalTimeoutFeesRequest>,
2166                        ) -> Self::Future {
2167                            let inner = Arc::clone(&self.0);
2168                            let fut = async move {
2169                                <T as Query>::total_timeout_fees(&inner, request).await
2170                            };
2171                            Box::pin(fut)
2172                        }
2173                    }
2174                    let accept_compression_encodings = self.accept_compression_encodings;
2175                    let send_compression_encodings = self.send_compression_encodings;
2176                    let max_decoding_message_size = self.max_decoding_message_size;
2177                    let max_encoding_message_size = self.max_encoding_message_size;
2178                    let inner = self.inner.clone();
2179                    let fut = async move {
2180                        let method = TotalTimeoutFeesSvc(inner);
2181                        let codec = tonic::codec::ProstCodec::default();
2182                        let mut grpc = tonic::server::Grpc::new(codec)
2183                            .apply_compression_config(
2184                                accept_compression_encodings,
2185                                send_compression_encodings,
2186                            )
2187                            .apply_max_message_size_config(
2188                                max_decoding_message_size,
2189                                max_encoding_message_size,
2190                            );
2191                        let res = grpc.unary(method, req).await;
2192                        Ok(res)
2193                    };
2194                    Box::pin(fut)
2195                }
2196                "/ibc.applications.fee.v1.Query/Payee" => {
2197                    #[allow(non_camel_case_types)]
2198                    struct PayeeSvc<T: Query>(pub Arc<T>);
2199                    impl<T: Query> tonic::server::UnaryService<super::QueryPayeeRequest>
2200                    for PayeeSvc<T> {
2201                        type Response = super::QueryPayeeResponse;
2202                        type Future = BoxFuture<
2203                            tonic::Response<Self::Response>,
2204                            tonic::Status,
2205                        >;
2206                        fn call(
2207                            &mut self,
2208                            request: tonic::Request<super::QueryPayeeRequest>,
2209                        ) -> Self::Future {
2210                            let inner = Arc::clone(&self.0);
2211                            let fut = async move {
2212                                <T as Query>::payee(&inner, request).await
2213                            };
2214                            Box::pin(fut)
2215                        }
2216                    }
2217                    let accept_compression_encodings = self.accept_compression_encodings;
2218                    let send_compression_encodings = self.send_compression_encodings;
2219                    let max_decoding_message_size = self.max_decoding_message_size;
2220                    let max_encoding_message_size = self.max_encoding_message_size;
2221                    let inner = self.inner.clone();
2222                    let fut = async move {
2223                        let method = PayeeSvc(inner);
2224                        let codec = tonic::codec::ProstCodec::default();
2225                        let mut grpc = tonic::server::Grpc::new(codec)
2226                            .apply_compression_config(
2227                                accept_compression_encodings,
2228                                send_compression_encodings,
2229                            )
2230                            .apply_max_message_size_config(
2231                                max_decoding_message_size,
2232                                max_encoding_message_size,
2233                            );
2234                        let res = grpc.unary(method, req).await;
2235                        Ok(res)
2236                    };
2237                    Box::pin(fut)
2238                }
2239                "/ibc.applications.fee.v1.Query/CounterpartyPayee" => {
2240                    #[allow(non_camel_case_types)]
2241                    struct CounterpartyPayeeSvc<T: Query>(pub Arc<T>);
2242                    impl<
2243                        T: Query,
2244                    > tonic::server::UnaryService<super::QueryCounterpartyPayeeRequest>
2245                    for CounterpartyPayeeSvc<T> {
2246                        type Response = super::QueryCounterpartyPayeeResponse;
2247                        type Future = BoxFuture<
2248                            tonic::Response<Self::Response>,
2249                            tonic::Status,
2250                        >;
2251                        fn call(
2252                            &mut self,
2253                            request: tonic::Request<super::QueryCounterpartyPayeeRequest>,
2254                        ) -> Self::Future {
2255                            let inner = Arc::clone(&self.0);
2256                            let fut = async move {
2257                                <T as Query>::counterparty_payee(&inner, request).await
2258                            };
2259                            Box::pin(fut)
2260                        }
2261                    }
2262                    let accept_compression_encodings = self.accept_compression_encodings;
2263                    let send_compression_encodings = self.send_compression_encodings;
2264                    let max_decoding_message_size = self.max_decoding_message_size;
2265                    let max_encoding_message_size = self.max_encoding_message_size;
2266                    let inner = self.inner.clone();
2267                    let fut = async move {
2268                        let method = CounterpartyPayeeSvc(inner);
2269                        let codec = tonic::codec::ProstCodec::default();
2270                        let mut grpc = tonic::server::Grpc::new(codec)
2271                            .apply_compression_config(
2272                                accept_compression_encodings,
2273                                send_compression_encodings,
2274                            )
2275                            .apply_max_message_size_config(
2276                                max_decoding_message_size,
2277                                max_encoding_message_size,
2278                            );
2279                        let res = grpc.unary(method, req).await;
2280                        Ok(res)
2281                    };
2282                    Box::pin(fut)
2283                }
2284                "/ibc.applications.fee.v1.Query/FeeEnabledChannels" => {
2285                    #[allow(non_camel_case_types)]
2286                    struct FeeEnabledChannelsSvc<T: Query>(pub Arc<T>);
2287                    impl<
2288                        T: Query,
2289                    > tonic::server::UnaryService<super::QueryFeeEnabledChannelsRequest>
2290                    for FeeEnabledChannelsSvc<T> {
2291                        type Response = super::QueryFeeEnabledChannelsResponse;
2292                        type Future = BoxFuture<
2293                            tonic::Response<Self::Response>,
2294                            tonic::Status,
2295                        >;
2296                        fn call(
2297                            &mut self,
2298                            request: tonic::Request<
2299                                super::QueryFeeEnabledChannelsRequest,
2300                            >,
2301                        ) -> Self::Future {
2302                            let inner = Arc::clone(&self.0);
2303                            let fut = async move {
2304                                <T as Query>::fee_enabled_channels(&inner, request).await
2305                            };
2306                            Box::pin(fut)
2307                        }
2308                    }
2309                    let accept_compression_encodings = self.accept_compression_encodings;
2310                    let send_compression_encodings = self.send_compression_encodings;
2311                    let max_decoding_message_size = self.max_decoding_message_size;
2312                    let max_encoding_message_size = self.max_encoding_message_size;
2313                    let inner = self.inner.clone();
2314                    let fut = async move {
2315                        let method = FeeEnabledChannelsSvc(inner);
2316                        let codec = tonic::codec::ProstCodec::default();
2317                        let mut grpc = tonic::server::Grpc::new(codec)
2318                            .apply_compression_config(
2319                                accept_compression_encodings,
2320                                send_compression_encodings,
2321                            )
2322                            .apply_max_message_size_config(
2323                                max_decoding_message_size,
2324                                max_encoding_message_size,
2325                            );
2326                        let res = grpc.unary(method, req).await;
2327                        Ok(res)
2328                    };
2329                    Box::pin(fut)
2330                }
2331                "/ibc.applications.fee.v1.Query/FeeEnabledChannel" => {
2332                    #[allow(non_camel_case_types)]
2333                    struct FeeEnabledChannelSvc<T: Query>(pub Arc<T>);
2334                    impl<
2335                        T: Query,
2336                    > tonic::server::UnaryService<super::QueryFeeEnabledChannelRequest>
2337                    for FeeEnabledChannelSvc<T> {
2338                        type Response = super::QueryFeeEnabledChannelResponse;
2339                        type Future = BoxFuture<
2340                            tonic::Response<Self::Response>,
2341                            tonic::Status,
2342                        >;
2343                        fn call(
2344                            &mut self,
2345                            request: tonic::Request<super::QueryFeeEnabledChannelRequest>,
2346                        ) -> Self::Future {
2347                            let inner = Arc::clone(&self.0);
2348                            let fut = async move {
2349                                <T as Query>::fee_enabled_channel(&inner, request).await
2350                            };
2351                            Box::pin(fut)
2352                        }
2353                    }
2354                    let accept_compression_encodings = self.accept_compression_encodings;
2355                    let send_compression_encodings = self.send_compression_encodings;
2356                    let max_decoding_message_size = self.max_decoding_message_size;
2357                    let max_encoding_message_size = self.max_encoding_message_size;
2358                    let inner = self.inner.clone();
2359                    let fut = async move {
2360                        let method = FeeEnabledChannelSvc(inner);
2361                        let codec = tonic::codec::ProstCodec::default();
2362                        let mut grpc = tonic::server::Grpc::new(codec)
2363                            .apply_compression_config(
2364                                accept_compression_encodings,
2365                                send_compression_encodings,
2366                            )
2367                            .apply_max_message_size_config(
2368                                max_decoding_message_size,
2369                                max_encoding_message_size,
2370                            );
2371                        let res = grpc.unary(method, req).await;
2372                        Ok(res)
2373                    };
2374                    Box::pin(fut)
2375                }
2376                _ => {
2377                    Box::pin(async move {
2378                        let mut response = http::Response::new(
2379                            tonic::body::Body::default(),
2380                        );
2381                        let headers = response.headers_mut();
2382                        headers
2383                            .insert(
2384                                tonic::Status::GRPC_STATUS,
2385                                (tonic::Code::Unimplemented as i32).into(),
2386                            );
2387                        headers
2388                            .insert(
2389                                http::header::CONTENT_TYPE,
2390                                tonic::metadata::GRPC_CONTENT_TYPE,
2391                            );
2392                        Ok(response)
2393                    })
2394                }
2395            }
2396        }
2397    }
2398    impl<T> Clone for QueryServer<T> {
2399        fn clone(&self) -> Self {
2400            let inner = self.inner.clone();
2401            Self {
2402                inner,
2403                accept_compression_encodings: self.accept_compression_encodings,
2404                send_compression_encodings: self.send_compression_encodings,
2405                max_decoding_message_size: self.max_decoding_message_size,
2406                max_encoding_message_size: self.max_encoding_message_size,
2407            }
2408        }
2409    }
2410    /// Generated gRPC service name
2411    pub const SERVICE_NAME: &str = "ibc.applications.fee.v1.Query";
2412    impl<T> tonic::server::NamedService for QueryServer<T> {
2413        const NAME: &'static str = SERVICE_NAME;
2414    }
2415}
2416/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring
2417/// See ICS004: <https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning>
2418#[derive(Clone, PartialEq, ::prost::Message)]
2419pub struct Metadata {
2420    /// fee_version defines the ICS29 fee version
2421    #[prost(string, tag = "1")]
2422    pub fee_version: ::prost::alloc::string::String,
2423    /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring
2424    #[prost(string, tag = "2")]
2425    pub app_version: ::prost::alloc::string::String,
2426}
2427impl ::prost::Name for Metadata {
2428    const NAME: &'static str = "Metadata";
2429    const PACKAGE: &'static str = "ibc.applications.fee.v1";
2430    fn full_name() -> ::prost::alloc::string::String {
2431        "ibc.applications.fee.v1.Metadata".into()
2432    }
2433    fn type_url() -> ::prost::alloc::string::String {
2434        "/ibc.applications.fee.v1.Metadata".into()
2435    }
2436}