1use provwasm_proc_macro::CosmwasmExt;
2#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
5#[proto_message(type_url = "/cosmos.sanction.v1beta1.EventAddressSanctioned")]
6pub struct EventAddressSanctioned {
7 #[prost(string, tag = "1")]
8 pub address: ::prost::alloc::string::String,
9}
10#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
13#[proto_message(type_url = "/cosmos.sanction.v1beta1.EventAddressUnsanctioned")]
14pub struct EventAddressUnsanctioned {
15 #[prost(string, tag = "1")]
16 pub address: ::prost::alloc::string::String,
17}
18#[allow(clippy::derive_partial_eq_without_eq)]
20#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
21#[proto_message(type_url = "/cosmos.sanction.v1beta1.EventTempAddressSanctioned")]
22pub struct EventTempAddressSanctioned {
23 #[prost(string, tag = "1")]
24 pub address: ::prost::alloc::string::String,
25}
26#[allow(clippy::derive_partial_eq_without_eq)]
28#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
29#[proto_message(type_url = "/cosmos.sanction.v1beta1.EventTempAddressUnsanctioned")]
30pub struct EventTempAddressUnsanctioned {
31 #[prost(string, tag = "1")]
32 pub address: ::prost::alloc::string::String,
33}
34#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
37#[proto_message(type_url = "/cosmos.sanction.v1beta1.EventParamsUpdated")]
38pub struct EventParamsUpdated {}
39#[allow(clippy::derive_partial_eq_without_eq)]
41#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
42#[proto_message(type_url = "/cosmos.sanction.v1beta1.Params")]
43pub struct Params {
44 #[prost(message, repeated, tag = "1")]
49 pub immediate_sanction_min_deposit: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
50 #[prost(message, repeated, tag = "2")]
55 pub immediate_unsanction_min_deposit:
56 ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
57}
58#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
61#[proto_message(type_url = "/cosmos.sanction.v1beta1.TemporaryEntry")]
62pub struct TemporaryEntry {
63 #[prost(string, tag = "1")]
65 pub address: ::prost::alloc::string::String,
66 #[prost(uint64, tag = "2")]
68 pub proposal_id: u64,
69 #[prost(enumeration = "TempStatus", tag = "3")]
71 pub status: i32,
72}
73#[derive(
75 Clone,
76 Copy,
77 Debug,
78 PartialEq,
79 Eq,
80 Hash,
81 PartialOrd,
82 Ord,
83 ::prost::Enumeration,
84 ::schemars::JsonSchema,
85)]
86#[repr(i32)]
87pub enum TempStatus {
88 Unspecified = 0,
90 Sanctioned = 1,
92 Unsanctioned = 2,
94}
95impl TempStatus {
96 pub fn as_str_name(&self) -> &'static str {
101 match self {
102 TempStatus::Unspecified => "TEMP_STATUS_UNSPECIFIED",
103 TempStatus::Sanctioned => "TEMP_STATUS_SANCTIONED",
104 TempStatus::Unsanctioned => "TEMP_STATUS_UNSANCTIONED",
105 }
106 }
107 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
109 match value {
110 "TEMP_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
111 "TEMP_STATUS_SANCTIONED" => Some(Self::Sanctioned),
112 "TEMP_STATUS_UNSANCTIONED" => Some(Self::Unsanctioned),
113 _ => None,
114 }
115 }
116}
117#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
120#[proto_message(type_url = "/cosmos.sanction.v1beta1.GenesisState")]
121pub struct GenesisState {
122 #[prost(message, optional, tag = "1")]
124 pub params: ::core::option::Option<Params>,
125 #[prost(string, repeated, tag = "2")]
127 pub sanctioned_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
128 #[prost(message, repeated, tag = "3")]
130 pub temporary_entries: ::prost::alloc::vec::Vec<TemporaryEntry>,
131}
132#[allow(clippy::derive_partial_eq_without_eq)]
134#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
135#[proto_message(type_url = "/cosmos.sanction.v1beta1.QueryIsSanctionedRequest")]
136#[proto_query(
137 path = "/cosmos.sanction.v1beta1.Query/IsSanctioned",
138 response_type = QueryIsSanctionedResponse
139)]
140pub struct QueryIsSanctionedRequest {
141 #[prost(string, tag = "1")]
142 pub address: ::prost::alloc::string::String,
143}
144#[allow(clippy::derive_partial_eq_without_eq)]
146#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
147#[proto_message(type_url = "/cosmos.sanction.v1beta1.QueryIsSanctionedResponse")]
148pub struct QueryIsSanctionedResponse {
149 #[prost(bool, tag = "1")]
151 pub is_sanctioned: bool,
152}
153#[allow(clippy::derive_partial_eq_without_eq)]
155#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
156#[proto_message(type_url = "/cosmos.sanction.v1beta1.QuerySanctionedAddressesRequest")]
157#[proto_query(
158 path = "/cosmos.sanction.v1beta1.Query/SanctionedAddresses",
159 response_type = QuerySanctionedAddressesResponse
160)]
161pub struct QuerySanctionedAddressesRequest {
162 #[prost(message, optional, tag = "99")]
164 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
165}
166#[allow(clippy::derive_partial_eq_without_eq)]
168#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
169#[proto_message(type_url = "/cosmos.sanction.v1beta1.QuerySanctionedAddressesResponse")]
170pub struct QuerySanctionedAddressesResponse {
171 #[prost(string, repeated, tag = "1")]
173 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
174 #[prost(message, optional, tag = "99")]
176 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
177}
178#[allow(clippy::derive_partial_eq_without_eq)]
180#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
181#[proto_message(type_url = "/cosmos.sanction.v1beta1.QueryTemporaryEntriesRequest")]
182#[proto_query(
183 path = "/cosmos.sanction.v1beta1.Query/TemporaryEntries",
184 response_type = QueryTemporaryEntriesResponse
185)]
186pub struct QueryTemporaryEntriesRequest {
187 #[prost(string, tag = "1")]
189 pub address: ::prost::alloc::string::String,
190 #[prost(message, optional, tag = "99")]
192 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
193}
194#[allow(clippy::derive_partial_eq_without_eq)]
196#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
197#[proto_message(type_url = "/cosmos.sanction.v1beta1.QueryTemporaryEntriesResponse")]
198pub struct QueryTemporaryEntriesResponse {
199 #[prost(message, repeated, tag = "1")]
200 pub entries: ::prost::alloc::vec::Vec<TemporaryEntry>,
201 #[prost(message, optional, tag = "99")]
203 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
204}
205#[allow(clippy::derive_partial_eq_without_eq)]
207#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
208#[proto_message(type_url = "/cosmos.sanction.v1beta1.QueryParamsRequest")]
209#[proto_query(
210 path = "/cosmos.sanction.v1beta1.Query/Params",
211 response_type = QueryParamsResponse
212)]
213pub struct QueryParamsRequest {}
214#[allow(clippy::derive_partial_eq_without_eq)]
216#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
217#[proto_message(type_url = "/cosmos.sanction.v1beta1.QueryParamsResponse")]
218pub struct QueryParamsResponse {
219 #[prost(message, optional, tag = "1")]
221 pub params: ::core::option::Option<Params>,
222}
223#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
226#[proto_message(type_url = "/cosmos.sanction.v1beta1.MsgSanction")]
227pub struct MsgSanction {
228 #[prost(string, repeated, tag = "1")]
230 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
231 #[prost(string, tag = "2")]
234 pub authority: ::prost::alloc::string::String,
235}
236#[allow(clippy::derive_partial_eq_without_eq)]
238#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
239#[proto_message(type_url = "/cosmos.sanction.v1beta1.MsgSanctionResponse")]
240pub struct MsgSanctionResponse {}
241#[allow(clippy::derive_partial_eq_without_eq)]
243#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
244#[proto_message(type_url = "/cosmos.sanction.v1beta1.MsgUnsanction")]
245pub struct MsgUnsanction {
246 #[prost(string, repeated, tag = "1")]
248 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
249 #[prost(string, tag = "2")]
252 pub authority: ::prost::alloc::string::String,
253}
254#[allow(clippy::derive_partial_eq_without_eq)]
256#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
257#[proto_message(type_url = "/cosmos.sanction.v1beta1.MsgUnsanctionResponse")]
258pub struct MsgUnsanctionResponse {}
259#[allow(clippy::derive_partial_eq_without_eq)]
261#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
262#[proto_message(type_url = "/cosmos.sanction.v1beta1.MsgUpdateParams")]
263pub struct MsgUpdateParams {
264 #[prost(message, optional, tag = "1")]
266 pub params: ::core::option::Option<Params>,
267 #[prost(string, tag = "2")]
270 pub authority: ::prost::alloc::string::String,
271}
272#[allow(clippy::derive_partial_eq_without_eq)]
274#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
275#[proto_message(type_url = "/cosmos.sanction.v1beta1.MsgUpdateParamsResponse")]
276pub struct MsgUpdateParamsResponse {}
277pub struct SanctionQuerier<'a, Q: cosmwasm_std::CustomQuery> {
278 querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
279}
280impl<'a, Q: cosmwasm_std::CustomQuery> SanctionQuerier<'a, Q> {
281 pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
282 Self { querier }
283 }
284 pub fn is_sanctioned(
285 &self,
286 address: ::prost::alloc::string::String,
287 ) -> Result<QueryIsSanctionedResponse, cosmwasm_std::StdError> {
288 QueryIsSanctionedRequest { address }.query(self.querier)
289 }
290 pub fn sanctioned_addresses(
291 &self,
292 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
293 ) -> Result<QuerySanctionedAddressesResponse, cosmwasm_std::StdError> {
294 QuerySanctionedAddressesRequest { pagination }.query(self.querier)
295 }
296 pub fn temporary_entries(
297 &self,
298 address: ::prost::alloc::string::String,
299 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
300 ) -> Result<QueryTemporaryEntriesResponse, cosmwasm_std::StdError> {
301 QueryTemporaryEntriesRequest {
302 address,
303 pagination,
304 }
305 .query(self.querier)
306 }
307 pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
308 QueryParamsRequest {}.query(self.querier)
309 }
310}