1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct GenesisState {
5 #[prost(message, optional, tag = "1")]
6 pub params: ::core::option::Option<Params>,
7}
8#[allow(clippy::derive_partial_eq_without_eq)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct Params {
12 #[prost(uint32, tag = "1")]
15 pub max_bundle_size: u32,
16 #[prost(bytes = "vec", tag = "2")]
19 pub escrow_account_address: ::prost::alloc::vec::Vec<u8>,
20 #[prost(message, optional, tag = "3")]
22 pub reserve_fee: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
23 #[prost(message, optional, tag = "4")]
26 pub min_bid_increment: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
27 #[prost(bool, tag = "5")]
30 pub front_running_protection: bool,
31 #[prost(string, tag = "6")]
34 pub proposer_fee: ::prost::alloc::string::String,
35}
36#[allow(clippy::derive_partial_eq_without_eq)]
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct MsgAuctionBid {
41 #[prost(string, tag = "1")]
44 pub bidder: ::prost::alloc::string::String,
45 #[prost(message, optional, tag = "2")]
48 pub bid: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
49 #[prost(bytes = "vec", repeated, tag = "3")]
52 pub transactions: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
53}
54#[allow(clippy::derive_partial_eq_without_eq)]
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct MsgAuctionBidResponse {}
58#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct MsgUpdateParams {
63 #[prost(string, tag = "1")]
66 pub authority: ::prost::alloc::string::String,
67 #[prost(message, optional, tag = "2")]
69 pub params: ::core::option::Option<Params>,
70}
71#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct MsgUpdateParamsResponse {}
75#[cfg(feature = "grpc")]
77#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
78pub mod msg_client {
79 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
80 use tonic::codegen::http::Uri;
81 use tonic::codegen::*;
82 #[derive(Debug, Clone)]
84 pub struct MsgClient<T> {
85 inner: tonic::client::Grpc<T>,
86 }
87 #[cfg(feature = "grpc-transport")]
88 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
89 impl MsgClient<tonic::transport::Channel> {
90 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
92 where
93 D: std::convert::TryInto<tonic::transport::Endpoint>,
94 D::Error: Into<StdError>,
95 {
96 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
97 Ok(Self::new(conn))
98 }
99 }
100 impl<T> MsgClient<T>
101 where
102 T: tonic::client::GrpcService<tonic::body::BoxBody>,
103 T::Error: Into<StdError>,
104 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
105 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
106 {
107 pub fn new(inner: T) -> Self {
108 let inner = tonic::client::Grpc::new(inner);
109 Self { inner }
110 }
111 pub fn with_origin(inner: T, origin: Uri) -> Self {
112 let inner = tonic::client::Grpc::with_origin(inner, origin);
113 Self { inner }
114 }
115 pub fn with_interceptor<F>(inner: T, interceptor: F) -> MsgClient<InterceptedService<T, F>>
116 where
117 F: tonic::service::Interceptor,
118 T::ResponseBody: Default,
119 T: tonic::codegen::Service<
120 http::Request<tonic::body::BoxBody>,
121 Response = http::Response<
122 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
123 >,
124 >,
125 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
126 Into<StdError> + Send + Sync,
127 {
128 MsgClient::new(InterceptedService::new(inner, interceptor))
129 }
130 #[must_use]
135 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
136 self.inner = self.inner.send_compressed(encoding);
137 self
138 }
139 #[must_use]
141 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
142 self.inner = self.inner.accept_compressed(encoding);
143 self
144 }
145 pub async fn auction_bid(
147 &mut self,
148 request: impl tonic::IntoRequest<super::MsgAuctionBid>,
149 ) -> Result<tonic::Response<super::MsgAuctionBidResponse>, tonic::Status> {
150 self.inner.ready().await.map_err(|e| {
151 tonic::Status::new(
152 tonic::Code::Unknown,
153 format!("Service was not ready: {}", e.into()),
154 )
155 })?;
156 let codec = tonic::codec::ProstCodec::default();
157 let path = http::uri::PathAndQuery::from_static("/pob.builder.v1.Msg/AuctionBid");
158 self.inner.unary(request.into_request(), path, codec).await
159 }
160 pub async fn update_params(
163 &mut self,
164 request: impl tonic::IntoRequest<super::MsgUpdateParams>,
165 ) -> Result<tonic::Response<super::MsgUpdateParamsResponse>, tonic::Status> {
166 self.inner.ready().await.map_err(|e| {
167 tonic::Status::new(
168 tonic::Code::Unknown,
169 format!("Service was not ready: {}", e.into()),
170 )
171 })?;
172 let codec = tonic::codec::ProstCodec::default();
173 let path = http::uri::PathAndQuery::from_static("/pob.builder.v1.Msg/UpdateParams");
174 self.inner.unary(request.into_request(), path, codec).await
175 }
176 }
177}
178#[cfg(feature = "grpc")]
180#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
181pub mod msg_server {
182 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
183 use tonic::codegen::*;
184 #[async_trait]
186 pub trait Msg: Send + Sync + 'static {
187 async fn auction_bid(
189 &self,
190 request: tonic::Request<super::MsgAuctionBid>,
191 ) -> Result<tonic::Response<super::MsgAuctionBidResponse>, tonic::Status>;
192 async fn update_params(
195 &self,
196 request: tonic::Request<super::MsgUpdateParams>,
197 ) -> Result<tonic::Response<super::MsgUpdateParamsResponse>, tonic::Status>;
198 }
199 #[derive(Debug)]
201 pub struct MsgServer<T: Msg> {
202 inner: _Inner<T>,
203 accept_compression_encodings: EnabledCompressionEncodings,
204 send_compression_encodings: EnabledCompressionEncodings,
205 }
206 struct _Inner<T>(Arc<T>);
207 impl<T: Msg> MsgServer<T> {
208 pub fn new(inner: T) -> Self {
209 Self::from_arc(Arc::new(inner))
210 }
211 pub fn from_arc(inner: Arc<T>) -> Self {
212 let inner = _Inner(inner);
213 Self {
214 inner,
215 accept_compression_encodings: Default::default(),
216 send_compression_encodings: Default::default(),
217 }
218 }
219 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
220 where
221 F: tonic::service::Interceptor,
222 {
223 InterceptedService::new(Self::new(inner), interceptor)
224 }
225 #[must_use]
227 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
228 self.accept_compression_encodings.enable(encoding);
229 self
230 }
231 #[must_use]
233 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
234 self.send_compression_encodings.enable(encoding);
235 self
236 }
237 }
238 impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
239 where
240 T: Msg,
241 B: Body + Send + 'static,
242 B::Error: Into<StdError> + Send + 'static,
243 {
244 type Response = http::Response<tonic::body::BoxBody>;
245 type Error = std::convert::Infallible;
246 type Future = BoxFuture<Self::Response, Self::Error>;
247 fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
248 Poll::Ready(Ok(()))
249 }
250 fn call(&mut self, req: http::Request<B>) -> Self::Future {
251 let inner = self.inner.clone();
252 match req.uri().path() {
253 "/pob.builder.v1.Msg/AuctionBid" => {
254 #[allow(non_camel_case_types)]
255 struct AuctionBidSvc<T: Msg>(pub Arc<T>);
256 impl<T: Msg> tonic::server::UnaryService<super::MsgAuctionBid> for AuctionBidSvc<T> {
257 type Response = super::MsgAuctionBidResponse;
258 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
259 fn call(
260 &mut self,
261 request: tonic::Request<super::MsgAuctionBid>,
262 ) -> Self::Future {
263 let inner = self.0.clone();
264 let fut = async move { (*inner).auction_bid(request).await };
265 Box::pin(fut)
266 }
267 }
268 let accept_compression_encodings = self.accept_compression_encodings;
269 let send_compression_encodings = self.send_compression_encodings;
270 let inner = self.inner.clone();
271 let fut = async move {
272 let inner = inner.0;
273 let method = AuctionBidSvc(inner);
274 let codec = tonic::codec::ProstCodec::default();
275 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
276 accept_compression_encodings,
277 send_compression_encodings,
278 );
279 let res = grpc.unary(method, req).await;
280 Ok(res)
281 };
282 Box::pin(fut)
283 }
284 "/pob.builder.v1.Msg/UpdateParams" => {
285 #[allow(non_camel_case_types)]
286 struct UpdateParamsSvc<T: Msg>(pub Arc<T>);
287 impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams> for UpdateParamsSvc<T> {
288 type Response = super::MsgUpdateParamsResponse;
289 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
290 fn call(
291 &mut self,
292 request: tonic::Request<super::MsgUpdateParams>,
293 ) -> Self::Future {
294 let inner = self.0.clone();
295 let fut = async move { (*inner).update_params(request).await };
296 Box::pin(fut)
297 }
298 }
299 let accept_compression_encodings = self.accept_compression_encodings;
300 let send_compression_encodings = self.send_compression_encodings;
301 let inner = self.inner.clone();
302 let fut = async move {
303 let inner = inner.0;
304 let method = UpdateParamsSvc(inner);
305 let codec = tonic::codec::ProstCodec::default();
306 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
307 accept_compression_encodings,
308 send_compression_encodings,
309 );
310 let res = grpc.unary(method, req).await;
311 Ok(res)
312 };
313 Box::pin(fut)
314 }
315 _ => Box::pin(async move {
316 Ok(http::Response::builder()
317 .status(200)
318 .header("grpc-status", "12")
319 .header("content-type", "application/grpc")
320 .body(empty_body())
321 .unwrap())
322 }),
323 }
324 }
325 }
326 impl<T: Msg> Clone for MsgServer<T> {
327 fn clone(&self) -> Self {
328 let inner = self.inner.clone();
329 Self {
330 inner,
331 accept_compression_encodings: self.accept_compression_encodings,
332 send_compression_encodings: self.send_compression_encodings,
333 }
334 }
335 }
336 impl<T: Msg> Clone for _Inner<T> {
337 fn clone(&self) -> Self {
338 Self(self.0.clone())
339 }
340 }
341 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
342 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
343 write!(f, "{:?}", self.0)
344 }
345 }
346 impl<T: Msg> tonic::server::NamedService for MsgServer<T> {
347 const NAME: &'static str = "pob.builder.v1.Msg";
348 }
349}