neutron_std/types/neutron/
feerefunder.rs

1use neutron_std_derive::CosmwasmExt;
2/// Fee defines the ICS29 receive, acknowledgement and timeout fees
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 = "/neutron.feerefunder.Fee")]
15pub struct Fee {
16    /// the packet receive fee
17    #[prost(message, repeated, tag = "1")]
18    pub recv_fee: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
19    /// the packet acknowledgement fee
20    #[prost(message, repeated, tag = "2")]
21    pub ack_fee: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
22    /// the packet timeout fee
23    #[prost(message, repeated, tag = "3")]
24    pub timeout_fee: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
25}
26#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(
28    Clone,
29    PartialEq,
30    Eq,
31    ::prost::Message,
32    ::serde::Serialize,
33    ::serde::Deserialize,
34    ::schemars::JsonSchema,
35    CosmwasmExt,
36)]
37#[proto_message(type_url = "/neutron.feerefunder.PacketID")]
38pub struct PacketId {
39    #[prost(string, tag = "1")]
40    #[serde(alias = "channelID")]
41    pub channel_id: ::prost::alloc::string::String,
42    #[prost(string, tag = "2")]
43    #[serde(alias = "portID")]
44    pub port_id: ::prost::alloc::string::String,
45    #[prost(uint64, tag = "3")]
46    #[serde(
47        serialize_with = "crate::serde::as_str::serialize",
48        deserialize_with = "crate::serde::as_str::deserialize"
49    )]
50    pub sequence: u64,
51}
52/// Params defines the parameters for the module.
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(
55    Clone,
56    PartialEq,
57    Eq,
58    ::prost::Message,
59    ::serde::Serialize,
60    ::serde::Deserialize,
61    ::schemars::JsonSchema,
62    CosmwasmExt,
63)]
64#[proto_message(type_url = "/neutron.feerefunder.Params")]
65pub struct Params {
66    #[prost(message, optional, tag = "1")]
67    pub min_fee: ::core::option::Option<Fee>,
68    #[prost(bool, tag = "2")]
69    pub fee_enabled: bool,
70}
71/// GenesisState defines the fee module's genesis state.
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(
74    Clone,
75    PartialEq,
76    Eq,
77    ::prost::Message,
78    ::serde::Serialize,
79    ::serde::Deserialize,
80    ::schemars::JsonSchema,
81    CosmwasmExt,
82)]
83#[proto_message(type_url = "/neutron.feerefunder.GenesisState")]
84pub struct GenesisState {
85    #[prost(message, optional, tag = "1")]
86    pub params: ::core::option::Option<Params>,
87    /// this line is used by starport scaffolding # genesis/proto/state
88    #[prost(message, repeated, tag = "2")]
89    pub fee_infos: ::prost::alloc::vec::Vec<FeeInfo>,
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 = "/neutron.feerefunder.FeeInfo")]
103pub struct FeeInfo {
104    #[prost(string, tag = "1")]
105    pub payer: ::prost::alloc::string::String,
106    #[prost(message, optional, tag = "2")]
107    #[serde(alias = "packetID")]
108    pub packet_id: ::core::option::Option<PacketId>,
109    #[prost(message, optional, tag = "3")]
110    pub fee: ::core::option::Option<Fee>,
111}
112/// QueryParamsRequest is request type for the Query/Params RPC method.
113#[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(
115    Clone,
116    PartialEq,
117    Eq,
118    ::prost::Message,
119    ::serde::Serialize,
120    ::serde::Deserialize,
121    ::schemars::JsonSchema,
122    CosmwasmExt,
123)]
124#[proto_message(type_url = "/neutron.feerefunder.QueryParamsRequest")]
125#[proto_query(
126    path = "/neutron.feerefunder.Query/Params",
127    response_type = QueryParamsResponse
128)]
129pub struct QueryParamsRequest {}
130/// QueryParamsResponse is response type for the Query/Params RPC method.
131#[allow(clippy::derive_partial_eq_without_eq)]
132#[derive(
133    Clone,
134    PartialEq,
135    Eq,
136    ::prost::Message,
137    ::serde::Serialize,
138    ::serde::Deserialize,
139    ::schemars::JsonSchema,
140    CosmwasmExt,
141)]
142#[proto_message(type_url = "/neutron.feerefunder.QueryParamsResponse")]
143pub struct QueryParamsResponse {
144    /// params holds all the parameters of this module.
145    #[prost(message, optional, tag = "1")]
146    pub params: ::core::option::Option<Params>,
147}
148#[allow(clippy::derive_partial_eq_without_eq)]
149#[derive(
150    Clone,
151    PartialEq,
152    Eq,
153    ::prost::Message,
154    ::serde::Serialize,
155    ::serde::Deserialize,
156    ::schemars::JsonSchema,
157    CosmwasmExt,
158)]
159#[proto_message(type_url = "/neutron.feerefunder.FeeInfoRequest")]
160#[proto_query(
161    path = "/neutron.feerefunder.Query/FeeInfo",
162    response_type = FeeInfoResponse
163)]
164pub struct FeeInfoRequest {
165    #[prost(string, tag = "1")]
166    #[serde(alias = "channelID")]
167    pub channel_id: ::prost::alloc::string::String,
168    #[prost(string, tag = "2")]
169    #[serde(alias = "portID")]
170    pub port_id: ::prost::alloc::string::String,
171    #[prost(uint64, tag = "3")]
172    #[serde(
173        serialize_with = "crate::serde::as_str::serialize",
174        deserialize_with = "crate::serde::as_str::deserialize"
175    )]
176    pub sequence: u64,
177}
178#[allow(clippy::derive_partial_eq_without_eq)]
179#[derive(
180    Clone,
181    PartialEq,
182    Eq,
183    ::prost::Message,
184    ::serde::Serialize,
185    ::serde::Deserialize,
186    ::schemars::JsonSchema,
187    CosmwasmExt,
188)]
189#[proto_message(type_url = "/neutron.feerefunder.FeeInfoResponse")]
190pub struct FeeInfoResponse {
191    #[prost(message, optional, tag = "1")]
192    pub fee_info: ::core::option::Option<FeeInfo>,
193}
194/// MsgUpdateParams is the MsgUpdateParams request type.
195///
196/// Since: 0.47
197#[allow(clippy::derive_partial_eq_without_eq)]
198#[derive(
199    Clone,
200    PartialEq,
201    Eq,
202    ::prost::Message,
203    ::serde::Serialize,
204    ::serde::Deserialize,
205    ::schemars::JsonSchema,
206    CosmwasmExt,
207)]
208#[proto_message(type_url = "/neutron.feerefunder.MsgUpdateParams")]
209pub struct MsgUpdateParams {
210    /// Authority is the address of the governance account.
211    #[prost(string, tag = "1")]
212    pub authority: ::prost::alloc::string::String,
213    /// params defines the x/feerefunder parameters to update.
214    ///
215    /// NOTE: All parameters must be supplied.
216    #[prost(message, optional, tag = "2")]
217    pub params: ::core::option::Option<Params>,
218}
219/// MsgUpdateParamsResponse defines the response structure for executing a
220/// MsgUpdateParams message.
221///
222/// Since: 0.47
223#[allow(clippy::derive_partial_eq_without_eq)]
224#[derive(
225    Clone,
226    PartialEq,
227    Eq,
228    ::prost::Message,
229    ::serde::Serialize,
230    ::serde::Deserialize,
231    ::schemars::JsonSchema,
232    CosmwasmExt,
233)]
234#[proto_message(type_url = "/neutron.feerefunder.MsgUpdateParamsResponse")]
235pub struct MsgUpdateParamsResponse {}
236pub struct FeerefunderQuerier<'a, Q: cosmwasm_std::CustomQuery> {
237    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
238}
239impl<'a, Q: cosmwasm_std::CustomQuery> FeerefunderQuerier<'a, Q> {
240    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
241        Self { querier }
242    }
243    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
244        QueryParamsRequest {}.query(self.querier)
245    }
246    pub fn fee_info(
247        &self,
248        channel_id: ::prost::alloc::string::String,
249        port_id: ::prost::alloc::string::String,
250        sequence: u64,
251    ) -> Result<FeeInfoResponse, cosmwasm_std::StdError> {
252        FeeInfoRequest {
253            channel_id,
254            port_id,
255            sequence,
256        }
257        .query(self.querier)
258    }
259}