use elys_std_deriv::CosmwasmExt;
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.LegacyPoolAsset")]
pub struct LegacyPoolAsset {
#[prost(message, optional, tag = "1")]
pub token: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub weight: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.PoolAsset")]
pub struct PoolAsset {
#[prost(message, optional, tag = "1")]
pub token: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub weight: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub external_liquidity_ratio: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.DenomLiquidity")]
pub struct DenomLiquidity {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub liquidity: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.LegacyParams")]
pub struct LegacyParams {
#[prost(string, tag = "1")]
pub pool_creation_fee: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub slippage_track_duration: u64,
#[prost(string, repeated, tag = "3")]
pub base_assets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub weight_breaking_fee_exponent: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub weight_breaking_fee_multiplier: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub weight_breaking_fee_portion: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub weight_recovery_fee_portion: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub threshold_weight_difference: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "9")]
pub allowed_pool_creators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.Params")]
pub struct Params {
#[prost(string, tag = "1")]
pub pool_creation_fee: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub slippage_track_duration: u64,
#[prost(string, repeated, tag = "3")]
pub base_assets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub weight_breaking_fee_exponent: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub weight_breaking_fee_multiplier: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub weight_breaking_fee_portion: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub weight_recovery_fee_portion: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub threshold_weight_difference: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "9")]
pub allowed_pool_creators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "10")]
pub threshold_weight_difference_swap_fee: ::prost::alloc::string::String,
#[prost(uint64, tag = "11")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub lp_lockup_duration: u64,
#[prost(string, tag = "12")]
pub min_slippage: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.LegacyPoolParams")]
pub struct LegacyPoolParams {
#[prost(string, tag = "1")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub exit_fee: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub use_oracle: bool,
#[prost(string, tag = "4")]
pub weight_breaking_fee_multiplier: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub weight_breaking_fee_exponent: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub weight_recovery_fee_portion: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub threshold_weight_difference: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub weight_breaking_fee_portion: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub fee_denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.PoolParams")]
pub struct PoolParams {
#[prost(string, tag = "1")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub use_oracle: bool,
#[prost(string, tag = "3")]
pub fee_denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.LegacyPool")]
pub struct LegacyPool {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(string, tag = "2")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub pool_params: ::core::option::Option<LegacyPoolParams>,
#[prost(message, optional, tag = "4")]
pub total_shares: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, repeated, tag = "5")]
pub pool_assets: ::prost::alloc::vec::Vec<PoolAsset>,
#[prost(string, tag = "6")]
pub total_weight: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub rebalance_treasury: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.Pool")]
pub struct Pool {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(string, tag = "2")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub pool_params: ::core::option::Option<PoolParams>,
#[prost(message, optional, tag = "4")]
pub total_shares: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, repeated, tag = "5")]
pub pool_assets: ::prost::alloc::vec::Vec<PoolAsset>,
#[prost(string, tag = "6")]
pub total_weight: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub rebalance_treasury: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.PoolExtraInfo")]
pub struct PoolExtraInfo {
#[prost(string, tag = "1")]
pub tvl: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub lp_token_price: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub lp_saved_apr: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.OraclePoolSlippageTrack")]
pub struct OraclePoolSlippageTrack {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(uint64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub timestamp: u64,
#[prost(message, repeated, tag = "3")]
pub tracked: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.WeightBreakingSlippage")]
pub struct WeightBreakingSlippage {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(string, tag = "2")]
pub date: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub amount: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.GenesisState")]
pub struct GenesisState {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
#[prost(message, repeated, tag = "2")]
pub pool_list: ::prost::alloc::vec::Vec<Pool>,
#[prost(message, repeated, tag = "3")]
pub denom_liquidity_list: ::prost::alloc::vec::Vec<DenomLiquidity>,
#[prost(message, repeated, tag = "4")]
pub slippage_tracks: ::prost::alloc::vec::Vec<OraclePoolSlippageTrack>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.SwapAmountInRoute")]
pub struct SwapAmountInRoute {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(string, tag = "2")]
pub token_out_denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.SwapAmountOutRoute")]
pub struct SwapAmountOutRoute {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(string, tag = "2")]
pub token_in_denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.ProposalCreateBalancerPool")]
pub struct ProposalCreateBalancerPool {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub pool_params: ::core::option::Option<PoolParams>,
#[prost(message, repeated, tag = "4")]
pub pool_assets: ::prost::alloc::vec::Vec<PoolAsset>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.ProposalUpdatePoolParams")]
pub struct ProposalUpdatePoolParams {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, optional, tag = "4")]
pub pool_params: ::core::option::Option<PoolParams>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryParamsRequest")]
#[proto_query(path = "/elys.amm.Query/Params", response_type = QueryParamsResponse)]
pub struct QueryParamsRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryParamsResponse")]
pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryGetPoolRequest")]
#[proto_query(path = "/elys.amm.Query/Pool", response_type = QueryGetPoolResponse)]
pub struct QueryGetPoolRequest {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryGetPoolResponse")]
pub struct QueryGetPoolResponse {
#[prost(message, optional, tag = "1")]
pub pool: ::core::option::Option<Pool>,
#[prost(message, optional, tag = "2")]
pub extra_info: ::core::option::Option<PoolExtraInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryAllPoolRequest")]
#[proto_query(path = "/elys.amm.Query/PoolAll", response_type = QueryAllPoolResponse)]
pub struct QueryAllPoolRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryAllPoolResponse")]
pub struct QueryAllPoolResponse {
#[prost(message, repeated, tag = "1")]
pub pool: ::prost::alloc::vec::Vec<Pool>,
#[prost(message, repeated, tag = "2")]
pub extra_infos: ::prost::alloc::vec::Vec<PoolExtraInfo>,
#[prost(message, optional, tag = "3")]
pub pagination:
::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryGetDenomLiquidityRequest")]
#[proto_query(
path = "/elys.amm.Query/DenomLiquidity",
response_type = QueryGetDenomLiquidityResponse
)]
pub struct QueryGetDenomLiquidityRequest {
#[prost(string, tag = "1")]
pub denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryGetDenomLiquidityResponse")]
pub struct QueryGetDenomLiquidityResponse {
#[prost(message, optional, tag = "1")]
pub denom_liquidity: ::core::option::Option<DenomLiquidity>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryAllDenomLiquidityRequest")]
#[proto_query(
path = "/elys.amm.Query/DenomLiquidityAll",
response_type = QueryAllDenomLiquidityResponse
)]
pub struct QueryAllDenomLiquidityRequest {
#[prost(message, optional, tag = "1")]
pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryAllDenomLiquidityResponse")]
pub struct QueryAllDenomLiquidityResponse {
#[prost(message, repeated, tag = "1")]
pub denom_liquidity: ::prost::alloc::vec::Vec<DenomLiquidity>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySwapEstimationRequest")]
#[proto_query(
path = "/elys.amm.Query/SwapEstimation",
response_type = QuerySwapEstimationResponse
)]
pub struct QuerySwapEstimationRequest {
#[prost(message, repeated, tag = "1")]
pub routes: ::prost::alloc::vec::Vec<SwapAmountInRoute>,
#[prost(message, optional, tag = "2")]
pub token_in: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "3")]
pub discount: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryJoinPoolEstimationRequest")]
#[proto_query(
path = "/elys.amm.Query/JoinPoolEstimation",
response_type = QueryJoinPoolEstimationResponse
)]
pub struct QueryJoinPoolEstimationRequest {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, repeated, tag = "2")]
pub amounts_in: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryJoinPoolEstimationResponse")]
pub struct QueryJoinPoolEstimationResponse {
#[prost(message, optional, tag = "1")]
pub share_amount_out: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, repeated, tag = "2")]
pub amounts_in: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "3")]
pub slippage: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub weight_balance_ratio: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub swap_fee: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryExitPoolEstimationRequest")]
#[proto_query(
path = "/elys.amm.Query/ExitPoolEstimation",
response_type = QueryExitPoolEstimationResponse
)]
pub struct QueryExitPoolEstimationRequest {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(string, tag = "2")]
pub share_amount_in: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub token_out_denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryExitPoolEstimationResponse")]
pub struct QueryExitPoolEstimationResponse {
#[prost(message, repeated, tag = "1")]
pub amounts_out: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub weight_balance_ratio: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub slippage: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub swap_fee: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySwapEstimationResponse")]
pub struct QuerySwapEstimationResponse {
#[prost(string, tag = "1")]
pub spot_price: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub token_out: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "3")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub discount: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub available_liquidity: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "6")]
pub slippage: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub weight_balance_ratio: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySlippageTrackRequest")]
#[proto_query(
path = "/elys.amm.Query/SlippageTrack",
response_type = QuerySlippageTrackResponse
)]
pub struct QuerySlippageTrackRequest {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySlippageTrackResponse")]
pub struct QuerySlippageTrackResponse {
#[prost(message, optional, tag = "1")]
pub track: ::core::option::Option<OraclePoolSlippageTrack>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySlippageTrackAllRequest")]
#[proto_query(
path = "/elys.amm.Query/SlippageTrackAll",
response_type = QuerySlippageTrackAllResponse
)]
pub struct QuerySlippageTrackAllRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySlippageTrackAllResponse")]
pub struct QuerySlippageTrackAllResponse {
#[prost(message, repeated, tag = "1")]
pub tracks: ::prost::alloc::vec::Vec<OraclePoolSlippageTrack>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryBalanceRequest")]
#[proto_query(path = "/elys.amm.Query/Balance", response_type = QueryBalanceResponse)]
pub struct QueryBalanceRequest {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryBalanceResponse")]
pub struct QueryBalanceResponse {
#[prost(message, optional, tag = "1")]
pub balance: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryInRouteByDenomRequest")]
#[proto_query(
path = "/elys.amm.Query/InRouteByDenom",
response_type = QueryInRouteByDenomResponse
)]
pub struct QueryInRouteByDenomRequest {
#[prost(string, tag = "1")]
pub denom_in: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom_out: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryInRouteByDenomResponse")]
pub struct QueryInRouteByDenomResponse {
#[prost(message, repeated, tag = "1")]
pub in_route: ::prost::alloc::vec::Vec<SwapAmountInRoute>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryOutRouteByDenomRequest")]
#[proto_query(
path = "/elys.amm.Query/OutRouteByDenom",
response_type = QueryOutRouteByDenomResponse
)]
pub struct QueryOutRouteByDenomRequest {
#[prost(string, tag = "1")]
pub denom_out: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub denom_in: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryOutRouteByDenomResponse")]
pub struct QueryOutRouteByDenomResponse {
#[prost(message, repeated, tag = "1")]
pub out_route: ::prost::alloc::vec::Vec<SwapAmountOutRoute>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySwapEstimationByDenomRequest")]
#[proto_query(
path = "/elys.amm.Query/SwapEstimationByDenom",
response_type = QuerySwapEstimationByDenomResponse
)]
pub struct QuerySwapEstimationByDenomRequest {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub denom_in: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub denom_out: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QuerySwapEstimationByDenomResponse")]
pub struct QuerySwapEstimationByDenomResponse {
#[prost(message, repeated, tag = "1")]
pub in_route: ::prost::alloc::vec::Vec<SwapAmountInRoute>,
#[prost(message, repeated, tag = "2")]
pub out_route: ::prost::alloc::vec::Vec<SwapAmountOutRoute>,
#[prost(string, tag = "3")]
pub spot_price: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "5")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub discount: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub available_liquidity: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "8")]
pub weight_balance_ratio: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub slippage: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub price_impact: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryAMMPriceRequest")]
pub struct QueryAmmPriceRequest {
#[prost(message, optional, tag = "1")]
pub token_in: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub discount: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgCreatePool")]
pub struct MsgCreatePool {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pool_params: ::core::option::Option<PoolParams>,
#[prost(message, repeated, tag = "3")]
pub pool_assets: ::prost::alloc::vec::Vec<PoolAsset>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgCreatePoolResponse")]
pub struct MsgCreatePoolResponse {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgJoinPool")]
pub struct MsgJoinPool {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, repeated, tag = "3")]
pub max_amounts_in: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "4")]
pub share_amount_out: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgJoinPoolResponse")]
pub struct MsgJoinPoolResponse {
#[prost(string, tag = "1")]
pub share_amount_out: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub token_in: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgExitPool")]
pub struct MsgExitPool {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, repeated, tag = "3")]
pub min_amounts_out: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "4")]
pub share_amount_in: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub token_out_denom: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgExitPoolResponse")]
pub struct MsgExitPoolResponse {
#[prost(message, repeated, tag = "1")]
pub token_out: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub weight_balance_ratio: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub slippage: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub swap_fee: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgSwapExactAmountIn")]
pub struct MsgSwapExactAmountIn {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub routes: ::prost::alloc::vec::Vec<SwapAmountInRoute>,
#[prost(message, optional, tag = "3")]
pub token_in: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "4")]
pub token_out_min_amount: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub recipient: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgSwapExactAmountInResponse")]
pub struct MsgSwapExactAmountInResponse {
#[prost(string, tag = "1")]
pub token_out_amount: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub discount: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub recipient: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgSwapExactAmountOut")]
pub struct MsgSwapExactAmountOut {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub routes: ::prost::alloc::vec::Vec<SwapAmountOutRoute>,
#[prost(message, optional, tag = "3")]
pub token_out: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "4")]
pub token_in_max_amount: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub recipient: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgSwapExactAmountOutResponse")]
pub struct MsgSwapExactAmountOutResponse {
#[prost(string, tag = "1")]
pub token_in_amount: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub discount: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub recipient: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgFeedMultipleExternalLiquidity")]
pub struct MsgFeedMultipleExternalLiquidity {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub liquidity: ::prost::alloc::vec::Vec<ExternalLiquidity>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgFeedMultipleExternalLiquidityResponse")]
pub struct MsgFeedMultipleExternalLiquidityResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.AssetAmountDepth")]
pub struct AssetAmountDepth {
#[prost(string, tag = "1")]
pub asset: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub depth: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.ExternalLiquidity")]
pub struct ExternalLiquidity {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, repeated, tag = "2")]
pub amount_depth_info: ::prost::alloc::vec::Vec<AssetAmountDepth>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgSwapByDenom")]
pub struct MsgSwapByDenom {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, optional, tag = "3")]
pub min_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, optional, tag = "4")]
pub max_amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "5")]
pub denom_in: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub denom_out: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub recipient: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgSwapByDenomResponse")]
pub struct MsgSwapByDenomResponse {
#[prost(message, optional, tag = "1")]
pub amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, repeated, tag = "2")]
pub in_route: ::prost::alloc::vec::Vec<SwapAmountInRoute>,
#[prost(message, repeated, tag = "3")]
pub out_route: ::prost::alloc::vec::Vec<SwapAmountOutRoute>,
#[prost(string, tag = "4")]
pub spot_price: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub discount: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub recipient: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgUpdatePoolParams")]
pub struct MsgUpdatePoolParams {
#[prost(string, tag = "1")]
pub authority: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, optional, tag = "3")]
pub pool_params: ::core::option::Option<PoolParams>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgUpdatePoolParamsResponse")]
pub struct MsgUpdatePoolParamsResponse {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, optional, tag = "2")]
pub pool_params: ::core::option::Option<PoolParams>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgUpdateParams")]
pub struct MsgUpdateParams {
#[prost(string, tag = "1")]
pub authority: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<Params>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.MsgUpdateParamsResponse")]
pub struct MsgUpdateParamsResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryEarnPoolRequest")]
pub struct QueryEarnPoolRequest {
#[prost(uint64, repeated, tag = "1")]
#[serde(alias = "poolIDs")]
#[serde(
serialize_with = "crate::serde::as_str_vec::serialize",
deserialize_with = "crate::serde::as_str_vec::deserialize"
)]
pub pool_ids: ::prost::alloc::vec::Vec<u64>,
#[prost(enumeration = "FilterType", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub filter_type: i32,
#[prost(message, optional, tag = "3")]
pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.EarnPool")]
pub struct EarnPool {
#[prost(uint64, tag = "1")]
#[serde(alias = "poolID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pool_id: u64,
#[prost(message, repeated, tag = "2")]
pub assets: ::prost::alloc::vec::Vec<PoolAsset>,
#[prost(string, tag = "3")]
pub pool_ratio: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub rewards_apr: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub borrow_apr: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub leverage_lp: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub perpetual: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub tvl: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub lp_token_price: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub rewards_usd: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "11")]
pub reward_coins: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
#[prost(message, optional, tag = "12")]
pub total_shares: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "13")]
pub swap_fee: ::prost::alloc::string::String,
#[prost(string, tag = "14")]
pub fee_denom: ::prost::alloc::string::String,
#[prost(bool, tag = "15")]
pub use_oracle: bool,
#[prost(bool, tag = "16")]
pub is_leveragelp: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/elys.amm.QueryEarnPoolResponse")]
pub struct QueryEarnPoolResponse {
#[prost(message, repeated, tag = "1")]
pub pools: ::prost::alloc::vec::Vec<EarnPool>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
pub enum FilterType {
FilterAll = 0,
FilterPerpetual = 1,
FilterFixedWeight = 2,
FilterDynamicWeight = 3,
FilterLeverage = 4,
}
impl FilterType {
pub fn as_str_name(&self) -> &'static str {
match self {
FilterType::FilterAll => "FILTER_ALL",
FilterType::FilterPerpetual => "FILTER_PERPETUAL",
FilterType::FilterFixedWeight => "FILTER_FIXED_WEIGHT",
FilterType::FilterDynamicWeight => "FILTER_DYNAMIC_WEIGHT",
FilterType::FilterLeverage => "FILTER_LEVERAGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FILTER_ALL" => Some(Self::FilterAll),
"FILTER_PERPETUAL" => Some(Self::FilterPerpetual),
"FILTER_FIXED_WEIGHT" => Some(Self::FilterFixedWeight),
"FILTER_DYNAMIC_WEIGHT" => Some(Self::FilterDynamicWeight),
"FILTER_LEVERAGE" => Some(Self::FilterLeverage),
_ => None,
}
}
}
pub struct AmmQuerier<'a, Q: cosmwasm_std::CustomQuery> {
querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> AmmQuerier<'a, Q> {
pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
Self { querier }
}
pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
QueryParamsRequest {}.query(self.querier)
}
pub fn pool(&self, pool_id: u64) -> Result<QueryGetPoolResponse, cosmwasm_std::StdError> {
QueryGetPoolRequest { pool_id }.query(self.querier)
}
pub fn pool_all(
&self,
pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
) -> Result<QueryAllPoolResponse, cosmwasm_std::StdError> {
QueryAllPoolRequest { pagination }.query(self.querier)
}
pub fn denom_liquidity(
&self,
denom: ::prost::alloc::string::String,
) -> Result<QueryGetDenomLiquidityResponse, cosmwasm_std::StdError> {
QueryGetDenomLiquidityRequest { denom }.query(self.querier)
}
pub fn denom_liquidity_all(
&self,
pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
) -> Result<QueryAllDenomLiquidityResponse, cosmwasm_std::StdError> {
QueryAllDenomLiquidityRequest { pagination }.query(self.querier)
}
pub fn swap_estimation(
&self,
routes: ::prost::alloc::vec::Vec<SwapAmountInRoute>,
token_in: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
discount: ::prost::alloc::string::String,
) -> Result<QuerySwapEstimationResponse, cosmwasm_std::StdError> {
QuerySwapEstimationRequest {
routes,
token_in,
discount,
}
.query(self.querier)
}
pub fn join_pool_estimation(
&self,
pool_id: u64,
amounts_in: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
) -> Result<QueryJoinPoolEstimationResponse, cosmwasm_std::StdError> {
QueryJoinPoolEstimationRequest {
pool_id,
amounts_in,
}
.query(self.querier)
}
pub fn exit_pool_estimation(
&self,
pool_id: u64,
share_amount_in: ::prost::alloc::string::String,
token_out_denom: ::prost::alloc::string::String,
) -> Result<QueryExitPoolEstimationResponse, cosmwasm_std::StdError> {
QueryExitPoolEstimationRequest {
pool_id,
share_amount_in,
token_out_denom,
}
.query(self.querier)
}
pub fn slippage_track(
&self,
pool_id: u64,
) -> Result<QuerySlippageTrackResponse, cosmwasm_std::StdError> {
QuerySlippageTrackRequest { pool_id }.query(self.querier)
}
pub fn slippage_track_all(
&self,
) -> Result<QuerySlippageTrackAllResponse, cosmwasm_std::StdError> {
QuerySlippageTrackAllRequest {}.query(self.querier)
}
pub fn balance(
&self,
address: ::prost::alloc::string::String,
denom: ::prost::alloc::string::String,
) -> Result<QueryBalanceResponse, cosmwasm_std::StdError> {
QueryBalanceRequest { address, denom }.query(self.querier)
}
pub fn in_route_by_denom(
&self,
denom_in: ::prost::alloc::string::String,
denom_out: ::prost::alloc::string::String,
) -> Result<QueryInRouteByDenomResponse, cosmwasm_std::StdError> {
QueryInRouteByDenomRequest {
denom_in,
denom_out,
}
.query(self.querier)
}
pub fn out_route_by_denom(
&self,
denom_out: ::prost::alloc::string::String,
denom_in: ::prost::alloc::string::String,
) -> Result<QueryOutRouteByDenomResponse, cosmwasm_std::StdError> {
QueryOutRouteByDenomRequest {
denom_out,
denom_in,
}
.query(self.querier)
}
pub fn swap_estimation_by_denom(
&self,
amount: ::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
denom_in: ::prost::alloc::string::String,
denom_out: ::prost::alloc::string::String,
address: ::prost::alloc::string::String,
) -> Result<QuerySwapEstimationByDenomResponse, cosmwasm_std::StdError> {
QuerySwapEstimationByDenomRequest {
amount,
denom_in,
denom_out,
address,
}
.query(self.querier)
}
}