use milkyway_std_derive::CosmwasmExt;
/// Asset represents an asset that can be registered on the chain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.Asset")]
pub struct Asset {
    /// Denom is the denomination of the asset.
    #[prost(string, tag = "1")]
    pub denom: ::prost::alloc::string::String,
    /// Ticker is the ticker of the asset.
    #[prost(string, tag = "2")]
    pub ticker: ::prost::alloc::string::String,
    /// Exponent represents power of 10 exponent that one must
    /// raise the denom to in order to equal the given ticker.
    /// 1 ticker = 10^exponent denom
    #[prost(uint32, tag = "3")]
    #[serde(
        serialize_with = "crate::serde::as_str::serialize",
        deserialize_with = "crate::serde::as_str::deserialize"
    )]
    pub exponent: u32,
}
/// GenesisState defines the module's genesis state.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.GenesisState")]
pub struct GenesisState {
    /// Assets defines the registered assets.
    #[prost(message, repeated, tag = "1")]
    pub assets: ::prost::alloc::vec::Vec<Asset>,
}
/// MsgRegisterAsset defines the message structure for the RegisterAsset
/// gRPC service method. It allows the authority to register an asset.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.MsgRegisterAsset")]
pub struct MsgRegisterAsset {
    /// Authority is the address that controls the module (defaults to x/gov unless
    /// overwritten).
    #[prost(string, tag = "1")]
    pub authority: ::prost::alloc::string::String,
    /// Asset represents the asset to be registered.
    #[prost(message, optional, tag = "2")]
    pub asset: ::core::option::Option<Asset>,
}
/// MsgRegisterAssetResponse is the return value of MsgRegisterAsset.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.MsgRegisterAssetResponse")]
pub struct MsgRegisterAssetResponse {}
/// MsgDeregisterAsset defines the message structure for the DeregisterAsset
/// gRPC service method. It allows the authority to de-register an asset with
/// the token denomination.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.MsgDeregisterAsset")]
pub struct MsgDeregisterAsset {
    /// Authority is the address that controls the module (defaults to x/gov unless
    /// overwritten).
    #[prost(string, tag = "1")]
    pub authority: ::prost::alloc::string::String,
    /// Denom represents the denomination of the token associated with the asset.
    #[prost(string, tag = "2")]
    pub denom: ::prost::alloc::string::String,
}
/// MsgRegisterAssetResponse is the return value of MsgDeregisterAsset.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.MsgDeregisterAssetResponse")]
pub struct MsgDeregisterAssetResponse {}
/// QueryAssetsRequest is the request type for the Query/Assets RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.QueryAssetsRequest")]
#[proto_query(
    path = "/milkyway.assets.v1.Query/Assets",
    response_type = QueryAssetsResponse
)]
pub struct QueryAssetsRequest {
    /// Ticker defines an optional filter parameter to query assets with the given
    /// ticker.
    #[prost(string, tag = "1")]
    pub ticker: ::prost::alloc::string::String,
    /// Pagination defines an optional pagination for the request.
    #[prost(message, optional, tag = "2")]
    pub pagination:
        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
/// QueryAssetsResponse is the response type for the Query/Assets RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.QueryAssetsResponse")]
pub struct QueryAssetsResponse {
    /// Assets represents all the assets registered.
    #[prost(message, repeated, tag = "1")]
    pub assets: ::prost::alloc::vec::Vec<Asset>,
    /// Pagination defines the pagination in the response.
    #[prost(message, optional, tag = "2")]
    pub pagination:
        ::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
/// QueryAssetRequest is the request type for the Query/Asset RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.QueryAssetRequest")]
#[proto_query(
    path = "/milkyway.assets.v1.Query/Asset",
    response_type = QueryAssetResponse
)]
pub struct QueryAssetRequest {
    /// Denom is the token denomination for which the ticker is to be queried.
    #[prost(string, tag = "1")]
    pub denom: ::prost::alloc::string::String,
}
/// QueryAssetResponse is the response type for the Query/Asset RPC method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
    Clone,
    PartialEq,
    Eq,
    ::prost::Message,
    ::serde::Serialize,
    ::serde::Deserialize,
    ::schemars::JsonSchema,
    CosmwasmExt,
)]
#[proto_message(type_url = "/milkyway.assets.v1.QueryAssetResponse")]
pub struct QueryAssetResponse {
    /// Asset is the asset associated with the token denomination.
    #[prost(message, optional, tag = "1")]
    pub asset: ::core::option::Option<Asset>,
}
pub struct AssetsQuerier<'a, Q: cosmwasm_std::CustomQuery> {
    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> AssetsQuerier<'a, Q> {
    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
        Self { querier }
    }
    pub fn assets(
        &self,
        ticker: ::prost::alloc::string::String,
        pagination: ::core::option::Option<
            super::super::super::cosmos::base::query::v1beta1::PageRequest,
        >,
    ) -> Result<QueryAssetsResponse, cosmwasm_std::StdError> {
        QueryAssetsRequest { ticker, pagination }.query(self.querier)
    }
    pub fn asset(
        &self,
        denom: ::prost::alloc::string::String,
    ) -> Result<QueryAssetResponse, cosmwasm_std::StdError> {
        QueryAssetRequest { denom }.query(self.querier)
    }
}
