#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fee {
#[prost(message, repeated, tag = "1")]
pub recv_fee: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
#[prost(message, repeated, tag = "2")]
pub ack_fee: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
#[prost(message, repeated, tag = "3")]
pub timeout_fee: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
}
impl ::prost::Name for Fee {
const NAME: &'static str = "Fee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.Fee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.Fee".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PacketFee {
#[prost(message, optional, tag = "1")]
pub fee: ::core::option::Option<Fee>,
#[prost(string, tag = "2")]
pub refund_address: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for PacketFee {
const NAME: &'static str = "PacketFee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.PacketFee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.PacketFee".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PacketFees {
#[prost(message, repeated, tag = "1")]
pub packet_fees: ::prost::alloc::vec::Vec<PacketFee>,
}
impl ::prost::Name for PacketFees {
const NAME: &'static str = "PacketFees";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.PacketFees".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.PacketFees".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedPacketFees {
#[prost(message, optional, tag = "1")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
#[prost(message, repeated, tag = "2")]
pub packet_fees: ::prost::alloc::vec::Vec<PacketFee>,
}
impl ::prost::Name for IdentifiedPacketFees {
const NAME: &'static str = "IdentifiedPacketFees";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.IdentifiedPacketFees".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.IdentifiedPacketFees".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRegisterPayee {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub relayer: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub payee: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgRegisterPayee {
const NAME: &'static str = "MsgRegisterPayee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgRegisterPayee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgRegisterPayee".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgRegisterPayeeResponse {}
impl ::prost::Name for MsgRegisterPayeeResponse {
const NAME: &'static str = "MsgRegisterPayeeResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgRegisterPayeeResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgRegisterPayeeResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRegisterCounterpartyPayee {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub relayer: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub counterparty_payee: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgRegisterCounterpartyPayee {
const NAME: &'static str = "MsgRegisterCounterpartyPayee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgRegisterCounterpartyPayee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgRegisterCounterpartyPayeeResponse {}
impl ::prost::Name for MsgRegisterCounterpartyPayeeResponse {
const NAME: &'static str = "MsgRegisterCounterpartyPayeeResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgPayPacketFee {
#[prost(message, optional, tag = "1")]
pub fee: ::core::option::Option<Fee>,
#[prost(string, tag = "2")]
pub source_port_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub source_channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for MsgPayPacketFee {
const NAME: &'static str = "MsgPayPacketFee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgPayPacketFee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgPayPacketFee".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgPayPacketFeeResponse {}
impl ::prost::Name for MsgPayPacketFeeResponse {
const NAME: &'static str = "MsgPayPacketFeeResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgPayPacketFeeResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgPayPacketFeeResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgPayPacketFeeAsync {
#[prost(message, optional, tag = "1")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
#[prost(message, optional, tag = "2")]
pub packet_fee: ::core::option::Option<PacketFee>,
}
impl ::prost::Name for MsgPayPacketFeeAsync {
const NAME: &'static str = "MsgPayPacketFeeAsync";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgPayPacketFeeAsync".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgPayPacketFeeAsync".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgPayPacketFeeAsyncResponse {}
impl ::prost::Name for MsgPayPacketFeeAsyncResponse {
const NAME: &'static str = "MsgPayPacketFeeAsyncResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse".into()
}
}
#[cfg(feature = "client")]
pub mod msg_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "transport")]
impl MsgClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MsgClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn register_payee(
&mut self,
request: impl tonic::IntoRequest<super::MsgRegisterPayee>,
) -> std::result::Result<
tonic::Response<super::MsgRegisterPayeeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Msg/RegisterPayee",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "RegisterPayee"));
self.inner.unary(req, path, codec).await
}
pub async fn register_counterparty_payee(
&mut self,
request: impl tonic::IntoRequest<super::MsgRegisterCounterpartyPayee>,
) -> std::result::Result<
tonic::Response<super::MsgRegisterCounterpartyPayeeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"ibc.applications.fee.v1.Msg",
"RegisterCounterpartyPayee",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn pay_packet_fee(
&mut self,
request: impl tonic::IntoRequest<super::MsgPayPacketFee>,
) -> std::result::Result<
tonic::Response<super::MsgPayPacketFeeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Msg/PayPacketFee",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFee"));
self.inner.unary(req, path, codec).await
}
pub async fn pay_packet_fee_async(
&mut self,
request: impl tonic::IntoRequest<super::MsgPayPacketFeeAsync>,
) -> std::result::Result<
tonic::Response<super::MsgPayPacketFeeAsyncResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Msg/PayPacketFeeAsync",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFeeAsync"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "server")]
pub mod msg_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Msg: std::marker::Send + std::marker::Sync + 'static {
async fn register_payee(
&self,
request: tonic::Request<super::MsgRegisterPayee>,
) -> std::result::Result<
tonic::Response<super::MsgRegisterPayeeResponse>,
tonic::Status,
>;
async fn register_counterparty_payee(
&self,
request: tonic::Request<super::MsgRegisterCounterpartyPayee>,
) -> std::result::Result<
tonic::Response<super::MsgRegisterCounterpartyPayeeResponse>,
tonic::Status,
>;
async fn pay_packet_fee(
&self,
request: tonic::Request<super::MsgPayPacketFee>,
) -> std::result::Result<
tonic::Response<super::MsgPayPacketFeeResponse>,
tonic::Status,
>;
async fn pay_packet_fee_async(
&self,
request: tonic::Request<super::MsgPayPacketFeeAsync>,
) -> std::result::Result<
tonic::Response<super::MsgPayPacketFeeAsyncResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct MsgServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> MsgServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
where
T: Msg,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/ibc.applications.fee.v1.Msg/RegisterPayee" => {
#[allow(non_camel_case_types)]
struct RegisterPayeeSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgRegisterPayee>
for RegisterPayeeSvc<T> {
type Response = super::MsgRegisterPayeeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgRegisterPayee>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::register_payee(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RegisterPayeeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee" => {
#[allow(non_camel_case_types)]
struct RegisterCounterpartyPayeeSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgRegisterCounterpartyPayee>
for RegisterCounterpartyPayeeSvc<T> {
type Response = super::MsgRegisterCounterpartyPayeeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgRegisterCounterpartyPayee>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::register_counterparty_payee(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RegisterCounterpartyPayeeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Msg/PayPacketFee" => {
#[allow(non_camel_case_types)]
struct PayPacketFeeSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgPayPacketFee>
for PayPacketFeeSvc<T> {
type Response = super::MsgPayPacketFeeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgPayPacketFee>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::pay_packet_fee(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = PayPacketFeeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Msg/PayPacketFeeAsync" => {
#[allow(non_camel_case_types)]
struct PayPacketFeeAsyncSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgPayPacketFeeAsync>
for PayPacketFeeAsyncSvc<T> {
type Response = super::MsgPayPacketFeeAsyncResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgPayPacketFeeAsync>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::pay_packet_fee_async(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = PayPacketFeeAsyncSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for MsgServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "ibc.applications.fee.v1.Msg";
impl<T> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IncentivizedAcknowledgement {
#[prost(bytes = "vec", tag = "1")]
pub app_acknowledgement: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub forward_relayer_address: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub underlying_app_success: bool,
}
impl ::prost::Name for IncentivizedAcknowledgement {
const NAME: &'static str = "IncentivizedAcknowledgement";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.IncentivizedAcknowledgement".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.IncentivizedAcknowledgement".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, repeated, tag = "1")]
pub identified_fees: ::prost::alloc::vec::Vec<IdentifiedPacketFees>,
#[prost(message, repeated, tag = "2")]
pub fee_enabled_channels: ::prost::alloc::vec::Vec<FeeEnabledChannel>,
#[prost(message, repeated, tag = "3")]
pub registered_payees: ::prost::alloc::vec::Vec<RegisteredPayee>,
#[prost(message, repeated, tag = "4")]
pub registered_counterparty_payees: ::prost::alloc::vec::Vec<
RegisteredCounterpartyPayee,
>,
#[prost(message, repeated, tag = "5")]
pub forward_relayers: ::prost::alloc::vec::Vec<ForwardRelayerAddress>,
}
impl ::prost::Name for GenesisState {
const NAME: &'static str = "GenesisState";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.GenesisState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.GenesisState".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeeEnabledChannel {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for FeeEnabledChannel {
const NAME: &'static str = "FeeEnabledChannel";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.FeeEnabledChannel".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.FeeEnabledChannel".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisteredPayee {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub relayer: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub payee: ::prost::alloc::string::String,
}
impl ::prost::Name for RegisteredPayee {
const NAME: &'static str = "RegisteredPayee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.RegisteredPayee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.RegisteredPayee".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisteredCounterpartyPayee {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub relayer: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub counterparty_payee: ::prost::alloc::string::String,
}
impl ::prost::Name for RegisteredCounterpartyPayee {
const NAME: &'static str = "RegisteredCounterpartyPayee";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.RegisteredCounterpartyPayee".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.RegisteredCounterpartyPayee".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForwardRelayerAddress {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
}
impl ::prost::Name for ForwardRelayerAddress {
const NAME: &'static str = "ForwardRelayerAddress";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.ForwardRelayerAddress".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.ForwardRelayerAddress".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIncentivizedPacketsRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
#[prost(uint64, tag = "2")]
pub query_height: u64,
}
impl ::prost::Name for QueryIncentivizedPacketsRequest {
const NAME: &'static str = "QueryIncentivizedPacketsRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryIncentivizedPacketsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryIncentivizedPacketsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIncentivizedPacketsResponse {
#[prost(message, repeated, tag = "1")]
pub incentivized_packets: ::prost::alloc::vec::Vec<IdentifiedPacketFees>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for QueryIncentivizedPacketsResponse {
const NAME: &'static str = "QueryIncentivizedPacketsResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryIncentivizedPacketsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryIncentivizedPacketsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIncentivizedPacketRequest {
#[prost(message, optional, tag = "1")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
#[prost(uint64, tag = "2")]
pub query_height: u64,
}
impl ::prost::Name for QueryIncentivizedPacketRequest {
const NAME: &'static str = "QueryIncentivizedPacketRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryIncentivizedPacketRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryIncentivizedPacketRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIncentivizedPacketResponse {
#[prost(message, optional, tag = "1")]
pub incentivized_packet: ::core::option::Option<IdentifiedPacketFees>,
}
impl ::prost::Name for QueryIncentivizedPacketResponse {
const NAME: &'static str = "QueryIncentivizedPacketResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryIncentivizedPacketResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryIncentivizedPacketResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIncentivizedPacketsForChannelRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
#[prost(string, tag = "2")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub channel_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub query_height: u64,
}
impl ::prost::Name for QueryIncentivizedPacketsForChannelRequest {
const NAME: &'static str = "QueryIncentivizedPacketsForChannelRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryIncentivizedPacketsForChannelResponse {
#[prost(message, repeated, tag = "1")]
pub incentivized_packets: ::prost::alloc::vec::Vec<IdentifiedPacketFees>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for QueryIncentivizedPacketsForChannelResponse {
const NAME: &'static str = "QueryIncentivizedPacketsForChannelResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalRecvFeesRequest {
#[prost(message, optional, tag = "1")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
}
impl ::prost::Name for QueryTotalRecvFeesRequest {
const NAME: &'static str = "QueryTotalRecvFeesRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryTotalRecvFeesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryTotalRecvFeesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalRecvFeesResponse {
#[prost(message, repeated, tag = "1")]
pub recv_fees: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
}
impl ::prost::Name for QueryTotalRecvFeesResponse {
const NAME: &'static str = "QueryTotalRecvFeesResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryTotalRecvFeesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryTotalRecvFeesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalAckFeesRequest {
#[prost(message, optional, tag = "1")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
}
impl ::prost::Name for QueryTotalAckFeesRequest {
const NAME: &'static str = "QueryTotalAckFeesRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryTotalAckFeesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryTotalAckFeesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalAckFeesResponse {
#[prost(message, repeated, tag = "1")]
pub ack_fees: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
}
impl ::prost::Name for QueryTotalAckFeesResponse {
const NAME: &'static str = "QueryTotalAckFeesResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryTotalAckFeesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryTotalAckFeesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalTimeoutFeesRequest {
#[prost(message, optional, tag = "1")]
pub packet_id: ::core::option::Option<
super::super::super::core::channel::v1::PacketId,
>,
}
impl ::prost::Name for QueryTotalTimeoutFeesRequest {
const NAME: &'static str = "QueryTotalTimeoutFeesRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTotalTimeoutFeesResponse {
#[prost(message, repeated, tag = "1")]
pub timeout_fees: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
}
impl ::prost::Name for QueryTotalTimeoutFeesResponse {
const NAME: &'static str = "QueryTotalTimeoutFeesResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPayeeRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub relayer: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryPayeeRequest {
const NAME: &'static str = "QueryPayeeRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryPayeeRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryPayeeRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPayeeResponse {
#[prost(string, tag = "1")]
pub payee_address: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryPayeeResponse {
const NAME: &'static str = "QueryPayeeResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryPayeeResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryPayeeResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCounterpartyPayeeRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub relayer: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryCounterpartyPayeeRequest {
const NAME: &'static str = "QueryCounterpartyPayeeRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryCounterpartyPayeeRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryCounterpartyPayeeRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCounterpartyPayeeResponse {
#[prost(string, tag = "1")]
pub counterparty_payee: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryCounterpartyPayeeResponse {
const NAME: &'static str = "QueryCounterpartyPayeeResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryCounterpartyPayeeResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryCounterpartyPayeeResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryFeeEnabledChannelsRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
#[prost(uint64, tag = "2")]
pub query_height: u64,
}
impl ::prost::Name for QueryFeeEnabledChannelsRequest {
const NAME: &'static str = "QueryFeeEnabledChannelsRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryFeeEnabledChannelsResponse {
#[prost(message, repeated, tag = "1")]
pub fee_enabled_channels: ::prost::alloc::vec::Vec<FeeEnabledChannel>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for QueryFeeEnabledChannelsResponse {
const NAME: &'static str = "QueryFeeEnabledChannelsResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryFeeEnabledChannelRequest {
#[prost(string, tag = "1")]
pub port_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryFeeEnabledChannelRequest {
const NAME: &'static str = "QueryFeeEnabledChannelRequest";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryFeeEnabledChannelRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryFeeEnabledChannelRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryFeeEnabledChannelResponse {
#[prost(bool, tag = "1")]
pub fee_enabled: bool,
}
impl ::prost::Name for QueryFeeEnabledChannelResponse {
const NAME: &'static str = "QueryFeeEnabledChannelResponse";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.QueryFeeEnabledChannelResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.QueryFeeEnabledChannelResponse".into()
}
}
#[cfg(feature = "client")]
pub mod query_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "transport")]
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> QueryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn incentivized_packets(
&mut self,
request: impl tonic::IntoRequest<super::QueryIncentivizedPacketsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryIncentivizedPacketsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/IncentivizedPackets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"ibc.applications.fee.v1.Query",
"IncentivizedPackets",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn incentivized_packet(
&mut self,
request: impl tonic::IntoRequest<super::QueryIncentivizedPacketRequest>,
) -> std::result::Result<
tonic::Response<super::QueryIncentivizedPacketResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/IncentivizedPacket",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"ibc.applications.fee.v1.Query",
"IncentivizedPacket",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn incentivized_packets_for_channel(
&mut self,
request: impl tonic::IntoRequest<
super::QueryIncentivizedPacketsForChannelRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryIncentivizedPacketsForChannelResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"ibc.applications.fee.v1.Query",
"IncentivizedPacketsForChannel",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn total_recv_fees(
&mut self,
request: impl tonic::IntoRequest<super::QueryTotalRecvFeesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryTotalRecvFeesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/TotalRecvFees",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.applications.fee.v1.Query", "TotalRecvFees"),
);
self.inner.unary(req, path, codec).await
}
pub async fn total_ack_fees(
&mut self,
request: impl tonic::IntoRequest<super::QueryTotalAckFeesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryTotalAckFeesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/TotalAckFees",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.applications.fee.v1.Query", "TotalAckFees"),
);
self.inner.unary(req, path, codec).await
}
pub async fn total_timeout_fees(
&mut self,
request: impl tonic::IntoRequest<super::QueryTotalTimeoutFeesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryTotalTimeoutFeesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/TotalTimeoutFees",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.applications.fee.v1.Query", "TotalTimeoutFees"),
);
self.inner.unary(req, path, codec).await
}
pub async fn payee(
&mut self,
request: impl tonic::IntoRequest<super::QueryPayeeRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPayeeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/Payee",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ibc.applications.fee.v1.Query", "Payee"));
self.inner.unary(req, path, codec).await
}
pub async fn counterparty_payee(
&mut self,
request: impl tonic::IntoRequest<super::QueryCounterpartyPayeeRequest>,
) -> std::result::Result<
tonic::Response<super::QueryCounterpartyPayeeResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/CounterpartyPayee",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.applications.fee.v1.Query", "CounterpartyPayee"),
);
self.inner.unary(req, path, codec).await
}
pub async fn fee_enabled_channels(
&mut self,
request: impl tonic::IntoRequest<super::QueryFeeEnabledChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryFeeEnabledChannelsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/FeeEnabledChannels",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"ibc.applications.fee.v1.Query",
"FeeEnabledChannels",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn fee_enabled_channel(
&mut self,
request: impl tonic::IntoRequest<super::QueryFeeEnabledChannelRequest>,
) -> std::result::Result<
tonic::Response<super::QueryFeeEnabledChannelResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/ibc.applications.fee.v1.Query/FeeEnabledChannel",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ibc.applications.fee.v1.Query", "FeeEnabledChannel"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "server")]
pub mod query_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Query: std::marker::Send + std::marker::Sync + 'static {
async fn incentivized_packets(
&self,
request: tonic::Request<super::QueryIncentivizedPacketsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryIncentivizedPacketsResponse>,
tonic::Status,
>;
async fn incentivized_packet(
&self,
request: tonic::Request<super::QueryIncentivizedPacketRequest>,
) -> std::result::Result<
tonic::Response<super::QueryIncentivizedPacketResponse>,
tonic::Status,
>;
async fn incentivized_packets_for_channel(
&self,
request: tonic::Request<super::QueryIncentivizedPacketsForChannelRequest>,
) -> std::result::Result<
tonic::Response<super::QueryIncentivizedPacketsForChannelResponse>,
tonic::Status,
>;
async fn total_recv_fees(
&self,
request: tonic::Request<super::QueryTotalRecvFeesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryTotalRecvFeesResponse>,
tonic::Status,
>;
async fn total_ack_fees(
&self,
request: tonic::Request<super::QueryTotalAckFeesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryTotalAckFeesResponse>,
tonic::Status,
>;
async fn total_timeout_fees(
&self,
request: tonic::Request<super::QueryTotalTimeoutFeesRequest>,
) -> std::result::Result<
tonic::Response<super::QueryTotalTimeoutFeesResponse>,
tonic::Status,
>;
async fn payee(
&self,
request: tonic::Request<super::QueryPayeeRequest>,
) -> std::result::Result<
tonic::Response<super::QueryPayeeResponse>,
tonic::Status,
>;
async fn counterparty_payee(
&self,
request: tonic::Request<super::QueryCounterpartyPayeeRequest>,
) -> std::result::Result<
tonic::Response<super::QueryCounterpartyPayeeResponse>,
tonic::Status,
>;
async fn fee_enabled_channels(
&self,
request: tonic::Request<super::QueryFeeEnabledChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryFeeEnabledChannelsResponse>,
tonic::Status,
>;
async fn fee_enabled_channel(
&self,
request: tonic::Request<super::QueryFeeEnabledChannelRequest>,
) -> std::result::Result<
tonic::Response<super::QueryFeeEnabledChannelResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct QueryServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> QueryServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
T: Query,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/ibc.applications.fee.v1.Query/IncentivizedPackets" => {
#[allow(non_camel_case_types)]
struct IncentivizedPacketsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryIncentivizedPacketsRequest>
for IncentivizedPacketsSvc<T> {
type Response = super::QueryIncentivizedPacketsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryIncentivizedPacketsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::incentivized_packets(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = IncentivizedPacketsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/IncentivizedPacket" => {
#[allow(non_camel_case_types)]
struct IncentivizedPacketSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryIncentivizedPacketRequest>
for IncentivizedPacketSvc<T> {
type Response = super::QueryIncentivizedPacketResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryIncentivizedPacketRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::incentivized_packet(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = IncentivizedPacketSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel" => {
#[allow(non_camel_case_types)]
struct IncentivizedPacketsForChannelSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryIncentivizedPacketsForChannelRequest,
> for IncentivizedPacketsForChannelSvc<T> {
type Response = super::QueryIncentivizedPacketsForChannelResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryIncentivizedPacketsForChannelRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::incentivized_packets_for_channel(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = IncentivizedPacketsForChannelSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/TotalRecvFees" => {
#[allow(non_camel_case_types)]
struct TotalRecvFeesSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryTotalRecvFeesRequest>
for TotalRecvFeesSvc<T> {
type Response = super::QueryTotalRecvFeesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryTotalRecvFeesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::total_recv_fees(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TotalRecvFeesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/TotalAckFees" => {
#[allow(non_camel_case_types)]
struct TotalAckFeesSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryTotalAckFeesRequest>
for TotalAckFeesSvc<T> {
type Response = super::QueryTotalAckFeesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryTotalAckFeesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::total_ack_fees(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TotalAckFeesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/TotalTimeoutFees" => {
#[allow(non_camel_case_types)]
struct TotalTimeoutFeesSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryTotalTimeoutFeesRequest>
for TotalTimeoutFeesSvc<T> {
type Response = super::QueryTotalTimeoutFeesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryTotalTimeoutFeesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::total_timeout_fees(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = TotalTimeoutFeesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/Payee" => {
#[allow(non_camel_case_types)]
struct PayeeSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryPayeeRequest>
for PayeeSvc<T> {
type Response = super::QueryPayeeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryPayeeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::payee(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = PayeeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/CounterpartyPayee" => {
#[allow(non_camel_case_types)]
struct CounterpartyPayeeSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryCounterpartyPayeeRequest>
for CounterpartyPayeeSvc<T> {
type Response = super::QueryCounterpartyPayeeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryCounterpartyPayeeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::counterparty_payee(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CounterpartyPayeeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/FeeEnabledChannels" => {
#[allow(non_camel_case_types)]
struct FeeEnabledChannelsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryFeeEnabledChannelsRequest>
for FeeEnabledChannelsSvc<T> {
type Response = super::QueryFeeEnabledChannelsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryFeeEnabledChannelsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::fee_enabled_channels(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = FeeEnabledChannelsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ibc.applications.fee.v1.Query/FeeEnabledChannel" => {
#[allow(non_camel_case_types)]
struct FeeEnabledChannelSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryFeeEnabledChannelRequest>
for FeeEnabledChannelSvc<T> {
type Response = super::QueryFeeEnabledChannelResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryFeeEnabledChannelRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::fee_enabled_channel(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = FeeEnabledChannelSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for QueryServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "ibc.applications.fee.v1.Query";
impl<T> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(string, tag = "1")]
pub fee_version: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub app_version: ::prost::alloc::string::String,
}
impl ::prost::Name for Metadata {
const NAME: &'static str = "Metadata";
const PACKAGE: &'static str = "ibc.applications.fee.v1";
fn full_name() -> ::prost::alloc::string::String {
"ibc.applications.fee.v1.Metadata".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/ibc.applications.fee.v1.Metadata".into()
}
}