From eab3555c3ede8f7e9fa721c7c9a66cac7307fe4b Mon Sep 17 00:00:00 2001 From: Wojtek <103407812+wojtek-coreum@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:14:01 +0200 Subject: [PATCH] Support new features introduced in Coreum v4 (#13) * update NFT protos and upgrade dependencies * Remove all extra serde for Contracts (not going to be used) * add extenstion address and admin for queries * make globally_frozen optional because it's not sent if false * make admin optional * upgrade prost version * add types for distribution module * update wasmd protos * Update version to 1.0.0 Co-Authored-By: keyne --- Cargo.toml | 16 +- src/assetft.rs | 5 + src/lib.rs | 1 - src/serde/mod.rs | 22 - src/shim.rs | 3 +- src/types/coreum/asset/ft/v1.rs | 190 +++- src/types/coreum/asset/nft/v1.rs | 194 ++-- src/types/coreum/nft/v1beta1.rs | 27 - src/types/cosmos/auth/v1beta1.rs | 38 - src/types/cosmos/bank/v1beta1.rs | 4 - src/types/cosmos/base/node/v1beta1.rs | 1 + src/types/cosmos/base/query/v1beta1.rs | 40 +- src/types/cosmos/distribution/mod.rs | 1 + src/types/cosmos/distribution/v1beta1.rs | 1146 ++++++++++++++++++++++ src/types/cosmos/gov/v1beta1.rs | 90 -- src/types/cosmos/group/v1.rs | 221 +---- src/types/cosmos/mod.rs | 1 + src/types/cosmos/nft/v1beta1.rs | 28 +- src/types/cosmos/staking/v1beta1.rs | 62 -- src/types/cosmwasm/wasm/v1.rs | 610 +++++++++--- 20 files changed, 1930 insertions(+), 770 deletions(-) delete mode 100644 src/serde/mod.rs create mode 100644 src/types/cosmos/distribution/mod.rs create mode 100644 src/types/cosmos/distribution/v1beta1.rs diff --git a/Cargo.toml b/Cargo.toml index 9ff9df1..e6e0e59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "coreum-wasm-sdk" -version = "0.2.4" +version = "1.0.0" edition = "2021" description = "SDK for WASM coreum messages and queries." homepage = "https://coreum.com/" license = "Apache-2.0" [dependencies] -cosmwasm-std = { version = "1.5.0", features = ["stargate"] } -serde = { version = "1.0.193", default-features = false, features = ["derive"] } -schemars = "0.8.16" -cosmwasm-schema = "1.5.0" +cosmwasm-std = { version = "1.5.5", features = ["stargate"] } +serde = { version = "1.0.203", default-features = false, features = ["derive"] } +schemars = "0.8.21" +cosmwasm-schema = "1.5.5" osmosis-std-derive = "0.20.1" -chrono = { version = "0.4.30", default-features = false } -prost = { version = "0.11.0", default-features = false, features = [ +chrono = { version = "0.4.38", default-features = false } +prost = { version = "0.12.6", default-features = false, features = [ "prost-derive", ] } -prost-types = { version = "0.12.0", default-features = false } +prost-types = { version = "0.12.6", default-features = false } serde-cw-value = "0.7.0" diff --git a/src/assetft.rs b/src/assetft.rs index 528396a..f24b772 100644 --- a/src/assetft.rs +++ b/src/assetft.rs @@ -11,6 +11,8 @@ pub const FREEZING: u32 = 2; pub const WHITELISTING: u32 = 3; pub const IBC: u32 = 4; pub const BLOCK_SMART_CONTRACTS: u32 = 5; +pub const CLAWBACK: u32 = 6; +pub const EXTENSION: u32 = 7; #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] #[serde(rename_all = "snake_case")] @@ -33,12 +35,15 @@ pub struct Token { pub subunit: String, pub precision: u32, pub description: Option, + pub globally_frozen: Option, pub features: Option>, pub burn_rate: String, pub send_commission_rate: String, pub version: u32, pub uri: Option, pub uri_hash: Option, + pub extension_cw_address: Option, + pub admin: Option, } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] diff --git a/src/lib.rs b/src/lib.rs index fd9e464..ea8288c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,4 +7,3 @@ pub mod pagination; pub mod shim; #[allow(deprecated)] pub mod types; -mod serde; diff --git a/src/serde/mod.rs b/src/serde/mod.rs deleted file mode 100644 index 3bde151..0000000 --- a/src/serde/mod.rs +++ /dev/null @@ -1,22 +0,0 @@ -pub mod as_str { - use serde::{de, Deserialize, Deserializer, Serializer}; - use std::{fmt::Display, str::FromStr}; - - pub fn deserialize<'de, T, D>(deserializer: D) -> Result - where - T: FromStr, - T::Err: Display, - D: Deserializer<'de>, - { - let s = String::deserialize(deserializer)?; - T::from_str(&s).map_err(de::Error::custom) - } - - pub fn serialize(value: &T, serializer: S) -> Result - where - S: Serializer, - T: Display, - { - serializer.serialize_str(&value.to_string()) - } -} diff --git a/src/shim.rs b/src/shim.rs index 0e59e89..42045ce 100644 --- a/src/shim.rs +++ b/src/shim.rs @@ -34,9 +34,8 @@ impl Serialize for Timestamp { nanos: self.nanos, }; ts.normalize(); - let dt = NaiveDateTime::from_timestamp_opt(ts.seconds, ts.nanos as u32) + let dt = DateTime::from_timestamp(ts.seconds, ts.nanos as u32) .expect("invalid or out-of-range datetime"); - let dt: DateTime = DateTime::from_naive_utc_and_offset(dt, Utc); serializer.serialize_str(format!("{:?}", dt).as_str()) } } diff --git a/src/types/coreum/asset/ft/v1.rs b/src/types/coreum/asset/ft/v1.rs index c737992..cff87b1 100644 --- a/src/types/coreum/asset/ft/v1.rs +++ b/src/types/coreum/asset/ft/v1.rs @@ -62,19 +62,19 @@ pub struct Definition { #[prost(string, tag = "4")] pub burn_rate: ::prost::alloc::string::String, /// send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine - /// amount sent to the token issuer account. + /// amount sent to the token admin account. #[prost(string, tag = "5")] pub send_commission_rate: ::prost::alloc::string::String, #[prost(uint32, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub version: u32, #[prost(string, tag = "7")] pub uri: ::prost::alloc::string::String, #[prost(string, tag = "8")] pub uri_hash: ::prost::alloc::string::String, + #[prost(string, tag = "9")] + pub extension_cw_address: ::prost::alloc::string::String, + #[prost(string, tag = "10")] + pub admin: ::prost::alloc::string::String, } /// Token is a full representation of the fungible token. #[allow(clippy::derive_partial_eq_without_eq)] @@ -99,10 +99,6 @@ pub struct Token { #[prost(string, tag = "4")] pub subunit: ::prost::alloc::string::String, #[prost(uint32, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub precision: u32, #[prost(string, tag = "6")] pub description: ::prost::alloc::string::String, @@ -115,19 +111,19 @@ pub struct Token { #[prost(string, tag = "9")] pub burn_rate: ::prost::alloc::string::String, /// send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine - /// amount sent to the token issuer account. + /// amount sent to the token admin account. #[prost(string, tag = "10")] pub send_commission_rate: ::prost::alloc::string::String, #[prost(uint32, tag = "11")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub version: u32, #[prost(string, tag = "12")] pub uri: ::prost::alloc::string::String, #[prost(string, tag = "13")] pub uri_hash: ::prost::alloc::string::String, + #[prost(string, tag = "14")] + pub extension_cw_address: ::prost::alloc::string::String, + #[prost(string, tag = "15")] + pub admin: ::prost::alloc::string::String, } /// DelayedTokenUpgradeV1 is executed by the delay module when it's time to enable IBC. #[allow(clippy::derive_partial_eq_without_eq)] @@ -195,6 +191,8 @@ pub enum Feature { Whitelisting = 3, Ibc = 4, BlockSmartContracts = 5, + Clawback = 6, + Extension = 7, } impl Feature { /// String value of the enum field names used in the ProtoBuf definition. @@ -209,6 +207,8 @@ impl Feature { Feature::Whitelisting => "whitelisting", Feature::Ibc => "ibc", Feature::BlockSmartContracts => "block_smart_contracts", + Feature::Clawback => "clawback", + Feature::Extension => "extension", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -220,6 +220,8 @@ impl Feature { "whitelisting" => Some(Self::Whitelisting), "ibc" => Some(Self::Ibc), "block_smart_contracts" => Some(Self::BlockSmartContracts), + "clawback" => Some(Self::Clawback), + "extension" => Some(Self::Extension), _ => None, } } @@ -247,10 +249,6 @@ pub struct EventIssued { #[prost(string, tag = "4")] pub subunit: ::prost::alloc::string::String, #[prost(uint32, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub precision: u32, #[prost(string, tag = "6")] pub initial_amount: ::prost::alloc::string::String, @@ -266,6 +264,8 @@ pub struct EventIssued { pub uri: ::prost::alloc::string::String, #[prost(string, tag = "12")] pub uri_hash: ::prost::alloc::string::String, + #[prost(string, tag = "13")] + pub admin: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -300,6 +300,26 @@ pub struct EventFrozenAmountChanged { ::schemars::JsonSchema, CosmwasmExt, )] +#[proto_message(type_url = "/coreum.asset.ft.v1.EventAmountClawedBack")] +pub struct EventAmountClawedBack { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub denom: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub amount: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] #[proto_message(type_url = "/coreum.asset.ft.v1.EventWhitelistedAmountChanged")] pub struct EventWhitelistedAmountChanged { #[prost(string, tag = "1")] @@ -311,6 +331,44 @@ pub struct EventWhitelistedAmountChanged { #[prost(string, tag = "4")] pub current_amount: ::prost::alloc::string::String, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.ft.v1.EventAdminTransferred")] +pub struct EventAdminTransferred { + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub previous_admin: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub current_admin: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.ft.v1.EventAdminCleared")] +pub struct EventAdminCleared { + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub previous_admin: ::prost::alloc::string::String, +} /// Params store gov manageable parameters. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -403,10 +461,6 @@ pub struct PendingTokenUpgrade { #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub version: u32, } /// QueryParamsRequest defines the request type for querying x/asset/ft parameters. @@ -811,10 +865,6 @@ pub struct MsgIssue { #[prost(string, tag = "3")] pub subunit: ::prost::alloc::string::String, #[prost(uint32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub precision: u32, #[prost(string, tag = "5")] pub initial_amount: ::prost::alloc::string::String, @@ -827,13 +877,41 @@ pub struct MsgIssue { #[prost(string, tag = "8")] pub burn_rate: ::prost::alloc::string::String, /// send_commission_rate is a number between 0 and 1 which will be multiplied by send amount to determine - /// amount sent to the token issuer account. + /// amount sent to the token admin account. #[prost(string, tag = "9")] pub send_commission_rate: ::prost::alloc::string::String, #[prost(string, tag = "10")] pub uri: ::prost::alloc::string::String, #[prost(string, tag = "11")] pub uri_hash: ::prost::alloc::string::String, + /// extension_settings must be provided in case wasm extensions are enabled. + #[prost(message, optional, tag = "12")] + pub extension_settings: ::core::option::Option, +} +/// ExtensionIssueSettings are settings that will be used to Instantantiate the smart contract which contains +/// the source code for the extension. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.ft.v1.ExtensionIssueSettings")] +pub struct ExtensionIssueSettings { + /// code_id is the reference to the stored WASM code + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "2")] + pub label: ::prost::alloc::string::String, + /// funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "3")] + pub funds: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -980,6 +1058,26 @@ pub struct MsgGloballyUnfreeze { ::schemars::JsonSchema, CosmwasmExt, )] +#[proto_message(type_url = "/coreum.asset.ft.v1.MsgClawback")] +pub struct MsgClawback { + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub account: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub coin: ::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 = "/coreum.asset.ft.v1.MsgSetWhitelistedLimit")] pub struct MsgSetWhitelistedLimit { #[prost(string, tag = "1")] @@ -989,6 +1087,44 @@ pub struct MsgSetWhitelistedLimit { #[prost(message, optional, tag = "3")] pub coin: ::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 = "/coreum.asset.ft.v1.MsgTransferAdmin")] +pub struct MsgTransferAdmin { + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub account: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub denom: ::prost::alloc::string::String, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.ft.v1.MsgClearAdmin")] +pub struct MsgClearAdmin { + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub denom: ::prost::alloc::string::String, +} /// MsgUpgradeTokenV1 is the message upgrading token to V1. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( diff --git a/src/types/coreum/asset/nft/v1.rs b/src/types/coreum/asset/nft/v1.rs index 821b2e9..116a23a 100644 --- a/src/types/coreum/asset/nft/v1.rs +++ b/src/types/coreum/asset/nft/v1.rs @@ -31,11 +31,9 @@ pub struct SendAuthorization { pub struct NftIdentifier { /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id defines the unique identification of nft #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } /// ClassDefinition defines the non-fungible token class settings to store. @@ -53,7 +51,6 @@ pub struct NftIdentifier { #[proto_message(type_url = "/coreum.asset.nft.v1.ClassDefinition")] pub struct ClassDefinition { #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub issuer: ::prost::alloc::string::String, @@ -80,7 +77,6 @@ pub struct ClassDefinition { #[proto_message(type_url = "/coreum.asset.nft.v1.Class")] pub struct Class { #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub issuer: ::prost::alloc::string::String, @@ -156,7 +152,6 @@ impl ClassFeature { #[proto_message(type_url = "/coreum.asset.nft.v1.EventClassIssued")] pub struct EventClassIssued { #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub issuer: ::prost::alloc::string::String, @@ -189,10 +184,8 @@ pub struct EventClassIssued { #[proto_message(type_url = "/coreum.asset.nft.v1.EventFrozen")] pub struct EventFrozen { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub owner: ::prost::alloc::string::String, @@ -211,10 +204,8 @@ pub struct EventFrozen { #[proto_message(type_url = "/coreum.asset.nft.v1.EventUnfrozen")] pub struct EventUnfrozen { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub owner: ::prost::alloc::string::String, @@ -233,7 +224,6 @@ pub struct EventUnfrozen { #[proto_message(type_url = "/coreum.asset.nft.v1.EventClassFrozen")] pub struct EventClassFrozen { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -252,7 +242,6 @@ pub struct EventClassFrozen { #[proto_message(type_url = "/coreum.asset.nft.v1.EventClassUnfrozen")] pub struct EventClassUnfrozen { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -271,10 +260,8 @@ pub struct EventClassUnfrozen { #[proto_message(type_url = "/coreum.asset.nft.v1.EventAddedToWhitelist")] pub struct EventAddedToWhitelist { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -293,10 +280,8 @@ pub struct EventAddedToWhitelist { #[proto_message(type_url = "/coreum.asset.nft.v1.EventRemovedFromWhitelist")] pub struct EventRemovedFromWhitelist { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -315,7 +300,6 @@ pub struct EventRemovedFromWhitelist { #[proto_message(type_url = "/coreum.asset.nft.v1.EventAddedToClassWhitelist")] pub struct EventAddedToClassWhitelist { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub account: ::prost::alloc::string::String, @@ -334,7 +318,6 @@ pub struct EventAddedToClassWhitelist { #[proto_message(type_url = "/coreum.asset.nft.v1.EventRemovedFromClassWhitelist")] pub struct EventRemovedFromClassWhitelist { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub account: ::prost::alloc::string::String, @@ -402,7 +385,6 @@ pub struct GenesisState { #[proto_message(type_url = "/coreum.asset.nft.v1.FrozenNFT")] pub struct FrozenNft { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, repeated, tag = "2")] pub nft_i_ds: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -421,10 +403,8 @@ pub struct FrozenNft { #[proto_message(type_url = "/coreum.asset.nft.v1.WhitelistedNFTAccounts")] pub struct WhitelistedNftAccounts { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "nftID")] pub nft_id: ::prost::alloc::string::String, #[prost(string, repeated, tag = "4")] pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -443,7 +423,6 @@ pub struct WhitelistedNftAccounts { #[proto_message(type_url = "/coreum.asset.nft.v1.ClassWhitelistedAccounts")] pub struct ClassWhitelistedAccounts { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, repeated, tag = "2")] pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -462,7 +441,6 @@ pub struct ClassWhitelistedAccounts { #[proto_message(type_url = "/coreum.asset.nft.v1.ClassFrozenAccounts")] pub struct ClassFrozenAccounts { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, repeated, tag = "2")] pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -481,7 +459,6 @@ pub struct ClassFrozenAccounts { #[proto_message(type_url = "/coreum.asset.nft.v1.BurntNFT")] pub struct BurntNft { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, repeated, tag = "2")] pub nft_i_ds: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -541,7 +518,6 @@ pub struct QueryParamsResponse { pub struct QueryClassRequest { /// we don't use the gogoproto.customname here since the google.api.http ignores it and generates invalid code. #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } /// QueryClassResponse is response type for the Query/Class RPC method. @@ -627,10 +603,8 @@ pub struct QueryClassesResponse { )] pub struct QueryFrozenRequest { #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -667,7 +641,6 @@ pub struct QueryFrozenResponse { )] pub struct QueryClassFrozenRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub account: ::prost::alloc::string::String, @@ -706,10 +679,8 @@ pub struct QueryClassFrozenResponse { )] pub struct QueryWhitelistedRequest { #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -753,10 +724,8 @@ pub struct QueryWhitelistedAccountsForNftRequest { super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -803,7 +772,6 @@ pub struct QueryClassWhitelistedAccountsRequest { super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -850,7 +818,6 @@ pub struct QueryClassFrozenAccountsRequest { super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -892,10 +859,8 @@ pub struct QueryClassFrozenAccountsResponse { )] pub struct QueryBurntNftRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "nftID")] pub nft_id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -936,7 +901,6 @@ pub struct QueryBurntNfTsInClassRequest { super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -957,9 +921,109 @@ pub struct QueryBurntNfTsInClassResponse { super::super::super::super::cosmos::base::query::v1beta1::PageResponse, >, #[prost(string, repeated, tag = "2")] - #[serde(alias = "nftIDs")] pub nft_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +/// DataBytes represents the immutable data. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.nft.v1.DataBytes")] +pub struct DataBytes { + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// DataDynamicItem contains the updatable data and modification types. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.nft.v1.DataDynamicItem")] +pub struct DataDynamicItem { + /// contains the set of the data editors, if empty no one can update. + #[prost(enumeration = "DataEditor", repeated, tag = "1")] + pub editors: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// DataDynamicIndexed contains the data and it's index in the DataDynamic. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.nft.v1.DataDynamicIndexedItem")] +pub struct DataDynamicIndexedItem { + #[prost(uint32, tag = "1")] + pub index: u32, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// DataDynamic is dynamic data which contains the list of the items allowed to be modified base on their modification types. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.nft.v1.DataDynamic")] +pub struct DataDynamic { + #[prost(message, repeated, tag = "1")] + pub items: ::prost::alloc::vec::Vec, +} +/// DataEditor defines possible data editors. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] +pub enum DataEditor { + Admin = 0, + Owner = 1, +} +impl DataEditor { + /// 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 { + DataEditor::Admin => "admin", + DataEditor::Owner => "owner", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "admin" => Some(Self::Admin), + "owner" => Some(Self::Owner), + _ => None, + } + } +} /// MsgIssueClass defines message for the IssueClass method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1010,20 +1074,42 @@ pub struct MsgMint { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub uri: ::prost::alloc::string::String, #[prost(string, tag = "5")] pub uri_hash: ::prost::alloc::string::String, + /// Data can be DataBytes or DataDynamic. #[prost(message, optional, tag = "6")] pub data: ::core::option::Option, #[prost(string, tag = "7")] pub recipient: ::prost::alloc::string::String, } +/// MsgUpdateData defines message to update the dynamic data. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/coreum.asset.nft.v1.MsgUpdateData")] +pub struct MsgUpdateData { + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub class_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "4")] + pub items: ::prost::alloc::vec::Vec, +} /// MsgBurn defines message for the Burn method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1041,10 +1127,8 @@ pub struct MsgBurn { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -1063,10 +1147,8 @@ pub struct MsgFreeze { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -1085,10 +1167,8 @@ pub struct MsgUnfreeze { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] @@ -1107,7 +1187,6 @@ pub struct MsgClassFreeze { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -1128,7 +1207,6 @@ pub struct MsgClassUnfreeze { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -1149,10 +1227,8 @@ pub struct MsgAddToWhitelist { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub account: ::prost::alloc::string::String, @@ -1173,10 +1249,8 @@ pub struct MsgRemoveFromWhitelist { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub account: ::prost::alloc::string::String, @@ -1197,7 +1271,6 @@ pub struct MsgAddToClassWhitelist { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -1218,7 +1291,6 @@ pub struct MsgRemoveFromClassWhitelist { #[prost(string, tag = "1")] pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub account: ::prost::alloc::string::String, @@ -1254,19 +1326,3 @@ pub struct MsgUpdateParams { )] #[proto_message(type_url = "/coreum.asset.nft.v1.EmptyResponse")] pub struct EmptyResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/coreum.asset.nft.v1.DataBytes")] -pub struct DataBytes { - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} diff --git a/src/types/coreum/nft/v1beta1.rs b/src/types/coreum/nft/v1beta1.rs index 8a6defa..92cbd21 100644 --- a/src/types/coreum/nft/v1beta1.rs +++ b/src/types/coreum/nft/v1beta1.rs @@ -14,10 +14,8 @@ use osmosis_std_derive::CosmwasmExt; #[proto_message(type_url = "/coreum.nft.v1beta1.EventSend")] pub struct EventSend { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub sender: ::prost::alloc::string::String, @@ -39,10 +37,8 @@ pub struct EventSend { #[proto_message(type_url = "/coreum.nft.v1beta1.EventMint")] pub struct EventMint { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub owner: ::prost::alloc::string::String, @@ -62,10 +58,8 @@ pub struct EventMint { #[proto_message(type_url = "/coreum.nft.v1beta1.EventBurn")] pub struct EventBurn { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub owner: ::prost::alloc::string::String, @@ -86,7 +80,6 @@ pub struct EventBurn { pub struct Class { /// id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// name defines the human-readable name of the NFT classification. Optional #[prost(string, tag = "2")] @@ -123,11 +116,9 @@ pub struct Class { pub struct Nft { /// class_id associated with the NFT, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the NFT #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// uri for the NFT metadata stored off chain #[prost(string, tag = "3")] @@ -199,7 +190,6 @@ pub struct Entry { )] pub struct QueryBalanceRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub owner: ::prost::alloc::string::String, @@ -219,10 +209,6 @@ pub struct QueryBalanceRequest { #[proto_message(type_url = "/coreum.nft.v1beta1.QueryBalanceResponse")] pub struct QueryBalanceResponse { #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub amount: u64, } /// QueryOwnerRequest is the request type for the Query/Owner RPC method @@ -244,10 +230,8 @@ pub struct QueryBalanceResponse { )] pub struct QueryOwnerRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } /// QueryOwnerResponse is the response type for the Query/Owner RPC method @@ -286,7 +270,6 @@ pub struct QueryOwnerResponse { )] pub struct QuerySupplyRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } /// QuerySupplyResponse is the response type for the Query/Supply RPC method @@ -304,10 +287,6 @@ pub struct QuerySupplyRequest { #[proto_message(type_url = "/coreum.nft.v1beta1.QuerySupplyResponse")] pub struct QuerySupplyResponse { #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub amount: u64, } /// QueryNFTstRequest is the request type for the Query/NFTs RPC method @@ -329,7 +308,6 @@ pub struct QuerySupplyResponse { )] pub struct QueryNfTsRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub owner: ::prost::alloc::string::String, @@ -373,10 +351,8 @@ pub struct QueryNfTsResponse { #[proto_query(path = "/coreum.nft.v1beta1.Query/NFT", response_type = QueryNftResponse)] pub struct QueryNftRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } /// QueryNFTResponse is the response type for the Query/NFT RPC method @@ -415,7 +391,6 @@ pub struct QueryNftResponse { )] pub struct QueryClassRequest { #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } /// QueryClassResponse is the response type for the Query/Class RPC method @@ -496,11 +471,9 @@ pub struct QueryClassesResponse { pub struct MsgSend { /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id defines the unique identification of nft #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// sender is the address of the owner of nft #[prost(string, tag = "3")] diff --git a/src/types/cosmos/auth/v1beta1.rs b/src/types/cosmos/auth/v1beta1.rs index c51be54..226845d 100644 --- a/src/types/cosmos/auth/v1beta1.rs +++ b/src/types/cosmos/auth/v1beta1.rs @@ -20,16 +20,8 @@ pub struct BaseAccount { #[prost(message, optional, tag = "2")] pub pub_key: ::core::option::Option, #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub account_number: u64, #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub sequence: u64, } /// ModuleAccount defines an account for modules that holds coins on a pool. @@ -92,34 +84,14 @@ pub struct ModuleCredential { #[proto_message(type_url = "/cosmos.auth.v1beta1.Params")] pub struct Params { #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub max_memo_characters: u64, #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub tx_sig_limit: u64, #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub tx_size_cost_per_byte: u64, #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub sig_verify_cost_ed25519: u64, #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub sig_verify_cost_secp256k1: u64, } /// GenesisState defines the auth module's genesis state. @@ -493,21 +465,11 @@ pub struct QueryAccountAddressByIdRequest { /// updated to uint64 in a future version of the auth query. #[deprecated] #[prost(int64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub id: i64, /// account_id is the account number of the address to be queried. /// /// Since: cosmos-sdk 0.47 #[prost(uint64, tag = "2")] - #[serde(alias = "accountID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub account_id: u64, } /// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method diff --git a/src/types/cosmos/bank/v1beta1.rs b/src/types/cosmos/bank/v1beta1.rs index 1ce96f9..aed2804 100644 --- a/src/types/cosmos/bank/v1beta1.rs +++ b/src/types/cosmos/bank/v1beta1.rs @@ -152,10 +152,6 @@ pub struct DenomUnit { /// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with /// exponent = 6, thus: 1 atom = 10^6 uatom). #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub exponent: u32, /// aliases is a list of string aliases for the given denom #[prost(string, repeated, tag = "3")] diff --git a/src/types/cosmos/base/node/v1beta1.rs b/src/types/cosmos/base/node/v1beta1.rs index 9cab6c6..041a7a5 100644 --- a/src/types/cosmos/base/node/v1beta1.rs +++ b/src/types/cosmos/base/node/v1beta1.rs @@ -30,3 +30,4 @@ pub struct ConfigResponse { #[prost(string, tag = "1")] pub minimum_gas_price: ::prost::alloc::string::String, } + diff --git a/src/types/cosmos/base/query/v1beta1.rs b/src/types/cosmos/base/query/v1beta1.rs index cbe0bfc..331f20a 100644 --- a/src/types/cosmos/base/query/v1beta1.rs +++ b/src/types/cosmos/base/query/v1beta1.rs @@ -7,16 +7,8 @@ use osmosis_std_derive::CosmwasmExt; /// PageRequest pagination = 2; /// } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] +#[derive(Clone, PartialEq, Eq, ::prost::Message)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] #[proto_message(type_url = "/cosmos.base.query.v1beta1.PageRequest")] pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin @@ -28,18 +20,10 @@ pub struct PageRequest { /// It is less efficient than using key. Only one of offset or key should /// be set. #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub offset: u64, /// limit is the total number of results to be returned in the result page. /// If left empty it will default to a value to be set by each app. #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub limit: u64, /// count_total is set to true to indicate that the result set should include /// a count of the total number of items available for pagination in UIs. @@ -61,29 +45,17 @@ pub struct PageRequest { /// PageResponse page = 2; /// } #[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] +#[derive(Clone, PartialEq, Eq, ::prost::Message)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] #[proto_message(type_url = "/cosmos.base.query.v1beta1.PageResponse")] pub struct PageResponse { /// next_key is the key to be passed to PageRequest.key to /// query the next page most efficiently. It will be empty if /// there are no more results. - #[prost(bytes = "vec", tag = "1")] - pub next_key: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", optional, tag = "1")] + pub next_key: ::core::option::Option<::prost::alloc::vec::Vec>, /// total is total number of results available if PageRequest.count_total /// was set, its value is undefined otherwise #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub total: u64, } diff --git a/src/types/cosmos/distribution/mod.rs b/src/types/cosmos/distribution/mod.rs new file mode 100644 index 0000000..9f64fc8 --- /dev/null +++ b/src/types/cosmos/distribution/mod.rs @@ -0,0 +1 @@ +pub mod v1beta1; diff --git a/src/types/cosmos/distribution/v1beta1.rs b/src/types/cosmos/distribution/v1beta1.rs new file mode 100644 index 0000000..9c27427 --- /dev/null +++ b/src/types/cosmos/distribution/v1beta1.rs @@ -0,0 +1,1146 @@ +use osmosis_std_derive::CosmwasmExt; +/// Params defines the set of params for the distribution 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 = "/cosmos.distribution.v1beta1.Params")] +pub struct Params { + #[prost(string, tag = "1")] + pub community_tax: ::prost::alloc::string::String, + /// Deprecated: The base_proposer_reward field is deprecated and is no longer used + /// in the x/distribution module's reward mechanism. + #[deprecated] + #[prost(string, tag = "2")] + pub base_proposer_reward: ::prost::alloc::string::String, + /// Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + /// in the x/distribution module's reward mechanism. + #[deprecated] + #[prost(string, tag = "3")] + pub bonus_proposer_reward: ::prost::alloc::string::String, + #[prost(bool, tag = "4")] + pub withdraw_addr_enabled: bool, +} +/// ValidatorHistoricalRewards represents historical rewards for a validator. +/// Height is implicit within the store key. +/// Cumulative reward ratio is the sum from the zeroeth period +/// until this period of rewards / tokens, per the spec. +/// The reference count indicates the number of objects +/// which might need to reference this historical entry at any point. +/// ReferenceCount = +/// number of outstanding delegations which ended the associated period (and +/// might need to read that record) +/// + number of slashes which ended the associated period (and might need to +/// read that record) +/// + one per validator for the zeroeth period, set on initialization +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards")] +pub struct ValidatorHistoricalRewards { + #[prost(message, repeated, tag = "1")] + pub cumulative_reward_ratio: ::prost::alloc::vec::Vec, + #[prost(uint32, tag = "2")] + pub reference_count: u32, +} +/// ValidatorCurrentRewards represents current rewards and current +/// period for a validator kept as a running counter and incremented +/// each block as long as the validator's tokens remain constant. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorCurrentRewards")] +pub struct ValidatorCurrentRewards { + #[prost(message, repeated, tag = "1")] + pub rewards: ::prost::alloc::vec::Vec, + #[prost(uint64, tag = "2")] + pub period: u64, +} +/// ValidatorAccumulatedCommission represents accumulated commission +/// for a validator kept as a running counter, can be withdrawn at any time. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")] +pub struct ValidatorAccumulatedCommission { + #[prost(message, repeated, tag = "1")] + pub commission: ::prost::alloc::vec::Vec, +} +/// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +/// for a validator inexpensive to track, allows simple sanity checks. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards")] +pub struct ValidatorOutstandingRewards { + #[prost(message, repeated, tag = "1")] + pub rewards: ::prost::alloc::vec::Vec, +} +/// ValidatorSlashEvent represents a validator slash event. +/// Height is implicit within the store key. +/// This is needed to calculate appropriate amount of staking tokens +/// for delegations which are withdrawn after a slash has occurred. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEvent")] +pub struct ValidatorSlashEvent { + #[prost(uint64, tag = "1")] + pub validator_period: u64, + #[prost(string, tag = "2")] + pub fraction: ::prost::alloc::string::String, +} +/// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEvents")] +pub struct ValidatorSlashEvents { + #[prost(message, repeated, tag = "1")] + pub validator_slash_events: ::prost::alloc::vec::Vec, +} +/// FeePool is the global fee pool for distribution. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.FeePool")] +pub struct FeePool { + #[prost(message, repeated, tag = "1")] + pub community_pool: ::prost::alloc::vec::Vec, +} +/// CommunityPoolSpendProposal details a proposal for use of community funds, +/// together with how many coins are proposed to be spent, and to which +/// recipient account. +/// +/// Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no +/// longer a need for an explicit CommunityPoolSpendProposal. To spend community +/// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov +/// module via a v1 governance proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal")] +#[deprecated] +pub struct CommunityPoolSpendProposal { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub recipient: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "4")] + pub amount: ::prost::alloc::vec::Vec, +} +/// DelegatorStartingInfo represents the starting info for a delegator reward +/// period. It tracks the previous validator period, the delegation's amount of +/// staking token, and the creation height (to check later on if any slashes have +/// occurred). NOTE: Even though validators are slashed to whole staking tokens, +/// the delegators within the validator may be left with less than a full token, +/// thus sdk.Dec is used. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorStartingInfo")] +pub struct DelegatorStartingInfo { + #[prost(uint64, tag = "1")] + pub previous_period: u64, + #[prost(string, tag = "2")] + pub stake: ::prost::alloc::string::String, + #[prost(uint64, tag = "3")] + pub height: u64, +} +/// DelegationDelegatorReward represents the properties +/// of a delegator's delegation reward. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegationDelegatorReward")] +pub struct DelegationDelegatorReward { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub reward: ::prost::alloc::vec::Vec, +} +/// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +/// with a deposit +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")] +pub struct CommunityPoolSpendProposalWithDeposit { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub recipient: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub amount: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub deposit: ::prost::alloc::string::String, +} +/// DelegatorWithdrawInfo is the address for where distributions rewards are +/// withdrawn to by default this struct is only used at genesis to feed in +/// default withdraw addresses. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorWithdrawInfo")] +pub struct DelegatorWithdrawInfo { + /// delegator_address is the address of the delegator. + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + /// withdraw_address is the address to withdraw the delegation rewards to. + #[prost(string, tag = "2")] + pub withdraw_address: ::prost::alloc::string::String, +} +/// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")] +pub struct ValidatorOutstandingRewardsRecord { + /// validator_address is the address of the validator. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + /// outstanding_rewards represents the outstanding rewards of a validator. + #[prost(message, repeated, tag = "2")] + pub outstanding_rewards: ::prost::alloc::vec::Vec, +} +/// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +/// json. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")] +pub struct ValidatorAccumulatedCommissionRecord { + /// validator_address is the address of the validator. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + /// accumulated is the accumulated commission of a validator. + #[prost(message, optional, tag = "2")] + pub accumulated: ::core::option::Option, +} +/// ValidatorHistoricalRewardsRecord is used for import / export via genesis +/// json. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")] +pub struct ValidatorHistoricalRewardsRecord { + /// validator_address is the address of the validator. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + /// period defines the period the historical rewards apply to. + #[prost(uint64, tag = "2")] + pub period: u64, + /// rewards defines the historical rewards of a validator. + #[prost(message, optional, tag = "3")] + pub rewards: ::core::option::Option, +} +/// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")] +pub struct ValidatorCurrentRewardsRecord { + /// validator_address is the address of the validator. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + /// rewards defines the current rewards of a validator. + #[prost(message, optional, tag = "2")] + pub rewards: ::core::option::Option, +} +/// DelegatorStartingInfoRecord used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")] +pub struct DelegatorStartingInfoRecord { + /// delegator_address is the address of the delegator. + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + /// validator_address is the address of the validator. + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + /// starting_info defines the starting info of a delegator. + #[prost(message, optional, tag = "3")] + pub starting_info: ::core::option::Option, +} +/// ValidatorSlashEventRecord is used for import / export via genesis json. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEventRecord")] +pub struct ValidatorSlashEventRecord { + /// validator_address is the address of the validator. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + /// height defines the block height at which the slash event occurred. + #[prost(uint64, tag = "2")] + pub height: u64, + /// period is the period of the slash event. + #[prost(uint64, tag = "3")] + pub period: u64, + /// validator_slash_event describes the slash event. + #[prost(message, optional, tag = "4")] + pub validator_slash_event: ::core::option::Option, +} +/// GenesisState defines the distribution 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 = "/cosmos.distribution.v1beta1.GenesisState")] +pub struct GenesisState { + /// params defines all the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + /// fee_pool defines the fee pool at genesis. + #[prost(message, optional, tag = "2")] + pub fee_pool: ::core::option::Option, + /// fee_pool defines the delegator withdraw infos at genesis. + #[prost(message, repeated, tag = "3")] + pub delegator_withdraw_infos: ::prost::alloc::vec::Vec, + /// fee_pool defines the previous proposer at genesis. + #[prost(string, tag = "4")] + pub previous_proposer: ::prost::alloc::string::String, + /// fee_pool defines the outstanding rewards of all validators at genesis. + #[prost(message, repeated, tag = "5")] + pub outstanding_rewards: ::prost::alloc::vec::Vec, + /// fee_pool defines the accumulated commissions of all validators at genesis. + #[prost(message, repeated, tag = "6")] + pub validator_accumulated_commissions: + ::prost::alloc::vec::Vec, + /// fee_pool defines the historical rewards of all validators at genesis. + #[prost(message, repeated, tag = "7")] + pub validator_historical_rewards: ::prost::alloc::vec::Vec, + /// fee_pool defines the current rewards of all validators at genesis. + #[prost(message, repeated, tag = "8")] + pub validator_current_rewards: ::prost::alloc::vec::Vec, + /// fee_pool defines the delegator starting infos at genesis. + #[prost(message, repeated, tag = "9")] + pub delegator_starting_infos: ::prost::alloc::vec::Vec, + /// fee_pool defines the validator slash events at genesis. + #[prost(message, repeated, tag = "10")] + pub validator_slash_events: ::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 = "/cosmos.distribution.v1beta1.QueryParamsRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/Params", + response_type = QueryParamsResponse +)] +pub struct QueryParamsRequest {} +/// 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 = "/cosmos.distribution.v1beta1.QueryParamsResponse")] +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +/// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo 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 = "/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + response_type = QueryValidatorDistributionInfoResponse +)] +pub struct QueryValidatorDistributionInfoRequest { + /// validator_address defines the validator address to query for. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +/// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo 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 = "/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse")] +pub struct QueryValidatorDistributionInfoResponse { + /// operator_address defines the validator operator address. + #[prost(string, tag = "1")] + pub operator_address: ::prost::alloc::string::String, + /// self_bond_rewards defines the self delegations rewards. + #[prost(message, repeated, tag = "2")] + pub self_bond_rewards: ::prost::alloc::vec::Vec, + /// commission defines the commission the validator received. + #[prost(message, repeated, tag = "3")] + pub commission: ::prost::alloc::vec::Vec, +} +/// QueryValidatorOutstandingRewardsRequest is the request type for the +/// Query/ValidatorOutstandingRewards 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 = "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + response_type = QueryValidatorOutstandingRewardsResponse +)] +pub struct QueryValidatorOutstandingRewardsRequest { + /// validator_address defines the validator address to query for. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +/// QueryValidatorOutstandingRewardsResponse is the response type for the +/// Query/ValidatorOutstandingRewards 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 = "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")] +pub struct QueryValidatorOutstandingRewardsResponse { + #[prost(message, optional, tag = "1")] + pub rewards: ::core::option::Option, +} +/// QueryValidatorCommissionRequest is the request type for the +/// Query/ValidatorCommission 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 = "/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/ValidatorCommission", + response_type = QueryValidatorCommissionResponse +)] +pub struct QueryValidatorCommissionRequest { + /// validator_address defines the validator address to query for. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +/// QueryValidatorCommissionResponse is the response type for the +/// Query/ValidatorCommission 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 = "/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")] +pub struct QueryValidatorCommissionResponse { + /// commission defines the commission the validator received. + #[prost(message, optional, tag = "1")] + pub commission: ::core::option::Option, +} +/// QueryValidatorSlashesRequest is the request type for the +/// Query/ValidatorSlashes 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 = "/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", + response_type = QueryValidatorSlashesResponse +)] +pub struct QueryValidatorSlashesRequest { + /// validator_address defines the validator address to query for. + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, + /// starting_height defines the optional starting height to query the slashes. + #[prost(uint64, tag = "2")] + pub starting_height: u64, + /// starting_height defines the optional ending height to query the slashes. + #[prost(uint64, tag = "3")] + pub ending_height: u64, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "4")] + pub pagination: ::core::option::Option, +} +/// QueryValidatorSlashesResponse is the response type for the +/// Query/ValidatorSlashes 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 = "/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")] +pub struct QueryValidatorSlashesResponse { + /// slashes defines the slashes the validator received. + #[prost(message, repeated, tag = "1")] + pub slashes: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryDelegationRewardsRequest is the request type for the +/// Query/DelegationRewards 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 = "/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/DelegationRewards", + response_type = QueryDelegationRewardsResponse +)] +pub struct QueryDelegationRewardsRequest { + /// delegator_address defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + /// validator_address defines the validator address to query for. + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, +} +/// QueryDelegationRewardsResponse is the response type for the +/// Query/DelegationRewards 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 = "/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")] +pub struct QueryDelegationRewardsResponse { + /// rewards defines the rewards accrued by a delegation. + #[prost(message, repeated, tag = "1")] + pub rewards: ::prost::alloc::vec::Vec, +} +/// QueryDelegationTotalRewardsRequest is the request type for the +/// Query/DelegationTotalRewards 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 = "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + response_type = QueryDelegationTotalRewardsResponse +)] +pub struct QueryDelegationTotalRewardsRequest { + /// delegator_address defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, +} +/// QueryDelegationTotalRewardsResponse is the response type for the +/// Query/DelegationTotalRewards 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 = "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")] +pub struct QueryDelegationTotalRewardsResponse { + /// rewards defines all the rewards accrued by a delegator. + #[prost(message, repeated, tag = "1")] + pub rewards: ::prost::alloc::vec::Vec, + /// total defines the sum of all the rewards. + #[prost(message, repeated, tag = "2")] + pub total: ::prost::alloc::vec::Vec, +} +/// QueryDelegatorValidatorsRequest is the request type for the +/// Query/DelegatorValidators 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 = "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/DelegatorValidators", + response_type = QueryDelegatorValidatorsResponse +)] +pub struct QueryDelegatorValidatorsRequest { + /// delegator_address defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, +} +/// QueryDelegatorValidatorsResponse is the response type for the +/// Query/DelegatorValidators 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 = "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")] +pub struct QueryDelegatorValidatorsResponse { + /// validators defines the validators a delegator is delegating for. + #[prost(string, repeated, tag = "1")] + pub validators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// QueryDelegatorWithdrawAddressRequest is the request type for the +/// Query/DelegatorWithdrawAddress 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 = "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + response_type = QueryDelegatorWithdrawAddressResponse +)] +pub struct QueryDelegatorWithdrawAddressRequest { + /// delegator_address defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, +} +/// QueryDelegatorWithdrawAddressResponse is the response type for the +/// Query/DelegatorWithdrawAddress 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 = "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")] +pub struct QueryDelegatorWithdrawAddressResponse { + /// withdraw_address defines the delegator address to query for. + #[prost(string, tag = "1")] + pub withdraw_address: ::prost::alloc::string::String, +} +/// QueryCommunityPoolRequest is the request type for the Query/CommunityPool 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 = "/cosmos.distribution.v1beta1.QueryCommunityPoolRequest")] +#[proto_query( + path = "/cosmos.distribution.v1beta1.Query/CommunityPool", + response_type = QueryCommunityPoolResponse +)] +pub struct QueryCommunityPoolRequest {} +/// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +/// 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 = "/cosmos.distribution.v1beta1.QueryCommunityPoolResponse")] +pub struct QueryCommunityPoolResponse { + /// pool defines community pool's coins. + #[prost(message, repeated, tag = "1")] + pub pool: ::prost::alloc::vec::Vec, +} +/// MsgSetWithdrawAddress sets the withdraw address for +/// a delegator (or validator self-delegation). +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress")] +pub struct MsgSetWithdrawAddress { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub withdraw_address: ::prost::alloc::string::String, +} +/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress 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 = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")] +pub struct MsgSetWithdrawAddressResponse {} +/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +/// from a single 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 = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")] +pub struct MsgWithdrawDelegatorReward { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, +} +/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward +/// 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 = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")] +pub struct MsgWithdrawDelegatorRewardResponse { + /// Since: cosmos-sdk 0.46 + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, +} +/// MsgWithdrawValidatorCommission withdraws the full commission to the validator +/// address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")] +pub struct MsgWithdrawValidatorCommission { + #[prost(string, tag = "1")] + pub validator_address: ::prost::alloc::string::String, +} +/// MsgWithdrawValidatorCommissionResponse defines the +/// Msg/WithdrawValidatorCommission 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 = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")] +pub struct MsgWithdrawValidatorCommissionResponse { + /// Since: cosmos-sdk 0.46 + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, +} +/// MsgFundCommunityPool allows an account to directly +/// fund the community pool. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgFundCommunityPool")] +pub struct MsgFundCommunityPool { + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, +} +/// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool 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 = "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")] +pub struct MsgFundCommunityPoolResponse {} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgUpdateParams")] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/distribution 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. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse")] +pub struct MsgUpdateParamsResponse {} +/// MsgCommunityPoolSpend defines a message for sending tokens from the community +/// pool to another account. This message is typically executed via a governance +/// proposal with the governance module being the executing authority. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend")] +pub struct MsgCommunityPoolSpend { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub recipient: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, +} +/// MsgCommunityPoolSpendResponse defines the response to executing a +/// MsgCommunityPoolSpend message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive( + Clone, + PartialEq, + Eq, + ::prost::Message, + ::serde::Serialize, + ::serde::Deserialize, + ::schemars::JsonSchema, + CosmwasmExt, +)] +#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse")] +pub struct MsgCommunityPoolSpendResponse {} diff --git a/src/types/cosmos/gov/v1beta1.rs b/src/types/cosmos/gov/v1beta1.rs index 0560626..ec4b76d 100644 --- a/src/types/cosmos/gov/v1beta1.rs +++ b/src/types/cosmos/gov/v1beta1.rs @@ -17,10 +17,6 @@ use osmosis_std_derive::CosmwasmExt; pub struct WeightedVoteOption { /// option defines the valid vote options, it must not contain duplicate vote options. #[prost(enumeration = "VoteOption", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub option: i32, /// weight is the vote weight associated with the vote option. #[prost(string, tag = "2")] @@ -65,11 +61,6 @@ pub struct TextProposal { pub struct Deposit { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "2")] @@ -94,21 +85,12 @@ pub struct Deposit { pub struct Proposal { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// content is the proposal's content. #[prost(message, optional, tag = "2")] pub content: ::core::option::Option, /// status defines the proposal status. #[prost(enumeration = "ProposalStatus", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub status: i32, /// final_tally_result is the final tally result of the proposal. When /// querying a proposal via gRPC, this field is not populated until the @@ -175,11 +157,6 @@ pub struct TallyResult { pub struct Vote { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter is the voter address of the proposal. #[prost(string, tag = "2")] @@ -189,10 +166,6 @@ pub struct Vote { /// other cases, this field will default to VOTE_OPTION_UNSPECIFIED. #[deprecated] #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub option: i32, /// options is the weighted vote options. /// @@ -375,11 +348,6 @@ impl ProposalStatus { pub struct GenesisState { /// starting_proposal_id is the ID of the starting proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "starting_proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub starting_proposal_id: u64, /// deposits defines all the deposits present at genesis. #[prost(message, repeated, tag = "2")] @@ -420,11 +388,6 @@ pub struct GenesisState { pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// QueryProposalResponse is the response type for the Query/Proposal RPC method. @@ -464,10 +427,6 @@ pub struct QueryProposalResponse { pub struct QueryProposalsRequest { /// proposal_status defines the status of the proposals. #[prost(enumeration = "ProposalStatus", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_status: i32, /// voter defines the voter address for the proposals. #[prost(string, tag = "2")] @@ -521,11 +480,6 @@ pub struct QueryProposalsResponse { pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter defines the voter address for the proposals. #[prost(string, tag = "2")] @@ -569,11 +523,6 @@ pub struct QueryVoteResponse { pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] @@ -667,11 +616,6 @@ pub struct QueryParamsResponse { pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "2")] @@ -715,11 +659,6 @@ pub struct QueryDepositResponse { pub struct QueryDepositsRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] @@ -766,11 +705,6 @@ pub struct QueryDepositsResponse { pub struct QueryTallyResultRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -832,11 +766,6 @@ pub struct MsgSubmitProposal { pub struct MsgSubmitProposalResponse { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// MsgVote defines a message to cast a vote. @@ -855,21 +784,12 @@ pub struct MsgSubmitProposalResponse { pub struct MsgVote { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter is the voter address for the proposal. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, /// option defines the vote option. #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub option: i32, } /// MsgVoteResponse defines the Msg/Vote response type. @@ -904,11 +824,6 @@ pub struct MsgVoteResponse {} pub struct MsgVoteWeighted { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter is the voter address for the proposal. #[prost(string, tag = "2")] @@ -949,11 +864,6 @@ pub struct MsgVoteWeightedResponse {} pub struct MsgDeposit { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "2")] diff --git a/src/types/cosmos/group/v1.rs b/src/types/cosmos/group/v1.rs index d34669e..3cd4686 100644 --- a/src/types/cosmos/group/v1.rs +++ b/src/types/cosmos/group/v1.rs @@ -128,7 +128,7 @@ pub struct DecisionPolicyWindows { /// min_execution_period is the minimum duration after the proposal submission /// where members can start sending MsgExec. This means that the window for /// sending a MsgExec transaction is: - /// `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` + /// `\[ submission + min_execution_period ; submission + voting_period + max_execution_period\]` /// where max_execution_period is a app-specific config, defined in the keeper. /// If not set, min_execution_period will default to 0. /// @@ -155,11 +155,6 @@ pub struct DecisionPolicyWindows { pub struct GroupInfo { /// id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub id: u64, /// admin is the account address of the group's admin. #[prost(string, tag = "2")] @@ -172,10 +167,6 @@ pub struct GroupInfo { /// or any member is added or removed this version is incremented and will /// cause proposals based on older versions of this group to fail #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub version: u64, /// total_weight is the sum of the group members' weights. #[prost(string, tag = "5")] @@ -200,11 +191,6 @@ pub struct GroupInfo { pub struct GroupMember { /// group_id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// member is the member data. #[prost(message, optional, tag = "2")] @@ -229,11 +215,6 @@ pub struct GroupPolicyInfo { pub address: ::prost::alloc::string::String, /// group_id is the unique ID of the group. #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// admin is the account address of the group admin. #[prost(string, tag = "3")] @@ -246,10 +227,6 @@ pub struct GroupPolicyInfo { /// version is used to track changes to a group's GroupPolicyInfo structure that /// would create a different result on a running proposal. #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub version: u64, /// decision_policy specifies the group policy's decision policy. #[prost(message, optional, tag = "6")] @@ -277,11 +254,6 @@ pub struct GroupPolicyInfo { pub struct Proposal { /// id is the unique id of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub id: u64, /// group_policy_address is the account address of group policy. #[prost(string, tag = "2")] @@ -300,27 +272,15 @@ pub struct Proposal { /// group_version tracks the version of the group at proposal submission. /// This field is here for informational purposes only. #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_version: u64, /// group_policy_version tracks the version of the group policy at proposal submission. /// When a decision policy is changed, existing proposals from previous policy /// versions will become invalid with the `ABORTED` status. /// This field is here for informational purposes only. #[prost(uint64, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_policy_version: u64, /// status represents the high level position in the life cycle of the proposal. Initial value is Submitted. #[prost(enumeration = "ProposalStatus", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub status: i32, /// final_tally_result contains the sums of all weighted votes for this /// proposal for each vote option. It is empty at submission, and only @@ -337,10 +297,6 @@ pub struct Proposal { pub voting_period_end: ::core::option::Option, /// executor_result is the final result of the proposal execution. Initial value is NotRun. #[prost(enumeration = "ProposalExecutorResult", tag = "11")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub executor_result: i32, /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. #[prost(message, repeated, tag = "12")] @@ -399,21 +355,12 @@ pub struct TallyResult { pub struct Vote { /// proposal is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter is the account address of the voter. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, /// option is the voter's choice on the proposal. #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub option: i32, /// metadata is any arbitrary metadata attached to the vote. #[prost(string, tag = "4")] @@ -569,11 +516,6 @@ impl ProposalExecutorResult { pub struct EventCreateGroup { /// group_id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, } /// EventUpdateGroup is an event emitted when a group is updated. @@ -592,11 +534,6 @@ pub struct EventCreateGroup { pub struct EventUpdateGroup { /// group_id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, } /// EventCreateGroupPolicy is an event emitted when a group policy is created. @@ -651,11 +588,6 @@ pub struct EventUpdateGroupPolicy { pub struct EventSubmitProposal { /// proposal_id is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// EventWithdrawProposal is an event emitted when a proposal is withdrawn. @@ -674,11 +606,6 @@ pub struct EventSubmitProposal { pub struct EventWithdrawProposal { /// proposal_id is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// EventVote is an event emitted when a voter votes on a proposal. @@ -697,11 +624,6 @@ pub struct EventWithdrawProposal { pub struct EventVote { /// proposal_id is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// EventExec is an event emitted when a proposal is executed. @@ -720,18 +642,9 @@ pub struct EventVote { pub struct EventExec { /// proposal_id is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// result is the proposal execution result. #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub result: i32, /// logs contains error logs in case the execution result is FAILURE. #[prost(string, tag = "3")] @@ -753,11 +666,6 @@ pub struct EventExec { pub struct EventLeaveGroup { /// group_id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// address is the account address of the group member. #[prost(string, tag = "2")] @@ -779,18 +687,9 @@ pub struct EventLeaveGroup { pub struct EventProposalPruned { /// proposal_id is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN). #[prost(enumeration = "ProposalStatus", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub status: i32, /// tally_result is the proposal tally result (when applicable). #[prost(message, optional, tag = "3")] @@ -813,10 +712,6 @@ pub struct GenesisState { /// group_seq is the group table orm.Sequence, /// it is used to get the next group ID. #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_seq: u64, /// groups is the list of groups info. #[prost(message, repeated, tag = "2")] @@ -827,10 +722,6 @@ pub struct GenesisState { /// group_policy_seq is the group policy table orm.Sequence, /// it is used to generate the next group policy account address. #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_policy_seq: u64, /// group_policies is the list of group policies info. #[prost(message, repeated, tag = "5")] @@ -838,10 +729,6 @@ pub struct GenesisState { /// proposal_seq is the proposal table orm.Sequence, /// it is used to get the next proposal ID. #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_seq: u64, /// proposals is the list of proposals. #[prost(message, repeated, tag = "7")] @@ -870,11 +757,6 @@ pub struct GenesisState { pub struct QueryGroupInfoRequest { /// group_id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, } /// QueryGroupInfoResponse is the Query/GroupInfo response type. @@ -955,11 +837,6 @@ pub struct QueryGroupPolicyInfoResponse { pub struct QueryGroupMembersRequest { /// group_id is the unique ID of the group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] @@ -1052,11 +929,6 @@ pub struct QueryGroupsByAdminResponse { pub struct QueryGroupPoliciesByGroupRequest { /// group_id is the unique ID of the group policy's group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] @@ -1149,11 +1021,6 @@ pub struct QueryGroupPoliciesByAdminResponse { pub struct QueryProposalRequest { /// proposal_id is the unique ID of a proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// QueryProposalResponse is the Query/Proposal response type. @@ -1240,11 +1107,6 @@ pub struct QueryProposalsByGroupPolicyResponse { pub struct QueryVoteByProposalVoterRequest { /// proposal_id is the unique ID of a proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter is a proposal voter account address. #[prost(string, tag = "2")] @@ -1288,11 +1150,6 @@ pub struct QueryVoteByProposalVoterResponse { pub struct QueryVotesByProposalRequest { /// proposal_id is the unique ID of a proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] @@ -1431,11 +1288,6 @@ pub struct QueryGroupsByMemberResponse { pub struct QueryTallyResultRequest { /// proposal_id is the unique id of a proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// QueryTallyResultResponse is the Query/TallyResult response type. @@ -1543,11 +1395,6 @@ pub struct MsgCreateGroup { pub struct MsgCreateGroupResponse { /// group_id is the unique ID of the newly created group. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, } /// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. @@ -1569,11 +1416,6 @@ pub struct MsgUpdateGroupMembers { pub admin: ::prost::alloc::string::String, /// group_id is the unique ID of the group. #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// member_updates is the list of members to update, /// set weight to 0 to remove a member. @@ -1613,11 +1455,6 @@ pub struct MsgUpdateGroupAdmin { pub admin: ::prost::alloc::string::String, /// group_id is the unique ID of the group. #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// new_admin is the group new admin account address. #[prost(string, tag = "3")] @@ -1656,11 +1493,6 @@ pub struct MsgUpdateGroupMetadata { pub admin: ::prost::alloc::string::String, /// group_id is the unique ID of the group. #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// metadata is the updated group's metadata. #[prost(string, tag = "3")] @@ -1699,11 +1531,6 @@ pub struct MsgCreateGroupPolicy { pub admin: ::prost::alloc::string::String, /// group_id is the unique ID of the group. #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// metadata is any arbitrary metadata attached to the group policy. #[prost(string, tag = "3")] @@ -1818,11 +1645,6 @@ pub struct MsgCreateGroupWithPolicy { pub struct MsgCreateGroupWithPolicyResponse { /// group_id is the unique ID of the newly created group with policy. #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, /// group_policy_address is the account address of the newly created group policy. #[prost(string, tag = "2")] @@ -1935,10 +1757,6 @@ pub struct MsgSubmitProposal { /// whether it should be executed immediately on creation or not. /// If so, proposers signatures are considered as Yes votes. #[prost(enumeration = "Exec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub exec: i32, /// title is the title of the proposal. /// @@ -1967,11 +1785,6 @@ pub struct MsgSubmitProposal { pub struct MsgSubmitProposalResponse { /// proposal is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, } /// MsgWithdrawProposal is the Msg/WithdrawProposal request type. @@ -1990,11 +1803,6 @@ pub struct MsgSubmitProposalResponse { pub struct MsgWithdrawProposal { /// proposal is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// address is the admin of the group policy or one of the proposer of the proposal. #[prost(string, tag = "2")] @@ -2030,21 +1838,12 @@ pub struct MsgWithdrawProposalResponse {} pub struct MsgVote { /// proposal is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// voter is the voter account address. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, /// option is the voter's choice on the proposal. #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub option: i32, /// metadata is any arbitrary metadata attached to the vote. #[prost(string, tag = "4")] @@ -2052,10 +1851,6 @@ pub struct MsgVote { /// exec defines whether the proposal should be executed /// immediately after voting or not. #[prost(enumeration = "Exec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub exec: i32, } /// MsgVoteResponse is the Msg/Vote response type. @@ -2088,11 +1883,6 @@ pub struct MsgVoteResponse {} pub struct MsgExec { /// proposal is the unique ID of the proposal. #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub proposal_id: u64, /// executor is the account address used to execute the proposal. #[prost(string, tag = "2")] @@ -2114,10 +1904,6 @@ pub struct MsgExec { pub struct MsgExecResponse { /// result is the final result of the proposal execution. #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub result: i32, } /// MsgLeaveGroup is the Msg/LeaveGroup request type. @@ -2139,11 +1925,6 @@ pub struct MsgLeaveGroup { pub address: ::prost::alloc::string::String, /// group_id is the unique ID of the group. #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub group_id: u64, } /// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. diff --git a/src/types/cosmos/mod.rs b/src/types/cosmos/mod.rs index 482cd8b..7f65403 100644 --- a/src/types/cosmos/mod.rs +++ b/src/types/cosmos/mod.rs @@ -2,6 +2,7 @@ pub mod auth; pub mod authz; pub mod bank; pub mod base; +pub mod distribution; pub mod feegrant; pub mod gov; pub mod group; diff --git a/src/types/cosmos/nft/v1beta1.rs b/src/types/cosmos/nft/v1beta1.rs index 190b7fe..5b2eaa4 100644 --- a/src/types/cosmos/nft/v1beta1.rs +++ b/src/types/cosmos/nft/v1beta1.rs @@ -15,11 +15,9 @@ use osmosis_std_derive::CosmwasmExt; pub struct EventSend { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the nft #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// sender is the address of the owner of nft #[prost(string, tag = "3")] @@ -44,11 +42,9 @@ pub struct EventSend { pub struct EventMint { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the nft #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// owner is the owner address of the nft #[prost(string, tag = "3")] @@ -70,11 +66,9 @@ pub struct EventMint { pub struct EventBurn { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the nft #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// owner is the owner address of the nft #[prost(string, tag = "3")] @@ -96,7 +90,6 @@ pub struct EventBurn { pub struct Class { /// id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// name defines the human-readable name of the NFT classification. Optional #[prost(string, tag = "2")] @@ -133,11 +126,9 @@ pub struct Class { pub struct Nft { /// class_id associated with the NFT, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the NFT #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// uri for the NFT metadata stored off chain #[prost(string, tag = "3")] @@ -211,7 +202,6 @@ pub struct Entry { pub struct QueryBalanceRequest { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// owner is the owner address of the nft #[prost(string, tag = "2")] @@ -233,10 +223,6 @@ pub struct QueryBalanceRequest { pub struct QueryBalanceResponse { /// amount is the number of all NFTs of a given class owned by the owner #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub amount: u64, } /// QueryOwnerRequest is the request type for the Query/Owner RPC method @@ -259,11 +245,9 @@ pub struct QueryBalanceResponse { pub struct QueryOwnerRequest { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the NFT #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } /// QueryOwnerResponse is the response type for the Query/Owner RPC method @@ -304,7 +288,6 @@ pub struct QueryOwnerResponse { pub struct QuerySupplyRequest { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } /// QuerySupplyResponse is the response type for the Query/Supply RPC method @@ -323,10 +306,6 @@ pub struct QuerySupplyRequest { pub struct QuerySupplyResponse { /// amount is the number of all NFTs from the given class #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub amount: u64, } /// QueryNFTstRequest is the request type for the Query/NFTs RPC method @@ -349,7 +328,6 @@ pub struct QuerySupplyResponse { pub struct QueryNfTsRequest { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// owner is the owner address of the nft #[prost(string, tag = "2")] @@ -396,11 +374,9 @@ pub struct QueryNfTsResponse { pub struct QueryNftRequest { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id is a unique identifier of the NFT #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, } /// QueryNFTResponse is the response type for the Query/NFT RPC method @@ -441,7 +417,6 @@ pub struct QueryNftResponse { pub struct QueryClassRequest { /// class_id associated with the nft #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, } /// QueryClassResponse is the response type for the Query/Class RPC method @@ -521,11 +496,9 @@ pub struct QueryClassesResponse { pub struct MsgSend { /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 #[prost(string, tag = "1")] - #[serde(alias = "classID")] pub class_id: ::prost::alloc::string::String, /// id defines the unique identification of nft #[prost(string, tag = "2")] - #[serde(alias = "ID")] pub id: ::prost::alloc::string::String, /// sender is the address of the owner of nft #[prost(string, tag = "3")] @@ -548,3 +521,4 @@ pub struct MsgSend { )] #[proto_message(type_url = "/cosmos.nft.v1beta1.MsgSendResponse")] pub struct MsgSendResponse {} + diff --git a/src/types/cosmos/staking/v1beta1.rs b/src/types/cosmos/staking/v1beta1.rs index 2c8587a..855c244 100644 --- a/src/types/cosmos/staking/v1beta1.rs +++ b/src/types/cosmos/staking/v1beta1.rs @@ -1,5 +1,4 @@ use osmosis_std_derive::CosmwasmExt; - /// AuthorizationType defines the type of staking module authorization type /// /// Since: cosmos-sdk 0.43 @@ -148,10 +147,6 @@ pub struct Validator { pub jailed: bool, /// status is the validator status (bonded/unbonding/unbonded). #[prost(enumeration = "BondStatus", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub status: i32, /// tokens define the delegated tokens (incl. self-delegation). #[prost(string, tag = "5")] @@ -164,10 +159,6 @@ pub struct Validator { pub description: ::core::option::Option, /// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. #[prost(int64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub unbonding_height: i64, /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. #[prost(message, optional, tag = "9")] @@ -182,14 +173,9 @@ pub struct Validator { pub min_self_delegation: ::prost::alloc::string::String, /// strictly positive if this validator's unbonding has been stopped by external modules #[prost(int64, tag = "12")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub unbonding_on_hold_ref_count: i64, /// list of unbonding ids, each uniquely identifing an unbonding of this validator #[prost(uint64, repeated, tag = "13")] - #[serde(alias = "unbondingIDs")] pub unbonding_ids: ::prost::alloc::vec::Vec, } /// ValAddresses defines a repeated set of validator addresses. @@ -357,10 +343,6 @@ pub struct UnbondingDelegation { pub struct UnbondingDelegationEntry { /// creation_height is the height which the unbonding took place. #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub creation_height: i64, /// completion_time is the unix time for unbonding completion. #[prost(message, optional, tag = "2")] @@ -373,18 +355,9 @@ pub struct UnbondingDelegationEntry { pub balance: ::prost::alloc::string::String, /// Incrementing id that uniquely identifies this entry #[prost(uint64, tag = "5")] - #[serde(alias = "unbondingID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub unbonding_id: u64, /// Strictly positive if this entry's unbonding has been stopped by external modules #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub unbonding_on_hold_ref_count: i64, } /// RedelegationEntry defines a redelegation object with relevant metadata. @@ -403,10 +376,6 @@ pub struct UnbondingDelegationEntry { pub struct RedelegationEntry { /// creation_height defines the height which the redelegation took place. #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub creation_height: i64, /// completion_time defines the unix time for redelegation completion. #[prost(message, optional, tag = "2")] @@ -419,18 +388,9 @@ pub struct RedelegationEntry { pub shares_dst: ::prost::alloc::string::String, /// Incrementing id that uniquely identifies this entry #[prost(uint64, tag = "5")] - #[serde(alias = "unbondingID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub unbonding_id: u64, /// Strictly positive if this entry's unbonding has been stopped by external modules #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub unbonding_on_hold_ref_count: i64, } /// Redelegation contains the list of a particular delegator's redelegating bonds @@ -482,24 +442,12 @@ pub struct Params { pub unbonding_time: ::core::option::Option, /// max_validators is the maximum number of validators. #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub max_validators: u32, /// max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub max_entries: u32, /// historical_entries is the number of historical entries to persist. #[prost(uint32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub historical_entries: u32, /// bond_denom defines the bondable coin denomination. #[prost(string, tag = "5")] @@ -590,7 +538,6 @@ pub struct Pool { #[prost(string, tag = "2")] pub bonded_tokens: ::prost::alloc::string::String, } - /// BondStatus is the status of a validator. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] @@ -722,10 +669,6 @@ pub struct LastValidatorPower { pub address: ::prost::alloc::string::String, /// power defines the power of the validator. #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub power: i64, } /// QueryValidatorsRequest is request type for Query/Validators RPC method. @@ -1237,7 +1180,6 @@ pub struct QueryDelegatorValidatorResponse { #[prost(message, optional, tag = "1")] pub validator: ::core::option::Option, } - /// QueryPoolRequest is request type for the Query/Pool RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1535,10 +1477,6 @@ pub struct MsgCancelUnbondingDelegation { pub amount: ::core::option::Option, /// creation_height is the height which the unbonding took place. #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub creation_height: i64, } /// MsgCancelUnbondingDelegationResponse diff --git a/src/types/cosmwasm/wasm/v1.rs b/src/types/cosmwasm/wasm/v1.rs index 9f449c8..1fb08eb 100644 --- a/src/types/cosmwasm/wasm/v1.rs +++ b/src/types/cosmwasm/wasm/v1.rs @@ -14,10 +14,6 @@ use osmosis_std_derive::CosmwasmExt; #[proto_message(type_url = "/cosmwasm.wasm.v1.AccessTypeParam")] pub struct AccessTypeParam { #[prost(enumeration = "AccessType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub value: i32, } /// AccessConfig access control type. @@ -35,10 +31,6 @@ pub struct AccessTypeParam { #[proto_message(type_url = "/cosmwasm.wasm.v1.AccessConfig")] pub struct AccessConfig { #[prost(enumeration = "AccessType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub permission: i32, #[prost(string, repeated, tag = "3")] pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -60,10 +52,6 @@ pub struct Params { #[prost(message, optional, tag = "1")] pub code_upload_access: ::core::option::Option, #[prost(enumeration = "AccessType", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub instantiate_default_permission: i32, } /// CodeInfo is data for the uploaded contract WASM code @@ -106,11 +94,6 @@ pub struct CodeInfo { pub struct ContractInfo { /// CodeID is the reference to the stored Wasm code #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Creator address who initially instantiated the contract #[prost(string, tag = "2")] @@ -125,7 +108,6 @@ pub struct ContractInfo { #[prost(message, optional, tag = "5")] pub created: ::core::option::Option, #[prost(string, tag = "6")] - #[serde(alias = "ibc_portID")] pub ibc_port_id: ::prost::alloc::string::String, /// Extension is an extension point to store custom metadata within the /// persistence model. @@ -147,18 +129,9 @@ pub struct ContractInfo { #[proto_message(type_url = "/cosmwasm.wasm.v1.ContractCodeHistoryEntry")] pub struct ContractCodeHistoryEntry { #[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub operation: i32, /// CodeID is the reference to the stored WASM code #[prost(uint64, tag = "2")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Updated Tx position when the operation was executed. #[prost(message, optional, tag = "3")] @@ -183,18 +156,10 @@ pub struct ContractCodeHistoryEntry { pub struct AbsoluteTxPosition { /// BlockHeight is the block the contract was created at #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub block_height: u64, /// TxIndex is a monotonic counter within the block (actual transaction index, /// or gas consumed) #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub tx_index: u64, } /// Model is a struct that holds a KV pair @@ -426,10 +391,6 @@ pub struct ContractGrant { pub struct MaxCallsLimit { /// Remaining number that is decremented on each execution #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub remaining: u64, } /// MaxFundsLimit defines the maximal amounts that can be sent to the contract. @@ -469,10 +430,6 @@ pub struct MaxFundsLimit { pub struct CombinedLimit { /// Remaining number that is decremented on each execution #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub calls_remaining: u64, /// Amounts is the maximal amount of tokens transferable to the contract. #[prost(message, repeated, tag = "2")] @@ -572,11 +529,6 @@ pub struct GenesisState { #[proto_message(type_url = "/cosmwasm.wasm.v1.Code")] pub struct Code { #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, #[prost(message, optional, tag = "2")] pub code_info: ::core::option::Option, @@ -626,10 +578,6 @@ pub struct Sequence { #[prost(bytes = "vec", tag = "1")] pub id_key: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub value: u64, } /// MsgIBCSend @@ -652,18 +600,10 @@ pub struct MsgIbcSend { /// Timeout height relative to the current block height. /// The timeout is disabled when set to 0. #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub timeout_height: u64, /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. /// The timeout is disabled when set to 0. #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub timeout_timestamp: u64, /// Data is the payload to transfer. We must not make assumption what format or /// content is in here. @@ -686,10 +626,6 @@ pub struct MsgIbcSend { pub struct MsgIbcSendResponse { /// Sequence number of the IBC packet sent #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub sequence: u64, } /// MsgIBCCloseChannel port and channel need to be owned by the contract @@ -709,6 +645,477 @@ pub struct MsgIbcCloseChannel { #[prost(string, tag = "2")] pub channel: ::prost::alloc::string::String, } +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit StoreCodeProposal. To submit WASM code to the system, +/// a simple MsgStoreCode can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.StoreCodeProposal")] +#[deprecated] +pub struct StoreCodeProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's environment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "4")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "7")] + pub instantiate_permission: ::core::option::Option, + /// UnpinCode code on upload, optional + #[prost(bool, tag = "8")] + pub unpin_code: bool, + /// Source is the URL where the code is hosted + #[prost(string, tag = "9")] + pub source: ::prost::alloc::string::String, + /// Builder is the docker image used to build the code deterministically, used + /// for smart contract verification + #[prost(string, tag = "10")] + pub builder: ::prost::alloc::string::String, + /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart + /// contract verification + #[prost(bytes = "vec", tag = "11")] + pub code_hash: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit InstantiateContractProposal. To instantiate a contract, +/// a simple MsgInstantiateContract can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.InstantiateContractProposal")] +#[deprecated] +pub struct InstantiateContractProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's environment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "4")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "5")] + pub code_id: u64, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "6")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "7")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "8")] + pub funds: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit InstantiateContract2Proposal. To instantiate contract 2, +/// a simple MsgInstantiateContract2 can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.InstantiateContract2Proposal")] +#[deprecated] +pub struct InstantiateContract2Proposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's enviroment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "4")] + pub admin: ::prost::alloc::string::String, + /// CodeID is the reference to the stored WASM code + #[prost(uint64, tag = "5")] + pub code_id: u64, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "6")] + pub label: ::prost::alloc::string::String, + /// Msg json encode message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "7")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "8")] + pub funds: ::prost::alloc::vec::Vec, + /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + #[prost(bytes = "vec", tag = "9")] + pub salt: ::prost::alloc::vec::Vec, + /// FixMsg include the msg value into the hash for the predictable address. + /// Default is false + #[prost(bool, tag = "10")] + pub fix_msg: bool, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit MigrateContractProposal. To migrate a contract, +/// a simple MsgMigrateContract can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.MigrateContractProposal")] +#[deprecated] +pub struct MigrateContractProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + /// + /// Note: skipping 3 as this was previously used for unneeded run_as + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "4")] + pub contract: ::prost::alloc::string::String, + /// CodeID references the new WASM code + #[prost(uint64, tag = "5")] + pub code_id: u64, + /// Msg json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "6")] + pub msg: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit SudoContractProposal. To call sudo on a contract, +/// a simple MsgSudoContract can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.SudoContractProposal")] +#[deprecated] +pub struct SudoContractProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract as sudo + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit ExecuteContractProposal. To call execute on a contract, +/// a simple MsgExecuteContract can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.ExecuteContractProposal")] +#[deprecated] +pub struct ExecuteContractProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's environment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "4")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract as execute + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "6")] + pub funds: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit UpdateAdminProposal. To set an admin for a contract, +/// a simple MsgUpdateAdmin can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.UpdateAdminProposal")] +#[deprecated] +pub struct UpdateAdminProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// NewAdmin address to be set + #[prost(string, tag = "3")] + pub new_admin: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "4")] + pub contract: ::prost::alloc::string::String, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit ClearAdminProposal. To clear the admin of a contract, +/// a simple MsgClearAdmin can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.ClearAdminProposal")] +#[deprecated] +pub struct ClearAdminProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm +/// cache, a simple MsgPinCodes can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.PinCodesProposal")] +#[deprecated] +pub struct PinCodesProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// CodeIDs references the new WASM codes + #[prost(uint64, repeated, packed = "false", tag = "3")] + pub code_ids: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm +/// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via +/// a v1 governance proposal. +#[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.UnpinCodesProposal")] +#[deprecated] +pub struct UnpinCodesProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// CodeIDs references the WASM codes + #[prost(uint64, repeated, packed = "false", tag = "3")] + pub code_ids: ::prost::alloc::vec::Vec, +} +/// AccessConfigUpdate contains the code id and the access config to be +/// applied. +#[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.AccessConfigUpdate")] +pub struct AccessConfigUpdate { + /// CodeID is the reference to the stored WASM code to be updated + #[prost(uint64, tag = "1")] + pub code_id: u64, + /// InstantiatePermission to apply to the set of code ids + #[prost(message, optional, tag = "2")] + pub instantiate_permission: ::core::option::Option, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit UpdateInstantiateConfigProposal. To update instantiate config +/// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from +/// the x/gov module via a v1 governance proposal. +#[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.UpdateInstantiateConfigProposal")] +#[deprecated] +pub struct UpdateInstantiateConfigProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// AccessConfigUpdate contains the list of code ids and the access config + /// to be applied. + #[prost(message, repeated, tag = "3")] + pub access_config_updates: ::prost::alloc::vec::Vec, +} +/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +/// an explicit StoreAndInstantiateContractProposal. To store and instantiate +/// the contract, a simple MsgStoreAndInstantiateContract can be invoked from +/// the x/gov module via a v1 governance proposal. +#[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.StoreAndInstantiateContractProposal")] +#[deprecated] +pub struct StoreAndInstantiateContractProposal { + /// Title is a short summary + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// Description is a human readable text + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// RunAs is the address that is passed to the contract's environment as sender + #[prost(string, tag = "3")] + pub run_as: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "4")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "5")] + pub instantiate_permission: ::core::option::Option, + /// UnpinCode code on upload, optional + #[prost(bool, tag = "6")] + pub unpin_code: bool, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "7")] + pub admin: ::prost::alloc::string::String, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "8")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "9")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on instantiation + #[prost(message, repeated, tag = "10")] + pub funds: ::prost::alloc::vec::Vec, + /// Source is the URL where the code is hosted + #[prost(string, tag = "11")] + pub source: ::prost::alloc::string::String, + /// Builder is the docker image used to build the code deterministically, used + /// for smart contract verification + #[prost(string, tag = "12")] + pub builder: ::prost::alloc::string::String, + /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart + /// contract verification + #[prost(bytes = "vec", tag = "13")] + pub code_hash: ::prost::alloc::vec::Vec, +} /// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC /// method #[allow(clippy::derive_partial_eq_without_eq)] @@ -823,11 +1230,6 @@ pub struct QueryContractHistoryResponse { pub struct QueryContractsByCodeRequest { /// grpc-gateway_out does not support Go style CodID #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] @@ -1012,11 +1414,6 @@ pub struct QuerySmartContractStateResponse { pub struct QueryCodeRequest { /// grpc-gateway_out does not support Go style CodID #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, } /// CodeInfoResponse contains code meta data from CodeInfo @@ -1035,11 +1432,6 @@ pub struct QueryCodeRequest { pub struct CodeInfoResponse { /// id for legacy support #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, #[prost(string, tag = "2")] pub creator: ::prost::alloc::string::String, @@ -1151,7 +1543,6 @@ pub struct QueryPinnedCodesRequest { #[proto_message(type_url = "/cosmwasm.wasm.v1.QueryPinnedCodesResponse")] pub struct QueryPinnedCodesResponse { #[prost(uint64, repeated, packed = "false", tag = "1")] - #[serde(alias = "codeIDs")] pub code_ids: ::prost::alloc::vec::Vec, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] @@ -1285,11 +1676,6 @@ pub struct MsgStoreCode { pub struct MsgStoreCodeResponse { /// CodeID is the reference to the stored WASM code #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Checksum is the sha256 hash of the stored code #[prost(bytes = "vec", tag = "2")] @@ -1318,11 +1704,6 @@ pub struct MsgInstantiateContract { pub admin: ::prost::alloc::string::String, /// CodeID is the reference to the stored WASM code #[prost(uint64, tag = "3")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Label is optional metadata to be stored with a contract instance. #[prost(string, tag = "4")] @@ -1378,11 +1759,6 @@ pub struct MsgInstantiateContract2 { pub admin: ::prost::alloc::string::String, /// CodeID is the reference to the stored WASM code #[prost(uint64, tag = "3")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Label is optional metadata to be stored with a contract instance. #[prost(string, tag = "4")] @@ -1489,11 +1865,6 @@ pub struct MsgMigrateContract { pub contract: ::prost::alloc::string::String, /// CodeID references the new WASM code #[prost(uint64, tag = "3")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Msg json encoded message to be passed to the contract on migration #[prost(bytes = "vec", tag = "4")] @@ -1591,33 +1962,6 @@ pub struct MsgClearAdmin { )] #[proto_message(type_url = "/cosmwasm.wasm.v1.MsgClearAdminResponse")] pub struct MsgClearAdminResponse {} -/// AccessConfigUpdate contains the code id and the access config to be -/// applied. -#[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.AccessConfigUpdate")] -pub struct AccessConfigUpdate { - /// CodeID is the reference to the stored WASM code to be updated - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// InstantiatePermission to apply to the set of code ids - #[prost(message, optional, tag = "2")] - pub instantiate_permission: ::core::option::Option, -} /// MsgUpdateInstantiateConfig updates instantiate config for a smart contract #[allow(clippy::derive_partial_eq_without_eq)] #[derive( @@ -1637,11 +1981,6 @@ pub struct MsgUpdateInstantiateConfig { pub sender: ::prost::alloc::string::String, /// CodeID references the stored WASM code #[prost(uint64, tag = "2")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// NewInstantiatePermission is the new access control #[prost(message, optional, tag = "3")] @@ -1771,7 +2110,6 @@ pub struct MsgPinCodes { pub authority: ::prost::alloc::string::String, /// CodeIDs references the new WASM codes #[prost(uint64, repeated, packed = "false", tag = "2")] - #[serde(alias = "codeIDs")] pub code_ids: ::prost::alloc::vec::Vec, } /// MsgPinCodesResponse defines the response structure for executing a @@ -1812,7 +2150,6 @@ pub struct MsgUnpinCodes { pub authority: ::prost::alloc::string::String, /// CodeIDs references the WASM codes #[prost(uint64, repeated, packed = "false", tag = "2")] - #[serde(alias = "codeIDs")] pub code_ids: ::prost::alloc::vec::Vec, } /// MsgUnpinCodesResponse defines the response structure for executing a @@ -2035,11 +2372,6 @@ pub struct MsgStoreAndMigrateContract { pub struct MsgStoreAndMigrateContractResponse { /// CodeID is the reference to the stored WASM code #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] pub code_id: u64, /// Checksum is the sha256 hash of the stored code #[prost(bytes = "vec", tag = "2")]