elys_std/types/elys/
tier.rs

1use elys_std_deriv::CosmwasmExt;
2/// Params defines the parameters for the module.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(
5    Clone,
6    PartialEq,
7    Eq,
8    ::prost::Message,
9    ::serde::Serialize,
10    ::serde::Deserialize,
11    ::schemars::JsonSchema,
12    CosmwasmExt,
13)]
14#[proto_message(type_url = "/elys.tier.Params")]
15pub struct Params {}
16#[allow(clippy::derive_partial_eq_without_eq)]
17#[derive(
18    Clone,
19    PartialEq,
20    Eq,
21    ::prost::Message,
22    ::serde::Serialize,
23    ::serde::Deserialize,
24    ::schemars::JsonSchema,
25    CosmwasmExt,
26)]
27#[proto_message(type_url = "/elys.tier.LegacyPortfolio")]
28pub struct LegacyPortfolio {
29    #[prost(string, tag = "1")]
30    pub creator: ::prost::alloc::string::String,
31    #[prost(string, tag = "2")]
32    pub portfolio: ::prost::alloc::string::String,
33}
34#[allow(clippy::derive_partial_eq_without_eq)]
35#[derive(
36    Clone,
37    PartialEq,
38    Eq,
39    ::prost::Message,
40    ::serde::Serialize,
41    ::serde::Deserialize,
42    ::schemars::JsonSchema,
43    CosmwasmExt,
44)]
45#[proto_message(type_url = "/elys.tier.Portfolio")]
46pub struct Portfolio {
47    #[prost(string, tag = "1")]
48    pub date: ::prost::alloc::string::String,
49    #[prost(string, tag = "2")]
50    pub creator: ::prost::alloc::string::String,
51    #[prost(string, tag = "3")]
52    pub portfolio: ::prost::alloc::string::String,
53}
54/// GenesisState defines the tier module's genesis state.
55#[allow(clippy::derive_partial_eq_without_eq)]
56#[derive(
57    Clone,
58    PartialEq,
59    Eq,
60    ::prost::Message,
61    ::serde::Serialize,
62    ::serde::Deserialize,
63    ::schemars::JsonSchema,
64    CosmwasmExt,
65)]
66#[proto_message(type_url = "/elys.tier.GenesisState")]
67pub struct GenesisState {
68    #[prost(message, optional, tag = "1")]
69    pub params: ::core::option::Option<Params>,
70    #[prost(message, repeated, tag = "2")]
71    pub portfolio_list: ::prost::alloc::vec::Vec<Portfolio>,
72}
73#[allow(clippy::derive_partial_eq_without_eq)]
74#[derive(
75    Clone,
76    PartialEq,
77    Eq,
78    ::prost::Message,
79    ::serde::Serialize,
80    ::serde::Deserialize,
81    ::schemars::JsonSchema,
82    CosmwasmExt,
83)]
84#[proto_message(type_url = "/elys.tier.UserData")]
85pub struct UserData {
86    #[prost(string, tag = "1")]
87    pub user: ::prost::alloc::string::String,
88    #[prost(message, repeated, tag = "2")]
89    pub pools: ::prost::alloc::vec::Vec<Pool>,
90}
91#[allow(clippy::derive_partial_eq_without_eq)]
92#[derive(
93    Clone,
94    PartialEq,
95    Eq,
96    ::prost::Message,
97    ::serde::Serialize,
98    ::serde::Deserialize,
99    ::schemars::JsonSchema,
100    CosmwasmExt,
101)]
102#[proto_message(type_url = "/elys.tier.Pool")]
103pub struct Pool {
104    #[prost(string, tag = "1")]
105    #[serde(alias = "poolID")]
106    pub pool_id: ::prost::alloc::string::String,
107    #[prost(string, tag = "2")]
108    pub pool: ::prost::alloc::string::String,
109    #[prost(string, tag = "3")]
110    pub fiat_value: ::prost::alloc::string::String,
111    #[prost(string, tag = "4")]
112    pub amount: ::prost::alloc::string::String,
113}
114#[allow(clippy::derive_partial_eq_without_eq)]
115#[derive(
116    Clone,
117    PartialEq,
118    Eq,
119    ::prost::Message,
120    ::serde::Serialize,
121    ::serde::Deserialize,
122    ::schemars::JsonSchema,
123    CosmwasmExt,
124)]
125#[proto_message(type_url = "/elys.tier.MembershipTier")]
126pub struct MembershipTier {
127    #[prost(string, tag = "1")]
128    pub minimum_portfolio: ::prost::alloc::string::String,
129    #[prost(enumeration = "MembershipTierType", tag = "2")]
130    #[serde(
131        serialize_with = "crate::serde::as_str::serialize",
132        deserialize_with = "crate::serde::as_str::deserialize"
133    )]
134    pub membership: i32,
135    #[prost(string, tag = "3")]
136    pub discount: ::prost::alloc::string::String,
137}
138#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
139#[repr(i32)]
140#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
141pub enum MembershipTierType {
142    Basic = 0,
143    Bronze = 1,
144    Silver = 2,
145    Gold = 3,
146    Platinum = 4,
147}
148impl MembershipTierType {
149    /// String value of the enum field names used in the ProtoBuf definition.
150    ///
151    /// The values are not transformed in any way and thus are considered stable
152    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
153    pub fn as_str_name(&self) -> &'static str {
154        match self {
155            MembershipTierType::Basic => "BASIC",
156            MembershipTierType::Bronze => "BRONZE",
157            MembershipTierType::Silver => "SILVER",
158            MembershipTierType::Gold => "GOLD",
159            MembershipTierType::Platinum => "PLATINUM",
160        }
161    }
162    /// Creates an enum from field names used in the ProtoBuf definition.
163    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
164        match value {
165            "BASIC" => Some(Self::Basic),
166            "BRONZE" => Some(Self::Bronze),
167            "SILVER" => Some(Self::Silver),
168            "GOLD" => Some(Self::Gold),
169            "PLATINUM" => Some(Self::Platinum),
170            _ => None,
171        }
172    }
173}
174/// QueryParamsRequest is request type for the Query/Params RPC method.
175#[allow(clippy::derive_partial_eq_without_eq)]
176#[derive(
177    Clone,
178    PartialEq,
179    Eq,
180    ::prost::Message,
181    ::serde::Serialize,
182    ::serde::Deserialize,
183    ::schemars::JsonSchema,
184    CosmwasmExt,
185)]
186#[proto_message(type_url = "/elys.tier.QueryParamsRequest")]
187#[proto_query(path = "/elys.tier.Query/Params", response_type = QueryParamsResponse)]
188pub struct QueryParamsRequest {}
189/// QueryParamsResponse is response type for the Query/Params RPC method.
190#[allow(clippy::derive_partial_eq_without_eq)]
191#[derive(
192    Clone,
193    PartialEq,
194    Eq,
195    ::prost::Message,
196    ::serde::Serialize,
197    ::serde::Deserialize,
198    ::schemars::JsonSchema,
199    CosmwasmExt,
200)]
201#[proto_message(type_url = "/elys.tier.QueryParamsResponse")]
202pub struct QueryParamsResponse {
203    /// params holds all the parameters of this module.
204    #[prost(message, optional, tag = "1")]
205    pub params: ::core::option::Option<Params>,
206}
207#[allow(clippy::derive_partial_eq_without_eq)]
208#[derive(
209    Clone,
210    PartialEq,
211    Eq,
212    ::prost::Message,
213    ::serde::Serialize,
214    ::serde::Deserialize,
215    ::schemars::JsonSchema,
216    CosmwasmExt,
217)]
218#[proto_message(type_url = "/elys.tier.QueryGetPortfolioRequest")]
219#[proto_query(
220    path = "/elys.tier.Query/Portfolio",
221    response_type = QueryGetPortfolioResponse
222)]
223pub struct QueryGetPortfolioRequest {
224    #[prost(string, tag = "1")]
225    pub user: ::prost::alloc::string::String,
226}
227#[allow(clippy::derive_partial_eq_without_eq)]
228#[derive(
229    Clone,
230    PartialEq,
231    Eq,
232    ::prost::Message,
233    ::serde::Serialize,
234    ::serde::Deserialize,
235    ::schemars::JsonSchema,
236    CosmwasmExt,
237)]
238#[proto_message(type_url = "/elys.tier.QueryGetPortfolioResponse")]
239pub struct QueryGetPortfolioResponse {
240    #[prost(string, tag = "1")]
241    pub total_portfolio: ::prost::alloc::string::String,
242}
243#[allow(clippy::derive_partial_eq_without_eq)]
244#[derive(
245    Clone,
246    PartialEq,
247    Eq,
248    ::prost::Message,
249    ::serde::Serialize,
250    ::serde::Deserialize,
251    ::schemars::JsonSchema,
252    CosmwasmExt,
253)]
254#[proto_message(type_url = "/elys.tier.QueryAllPortfolioRequest")]
255#[proto_query(
256    path = "/elys.tier.Query/PortfolioAll",
257    response_type = QueryAllPortfolioResponse
258)]
259pub struct QueryAllPortfolioRequest {
260    #[prost(message, optional, tag = "1")]
261    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
262}
263#[allow(clippy::derive_partial_eq_without_eq)]
264#[derive(
265    Clone,
266    PartialEq,
267    Eq,
268    ::prost::Message,
269    ::serde::Serialize,
270    ::serde::Deserialize,
271    ::schemars::JsonSchema,
272    CosmwasmExt,
273)]
274#[proto_message(type_url = "/elys.tier.QueryAllPortfolioResponse")]
275pub struct QueryAllPortfolioResponse {
276    #[prost(message, repeated, tag = "1")]
277    pub portfolio: ::prost::alloc::vec::Vec<Portfolio>,
278    #[prost(message, optional, tag = "2")]
279    pub pagination:
280        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
281}
282#[allow(clippy::derive_partial_eq_without_eq)]
283#[derive(
284    Clone,
285    PartialEq,
286    Eq,
287    ::prost::Message,
288    ::serde::Serialize,
289    ::serde::Deserialize,
290    ::schemars::JsonSchema,
291    CosmwasmExt,
292)]
293#[proto_message(type_url = "/elys.tier.QueryCalculateDiscountRequest")]
294#[proto_query(
295    path = "/elys.tier.Query/CalculateDiscount",
296    response_type = QueryCalculateDiscountResponse
297)]
298pub struct QueryCalculateDiscountRequest {
299    #[prost(string, tag = "1")]
300    pub user: ::prost::alloc::string::String,
301}
302#[allow(clippy::derive_partial_eq_without_eq)]
303#[derive(
304    Clone,
305    PartialEq,
306    Eq,
307    ::prost::Message,
308    ::serde::Serialize,
309    ::serde::Deserialize,
310    ::schemars::JsonSchema,
311    CosmwasmExt,
312)]
313#[proto_message(type_url = "/elys.tier.QueryCalculateDiscountResponse")]
314pub struct QueryCalculateDiscountResponse {
315    #[prost(message, optional, tag = "1")]
316    pub membership_tier: ::core::option::Option<MembershipTier>,
317    #[prost(string, tag = "2")]
318    pub portfolio: ::prost::alloc::string::String,
319}
320#[allow(clippy::derive_partial_eq_without_eq)]
321#[derive(
322    Clone,
323    PartialEq,
324    Eq,
325    ::prost::Message,
326    ::serde::Serialize,
327    ::serde::Deserialize,
328    ::schemars::JsonSchema,
329    CosmwasmExt,
330)]
331#[proto_message(type_url = "/elys.tier.QueryLeverageLpTotalRequest")]
332#[proto_query(
333    path = "/elys.tier.Query/LeverageLpTotal",
334    response_type = QueryLeverageLpTotalResponse
335)]
336pub struct QueryLeverageLpTotalRequest {
337    #[prost(string, tag = "1")]
338    pub user: ::prost::alloc::string::String,
339}
340#[allow(clippy::derive_partial_eq_without_eq)]
341#[derive(
342    Clone,
343    PartialEq,
344    Eq,
345    ::prost::Message,
346    ::serde::Serialize,
347    ::serde::Deserialize,
348    ::schemars::JsonSchema,
349    CosmwasmExt,
350)]
351#[proto_message(type_url = "/elys.tier.QueryLeverageLpTotalResponse")]
352pub struct QueryLeverageLpTotalResponse {
353    #[prost(string, tag = "1")]
354    pub total_value: ::prost::alloc::string::String,
355    #[prost(string, tag = "2")]
356    pub total_borrows: ::prost::alloc::string::String,
357}
358#[allow(clippy::derive_partial_eq_without_eq)]
359#[derive(
360    Clone,
361    PartialEq,
362    Eq,
363    ::prost::Message,
364    ::serde::Serialize,
365    ::serde::Deserialize,
366    ::schemars::JsonSchema,
367    CosmwasmExt,
368)]
369#[proto_message(type_url = "/elys.tier.QueryRewardsTotalRequest")]
370#[proto_query(
371    path = "/elys.tier.Query/RewardsTotal",
372    response_type = QueryRewardsTotalResponse
373)]
374pub struct QueryRewardsTotalRequest {
375    #[prost(string, tag = "1")]
376    pub user: ::prost::alloc::string::String,
377}
378#[allow(clippy::derive_partial_eq_without_eq)]
379#[derive(
380    Clone,
381    PartialEq,
382    Eq,
383    ::prost::Message,
384    ::serde::Serialize,
385    ::serde::Deserialize,
386    ::schemars::JsonSchema,
387    CosmwasmExt,
388)]
389#[proto_message(type_url = "/elys.tier.QueryRewardsTotalResponse")]
390pub struct QueryRewardsTotalResponse {
391    #[prost(string, tag = "1")]
392    pub total: ::prost::alloc::string::String,
393}
394#[allow(clippy::derive_partial_eq_without_eq)]
395#[derive(
396    Clone,
397    PartialEq,
398    Eq,
399    ::prost::Message,
400    ::serde::Serialize,
401    ::serde::Deserialize,
402    ::schemars::JsonSchema,
403    CosmwasmExt,
404)]
405#[proto_message(type_url = "/elys.tier.QueryStakedPoolRequest")]
406#[proto_query(
407    path = "/elys.tier.Query/StakedPool",
408    response_type = QueryStakedPoolResponse
409)]
410pub struct QueryStakedPoolRequest {
411    #[prost(string, tag = "1")]
412    pub user: ::prost::alloc::string::String,
413}
414#[allow(clippy::derive_partial_eq_without_eq)]
415#[derive(
416    Clone,
417    PartialEq,
418    Eq,
419    ::prost::Message,
420    ::serde::Serialize,
421    ::serde::Deserialize,
422    ::schemars::JsonSchema,
423    CosmwasmExt,
424)]
425#[proto_message(type_url = "/elys.tier.QueryStakedPoolResponse")]
426pub struct QueryStakedPoolResponse {
427    #[prost(string, tag = "1")]
428    pub total: ::prost::alloc::string::String,
429}
430#[allow(clippy::derive_partial_eq_without_eq)]
431#[derive(
432    Clone,
433    PartialEq,
434    Eq,
435    ::prost::Message,
436    ::serde::Serialize,
437    ::serde::Deserialize,
438    ::schemars::JsonSchema,
439    CosmwasmExt,
440)]
441#[proto_message(type_url = "/elys.tier.QueryPerpetualRequest")]
442#[proto_query(
443    path = "/elys.tier.Query/Perpetual",
444    response_type = QueryPerpetualResponse
445)]
446pub struct QueryPerpetualRequest {
447    #[prost(string, tag = "1")]
448    pub user: ::prost::alloc::string::String,
449}
450#[allow(clippy::derive_partial_eq_without_eq)]
451#[derive(
452    Clone,
453    PartialEq,
454    Eq,
455    ::prost::Message,
456    ::serde::Serialize,
457    ::serde::Deserialize,
458    ::schemars::JsonSchema,
459    CosmwasmExt,
460)]
461#[proto_message(type_url = "/elys.tier.QueryPerpetualResponse")]
462pub struct QueryPerpetualResponse {
463    #[prost(string, tag = "1")]
464    pub total_value: ::prost::alloc::string::String,
465    #[prost(string, tag = "2")]
466    pub total_borrows: ::prost::alloc::string::String,
467}
468#[allow(clippy::derive_partial_eq_without_eq)]
469#[derive(
470    Clone,
471    PartialEq,
472    Eq,
473    ::prost::Message,
474    ::serde::Serialize,
475    ::serde::Deserialize,
476    ::schemars::JsonSchema,
477    CosmwasmExt,
478)]
479#[proto_message(type_url = "/elys.tier.QueryLiquidTotalRequest")]
480#[proto_query(
481    path = "/elys.tier.Query/LiquidTotal",
482    response_type = QueryLiquidTotalResponse
483)]
484pub struct QueryLiquidTotalRequest {
485    #[prost(string, tag = "1")]
486    pub user: ::prost::alloc::string::String,
487}
488#[allow(clippy::derive_partial_eq_without_eq)]
489#[derive(
490    Clone,
491    PartialEq,
492    Eq,
493    ::prost::Message,
494    ::serde::Serialize,
495    ::serde::Deserialize,
496    ::schemars::JsonSchema,
497    CosmwasmExt,
498)]
499#[proto_message(type_url = "/elys.tier.QueryLiquidTotalResponse")]
500pub struct QueryLiquidTotalResponse {
501    #[prost(string, tag = "1")]
502    pub total: ::prost::alloc::string::String,
503}
504#[allow(clippy::derive_partial_eq_without_eq)]
505#[derive(
506    Clone,
507    PartialEq,
508    Eq,
509    ::prost::Message,
510    ::serde::Serialize,
511    ::serde::Deserialize,
512    ::schemars::JsonSchema,
513    CosmwasmExt,
514)]
515#[proto_message(type_url = "/elys.tier.QueryLockedOrderRequest")]
516#[proto_query(
517    path = "/elys.tier.Query/LockedOrder",
518    response_type = QueryLockedOrderResponse
519)]
520pub struct QueryLockedOrderRequest {
521    #[prost(string, tag = "1")]
522    pub user: ::prost::alloc::string::String,
523}
524#[allow(clippy::derive_partial_eq_without_eq)]
525#[derive(
526    Clone,
527    PartialEq,
528    Eq,
529    ::prost::Message,
530    ::serde::Serialize,
531    ::serde::Deserialize,
532    ::schemars::JsonSchema,
533    CosmwasmExt,
534)]
535#[proto_message(type_url = "/elys.tier.QueryLockedOrderResponse")]
536pub struct QueryLockedOrderResponse {
537    #[prost(string, tag = "1")]
538    pub total: ::prost::alloc::string::String,
539}
540#[allow(clippy::derive_partial_eq_without_eq)]
541#[derive(
542    Clone,
543    PartialEq,
544    Eq,
545    ::prost::Message,
546    ::serde::Serialize,
547    ::serde::Deserialize,
548    ::schemars::JsonSchema,
549    CosmwasmExt,
550)]
551#[proto_message(type_url = "/elys.tier.QueryGetAmmPriceRequest")]
552#[proto_query(
553    path = "/elys.tier.Query/GetAmmPrice",
554    response_type = QueryGetAmmPriceResponse
555)]
556pub struct QueryGetAmmPriceRequest {
557    #[prost(string, tag = "1")]
558    pub denom: ::prost::alloc::string::String,
559    #[prost(int32, tag = "2")]
560    #[serde(
561        serialize_with = "crate::serde::as_str::serialize",
562        deserialize_with = "crate::serde::as_str::deserialize"
563    )]
564    pub decimal: i32,
565}
566/// We use a submessage to avoid the issue with the gRPC codec
567/// <https://github.com/cosmos/cosmos-sdk/issues/18430>
568#[allow(clippy::derive_partial_eq_without_eq)]
569#[derive(
570    Clone,
571    PartialEq,
572    Eq,
573    ::prost::Message,
574    ::serde::Serialize,
575    ::serde::Deserialize,
576    ::schemars::JsonSchema,
577    CosmwasmExt,
578)]
579#[proto_message(type_url = "/elys.tier.GetAmmPriceResponseResult")]
580pub struct GetAmmPriceResponseResult {
581    #[prost(string, tag = "1")]
582    pub total: ::prost::alloc::string::String,
583}
584#[allow(clippy::derive_partial_eq_without_eq)]
585#[derive(
586    Clone,
587    PartialEq,
588    Eq,
589    ::prost::Message,
590    ::serde::Serialize,
591    ::serde::Deserialize,
592    ::schemars::JsonSchema,
593    CosmwasmExt,
594)]
595#[proto_message(type_url = "/elys.tier.QueryGetAmmPriceResponse")]
596pub struct QueryGetAmmPriceResponse {
597    #[prost(message, optional, tag = "1")]
598    pub result: ::core::option::Option<GetAmmPriceResponseResult>,
599}
600#[allow(clippy::derive_partial_eq_without_eq)]
601#[derive(
602    Clone,
603    PartialEq,
604    Eq,
605    ::prost::Message,
606    ::serde::Serialize,
607    ::serde::Deserialize,
608    ::schemars::JsonSchema,
609    CosmwasmExt,
610)]
611#[proto_message(type_url = "/elys.tier.QueryGetConsolidatedPriceRequest")]
612#[proto_query(
613    path = "/elys.tier.Query/GetConsolidatedPrice",
614    response_type = QueryGetConsolidatedPriceResponse
615)]
616pub struct QueryGetConsolidatedPriceRequest {
617    #[prost(string, tag = "1")]
618    pub denom: ::prost::alloc::string::String,
619}
620#[allow(clippy::derive_partial_eq_without_eq)]
621#[derive(
622    Clone,
623    PartialEq,
624    Eq,
625    ::prost::Message,
626    ::serde::Serialize,
627    ::serde::Deserialize,
628    ::schemars::JsonSchema,
629    CosmwasmExt,
630)]
631#[proto_message(type_url = "/elys.tier.QueryGetConsolidatedPriceResponse")]
632pub struct QueryGetConsolidatedPriceResponse {
633    #[prost(string, tag = "1")]
634    pub amm_price: ::prost::alloc::string::String,
635    #[prost(string, tag = "2")]
636    pub oracle_price: ::prost::alloc::string::String,
637    #[prost(string, tag = "3")]
638    pub oracle_price_dec: ::prost::alloc::string::String,
639}
640#[allow(clippy::derive_partial_eq_without_eq)]
641#[derive(
642    Clone,
643    PartialEq,
644    Eq,
645    ::prost::Message,
646    ::serde::Serialize,
647    ::serde::Deserialize,
648    ::schemars::JsonSchema,
649    CosmwasmExt,
650)]
651#[proto_message(type_url = "/elys.tier.QueryStakedRequest")]
652#[proto_query(path = "/elys.tier.Query/Staked", response_type = QueryStakedResponse)]
653pub struct QueryStakedRequest {
654    #[prost(string, tag = "1")]
655    pub user: ::prost::alloc::string::String,
656}
657#[allow(clippy::derive_partial_eq_without_eq)]
658#[derive(
659    Clone,
660    PartialEq,
661    Eq,
662    ::prost::Message,
663    ::serde::Serialize,
664    ::serde::Deserialize,
665    ::schemars::JsonSchema,
666    CosmwasmExt,
667)]
668#[proto_message(type_url = "/elys.tier.QueryStakedResponse")]
669pub struct QueryStakedResponse {
670    #[prost(string, tag = "1")]
671    pub commitments: ::prost::alloc::string::String,
672    #[prost(string, tag = "2")]
673    pub delegations: ::prost::alloc::string::String,
674    #[prost(string, tag = "3")]
675    pub unbondings: ::prost::alloc::string::String,
676    #[prost(string, tag = "4")]
677    pub total_vested: ::prost::alloc::string::String,
678}
679#[allow(clippy::derive_partial_eq_without_eq)]
680#[derive(
681    Clone,
682    PartialEq,
683    Eq,
684    ::prost::Message,
685    ::serde::Serialize,
686    ::serde::Deserialize,
687    ::schemars::JsonSchema,
688    CosmwasmExt,
689)]
690#[proto_message(type_url = "/elys.tier.QueryGetUsersPoolDataRequest")]
691#[proto_query(
692    path = "/elys.tier.Query/GetUsersPoolData",
693    response_type = QueryGetUsersPoolDataResponse
694)]
695pub struct QueryGetUsersPoolDataRequest {
696    #[prost(message, optional, tag = "1")]
697    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
698}
699#[allow(clippy::derive_partial_eq_without_eq)]
700#[derive(
701    Clone,
702    PartialEq,
703    Eq,
704    ::prost::Message,
705    ::serde::Serialize,
706    ::serde::Deserialize,
707    ::schemars::JsonSchema,
708    CosmwasmExt,
709)]
710#[proto_message(type_url = "/elys.tier.QueryGetUsersPoolDataResponse")]
711pub struct QueryGetUsersPoolDataResponse {
712    #[prost(message, repeated, tag = "1")]
713    pub users: ::prost::alloc::vec::Vec<UserData>,
714    #[prost(message, optional, tag = "2")]
715    pub pagination:
716        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
717}
718#[allow(clippy::derive_partial_eq_without_eq)]
719#[derive(
720    Clone,
721    PartialEq,
722    Eq,
723    ::prost::Message,
724    ::serde::Serialize,
725    ::serde::Deserialize,
726    ::schemars::JsonSchema,
727    CosmwasmExt,
728)]
729#[proto_message(type_url = "/elys.tier.Price")]
730pub struct Price {
731    #[prost(string, tag = "1")]
732    pub denom: ::prost::alloc::string::String,
733    #[prost(string, tag = "2")]
734    pub oracle_price: ::prost::alloc::string::String,
735    #[prost(string, tag = "3")]
736    pub amm_price: ::prost::alloc::string::String,
737}
738#[allow(clippy::derive_partial_eq_without_eq)]
739#[derive(
740    Clone,
741    PartialEq,
742    Eq,
743    ::prost::Message,
744    ::serde::Serialize,
745    ::serde::Deserialize,
746    ::schemars::JsonSchema,
747    CosmwasmExt,
748)]
749#[proto_message(type_url = "/elys.tier.QueryGetAllPricesRequest")]
750#[proto_query(
751    path = "/elys.tier.Query/GetAllPrices",
752    response_type = QueryGetAllPricesResponse
753)]
754pub struct QueryGetAllPricesRequest {
755    #[prost(message, optional, tag = "1")]
756    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
757}
758#[allow(clippy::derive_partial_eq_without_eq)]
759#[derive(
760    Clone,
761    PartialEq,
762    Eq,
763    ::prost::Message,
764    ::serde::Serialize,
765    ::serde::Deserialize,
766    ::schemars::JsonSchema,
767    CosmwasmExt,
768)]
769#[proto_message(type_url = "/elys.tier.QueryGetAllPricesResponse")]
770pub struct QueryGetAllPricesResponse {
771    #[prost(message, repeated, tag = "1")]
772    pub prices: ::prost::alloc::vec::Vec<Price>,
773    #[prost(message, optional, tag = "2")]
774    pub pagination:
775        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
776}
777#[allow(clippy::derive_partial_eq_without_eq)]
778#[derive(
779    Clone,
780    PartialEq,
781    Eq,
782    ::prost::Message,
783    ::serde::Serialize,
784    ::serde::Deserialize,
785    ::schemars::JsonSchema,
786    CosmwasmExt,
787)]
788#[proto_message(type_url = "/elys.tier.MsgSetPortfolio")]
789pub struct MsgSetPortfolio {
790    #[prost(string, tag = "1")]
791    pub creator: ::prost::alloc::string::String,
792    #[prost(string, tag = "2")]
793    pub user: ::prost::alloc::string::String,
794}
795#[allow(clippy::derive_partial_eq_without_eq)]
796#[derive(
797    Clone,
798    PartialEq,
799    Eq,
800    ::prost::Message,
801    ::serde::Serialize,
802    ::serde::Deserialize,
803    ::schemars::JsonSchema,
804    CosmwasmExt,
805)]
806#[proto_message(type_url = "/elys.tier.MsgSetPortfolioResponse")]
807pub struct MsgSetPortfolioResponse {}
808pub struct TierQuerier<'a, Q: cosmwasm_std::CustomQuery> {
809    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
810}
811impl<'a, Q: cosmwasm_std::CustomQuery> TierQuerier<'a, Q> {
812    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
813        Self { querier }
814    }
815    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
816        QueryParamsRequest {}.query(self.querier)
817    }
818    pub fn portfolio(
819        &self,
820        user: ::prost::alloc::string::String,
821    ) -> Result<QueryGetPortfolioResponse, cosmwasm_std::StdError> {
822        QueryGetPortfolioRequest { user }.query(self.querier)
823    }
824    pub fn portfolio_all(
825        &self,
826        pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
827    ) -> Result<QueryAllPortfolioResponse, cosmwasm_std::StdError> {
828        QueryAllPortfolioRequest { pagination }.query(self.querier)
829    }
830    pub fn calculate_discount(
831        &self,
832        user: ::prost::alloc::string::String,
833    ) -> Result<QueryCalculateDiscountResponse, cosmwasm_std::StdError> {
834        QueryCalculateDiscountRequest { user }.query(self.querier)
835    }
836    pub fn leverage_lp_total(
837        &self,
838        user: ::prost::alloc::string::String,
839    ) -> Result<QueryLeverageLpTotalResponse, cosmwasm_std::StdError> {
840        QueryLeverageLpTotalRequest { user }.query(self.querier)
841    }
842    pub fn rewards_total(
843        &self,
844        user: ::prost::alloc::string::String,
845    ) -> Result<QueryRewardsTotalResponse, cosmwasm_std::StdError> {
846        QueryRewardsTotalRequest { user }.query(self.querier)
847    }
848    pub fn staked_pool(
849        &self,
850        user: ::prost::alloc::string::String,
851    ) -> Result<QueryStakedPoolResponse, cosmwasm_std::StdError> {
852        QueryStakedPoolRequest { user }.query(self.querier)
853    }
854    pub fn perpetual(
855        &self,
856        user: ::prost::alloc::string::String,
857    ) -> Result<QueryPerpetualResponse, cosmwasm_std::StdError> {
858        QueryPerpetualRequest { user }.query(self.querier)
859    }
860    pub fn liquid_total(
861        &self,
862        user: ::prost::alloc::string::String,
863    ) -> Result<QueryLiquidTotalResponse, cosmwasm_std::StdError> {
864        QueryLiquidTotalRequest { user }.query(self.querier)
865    }
866    pub fn locked_order(
867        &self,
868        user: ::prost::alloc::string::String,
869    ) -> Result<QueryLockedOrderResponse, cosmwasm_std::StdError> {
870        QueryLockedOrderRequest { user }.query(self.querier)
871    }
872    pub fn get_amm_price(
873        &self,
874        denom: ::prost::alloc::string::String,
875        decimal: i32,
876    ) -> Result<QueryGetAmmPriceResponse, cosmwasm_std::StdError> {
877        QueryGetAmmPriceRequest { denom, decimal }.query(self.querier)
878    }
879    pub fn get_consolidated_price(
880        &self,
881        denom: ::prost::alloc::string::String,
882    ) -> Result<QueryGetConsolidatedPriceResponse, cosmwasm_std::StdError> {
883        QueryGetConsolidatedPriceRequest { denom }.query(self.querier)
884    }
885    pub fn staked(
886        &self,
887        user: ::prost::alloc::string::String,
888    ) -> Result<QueryStakedResponse, cosmwasm_std::StdError> {
889        QueryStakedRequest { user }.query(self.querier)
890    }
891    pub fn get_users_pool_data(
892        &self,
893        pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
894    ) -> Result<QueryGetUsersPoolDataResponse, cosmwasm_std::StdError> {
895        QueryGetUsersPoolDataRequest { pagination }.query(self.querier)
896    }
897    pub fn get_all_prices(
898        &self,
899        pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
900    ) -> Result<QueryGetAllPricesResponse, cosmwasm_std::StdError> {
901        QueryGetAllPricesRequest { pagination }.query(self.querier)
902    }
903}