side_proto/prost/side/
side.liquidation.rs

1// @generated
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct AssetMetadata {
5    #[prost(string, tag = "1")]
6    pub denom: ::prost::alloc::string::String,
7    #[prost(string, tag = "2")]
8    pub symbol: ::prost::alloc::string::String,
9    #[prost(int32, tag = "3")]
10    pub decimals: i32,
11    #[prost(string, tag = "4")]
12    pub price_symbol: ::prost::alloc::string::String,
13    #[prost(bool, tag = "5")]
14    pub is_base_price_asset: bool,
15}
16impl ::prost::Name for AssetMetadata {
17    const NAME: &'static str = "AssetMetadata";
18    const PACKAGE: &'static str = "side.liquidation";
19    fn full_name() -> ::prost::alloc::string::String {
20        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
21    }
22}
23#[allow(clippy::derive_partial_eq_without_eq)]
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct Liquidation {
26    #[prost(uint64, tag = "1")]
27    pub id: u64,
28    #[prost(string, tag = "2")]
29    pub loan_id: ::prost::alloc::string::String,
30    #[prost(string, tag = "3")]
31    pub debtor: ::prost::alloc::string::String,
32    #[prost(string, tag = "4")]
33    pub dcm: ::prost::alloc::string::String,
34    #[prost(message, optional, tag = "5")]
35    pub collateral_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
36    #[prost(message, optional, tag = "6")]
37    pub actual_collateral_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
38    #[prost(message, optional, tag = "7")]
39    pub debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
40    #[prost(message, optional, tag = "8")]
41    pub collateral_asset: ::core::option::Option<AssetMetadata>,
42    #[prost(message, optional, tag = "9")]
43    pub debt_asset: ::core::option::Option<AssetMetadata>,
44    #[prost(string, tag = "10")]
45    pub liquidation_price: ::prost::alloc::string::String,
46    #[prost(message, optional, tag = "11")]
47    pub liquidation_time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
48    #[prost(message, optional, tag = "12")]
49    pub liquidated_collateral_amount:
50        ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
51    #[prost(message, optional, tag = "13")]
52    pub liquidated_debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
53    #[prost(message, optional, tag = "14")]
54    pub liquidation_bonus_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
55    #[prost(message, optional, tag = "15")]
56    pub protocol_liquidation_fee: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
57    #[prost(message, optional, tag = "16")]
58    pub unliquidated_collateral_amount:
59        ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
60    #[prost(string, tag = "17")]
61    pub liquidation_cet: ::prost::alloc::string::String,
62    #[prost(string, tag = "18")]
63    pub settlement_tx: ::prost::alloc::string::String,
64    #[prost(string, tag = "19")]
65    pub settlement_tx_id: ::prost::alloc::string::String,
66    #[prost(enumeration = "LiquidationStatus", tag = "20")]
67    pub status: i32,
68}
69impl ::prost::Name for Liquidation {
70    const NAME: &'static str = "Liquidation";
71    const PACKAGE: &'static str = "side.liquidation";
72    fn full_name() -> ::prost::alloc::string::String {
73        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
74    }
75}
76#[allow(clippy::derive_partial_eq_without_eq)]
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct LiquidationRecord {
79    #[prost(uint64, tag = "1")]
80    pub id: u64,
81    #[prost(uint64, tag = "2")]
82    pub liquidation_id: u64,
83    #[prost(string, tag = "3")]
84    pub liquidator: ::prost::alloc::string::String,
85    #[prost(message, optional, tag = "4")]
86    pub debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
87    #[prost(message, optional, tag = "5")]
88    pub collateral_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
89    #[prost(message, optional, tag = "6")]
90    pub bonus_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
91    #[prost(message, optional, tag = "7")]
92    pub time: ::core::option::Option<::tendermint_proto::google::protobuf::Timestamp>,
93}
94impl ::prost::Name for LiquidationRecord {
95    const NAME: &'static str = "LiquidationRecord";
96    const PACKAGE: &'static str = "side.liquidation";
97    fn full_name() -> ::prost::alloc::string::String {
98        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
99    }
100}
101#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
102#[repr(i32)]
103pub enum LiquidationStatus {
104    Unspecified = 0,
105    Liquidating = 1,
106    Liquidated = 2,
107    Settling = 3,
108    Settled = 4,
109}
110impl LiquidationStatus {
111    /// String value of the enum field names used in the ProtoBuf definition.
112    ///
113    /// The values are not transformed in any way and thus are considered stable
114    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
115    pub fn as_str_name(&self) -> &'static str {
116        match self {
117            LiquidationStatus::Unspecified => "LIQUIDATION_STATUS_UNSPECIFIED",
118            LiquidationStatus::Liquidating => "LIQUIDATION_STATUS_LIQUIDATING",
119            LiquidationStatus::Liquidated => "LIQUIDATION_STATUS_LIQUIDATED",
120            LiquidationStatus::Settling => "LIQUIDATION_STATUS_SETTLING",
121            LiquidationStatus::Settled => "LIQUIDATION_STATUS_SETTLED",
122        }
123    }
124    /// Creates an enum from field names used in the ProtoBuf definition.
125    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
126        match value {
127            "LIQUIDATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
128            "LIQUIDATION_STATUS_LIQUIDATING" => Some(Self::Liquidating),
129            "LIQUIDATION_STATUS_LIQUIDATED" => Some(Self::Liquidated),
130            "LIQUIDATION_STATUS_SETTLING" => Some(Self::Settling),
131            "LIQUIDATION_STATUS_SETTLED" => Some(Self::Settled),
132            _ => None,
133        }
134    }
135}
136/// Signing intent
137#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
138#[repr(i32)]
139pub enum SigningIntent {
140    Default = 0,
141}
142impl SigningIntent {
143    /// String value of the enum field names used in the ProtoBuf definition.
144    ///
145    /// The values are not transformed in any way and thus are considered stable
146    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
147    pub fn as_str_name(&self) -> &'static str {
148        match self {
149            SigningIntent::Default => "SIGNING_INTENT_DEFAULT",
150        }
151    }
152    /// Creates an enum from field names used in the ProtoBuf definition.
153    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
154        match value {
155            "SIGNING_INTENT_DEFAULT" => Some(Self::Default),
156            _ => None,
157        }
158    }
159}
160/// Params defines the parameters for the module.
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct Params {
164    /// minimum liquidation factor
165    #[prost(string, tag = "1")]
166    pub min_liquidation_factor: ::prost::alloc::string::String,
167    /// liquidation bonus factor
168    #[prost(string, tag = "2")]
169    pub liquidation_bonus_factor: ::prost::alloc::string::String,
170    /// protocol liquidation fee factor
171    #[prost(string, tag = "3")]
172    pub protocol_liquidation_fee_factor: ::prost::alloc::string::String,
173    /// protocol liquidation fee collector
174    #[prost(string, tag = "4")]
175    pub protocol_liquidation_fee_collector: ::prost::alloc::string::String,
176}
177impl ::prost::Name for Params {
178    const NAME: &'static str = "Params";
179    const PACKAGE: &'static str = "side.liquidation";
180    fn full_name() -> ::prost::alloc::string::String {
181        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
182    }
183}
184/// GenesisState defines the liquidation module's genesis state.
185#[allow(clippy::derive_partial_eq_without_eq)]
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct GenesisState {
188    #[prost(message, optional, tag = "1")]
189    pub params: ::core::option::Option<Params>,
190    #[prost(message, repeated, tag = "2")]
191    pub liquidations: ::prost::alloc::vec::Vec<Liquidation>,
192    #[prost(message, repeated, tag = "3")]
193    pub liquidation_records: ::prost::alloc::vec::Vec<LiquidationRecord>,
194}
195impl ::prost::Name for GenesisState {
196    const NAME: &'static str = "GenesisState";
197    const PACKAGE: &'static str = "side.liquidation";
198    fn full_name() -> ::prost::alloc::string::String {
199        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
200    }
201}
202/// QueryParamsRequest is request type for the Query/Params RPC method.
203#[allow(clippy::derive_partial_eq_without_eq)]
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct QueryParamsRequest {}
206impl ::prost::Name for QueryParamsRequest {
207    const NAME: &'static str = "QueryParamsRequest";
208    const PACKAGE: &'static str = "side.liquidation";
209    fn full_name() -> ::prost::alloc::string::String {
210        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
211    }
212}
213/// QueryParamsResponse is response type for the Query/Params RPC method.
214#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct QueryParamsResponse {
217    #[prost(message, optional, tag = "1")]
218    pub params: ::core::option::Option<Params>,
219}
220impl ::prost::Name for QueryParamsResponse {
221    const NAME: &'static str = "QueryParamsResponse";
222    const PACKAGE: &'static str = "side.liquidation";
223    fn full_name() -> ::prost::alloc::string::String {
224        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
225    }
226}
227/// QueryLiquidationRequest is request type for the Query/Liquidation RPC method.
228#[allow(clippy::derive_partial_eq_without_eq)]
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct QueryLiquidationRequest {
231    #[prost(uint64, tag = "1")]
232    pub id: u64,
233}
234impl ::prost::Name for QueryLiquidationRequest {
235    const NAME: &'static str = "QueryLiquidationRequest";
236    const PACKAGE: &'static str = "side.liquidation";
237    fn full_name() -> ::prost::alloc::string::String {
238        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
239    }
240}
241/// QueryLiquidationResponse is response type for the Query/Liquidation RPC method.
242#[allow(clippy::derive_partial_eq_without_eq)]
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct QueryLiquidationResponse {
245    #[prost(message, optional, tag = "1")]
246    pub liquidation: ::core::option::Option<Liquidation>,
247}
248impl ::prost::Name for QueryLiquidationResponse {
249    const NAME: &'static str = "QueryLiquidationResponse";
250    const PACKAGE: &'static str = "side.liquidation";
251    fn full_name() -> ::prost::alloc::string::String {
252        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
253    }
254}
255/// QueryLiquidationsRequest is request type for the Query/Liquidations RPC method.
256#[allow(clippy::derive_partial_eq_without_eq)]
257#[derive(Clone, PartialEq, ::prost::Message)]
258pub struct QueryLiquidationsRequest {
259    #[prost(enumeration = "LiquidationStatus", tag = "1")]
260    pub status: i32,
261    #[prost(message, optional, tag = "2")]
262    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
263}
264impl ::prost::Name for QueryLiquidationsRequest {
265    const NAME: &'static str = "QueryLiquidationsRequest";
266    const PACKAGE: &'static str = "side.liquidation";
267    fn full_name() -> ::prost::alloc::string::String {
268        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
269    }
270}
271/// QueryLiquidationsResponse is response type for the Query/Liquidations RPC method.
272#[allow(clippy::derive_partial_eq_without_eq)]
273#[derive(Clone, PartialEq, ::prost::Message)]
274pub struct QueryLiquidationsResponse {
275    #[prost(message, repeated, tag = "1")]
276    pub liquidations: ::prost::alloc::vec::Vec<Liquidation>,
277    #[prost(message, optional, tag = "2")]
278    pub pagination:
279        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
280}
281impl ::prost::Name for QueryLiquidationsResponse {
282    const NAME: &'static str = "QueryLiquidationsResponse";
283    const PACKAGE: &'static str = "side.liquidation";
284    fn full_name() -> ::prost::alloc::string::String {
285        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
286    }
287}
288/// QueryLiquidationRecordRequest is request type for the Query/LiquidationRecord RPC method.
289#[allow(clippy::derive_partial_eq_without_eq)]
290#[derive(Clone, PartialEq, ::prost::Message)]
291pub struct QueryLiquidationRecordRequest {
292    #[prost(uint64, tag = "1")]
293    pub id: u64,
294}
295impl ::prost::Name for QueryLiquidationRecordRequest {
296    const NAME: &'static str = "QueryLiquidationRecordRequest";
297    const PACKAGE: &'static str = "side.liquidation";
298    fn full_name() -> ::prost::alloc::string::String {
299        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
300    }
301}
302/// QueryLiquidationRecordResponse is response type for the Query/LiquidationRecord RPC method.
303#[allow(clippy::derive_partial_eq_without_eq)]
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct QueryLiquidationRecordResponse {
306    #[prost(message, optional, tag = "1")]
307    pub liquidation_record: ::core::option::Option<LiquidationRecord>,
308}
309impl ::prost::Name for QueryLiquidationRecordResponse {
310    const NAME: &'static str = "QueryLiquidationRecordResponse";
311    const PACKAGE: &'static str = "side.liquidation";
312    fn full_name() -> ::prost::alloc::string::String {
313        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
314    }
315}
316/// QueryLiquidationRecordsRequest is request type for the Query/LiquidationRecords RPC method.
317#[allow(clippy::derive_partial_eq_without_eq)]
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct QueryLiquidationRecordsRequest {
320    #[prost(uint64, tag = "1")]
321    pub liquidation_id: u64,
322    #[prost(message, optional, tag = "2")]
323    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
324}
325impl ::prost::Name for QueryLiquidationRecordsRequest {
326    const NAME: &'static str = "QueryLiquidationRecordsRequest";
327    const PACKAGE: &'static str = "side.liquidation";
328    fn full_name() -> ::prost::alloc::string::String {
329        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
330    }
331}
332/// QueryLiquidationRecordsResponse is response type for the Query/LiquidationRecords RPC method.
333#[allow(clippy::derive_partial_eq_without_eq)]
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct QueryLiquidationRecordsResponse {
336    #[prost(message, repeated, tag = "1")]
337    pub liquidation_records: ::prost::alloc::vec::Vec<LiquidationRecord>,
338    #[prost(message, optional, tag = "2")]
339    pub pagination:
340        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
341}
342impl ::prost::Name for QueryLiquidationRecordsResponse {
343    const NAME: &'static str = "QueryLiquidationRecordsResponse";
344    const PACKAGE: &'static str = "side.liquidation";
345    fn full_name() -> ::prost::alloc::string::String {
346        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
347    }
348}
349/// MsgLiquidate defines the Msg/Liquidate request type.
350#[allow(clippy::derive_partial_eq_without_eq)]
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct MsgLiquidate {
353    #[prost(string, tag = "1")]
354    pub liquidator: ::prost::alloc::string::String,
355    #[prost(uint64, tag = "2")]
356    pub liquidation_id: u64,
357    #[prost(message, optional, tag = "3")]
358    pub debt_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
359}
360impl ::prost::Name for MsgLiquidate {
361    const NAME: &'static str = "MsgLiquidate";
362    const PACKAGE: &'static str = "side.liquidation";
363    fn full_name() -> ::prost::alloc::string::String {
364        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
365    }
366}
367/// MsgLiquidateResponse defines the Msg/Liquidate response type.
368#[allow(clippy::derive_partial_eq_without_eq)]
369#[derive(Clone, PartialEq, ::prost::Message)]
370pub struct MsgLiquidateResponse {}
371impl ::prost::Name for MsgLiquidateResponse {
372    const NAME: &'static str = "MsgLiquidateResponse";
373    const PACKAGE: &'static str = "side.liquidation";
374    fn full_name() -> ::prost::alloc::string::String {
375        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
376    }
377}
378/// MsgUpdateParams is the Msg/UpdateParams request type.
379///
380/// Since: cosmos-sdk 0.47
381#[allow(clippy::derive_partial_eq_without_eq)]
382#[derive(Clone, PartialEq, ::prost::Message)]
383pub struct MsgUpdateParams {
384    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
385    #[prost(string, tag = "1")]
386    pub authority: ::prost::alloc::string::String,
387    /// params defines the x/btcbridge parameters to be updated.
388    ///
389    /// NOTE: All parameters must be supplied.
390    #[prost(message, optional, tag = "2")]
391    pub params: ::core::option::Option<Params>,
392}
393impl ::prost::Name for MsgUpdateParams {
394    const NAME: &'static str = "MsgUpdateParams";
395    const PACKAGE: &'static str = "side.liquidation";
396    fn full_name() -> ::prost::alloc::string::String {
397        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
398    }
399}
400/// MsgUpdateParamsResponse defines the Msg/UpdateParams response type.
401///
402/// Since: cosmos-sdk 0.47
403#[allow(clippy::derive_partial_eq_without_eq)]
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct MsgUpdateParamsResponse {}
406impl ::prost::Name for MsgUpdateParamsResponse {
407    const NAME: &'static str = "MsgUpdateParamsResponse";
408    const PACKAGE: &'static str = "side.liquidation";
409    fn full_name() -> ::prost::alloc::string::String {
410        ::prost::alloc::format!("side.liquidation.{}", Self::NAME)
411    }
412}
413include!("side.liquidation.serde.rs");
414include!("side.liquidation.tonic.rs");
415// @@protoc_insertion_point(module)