1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Bid {
5 #[prost(uint64, tag = "1")]
6 pub id: u64,
7 #[prost(uint64, tag = "2")]
8 pub auction_id: u64,
9 #[prost(string, tag = "3")]
10 pub bidder: ::prost::alloc::string::String,
11 #[prost(int64, tag = "4")]
12 pub bid_price: i64,
13 #[prost(message, optional, tag = "5")]
14 pub bid_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
15 #[prost(enumeration = "BidStatus", tag = "6")]
16 pub status: i32,
17}
18impl ::prost::Name for Bid {
19 const NAME: &'static str = "Bid";
20 const PACKAGE: &'static str = "side.auction";
21 fn full_name() -> ::prost::alloc::string::String {
22 ::prost::alloc::format!("side.auction.{}", Self::NAME)
23 }
24}
25#[allow(clippy::derive_partial_eq_without_eq)]
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct Auction {
28 #[prost(uint64, tag = "1")]
29 pub id: u64,
30 #[prost(message, optional, tag = "2")]
31 pub deposited_asset: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
32 #[prost(string, tag = "3")]
33 pub borrower: ::prost::alloc::string::String,
34 #[prost(int64, tag = "4")]
35 pub liquidated_price: i64,
36 #[prost(message, optional, tag = "5")]
37 pub liquidated_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
38 #[prost(int64, tag = "6")]
39 pub expected_value: i64,
40 #[prost(int64, tag = "7")]
41 pub bidded_value: i64,
42 #[prost(string, tag = "8")]
43 pub payment_tx_id: ::prost::alloc::string::String,
44 #[prost(enumeration = "AuctionStatus", tag = "9")]
45 pub status: i32,
46}
47impl ::prost::Name for Auction {
48 const NAME: &'static str = "Auction";
49 const PACKAGE: &'static str = "side.auction";
50 fn full_name() -> ::prost::alloc::string::String {
51 ::prost::alloc::format!("side.auction.{}", Self::NAME)
52 }
53}
54#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
55#[repr(i32)]
56pub enum AssetType {
57 Bitcoin = 0,
58}
59impl AssetType {
60 pub fn as_str_name(&self) -> &'static str {
65 match self {
66 AssetType::Bitcoin => "Bitcoin",
67 }
68 }
69 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
71 match value {
72 "Bitcoin" => Some(Self::Bitcoin),
73 _ => None,
74 }
75 }
76}
77#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
78#[repr(i32)]
79pub enum AuctionStatus {
80 AuctionOpen = 0,
81 AuctionClose = 1,
82}
83impl AuctionStatus {
84 pub fn as_str_name(&self) -> &'static str {
89 match self {
90 AuctionStatus::AuctionOpen => "AuctionOpen",
91 AuctionStatus::AuctionClose => "AuctionClose",
92 }
93 }
94 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
96 match value {
97 "AuctionOpen" => Some(Self::AuctionOpen),
98 "AuctionClose" => Some(Self::AuctionClose),
99 _ => None,
100 }
101 }
102}
103#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
104#[repr(i32)]
105pub enum BidStatus {
106 Bidding = 0,
107 Accepted = 1,
108 Rejected = 2,
109 Cancelled = 3,
110}
111impl BidStatus {
112 pub fn as_str_name(&self) -> &'static str {
117 match self {
118 BidStatus::Bidding => "Bidding",
119 BidStatus::Accepted => "Accepted",
120 BidStatus::Rejected => "Rejected",
121 BidStatus::Cancelled => "Cancelled",
122 }
123 }
124 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
126 match value {
127 "Bidding" => Some(Self::Bidding),
128 "Accepted" => Some(Self::Accepted),
129 "Rejected" => Some(Self::Rejected),
130 "Cancelled" => Some(Self::Cancelled),
131 _ => None,
132 }
133 }
134}
135#[allow(clippy::derive_partial_eq_without_eq)]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct Params {
139 #[prost(message, optional, tag = "1")]
140 pub price_drop_period: ::core::option::Option<::tendermint_proto::google::protobuf::Duration>,
141 #[prost(uint32, tag = "2")]
142 pub initial_discount: u32,
143 #[prost(uint32, tag = "3")]
144 pub fee_rate: u32,
145 #[prost(uint64, tag = "4")]
146 pub min_bid_amount: u64,
147}
148impl ::prost::Name for Params {
149 const NAME: &'static str = "Params";
150 const PACKAGE: &'static str = "side.auction";
151 fn full_name() -> ::prost::alloc::string::String {
152 ::prost::alloc::format!("side.auction.{}", Self::NAME)
153 }
154}
155#[allow(clippy::derive_partial_eq_without_eq)]
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct GenesisState {
159 #[prost(message, optional, tag = "1")]
160 pub params: ::core::option::Option<Params>,
161 #[prost(message, repeated, tag = "2")]
162 pub auctions: ::prost::alloc::vec::Vec<Auction>,
163 #[prost(message, repeated, tag = "3")]
164 pub bids: ::prost::alloc::vec::Vec<Bid>,
165}
166impl ::prost::Name for GenesisState {
167 const NAME: &'static str = "GenesisState";
168 const PACKAGE: &'static str = "side.auction";
169 fn full_name() -> ::prost::alloc::string::String {
170 ::prost::alloc::format!("side.auction.{}", Self::NAME)
171 }
172}
173#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct QueryParamsRequest {}
177impl ::prost::Name for QueryParamsRequest {
178 const NAME: &'static str = "QueryParamsRequest";
179 const PACKAGE: &'static str = "side.auction";
180 fn full_name() -> ::prost::alloc::string::String {
181 ::prost::alloc::format!("side.auction.{}", Self::NAME)
182 }
183}
184#[allow(clippy::derive_partial_eq_without_eq)]
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct QueryParamsResponse {
188 #[prost(message, optional, tag = "1")]
189 pub params: ::core::option::Option<Params>,
190}
191impl ::prost::Name for QueryParamsResponse {
192 const NAME: &'static str = "QueryParamsResponse";
193 const PACKAGE: &'static str = "side.auction";
194 fn full_name() -> ::prost::alloc::string::String {
195 ::prost::alloc::format!("side.auction.{}", Self::NAME)
196 }
197}
198#[allow(clippy::derive_partial_eq_without_eq)]
200#[derive(Clone, PartialEq, ::prost::Message)]
201pub struct QueryAuctionRequest {
202 #[prost(uint64, tag = "1")]
203 pub id: u64,
204}
205impl ::prost::Name for QueryAuctionRequest {
206 const NAME: &'static str = "QueryAuctionRequest";
207 const PACKAGE: &'static str = "side.auction";
208 fn full_name() -> ::prost::alloc::string::String {
209 ::prost::alloc::format!("side.auction.{}", Self::NAME)
210 }
211}
212#[allow(clippy::derive_partial_eq_without_eq)]
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct QueryAuctionResponse {
216 #[prost(message, optional, tag = "1")]
217 pub auction: ::core::option::Option<Auction>,
218}
219impl ::prost::Name for QueryAuctionResponse {
220 const NAME: &'static str = "QueryAuctionResponse";
221 const PACKAGE: &'static str = "side.auction";
222 fn full_name() -> ::prost::alloc::string::String {
223 ::prost::alloc::format!("side.auction.{}", Self::NAME)
224 }
225}
226#[allow(clippy::derive_partial_eq_without_eq)]
228#[derive(Clone, PartialEq, ::prost::Message)]
229pub struct QueryAuctionsRequest {
230 #[prost(enumeration = "AuctionStatus", tag = "1")]
231 pub status: i32,
232 #[prost(message, optional, tag = "2")]
233 pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
234}
235impl ::prost::Name for QueryAuctionsRequest {
236 const NAME: &'static str = "QueryAuctionsRequest";
237 const PACKAGE: &'static str = "side.auction";
238 fn full_name() -> ::prost::alloc::string::String {
239 ::prost::alloc::format!("side.auction.{}", Self::NAME)
240 }
241}
242#[allow(clippy::derive_partial_eq_without_eq)]
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct QueryAuctionsResponse {
246 #[prost(message, repeated, tag = "1")]
247 pub auctions: ::prost::alloc::vec::Vec<Auction>,
248 #[prost(message, optional, tag = "2")]
249 pub pagination:
250 ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
251}
252impl ::prost::Name for QueryAuctionsResponse {
253 const NAME: &'static str = "QueryAuctionsResponse";
254 const PACKAGE: &'static str = "side.auction";
255 fn full_name() -> ::prost::alloc::string::String {
256 ::prost::alloc::format!("side.auction.{}", Self::NAME)
257 }
258}
259#[allow(clippy::derive_partial_eq_without_eq)]
261#[derive(Clone, PartialEq, ::prost::Message)]
262pub struct QueryBidRequest {
263 #[prost(uint64, tag = "1")]
264 pub id: u64,
265}
266impl ::prost::Name for QueryBidRequest {
267 const NAME: &'static str = "QueryBidRequest";
268 const PACKAGE: &'static str = "side.auction";
269 fn full_name() -> ::prost::alloc::string::String {
270 ::prost::alloc::format!("side.auction.{}", Self::NAME)
271 }
272}
273#[allow(clippy::derive_partial_eq_without_eq)]
275#[derive(Clone, PartialEq, ::prost::Message)]
276pub struct QueryBidResponse {
277 #[prost(message, optional, tag = "1")]
278 pub bid: ::core::option::Option<Bid>,
279}
280impl ::prost::Name for QueryBidResponse {
281 const NAME: &'static str = "QueryBidResponse";
282 const PACKAGE: &'static str = "side.auction";
283 fn full_name() -> ::prost::alloc::string::String {
284 ::prost::alloc::format!("side.auction.{}", Self::NAME)
285 }
286}
287#[allow(clippy::derive_partial_eq_without_eq)]
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct QueryBidsRequest {
291 #[prost(enumeration = "BidStatus", tag = "1")]
292 pub status: i32,
293 #[prost(message, optional, tag = "2")]
294 pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
295}
296impl ::prost::Name for QueryBidsRequest {
297 const NAME: &'static str = "QueryBidsRequest";
298 const PACKAGE: &'static str = "side.auction";
299 fn full_name() -> ::prost::alloc::string::String {
300 ::prost::alloc::format!("side.auction.{}", Self::NAME)
301 }
302}
303#[allow(clippy::derive_partial_eq_without_eq)]
305#[derive(Clone, PartialEq, ::prost::Message)]
306pub struct QueryBidsResponse {
307 #[prost(message, repeated, tag = "1")]
308 pub bids: ::prost::alloc::vec::Vec<Bid>,
309 #[prost(message, optional, tag = "2")]
310 pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
311}
312impl ::prost::Name for QueryBidsResponse {
313 const NAME: &'static str = "QueryBidsResponse";
314 const PACKAGE: &'static str = "side.auction";
315 fn full_name() -> ::prost::alloc::string::String {
316 ::prost::alloc::format!("side.auction.{}", Self::NAME)
317 }
318}
319#[allow(clippy::derive_partial_eq_without_eq)]
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct MsgBid {
323 #[prost(string, tag = "1")]
324 pub sender: ::prost::alloc::string::String,
325 #[prost(uint64, tag = "2")]
326 pub auction_id: u64,
327 #[prost(int64, tag = "3")]
328 pub price: i64,
329 #[prost(message, optional, tag = "4")]
330 pub amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
331}
332impl ::prost::Name for MsgBid {
333 const NAME: &'static str = "MsgBid";
334 const PACKAGE: &'static str = "side.auction";
335 fn full_name() -> ::prost::alloc::string::String {
336 ::prost::alloc::format!("side.auction.{}", Self::NAME)
337 }
338}
339#[allow(clippy::derive_partial_eq_without_eq)]
341#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct MsgBidResponse {}
343impl ::prost::Name for MsgBidResponse {
344 const NAME: &'static str = "MsgBidResponse";
345 const PACKAGE: &'static str = "side.auction";
346 fn full_name() -> ::prost::alloc::string::String {
347 ::prost::alloc::format!("side.auction.{}", Self::NAME)
348 }
349}
350#[allow(clippy::derive_partial_eq_without_eq)]
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct MsgCancelBid {
354 #[prost(string, tag = "1")]
355 pub sender: ::prost::alloc::string::String,
356 #[prost(uint64, tag = "2")]
357 pub id: u64,
358}
359impl ::prost::Name for MsgCancelBid {
360 const NAME: &'static str = "MsgCancelBid";
361 const PACKAGE: &'static str = "side.auction";
362 fn full_name() -> ::prost::alloc::string::String {
363 ::prost::alloc::format!("side.auction.{}", Self::NAME)
364 }
365}
366#[allow(clippy::derive_partial_eq_without_eq)]
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct MsgCancelBidResponse {}
370impl ::prost::Name for MsgCancelBidResponse {
371 const NAME: &'static str = "MsgCancelBidResponse";
372 const PACKAGE: &'static str = "side.auction";
373 fn full_name() -> ::prost::alloc::string::String {
374 ::prost::alloc::format!("side.auction.{}", Self::NAME)
375 }
376}
377#[allow(clippy::derive_partial_eq_without_eq)]
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct MsgUpdateParams {
383 #[prost(string, tag = "1")]
385 pub authority: ::prost::alloc::string::String,
386 #[prost(message, optional, tag = "2")]
390 pub params: ::core::option::Option<Params>,
391}
392impl ::prost::Name for MsgUpdateParams {
393 const NAME: &'static str = "MsgUpdateParams";
394 const PACKAGE: &'static str = "side.auction";
395 fn full_name() -> ::prost::alloc::string::String {
396 ::prost::alloc::format!("side.auction.{}", Self::NAME)
397 }
398}
399#[allow(clippy::derive_partial_eq_without_eq)]
403#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct MsgUpdateParamsResponse {}
405impl ::prost::Name for MsgUpdateParamsResponse {
406 const NAME: &'static str = "MsgUpdateParamsResponse";
407 const PACKAGE: &'static str = "side.auction";
408 fn full_name() -> ::prost::alloc::string::String {
409 ::prost::alloc::format!("side.auction.{}", Self::NAME)
410 }
411}
412include!("side.auction.serde.rs");
413include!("side.auction.tonic.rs");
414