From 85cc4e832fd885c6316df3b1f517f5e0aaaf2d0e Mon Sep 17 00:00:00 2001 From: pr0n00gler Date: Mon, 7 Oct 2024 09:59:19 +0300 Subject: [PATCH] wip --- packages/neutron-std/src/types/NEUTRON_COMMIT | 2 +- .../neutron-std/src/types/connect/abci/mod.rs | 1 + .../{slinky/abci/v1.rs => connect/abci/v2.rs} | 2 +- .../{slinky => connect}/marketmap/mod.rs | 2 +- .../src/types/connect/marketmap/module/mod.rs | 1 + .../v1.rs => connect/marketmap/module/v2.rs} | 2 +- .../v1.rs => connect/marketmap/v2.rs} | 105 +++- .../src/types/{slinky => connect}/mod.rs | 3 - .../types/{slinky => connect}/oracle/mod.rs | 2 +- .../src/types/connect/oracle/module/mod.rs | 1 + .../v1.rs => connect/oracle/module/v2.rs} | 2 +- .../oracle/v1.rs => connect/oracle/v2.rs} | 59 +- .../src/types/connect/service/mod.rs | 1 + .../service/v1.rs => connect/service/v2.rs} | 50 +- .../src/types/connect/types/mod.rs | 1 + .../types/v1.rs => connect/types/v2.rs} | 2 +- .../neutron-std/src/types/cosmos/ics23/v1.rs | 16 +- .../neutron-std/src/types/cosmwasm/wasm/v1.rs | 16 +- .../interchain_accounts/host/v1.rs | 76 +++ .../src/types/ibc/applications/transfer/v1.rs | 4 +- .../src/types/ibc/core/client/v1.rs | 96 +++ .../src/types/ibc/core/connection/v1.rs | 10 + packages/neutron-std/src/types/mod.rs | 2 +- .../src/types/neutron/contractmanager/mod.rs | 55 +- .../types/neutron/{cron.rs => cron/mod.rs} | 155 ++++- .../neutron-std/src/types/neutron/cron/v1.rs | 79 +++ .../neutron-std/src/types/neutron/dex/mod.rs | 292 ++++++++- .../src/types/neutron/interchainqueries.rs | 14 + .../src/types/neutron/interchaintxs/v1.rs | 9 + .../neutron-std/src/types/slinky/abci/mod.rs | 1 - .../src/types/slinky/alerts/mod.rs | 2 - .../src/types/slinky/alerts/module/mod.rs | 1 - .../src/types/slinky/alerts/module/v1.rs | 21 - .../neutron-std/src/types/slinky/alerts/v1.rs | 576 ------------------ .../src/types/slinky/incentives/mod.rs | 2 - .../src/types/slinky/incentives/module/mod.rs | 1 - .../src/types/slinky/incentives/module/v1.rs | 15 - .../src/types/slinky/incentives/v1.rs | 192 ------ .../src/types/slinky/marketmap/module/mod.rs | 1 - .../src/types/slinky/oracle/module/mod.rs | 1 - .../src/types/slinky/oracle/module/v1.rs | 20 - .../src/types/slinky/service/mod.rs | 1 - .../neutron-std/src/types/slinky/sla/mod.rs | 2 - .../src/types/slinky/sla/module/mod.rs | 1 - .../neutron-std/src/types/slinky/sla/v1.rs | 396 ------------ .../neutron-std/src/types/slinky/types/mod.rs | 1 - proto-build/src/main.rs | 12 +- 47 files changed, 957 insertions(+), 1349 deletions(-) create mode 100644 packages/neutron-std/src/types/connect/abci/mod.rs rename packages/neutron-std/src/types/{slinky/abci/v1.rs => connect/abci/v2.rs} (91%) rename packages/neutron-std/src/types/{slinky => connect}/marketmap/mod.rs (57%) create mode 100644 packages/neutron-std/src/types/connect/marketmap/module/mod.rs rename packages/neutron-std/src/types/{slinky/marketmap/module/v1.rs => connect/marketmap/module/v2.rs} (92%) rename packages/neutron-std/src/types/{slinky/marketmap/v1.rs => connect/marketmap/v2.rs} (82%) rename packages/neutron-std/src/types/{slinky => connect}/mod.rs (62%) rename packages/neutron-std/src/types/{slinky => connect}/oracle/mod.rs (57%) create mode 100644 packages/neutron-std/src/types/connect/oracle/module/mod.rs rename packages/neutron-std/src/types/{slinky/sla/module/v1.rs => connect/oracle/module/v2.rs} (89%) rename packages/neutron-std/src/types/{slinky/oracle/v1.rs => connect/oracle/v2.rs} (87%) create mode 100644 packages/neutron-std/src/types/connect/service/mod.rs rename packages/neutron-std/src/types/{slinky/service/v1.rs => connect/service/v2.rs} (52%) create mode 100644 packages/neutron-std/src/types/connect/types/mod.rs rename packages/neutron-std/src/types/{slinky/types/v1.rs => connect/types/v2.rs} (90%) rename packages/neutron-std/src/types/neutron/{cron.rs => cron/mod.rs} (60%) create mode 100644 packages/neutron-std/src/types/neutron/cron/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/abci/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/alerts/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/alerts/module/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/alerts/module/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/alerts/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/incentives/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/incentives/module/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/incentives/module/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/incentives/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/marketmap/module/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/oracle/module/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/oracle/module/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/service/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/sla/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/sla/module/mod.rs delete mode 100644 packages/neutron-std/src/types/slinky/sla/v1.rs delete mode 100644 packages/neutron-std/src/types/slinky/types/mod.rs diff --git a/packages/neutron-std/src/types/NEUTRON_COMMIT b/packages/neutron-std/src/types/NEUTRON_COMMIT index 95bcd38..72d857e 100644 --- a/packages/neutron-std/src/types/NEUTRON_COMMIT +++ b/packages/neutron-std/src/types/NEUTRON_COMMIT @@ -1 +1 @@ -v4.2.2 \ No newline at end of file +chore/ics-v6 \ No newline at end of file diff --git a/packages/neutron-std/src/types/connect/abci/mod.rs b/packages/neutron-std/src/types/connect/abci/mod.rs new file mode 100644 index 0000000..7083bd8 --- /dev/null +++ b/packages/neutron-std/src/types/connect/abci/mod.rs @@ -0,0 +1 @@ +pub mod v2; diff --git a/packages/neutron-std/src/types/slinky/abci/v1.rs b/packages/neutron-std/src/types/connect/abci/v2.rs similarity index 91% rename from packages/neutron-std/src/types/slinky/abci/v1.rs rename to packages/neutron-std/src/types/connect/abci/v2.rs index cdf80f5..f0d295b 100644 --- a/packages/neutron-std/src/types/slinky/abci/v1.rs +++ b/packages/neutron-std/src/types/connect/abci/v2.rs @@ -11,7 +11,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.abci.v1.OracleVoteExtension")] +#[proto_message(type_url = "/connect.abci.v2.OracleVoteExtension")] pub struct OracleVoteExtension { /// Prices defines a map of id(CurrencyPair) -> price.Bytes() . i.e. 1 -> /// 0x123.. (bytes). Notice the `id` function is determined by the diff --git a/packages/neutron-std/src/types/slinky/marketmap/mod.rs b/packages/neutron-std/src/types/connect/marketmap/mod.rs similarity index 57% rename from packages/neutron-std/src/types/slinky/marketmap/mod.rs rename to packages/neutron-std/src/types/connect/marketmap/mod.rs index a8429e3..dc7e178 100644 --- a/packages/neutron-std/src/types/slinky/marketmap/mod.rs +++ b/packages/neutron-std/src/types/connect/marketmap/mod.rs @@ -1,2 +1,2 @@ pub mod module; -pub mod v1; +pub mod v2; diff --git a/packages/neutron-std/src/types/connect/marketmap/module/mod.rs b/packages/neutron-std/src/types/connect/marketmap/module/mod.rs new file mode 100644 index 0000000..7083bd8 --- /dev/null +++ b/packages/neutron-std/src/types/connect/marketmap/module/mod.rs @@ -0,0 +1 @@ +pub mod v2; diff --git a/packages/neutron-std/src/types/slinky/marketmap/module/v1.rs b/packages/neutron-std/src/types/connect/marketmap/module/v2.rs similarity index 92% rename from packages/neutron-std/src/types/slinky/marketmap/module/v1.rs rename to packages/neutron-std/src/types/connect/marketmap/module/v2.rs index c6f0e95..075cebc 100644 --- a/packages/neutron-std/src/types/slinky/marketmap/module/v1.rs +++ b/packages/neutron-std/src/types/connect/marketmap/module/v2.rs @@ -11,7 +11,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.module.v1.Module")] +#[proto_message(type_url = "/connect.marketmap.module.v2.Module")] pub struct Module { /// Authority defines the custom module authority. If not set, defaults to the /// governance module. diff --git a/packages/neutron-std/src/types/slinky/marketmap/v1.rs b/packages/neutron-std/src/types/connect/marketmap/v2.rs similarity index 82% rename from packages/neutron-std/src/types/slinky/marketmap/v1.rs rename to packages/neutron-std/src/types/connect/marketmap/v2.rs index 3664e92..bdfccc9 100644 --- a/packages/neutron-std/src/types/slinky/marketmap/v1.rs +++ b/packages/neutron-std/src/types/connect/marketmap/v2.rs @@ -11,7 +11,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.Market")] +#[proto_message(type_url = "/connect.marketmap.v2.Market")] pub struct Market { /// Ticker represents a price feed for a given asset pair i.e. BTC/USD. The /// price feed is scaled to a number of decimal places and has a minimum number @@ -36,11 +36,11 @@ pub struct Market { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.Ticker")] +#[proto_message(type_url = "/connect.marketmap.v2.Ticker")] pub struct Ticker { /// CurrencyPair is the currency pair for this ticker. #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, + pub currency_pair: ::core::option::Option, /// Decimals is the number of decimal places for the ticker. The number of /// decimal places is used to convert the price to a human-readable format. #[prost(uint64, tag = "2")] @@ -77,7 +77,7 @@ pub struct Ticker { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.ProviderConfig")] +#[proto_message(type_url = "/connect.marketmap.v2.ProviderConfig")] pub struct ProviderConfig { /// Name corresponds to the name of the provider for which the configuration is /// being set. @@ -93,7 +93,7 @@ pub struct ProviderConfig { /// using: OffChainTicker = BTC/USDT NormalizeByPair = USDT/USD This field is /// optional and nullable. #[prost(message, optional, tag = "3")] - pub normalize_by_pair: ::core::option::Option, + pub normalize_by_pair: ::core::option::Option, /// Invert is a boolean indicating if the BASE and QUOTE of the market should /// be inverted. i.e. BASE -> QUOTE, QUOTE -> BASE #[prost(bool, tag = "4")] @@ -115,7 +115,7 @@ pub struct ProviderConfig { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketMap")] +#[proto_message(type_url = "/connect.marketmap.v2.MarketMap")] pub struct MarketMap { /// Markets is the full list of tickers and their associated configurations /// to be stored on-chain. @@ -134,7 +134,7 @@ pub struct MarketMap { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.Params")] +#[proto_message(type_url = "/connect.marketmap.v2.Params")] pub struct Params { /// MarketAuthorities is the list of authority accounts that are able to /// control updating the marketmap. @@ -157,7 +157,7 @@ pub struct Params { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.GenesisState")] +#[proto_message(type_url = "/connect.marketmap.v2.GenesisState")] pub struct GenesisState { /// MarketMap defines the global set of market configurations for all providers /// and markets. @@ -189,9 +189,9 @@ pub struct GenesisState { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketMapRequest")] +#[proto_message(type_url = "/connect.marketmap.v2.MarketMapRequest")] #[proto_query( - path = "/slinky.marketmap.v1.Query/MarketMap", + path = "/connect.marketmap.v2.Query/MarketMap", response_type = MarketMapResponse )] pub struct MarketMapRequest {} @@ -207,7 +207,7 @@ pub struct MarketMapRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketMapResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.MarketMapResponse")] pub struct MarketMapResponse { /// MarketMap defines the global set of market configurations for all providers /// and markets. @@ -240,16 +240,16 @@ pub struct MarketMapResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketRequest")] +#[proto_message(type_url = "/connect.marketmap.v2.MarketRequest")] #[proto_query( - path = "/slinky.marketmap.v1.Query/Market", + path = "/connect.marketmap.v2.Query/Market", response_type = MarketResponse )] pub struct MarketRequest { /// CurrencyPair is the currency pair associated with the market being /// requested. #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, + pub currency_pair: ::core::option::Option, } /// MarketResponse is the query response for the Market query. #[allow(clippy::derive_partial_eq_without_eq)] @@ -263,7 +263,7 @@ pub struct MarketRequest { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.MarketResponse")] pub struct MarketResponse { /// Market is the configuration of a single market to be price-fetched for. #[prost(message, optional, tag = "1")] @@ -281,9 +281,9 @@ pub struct MarketResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.ParamsRequest")] +#[proto_message(type_url = "/connect.marketmap.v2.ParamsRequest")] #[proto_query( - path = "/slinky.marketmap.v1.Query/Params", + path = "/connect.marketmap.v2.Query/Params", response_type = ParamsResponse )] pub struct ParamsRequest {} @@ -299,7 +299,7 @@ pub struct ParamsRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.ParamsResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.ParamsResponse")] pub struct ParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, @@ -317,9 +317,9 @@ pub struct ParamsResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.LastUpdatedRequest")] +#[proto_message(type_url = "/connect.marketmap.v2.LastUpdatedRequest")] #[proto_query( - path = "/slinky.marketmap.v1.Query/LastUpdated", + path = "/connect.marketmap.v2.Query/LastUpdated", response_type = LastUpdatedResponse )] pub struct LastUpdatedRequest {} @@ -336,7 +336,7 @@ pub struct LastUpdatedRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.LastUpdatedResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.LastUpdatedResponse")] pub struct LastUpdatedResponse { #[prost(uint64, tag = "1")] #[serde( @@ -345,6 +345,51 @@ pub struct LastUpdatedResponse { )] pub last_updated: u64, } +/// MsgUpsertMarkets defines a message carrying a payload for performing market +/// upserts (update or create if does not exist) in the x/marketmap module. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/connect.marketmap.v2.MsgUpsertMarkets")] +pub struct MsgUpsertMarkets { + /// Authority is the signer of this transaction. This authority must be + /// authorized by the module to execute the message. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// CreateMarkets is the list of all markets to be created for the given + /// transaction. + #[prost(message, repeated, tag = "2")] + pub markets: ::prost::alloc::vec::Vec, +} +/// MsgUpsertMarketsResponse is the response from the UpsertMarkets API in the +/// x/marketmap module. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/connect.marketmap.v2.MsgUpsertMarketsResponse")] +pub struct MsgUpsertMarketsResponse { + /// UpdatedMarkets is a map between the ticker and whether the market was + /// updated. + /// Deprecated: This field will be empty in all responses. + #[prost(map = "string, bool", tag = "1")] + pub market_updates: ::std::collections::HashMap<::prost::alloc::string::String, bool>, +} /// MsgCreateMarkets defines a message carrying a payload for creating markets in /// the x/marketmap module. #[allow(clippy::derive_partial_eq_without_eq)] @@ -358,7 +403,7 @@ pub struct LastUpdatedResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgCreateMarkets")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgCreateMarkets")] pub struct MsgCreateMarkets { /// Authority is the signer of this transaction. This authority must be /// authorized by the module to execute the message. @@ -381,7 +426,7 @@ pub struct MsgCreateMarkets { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgCreateMarketsResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgCreateMarketsResponse")] pub struct MsgCreateMarketsResponse {} /// MsgUpdateMarkets defines a message carrying a payload for updating the /// x/marketmap module. @@ -396,7 +441,7 @@ pub struct MsgCreateMarketsResponse {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgUpdateMarkets")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgUpdateMarkets")] pub struct MsgUpdateMarkets { /// Authority is the signer of this transaction. This authority must be /// authorized by the module to execute the message. @@ -419,7 +464,7 @@ pub struct MsgUpdateMarkets { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgUpdateMarketsResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgUpdateMarketsResponse")] pub struct MsgUpdateMarketsResponse {} /// MsgParams defines the Msg/Params request type. It contains the /// new parameters for the x/marketmap module. @@ -434,7 +479,7 @@ pub struct MsgUpdateMarketsResponse {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgParams")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgParams")] pub struct MsgParams { /// Params defines the new parameters for the x/marketmap module. #[prost(message, optional, tag = "1")] @@ -456,7 +501,7 @@ pub struct MsgParams { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgParamsResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgParamsResponse")] pub struct MsgParamsResponse {} /// MsgRemoveMarketAuthorities defines the Msg/RemoveMarketAuthoritiesResponse /// request type. It contains the new addresses to remove from the list of @@ -472,7 +517,7 @@ pub struct MsgParamsResponse {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgRemoveMarketAuthorities")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgRemoveMarketAuthorities")] pub struct MsgRemoveMarketAuthorities { /// RemoveAddresses is the list of addresses to remove. #[prost(string, repeated, tag = "1")] @@ -495,7 +540,7 @@ pub struct MsgRemoveMarketAuthorities { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")] +#[proto_message(type_url = "/connect.marketmap.v2.MsgRemoveMarketAuthoritiesResponse")] pub struct MsgRemoveMarketAuthoritiesResponse {} pub struct MarketmapQuerier<'a, Q: cosmwasm_std::CustomQuery> { querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, @@ -509,7 +554,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> MarketmapQuerier<'a, Q> { } pub fn market( &self, - currency_pair: ::core::option::Option, + currency_pair: ::core::option::Option, ) -> Result { MarketRequest { currency_pair }.query(self.querier) } diff --git a/packages/neutron-std/src/types/slinky/mod.rs b/packages/neutron-std/src/types/connect/mod.rs similarity index 62% rename from packages/neutron-std/src/types/slinky/mod.rs rename to packages/neutron-std/src/types/connect/mod.rs index a4651ea..43e6628 100644 --- a/packages/neutron-std/src/types/slinky/mod.rs +++ b/packages/neutron-std/src/types/connect/mod.rs @@ -1,8 +1,5 @@ pub mod abci; -pub mod alerts; -pub mod incentives; pub mod marketmap; pub mod oracle; pub mod service; -pub mod sla; pub mod types; diff --git a/packages/neutron-std/src/types/slinky/oracle/mod.rs b/packages/neutron-std/src/types/connect/oracle/mod.rs similarity index 57% rename from packages/neutron-std/src/types/slinky/oracle/mod.rs rename to packages/neutron-std/src/types/connect/oracle/mod.rs index a8429e3..dc7e178 100644 --- a/packages/neutron-std/src/types/slinky/oracle/mod.rs +++ b/packages/neutron-std/src/types/connect/oracle/mod.rs @@ -1,2 +1,2 @@ pub mod module; -pub mod v1; +pub mod v2; diff --git a/packages/neutron-std/src/types/connect/oracle/module/mod.rs b/packages/neutron-std/src/types/connect/oracle/module/mod.rs new file mode 100644 index 0000000..7083bd8 --- /dev/null +++ b/packages/neutron-std/src/types/connect/oracle/module/mod.rs @@ -0,0 +1 @@ +pub mod v2; diff --git a/packages/neutron-std/src/types/slinky/sla/module/v1.rs b/packages/neutron-std/src/types/connect/oracle/module/v2.rs similarity index 89% rename from packages/neutron-std/src/types/slinky/sla/module/v1.rs rename to packages/neutron-std/src/types/connect/oracle/module/v2.rs index 084d0dc..825fda2 100644 --- a/packages/neutron-std/src/types/slinky/sla/module/v1.rs +++ b/packages/neutron-std/src/types/connect/oracle/module/v2.rs @@ -11,7 +11,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.sla.module.v1.Module")] +#[proto_message(type_url = "/connect.oracle.module.v2.Module")] pub struct Module { /// Authority defines the custom module authority. If not set, defaults to the /// governance module. diff --git a/packages/neutron-std/src/types/slinky/oracle/v1.rs b/packages/neutron-std/src/types/connect/oracle/v2.rs similarity index 87% rename from packages/neutron-std/src/types/slinky/oracle/v1.rs rename to packages/neutron-std/src/types/connect/oracle/v2.rs index c508ed4..4095707 100644 --- a/packages/neutron-std/src/types/slinky/oracle/v1.rs +++ b/packages/neutron-std/src/types/connect/oracle/v2.rs @@ -12,7 +12,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.QuotePrice")] +#[proto_message(type_url = "/connect.oracle.v2.QuotePrice")] pub struct QuotePrice { #[prost(string, tag = "1")] pub price: ::prost::alloc::string::String, @@ -42,7 +42,7 @@ pub struct QuotePrice { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.CurrencyPairState")] +#[proto_message(type_url = "/connect.oracle.v2.CurrencyPairState")] pub struct CurrencyPairState { /// QuotePrice is the latest price for a currency-pair, notice this value can /// be null in the case that no price exists for the currency-pair @@ -77,11 +77,11 @@ pub struct CurrencyPairState { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.CurrencyPairGenesis")] +#[proto_message(type_url = "/connect.oracle.v2.CurrencyPairGenesis")] pub struct CurrencyPairGenesis { /// The CurrencyPair to be added to module state #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, + pub currency_pair: ::core::option::Option, /// A genesis price if one exists (note this will be empty, unless it results /// from forking the state of this module) #[prost(message, optional, tag = "2")] @@ -116,7 +116,7 @@ pub struct CurrencyPairGenesis { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GenesisState")] +#[proto_message(type_url = "/connect.oracle.v2.GenesisState")] pub struct GenesisState { /// CurrencyPairGenesis is the set of CurrencyPairGeneses for the module. I.e /// the starting set of CurrencyPairs for the module + information regarding @@ -143,9 +143,9 @@ pub struct GenesisState { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetAllCurrencyPairsRequest")] +#[proto_message(type_url = "/connect.oracle.v2.GetAllCurrencyPairsRequest")] #[proto_query( - path = "/slinky.oracle.v1.Query/GetAllCurrencyPairs", + path = "/connect.oracle.v2.Query/GetAllCurrencyPairs", response_type = GetAllCurrencyPairsResponse )] pub struct GetAllCurrencyPairsRequest {} @@ -162,12 +162,12 @@ pub struct GetAllCurrencyPairsRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetAllCurrencyPairsResponse")] +#[proto_message(type_url = "/connect.oracle.v2.GetAllCurrencyPairsResponse")] pub struct GetAllCurrencyPairsResponse { #[prost(message, repeated, tag = "1")] - pub currency_pairs: ::prost::alloc::vec::Vec, + pub currency_pairs: ::prost::alloc::vec::Vec, } -/// GetPriceRequest either takes a CurrencyPair, or an identifier for the +/// GetPriceRequest takes an identifier for the /// CurrencyPair in the format base/quote. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -180,15 +180,15 @@ pub struct GetAllCurrencyPairsResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetPriceRequest")] +#[proto_message(type_url = "/connect.oracle.v2.GetPriceRequest")] #[proto_query( - path = "/slinky.oracle.v1.Query/GetPrice", + path = "/connect.oracle.v2.Query/GetPrice", response_type = GetPriceResponse )] pub struct GetPriceRequest { /// CurrencyPair represents the pair that the user wishes to query. - #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, + #[prost(string, tag = "1")] + pub currency_pair: ::prost::alloc::string::String, } /// GetPriceResponse is the response from the GetPrice grpc method exposed from /// the x/oracle query service. @@ -203,7 +203,7 @@ pub struct GetPriceRequest { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetPriceResponse")] +#[proto_message(type_url = "/connect.oracle.v2.GetPriceResponse")] pub struct GetPriceResponse { /// QuotePrice represents the quote-price for the CurrencyPair given in /// GetPriceRequest (possibly nil if no update has been made) @@ -217,8 +217,7 @@ pub struct GetPriceResponse { )] pub nonce: u64, /// decimals represents the number of decimals that the quote-price is - /// represented in. For Pairs where ETHEREUM is the quote this will be 18, - /// otherwise it will be 8. + /// represented in. It is used to scale the QuotePrice to its proper value. #[prost(uint64, tag = "3")] #[serde( serialize_with = "crate::serde::as_str::serialize", @@ -247,9 +246,9 @@ pub struct GetPriceResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetPricesRequest")] +#[proto_message(type_url = "/connect.oracle.v2.GetPricesRequest")] #[proto_query( - path = "/slinky.oracle.v1.Query/GetPrices", + path = "/connect.oracle.v2.Query/GetPrices", response_type = GetPricesResponse )] pub struct GetPricesRequest { @@ -270,7 +269,7 @@ pub struct GetPricesRequest { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetPricesResponse")] +#[proto_message(type_url = "/connect.oracle.v2.GetPricesResponse")] pub struct GetPricesResponse { #[prost(message, repeated, tag = "1")] pub prices: ::prost::alloc::vec::Vec, @@ -287,9 +286,9 @@ pub struct GetPricesResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetCurrencyPairMappingRequest")] +#[proto_message(type_url = "/connect.oracle.v2.GetCurrencyPairMappingRequest")] #[proto_query( - path = "/slinky.oracle.v1.Query/GetCurrencyPairMapping", + path = "/connect.oracle.v2.Query/GetCurrencyPairMapping", response_type = GetCurrencyPairMappingResponse )] pub struct GetCurrencyPairMappingRequest {} @@ -305,13 +304,13 @@ pub struct GetCurrencyPairMappingRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.GetCurrencyPairMappingResponse")] +#[proto_message(type_url = "/connect.oracle.v2.GetCurrencyPairMappingResponse")] pub struct GetCurrencyPairMappingResponse { /// currency_pair_mapping is a mapping of the id representing the currency pair /// to the currency pair itself. #[prost(map = "uint64, message", tag = "1")] pub currency_pair_mapping: - ::std::collections::HashMap, + ::std::collections::HashMap, } /// Given an authority + a set of CurrencyPairs, the x/oracle module will /// check to see that the authority has permissions to update the set of @@ -328,7 +327,7 @@ pub struct GetCurrencyPairMappingResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.MsgAddCurrencyPairs")] +#[proto_message(type_url = "/connect.oracle.v2.MsgAddCurrencyPairs")] pub struct MsgAddCurrencyPairs { /// authority is the address of the account that is authorized to update the /// x/oracle's CurrencyPairs @@ -337,7 +336,7 @@ pub struct MsgAddCurrencyPairs { /// set of CurrencyPairs to be added to the module (+ prices if they are to be /// set) #[prost(message, repeated, tag = "2")] - pub currency_pairs: ::prost::alloc::vec::Vec, + pub currency_pairs: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -350,7 +349,7 @@ pub struct MsgAddCurrencyPairs { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.MsgAddCurrencyPairsResponse")] +#[proto_message(type_url = "/connect.oracle.v2.MsgAddCurrencyPairsResponse")] pub struct MsgAddCurrencyPairsResponse {} /// Given an authority + a set of CurrencyPairIDs, the x/oracle module's message /// service will remove all of the CurrencyPairs identified by each @@ -368,7 +367,7 @@ pub struct MsgAddCurrencyPairsResponse {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.MsgRemoveCurrencyPairs")] +#[proto_message(type_url = "/connect.oracle.v2.MsgRemoveCurrencyPairs")] pub struct MsgRemoveCurrencyPairs { /// authority is the address of the account that is authorized to update the /// x/oracle's CurrencyPairs @@ -391,7 +390,7 @@ pub struct MsgRemoveCurrencyPairs { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.oracle.v1.MsgRemoveCurrencyPairsResponse")] +#[proto_message(type_url = "/connect.oracle.v2.MsgRemoveCurrencyPairsResponse")] pub struct MsgRemoveCurrencyPairsResponse {} pub struct OracleQuerier<'a, Q: cosmwasm_std::CustomQuery> { querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, @@ -407,7 +406,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> OracleQuerier<'a, Q> { } pub fn get_price( &self, - currency_pair: ::core::option::Option, + currency_pair: ::prost::alloc::string::String, ) -> Result { GetPriceRequest { currency_pair }.query(self.querier) } diff --git a/packages/neutron-std/src/types/connect/service/mod.rs b/packages/neutron-std/src/types/connect/service/mod.rs new file mode 100644 index 0000000..7083bd8 --- /dev/null +++ b/packages/neutron-std/src/types/connect/service/mod.rs @@ -0,0 +1 @@ +pub mod v2; diff --git a/packages/neutron-std/src/types/slinky/service/v1.rs b/packages/neutron-std/src/types/connect/service/v2.rs similarity index 52% rename from packages/neutron-std/src/types/slinky/service/v1.rs rename to packages/neutron-std/src/types/connect/service/v2.rs index 8088343..67854bd 100644 --- a/packages/neutron-std/src/types/slinky/service/v1.rs +++ b/packages/neutron-std/src/types/connect/service/v2.rs @@ -11,7 +11,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.service.v1.QueryPricesRequest")] +#[proto_message(type_url = "/connect.service.v2.QueryPricesRequest")] pub struct QueryPricesRequest {} /// QueryPricesResponse defines the response type for the Prices method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -25,14 +25,18 @@ pub struct QueryPricesRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.service.v1.QueryPricesResponse")] +#[proto_message(type_url = "/connect.service.v2.QueryPricesResponse")] pub struct QueryPricesResponse { - /// prices defines the list of prices. + /// Prices defines the list of prices. #[prost(map = "string, string", tag = "1")] pub prices: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + /// Timestamp defines the timestamp of the prices. #[prost(message, optional, tag = "2")] pub timestamp: ::core::option::Option, + /// Version defines the version of the oracle service that provided the prices. + #[prost(string, tag = "3")] + pub version: ::prost::alloc::string::String, } /// QueryMarketMapRequest defines the request type for the MarketMap method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -46,7 +50,7 @@ pub struct QueryPricesResponse { ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.service.v1.QueryMarketMapRequest")] +#[proto_message(type_url = "/connect.service.v2.QueryMarketMapRequest")] pub struct QueryMarketMapRequest {} /// QueryMarketMapResponse defines the response type for the MarketMap method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -60,9 +64,41 @@ pub struct QueryMarketMapRequest {} ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.service.v1.QueryMarketMapResponse")] +#[proto_message(type_url = "/connect.service.v2.QueryMarketMapResponse")] pub struct QueryMarketMapResponse { - /// market_map defines the current market map configuration. + /// MarketMap defines the current market map configuration. #[prost(message, optional, tag = "1")] - pub market_map: ::core::option::Option, + pub market_map: ::core::option::Option, +} +/// QueryVersionRequest defines the request type for the Version 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 = "/connect.service.v2.QueryVersionRequest")] +pub struct QueryVersionRequest {} +/// QueryVersionResponse defines the response type for the Version 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 = "/connect.service.v2.QueryVersionResponse")] +pub struct QueryVersionResponse { + /// Version defines the current version of the oracle service. + #[prost(string, tag = "1")] + pub version: ::prost::alloc::string::String, } diff --git a/packages/neutron-std/src/types/connect/types/mod.rs b/packages/neutron-std/src/types/connect/types/mod.rs new file mode 100644 index 0000000..7083bd8 --- /dev/null +++ b/packages/neutron-std/src/types/connect/types/mod.rs @@ -0,0 +1 @@ +pub mod v2; diff --git a/packages/neutron-std/src/types/slinky/types/v1.rs b/packages/neutron-std/src/types/connect/types/v2.rs similarity index 90% rename from packages/neutron-std/src/types/slinky/types/v1.rs rename to packages/neutron-std/src/types/connect/types/v2.rs index 3dbc8f7..9c778a2 100644 --- a/packages/neutron-std/src/types/slinky/types/v1.rs +++ b/packages/neutron-std/src/types/connect/types/v2.rs @@ -12,7 +12,7 @@ use neutron_std_derive::CosmwasmExt; ::schemars::JsonSchema, CosmwasmExt, )] -#[proto_message(type_url = "/slinky.types.v1.CurrencyPair")] +#[proto_message(type_url = "/connect.types.v2.CurrencyPair")] pub struct CurrencyPair { #[prost(string, tag = "1")] pub base: ::prost::alloc::string::String, diff --git a/packages/neutron-std/src/types/cosmos/ics23/v1.rs b/packages/neutron-std/src/types/cosmos/ics23/v1.rs index a6c6dcd..b3d47ff 100644 --- a/packages/neutron-std/src/types/cosmos/ics23/v1.rs +++ b/packages/neutron-std/src/types/cosmos/ics23/v1.rs @@ -259,6 +259,7 @@ pub struct ProofSpec { #[prost(message, optional, tag = "2")] pub inner_spec: ::core::option::Option, /// max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) + /// the max_depth is interpreted as 128 if set to 0 #[prost(int32, tag = "3")] #[serde( serialize_with = "crate::serde::as_str::serialize", @@ -518,11 +519,14 @@ pub enum HashOp { NoHash = 0, Sha256 = 1, Sha512 = 2, - Keccak = 3, + Keccak256 = 3, Ripemd160 = 4, /// ripemd160(sha256(x)) Bitcoin = 5, Sha512256 = 6, + Blake2b512 = 7, + Blake2s256 = 8, + Blake3 = 9, } impl HashOp { /// String value of the enum field names used in the ProtoBuf definition. @@ -534,10 +538,13 @@ impl HashOp { HashOp::NoHash => "NO_HASH", HashOp::Sha256 => "SHA256", HashOp::Sha512 => "SHA512", - HashOp::Keccak => "KECCAK", + HashOp::Keccak256 => "KECCAK256", HashOp::Ripemd160 => "RIPEMD160", HashOp::Bitcoin => "BITCOIN", HashOp::Sha512256 => "SHA512_256", + HashOp::Blake2b512 => "BLAKE2B_512", + HashOp::Blake2s256 => "BLAKE2S_256", + HashOp::Blake3 => "BLAKE3", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -546,10 +553,13 @@ impl HashOp { "NO_HASH" => Some(Self::NoHash), "SHA256" => Some(Self::Sha256), "SHA512" => Some(Self::Sha512), - "KECCAK" => Some(Self::Keccak), + "KECCAK256" => Some(Self::Keccak256), "RIPEMD160" => Some(Self::Ripemd160), "BITCOIN" => Some(Self::Bitcoin), "SHA512_256" => Some(Self::Sha512256), + "BLAKE2B_512" => Some(Self::Blake2b512), + "BLAKE2S_256" => Some(Self::Blake2s256), + "BLAKE3" => Some(Self::Blake3), _ => None, } } diff --git a/packages/neutron-std/src/types/cosmwasm/wasm/v1.rs b/packages/neutron-std/src/types/cosmwasm/wasm/v1.rs index d85c3a9..c7a6f20 100644 --- a/packages/neutron-std/src/types/cosmwasm/wasm/v1.rs +++ b/packages/neutron-std/src/types/cosmwasm/wasm/v1.rs @@ -682,7 +682,7 @@ pub struct MsgInstantiateContractResponse { pub data: ::prost::alloc::vec::Vec, } /// MsgInstantiateContract2 create a new smart contract instance for the given -/// code id with a predicable address. +/// code id with a predictable address. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -1680,6 +1680,20 @@ pub struct MsgIbcSendResponse { )] pub sequence: u64, } +/// MsgIBCWriteAcknowledgementResponse +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgIBCWriteAcknowledgementResponse")] +pub struct MsgIbcWriteAcknowledgementResponse {} /// MsgIBCCloseChannel port and channel need to be owned by the contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive( diff --git a/packages/neutron-std/src/types/ibc/applications/interchain_accounts/host/v1.rs b/packages/neutron-std/src/types/ibc/applications/interchain_accounts/host/v1.rs index 1536cc6..4107288 100644 --- a/packages/neutron-std/src/types/ibc/applications/interchain_accounts/host/v1.rs +++ b/packages/neutron-std/src/types/ibc/applications/interchain_accounts/host/v1.rs @@ -21,6 +21,34 @@ pub struct Params { #[prost(string, repeated, tag = "2")] pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +/// QueryRequest defines the parameters for a particular query request +/// by an interchain account. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.QueryRequest")] +pub struct QueryRequest { + /// path defines the path of the query request as defined by ADR-021. + /// + #[prost(string, tag = "1")] + pub path: ::prost::alloc::string::String, + /// data defines the payload of the query request as defined by ADR-021. + /// + #[prost(bytes = "vec", tag = "2")] + #[serde( + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" + )] + pub data: ::prost::alloc::vec::Vec, +} /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -94,6 +122,54 @@ pub struct MsgUpdateParams { )] #[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse")] pub struct MsgUpdateParamsResponse {} +/// MsgModuleQuerySafe defines the payload for Msg/ModuleQuerySafe +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafe")] +pub struct MsgModuleQuerySafe { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// requests defines the module safe queries to execute. + #[prost(message, repeated, tag = "2")] + pub requests: ::prost::alloc::vec::Vec, +} +/// MsgModuleQuerySafeResponse defines the response for Msg/ModuleQuerySafe +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message( + type_url = "/ibc.applications.interchain_accounts.host.v1.MsgModuleQuerySafeResponse" +)] +pub struct MsgModuleQuerySafeResponse { + /// height at which the responses were queried + #[prost(uint64, tag = "1")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub height: u64, + /// protobuf encoded responses for each query + #[prost(bytes = "vec", repeated, tag = "2")] + pub responses: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} pub struct HostQuerier<'a, Q: cosmwasm_std::CustomQuery> { querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, } diff --git a/packages/neutron-std/src/types/ibc/applications/transfer/v1.rs b/packages/neutron-std/src/types/ibc/applications/transfer/v1.rs index e993665..994fc0a 100644 --- a/packages/neutron-std/src/types/ibc/applications/transfer/v1.rs +++ b/packages/neutron-std/src/types/ibc/applications/transfer/v1.rs @@ -26,8 +26,8 @@ pub struct Allocation { /// allow list of receivers, an empty allow list permits any receiver address #[prost(string, repeated, tag = "4")] pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// allow list of packet data keys, an empty list prohibits all packet data keys; - /// a list only with "*" permits any packet data key + /// allow list of memo strings, an empty list prohibits all memo strings; + /// a list only with "*" permits any memo string #[prost(string, repeated, tag = "5")] pub allowed_packet_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } diff --git a/packages/neutron-std/src/types/ibc/core/client/v1.rs b/packages/neutron-std/src/types/ibc/core/client/v1.rs index 137c265..10c1498 100644 --- a/packages/neutron-std/src/types/ibc/core/client/v1.rs +++ b/packages/neutron-std/src/types/ibc/core/client/v1.rs @@ -720,6 +720,81 @@ pub struct QueryUpgradedConsensusStateResponse { #[prost(message, optional, tag = "1")] pub upgraded_consensus_state: ::core::option::Option, } +/// QueryVerifyMembershipRequest is the request type for the Query/VerifyMembership 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 = "/ibc.core.client.v1.QueryVerifyMembershipRequest")] +#[proto_query( + path = "/ibc.core.client.v1.Query/VerifyMembership", + response_type = QueryVerifyMembershipResponse +)] +pub struct QueryVerifyMembershipRequest { + /// client unique identifier. + #[prost(string, tag = "1")] + #[serde(alias = "clientID")] + pub client_id: ::prost::alloc::string::String, + /// the proof to be verified by the client. + #[prost(bytes = "vec", tag = "2")] + #[serde( + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" + )] + pub proof: ::prost::alloc::vec::Vec, + /// the height of the commitment root at which the proof is verified. + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, + /// the commitment key path. + #[prost(message, optional, tag = "4")] + pub merkle_path: ::core::option::Option, + /// the value which is proven. + #[prost(bytes = "vec", tag = "5")] + #[serde( + serialize_with = "crate::serde::as_base64_encoded_string::serialize", + deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" + )] + pub value: ::prost::alloc::vec::Vec, + /// optional time delay + #[prost(uint64, tag = "6")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub time_delay: u64, + /// optional block delay + #[prost(uint64, tag = "7")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub block_delay: u64, +} +/// QueryVerifyMembershipResponse is the response type for the Query/VerifyMembership 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 = "/ibc.core.client.v1.QueryVerifyMembershipResponse")] +pub struct QueryVerifyMembershipResponse { + /// boolean indicating success or failure of proof verification. + #[prost(bool, tag = "1")] + pub success: bool, +} /// MsgCreateClient defines a message to create an IBC client #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1103,4 +1178,25 @@ impl<'a, Q: cosmwasm_std::CustomQuery> ClientQuerier<'a, Q> { ) -> Result { QueryUpgradedConsensusStateRequest {}.query(self.querier) } + pub fn verify_membership( + &self, + client_id: ::prost::alloc::string::String, + proof: ::prost::alloc::vec::Vec, + proof_height: ::core::option::Option, + merkle_path: ::core::option::Option, + value: ::prost::alloc::vec::Vec, + time_delay: u64, + block_delay: u64, + ) -> Result { + QueryVerifyMembershipRequest { + client_id, + proof, + proof_height, + merkle_path, + value, + time_delay, + block_delay, + } + .query(self.querier) + } } diff --git a/packages/neutron-std/src/types/ibc/core/connection/v1.rs b/packages/neutron-std/src/types/ibc/core/connection/v1.rs index 14417bf..e3dcf94 100644 --- a/packages/neutron-std/src/types/ibc/core/connection/v1.rs +++ b/packages/neutron-std/src/types/ibc/core/connection/v1.rs @@ -657,6 +657,7 @@ pub struct MsgConnectionOpenTry { #[prost(string, tag = "2")] #[serde(alias = "previous_connectionID")] pub previous_connection_id: ::prost::alloc::string::String, + #[deprecated] #[prost(message, optional, tag = "3")] pub client_state: ::core::option::Option, #[prost(message, optional, tag = "4")] @@ -680,6 +681,7 @@ pub struct MsgConnectionOpenTry { )] pub proof_init: ::prost::alloc::vec::Vec, /// proof of client state included in message + #[deprecated] #[prost(bytes = "vec", tag = "9")] #[serde( serialize_with = "crate::serde::as_base64_encoded_string::serialize", @@ -687,17 +689,20 @@ pub struct MsgConnectionOpenTry { )] pub proof_client: ::prost::alloc::vec::Vec, /// proof of client consensus state + #[deprecated] #[prost(bytes = "vec", tag = "10")] #[serde( serialize_with = "crate::serde::as_base64_encoded_string::serialize", deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_consensus: ::prost::alloc::vec::Vec, + #[deprecated] #[prost(message, optional, tag = "11")] pub consensus_height: ::core::option::Option, #[prost(string, tag = "12")] pub signer: ::prost::alloc::string::String, /// optional proof data for host state machines that are unable to introspect their own consensus state + #[deprecated] #[prost(bytes = "vec", tag = "13")] #[serde( serialize_with = "crate::serde::as_base64_encoded_string::serialize", @@ -742,6 +747,7 @@ pub struct MsgConnectionOpenAck { pub counterparty_connection_id: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub version: ::core::option::Option, + #[deprecated] #[prost(message, optional, tag = "4")] pub client_state: ::core::option::Option, #[prost(message, optional, tag = "5")] @@ -755,6 +761,7 @@ pub struct MsgConnectionOpenAck { )] pub proof_try: ::prost::alloc::vec::Vec, /// proof of client state included in message + #[deprecated] #[prost(bytes = "vec", tag = "7")] #[serde( serialize_with = "crate::serde::as_base64_encoded_string::serialize", @@ -762,17 +769,20 @@ pub struct MsgConnectionOpenAck { )] pub proof_client: ::prost::alloc::vec::Vec, /// proof of client consensus state + #[deprecated] #[prost(bytes = "vec", tag = "8")] #[serde( serialize_with = "crate::serde::as_base64_encoded_string::serialize", deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" )] pub proof_consensus: ::prost::alloc::vec::Vec, + #[deprecated] #[prost(message, optional, tag = "9")] pub consensus_height: ::core::option::Option, #[prost(string, tag = "10")] pub signer: ::prost::alloc::string::String, /// optional proof data for host state machines that are unable to introspect their own consensus state + #[deprecated] #[prost(bytes = "vec", tag = "11")] #[serde( serialize_with = "crate::serde::as_base64_encoded_string::serialize", diff --git a/packages/neutron-std/src/types/mod.rs b/packages/neutron-std/src/types/mod.rs index 9f2df66..51b5f03 100644 --- a/packages/neutron-std/src/types/mod.rs +++ b/packages/neutron-std/src/types/mod.rs @@ -1,4 +1,5 @@ pub mod capability; +pub mod connect; pub mod cosmos; pub mod cosmwasm; pub mod feemarket; @@ -6,5 +7,4 @@ pub mod gaia; pub mod ibc; pub mod neutron; pub mod osmosis; -pub mod slinky; pub mod tendermint; diff --git a/packages/neutron-std/src/types/neutron/contractmanager/mod.rs b/packages/neutron-std/src/types/neutron/contractmanager/mod.rs index f882ee5..19185a5 100644 --- a/packages/neutron-std/src/types/neutron/contractmanager/mod.rs +++ b/packages/neutron-std/src/types/neutron/contractmanager/mod.rs @@ -132,10 +132,34 @@ pub struct QueryParamsResponse { )] #[proto_message(type_url = "/neutron.contractmanager.QueryFailuresRequest")] #[proto_query( - path = "/neutron.contractmanager.Query/AddressFailure", + path = "/neutron.contractmanager.Query/AddressFailures", response_type = QueryFailuresResponse )] pub struct QueryFailuresRequest { + /// address of the contract which Sudo call failed. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub pagination: ::core::option::Option, +} +/// QueryFailureRequest is request type for the Query/Failures 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 = "/neutron.contractmanager.QueryFailureRequest")] +#[proto_query( + path = "/neutron.contractmanager.Query/AddressFailure", + response_type = QueryFailureResponse +)] +pub struct QueryFailureRequest { /// address of the contract which Sudo call failed. #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, @@ -147,8 +171,23 @@ pub struct QueryFailuresRequest { deserialize_with = "crate::serde::as_str::deserialize" )] pub failure_id: u64, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, +} +/// QueryFailureResponse is response type for the Query/Failure 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 = "/neutron.contractmanager.QueryFailureResponse")] +pub struct QueryFailureResponse { + #[prost(message, optional, tag = "1")] + pub failure: ::core::option::Option, } /// QueryFailuresResponse is response type for the Query/Failures RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -226,24 +265,20 @@ impl<'a, Q: cosmwasm_std::CustomQuery> ContractmanagerQuerier<'a, Q> { &self, address: ::prost::alloc::string::String, failure_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryFailuresRequest { + ) -> Result { + QueryFailureRequest { address, failure_id, - pagination, } .query(self.querier) } pub fn address_failures( &self, address: ::prost::alloc::string::String, - failure_id: u64, pagination: ::core::option::Option, ) -> Result { QueryFailuresRequest { address, - failure_id, pagination, } .query(self.querier) @@ -251,12 +286,10 @@ impl<'a, Q: cosmwasm_std::CustomQuery> ContractmanagerQuerier<'a, Q> { pub fn failures( &self, address: ::prost::alloc::string::String, - failure_id: u64, pagination: ::core::option::Option, ) -> Result { QueryFailuresRequest { address, - failure_id, pagination, } .query(self.querier) diff --git a/packages/neutron-std/src/types/neutron/cron.rs b/packages/neutron-std/src/types/neutron/cron/mod.rs similarity index 60% rename from packages/neutron-std/src/types/neutron/cron.rs rename to packages/neutron-std/src/types/neutron/cron/mod.rs index 8afa0a3..f22c6ab 100644 --- a/packages/neutron-std/src/types/neutron/cron.rs +++ b/packages/neutron-std/src/types/neutron/cron/mod.rs @@ -1,5 +1,6 @@ +pub mod v1; use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. +/// Defines the parameters for the module. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -24,6 +25,7 @@ pub struct Params { )] pub limit: u64, } +/// Defines the schedule for execution #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -47,7 +49,7 @@ pub struct Schedule { deserialize_with = "crate::serde::as_str::deserialize" )] pub period: u64, - /// Msgs that will be executed every period amount of time + /// Msgs that will be executed every certain number of blocks, specified in the `period` field #[prost(message, repeated, tag = "3")] pub msgs: ::prost::alloc::vec::Vec, /// Last execution's block height @@ -57,7 +59,15 @@ pub struct Schedule { deserialize_with = "crate::serde::as_str::deserialize" )] pub last_execute_height: u64, + /// Stage when messages will be executed + #[prost(enumeration = "ExecutionStage", tag = "5")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub execution_stage: i32, } +/// Defines the contract and the message to pass #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -71,13 +81,14 @@ pub struct Schedule { )] #[proto_message(type_url = "/neutron.cron.MsgExecuteContract")] pub struct MsgExecuteContract { - /// Contract is the address of the smart contract + /// The address of the smart contract #[prost(string, tag = "1")] pub contract: ::prost::alloc::string::String, - /// Msg is json encoded message to be passed to the contract + /// JSON encoded message to be passed to the contract #[prost(string, tag = "2")] pub msg: ::prost::alloc::string::String, } +/// Defines the number of current schedules #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -91,7 +102,7 @@ pub struct MsgExecuteContract { )] #[proto_message(type_url = "/neutron.cron.ScheduleCount")] pub struct ScheduleCount { - /// Count is the number of current schedules + /// The number of current schedules #[prost(int32, tag = "1")] #[serde( serialize_with = "crate::serde::as_str::serialize", @@ -99,7 +110,37 @@ pub struct ScheduleCount { )] pub count: i32, } -/// GenesisState defines the cron module's genesis state. +/// Defines when messages will be executed in the block +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] +pub enum ExecutionStage { + /// Execution at the end of the block + EndBlocker = 0, + /// Execution at the beginning of the block + BeginBlocker = 1, +} +impl ExecutionStage { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + ExecutionStage::EndBlocker => "EXECUTION_STAGE_END_BLOCKER", + ExecutionStage::BeginBlocker => "EXECUTION_STAGE_BEGIN_BLOCKER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXECUTION_STAGE_END_BLOCKER" => Some(Self::EndBlocker), + "EXECUTION_STAGE_BEGIN_BLOCKER" => Some(Self::BeginBlocker), + _ => None, + } + } +} +/// Defines the cron module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -119,6 +160,7 @@ pub struct GenesisState { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } +/// The request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -133,6 +175,7 @@ pub struct GenesisState { #[proto_message(type_url = "/neutron.cron.QueryParamsRequest")] #[proto_query(path = "/neutron.cron.Query/Params", response_type = QueryParamsResponse)] pub struct QueryParamsRequest {} +/// The response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -150,6 +193,7 @@ pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } +/// The request type for the Query/Schedule RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -170,6 +214,7 @@ pub struct QueryGetScheduleRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } +/// The response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -186,6 +231,7 @@ pub struct QueryGetScheduleResponse { #[prost(message, optional, tag = "1")] pub schedule: ::core::option::Option, } +/// The request type for the Query/Schedules RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -206,6 +252,7 @@ pub struct QuerySchedulesRequest { #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option, } +/// The response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -225,7 +272,94 @@ pub struct QuerySchedulesResponse { pub pagination: ::core::option::Option, } -/// MsgUpdateParams is the MsgUpdateParams request type. +/// The MsgAddSchedule request type. +#[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.cron.MsgAddSchedule")] +pub struct MsgAddSchedule { + /// The address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// Name of the schedule + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, + /// Period in blocks + #[prost(uint64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub period: u64, + /// Msgs that will be executed every certain number of blocks, specified in the `period` field + #[prost(message, repeated, tag = "4")] + pub msgs: ::prost::alloc::vec::Vec, + /// Stage when messages will be executed + #[prost(enumeration = "ExecutionStage", tag = "5")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub execution_stage: i32, +} +/// Defines the response structure for executing a MsgAddSchedule message. +#[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.cron.MsgAddScheduleResponse")] +pub struct MsgAddScheduleResponse {} +/// The MsgRemoveSchedule request type. +#[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.cron.MsgRemoveSchedule")] +pub struct MsgRemoveSchedule { + /// The address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// Name of the schedule + #[prost(string, tag = "2")] + pub name: ::prost::alloc::string::String, +} +/// Defines the response structure for executing a MsgRemoveSchedule message. +#[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.cron.MsgRemoveScheduleResponse")] +pub struct MsgRemoveScheduleResponse {} +/// The MsgUpdateParams request type. /// /// Since: 0.47 #[allow(clippy::derive_partial_eq_without_eq)] @@ -241,17 +375,16 @@ pub struct QuerySchedulesResponse { )] #[proto_message(type_url = "/neutron.cron.MsgUpdateParams")] pub struct MsgUpdateParams { - /// Authority is the address of the governance account. + /// The address of the governance account. #[prost(string, tag = "1")] pub authority: ::prost::alloc::string::String, - /// params defines the x/cron parameters to update. + /// Defines the x/cron parameters to update. /// /// NOTE: All parameters must be supplied. #[prost(message, optional, tag = "2")] pub params: ::core::option::Option, } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. +/// Defines the response structure for executing a MsgUpdateParams message. /// /// Since: 0.47 #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/packages/neutron-std/src/types/neutron/cron/v1.rs b/packages/neutron-std/src/types/neutron/cron/v1.rs new file mode 100644 index 0000000..6776522 --- /dev/null +++ b/packages/neutron-std/src/types/neutron/cron/v1.rs @@ -0,0 +1,79 @@ +use neutron_std_derive::CosmwasmExt; +/// Defines the schedule for execution +#[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.cron.v1.Schedule")] +pub struct Schedule { + /// Name of schedule + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, + /// Period in blocks + #[prost(uint64, tag = "2")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub period: u64, + /// Msgs that will be executed every certain number of blocks, specified in the `period` field + #[prost(message, repeated, tag = "3")] + pub msgs: ::prost::alloc::vec::Vec, + /// Last execution's block height + #[prost(uint64, tag = "4")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub last_execute_height: u64, +} +/// Defines the contract and the message to pass +#[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.cron.v1.MsgExecuteContract")] +pub struct MsgExecuteContract { + /// The address of the smart contract + #[prost(string, tag = "1")] + pub contract: ::prost::alloc::string::String, + /// JSON encoded message to be passed to the contract + #[prost(string, tag = "2")] + pub msg: ::prost::alloc::string::String, +} +/// Defines the number of current schedules +#[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.cron.v1.ScheduleCount")] +pub struct ScheduleCount { + /// The number of current schedules + #[prost(int32, tag = "1")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub count: i32, +} diff --git a/packages/neutron-std/src/types/neutron/dex/mod.rs b/packages/neutron-std/src/types/neutron/dex/mod.rs index ad49043..007b04f 100644 --- a/packages/neutron-std/src/types/neutron/dex/mod.rs +++ b/packages/neutron-std/src/types/neutron/dex/mod.rs @@ -351,6 +351,8 @@ pub struct MsgDepositResponse { pub reserve1_deposited: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(message, repeated, tag = "3")] pub failed_deposits: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub shares_issued: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -400,7 +402,14 @@ pub struct MsgWithdrawal { CosmwasmExt, )] #[proto_message(type_url = "/neutron.dex.MsgWithdrawalResponse")] -pub struct MsgWithdrawalResponse {} +pub struct MsgWithdrawalResponse { + #[prost(string, tag = "1")] + pub reserve0_withdrawn: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub reserve1_withdrawn: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub shares_burned: ::prost::alloc::vec::Vec, +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -470,6 +479,9 @@ pub struct MsgPlaceLimitOrderResponse { /// maker portion which will have withdrawn in the future #[prost(message, optional, tag = "3")] pub taker_coin_out: ::core::option::Option, + /// Total amount of the token in that was immediately swapped for takerOutCoin + #[prost(message, optional, tag = "4")] + pub taker_coin_in: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -501,7 +513,14 @@ pub struct MsgWithdrawFilledLimitOrder { CosmwasmExt, )] #[proto_message(type_url = "/neutron.dex.MsgWithdrawFilledLimitOrderResponse")] -pub struct MsgWithdrawFilledLimitOrderResponse {} +pub struct MsgWithdrawFilledLimitOrderResponse { + /// Total amount of taker reserves that were withdrawn + #[prost(message, optional, tag = "1")] + pub taker_coin_out: ::core::option::Option, + /// Total amount of maker reserves that were withdrawn --only applies to inactive LimitOrders + #[prost(message, optional, tag = "2")] + pub maker_coin_out: ::core::option::Option, +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -532,7 +551,14 @@ pub struct MsgCancelLimitOrder { CosmwasmExt, )] #[proto_message(type_url = "/neutron.dex.MsgCancelLimitOrderResponse")] -pub struct MsgCancelLimitOrderResponse {} +pub struct MsgCancelLimitOrderResponse { + /// Total amount of taker reserves that were withdrawn + #[prost(message, optional, tag = "1")] + pub taker_coin_out: ::core::option::Option, + /// Total amount of maker reserves that were canceled + #[prost(message, optional, tag = "2")] + pub maker_coin_out: ::core::option::Option, +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive( Clone, @@ -592,6 +618,10 @@ pub struct MsgMultiHopSwap { pub struct MsgMultiHopSwapResponse { #[prost(message, optional, tag = "1")] pub coin_out: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub route: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub dust: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1363,6 +1393,7 @@ pub struct QueryGetPoolReservesResponse { response_type = QueryEstimateMultiHopSwapResponse )] pub struct QueryEstimateMultiHopSwapRequest { + /// DEPRECATED: Use QuerySimulateMultiHopSwap #[prost(string, tag = "1")] pub creator: ::prost::alloc::string::String, #[prost(string, tag = "2")] @@ -1411,6 +1442,7 @@ pub struct QueryEstimateMultiHopSwapResponse { response_type = QueryEstimatePlaceLimitOrderResponse )] pub struct QueryEstimatePlaceLimitOrderRequest { + /// DEPRECATED: Use QuerySimulatePlaceLimitOrder #[prost(string, tag = "1")] pub creator: ::prost::alloc::string::String, #[prost(string, tag = "2")] @@ -1615,6 +1647,222 @@ pub struct QueryAllPoolMetadataResponse { pub pagination: ::core::option::Option, } +#[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.dex.QuerySimulateDepositRequest")] +#[proto_query( + path = "/neutron.dex.Query/SimulateDeposit", + response_type = QuerySimulateDepositResponse +)] +pub struct QuerySimulateDepositRequest { + #[prost(message, optional, tag = "1")] + pub msg: ::core::option::Option, +} +#[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.dex.QuerySimulateDepositResponse")] +pub struct QuerySimulateDepositResponse { + #[prost(message, optional, tag = "1")] + pub resp: ::core::option::Option, +} +#[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.dex.QuerySimulateWithdrawalRequest")] +#[proto_query( + path = "/neutron.dex.Query/SimulateWithdrawal", + response_type = QuerySimulateWithdrawalResponse +)] +pub struct QuerySimulateWithdrawalRequest { + #[prost(message, optional, tag = "1")] + pub msg: ::core::option::Option, +} +#[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.dex.QuerySimulateWithdrawalResponse")] +pub struct QuerySimulateWithdrawalResponse { + #[prost(message, optional, tag = "1")] + pub resp: ::core::option::Option, +} +#[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.dex.QuerySimulatePlaceLimitOrderRequest")] +#[proto_query( + path = "/neutron.dex.Query/SimulatePlaceLimitOrder", + response_type = QuerySimulatePlaceLimitOrderResponse +)] +pub struct QuerySimulatePlaceLimitOrderRequest { + #[prost(message, optional, tag = "1")] + pub msg: ::core::option::Option, +} +#[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.dex.QuerySimulatePlaceLimitOrderResponse")] +pub struct QuerySimulatePlaceLimitOrderResponse { + #[prost(message, optional, tag = "1")] + pub resp: ::core::option::Option, +} +#[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.dex.QuerySimulateWithdrawFilledLimitOrderRequest")] +#[proto_query( + path = "/neutron.dex.Query/SimulateWithdrawFilledLimitOrder", + response_type = QuerySimulateWithdrawFilledLimitOrderResponse +)] +pub struct QuerySimulateWithdrawFilledLimitOrderRequest { + #[prost(message, optional, tag = "1")] + pub msg: ::core::option::Option, +} +#[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.dex.QuerySimulateWithdrawFilledLimitOrderResponse")] +pub struct QuerySimulateWithdrawFilledLimitOrderResponse { + #[prost(message, optional, tag = "1")] + pub resp: ::core::option::Option, +} +#[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.dex.QuerySimulateCancelLimitOrderRequest")] +#[proto_query( + path = "/neutron.dex.Query/SimulateCancelLimitOrder", + response_type = QuerySimulateCancelLimitOrderResponse +)] +pub struct QuerySimulateCancelLimitOrderRequest { + #[prost(message, optional, tag = "1")] + pub msg: ::core::option::Option, +} +#[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.dex.QuerySimulateCancelLimitOrderResponse")] +pub struct QuerySimulateCancelLimitOrderResponse { + #[prost(message, optional, tag = "1")] + pub resp: ::core::option::Option, +} +#[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.dex.QuerySimulateMultiHopSwapRequest")] +#[proto_query( + path = "/neutron.dex.Query/SimulateMultiHopSwap", + response_type = QuerySimulateMultiHopSwapResponse +)] +pub struct QuerySimulateMultiHopSwapRequest { + #[prost(message, optional, tag = "1")] + pub msg: ::core::option::Option, +} +#[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.dex.QuerySimulateMultiHopSwapResponse")] +pub struct QuerySimulateMultiHopSwapResponse { + #[prost(message, optional, tag = "1")] + pub resp: ::core::option::Option, +} pub struct DexQuerier<'a, Q: cosmwasm_std::CustomQuery> { querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, } @@ -1758,6 +2006,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> DexQuerier<'a, Q> { } .query(self.querier) } + #[deprecated] pub fn estimate_multi_hop_swap( &self, creator: ::prost::alloc::string::String, @@ -1777,6 +2026,7 @@ impl<'a, Q: cosmwasm_std::CustomQuery> DexQuerier<'a, Q> { } .query(self.querier) } + #[deprecated] #[allow(clippy::too_many_arguments)] pub fn estimate_place_limit_order( &self, @@ -1831,4 +2081,40 @@ impl<'a, Q: cosmwasm_std::CustomQuery> DexQuerier<'a, Q> { ) -> Result { QueryAllPoolMetadataRequest { pagination }.query(self.querier) } + pub fn simulate_deposit( + &self, + msg: ::core::option::Option, + ) -> Result { + QuerySimulateDepositRequest { msg }.query(self.querier) + } + pub fn simulate_withdrawal( + &self, + msg: ::core::option::Option, + ) -> Result { + QuerySimulateWithdrawalRequest { msg }.query(self.querier) + } + pub fn simulate_place_limit_order( + &self, + msg: ::core::option::Option, + ) -> Result { + QuerySimulatePlaceLimitOrderRequest { msg }.query(self.querier) + } + pub fn simulate_withdraw_filled_limit_order( + &self, + msg: ::core::option::Option, + ) -> Result { + QuerySimulateWithdrawFilledLimitOrderRequest { msg }.query(self.querier) + } + pub fn simulate_cancel_limit_order( + &self, + msg: ::core::option::Option, + ) -> Result { + QuerySimulateCancelLimitOrderRequest { msg }.query(self.querier) + } + pub fn simulate_multi_hop_swap( + &self, + msg: ::core::option::Option, + ) -> Result { + QuerySimulateMultiHopSwapRequest { msg }.query(self.querier) + } } diff --git a/packages/neutron-std/src/types/neutron/interchainqueries.rs b/packages/neutron-std/src/types/neutron/interchainqueries.rs index 75abbb1..bcd9487 100644 --- a/packages/neutron-std/src/types/neutron/interchainqueries.rs +++ b/packages/neutron-std/src/types/neutron/interchainqueries.rs @@ -33,6 +33,20 @@ pub struct Params { deserialize_with = "crate::serde::as_str::deserialize" )] pub tx_query_removal_limit: u64, + /// Maximum amount of keys in a registered key value query + #[prost(uint64, tag = "4")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub max_kv_query_keys_count: u64, + /// max_transactions_filters defines maximum allowed amount of tx filters in msgRegisterInterchainQuery + #[prost(uint64, tag = "5")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub max_transactions_filters: u64, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( diff --git a/packages/neutron-std/src/types/neutron/interchaintxs/v1.rs b/packages/neutron-std/src/types/neutron/interchaintxs/v1.rs index f34f90c..63d5b3b 100644 --- a/packages/neutron-std/src/types/neutron/interchaintxs/v1.rs +++ b/packages/neutron-std/src/types/neutron/interchaintxs/v1.rs @@ -151,6 +151,15 @@ pub struct MsgRegisterInterchainAccount { pub interchain_account_id: ::prost::alloc::string::String, #[prost(message, repeated, tag = "4")] pub register_fee: ::prost::alloc::vec::Vec, + #[prost( + enumeration = "super::super::super::ibc::core::channel::v1::Order", + tag = "5" + )] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub ordering: i32, } /// MsgRegisterInterchainAccountResponse is the response type for /// MsgRegisterInterchainAccount. diff --git a/packages/neutron-std/src/types/slinky/abci/mod.rs b/packages/neutron-std/src/types/slinky/abci/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/abci/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/alerts/mod.rs b/packages/neutron-std/src/types/slinky/alerts/mod.rs deleted file mode 100644 index a8429e3..0000000 --- a/packages/neutron-std/src/types/slinky/alerts/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/alerts/module/mod.rs b/packages/neutron-std/src/types/slinky/alerts/module/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/alerts/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/alerts/module/v1.rs b/packages/neutron-std/src/types/slinky/alerts/module/v1.rs deleted file mode 100644 index cf7303a..0000000 --- a/packages/neutron-std/src/types/slinky/alerts/module/v1.rs +++ /dev/null @@ -1,21 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. The authority will default - /// to the governance module account if not set. If the authority is set, the - /// address provided must be a valid bech-32 address - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-std/src/types/slinky/alerts/v1.rs b/packages/neutron-std/src/types/slinky/alerts/v1.rs deleted file mode 100644 index 4a53cda..0000000 --- a/packages/neutron-std/src/types/slinky/alerts/v1.rs +++ /dev/null @@ -1,576 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Alert defines the basic meta-data necessary for the alerts module to resolve -/// a claim that the price of a CurrencyPair on-chain is deviating from the price -/// off-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 = "/slinky.alerts.v1.Alert")] -pub struct Alert { - /// height represents the height for which the alert is filed. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - /// signer is the signer of this alert, this is the address that will receive - /// the reward in the case of a positive conclusion, or whose bond will get - /// slashed in the event of a negative conclusion. - #[prost(string, tag = "2")] - pub signer: ::prost::alloc::string::String, - /// currency_pair is the currency-pair that this claim asserts is deviating - /// from the price off-chain. - #[prost(message, optional, tag = "3")] - pub currency_pair: ::core::option::Option, -} -/// AlertStatus contains the module specific state for an alert: Has the alert -/// been concluded? What height was the alert submitted, what height should the -/// alert be purged? -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertStatus")] -pub struct AlertStatus { - /// ConclusionStatus determines whether the alert has been concluded. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub conclusion_status: u64, - /// SubmissionHeight is the height that the alert was submitted in. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub submission_height: u64, - /// SubmissionTimestamp is the block-timestamp of the block that the alert was - /// submitted in (as a UTC value in Unix time). - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub submission_timestamp: u64, - /// PurgeHeight is the height at which the alert should be purged. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub purge_height: u64, -} -/// AlertWithStatus represents a wrapper around the Alert and AlertStatus -/// objects, this is so that the module specific information about Alerts can be -/// packaged together. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertWithStatus")] -pub struct AlertWithStatus { - /// alert is the alert that this status corresponds to. - #[prost(message, optional, tag = "1")] - pub alert: ::core::option::Option, - /// status is the status of the alert. - #[prost(message, optional, tag = "2")] - pub status: ::core::option::Option, -} -/// Signature is a container for a signer address mapped to a signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.Signature")] -pub struct Signature { - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, -} -/// MultiSigConcluson defines a conclusion that is accompanied by a set of -/// signatures. The signature is defined over the alert UID, status, OracleData, -/// and PriceBound. The signatures are used to verify that the conclusion is -/// valid. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MultiSigConclusion")] -pub struct MultiSigConclusion { - /// alert is the alert that this conclusion corresponds to. - #[prost(message, optional, tag = "1")] - pub alert: ::core::option::Option, - /// oracle_data is the oracle data that this conclusion references. - #[prost(message, optional, tag = "2")] - pub extended_commit_info: - ::core::option::Option, - /// signatures is a map of signer -> signature. Where the signature is over - /// Alert.UID, PriceBound, the marshalled ExtendedCommitInfo, and status. - #[prost(message, repeated, tag = "3")] - pub signatures: ::prost::alloc::vec::Vec, - /// price-bound is the price bound of the currency-pair off-chain for the - /// designated time-range. - #[prost(message, optional, tag = "4")] - pub price_bound: ::core::option::Option, - /// status is the status of the conclusion. - #[prost(bool, tag = "5")] - pub status: bool, - /// CurrencyPairID is the ID of the currency-pair that this conclusion - /// corresponds to. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub currency_pair_i_d: u64, -} -/// MultiSigConclusionVerificationParams defines the parameters necessary to -/// verify a MultiSigConclusion. It contains a map between signer and public key. -/// Notice, the public-key (value) are the base-64 encoded bytes of the public -/// key. And the signer (key) is the bech32 encoded address of the signer. -/// Notice, all public keys must be secp256 keys. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MultiSigConclusionVerificationParams")] -pub struct MultiSigConclusionVerificationParams { - /// signers is a map of signer -> public key. - #[prost(message, repeated, tag = "1")] - pub signers: ::prost::alloc::vec::Vec, -} -/// PriceBound represents the bounds of the price of a currency-pair off chain -/// for a designated time-range -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.PriceBound")] -pub struct PriceBound { - #[prost(string, tag = "1")] - pub high: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub low: ::prost::alloc::string::String, -} -/// AlertParams is the set of parameters for the x/Alerts module's Alerting. It -/// defines whether or not Alerts can be submitted, and if so, the minimum -/// bond amount required to submit an Alert. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertParams")] -pub struct AlertParams { - /// Enabled is a boolean defining whether or not Alerts can be submitted - /// to the module - #[prost(bool, tag = "1")] - pub enabled: bool, - /// BondAmount is the minimum amount of bond required to submit an - /// Alert - #[prost(message, optional, tag = "2")] - pub bond_amount: ::core::option::Option, - /// MaxBlockAge defines the maximum age of an Alert before it is pruned, notice - /// this is defined wrt. the height that the Alert references, i.e Alerts are - /// only relevant until Alert.Height + MaxBlockAge is reached. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_block_age: u64, -} -/// PruningParams defines the criterion for pruning Alerts from the 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 = "/slinky.alerts.v1.PruningParams")] -pub struct PruningParams { - /// Enabled defines whether Alerts are to be pruned - #[prost(bool, tag = "1")] - pub enabled: bool, - /// BlocksToPrune defines the number of blocks until an Alert will be pruned - /// from state, notice this is defined wrt. the current block height, i.e - /// Alerts will be stored in state until current_height + BlocksToPrune is - /// reached. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub blocks_to_prune: u64, -} -/// Params is the set of parameters for the x/Alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.Params")] -pub struct Params { - /// AlertParams is the set of parameters for the x/Alerts module's Alerting. - #[prost(message, optional, tag = "1")] - pub alert_params: ::core::option::Option, - /// ConclusionVerificationParams is the set of parameters for the x/Alerts - /// module's conclusion verification. - #[prost(message, optional, tag = "2")] - pub conclusion_verification_params: ::core::option::Option, - /// PruningParams is the set of parameters for the x/Alerts module's pruning. - #[prost(message, optional, tag = "3")] - pub pruning_params: ::core::option::Option, -} -/// GenesisState is the state that must be provided at genesis. It contains -/// params for the module, and the set initial Alerts. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.GenesisState")] -pub struct GenesisState { - /// Params is the set of x/Alerts parameters - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// Alerts is the set of Alerts that have been submitted to the module - #[prost(message, repeated, tag = "2")] - pub alerts: ::prost::alloc::vec::Vec, -} -/// AlertsRequest is the request type for the Query.Alerts RPC method, the status -/// field indicates whether the request should return only Unconcluded / -/// Concluded Alerts, or all Alerts. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertsRequest")] -#[proto_query(path = "/slinky.alerts.v1.Query/Alerts", response_type = AlertsResponse)] -pub struct AlertsRequest { - #[prost(enumeration = "AlertStatusId", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, -} -/// AlertsResponse is the response type for the Query.Alerts RPC method, it -/// contains the list of Alerts that are being tracked by the alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertsResponse")] -pub struct AlertsResponse { - #[prost(message, repeated, tag = "1")] - pub alerts: ::prost::alloc::vec::Vec, -} -/// ParamsRequest is the request type for the Query.Params 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 = "/slinky.alerts.v1.ParamsRequest")] -#[proto_query(path = "/slinky.alerts.v1.Query/Params", response_type = ParamsResponse)] -pub struct ParamsRequest {} -/// ParamsResponse is the response type for the Query.Params RPC method, it -/// contains the Params of the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.ParamsResponse")] -pub struct ParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// AlertStatus is the type for the status of an Alert, it can be Unconcluded or -/// Concluded. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum AlertStatusId { - ConclusionStatusUnspecified = 0, - ConclusionStatusUnconcluded = 1, - ConclusionStatusConcluded = 2, -} -impl AlertStatusId { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AlertStatusId::ConclusionStatusUnspecified => "CONCLUSION_STATUS_UNSPECIFIED", - AlertStatusId::ConclusionStatusUnconcluded => "CONCLUSION_STATUS_UNCONCLUDED", - AlertStatusId::ConclusionStatusConcluded => "CONCLUSION_STATUS_CONCLUDED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "CONCLUSION_STATUS_UNSPECIFIED" => Some(Self::ConclusionStatusUnspecified), - "CONCLUSION_STATUS_UNCONCLUDED" => Some(Self::ConclusionStatusUnconcluded), - "CONCLUSION_STATUS_CONCLUDED" => Some(Self::ConclusionStatusConcluded), - _ => None, - } - } -} -/// ValidatorAlertIncentive defines the incentive strategy to be executed for a -/// validator that has been confirmed to have at fault for an x/alerts alert. -/// This strategy is expected to slash half of the validator's stake. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.ValidatorAlertIncentive")] -pub struct ValidatorAlertIncentive { - /// The validator that has been confirmed to have been at fault for an alert. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, - /// AlertSigner is the signer of the alert referenced by the conclusion that - /// created this incentive. - #[prost(string, tag = "2")] - pub alert_signer: ::prost::alloc::string::String, - /// AlertHeight is the height at which the infraction occurred - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub alert_height: u64, -} -/// MsgAlert defines a message to create an alert. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgAlert")] -pub struct MsgAlert { - /// alert is the alert to be filed - #[prost(message, optional, tag = "1")] - pub alert: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgAlertResponse")] -pub struct MsgAlertResponse {} -/// MsgConclusion defines a message carrying a Conclusion made by the SecondTier, -/// which will be used to close an alert. And trigger any ramifications of the -/// conclusion. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgConclusion")] -pub struct MsgConclusion { - /// signer is the signer of this transaction (notice, this may not always be a - /// node from the SecondTier) - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// conclusion is the conclusion to be filed - #[prost(message, optional, tag = "2")] - pub conclusion: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgConclusionResponse")] -pub struct MsgConclusionResponse {} -/// MsgUpdateParams defines the message type expected by the UpdateParams rpc. It -/// contains an authority address, and the new Params for the x/alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address of the authority that is submitting the update - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params is the new set of parameters for the x/alerts module - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct AlertsQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> AlertsQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn alerts(&self, status: i32) -> Result { - AlertsRequest { status }.query(self.querier) - } - pub fn params(&self) -> Result { - ParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-std/src/types/slinky/incentives/mod.rs b/packages/neutron-std/src/types/slinky/incentives/mod.rs deleted file mode 100644 index a8429e3..0000000 --- a/packages/neutron-std/src/types/slinky/incentives/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/incentives/module/mod.rs b/packages/neutron-std/src/types/slinky/incentives/module/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/incentives/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/incentives/module/v1.rs b/packages/neutron-std/src/types/slinky/incentives/module/v1.rs deleted file mode 100644 index 33edfda..0000000 --- a/packages/neutron-std/src/types/slinky/incentives/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the incentives module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-std/src/types/slinky/incentives/v1.rs b/packages/neutron-std/src/types/slinky/incentives/v1.rs deleted file mode 100644 index 3753eb9..0000000 --- a/packages/neutron-std/src/types/slinky/incentives/v1.rs +++ /dev/null @@ -1,192 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// BadPriceIncentive is a message that contains the information about a bad -/// price that was submitted by a validator. -/// -/// NOTE: This is an example of a bad price incentive. It is not used in -/// production. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.BadPriceIncentive")] -pub struct BadPriceIncentive { - /// Validator is the address of the validator that submitted the bad price. - #[prost(string, tag = "1")] - pub validator: ::prost::alloc::string::String, - /// Amount is the amount to slash. - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -/// GoodPriceIncentive is a message that contains the information about a good -/// price that was submitted by a validator. -/// -/// NOTE: This is an example of a good price incentive. It is not used in -/// production. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GoodPriceIncentive")] -pub struct GoodPriceIncentive { - /// Validator is the address of the validator that submitted the good price. - #[prost(string, tag = "1")] - pub validator: ::prost::alloc::string::String, - /// Amount is the amount to reward. - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -/// GenesisState is the genesis-state for the x/incentives module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GenesisState")] -pub struct GenesisState { - /// Registry is a list of incentives by type. The registry defined here - /// should be a subset of the incentive types defined in the incentive - /// module (keeper). - #[prost(message, repeated, tag = "1")] - pub registry: ::prost::alloc::vec::Vec, -} -/// IncentivesByType encapsulates a list of incentives by type. Each of the -/// entries here must correspond to the same incentive type defined here. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.IncentivesByType")] -pub struct IncentivesByType { - /// IncentiveType is the incentive type i.e. (BadPriceIncentiveType, - /// GoodPriceIncentiveType). - #[prost(string, tag = "1")] - pub incentive_type: ::prost::alloc::string::String, - /// Entries is a list of incentive bytes. - #[prost(bytes = "vec", repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// GetIncentivesByTypeRequest is the request type for the -/// Query/GetIncentivesByType 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 = "/slinky.incentives.v1.GetIncentivesByTypeRequest")] -#[proto_query( - path = "/slinky.incentives.v1.Query/GetIncentivesByType", - response_type = GetIncentivesByTypeResponse -)] -pub struct GetIncentivesByTypeRequest { - /// IncentiveType is the incentive type i.e. (BadPriceIncentiveType, - /// GoodPriceIncentiveType). - #[prost(string, tag = "1")] - pub incentive_type: ::prost::alloc::string::String, -} -/// GetIncentivesByTypeResponse is the response type for the -/// Query/GetIncentivesByType 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 = "/slinky.incentives.v1.GetIncentivesByTypeResponse")] -pub struct GetIncentivesByTypeResponse { - /// Entries is the list of incentives of the given type. - #[prost(bytes = "vec", repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// GetAllIncentivesRequest is the request type for the Query/GetAllIncentives -/// 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 = "/slinky.incentives.v1.GetAllIncentivesRequest")] -#[proto_query( - path = "/slinky.incentives.v1.Query/GetAllIncentives", - response_type = GetAllIncentivesResponse -)] -pub struct GetAllIncentivesRequest {} -/// GetAllIncentivesResponse is the response type for the Query/GetAllIncentives -/// 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 = "/slinky.incentives.v1.GetAllIncentivesResponse")] -pub struct GetAllIncentivesResponse { - /// Registry is the list of all incentives, grouped by type. - #[prost(message, repeated, tag = "1")] - pub registry: ::prost::alloc::vec::Vec, -} -pub struct IncentivesQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> IncentivesQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn get_incentives_by_type( - &self, - incentive_type: ::prost::alloc::string::String, - ) -> Result { - GetIncentivesByTypeRequest { incentive_type }.query(self.querier) - } - pub fn get_all_incentives(&self) -> Result { - GetAllIncentivesRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-std/src/types/slinky/marketmap/module/mod.rs b/packages/neutron-std/src/types/slinky/marketmap/module/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/marketmap/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/oracle/module/mod.rs b/packages/neutron-std/src/types/slinky/oracle/module/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/oracle/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/oracle/module/v1.rs b/packages/neutron-std/src/types/slinky/oracle/module/v1.rs deleted file mode 100644 index 9c8d5f6..0000000 --- a/packages/neutron-std/src/types/slinky/oracle/module/v1.rs +++ /dev/null @@ -1,20 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the builder module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. If not set, defaults to the - /// governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-std/src/types/slinky/service/mod.rs b/packages/neutron-std/src/types/slinky/service/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/service/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/sla/mod.rs b/packages/neutron-std/src/types/slinky/sla/mod.rs deleted file mode 100644 index a8429e3..0000000 --- a/packages/neutron-std/src/types/slinky/sla/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/sla/module/mod.rs b/packages/neutron-std/src/types/slinky/sla/module/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/sla/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-std/src/types/slinky/sla/v1.rs b/packages/neutron-std/src/types/slinky/sla/v1.rs deleted file mode 100644 index c6f261f..0000000 --- a/packages/neutron-std/src/types/slinky/sla/v1.rs +++ /dev/null @@ -1,396 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines the sla 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 = "/slinky.sla.v1.GenesisState")] -pub struct GenesisState { - /// SLAs are the SLAs that are currently active. - #[prost(message, repeated, tag = "1")] - pub slas: ::prost::alloc::vec::Vec, - /// PrceFeeds are the price feeds that are currently active. - #[prost(message, repeated, tag = "2")] - pub price_feeds: ::prost::alloc::vec::Vec, - /// Params are the parameters for the sla module. - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, -} -/// Params defines the parameters for the sla module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.Params")] -pub struct Params { - /// Enabled is a flag to enable or disable the sla module. - #[prost(bool, tag = "1")] - pub enabled: bool, -} -/// PriceFeedSLA defines the the desired SLA for a given set of price feeds. A -/// price feed is defined to be a set of price prices for the same (currency -/// pair, validator). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.PriceFeedSLA")] -pub struct PriceFeedSla { - /// MaximumViableWindow is the maximum time window that we are interested - /// for the SLA. This is used to determine the moving window of blocks that - /// we are interested in. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub maximum_viable_window: u64, - /// ExpectedUptime is the expected uptime for the given validator and price - /// feed. - #[prost(string, tag = "2")] - pub expected_uptime: ::prost::alloc::string::String, - /// SlashConstant is the constant by which we will multiply the deviation from - /// the expected uptime. - #[prost(string, tag = "3")] - pub slash_constant: ::prost::alloc::string::String, - /// MinimumBlockUpdates is the minimum number of blocks that the - /// validator had to have voted on in the maximum viable window - /// in order to be considered for the SLA. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub minimum_block_updates: u64, - /// Frequency is the frequency at which we will check the SLA. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub frequency: u64, - /// ID is the unique identifier for the SLA. - #[prost(string, tag = "6")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// PriceFeed defines the object type that will be utilized to monitor how -/// frequently validators are voting with price updates across the network. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.PriceFeed")] -pub struct PriceFeed { - /// UpdateMap represents the relevant moving window of price feed updates. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub update_map: ::prost::alloc::vec::Vec, - /// InclusionMap represents the relevant moving window of blocks that the - /// validator has voted on. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub inclusion_map: ::prost::alloc::vec::Vec, - /// Index corresponds to the current index into the bitmap. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u64, - /// Validator represents the validator that this SLA corresponds to. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator: ::prost::alloc::vec::Vec, - /// CurrencyPair represents the currency pair that this SLA corresponds to. - #[prost(message, optional, tag = "5")] - pub currency_pair: ::core::option::Option, - /// MaximumViableWindow represents the maximum number of blocks that can be - /// represented by the bit map. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub maximum_viable_window: u64, - /// ID corresponds to the SLA ID that this price feed corresponds to. - #[prost(string, tag = "7")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// QueryAllSLAsRequest is the request type for the Query/GetAllSLAs 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 = "/slinky.sla.v1.GetAllSLAsRequest")] -#[proto_query( - path = "/slinky.sla.v1.Query/GetAllSLAs", - response_type = GetAllSlAsResponse -)] -pub struct GetAllSlAsRequest {} -/// QueryAllSLAsResponse is the response type for the Query/GetAllSLAs 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 = "/slinky.sla.v1.GetAllSLAsResponse")] -pub struct GetAllSlAsResponse { - #[prost(message, repeated, tag = "1")] - pub slas: ::prost::alloc::vec::Vec, -} -/// QueryGetPriceFeedsRequest is the request type for the Query/GetPriceFeeds 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 = "/slinky.sla.v1.GetPriceFeedsRequest")] -#[proto_query( - path = "/slinky.sla.v1.Query/GetPriceFeeds", - response_type = GetPriceFeedsResponse -)] -pub struct GetPriceFeedsRequest { - /// ID defines the SLA to query price feeds for. - #[prost(string, tag = "1")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// QueryGetPriceFeedsResponse is the response type for the Query/GetPriceFeeds -/// 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 = "/slinky.sla.v1.GetPriceFeedsResponse")] -pub struct GetPriceFeedsResponse { - /// PriceFeeds defines the price feeds for the given SLA. - #[prost(message, repeated, tag = "1")] - pub price_feeds: ::prost::alloc::vec::Vec, -} -/// QueryParamsRequest is the request type for the Query/Params 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 = "/slinky.sla.v1.ParamsRequest")] -#[proto_query(path = "/slinky.sla.v1.Query/Params", response_type = ParamsResponse)] -pub struct ParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params 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 = "/slinky.sla.v1.ParamsResponse")] -pub struct ParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgAddSLAs defines the Msg/AddSLAs request type. It contains the -/// SLAs to be added to the store. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgAddSLAs")] -pub struct MsgAddSlAs { - /// SLAs defines the SLAs to be added to the store. - #[prost(message, repeated, tag = "1")] - pub slas: ::prost::alloc::vec::Vec, - /// Authority defines the authority that is adding the SLAs. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgAddSLAsResponse defines the Msg/AddSLAs response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgAddSLAsResponse")] -pub struct MsgAddSlAsResponse {} -/// MsgRemoveSLAs defines the Msg/RemoveSLAs request type. It contains the -/// IDs of the SLAs to be removed from the store. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgRemoveSLAs")] -pub struct MsgRemoveSlAs { - /// IDs defines the IDs of the SLAs to be removed from the store. - #[prost(string, repeated, tag = "1")] - pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Authority defines the authority that is removing the SLAs. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgRemoveSLAsResponse defines the Msg/RemoveSLAs response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgRemoveSLAsResponse")] -pub struct MsgRemoveSlAsResponse {} -/// MsgParams defines the Msg/Params request type. It contains the -/// new parameters for the SLA module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgParams")] -pub struct MsgParams { - /// Params defines the new parameters for the SLA module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// Authority defines the authority that is updating the SLA module parameters. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgParamsResponse defines the Msg/Params response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgParamsResponse")] -pub struct MsgParamsResponse {} -pub struct SlaQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> SlaQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn get_all_sl_as(&self) -> Result { - GetAllSlAsRequest {}.query(self.querier) - } - pub fn get_price_feeds( - &self, - id: ::prost::alloc::string::String, - ) -> Result { - GetPriceFeedsRequest { id }.query(self.querier) - } - pub fn params(&self) -> Result { - ParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-std/src/types/slinky/types/mod.rs b/packages/neutron-std/src/types/slinky/types/mod.rs deleted file mode 100644 index a3a6d96..0000000 --- a/packages/neutron-std/src/types/slinky/types/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index c5c8a8f..b57a4c4 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -20,26 +20,26 @@ const FEEMARKET_REPO: &str = "https://github.com/skip-mev/feemarket.git"; const SLINKY_REPO: &str = "https://github.com/skip-mev/slinky.git"; /// The Cosmos SDK commit or tag to be cloned and used to build the proto files -const COSMOS_SDK_REV: &str = "v0.50.8-neutron"; +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 = "v4.2.2"; +const NEUTRON_REV: &str = "chore/ics-v6"; /// The wasmd commit or tag to be cloned and used to build the proto files -const WASMD_REV: &str = "v0.51.0"; +const WASMD_REV: &str = "v0.53.0-neutron"; /// The cometbft commit or tag to be cloned and used to build the proto files const COMETBFT_REV: &str = "v0.38.11"; /// The ibc-go commit or tag to be cloned and used to build the proto files -const IBC_GO_REV: &str = "v8.2.1"; +const IBC_GO_REV: &str = "v8.5.1"; /// The ics23 commit or tag to be cloned and used to build the proto files -const ICS23_REV: &str = "go/v0.10.0"; +const ICS23_REV: &str = "go/v0.11.0"; const FEEMARKET_REV: &str = "v1.1.1"; -const SLINKY_REV: &str = "v1.0.3"; +const SLINKY_REV: &str = "v2.0.1"; // All paths must end with a / and either be absolute or include a ./ to reference the current // working directory.