diff --git a/Cargo.lock b/Cargo.lock index a9b494d3..26259863 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1629,7 +1629,7 @@ dependencies = [ [[package]] name = "injective-std" -version = "0.1.6" +version = "0.1.7" dependencies = [ "chrono", "cosmwasm-std", diff --git a/packages/injective-protobuf/src/proto/mod.rs b/packages/injective-protobuf/src/proto/mod.rs index de6005c4..de0fb666 100644 --- a/packages/injective-protobuf/src/proto/mod.rs +++ b/packages/injective-protobuf/src/proto/mod.rs @@ -1,9 +1,9 @@ // @generated +pub mod account; pub mod auth; pub mod coin; pub mod distribution; pub mod exchange; -pub mod tx; pub mod oracle; -pub mod account; +pub mod tx; diff --git a/packages/injective-std/Cargo.toml b/packages/injective-std/Cargo.toml index 4bde9341..baf49b6a 100644 --- a/packages/injective-std/Cargo.toml +++ b/packages/injective-std/Cargo.toml @@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0" name = "injective-std" readme = "README.md" repository = "https://github.com/InjectiveLabs/cw-injective/tree/dev/packages/injective-std" -version = "0.1.6" +version = "0.1.7" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/injective-std/README.md b/packages/injective-std/README.md index d2ac2416..1a2d472b 100644 --- a/packages/injective-std/README.md +++ b/packages/injective-std/README.md @@ -1,6 +1,6 @@ # injective-std - **BETA VERSION:** +**BETA VERSION:** The bindings are currently tracking an unofficial release of Injective. @@ -8,7 +8,7 @@ Injective's proto-generated types and helpers built using [Buf](https://github.c ## Supported Version -* Injective-Core@e38d508c746a9b90d6e8a261ec2b03f99cc49351 +- Injective-Core@e38d508c746a9b90d6e8a261ec2b03f99cc49351 ## Build Instructions @@ -22,6 +22,12 @@ In order to generate an individual proto file run: buf generate [/path/to/injective-core] --template [/path/to/buf.gen.yaml] --output [output-path] --path [/path/to/module/proto] ``` +Follow by: + +```shell +buf build [/path/to/injective-core] --as-file-descriptor-set -o [/tmp/path/injective/descriptor_injective.bin] --path [/path/to/module/proto] +``` + Example `buf.gen.yaml` file: ```yaml @@ -32,4 +38,28 @@ plugins: - extern_path=.google.protobuf.Timestamp=crate::shim::Timestamp - extern_path=.google.protobuf.Duration=crate::shim::Duration - extern_path=.google.protobuf.Any=crate::shim::Any -``` \ No newline at end of file +``` + +### Examples + +Lets try to create the bindings for + +First create a directory with the dependencies as below: + +``` +├── README.md +└── dependencies +    ├── cosmos-sdk +    ├── injective-core +    └── wasmd +``` + +Next generate the proto: + +``` +buf generate /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/../../dependencies/injective-core/proto --template /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/buf.gen.yaml --output ./tmp/tmp-protobuf/injective --path /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/../../dependencies/injective-core/proto/injective/auction +``` + +``` +buf build /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/../../dependencies/injective-core/proto --path /Users/wandlitz/go/src/github.com/osmosis-labs/osmosis-rust/packages/proto-build-injective/../../dependencies/injective-core/proto/injective/auction +``` diff --git a/packages/injective-std/src/lib.rs b/packages/injective-std/src/lib.rs index 5016033a..275e14c7 100644 --- a/packages/injective-std/src/lib.rs +++ b/packages/injective-std/src/lib.rs @@ -2,6 +2,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #![forbid(unsafe_code)] #![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)] +#![allow(unused_imports, deprecated)] mod serde; pub mod shim; diff --git a/packages/injective-std/src/types/cosmos/auth/v1beta1.rs b/packages/injective-std/src/types/cosmos/auth/v1beta1.rs index f45111d3..a168ee21 100644 --- a/packages/injective-std/src/types/cosmos/auth/v1beta1.rs +++ b/packages/injective-std/src/types/cosmos/auth/v1beta1.rs @@ -388,9 +388,9 @@ impl<'a, Q: cosmwasm_std::CustomQuery> AuthQuerier<'a, Q> { pub fn account(&self, address: ::prost::alloc::string::String) -> Result { QueryAccountRequest { address }.query(self.querier) } - // pub fn account_address_by_id(&self, id: i64, account_id: u64) -> Result { - // QueryAccountAddressByIdRequest { id, account_id }.query(self.querier) - // } + pub fn account_address_by_id(&self, id: i64, account_id: u64) -> Result { + QueryAccountAddressByIdRequest { id, account_id }.query(self.querier) + } pub fn params(&self) -> Result { QueryParamsRequest {}.query(self.querier) } diff --git a/packages/injective-std/src/types/cosmos/bank/v1beta1.rs b/packages/injective-std/src/types/cosmos/bank/v1beta1.rs index 60e11721..5735245d 100644 --- a/packages/injective-std/src/types/cosmos/bank/v1beta1.rs +++ b/packages/injective-std/src/types/cosmos/bank/v1beta1.rs @@ -66,14 +66,14 @@ pub struct Output { /// Supply represents a struct that passively keeps track of the total supply /// amounts in the network. /// This message is deprecated now that supply is indexed by denom. -// #[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.bank.v1beta1.SupplySupply")] -// #[deprecated] -// pub struct Supply { -// #[prost(message, repeated, tag = "1")] -// pub total: ::prost::alloc::vec::Vec, -// } +#[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.bank.v1beta1.SupplySupply")] +#[deprecated] +pub struct Supply { + #[prost(message, repeated, tag = "1")] + pub total: ::prost::alloc::vec::Vec, +} /// DenomUnit represents a struct that describes a given /// denomination unit of the basic token. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/packages/injective-std/src/types/cosmos/distribution/v1beta1.rs b/packages/injective-std/src/types/cosmos/distribution/v1beta1.rs index e88f70a1..ee7adae6 100644 --- a/packages/injective-std/src/types/cosmos/distribution/v1beta1.rs +++ b/packages/injective-std/src/types/cosmos/distribution/v1beta1.rs @@ -119,20 +119,20 @@ pub struct FeePool { /// 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.CommunityPoolSpendProposalCommunityPoolSpendProposal")] -// #[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, -// } +#[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.CommunityPoolSpendProposalCommunityPoolSpendProposal")] +#[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 diff --git a/packages/injective-std/src/types/cosmwasm/mod.rs b/packages/injective-std/src/types/cosmwasm/mod.rs new file mode 100644 index 00000000..ce1d9f82 --- /dev/null +++ b/packages/injective-std/src/types/cosmwasm/mod.rs @@ -0,0 +1 @@ +pub mod wasm; diff --git a/packages/injective-std/src/types/cosmwasm/wasm/mod.rs b/packages/injective-std/src/types/cosmwasm/wasm/mod.rs new file mode 100644 index 00000000..a3a6d96c --- /dev/null +++ b/packages/injective-std/src/types/cosmwasm/wasm/mod.rs @@ -0,0 +1 @@ +pub mod v1; diff --git a/packages/injective-std/src/types/cosmwasm/wasm/v1.rs b/packages/injective-std/src/types/cosmwasm/wasm/v1.rs new file mode 100644 index 00000000..f1a0dde9 --- /dev/null +++ b/packages/injective-std/src/types/cosmwasm/wasm/v1.rs @@ -0,0 +1,1743 @@ +use osmosis_std_derive::CosmwasmExt; +/// AccessTypeParam +#[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.AccessTypeParamAccessTypeParam")] +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. +#[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.AccessConfigAccessConfig")] +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>, +} +/// Params defines the set of wasm parameters. +#[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.ParamsParams")] +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 +#[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.CodeInfoCodeInfo")] +pub struct CodeInfo { + /// CodeHash is the unique identifier created by wasmvm + #[prost(bytes = "vec", tag = "1")] + pub code_hash: ::prost::alloc::vec::Vec, + /// Creator address who initially stored the code + #[prost(string, tag = "2")] + pub creator: ::prost::alloc::string::String, + /// InstantiateConfig access control to apply on contract creation, optional + #[prost(message, optional, tag = "5")] + pub instantiate_config: ::core::option::Option, +} +/// ContractInfo stores a WASM contract instance +#[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.ContractInfoContractInfo")] +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")] + pub creator: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "3")] + pub admin: ::prost::alloc::string::String, + /// Label is optional metadata to be stored with a contract instance. + #[prost(string, tag = "4")] + pub label: ::prost::alloc::string::String, + /// Created Tx position when the contract was instantiated. + #[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. + #[prost(message, optional, tag = "7")] + pub extension: ::core::option::Option, +} +/// ContractCodeHistoryEntry metadata to a contract. +#[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.ContractCodeHistoryEntryContractCodeHistoryEntry")] +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")] + pub updated: ::core::option::Option, + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, +} +/// AbsoluteTxPosition is a unique transaction position that allows for global +/// ordering of transactions. +#[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.AbsoluteTxPositionAbsoluteTxPosition")] +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 +#[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.ModelModel")] +pub struct Model { + /// hex-encode key to read it better (this is often ascii) + #[prost(bytes = "vec", tag = "1")] + pub key: ::prost::alloc::vec::Vec, + /// base64-encode raw value + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, +} +/// AccessType permission types +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] +pub enum AccessType { + /// AccessTypeUnspecified placeholder for empty value + Unspecified = 0, + /// AccessTypeNobody forbidden + Nobody = 1, + /// AccessTypeEverybody unrestricted + Everybody = 3, + /// AccessTypeAnyOfAddresses allow any of the addresses + AnyOfAddresses = 4, +} +impl AccessType { + /// 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 { + AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED", + AccessType::Nobody => "ACCESS_TYPE_NOBODY", + AccessType::Everybody => "ACCESS_TYPE_EVERYBODY", + AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "ACCESS_TYPE_NOBODY" => Some(Self::Nobody), + "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody), + "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses), + _ => None, + } + } +} +/// ContractCodeHistoryOperationType actions that caused a code change +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] +pub enum ContractCodeHistoryOperationType { + /// ContractCodeHistoryOperationTypeUnspecified placeholder for empty value + Unspecified = 0, + /// ContractCodeHistoryOperationTypeInit on chain contract instantiation + Init = 1, + /// ContractCodeHistoryOperationTypeMigrate code migration + Migrate = 2, + /// ContractCodeHistoryOperationTypeGenesis based on genesis data + Genesis = 3, +} +impl ContractCodeHistoryOperationType { + /// 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 { + ContractCodeHistoryOperationType::Unspecified => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED", + ContractCodeHistoryOperationType::Init => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", + ContractCodeHistoryOperationType::Migrate => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", + ContractCodeHistoryOperationType::Genesis => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => Some(Self::Init), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => Some(Self::Migrate), + "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => Some(Self::Genesis), + _ => None, + } + } +} +/// StoreCodeAuthorization defines authorization for wasm code upload. +/// Since: wasmd 0.42 +#[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.StoreCodeAuthorization")] +pub struct StoreCodeAuthorization { + /// Grants for code upload + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, +} +/// ContractExecutionAuthorization defines authorization for wasm execute. +/// Since: wasmd 0.30 +#[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.ContractExecutionAuthorization")] +pub struct ContractExecutionAuthorization { + /// Grants for contract executions + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, +} +/// ContractMigrationAuthorization defines authorization for wasm contract +/// migration. Since: wasmd 0.30 +#[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.ContractMigrationAuthorization")] +pub struct ContractMigrationAuthorization { + /// Grants for contract migrations + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, +} +/// CodeGrant a granted permission for a single code +#[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.CodeGrant")] +pub struct CodeGrant { + /// CodeHash is the unique identifier created by wasmvm + /// Wildcard "*" is used to specify any kind of grant. + #[prost(bytes = "vec", tag = "1")] + pub code_hash: ::prost::alloc::vec::Vec, + /// InstantiatePermission is the superset access control to apply + /// on contract creation. + /// Optional + #[prost(message, optional, tag = "2")] + pub instantiate_permission: ::core::option::Option, +} +/// ContractGrant a granted permission for a single contract +/// Since: wasmd 0.30 +#[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.ContractGrant")] +pub struct ContractGrant { + /// Contract is the bech32 address of the smart contract + #[prost(string, tag = "1")] + pub contract: ::prost::alloc::string::String, + /// Limit defines execution limits that are enforced and updated when the grant + /// is applied. When the limit lapsed the grant is removed. + #[prost(message, optional, tag = "2")] + pub limit: ::core::option::Option, + /// Filter define more fine-grained control on the message payload passed + /// to the contract in the operation. When no filter applies on execution, the + /// operation is prohibited. + #[prost(message, optional, tag = "3")] + pub filter: ::core::option::Option, +} +/// MaxCallsLimit limited number of calls to the contract. No funds transferable. +/// Since: wasmd 0.30 +#[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.MaxCallsLimit")] +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. +/// Since: wasmd 0.30 +#[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.MaxFundsLimit")] +pub struct MaxFundsLimit { + /// Amounts is the maximal amount of tokens transferable to the contract. + #[prost(message, repeated, tag = "1")] + pub amounts: ::prost::alloc::vec::Vec, +} +/// CombinedLimit defines the maximal amounts that can be sent to a contract and +/// the maximal number of calls executable. Both need to remain >0 to be valid. +/// Since: wasmd 0.30 +#[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.CombinedLimit")] +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")] + pub amounts: ::prost::alloc::vec::Vec, +} +/// AllowAllMessagesFilter is a wildcard to allow any type of contract payload +/// message. +/// Since: wasmd 0.30 +#[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.AllowAllMessagesFilter")] +pub struct AllowAllMessagesFilter {} +/// AcceptedMessageKeysFilter accept only the specific contract message keys in +/// the json object to be executed. +/// Since: wasmd 0.30 +#[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.AcceptedMessageKeysFilter")] +pub struct AcceptedMessageKeysFilter { + /// Messages is the list of unique keys + #[prost(string, repeated, tag = "1")] + pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// AcceptedMessagesFilter accept only the specific raw contract messages to be +/// executed. +/// Since: wasmd 0.30 +#[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.AcceptedMessagesFilter")] +pub struct AcceptedMessagesFilter { + /// Messages is the list of raw contract messages + #[prost(bytes = "vec", repeated, tag = "1")] + pub messages: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +/// GenesisState - genesis state of x/wasm +#[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.GenesisState")] +pub struct GenesisState { + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub codes: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub contracts: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub sequences: ::prost::alloc::vec::Vec, +} +/// Code struct encompasses CodeInfo and CodeBytes +#[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.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, + #[prost(bytes = "vec", tag = "3")] + pub code_bytes: ::prost::alloc::vec::Vec, + /// Pinned to wasmvm cache + #[prost(bool, tag = "4")] + pub pinned: bool, +} +/// Contract struct encompasses ContractAddress, ContractInfo, and ContractState +#[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.Contract")] +pub struct Contract { + #[prost(string, tag = "1")] + pub contract_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub contract_info: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub contract_state: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub contract_code_history: ::prost::alloc::vec::Vec, +} +/// Sequence key and value of an id generation counter +#[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.Sequence")] +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 +#[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.MsgIBCSend")] +pub struct MsgIbcSend { + /// the channel by which the packet will be sent + #[prost(string, tag = "2")] + pub channel: ::prost::alloc::string::String, + /// 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. + #[prost(bytes = "vec", tag = "6")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgIBCSendResponse +#[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.MsgIBCSendResponse")] +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 +#[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.MsgIBCCloseChannel")] +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.StoreCodeProposalStoreCodeProposal")] +#[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.InstantiateContractProposalInstantiateContractProposal")] +#[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")] + #[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 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.InstantiateContract2ProposalInstantiateContract2Proposal")] +#[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")] + #[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 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.MigrateContractProposalMigrateContractProposal")] +#[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")] + #[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 = "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.SudoContractProposalSudoContractProposal")] +#[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.ExecuteContractProposalExecuteContractProposal")] +#[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.UpdateAdminProposalUpdateAdminProposal")] +#[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.ClearAdminProposalClearAdminProposal")] +#[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.PinCodesProposalPinCodesProposal")] +#[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")] + #[serde(alias = "codeIDs")] + 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.UnpinCodesProposalUnpinCodesProposal")] +#[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")] + #[serde(alias = "codeIDs")] + 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.AccessConfigUpdateAccessConfigUpdate")] +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, +} +/// 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.UpdateInstantiateConfigProposalUpdateInstantiateConfigProposal")] +#[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.StoreAndInstantiateContractProposalStoreAndInstantiateContractProposal")] +#[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)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractInfoRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/ContractInfo", + response_type = QueryContractInfoResponse +)] +pub struct QueryContractInfoRequest { + /// address is the address of the contract to query + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, +} +/// QueryContractInfoResponse is the response type for the Query/ContractInfo 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 = "/cosmwasm.wasm.v1.QueryContractInfoResponse")] +pub struct QueryContractInfoResponse { + /// address is the address of the contract + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub contract_info: ::core::option::Option, +} +/// QueryContractHistoryRequest is the request type for the Query/ContractHistory +/// 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 = "/cosmwasm.wasm.v1.QueryContractHistoryRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/ContractHistory", + response_type = QueryContractHistoryResponse +)] +pub struct QueryContractHistoryRequest { + /// address is the address of the contract to query + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryContractHistoryResponse is the response type for the +/// Query/ContractHistory 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 = "/cosmwasm.wasm.v1.QueryContractHistoryResponse")] +pub struct QueryContractHistoryResponse { + #[prost(message, repeated, tag = "1")] + pub entries: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode +/// 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 = "/cosmwasm.wasm.v1.QueryContractsByCodeRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/ContractsByCode", + response_type = QueryContractsByCodeResponse +)] +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")] + pub pagination: ::core::option::Option, +} +/// QueryContractsByCodeResponse is the response type for the +/// Query/ContractsByCode 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 = "/cosmwasm.wasm.v1.QueryContractsByCodeResponse")] +pub struct QueryContractsByCodeResponse { + /// contracts are a set of contract addresses + #[prost(string, repeated, tag = "1")] + pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryAllContractStateRequest is the request type for the +/// Query/AllContractState 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 = "/cosmwasm.wasm.v1.QueryAllContractStateRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/AllContractState", + response_type = QueryAllContractStateResponse +)] +pub struct QueryAllContractStateRequest { + /// address is the address of the contract + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryAllContractStateResponse is the response type for the +/// Query/AllContractState 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 = "/cosmwasm.wasm.v1.QueryAllContractStateResponse")] +pub struct QueryAllContractStateResponse { + #[prost(message, repeated, tag = "1")] + pub models: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryRawContractStateRequest is the request type for the +/// Query/RawContractState 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 = "/cosmwasm.wasm.v1.QueryRawContractStateRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/RawContractState", + response_type = QueryRawContractStateResponse +)] +pub struct QueryRawContractStateRequest { + /// address is the address of the contract + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub query_data: ::prost::alloc::vec::Vec, +} +/// QueryRawContractStateResponse is the response type for the +/// Query/RawContractState 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 = "/cosmwasm.wasm.v1.QueryRawContractStateResponse")] +pub struct QueryRawContractStateResponse { + /// Data contains the raw store data + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// QuerySmartContractStateRequest is the request type for the +/// Query/SmartContractState 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 = "/cosmwasm.wasm.v1.QuerySmartContractStateRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/SmartContractState", + response_type = QuerySmartContractStateResponse +)] +pub struct QuerySmartContractStateRequest { + /// address is the address of the contract + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// QueryData contains the query data passed to the contract + #[prost(bytes = "vec", tag = "2")] + pub query_data: ::prost::alloc::vec::Vec, +} +/// QuerySmartContractStateResponse is the response type for the +/// Query/SmartContractState 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 = "/cosmwasm.wasm.v1.QuerySmartContractStateResponse")] +pub struct QuerySmartContractStateResponse { + /// Data contains the json data returned from the smart contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// QueryCodeRequest is the request type for the Query/Code 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 = "/cosmwasm.wasm.v1.QueryCodeRequest")] +#[proto_query(path = "/cosmwasm.wasm.v1.Query/Code", response_type = QueryCodeResponse)] +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 +#[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.CodeInfoResponse")] +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, + #[prost(bytes = "vec", tag = "3")] + pub data_hash: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub instantiate_permission: ::core::option::Option, +} +/// QueryCodeResponse is the response type for the Query/Code 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 = "/cosmwasm.wasm.v1.QueryCodeResponse")] +pub struct QueryCodeResponse { + #[prost(message, optional, tag = "1")] + pub code_info: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// QueryCodesRequest is the request type for the Query/Codes 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 = "/cosmwasm.wasm.v1.QueryCodesRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/Codes", + response_type = QueryCodesResponse +)] +pub struct QueryCodesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option, +} +/// QueryCodesResponse is the response type for the Query/Codes 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 = "/cosmwasm.wasm.v1.QueryCodesResponse")] +pub struct QueryCodesResponse { + #[prost(message, repeated, tag = "1")] + pub code_infos: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes +/// 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 = "/cosmwasm.wasm.v1.QueryPinnedCodesRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/PinnedCodes", + response_type = QueryPinnedCodesResponse +)] +pub struct QueryPinnedCodesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryPinnedCodesResponse is the response type for the +/// Query/PinnedCodes 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 = "/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")] + pub pagination: ::core::option::Option, +} +/// 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 = "/cosmwasm.wasm.v1.QueryParamsRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.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 = "/cosmwasm.wasm.v1.QueryParamsResponse")] +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +/// QueryContractsByCreatorRequest is the request type for the +/// Query/ContractsByCreator 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 = "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest")] +#[proto_query( + path = "/cosmwasm.wasm.v1.Query/ContractsByCreator", + response_type = QueryContractsByCreatorResponse +)] +pub struct QueryContractsByCreatorRequest { + /// CreatorAddress is the address of contract creator + #[prost(string, tag = "1")] + pub creator_address: ::prost::alloc::string::String, + /// Pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryContractsByCreatorResponse is the response type for the +/// Query/ContractsByCreator 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 = "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse")] +pub struct QueryContractsByCreatorResponse { + /// ContractAddresses result set + #[prost(string, repeated, tag = "1")] + pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// MsgStoreCode submit Wasm code to the system +#[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.MsgStoreCode")] +pub struct MsgStoreCode { + /// Sender is the actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission access control to apply on contract creation, + /// optional + #[prost(message, optional, tag = "5")] + pub instantiate_permission: ::core::option::Option, +} +/// MsgStoreCodeResponse returns store result 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 = "/cosmwasm.wasm.v1.MsgStoreCodeResponse")] +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")] + pub checksum: ::prost::alloc::vec::Vec, +} +/// MsgInstantiateContract create a new smart contract instance for the given +/// code id. +#[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.MsgInstantiateContract")] +pub struct MsgInstantiateContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + 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")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[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, +} +/// MsgInstantiateContractResponse return instantiation result 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 = "/cosmwasm.wasm.v1.MsgInstantiateContractResponse")] +pub struct MsgInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgInstantiateContract2 create a new smart contract instance for the given +/// code id with a predicable 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 = "/cosmwasm.wasm.v1.MsgInstantiateContract2")] +pub struct MsgInstantiateContract2 { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "2")] + 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")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[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, + /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + #[prost(bytes = "vec", tag = "7")] + pub salt: ::prost::alloc::vec::Vec, + /// FixMsg include the msg value into the hash for the predictable address. + /// Default is false + #[prost(bool, tag = "8")] + pub fix_msg: bool, +} +/// MsgInstantiateContract2Response return instantiation result 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 = "/cosmwasm.wasm.v1.MsgInstantiateContract2Response")] +pub struct MsgInstantiateContract2Response { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgExecuteContract submits the given message data to a smart contract +#[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.MsgExecuteContract")] +pub struct MsgExecuteContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred to the contract on execution + #[prost(message, repeated, tag = "5")] + pub funds: ::prost::alloc::vec::Vec, +} +/// MsgExecuteContractResponse returns execution result 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 = "/cosmwasm.wasm.v1.MsgExecuteContractResponse")] +pub struct MsgExecuteContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract +#[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.MsgMigrateContract")] +pub struct MsgMigrateContract { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + 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")] + pub msg: ::prost::alloc::vec::Vec, +} +/// MsgMigrateContractResponse returns contract migration result 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 = "/cosmwasm.wasm.v1.MsgMigrateContractResponse")] +pub struct MsgMigrateContractResponse { + /// Data contains same raw bytes returned as data from the wasm contract. + /// (May be empty) + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgUpdateAdmin sets a new admin for a smart contract +#[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.MsgUpdateAdmin")] +pub struct MsgUpdateAdmin { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// NewAdmin address to be set + #[prost(string, tag = "2")] + pub new_admin: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// MsgUpdateAdminResponse returns empty 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 = "/cosmwasm.wasm.v1.MsgUpdateAdminResponse")] +pub struct MsgUpdateAdminResponse {} +/// MsgClearAdmin removes any admin stored for a smart contract +#[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.MsgClearAdmin")] +pub struct MsgClearAdmin { + /// Sender is the actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// MsgClearAdminResponse returns empty 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 = "/cosmwasm.wasm.v1.MsgClearAdminResponse")] +pub struct MsgClearAdminResponse {} +/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract +#[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.MsgUpdateInstantiateConfig")] +pub struct MsgUpdateInstantiateConfig { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + 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")] + pub new_instantiate_permission: ::core::option::Option, +} +/// MsgUpdateInstantiateConfigResponse returns empty 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 = "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse")] +pub struct MsgUpdateInstantiateConfigResponse {} +/// MsgUpdateParams is the MsgUpdateParams request type. +/// +/// Since: 0.40 +#[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.MsgUpdateParams")] +pub struct MsgUpdateParams { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/wasm 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: 0.40 +#[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.MsgUpdateParamsResponse")] +pub struct MsgUpdateParamsResponse {} +/// MsgSudoContract is the MsgSudoContract request type. +/// +/// Since: 0.40 +#[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.MsgSudoContract")] +pub struct MsgSudoContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "2")] + pub contract: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract as sudo + #[prost(bytes = "vec", tag = "3")] + pub msg: ::prost::alloc::vec::Vec, +} +/// MsgSudoContractResponse defines the response structure for executing a +/// MsgSudoContract message. +/// +/// Since: 0.40 +#[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.MsgSudoContractResponse")] +pub struct MsgSudoContractResponse { + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgPinCodes is the MsgPinCodes request type. +/// +/// Since: 0.40 +#[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.MsgPinCodes")] +pub struct MsgPinCodes { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + 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 +/// MsgPinCodes message. +/// +/// Since: 0.40 +#[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.MsgPinCodesResponse")] +pub struct MsgPinCodesResponse {} +/// MsgUnpinCodes is the MsgUnpinCodes request type. +/// +/// Since: 0.40 +#[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.MsgUnpinCodes")] +pub struct MsgUnpinCodes { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + 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 +/// MsgUnpinCodes message. +/// +/// Since: 0.40 +#[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.MsgUnpinCodesResponse")] +pub struct MsgUnpinCodesResponse {} +/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract +/// request type. +/// +/// Since: 0.40 +#[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.MsgStoreAndInstantiateContract")] +pub struct MsgStoreAndInstantiateContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "3")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "4")] + pub instantiate_permission: ::core::option::Option, + /// UnpinCode code on upload, optional. As default the uploaded contract is + /// pinned to cache. + #[prost(bool, tag = "5")] + pub unpin_code: bool, + /// Admin is an optional address that can execute migrations + #[prost(string, tag = "6")] + pub admin: ::prost::alloc::string::String, + /// Label is optional metadata to be stored with a constract instance. + #[prost(string, tag = "7")] + pub label: ::prost::alloc::string::String, + /// Msg json encoded message to be passed to the contract on instantiation + #[prost(bytes = "vec", tag = "8")] + pub msg: ::prost::alloc::vec::Vec, + /// Funds coins that are transferred from the authority account to the contract + /// on instantiation + #[prost(message, repeated, tag = "9")] + pub funds: ::prost::alloc::vec::Vec, + /// Source is the URL where the code is hosted + #[prost(string, tag = "10")] + 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 = "11")] + 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 = "12")] + pub code_hash: ::prost::alloc::vec::Vec, +} +/// MsgStoreAndInstantiateContractResponse defines the response structure +/// for executing a MsgStoreAndInstantiateContract message. +/// +/// Since: 0.40 +#[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.MsgStoreAndInstantiateContractResponse")] +pub struct MsgStoreAndInstantiateContractResponse { + /// Address is the bech32 address of the new contract instance. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgAddCodeUploadParamsAddresses is the +/// MsgAddCodeUploadParamsAddresses request type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses")] +pub struct MsgAddCodeUploadParamsAddresses { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// MsgAddCodeUploadParamsAddressesResponse defines the response +/// structure for executing a MsgAddCodeUploadParamsAddresses message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse")] +pub struct MsgAddCodeUploadParamsAddressesResponse {} +/// MsgRemoveCodeUploadParamsAddresses is the +/// MsgRemoveCodeUploadParamsAddresses request type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses")] +pub struct MsgRemoveCodeUploadParamsAddresses { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + #[prost(string, repeated, tag = "2")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// MsgRemoveCodeUploadParamsAddressesResponse defines the response +/// structure for executing a MsgRemoveCodeUploadParamsAddresses message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse")] +pub struct MsgRemoveCodeUploadParamsAddressesResponse {} +/// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract +/// request type. +/// +/// Since: 0.42 +#[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.MsgStoreAndMigrateContract")] +pub struct MsgStoreAndMigrateContract { + /// Authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// WASMByteCode can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, + /// InstantiatePermission to apply on contract creation, optional + #[prost(message, optional, tag = "3")] + pub instantiate_permission: ::core::option::Option, + /// 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 on migration + #[prost(bytes = "vec", tag = "5")] + pub msg: ::prost::alloc::vec::Vec, +} +/// MsgStoreAndMigrateContractResponse defines the response structure +/// for executing a MsgStoreAndMigrateContract message. +/// +/// Since: 0.42 +#[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.MsgStoreAndMigrateContractResponse")] +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")] + pub checksum: ::prost::alloc::vec::Vec, + /// Data contains bytes to returned from the contract + #[prost(bytes = "vec", tag = "3")] + pub data: ::prost::alloc::vec::Vec, +} +/// MsgUpdateContractLabel sets a new label for a smart contract +#[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.MsgUpdateContractLabel")] +pub struct MsgUpdateContractLabel { + /// Sender is the that actor that signed the messages + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// NewLabel string to be set + #[prost(string, tag = "2")] + pub new_label: ::prost::alloc::string::String, + /// Contract is the address of the smart contract + #[prost(string, tag = "3")] + pub contract: ::prost::alloc::string::String, +} +/// MsgUpdateContractLabelResponse returns empty 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 = "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse")] +pub struct MsgUpdateContractLabelResponse {} +pub struct WasmQuerier<'a, Q: cosmwasm_std::CustomQuery> { + querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, +} +impl<'a, Q: cosmwasm_std::CustomQuery> WasmQuerier<'a, Q> { + pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { + Self { querier } + } + pub fn contract_info(&self, address: ::prost::alloc::string::String) -> Result { + QueryContractInfoRequest { address }.query(self.querier) + } + pub fn contract_history( + &self, + address: ::prost::alloc::string::String, + pagination: ::core::option::Option, + ) -> Result { + QueryContractHistoryRequest { address, pagination }.query(self.querier) + } + pub fn contracts_by_code( + &self, + code_id: u64, + pagination: ::core::option::Option, + ) -> Result { + QueryContractsByCodeRequest { code_id, pagination }.query(self.querier) + } + pub fn all_contract_state( + &self, + address: ::prost::alloc::string::String, + pagination: ::core::option::Option, + ) -> Result { + QueryAllContractStateRequest { address, pagination }.query(self.querier) + } + pub fn raw_contract_state( + &self, + address: ::prost::alloc::string::String, + query_data: ::prost::alloc::vec::Vec, + ) -> Result { + QueryRawContractStateRequest { address, query_data }.query(self.querier) + } + pub fn smart_contract_state( + &self, + address: ::prost::alloc::string::String, + query_data: ::prost::alloc::vec::Vec, + ) -> Result { + QuerySmartContractStateRequest { address, query_data }.query(self.querier) + } + pub fn code(&self, code_id: u64) -> Result { + QueryCodeRequest { code_id }.query(self.querier) + } + pub fn codes( + &self, + pagination: ::core::option::Option, + ) -> Result { + QueryCodesRequest { pagination }.query(self.querier) + } + pub fn pinned_codes( + &self, + pagination: ::core::option::Option, + ) -> Result { + QueryPinnedCodesRequest { pagination }.query(self.querier) + } + pub fn params(&self) -> Result { + QueryParamsRequest {}.query(self.querier) + } + pub fn contracts_by_creator( + &self, + creator_address: ::prost::alloc::string::String, + pagination: ::core::option::Option, + ) -> Result { + QueryContractsByCreatorRequest { creator_address, pagination }.query(self.querier) + } +} diff --git a/packages/injective-std/src/types/injective/auction/mod.rs b/packages/injective-std/src/types/injective/auction/mod.rs new file mode 100644 index 00000000..9f64fc82 --- /dev/null +++ b/packages/injective-std/src/types/injective/auction/mod.rs @@ -0,0 +1 @@ +pub mod v1beta1; diff --git a/packages/injective-std/src/types/injective/auction/v1beta1.rs b/packages/injective-std/src/types/injective/auction/v1beta1.rs new file mode 100644 index 00000000..4baf8136 --- /dev/null +++ b/packages/injective-std/src/types/injective/auction/v1beta1.rs @@ -0,0 +1,244 @@ +use osmosis_std_derive::CosmwasmExt; +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.Params")] +pub struct Params { + /// auction_period_duration defines the auction period duration + #[prost(int64, tag = "1")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub auction_period: i64, + /// min_next_bid_increment_rate defines the minimum increment rate for new bids + #[prost(string, tag = "2")] + pub min_next_bid_increment_rate: ::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 = "/injective.auction.v1beta1.Bid")] +pub struct Bid { + #[prost(string, tag = "1")] + pub bidder: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + 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 = "/injective.auction.v1beta1.EventBid")] +pub struct EventBid { + /// bidder describes the address of bidder + #[prost(string, tag = "1")] + pub bidder: ::prost::alloc::string::String, + /// amount describes the amount the bidder put on the auction + #[prost(string, tag = "2")] + pub amount: ::prost::alloc::string::String, + /// round defines the round number of auction + #[prost(uint64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub round: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.EventAuctionResult")] +pub struct EventAuctionResult { + /// winner describes the address of the winner + #[prost(string, tag = "1")] + pub winner: ::prost::alloc::string::String, + /// amount describes the amount the winner get from the auction + #[prost(string, tag = "2")] + pub amount: ::prost::alloc::string::String, + /// round defines the round number of auction + #[prost(uint64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub round: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.EventAuctionStart")] +pub struct EventAuctionStart { + /// round defines the round number of auction + #[prost(uint64, tag = "1")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub round: u64, + /// ending_timestamp describes auction end time + #[prost(int64, tag = "2")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub ending_timestamp: i64, + /// new_basket describes auction module balance at the time of new auction + /// start + #[prost(message, repeated, tag = "3")] + pub new_basket: ::prost::alloc::vec::Vec, +} +/// GenesisState defines the auction 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 = "/injective.auction.v1beta1.GenesisState")] +pub struct GenesisState { + /// params defines all the parameters of related to auction. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + /// current auction round + #[prost(uint64, tag = "2")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub auction_round: u64, + /// current highest bid + #[prost(message, optional, tag = "3")] + pub highest_bid: ::core::option::Option, + /// auction ending timestamp + #[prost(int64, tag = "4")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub auction_ending_timestamp: i64, +} +/// QueryAuctionParamsRequest is the request type for the Query/AuctionParams 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 = "/injective.auction.v1beta1.QueryAuctionParamsRequest")] +#[proto_query( + path = "/injective.auction.v1beta1.Query/AuctionParams", + response_type = QueryAuctionParamsResponse +)] +pub struct QueryAuctionParamsRequest {} +/// QueryAuctionParamsRequest is the response type for the Query/AuctionParams +/// 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 = "/injective.auction.v1beta1.QueryAuctionParamsResponse")] +pub struct QueryAuctionParamsResponse { + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +/// QueryCurrentAuctionBasketRequest is the request type for the +/// Query/CurrentAuctionBasket 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 = "/injective.auction.v1beta1.QueryCurrentAuctionBasketRequest")] +#[proto_query( + path = "/injective.auction.v1beta1.Query/CurrentAuctionBasket", + response_type = QueryCurrentAuctionBasketResponse +)] +pub struct QueryCurrentAuctionBasketRequest {} +/// QueryCurrentAuctionBasketResponse is the response type for the +/// Query/CurrentAuctionBasket 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 = "/injective.auction.v1beta1.QueryCurrentAuctionBasketResponse")] +pub struct QueryCurrentAuctionBasketResponse { + /// amount describes the amount put on auction + #[prost(message, repeated, tag = "1")] + pub amount: ::prost::alloc::vec::Vec, + /// auctionRound describes current auction round + #[prost(uint64, tag = "2")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub auction_round: u64, + /// auctionClosingTime describes auction close time for the round + #[prost(int64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub auction_closing_time: i64, + /// highestBidder describes highest bidder on current round + #[prost(string, tag = "4")] + pub highest_bidder: ::prost::alloc::string::String, + /// highestBidAmount describes highest bid amount on current round + #[prost(string, tag = "5")] + pub highest_bid_amount: ::prost::alloc::string::String, +} +/// QueryModuleStateRequest is the request type for the Query/AuctionModuleState +/// 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 = "/injective.auction.v1beta1.QueryModuleStateRequest")] +#[proto_query( + path = "/injective.auction.v1beta1.Query/AuctionModuleState", + response_type = QueryModuleStateResponse +)] +pub struct QueryModuleStateRequest {} +/// QueryModuleStateResponse is the response type for the +/// Query/AuctionModuleState 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 = "/injective.auction.v1beta1.QueryModuleStateResponse")] +pub struct QueryModuleStateResponse { + #[prost(message, optional, tag = "1")] + pub state: ::core::option::Option, +} +/// Bid defines a SDK message for placing a bid for an auction +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.MsgBid")] +pub struct MsgBid { + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + /// amount of the bid in INJ tokens + #[prost(message, optional, tag = "2")] + pub bid_amount: ::core::option::Option, + /// the current auction round being bid on + #[prost(uint64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub round: u64, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.MsgBidResponse")] +pub struct MsgBidResponse {} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.MsgUpdateParams")] +pub struct MsgUpdateParams { + /// authority is the address of the governance account. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the ocr parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.auction.v1beta1.MsgUpdateParamsResponse")] +pub struct MsgUpdateParamsResponse {} +pub struct AuctionQuerier<'a, Q: cosmwasm_std::CustomQuery> { + querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, +} +impl<'a, Q: cosmwasm_std::CustomQuery> AuctionQuerier<'a, Q> { + pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { + Self { querier } + } + pub fn auction_params(&self) -> Result { + QueryAuctionParamsRequest {}.query(self.querier) + } + pub fn current_auction_basket(&self) -> Result { + QueryCurrentAuctionBasketRequest {}.query(self.querier) + } + pub fn auction_module_state(&self) -> Result { + QueryModuleStateRequest {}.query(self.querier) + } +} diff --git a/packages/injective-std/src/types/injective/exchange/v1beta1.rs b/packages/injective-std/src/types/injective/exchange/v1beta1.rs index 84143875..49366734 100644 --- a/packages/injective-std/src/types/injective/exchange/v1beta1.rs +++ b/packages/injective-std/src/types/injective/exchange/v1beta1.rs @@ -242,6 +242,12 @@ pub struct Params { /// derivative market launch is enabled #[prost(bool, tag = "24")] pub is_instant_derivative_market_launch_enabled: bool, + #[prost(int64, tag = "25")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub post_only_mode_height_threshold: i64, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] @@ -609,6 +615,8 @@ pub struct OrderInfo { /// quantity of the order #[prost(string, tag = "4")] pub quantity: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub cid: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] @@ -859,6 +867,8 @@ pub struct TradeLog { pub order_hash: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "6")] pub fee_recipient_address: ::prost::alloc::vec::Vec, + #[prost(string, tag = "7")] + pub cid: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] @@ -890,6 +900,8 @@ pub struct DerivativeTradeLog { pub order_hash: ::prost::alloc::vec::Vec, #[prost(bytes = "vec", tag = "6")] pub fee_recipient_address: ::prost::alloc::vec::Vec, + #[prost(string, tag = "7")] + pub cid: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] @@ -2174,6 +2186,8 @@ pub struct MsgCancelSpotOrder { pub subaccount_id: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub order_hash: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub cid: ::prost::alloc::string::String, } /// MsgCancelSpotOrderResponse defines the Msg/CancelSpotOrder response type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -2350,6 +2364,8 @@ pub struct MsgCancelDerivativeOrder { deserialize_with = "crate::serde::as_str::deserialize" )] pub order_mask: i32, + #[prost(string, tag = "6")] + pub cid: ::prost::alloc::string::String, } /// MsgCancelDerivativeOrderResponse defines the /// Msg/CancelDerivativeOrderResponse response type. @@ -2380,6 +2396,8 @@ pub struct MsgCancelBinaryOptionsOrder { deserialize_with = "crate::serde::as_str::deserialize" )] pub order_mask: i32, + #[prost(string, tag = "6")] + pub cid: ::prost::alloc::string::String, } /// MsgCancelBinaryOptionsOrderResponse defines the /// Msg/CancelBinaryOptionsOrderResponse response type. @@ -2406,6 +2424,8 @@ pub struct OrderData { deserialize_with = "crate::serde::as_str::deserialize" )] pub order_mask: i32, + #[prost(string, tag = "5")] + pub cid: ::prost::alloc::string::String, } /// MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders /// response type. @@ -2492,6 +2512,26 @@ pub struct MsgLiquidatePosition { #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] #[proto_message(type_url = "/injective.exchange.v1beta1.MsgLiquidatePositionResponse")] pub struct MsgLiquidatePositionResponse {} +/// A Cosmos-SDK MsgEmergencySettleMarket +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgEmergencySettleMarket")] +pub struct MsgEmergencySettleMarket { + #[prost(string, tag = "1")] + pub sender: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + #[serde(alias = "subaccountID")] + pub subaccount_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, +} +/// MsgEmergencySettleMarketResponse defines the Msg/EmergencySettleMarket +/// 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 = "/injective.exchange.v1beta1.MsgEmergencySettleMarketResponse")] +pub struct MsgEmergencySettleMarketResponse {} /// A Cosmos-SDK MsgIncreasePositionMargin #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] @@ -2544,316 +2584,388 @@ pub struct MsgPrivilegedExecuteContractResponse { #[prost(message, repeated, tag = "1")] pub funds_diff: ::prost::alloc::vec::Vec, } +/// A Cosmos-SDK MsgRewardsOptOut #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.SpotMarketParamUpdateProposal")] -pub struct SpotMarketParamUpdateProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgRewardsOptOut")] +pub struct MsgRewardsOptOut { #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - /// maker_fee_rate defines the trade fee rate for makers on the spot market - #[prost(string, tag = "4")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the trade fee rate for takers on the spot market - #[prost(string, tag = "5")] - pub taker_fee_rate: ::prost::alloc::string::String, - /// relayer_fee_share_rate defines the relayer fee share rate for the spot - /// market - #[prost(string, tag = "6")] - pub relayer_fee_share_rate: ::prost::alloc::string::String, - /// min_price_tick_size defines the minimum tick size of the order's price and - /// margin - #[prost(string, tag = "7")] - pub min_price_tick_size: ::prost::alloc::string::String, - /// min_quantity_tick_size defines the minimum tick size of the order's - /// quantity - #[prost(string, tag = "8")] - pub min_quantity_tick_size: ::prost::alloc::string::String, - #[prost(enumeration = "MarketStatus", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, + pub sender: ::prost::alloc::string::String, } +/// MsgRewardsOptOutResponse defines the Msg/RewardsOptOut 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 = "/injective.exchange.v1beta1.ExchangeEnableProposal")] -pub struct ExchangeEnableProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(enumeration = "ExchangeType", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub exchange_type: i32, -} +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgRewardsOptOutResponse")] +pub struct MsgRewardsOptOutResponse {} +/// A Cosmos-SDK MsgReclaimLockedFunds #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.BatchExchangeModificationProposal")] -pub struct BatchExchangeModificationProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgReclaimLockedFunds")] +pub struct MsgReclaimLockedFunds { #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub spot_market_param_update_proposals: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub derivative_market_param_update_proposals: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub spot_market_launch_proposals: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "6")] - pub perpetual_market_launch_proposals: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "7")] - pub expiry_futures_market_launch_proposals: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub trading_reward_campaign_update_proposal: ::core::option::Option, - #[prost(message, repeated, tag = "9")] - pub binary_options_market_launch_proposals: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "10")] - pub binary_options_param_update_proposals: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "11")] - pub denom_decimals_update_proposal: ::core::option::Option, + pub sender: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub locked_account_pub_key: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub signature: ::prost::alloc::vec::Vec, } -/// SpotMarketLaunchProposal defines a SDK message for proposing a new spot -/// market through governance +/// MsgReclaimLockedFundsResponse defines the Msg/ReclaimLockedFunds 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 = "/injective.exchange.v1beta1.SpotMarketLaunchProposal")] -pub struct SpotMarketLaunchProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Ticker for the spot market. - #[prost(string, tag = "3")] - pub ticker: ::prost::alloc::string::String, - /// type of coin to use as the base currency - #[prost(string, tag = "4")] - pub base_denom: ::prost::alloc::string::String, - /// type of coin to use as the quote currency - #[prost(string, tag = "5")] - pub quote_denom: ::prost::alloc::string::String, - /// min_price_tick_size defines the minimum tick size of the order's price - #[prost(string, tag = "6")] - pub min_price_tick_size: ::prost::alloc::string::String, - /// min_quantity_tick_size defines the minimum tick size of the order's - /// quantity - #[prost(string, tag = "7")] - pub min_quantity_tick_size: ::prost::alloc::string::String, - /// maker_fee_rate defines the fee percentage makers pay when trading - #[prost(string, tag = "8")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the fee percentage takers pay when trading - #[prost(string, tag = "9")] - pub taker_fee_rate: ::prost::alloc::string::String, +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgReclaimLockedFundsResponse")] +pub struct MsgReclaimLockedFundsResponse {} +/// MsgSignData defines an arbitrary, general-purpose, off-chain message +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgSignData")] +pub struct MsgSignData { + /// Signer is the sdk.AccAddress of the message signer + #[prost(bytes = "vec", tag = "1")] + pub signer: ::prost::alloc::vec::Vec, + /// Data represents the raw bytes of the content that is signed (text, json, + /// etc) + #[prost(bytes = "vec", tag = "2")] + pub data: ::prost::alloc::vec::Vec, } -/// PerpetualMarketLaunchProposal defines a SDK message for proposing a new -/// perpetual futures market through governance +/// MsgSignDoc defines an arbitrary, general-purpose, off-chain message #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.PerpetualMarketLaunchProposal")] -pub struct PerpetualMarketLaunchProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgSignDoc")] +pub struct MsgSignDoc { #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Ticker for the derivative market. - #[prost(string, tag = "3")] - pub ticker: ::prost::alloc::string::String, - /// type of coin to use as the base currency - #[prost(string, tag = "4")] - pub quote_denom: ::prost::alloc::string::String, - /// Oracle base currency - #[prost(string, tag = "5")] - pub oracle_base: ::prost::alloc::string::String, - /// Oracle quote currency - #[prost(string, tag = "6")] - pub oracle_quote: ::prost::alloc::string::String, - /// Scale factor for oracle prices. - #[prost(uint32, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub oracle_scale_factor: u32, - /// Oracle type - #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub oracle_type: i32, - /// initial_margin_ratio defines the initial margin ratio for the derivative - /// market - #[prost(string, tag = "9")] - pub initial_margin_ratio: ::prost::alloc::string::String, - /// maintenance_margin_ratio defines the maintenance margin ratio for the - /// derivative market - #[prost(string, tag = "10")] - pub maintenance_margin_ratio: ::prost::alloc::string::String, - /// maker_fee_rate defines the exchange trade fee for makers for the derivative - /// market - #[prost(string, tag = "11")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the exchange trade fee for takers for the derivative - /// market - #[prost(string, tag = "12")] - pub taker_fee_rate: ::prost::alloc::string::String, - /// min_price_tick_size defines the minimum tick size of the order's price and - /// margin - #[prost(string, tag = "13")] - pub min_price_tick_size: ::prost::alloc::string::String, - /// min_quantity_tick_size defines the minimum tick size of the order's - /// quantity - #[prost(string, tag = "14")] - pub min_quantity_tick_size: ::prost::alloc::string::String, + pub sign_type: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub value: ::core::option::Option, } +/// MsgAdminUpdateBinaryOptionsMarket is used by the market Admin to operate the +/// market #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.BinaryOptionsMarketLaunchProposal")] -pub struct BinaryOptionsMarketLaunchProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket")] +pub struct MsgAdminUpdateBinaryOptionsMarket { #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, + pub sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Ticker for the derivative contract. + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + /// new price at which market will be settled #[prost(string, tag = "3")] - pub ticker: ::prost::alloc::string::String, - /// Oracle symbol - #[prost(string, tag = "4")] - pub oracle_symbol: ::prost::alloc::string::String, - /// Oracle Provider - #[prost(string, tag = "5")] - pub oracle_provider: ::prost::alloc::string::String, - /// Oracle type - #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub oracle_type: i32, - /// Scale factor for oracle prices. - #[prost(uint32, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub oracle_scale_factor: u32, + pub settlement_price: ::prost::alloc::string::String, /// expiration timestamp - #[prost(int64, tag = "8")] + #[prost(int64, tag = "4")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub expiration_timestamp: i64, /// expiration timestamp - #[prost(int64, tag = "9")] + #[prost(int64, tag = "5")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub settlement_timestamp: i64, - /// admin of the market - #[prost(string, tag = "10")] - pub admin: ::prost::alloc::string::String, - /// Address of the quote currency denomination for the binary options contract - #[prost(string, tag = "11")] - pub quote_denom: ::prost::alloc::string::String, - /// maker_fee_rate defines the maker fee rate of a binary options market - #[prost(string, tag = "12")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the taker fee rate of a derivative market - #[prost(string, tag = "13")] - pub taker_fee_rate: ::prost::alloc::string::String, - /// min_price_tick_size defines the minimum tick size that the price and margin - /// required for orders in the market - #[prost(string, tag = "14")] - pub min_price_tick_size: ::prost::alloc::string::String, - /// min_quantity_tick_size defines the minimum tick size of the quantity - /// required for orders in the market - #[prost(string, tag = "15")] - pub min_quantity_tick_size: ::prost::alloc::string::String, + /// Status of the market + #[prost(enumeration = "MarketStatus", tag = "6")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub status: i32, } -/// ExpiryFuturesMarketLaunchProposal defines a SDK message for proposing a new -/// expiry futures market through governance +/// MsgAdminUpdateBinaryOptionsMarketResponse is the response for +/// AdminUpdateBinaryOptionsMarket 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 = "/injective.exchange.v1beta1.ExpiryFuturesMarketLaunchProposal")] -pub struct ExpiryFuturesMarketLaunchProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Ticker for the derivative market. - #[prost(string, tag = "3")] - pub ticker: ::prost::alloc::string::String, - /// type of coin to use as the quote currency - #[prost(string, tag = "4")] - pub quote_denom: ::prost::alloc::string::String, - /// Oracle base currency - #[prost(string, tag = "5")] - pub oracle_base: ::prost::alloc::string::String, - /// Oracle quote currency - #[prost(string, tag = "6")] - pub oracle_quote: ::prost::alloc::string::String, - /// Scale factor for oracle prices. - #[prost(uint32, tag = "7")] +#[proto_message(type_url = "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarketResponse")] +pub struct MsgAdminUpdateBinaryOptionsMarketResponse {} +/// GenesisState defines the exchange 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 = "/injective.exchange.v1beta1.GenesisState")] +pub struct GenesisState { + /// params defines all the parameters of related to exchange. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + /// spot_markets is an array containing the genesis trade pairs + #[prost(message, repeated, tag = "2")] + pub spot_markets: ::prost::alloc::vec::Vec, + /// derivative_markets is an array containing the genesis derivative markets + #[prost(message, repeated, tag = "3")] + pub derivative_markets: ::prost::alloc::vec::Vec, + /// spot_orderbook defines the spot exchange limit orderbook active at genesis. + #[prost(message, repeated, tag = "4")] + pub spot_orderbook: ::prost::alloc::vec::Vec, + /// derivative_orderbook defines the derivative exchange limit orderbook active + /// at genesis. + #[prost(message, repeated, tag = "5")] + pub derivative_orderbook: ::prost::alloc::vec::Vec, + /// balances defines the exchange users balances active at genesis. + #[prost(message, repeated, tag = "6")] + pub balances: ::prost::alloc::vec::Vec, + /// positions defines the exchange derivative positions at genesis + #[prost(message, repeated, tag = "7")] + pub positions: ::prost::alloc::vec::Vec, + /// subaccount_trade_nonces defines the subaccount trade nonces for the + /// subaccounts at genesis + #[prost(message, repeated, tag = "8")] + pub subaccount_trade_nonces: ::prost::alloc::vec::Vec, + /// expiry_futures_market_info defines the market info for the expiry futures + /// markets at genesis + #[prost(message, repeated, tag = "9")] + pub expiry_futures_market_info_state: ::prost::alloc::vec::Vec, + /// perpetual_market_info defines the market info for the perpetual derivative + /// markets at genesis + #[prost(message, repeated, tag = "10")] + pub perpetual_market_info: ::prost::alloc::vec::Vec, + /// perpetual_market_funding_state defines the funding state for the perpetual + /// derivative markets at genesis + #[prost(message, repeated, tag = "11")] + pub perpetual_market_funding_state: ::prost::alloc::vec::Vec, + /// derivative_market_settlement_scheduled defines the scheduled markets for + /// settlement at genesis + #[prost(message, repeated, tag = "12")] + pub derivative_market_settlement_scheduled: ::prost::alloc::vec::Vec, + /// sets spot markets as enabled + #[prost(bool, tag = "13")] + pub is_spot_exchange_enabled: bool, + /// sets derivative markets as enabled + #[prost(bool, tag = "14")] + pub is_derivatives_exchange_enabled: bool, + /// the current trading reward campaign info + #[prost(message, optional, tag = "15")] + pub trading_reward_campaign_info: ::core::option::Option, + /// the current and upcoming trading reward campaign pools + #[prost(message, repeated, tag = "16")] + pub trading_reward_pool_campaign_schedule: ::prost::alloc::vec::Vec, + /// the current trading reward account points + #[prost(message, repeated, tag = "17")] + pub trading_reward_campaign_account_points: ::prost::alloc::vec::Vec, + /// the fee discount schedule + #[prost(message, optional, tag = "18")] + pub fee_discount_schedule: ::core::option::Option, + /// the cached fee discount account tiers with TTL + #[prost(message, repeated, tag = "19")] + pub fee_discount_account_tier_ttl: ::prost::alloc::vec::Vec, + /// the fee discount paid by accounts in all buckets + #[prost(message, repeated, tag = "20")] + pub fee_discount_bucket_volume_accounts: ::prost::alloc::vec::Vec, + /// sets the first fee cycle as finished + #[prost(bool, tag = "21")] + pub is_first_fee_cycle_finished: bool, + /// the current and upcoming trading reward campaign pending pools + #[prost(message, repeated, tag = "22")] + pub pending_trading_reward_pool_campaign_schedule: ::prost::alloc::vec::Vec, + /// the pending trading reward account points + #[prost(message, repeated, tag = "23")] + pub pending_trading_reward_campaign_account_points: ::prost::alloc::vec::Vec, + /// the addresses opting out of trading rewards + #[prost(string, repeated, tag = "24")] + pub rewards_opt_out_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "25")] + pub historical_trade_records: ::prost::alloc::vec::Vec, + /// binary_options_markets is an array containing the genesis binary options + /// markets + #[prost(message, repeated, tag = "26")] + pub binary_options_markets: ::prost::alloc::vec::Vec, + /// binary_options_markets_scheduled_for_settlement contains the marketIDs of + /// binary options markets scheduled for next-block settlement + #[prost(string, repeated, tag = "27")] + #[serde(alias = "binary_options_marketIDs_scheduled_for_settlement")] + pub binary_options_market_ids_scheduled_for_settlement: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// spot_market_ids_scheduled_to_force_close defines the scheduled markets for + /// forced closings at genesis + #[prost(string, repeated, tag = "28")] + #[serde(alias = "spot_marketIDs_scheduled_to_force_close")] + pub spot_market_ids_scheduled_to_force_close: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// denom_decimals defines the denom decimals for the exchange. + #[prost(message, repeated, tag = "29")] + pub denom_decimals: ::prost::alloc::vec::Vec, + /// conditional_derivative_orderbook contains conditional orderbooks for all + /// markets (both lmit and market conditional orders) + #[prost(message, repeated, tag = "30")] + pub conditional_derivative_orderbooks: ::prost::alloc::vec::Vec, + /// market_fee_multipliers contains any non-default atomic order fee + /// multipliers + #[prost(message, repeated, tag = "31")] + pub market_fee_multipliers: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "32")] + pub orderbook_sequences: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "33")] + pub subaccount_volumes: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "34")] + pub market_volumes: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.OrderbookSequence")] +pub struct OrderbookSequence { + #[prost(uint64, tag = "1")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub oracle_scale_factor: u32, - /// Oracle type - #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "8")] + pub sequence: u64, + #[prost(string, tag = "2")] + #[serde(alias = "marketID")] + pub market_id: ::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 = "/injective.exchange.v1beta1.FeeDiscountAccountTierTTL")] +pub struct FeeDiscountAccountTierTtl { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub tier_ttl: ::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 = "/injective.exchange.v1beta1.FeeDiscountBucketVolumeAccounts")] +pub struct FeeDiscountBucketVolumeAccounts { + #[prost(int64, tag = "1")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub oracle_type: i32, - /// Expiration time of the market - #[prost(int64, tag = "9")] + pub bucket_start_timestamp: i64, + #[prost(message, repeated, tag = "2")] + pub account_volume: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.AccountVolume")] +pub struct AccountVolume { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub volume: ::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 = "/injective.exchange.v1beta1.TradingRewardCampaignAccountPoints")] +pub struct TradingRewardCampaignAccountPoints { + #[prost(string, tag = "1")] + pub account: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub points: ::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 = "/injective.exchange.v1beta1.TradingRewardCampaignAccountPendingPoints")] +pub struct TradingRewardCampaignAccountPendingPoints { + #[prost(int64, tag = "1")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub expiry: i64, - /// initial_margin_ratio defines the initial margin ratio for the derivative - /// market - #[prost(string, tag = "10")] - pub initial_margin_ratio: ::prost::alloc::string::String, - /// maintenance_margin_ratio defines the maintenance margin ratio for the - /// derivative market - #[prost(string, tag = "11")] - pub maintenance_margin_ratio: ::prost::alloc::string::String, - /// maker_fee_rate defines the exchange trade fee for makers for the derivative - /// market - #[prost(string, tag = "12")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the exchange trade fee for takers for the derivative - /// market - #[prost(string, tag = "13")] - pub taker_fee_rate: ::prost::alloc::string::String, - /// min_price_tick_size defines the minimum tick size of the order's price and - /// margin - #[prost(string, tag = "14")] - pub min_price_tick_size: ::prost::alloc::string::String, - /// min_quantity_tick_size defines the minimum tick size of the order's - /// quantity - #[prost(string, tag = "15")] - pub min_quantity_tick_size: ::prost::alloc::string::String, + pub reward_pool_start_timestamp: i64, + #[prost(message, repeated, tag = "2")] + pub account_points: ::prost::alloc::vec::Vec, } +/// Spot Exchange Limit Orderbook #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.DerivativeMarketParamUpdateProposal")] -pub struct DerivativeMarketParamUpdateProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.SpotOrderBook")] +pub struct SpotOrderBook { + #[prost(string, tag = "1")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(bool, tag = "2")] + pub is_buy_side: bool, + #[prost(message, repeated, tag = "3")] + pub orders: ::prost::alloc::vec::Vec, +} +/// Derivative Exchange Limit Orderbook +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.DerivativeOrderBook")] +pub struct DerivativeOrderBook { + #[prost(string, tag = "1")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(bool, tag = "2")] + pub is_buy_side: bool, + #[prost(message, repeated, tag = "3")] + pub orders: ::prost::alloc::vec::Vec, +} +/// Orderbook containing limit & market conditional orders +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.ConditionalDerivativeOrderBook")] +pub struct ConditionalDerivativeOrderBook { + #[prost(string, tag = "1")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub limit_buy_orders: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub market_buy_orders: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub limit_sell_orders: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub market_sell_orders: ::prost::alloc::vec::Vec, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.Balance")] +pub struct Balance { + #[prost(string, tag = "1")] + #[serde(alias = "subaccountID")] + pub subaccount_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub denom: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub deposits: ::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 = "/injective.exchange.v1beta1.DerivativePosition")] +pub struct DerivativePosition { + #[prost(string, tag = "1")] + #[serde(alias = "subaccountID")] + pub subaccount_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub position: ::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 = "/injective.exchange.v1beta1.SubaccountNonce")] +pub struct SubaccountNonce { + #[prost(string, tag = "1")] + #[serde(alias = "subaccountID")] + pub subaccount_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub subaccount_trade_nonce: ::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 = "/injective.exchange.v1beta1.ExpiryFuturesMarketInfoState")] +pub struct ExpiryFuturesMarketInfoState { + #[prost(string, tag = "1")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub market_info: ::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 = "/injective.exchange.v1beta1.PerpetualMarketFundingState")] +pub struct PerpetualMarketFundingState { + #[prost(string, tag = "1")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub funding: ::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 = "/injective.exchange.v1beta1.SpotMarketParamUpdateProposal")] +pub struct SpotMarketParamUpdateProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] @@ -2861,682 +2973,614 @@ pub struct DerivativeMarketParamUpdateProposal { #[prost(string, tag = "3")] #[serde(alias = "marketID")] pub market_id: ::prost::alloc::string::String, - /// initial_margin_ratio defines the initial margin ratio for the derivative - /// market + /// maker_fee_rate defines the trade fee rate for makers on the spot market #[prost(string, tag = "4")] - pub initial_margin_ratio: ::prost::alloc::string::String, - /// maintenance_margin_ratio defines the maintenance margin ratio for the - /// derivative market + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the trade fee rate for takers on the spot market #[prost(string, tag = "5")] - pub maintenance_margin_ratio: ::prost::alloc::string::String, - /// maker_fee_rate defines the exchange trade fee for makers for the derivative + pub taker_fee_rate: ::prost::alloc::string::String, + /// relayer_fee_share_rate defines the relayer fee share rate for the spot /// market #[prost(string, tag = "6")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the exchange trade fee for takers for the derivative - /// market - #[prost(string, tag = "7")] - pub taker_fee_rate: ::prost::alloc::string::String, - /// relayer_fee_share_rate defines the relayer fee share rate for the - /// derivative market - #[prost(string, tag = "8")] pub relayer_fee_share_rate: ::prost::alloc::string::String, /// min_price_tick_size defines the minimum tick size of the order's price and /// margin - #[prost(string, tag = "9")] + #[prost(string, tag = "7")] pub min_price_tick_size: ::prost::alloc::string::String, /// min_quantity_tick_size defines the minimum tick size of the order's /// quantity - #[prost(string, tag = "10")] + #[prost(string, tag = "8")] pub min_quantity_tick_size: ::prost::alloc::string::String, - /// hourly_interest_rate defines the hourly interest rate - #[prost(string, tag = "11")] - pub hourly_interest_rate: ::prost::alloc::string::String, - /// hourly_funding_rate_cap defines the maximum absolute value of the hourly - /// funding rate - #[prost(string, tag = "12")] - pub hourly_funding_rate_cap: ::prost::alloc::string::String, - #[prost(enumeration = "MarketStatus", tag = "13")] + #[prost(enumeration = "MarketStatus", tag = "9")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub status: i32, - #[prost(message, optional, tag = "14")] - pub oracle_params: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.MarketForcedSettlementProposal")] -pub struct MarketForcedSettlementProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.ExchangeEnableProposal")] +pub struct ExchangeEnableProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub settlement_price: ::prost::alloc::string::String, + #[prost(enumeration = "ExchangeType", tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub exchange_type: i32, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.UpdateDenomDecimalsProposal")] -pub struct UpdateDenomDecimalsProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.BatchExchangeModificationProposal")] +pub struct BatchExchangeModificationProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, #[prost(message, repeated, tag = "3")] - pub denom_decimals: ::prost::alloc::vec::Vec, + pub spot_market_param_update_proposals: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub derivative_market_param_update_proposals: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub spot_market_launch_proposals: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "6")] + pub perpetual_market_launch_proposals: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "7")] + pub expiry_futures_market_launch_proposals: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "8")] + pub trading_reward_campaign_update_proposal: ::core::option::Option, + #[prost(message, repeated, tag = "9")] + pub binary_options_market_launch_proposals: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "10")] + pub binary_options_param_update_proposals: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "11")] + pub denom_decimals_update_proposal: ::core::option::Option, + #[prost(message, optional, tag = "12")] + pub fee_discount_proposal: ::core::option::Option, + #[prost(message, repeated, tag = "13")] + pub market_forced_settlement_proposals: ::prost::alloc::vec::Vec, } +/// SpotMarketLaunchProposal defines a SDK message for proposing a new spot +/// market through governance #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.BinaryOptionsMarketParamUpdateProposal")] -pub struct BinaryOptionsMarketParamUpdateProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.SpotMarketLaunchProposal")] +pub struct SpotMarketLaunchProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, + /// Ticker for the spot market. #[prost(string, tag = "3")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - /// maker_fee_rate defines the exchange trade fee for makers for the derivative - /// market + pub ticker: ::prost::alloc::string::String, + /// type of coin to use as the base currency #[prost(string, tag = "4")] - pub maker_fee_rate: ::prost::alloc::string::String, - /// taker_fee_rate defines the exchange trade fee for takers for the derivative - /// market + pub base_denom: ::prost::alloc::string::String, + /// type of coin to use as the quote currency #[prost(string, tag = "5")] - pub taker_fee_rate: ::prost::alloc::string::String, - /// relayer_fee_share_rate defines the relayer fee share rate for the - /// derivative market + pub quote_denom: ::prost::alloc::string::String, + /// min_price_tick_size defines the minimum tick size of the order's price #[prost(string, tag = "6")] - pub relayer_fee_share_rate: ::prost::alloc::string::String, - /// min_price_tick_size defines the minimum tick size of the order's price and - /// margin - #[prost(string, tag = "7")] pub min_price_tick_size: ::prost::alloc::string::String, /// min_quantity_tick_size defines the minimum tick size of the order's /// quantity - #[prost(string, tag = "8")] + #[prost(string, tag = "7")] pub min_quantity_tick_size: ::prost::alloc::string::String, - /// expiration timestamp - #[prost(int64, tag = "9")] + /// maker_fee_rate defines the fee percentage makers pay when trading + #[prost(string, tag = "8")] + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the fee percentage takers pay when trading + #[prost(string, tag = "9")] + pub taker_fee_rate: ::prost::alloc::string::String, +} +/// PerpetualMarketLaunchProposal defines a SDK message for proposing a new +/// perpetual futures market through governance +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.exchange.v1beta1.PerpetualMarketLaunchProposal")] +pub struct PerpetualMarketLaunchProposal { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// Ticker for the derivative market. + #[prost(string, tag = "3")] + pub ticker: ::prost::alloc::string::String, + /// type of coin to use as the base currency + #[prost(string, tag = "4")] + pub quote_denom: ::prost::alloc::string::String, + /// Oracle base currency + #[prost(string, tag = "5")] + pub oracle_base: ::prost::alloc::string::String, + /// Oracle quote currency + #[prost(string, tag = "6")] + pub oracle_quote: ::prost::alloc::string::String, + /// Scale factor for oracle prices. + #[prost(uint32, tag = "7")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub expiration_timestamp: i64, - /// expiration timestamp - #[prost(int64, tag = "10")] + pub oracle_scale_factor: u32, + /// Oracle type + #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "8")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub settlement_timestamp: i64, - /// new price at which market will be settled + pub oracle_type: i32, + /// initial_margin_ratio defines the initial margin ratio for the derivative + /// market + #[prost(string, tag = "9")] + pub initial_margin_ratio: ::prost::alloc::string::String, + /// maintenance_margin_ratio defines the maintenance margin ratio for the + /// derivative market + #[prost(string, tag = "10")] + pub maintenance_margin_ratio: ::prost::alloc::string::String, + /// maker_fee_rate defines the exchange trade fee for makers for the derivative + /// market #[prost(string, tag = "11")] - pub settlement_price: ::prost::alloc::string::String, - /// admin of the market + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the exchange trade fee for takers for the derivative + /// market #[prost(string, tag = "12")] - pub admin: ::prost::alloc::string::String, - #[prost(enumeration = "MarketStatus", tag = "13")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, - #[prost(message, optional, tag = "14")] - pub oracle_params: ::core::option::Option, + pub taker_fee_rate: ::prost::alloc::string::String, + /// min_price_tick_size defines the minimum tick size of the order's price and + /// margin + #[prost(string, tag = "13")] + pub min_price_tick_size: ::prost::alloc::string::String, + /// min_quantity_tick_size defines the minimum tick size of the order's + /// quantity + #[prost(string, tag = "14")] + pub min_quantity_tick_size: ::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 = "/injective.exchange.v1beta1.ProviderOracleParams")] -pub struct ProviderOracleParams { - /// Oracle base currency +#[proto_message(type_url = "/injective.exchange.v1beta1.BinaryOptionsMarketLaunchProposal")] +pub struct BinaryOptionsMarketLaunchProposal { #[prost(string, tag = "1")] - pub symbol: ::prost::alloc::string::String, - /// Oracle quote currency + pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] - pub provider: ::prost::alloc::string::String, + pub description: ::prost::alloc::string::String, + /// Ticker for the derivative contract. + #[prost(string, tag = "3")] + pub ticker: ::prost::alloc::string::String, + /// Oracle symbol + #[prost(string, tag = "4")] + pub oracle_symbol: ::prost::alloc::string::String, + /// Oracle Provider + #[prost(string, tag = "5")] + pub oracle_provider: ::prost::alloc::string::String, + /// Oracle type + #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "6")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub oracle_type: i32, /// Scale factor for oracle prices. - #[prost(uint32, tag = "3")] + #[prost(uint32, tag = "7")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub oracle_scale_factor: u32, - /// Oracle type - #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "4")] + /// expiration timestamp + #[prost(int64, tag = "8")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub oracle_type: i32, + pub expiration_timestamp: i64, + /// expiration timestamp + #[prost(int64, tag = "9")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub settlement_timestamp: i64, + /// admin of the market + #[prost(string, tag = "10")] + pub admin: ::prost::alloc::string::String, + /// Address of the quote currency denomination for the binary options contract + #[prost(string, tag = "11")] + pub quote_denom: ::prost::alloc::string::String, + /// maker_fee_rate defines the maker fee rate of a binary options market + #[prost(string, tag = "12")] + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the taker fee rate of a derivative market + #[prost(string, tag = "13")] + pub taker_fee_rate: ::prost::alloc::string::String, + /// min_price_tick_size defines the minimum tick size that the price and margin + /// required for orders in the market + #[prost(string, tag = "14")] + pub min_price_tick_size: ::prost::alloc::string::String, + /// min_quantity_tick_size defines the minimum tick size of the quantity + /// required for orders in the market + #[prost(string, tag = "15")] + pub min_quantity_tick_size: ::prost::alloc::string::String, } +/// ExpiryFuturesMarketLaunchProposal defines a SDK message for proposing a new +/// expiry futures market through governance #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.OracleParams")] -pub struct OracleParams { - /// Oracle base currency +#[proto_message(type_url = "/injective.exchange.v1beta1.ExpiryFuturesMarketLaunchProposal")] +pub struct ExpiryFuturesMarketLaunchProposal { #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// Ticker for the derivative market. + #[prost(string, tag = "3")] + pub ticker: ::prost::alloc::string::String, + /// type of coin to use as the quote currency + #[prost(string, tag = "4")] + pub quote_denom: ::prost::alloc::string::String, + /// Oracle base currency + #[prost(string, tag = "5")] pub oracle_base: ::prost::alloc::string::String, /// Oracle quote currency - #[prost(string, tag = "2")] + #[prost(string, tag = "6")] pub oracle_quote: ::prost::alloc::string::String, /// Scale factor for oracle prices. - #[prost(uint32, tag = "3")] + #[prost(uint32, tag = "7")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub oracle_scale_factor: u32, /// Oracle type - #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "4")] + #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "8")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub oracle_type: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.TradingRewardCampaignLaunchProposal")] -pub struct TradingRewardCampaignLaunchProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub campaign_info: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub campaign_reward_pools: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.TradingRewardCampaignUpdateProposal")] -pub struct TradingRewardCampaignUpdateProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub campaign_info: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub campaign_reward_pools_additions: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub campaign_reward_pools_updates: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.RewardPointUpdate")] -pub struct RewardPointUpdate { - #[prost(string, tag = "1")] - pub account_address: ::prost::alloc::string::String, - /// new_points overwrites the current trading reward points for the account - #[prost(string, tag = "12")] - pub new_points: ::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 = "/injective.exchange.v1beta1.TradingRewardPendingPointsUpdateProposal")] -pub struct TradingRewardPendingPointsUpdateProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] + /// Expiration time of the market + #[prost(int64, tag = "9")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub pending_pool_timestamp: i64, - #[prost(message, repeated, tag = "4")] - pub reward_point_updates: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.FeeDiscountProposal")] -pub struct FeeDiscountProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub schedule: ::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 = "/injective.exchange.v1beta1.BatchCommunityPoolSpendProposal")] -// pub struct BatchCommunityPoolSpendProposal { -// #[prost(string, tag = "1")] -// pub title: ::prost::alloc::string::String, -// #[prost(string, tag = "2")] -// pub description: ::prost::alloc::string::String, -// #[prost(message, repeated, tag = "3")] -// pub proposals: ::prost::alloc::vec::Vec, -// } -/// A Cosmos-SDK MsgRewardsOptOut -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.MsgRewardsOptOut")] -pub struct MsgRewardsOptOut { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, -} -/// MsgRewardsOptOutResponse defines the Msg/RewardsOptOut 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 = "/injective.exchange.v1beta1.MsgRewardsOptOutResponse")] -pub struct MsgRewardsOptOutResponse {} -/// A Cosmos-SDK MsgReclaimLockedFunds -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.MsgReclaimLockedFunds")] -pub struct MsgReclaimLockedFunds { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - pub locked_account_pub_key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub signature: ::prost::alloc::vec::Vec, -} -/// MsgReclaimLockedFundsResponse defines the Msg/ReclaimLockedFunds 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 = "/injective.exchange.v1beta1.MsgReclaimLockedFundsResponse")] -pub struct MsgReclaimLockedFundsResponse {} -/// MsgSignData defines an arbitrary, general-purpose, off-chain message -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.MsgSignData")] -pub struct MsgSignData { - /// Signer is the sdk.AccAddress of the message signer - #[prost(bytes = "vec", tag = "1")] - pub signer: ::prost::alloc::vec::Vec, - /// Data represents the raw bytes of the content that is signed (text, json, - /// etc) - #[prost(bytes = "vec", tag = "2")] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgSignDoc defines an arbitrary, general-purpose, off-chain message -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.MsgSignDoc")] -pub struct MsgSignDoc { - #[prost(string, tag = "1")] - pub sign_type: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub value: ::core::option::Option, -} -/// MsgAdminUpdateBinaryOptionsMarket is used by the market Admin to operate the -/// market + pub expiry: i64, + /// initial_margin_ratio defines the initial margin ratio for the derivative + /// market + #[prost(string, tag = "10")] + pub initial_margin_ratio: ::prost::alloc::string::String, + /// maintenance_margin_ratio defines the maintenance margin ratio for the + /// derivative market + #[prost(string, tag = "11")] + pub maintenance_margin_ratio: ::prost::alloc::string::String, + /// maker_fee_rate defines the exchange trade fee for makers for the derivative + /// market + #[prost(string, tag = "12")] + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the exchange trade fee for takers for the derivative + /// market + #[prost(string, tag = "13")] + pub taker_fee_rate: ::prost::alloc::string::String, + /// min_price_tick_size defines the minimum tick size of the order's price and + /// margin + #[prost(string, tag = "14")] + pub min_price_tick_size: ::prost::alloc::string::String, + /// min_quantity_tick_size defines the minimum tick size of the order's + /// quantity + #[prost(string, tag = "15")] + pub min_quantity_tick_size: ::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 = "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket")] -pub struct MsgAdminUpdateBinaryOptionsMarket { +#[proto_message(type_url = "/injective.exchange.v1beta1.DerivativeMarketParamUpdateProposal")] +pub struct DerivativeMarketParamUpdateProposal { #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, + pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag = "3")] #[serde(alias = "marketID")] pub market_id: ::prost::alloc::string::String, - /// new price at which market will be settled - #[prost(string, tag = "3")] - pub settlement_price: ::prost::alloc::string::String, - /// expiration timestamp - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub expiration_timestamp: i64, - /// expiration timestamp - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub settlement_timestamp: i64, - /// Status of the market - #[prost(enumeration = "MarketStatus", tag = "6")] + /// initial_margin_ratio defines the initial margin ratio for the derivative + /// market + #[prost(string, tag = "4")] + pub initial_margin_ratio: ::prost::alloc::string::String, + /// maintenance_margin_ratio defines the maintenance margin ratio for the + /// derivative market + #[prost(string, tag = "5")] + pub maintenance_margin_ratio: ::prost::alloc::string::String, + /// maker_fee_rate defines the exchange trade fee for makers for the derivative + /// market + #[prost(string, tag = "6")] + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the exchange trade fee for takers for the derivative + /// market + #[prost(string, tag = "7")] + pub taker_fee_rate: ::prost::alloc::string::String, + /// relayer_fee_share_rate defines the relayer fee share rate for the + /// derivative market + #[prost(string, tag = "8")] + pub relayer_fee_share_rate: ::prost::alloc::string::String, + /// min_price_tick_size defines the minimum tick size of the order's price and + /// margin + #[prost(string, tag = "9")] + pub min_price_tick_size: ::prost::alloc::string::String, + /// min_quantity_tick_size defines the minimum tick size of the order's + /// quantity + #[prost(string, tag = "10")] + pub min_quantity_tick_size: ::prost::alloc::string::String, + /// hourly_interest_rate defines the hourly interest rate + #[prost(string, tag = "11")] + pub hourly_interest_rate: ::prost::alloc::string::String, + /// hourly_funding_rate_cap defines the maximum absolute value of the hourly + /// funding rate + #[prost(string, tag = "12")] + pub hourly_funding_rate_cap: ::prost::alloc::string::String, + #[prost(enumeration = "MarketStatus", tag = "13")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] pub status: i32, + #[prost(message, optional, tag = "14")] + pub oracle_params: ::core::option::Option, } -/// MsgAdminUpdateBinaryOptionsMarketResponse is the response for -/// AdminUpdateBinaryOptionsMarket 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 = "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarketResponse")] -pub struct MsgAdminUpdateBinaryOptionsMarketResponse {} -/// AtomicMarketOrderFeeMultiplierScheduleProposal defines a SDK message for -/// proposing new atomic take fee multipliers for specified markets #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.AtomicMarketOrderFeeMultiplierScheduleProposal")] -pub struct AtomicMarketOrderFeeMultiplierScheduleProposal { +#[proto_message(type_url = "/injective.exchange.v1beta1.MarketForcedSettlementProposal")] +pub struct MarketForcedSettlementProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub market_fee_multipliers: ::prost::alloc::vec::Vec, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ExchangeType { - ExchangeUnspecified = 0, - Spot = 1, - Derivatives = 2, -} -impl ExchangeType { - /// 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 { - ExchangeType::ExchangeUnspecified => "EXCHANGE_UNSPECIFIED", - ExchangeType::Spot => "SPOT", - ExchangeType::Derivatives => "DERIVATIVES", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "EXCHANGE_UNSPECIFIED" => Some(Self::ExchangeUnspecified), - "SPOT" => Some(Self::Spot), - "DERIVATIVES" => Some(Self::Derivatives), - _ => None, - } - } + #[prost(string, tag = "3")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub settlement_price: ::prost::alloc::string::String, } -/// GenesisState defines the exchange 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 = "/injective.exchange.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines all the parameters of related to exchange. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// spot_markets is an array containing the genesis trade pairs - #[prost(message, repeated, tag = "2")] - pub spot_markets: ::prost::alloc::vec::Vec, - /// derivative_markets is an array containing the genesis derivative markets +#[proto_message(type_url = "/injective.exchange.v1beta1.UpdateDenomDecimalsProposal")] +pub struct UpdateDenomDecimalsProposal { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, #[prost(message, repeated, tag = "3")] - pub derivative_markets: ::prost::alloc::vec::Vec, - /// spot_orderbook defines the spot exchange limit orderbook active at genesis. - #[prost(message, repeated, tag = "4")] - pub spot_orderbook: ::prost::alloc::vec::Vec, - /// derivative_orderbook defines the derivative exchange limit orderbook active - /// at genesis. - #[prost(message, repeated, tag = "5")] - pub derivative_orderbook: ::prost::alloc::vec::Vec, - /// balances defines the exchange users balances active at genesis. - #[prost(message, repeated, tag = "6")] - pub balances: ::prost::alloc::vec::Vec, - /// positions defines the exchange derivative positions at genesis - #[prost(message, repeated, tag = "7")] - pub positions: ::prost::alloc::vec::Vec, - /// subaccount_trade_nonces defines the subaccount trade nonces for the - /// subaccounts at genesis - #[prost(message, repeated, tag = "8")] - pub subaccount_trade_nonces: ::prost::alloc::vec::Vec, - /// expiry_futures_market_info defines the market info for the expiry futures - /// markets at genesis - #[prost(message, repeated, tag = "9")] - pub expiry_futures_market_info_state: ::prost::alloc::vec::Vec, - /// perpetual_market_info defines the market info for the perpetual derivative - /// markets at genesis - #[prost(message, repeated, tag = "10")] - pub perpetual_market_info: ::prost::alloc::vec::Vec, - /// perpetual_market_funding_state defines the funding state for the perpetual - /// derivative markets at genesis - #[prost(message, repeated, tag = "11")] - pub perpetual_market_funding_state: ::prost::alloc::vec::Vec, - /// derivative_market_settlement_scheduled defines the scheduled markets for - /// settlement at genesis - #[prost(message, repeated, tag = "12")] - pub derivative_market_settlement_scheduled: ::prost::alloc::vec::Vec, - /// sets spot markets as enabled - #[prost(bool, tag = "13")] - pub is_spot_exchange_enabled: bool, - /// sets derivative markets as enabled - #[prost(bool, tag = "14")] - pub is_derivatives_exchange_enabled: bool, - /// the current trading reward campaign info - #[prost(message, optional, tag = "15")] - pub trading_reward_campaign_info: ::core::option::Option, - /// the current and upcoming trading reward campaign pools - #[prost(message, repeated, tag = "16")] - pub trading_reward_pool_campaign_schedule: ::prost::alloc::vec::Vec, - /// the current trading reward account points - #[prost(message, repeated, tag = "17")] - pub trading_reward_campaign_account_points: ::prost::alloc::vec::Vec, - /// the fee discount schedule - #[prost(message, optional, tag = "18")] - pub fee_discount_schedule: ::core::option::Option, - /// the cached fee discount account tiers with TTL - #[prost(message, repeated, tag = "19")] - pub fee_discount_account_tier_ttl: ::prost::alloc::vec::Vec, - /// the fee discount paid by accounts in all buckets - #[prost(message, repeated, tag = "20")] - pub fee_discount_bucket_volume_accounts: ::prost::alloc::vec::Vec, - /// sets the first fee cycle as finished - #[prost(bool, tag = "21")] - pub is_first_fee_cycle_finished: bool, - /// the current and upcoming trading reward campaign pending pools - #[prost(message, repeated, tag = "22")] - pub pending_trading_reward_pool_campaign_schedule: ::prost::alloc::vec::Vec, - /// the pending trading reward account points - #[prost(message, repeated, tag = "23")] - pub pending_trading_reward_campaign_account_points: ::prost::alloc::vec::Vec, - /// the addresses opting out of trading rewards - #[prost(string, repeated, tag = "24")] - pub rewards_opt_out_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, repeated, tag = "25")] - pub historical_trade_records: ::prost::alloc::vec::Vec, - /// binary_options_markets is an array containing the genesis binary options - /// markets - #[prost(message, repeated, tag = "26")] - pub binary_options_markets: ::prost::alloc::vec::Vec, - /// binary_options_markets_scheduled_for_settlement contains the marketIDs of - /// binary options markets scheduled for next-block settlement - #[prost(string, repeated, tag = "27")] - #[serde(alias = "binary_options_marketIDs_scheduled_for_settlement")] - pub binary_options_market_ids_scheduled_for_settlement: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// spot_market_ids_scheduled_to_force_close defines the scheduled markets for - /// forced closings at genesis - #[prost(string, repeated, tag = "28")] - #[serde(alias = "spot_marketIDs_scheduled_to_force_close")] - pub spot_market_ids_scheduled_to_force_close: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// denom_decimals defines the denom decimals for the exchange. - #[prost(message, repeated, tag = "29")] pub denom_decimals: ::prost::alloc::vec::Vec, - /// conditional_derivative_orderbook contains conditional orderbooks for all - /// markets (both lmit and market conditional orders) - #[prost(message, repeated, tag = "30")] - pub conditional_derivative_orderbooks: ::prost::alloc::vec::Vec, - /// market_fee_multipliers contains any non-default atomic order fee - /// multipliers - #[prost(message, repeated, tag = "31")] - pub market_fee_multipliers: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "32")] - pub orderbook_sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "33")] - pub subaccount_volumes: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "34")] - pub market_volumes: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.OrderbookSequence")] -pub struct OrderbookSequence { - #[prost(uint64, tag = "1")] +#[proto_message(type_url = "/injective.exchange.v1beta1.BinaryOptionsMarketParamUpdateProposal")] +pub struct BinaryOptionsMarketParamUpdateProposal { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + /// maker_fee_rate defines the exchange trade fee for makers for the derivative + /// market + #[prost(string, tag = "4")] + pub maker_fee_rate: ::prost::alloc::string::String, + /// taker_fee_rate defines the exchange trade fee for takers for the derivative + /// market + #[prost(string, tag = "5")] + pub taker_fee_rate: ::prost::alloc::string::String, + /// relayer_fee_share_rate defines the relayer fee share rate for the + /// derivative market + #[prost(string, tag = "6")] + pub relayer_fee_share_rate: ::prost::alloc::string::String, + /// min_price_tick_size defines the minimum tick size of the order's price and + /// margin + #[prost(string, tag = "7")] + pub min_price_tick_size: ::prost::alloc::string::String, + /// min_quantity_tick_size defines the minimum tick size of the order's + /// quantity + #[prost(string, tag = "8")] + pub min_quantity_tick_size: ::prost::alloc::string::String, + /// expiration timestamp + #[prost(int64, tag = "9")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub sequence: u64, - #[prost(string, tag = "2")] - #[serde(alias = "marketID")] - pub market_id: ::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 = "/injective.exchange.v1beta1.FeeDiscountAccountTierTTL")] -pub struct FeeDiscountAccountTierTtl { - #[prost(string, tag = "1")] - pub account: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub tier_ttl: ::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 = "/injective.exchange.v1beta1.FeeDiscountBucketVolumeAccounts")] -pub struct FeeDiscountBucketVolumeAccounts { - #[prost(int64, tag = "1")] + pub expiration_timestamp: i64, + /// expiration timestamp + #[prost(int64, tag = "10")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub bucket_start_timestamp: i64, - #[prost(message, repeated, tag = "2")] - pub account_volume: ::prost::alloc::vec::Vec, + pub settlement_timestamp: i64, + /// new price at which market will be settled + #[prost(string, tag = "11")] + pub settlement_price: ::prost::alloc::string::String, + /// admin of the market + #[prost(string, tag = "12")] + pub admin: ::prost::alloc::string::String, + #[prost(enumeration = "MarketStatus", tag = "13")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub status: i32, + #[prost(message, optional, tag = "14")] + pub oracle_params: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.AccountVolume")] -pub struct AccountVolume { +#[proto_message(type_url = "/injective.exchange.v1beta1.ProviderOracleParams")] +pub struct ProviderOracleParams { + /// Oracle base currency #[prost(string, tag = "1")] - pub account: ::prost::alloc::string::String, + pub symbol: ::prost::alloc::string::String, + /// Oracle quote currency #[prost(string, tag = "2")] - pub volume: ::prost::alloc::string::String, + pub provider: ::prost::alloc::string::String, + /// Scale factor for oracle prices. + #[prost(uint32, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub oracle_scale_factor: u32, + /// Oracle type + #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "4")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub oracle_type: i32, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.TradingRewardCampaignAccountPoints")] -pub struct TradingRewardCampaignAccountPoints { +#[proto_message(type_url = "/injective.exchange.v1beta1.OracleParams")] +pub struct OracleParams { + /// Oracle base currency #[prost(string, tag = "1")] - pub account: ::prost::alloc::string::String, + pub oracle_base: ::prost::alloc::string::String, + /// Oracle quote currency #[prost(string, tag = "2")] - pub points: ::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 = "/injective.exchange.v1beta1.TradingRewardCampaignAccountPendingPoints")] -pub struct TradingRewardCampaignAccountPendingPoints { - #[prost(int64, tag = "1")] + pub oracle_quote: ::prost::alloc::string::String, + /// Scale factor for oracle prices. + #[prost(uint32, tag = "3")] #[serde( serialize_with = "crate::serde::as_str::serialize", deserialize_with = "crate::serde::as_str::deserialize" )] - pub reward_pool_start_timestamp: i64, - #[prost(message, repeated, tag = "2")] - pub account_points: ::prost::alloc::vec::Vec, + pub oracle_scale_factor: u32, + /// Oracle type + #[prost(enumeration = "super::super::oracle::v1beta1::OracleType", tag = "4")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub oracle_type: i32, } -/// Spot Exchange Limit Orderbook #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.SpotOrderBook")] -pub struct SpotOrderBook { +#[proto_message(type_url = "/injective.exchange.v1beta1.TradingRewardCampaignLaunchProposal")] +pub struct TradingRewardCampaignLaunchProposal { #[prost(string, tag = "1")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - #[prost(bool, tag = "2")] - pub is_buy_side: bool, - #[prost(message, repeated, tag = "3")] - pub orders: ::prost::alloc::vec::Vec, + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub campaign_info: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub campaign_reward_pools: ::prost::alloc::vec::Vec, } -/// Derivative Exchange Limit Orderbook #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.DerivativeOrderBook")] -pub struct DerivativeOrderBook { +#[proto_message(type_url = "/injective.exchange.v1beta1.TradingRewardCampaignUpdateProposal")] +pub struct TradingRewardCampaignUpdateProposal { #[prost(string, tag = "1")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - #[prost(bool, tag = "2")] - pub is_buy_side: bool, - #[prost(message, repeated, tag = "3")] - pub orders: ::prost::alloc::vec::Vec, + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub campaign_info: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub campaign_reward_pools_additions: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub campaign_reward_pools_updates: ::prost::alloc::vec::Vec, } -/// Orderbook containing limit & market conditional orders #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.ConditionalDerivativeOrderBook")] -pub struct ConditionalDerivativeOrderBook { +#[proto_message(type_url = "/injective.exchange.v1beta1.RewardPointUpdate")] +pub struct RewardPointUpdate { #[prost(string, tag = "1")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub limit_buy_orders: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub market_buy_orders: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub limit_sell_orders: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub market_sell_orders: ::prost::alloc::vec::Vec, + pub account_address: ::prost::alloc::string::String, + /// new_points overwrites the current trading reward points for the account + #[prost(string, tag = "12")] + pub new_points: ::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 = "/injective.exchange.v1beta1.Balance")] -pub struct Balance { +#[proto_message(type_url = "/injective.exchange.v1beta1.TradingRewardPendingPointsUpdateProposal")] +pub struct TradingRewardPendingPointsUpdateProposal { #[prost(string, tag = "1")] - #[serde(alias = "subaccountID")] - pub subaccount_id: ::prost::alloc::string::String, + pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub deposits: ::core::option::Option, + pub description: ::prost::alloc::string::String, + #[prost(int64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub pending_pool_timestamp: i64, + #[prost(message, repeated, tag = "4")] + pub reward_point_updates: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.DerivativePosition")] -pub struct DerivativePosition { +#[proto_message(type_url = "/injective.exchange.v1beta1.FeeDiscountProposal")] +pub struct FeeDiscountProposal { #[prost(string, tag = "1")] - #[serde(alias = "subaccountID")] - pub subaccount_id: ::prost::alloc::string::String, + pub title: ::prost::alloc::string::String, #[prost(string, tag = "2")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, + pub description: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub position: ::core::option::Option, + pub schedule: ::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 = "/injective.exchange.v1beta1.SubaccountNonce")] -pub struct SubaccountNonce { +#[proto_message(type_url = "/injective.exchange.v1beta1.BatchCommunityPoolSpendProposal")] +pub struct BatchCommunityPoolSpendProposal { #[prost(string, tag = "1")] - #[serde(alias = "subaccountID")] - pub subaccount_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub subaccount_trade_nonce: ::core::option::Option, + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub proposals: ::prost::alloc::vec::Vec, } +/// AtomicMarketOrderFeeMultiplierScheduleProposal defines a SDK message for +/// proposing new atomic take fee multipliers for specified markets #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.ExpiryFuturesMarketInfoState")] -pub struct ExpiryFuturesMarketInfoState { +#[proto_message(type_url = "/injective.exchange.v1beta1.AtomicMarketOrderFeeMultiplierScheduleProposal")] +pub struct AtomicMarketOrderFeeMultiplierScheduleProposal { #[prost(string, tag = "1")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub market_info: ::core::option::Option, + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub market_fee_multipliers: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.exchange.v1beta1.PerpetualMarketFundingState")] -pub struct PerpetualMarketFundingState { - #[prost(string, tag = "1")] - #[serde(alias = "marketID")] - pub market_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub funding: ::core::option::Option, +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] +pub enum ExchangeType { + ExchangeUnspecified = 0, + Spot = 1, + Derivatives = 2, +} +impl ExchangeType { + /// 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 { + ExchangeType::ExchangeUnspecified => "EXCHANGE_UNSPECIFIED", + ExchangeType::Spot => "SPOT", + ExchangeType::Derivatives => "DERIVATIVES", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "EXCHANGE_UNSPECIFIED" => Some(Self::ExchangeUnspecified), + "SPOT" => Some(Self::Spot), + "DERIVATIVES" => Some(Self::Derivatives), + _ => None, + } + } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] @@ -4418,7 +4462,7 @@ pub struct FullDerivativeMarket { } /// Nested message and enum types in `FullDerivativeMarket`. pub mod full_derivative_market { - // use osmosis_std_derive::CosmwasmExt; + use osmosis_std_derive::CosmwasmExt; #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Oneof, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] pub enum Info { @@ -5021,7 +5065,8 @@ pub struct MitoVaultInfosResponse { #[prost(string, repeated, tag = "4")] pub cw20_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -/// QueryMarketIDFromVaultRequest is the request type for the Query/QueryMarketIDFromVault RPC method. +/// QueryMarketIDFromVaultRequest is the request type for the +/// Query/QueryMarketIDFromVault 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 = "/injective.exchange.v1beta1.QueryMarketIDFromVaultRequest")] @@ -5075,8 +5120,9 @@ pub struct TradeHistoryOptions { deserialize_with = "crate::serde::as_str::deserialize" )] pub trade_grouping_sec: u64, - /// MaxAge restricts the trade records oldest age in seconds from the current block time to consider. - /// A value of 0 means use all the records present on the chain. + /// MaxAge restricts the trade records oldest age in seconds from the current + /// block time to consider. A value of 0 means use all the records present on + /// the chain. #[prost(uint64, tag = "2")] #[serde( serialize_with = "crate::serde::as_str::serialize", diff --git a/packages/injective-std/src/types/injective/insurance/v1beta1.rs b/packages/injective-std/src/types/injective/insurance/v1beta1.rs index a74d980e..69278333 100644 --- a/packages/injective-std/src/types/injective/insurance/v1beta1.rs +++ b/packages/injective-std/src/types/injective/insurance/v1beta1.rs @@ -130,6 +130,18 @@ pub struct EventUnderwrite { #[prost(message, optional, tag = "4")] pub shares: ::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 = "/injective.insurance.v1beta1.EventInsuranceWithdraw")] +pub struct EventInsuranceWithdraw { + #[prost(string, tag = "1")] + #[serde(alias = "marketID")] + pub market_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub market_ticker: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub withdrawal: ::core::option::Option, +} /// GenesisState defines the insurance module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] diff --git a/packages/injective-std/src/types/injective/mod.rs b/packages/injective-std/src/types/injective/mod.rs index 83cad2cc..4f14c640 100644 --- a/packages/injective-std/src/types/injective/mod.rs +++ b/packages/injective-std/src/types/injective/mod.rs @@ -1,3 +1,4 @@ +pub mod auction; pub mod exchange; pub mod insurance; pub mod oracle; diff --git a/packages/injective-std/src/types/injective/oracle/v1beta1.rs b/packages/injective-std/src/types/injective/oracle/v1beta1.rs index 1778594c..53cc832b 100644 --- a/packages/injective-std/src/types/injective/oracle/v1beta1.rs +++ b/packages/injective-std/src/types/injective/oracle/v1beta1.rs @@ -18,12 +18,6 @@ pub struct OracleInfo { deserialize_with = "crate::serde::as_str::deserialize" )] pub oracle_type: i32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub scale_factor: u32, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] diff --git a/packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs b/packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs index 500803e7..aeabd525 100644 --- a/packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs +++ b/packages/injective-std/src/types/injective/tokenfactory/v1beta1.rs @@ -30,8 +30,8 @@ pub struct EventMintTfDenom { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -#[proto_message(type_url = "/injective.tokenfactory.v1beta1.EventBurnTFDenom")] -pub struct EventBurnTfDenom { +#[proto_message(type_url = "/injective.tokenfactory.v1beta1.EventBurnDenom")] +pub struct EventBurnDenom { #[prost(string, tag = "1")] pub burner_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] @@ -85,6 +85,10 @@ pub struct GenesisDenom { pub denom: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] pub authority_metadata: ::core::option::Option, + #[prost(string, tag = "3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub symbol: ::prost::alloc::string::String, } /// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] @@ -187,6 +191,10 @@ pub struct MsgCreateDenom { /// subdenom can be up to 44 "alphanumeric" characters long. #[prost(string, tag = "2")] pub subdenom: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub name: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub symbol: ::prost::alloc::string::String, } /// MsgCreateDenomResponse is the return value of MsgCreateDenom /// It returns the full string of the newly created denom diff --git a/packages/injective-std/src/types/injective/wasmx/v1.rs b/packages/injective-std/src/types/injective/wasmx/v1.rs index 22b0fb16..070f767d 100644 --- a/packages/injective-std/src/types/injective/wasmx/v1.rs +++ b/packages/injective-std/src/types/injective/wasmx/v1.rs @@ -84,17 +84,17 @@ pub struct ContractRegistrationRequest { )] pub funding_mode: i32, } -// #[allow(clippy::derive_partial_eq_without_eq)] -// #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] -// #[proto_message(type_url = "/injective.wasmx.v1.BatchStoreCodeProposal")] -// pub struct BatchStoreCodeProposal { -// #[prost(string, tag = "1")] -// pub title: ::prost::alloc::string::String, -// #[prost(string, tag = "2")] -// pub description: ::prost::alloc::string::String, -// #[prost(message, repeated, tag = "3")] -// pub proposals: ::prost::alloc::vec::Vec, -// } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.wasmx.v1.BatchStoreCodeProposal")] +pub struct BatchStoreCodeProposal { + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub proposals: ::prost::alloc::vec::Vec, +} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] @@ -215,7 +215,50 @@ pub struct EventContractExecution { #[prost(bytes = "vec", tag = "2")] pub response: ::prost::alloc::vec::Vec, #[prost(string, tag = "3")] - pub error: ::prost::alloc::string::String, + pub other_error: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub execution_error: ::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 = "/injective.wasmx.v1.EventContractRegistered")] +pub struct EventContractRegistered { + #[prost(string, tag = "1")] + pub contract_address: ::prost::alloc::string::String, + #[prost(uint64, tag = "3")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub gas_price: u64, + #[prost(bool, tag = "4")] + pub should_pin_contract: bool, + #[prost(bool, tag = "5")] + pub is_migration_allowed: bool, + #[prost(uint64, tag = "6")] + #[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 = "7")] + pub admin_address: ::prost::alloc::string::String, + #[prost(string, tag = "8")] + pub granter_address: ::prost::alloc::string::String, + #[prost(enumeration = "FundingMode", tag = "9")] + #[serde( + serialize_with = "crate::serde::as_str::serialize", + deserialize_with = "crate::serde::as_str::deserialize" + )] + pub funding_mode: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] +#[proto_message(type_url = "/injective.wasmx.v1.EventContractDeregistered")] +pub struct EventContractDeregistered { + #[prost(string, tag = "1")] + pub contract_address: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, Eq, ::prost::Message, ::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] diff --git a/packages/injective-std/src/types/mod.rs b/packages/injective-std/src/types/mod.rs index 8760339a..474d762c 100644 --- a/packages/injective-std/src/types/mod.rs +++ b/packages/injective-std/src/types/mod.rs @@ -1,2 +1,3 @@ pub mod cosmos; +pub mod cosmwasm; pub mod injective;