Skip to content

Osmosis v13 #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies/osmosis
Submodule osmosis updated 594 files
2 changes: 1 addition & 1 deletion packages/osmosis-std/src/types/OSMOSIS_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v13.0.0-rc2
v13.1.1
1 change: 1 addition & 0 deletions packages/osmosis-std/src/types/cosmos/bank/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ pub struct Output {
CosmwasmExt,
)]
#[proto_message(type_url = "/cosmos.bank.v1beta1.Supply")]
#[deprecated]
pub struct Supply {
#[prost(message, repeated, tag = "1")]
pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
Expand Down
66 changes: 66 additions & 0 deletions packages/osmosis-std/src/types/osmosis/gamm/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,49 @@ pub struct QueryTotalSharesResponse {
#[prost(message, optional, tag = "1")]
pub total_shares: ::core::option::Option<super::super::super::cosmos::base::v1beta1::Coin>,
}
///=============================== CalcJoinPoolNoSwapShares
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest")]
#[proto_query(
path = "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares",
response_type = QueryCalcJoinPoolNoSwapSharesResponse
)]
pub struct QueryCalcJoinPoolNoSwapSharesRequest {
#[prost(uint64, tag = "1")]
#[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 tokens_in: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse")]
pub struct QueryCalcJoinPoolNoSwapSharesResponse {
#[prost(message, repeated, tag = "1")]
pub tokens_out: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub shares_out: ::prost::alloc::string::String,
}
/// QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice
/// query.
#[derive(
Expand All @@ -890,6 +933,7 @@ pub struct QueryTotalSharesResponse {
path = "/osmosis.gamm.v1beta1.Query/SpotPrice",
response_type = QuerySpotPriceResponse
)]
#[deprecated]
pub struct QuerySpotPriceRequest {
#[prost(uint64, tag = "1")]
#[serde(
Expand Down Expand Up @@ -922,6 +966,9 @@ pub struct QueryPoolsWithFilterRequest {
pub min_liquidity: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
#[prost(string, tag = "2")]
pub pool_type: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[derive(
Clone,
Expand All @@ -937,6 +984,10 @@ pub struct QueryPoolsWithFilterRequest {
pub struct QueryPoolsWithFilterResponse {
#[prost(message, repeated, tag = "1")]
pub pools: ::prost::alloc::vec::Vec<crate::shim::Any>,
/// 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>,
}
/// QuerySpotPriceResponse defines the gRPC response structure for a SpotPrice
/// query.
Expand All @@ -951,6 +1002,7 @@ pub struct QueryPoolsWithFilterResponse {
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.gamm.v1beta1.QuerySpotPriceResponse")]
#[deprecated]
pub struct QuerySpotPriceResponse {
/// String of the Dec. Ex) 10.203uatom
#[prost(string, tag = "1")]
Expand All @@ -973,6 +1025,7 @@ pub struct QuerySpotPriceResponse {
response_type = QuerySwapExactAmountInResponse
)]
pub struct QuerySwapExactAmountInRequest {
/// TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
Expand Down Expand Up @@ -1018,6 +1071,7 @@ pub struct QuerySwapExactAmountInResponse {
response_type = QuerySwapExactAmountOutResponse
)]
pub struct QuerySwapExactAmountOutRequest {
/// TODO: CHANGE THIS TO RESERVED IN A PATCH RELEASE
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
Expand Down Expand Up @@ -1144,10 +1198,14 @@ impl<'a, Q: cosmwasm_std::CustomQuery> GammQuerier<'a, Q> {
&self,
min_liquidity: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
pool_type: ::prost::alloc::string::String,
pagination: ::core::option::Option<
super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
) -> Result<QueryPoolsWithFilterResponse, cosmwasm_std::StdError> {
QueryPoolsWithFilterRequest {
min_liquidity,
pool_type,
pagination,
}
.query(self.querier)
}
Expand All @@ -1157,6 +1215,13 @@ impl<'a, Q: cosmwasm_std::CustomQuery> GammQuerier<'a, Q> {
pub fn pool_type(&self, pool_id: u64) -> Result<QueryPoolTypeResponse, cosmwasm_std::StdError> {
QueryPoolTypeRequest { pool_id }.query(self.querier)
}
pub fn calc_join_pool_no_swap_shares(
&self,
pool_id: u64,
tokens_in: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
) -> Result<QueryCalcJoinPoolNoSwapSharesResponse, cosmwasm_std::StdError> {
QueryCalcJoinPoolNoSwapSharesRequest { pool_id, tokens_in }.query(self.querier)
}
pub fn calc_join_pool_shares(
&self,
pool_id: u64,
Expand Down Expand Up @@ -1193,6 +1258,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> GammQuerier<'a, Q> {
) -> Result<QueryTotalSharesResponse, cosmwasm_std::StdError> {
QueryTotalSharesRequest { pool_id }.query(self.querier)
}
#[deprecated]
pub fn spot_price(
&self,
pool_id: u64,
Expand Down
47 changes: 46 additions & 1 deletion packages/osmosis-std/src/types/osmosis/ibcratelimit/v1beta1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use osmosis_std_derive::CosmwasmExt;
/// Params defines the parameters for the ibc-rate-limiting module.
/// Params defines the parameters for the ibc-rate-limit module.
#[derive(
Clone,
PartialEq,
Expand All @@ -15,3 +15,48 @@ pub struct Params {
#[prost(string, tag = "1")]
pub contract_address: ::prost::alloc::string::String,
}
/// QueryParamsRequest is the request type for the Query/Params RPC method.
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.ibcratelimit.v1beta1.QueryParamsRequest")]
#[proto_query(
path = "/osmosis.ibcratelimit.v1beta1.Query/Params",
response_type = QueryParamsResponse
)]
pub struct QueryParamsRequest {}
/// QueryParamsResponse is the response type for the Query/Params RPC method.
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.ibcratelimit.v1beta1.QueryParamsResponse")]
pub struct QueryParamsResponse {
/// params defines the parameters of the module.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
pub struct IbcratelimitQuerier<'a, Q: cosmwasm_std::CustomQuery> {
querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
impl<'a, Q: cosmwasm_std::CustomQuery> IbcratelimitQuerier<'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)
}
}
1 change: 0 additions & 1 deletion packages/osmosis-std/src/types/osmosis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ pub mod superfluid;
pub mod tokenfactory;
pub mod twap;
pub mod txfees;
pub mod validatorpreference;
34 changes: 34 additions & 0 deletions packages/osmosis-std/src/types/osmosis/superfluid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,37 @@ pub struct QueryTotalDelegationByDelegatorResponse {
pub total_equivalent_staked_amount:
::core::option::Option<super::super::cosmos::base::v1beta1::Coin>,
}
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.superfluid.QueryUnpoolWhitelistRequest")]
#[proto_query(
path = "/osmosis.superfluid.Query/UnpoolWhitelist",
response_type = QueryUnpoolWhitelistResponse
)]
pub struct QueryUnpoolWhitelistRequest {}
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.superfluid.QueryUnpoolWhitelistResponse")]
pub struct QueryUnpoolWhitelistResponse {
#[prost(uint64, repeated, tag = "1")]
pub pool_ids: ::prost::alloc::vec::Vec<u64>,
}
/// GenesisState defines the module's genesis state.
#[derive(
Clone,
Expand Down Expand Up @@ -1053,4 +1084,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> SuperfluidQuerier<'a, Q> {
) -> Result<QueryTotalDelegationByDelegatorResponse, cosmwasm_std::StdError> {
QueryTotalDelegationByDelegatorRequest { delegator_address }.query(self.querier)
}
pub fn unpool_whitelist(&self) -> Result<QueryUnpoolWhitelistResponse, cosmwasm_std::StdError> {
QueryUnpoolWhitelistRequest {}.query(self.querier)
}
}
23 changes: 23 additions & 0 deletions packages/osmosis-std/src/types/osmosis/superfluid/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,26 @@ pub struct RemoveSuperfluidAssetsProposal {
#[prost(string, repeated, tag = "3")]
pub superfluid_asset_denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// UpdateUnpoolWhiteListProposal is a gov Content type to update the
/// allowed list of pool ids.
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
serde::Serialize,
serde::Deserialize,
schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.superfluid.v1beta1.UpdateUnpoolWhiteListProposal")]
pub struct UpdateUnpoolWhiteListProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(uint64, repeated, tag = "3")]
pub ids: ::prost::alloc::vec::Vec<u64>,
#[prost(bool, tag = "4")]
pub is_overwrite: bool,
}
1 change: 0 additions & 1 deletion packages/osmosis-std/src/types/osmosis/twap/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pub mod v1beta1;
pub mod v2;
1 change: 1 addition & 0 deletions packages/osmosis-std/src/types/osmosis/twap/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> TwapQuerier<'a, Q> {
}
.query(self.querier)
}
#[deprecated]
pub fn arithmetic_twap_to_now(
&self,
pool_id: u64,
Expand Down
Loading