Skip to content
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

feat: clean bindings #ntrn-410 #3

Merged
merged 4 commits into from
Oct 31, 2024
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 packages/neutron-std/src/types/NEUTRON_COMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
main
v5.0.0
39 changes: 39 additions & 0 deletions packages/neutron-std/src/types/neutron/contractmanager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,45 @@ pub struct MsgUpdateParams {
)]
#[proto_message(type_url = "/neutron.contractmanager.MsgUpdateParamsResponse")]
pub struct MsgUpdateParamsResponse {}
/// MsgResubmitFailure - contract that has failed acknowledgement can resubmit its failure
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/neutron.contractmanager.MsgResubmitFailure")]
pub struct MsgResubmitFailure {
/// sender is the contract which failure to acknowledge is resubmitted.
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
/// failure_id is id of failure to resubmit
#[prost(uint64, tag = "2")]
#[serde(alias = "failureID")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub failure_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 = "/neutron.contractmanager.MsgResubmitFailureResponse")]
pub struct MsgResubmitFailureResponse {}
pub struct ContractmanagerQuerier<'a, Q: cosmwasm_std::CustomQuery> {
querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
}
Expand Down
18 changes: 18 additions & 0 deletions packages/neutron-std/src/types/neutron/dex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,18 @@ pub struct PoolReserves {
pub key: ::core::option::Option<PoolReservesKey>,
#[prost(string, tag = "2")]
pub reserves_maker_denom: ::prost::alloc::string::String,
/// DEPRECATED: price_taker_to_maker will be removed in future release, `maker_price` should always be used.
#[deprecated]
#[prost(string, tag = "3")]
pub price_taker_to_maker: ::prost::alloc::string::String,
/// DEPRECATED: price_opposite_taker_maker was an internal implementation detail and will be removed in a future release.
/// It is being kept strictly for backwards compatibility. The actual field value is unused.
#[deprecated]
#[prost(string, tag = "4")]
pub price_opposite_taker_to_maker: ::prost::alloc::string::String,
/// This is the price of the PoolReserves denominated in the opposite token. (ie. 1 TokenA with a maker_price of 10 is worth 10 TokenB )
#[prost(string, tag = "5")]
pub maker_price: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Expand Down Expand Up @@ -213,8 +221,13 @@ pub struct LimitOrderTranche {
/// Order deletion still functions the same and the orders will be deleted at the end of the block
#[prost(message, optional, tag = "6")]
pub expiration_time: ::core::option::Option<crate::shim::Timestamp>,
/// DEPRECATED: price_taker_to_maker will be removed in future release, `maker_price` should always be used.
#[deprecated]
#[prost(string, tag = "7")]
pub price_taker_to_maker: ::prost::alloc::string::String,
/// This is the price of the LimitOrder denominated in the opposite token. (ie. 1 TokenA with a maker_price of 10 is worth 10 TokenB )
#[prost(string, tag = "8")]
pub maker_price: ::prost::alloc::string::String,
}
/// Params defines the parameters for the module.
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -454,6 +467,11 @@ pub struct MsgPlaceLimitOrder {
pub max_amount_out: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub limit_sell_price: ::prost::alloc::string::String,
/// min_average_sell_price is an optional parameter that sets a required minimum average price for the entire trade.
/// if the min_average_sell_price is not met the trade will fail.
/// If min_average_sell_price is omitted limit_sell_price will be used instead
#[prost(string, tag = "12")]
pub min_average_sell_price: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Expand Down
53 changes: 52 additions & 1 deletion packages/neutron-std/src/types/osmosis/tokenfactory/v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ pub struct QueryDenomsFromCreatorResponse {
#[prost(string, repeated, tag = "1")]
pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// QueryBeforeSendHookAddressRequest defines the request structure for the
/// BeforeSendHookAddress gRPC query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
Expand All @@ -238,7 +240,7 @@ pub struct QueryBeforeSendHookAddressRequest {
pub subdenom: ::prost::alloc::string::String,
}
/// QueryBeforeSendHookAddressResponse defines the response structure for the
/// DenomBeforeSendHook gRPC query.
/// BeforeSendHookAddress gRPC query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
Expand All @@ -255,6 +257,48 @@ pub struct QueryBeforeSendHookAddressResponse {
#[prost(string, tag = "1")]
pub contract_addr: ::prost::alloc::string::String,
}
/// QueryFullDenomRequest defines the request structure for the
/// FullDenom gRPC query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryFullDenomRequest")]
#[proto_query(
path = "/osmosis.tokenfactory.v1beta1.Query/FullDenom",
response_type = QueryFullDenomResponse
)]
pub struct QueryFullDenomRequest {
#[prost(string, tag = "1")]
pub creator: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub subdenom: ::prost::alloc::string::String,
}
/// QueryFullDenomResponse defines the response structure for the
/// FullDenom gRPC query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryFullDenomResponse")]
pub struct QueryFullDenomResponse {
#[prost(string, tag = "1")]
pub full_denom: ::prost::alloc::string::String,
}
/// MsgCreateDenom defines the message structure for the CreateDenom gRPC service
/// method. It allows an account to create a new denom. It requires a sender
/// address and a sub denomination. The (sender_address, sub_denomination) tuple
Expand Down Expand Up @@ -587,4 +631,11 @@ impl<'a, Q: cosmwasm_std::CustomQuery> TokenfactoryQuerier<'a, Q> {
) -> Result<QueryBeforeSendHookAddressResponse, cosmwasm_std::StdError> {
QueryBeforeSendHookAddressRequest { creator, subdenom }.query(self.querier)
}
pub fn full_denom(
&self,
creator: ::prost::alloc::string::String,
subdenom: ::prost::alloc::string::String,
) -> Result<QueryFullDenomResponse, cosmwasm_std::StdError> {
QueryFullDenomRequest { creator, subdenom }.query(self.querier)
}
}
2 changes: 1 addition & 1 deletion proto-build/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SLINKY_REPO: &str = "https://github.com/skip-mev/slinky.git";
const COSMOS_SDK_REV: &str = "v0.50.9-neutron";

/// The Neutron commit or tag to be cloned and used to build the proto files
const NEUTRON_REV: &str = "main";
const NEUTRON_REV: &str = "v5.0.0";

/// The wasmd commit or tag to be cloned and used to build the proto files
const WASMD_REV: &str = "v0.53.0-neutron";
Expand Down