From 97db92cfb421ecae3f97135642a29e4f9447b874 Mon Sep 17 00:00:00 2001 From: Adi Seredinschi Date: Fri, 2 Feb 2024 15:11:40 +0100 Subject: [PATCH 01/11] First stab at migrating to CometBFT-rs --- Cargo.toml | 6 +++--- src/lib.rs | 2 +- src/prost/cosmos.base.abci.v1beta1.rs | 4 ++-- src/prost/cosmos.base.tendermint.v1beta1.rs | 20 +++++++++---------- src/prost/cosmos.staking.v1beta1.rs | 4 ++-- src/prost/cosmos.tx.v1beta1.rs | 4 ++-- src/prost/ibc.lightclients.tendermint.v1.rs | 6 +++--- .../interchain_security.ccv.provider.v1.rs | 6 +++--- src/prost/interchain_security.ccv.v1.rs | 8 ++++---- src/prost/stride.interchainquery.v1.rs | 2 +- tools/proto-compiler/src/cmd/compile.rs | 2 +- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 48126dd3..bf963c9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" repository = "https://github.com/cosmos/ibc-proto-rs" readme = "README.md" categories = ["cryptography::cryptocurrencies", "encoding", "no-std"] -keywords = ["blockchain", "cosmos", "tendermint", "ibc", "proto"] +keywords = ["blockchain", "cosmos", "interchain", "ibc", "proto"] exclude = ["definitions", "tools", ".changelog", ".github"] description = """ ibc-proto provides Cosmos SDK & IBC Protocol Buffers definitions @@ -47,8 +47,8 @@ scale-info = { version = "2.1.2", default-features = false, features = [ ## For borsh encode or decode, needs to track `anchor-lang` and `near-sdk-rs` borsh version borsh = { version = "0.10", default-features = false, optional = true } -[dependencies.tendermint-proto] -version = "0.34" +[dependencies.cometbft-proto] +version = "0.1.0-alpha.2" default-features = false [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index 5f2843a5..61a186a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,7 @@ pub mod google; -pub use tendermint_proto::Protobuf; +pub use cometbft_proto::Protobuf; extern crate alloc; diff --git a/src/prost/cosmos.base.abci.v1beta1.rs b/src/prost/cosmos.base.abci.v1beta1.rs index fbf5862f..2d69420e 100644 --- a/src/prost/cosmos.base.abci.v1beta1.rs +++ b/src/prost/cosmos.base.abci.v1beta1.rs @@ -49,7 +49,7 @@ pub struct TxResponse { /// /// Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 #[prost(message, repeated, tag = "13")] - pub events: ::prost::alloc::vec::Vec<::tendermint_proto::abci::Event>, + pub events: ::prost::alloc::vec::Vec<::cometbft_proto::abci::Event>, } impl ::prost::Name for TxResponse { const NAME: &'static str = "TxResponse"; @@ -147,7 +147,7 @@ pub struct Result { /// Events contains a slice of Event objects that were emitted during message /// or handler execution. #[prost(message, repeated, tag = "3")] - pub events: ::prost::alloc::vec::Vec<::tendermint_proto::abci::Event>, + pub events: ::prost::alloc::vec::Vec<::cometbft_proto::abci::Event>, /// msg_responses contains the Msg handler responses type packed in Anys. /// /// Since: cosmos-sdk 0.46 diff --git a/src/prost/cosmos.base.tendermint.v1beta1.rs b/src/prost/cosmos.base.tendermint.v1beta1.rs index 82dd22d6..cfe28288 100644 --- a/src/prost/cosmos.base.tendermint.v1beta1.rs +++ b/src/prost/cosmos.base.tendermint.v1beta1.rs @@ -6,11 +6,11 @@ pub struct Block { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option<::tendermint_proto::types::Data>, + pub data: ::core::option::Option<::cometbft_proto::types::Data>, #[prost(message, optional, tag = "3")] - pub evidence: ::core::option::Option<::tendermint_proto::types::EvidenceList>, + pub evidence: ::core::option::Option<::cometbft_proto::types::EvidenceList>, #[prost(message, optional, tag = "4")] - pub last_commit: ::core::option::Option<::tendermint_proto::types::Commit>, + pub last_commit: ::core::option::Option<::cometbft_proto::types::Commit>, } impl ::prost::Name for Block { const NAME: &'static str = "Block"; @@ -25,7 +25,7 @@ impl ::prost::Name for Block { pub struct Header { /// basic block info #[prost(message, optional, tag = "1")] - pub version: ::core::option::Option<::tendermint_proto::version::Consensus>, + pub version: ::core::option::Option<::cometbft_proto::version::Consensus>, #[prost(string, tag = "2")] pub chain_id: ::prost::alloc::string::String, #[prost(int64, tag = "3")] @@ -36,7 +36,7 @@ pub struct Header { >, /// prev block info #[prost(message, optional, tag = "5")] - pub last_block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, + pub last_block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, /// hashes of block data /// /// commit from validators from the last block @@ -193,10 +193,10 @@ impl ::prost::Name for GetBlockByHeightRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockByHeightResponse { #[prost(message, optional, tag = "1")] - pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, + pub block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, /// Deprecated: please use `sdk_block` instead #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option<::tendermint_proto::types::Block>, + pub block: ::core::option::Option<::cometbft_proto::types::Block>, /// Since: cosmos-sdk 0.47 #[prost(message, optional, tag = "3")] pub sdk_block: ::core::option::Option, @@ -224,10 +224,10 @@ impl ::prost::Name for GetLatestBlockRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestBlockResponse { #[prost(message, optional, tag = "1")] - pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, + pub block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, /// Deprecated: please use `sdk_block` instead #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option<::tendermint_proto::types::Block>, + pub block: ::core::option::Option<::cometbft_proto::types::Block>, /// Since: cosmos-sdk 0.47 #[prost(message, optional, tag = "3")] pub sdk_block: ::core::option::Option, @@ -281,7 +281,7 @@ impl ::prost::Name for GetNodeInfoRequest { pub struct GetNodeInfoResponse { #[prost(message, optional, tag = "1")] pub default_node_info: ::core::option::Option< - ::tendermint_proto::p2p::DefaultNodeInfo, + ::cometbft_proto::p2p::DefaultNodeInfo, >, #[prost(message, optional, tag = "2")] pub application_version: ::core::option::Option, diff --git a/src/prost/cosmos.staking.v1beta1.rs b/src/prost/cosmos.staking.v1beta1.rs index 2c2c1b8d..be05ca17 100644 --- a/src/prost/cosmos.staking.v1beta1.rs +++ b/src/prost/cosmos.staking.v1beta1.rs @@ -6,7 +6,7 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct HistoricalInfo { #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option<::tendermint_proto::types::Header>, + pub header: ::core::option::Option<::cometbft_proto::types::Header>, #[prost(message, repeated, tag = "2")] pub valset: ::prost::alloc::vec::Vec, } @@ -477,7 +477,7 @@ impl ::prost::Name for Pool { #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorUpdates { #[prost(message, repeated, tag = "1")] - pub updates: ::prost::alloc::vec::Vec<::tendermint_proto::abci::ValidatorUpdate>, + pub updates: ::prost::alloc::vec::Vec<::cometbft_proto::abci::ValidatorUpdate>, } impl ::prost::Name for ValidatorUpdates { const NAME: &'static str = "ValidatorUpdates"; diff --git a/src/prost/cosmos.tx.v1beta1.rs b/src/prost/cosmos.tx.v1beta1.rs index 403722eb..1a4a46e7 100644 --- a/src/prost/cosmos.tx.v1beta1.rs +++ b/src/prost/cosmos.tx.v1beta1.rs @@ -587,9 +587,9 @@ pub struct GetBlockWithTxsResponse { #[prost(message, repeated, tag = "1")] pub txs: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>, + pub block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, #[prost(message, optional, tag = "3")] - pub block: ::core::option::Option<::tendermint_proto::types::Block>, + pub block: ::core::option::Option<::cometbft_proto::types::Block>, /// pagination defines a pagination for the response. #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option< diff --git a/src/prost/ibc.lightclients.tendermint.v1.rs b/src/prost/ibc.lightclients.tendermint.v1.rs index ff15fefe..751b07f3 100644 --- a/src/prost/ibc.lightclients.tendermint.v1.rs +++ b/src/prost/ibc.lightclients.tendermint.v1.rs @@ -125,16 +125,16 @@ impl ::prost::Name for Misbehaviour { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Header { #[prost(message, optional, tag = "1")] - pub signed_header: ::core::option::Option<::tendermint_proto::types::SignedHeader>, + pub signed_header: ::core::option::Option<::cometbft_proto::types::SignedHeader>, #[prost(message, optional, tag = "2")] - pub validator_set: ::core::option::Option<::tendermint_proto::types::ValidatorSet>, + pub validator_set: ::core::option::Option<::cometbft_proto::types::ValidatorSet>, #[prost(message, optional, tag = "3")] pub trusted_height: ::core::option::Option< super::super::super::core::client::v1::Height, >, #[prost(message, optional, tag = "4")] pub trusted_validators: ::core::option::Option< - ::tendermint_proto::types::ValidatorSet, + ::cometbft_proto::types::ValidatorSet, >, } impl ::prost::Name for Header { diff --git a/src/prost/interchain_security.ccv.provider.v1.rs b/src/prost/interchain_security.ccv.provider.v1.rs index f0561dee..c579b3cc 100644 --- a/src/prost/interchain_security.ccv.provider.v1.rs +++ b/src/prost/interchain_security.ccv.provider.v1.rs @@ -72,7 +72,7 @@ pub struct MsgSubmitConsumerDoubleVoting { /// an evidence of a validator that signed two conflicting votes #[prost(message, optional, tag = "2")] pub duplicate_vote_evidence: ::core::option::Option< - ::tendermint_proto::types::DuplicateVoteEvidence, + ::cometbft_proto::types::DuplicateVoteEvidence, >, /// The light client header of the infraction block #[prost(message, optional, tag = "3")] @@ -998,7 +998,7 @@ pub struct KeyAssignmentReplacement { #[prost(bytes = "vec", tag = "1")] pub provider_addr: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub prev_c_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>, + pub prev_c_key: ::core::option::Option<::cometbft_proto::crypto::PublicKey>, #[prost(int64, tag = "3")] pub power: i64, } @@ -1020,7 +1020,7 @@ pub struct ValidatorConsumerPubKey { #[prost(bytes = "vec", tag = "2")] pub provider_addr: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] - pub consumer_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>, + pub consumer_key: ::core::option::Option<::cometbft_proto::crypto::PublicKey>, } impl ::prost::Name for ValidatorConsumerPubKey { const NAME: &'static str = "ValidatorConsumerPubKey"; diff --git a/src/prost/interchain_security.ccv.v1.rs b/src/prost/interchain_security.ccv.v1.rs index c072c5f1..86721f42 100644 --- a/src/prost/interchain_security.ccv.v1.rs +++ b/src/prost/interchain_security.ccv.v1.rs @@ -8,7 +8,7 @@ pub struct ValidatorSetChangePacketData { #[prost(message, repeated, tag = "1")] pub validator_updates: ::prost::alloc::vec::Vec< - ::tendermint_proto::abci::ValidatorUpdate, + ::cometbft_proto::abci::ValidatorUpdate, >, #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -47,7 +47,7 @@ impl ::prost::Name for VscMaturedPacketData { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashPacketData { #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option<::tendermint_proto::abci::Validator>, + pub validator: ::core::option::Option<::cometbft_proto::abci::Validator>, /// map to the infraction block height on the provider #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -142,7 +142,7 @@ impl ::prost::Name for ConsumerPacketDataV1 { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashPacketDataV1 { #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option<::tendermint_proto::abci::Validator>, + pub validator: ::core::option::Option<::cometbft_proto::abci::Validator>, /// map to the infraction block height on the provider #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -340,7 +340,7 @@ pub struct ConsumerGenesisState { /// InitialValset filled in on new chain and on restart. #[prost(message, repeated, tag = "8")] pub initial_val_set: ::prost::alloc::vec::Vec< - ::tendermint_proto::abci::ValidatorUpdate, + ::cometbft_proto::abci::ValidatorUpdate, >, /// HeightToValsetUpdateId nil on new chain, filled in on restart. #[prost(message, repeated, tag = "9")] diff --git a/src/prost/stride.interchainquery.v1.rs b/src/prost/stride.interchainquery.v1.rs index b13204f6..5a81bfdd 100644 --- a/src/prost/stride.interchainquery.v1.rs +++ b/src/prost/stride.interchainquery.v1.rs @@ -9,7 +9,7 @@ pub struct MsgSubmitQueryResponse { #[prost(bytes = "vec", tag = "3")] pub result: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] - pub proof_ops: ::core::option::Option<::tendermint_proto::crypto::ProofOps>, + pub proof_ops: ::core::option::Option<::cometbft_proto::crypto::ProofOps>, #[prost(int64, tag = "5")] pub height: i64, #[prost(string, tag = "6")] diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index 4e021e14..e8e49422 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -147,7 +147,7 @@ impl CompileCmd { .server_mod_attribute(".", r#"#[cfg(feature = "server")]"#) .out_dir(out_dir) .file_descriptor_set_path(out_dir.join("proto_descriptor.bin")) - .extern_path(".tendermint", "::tendermint_proto") + .extern_path(".tendermint", "::cometbft_proto") .extern_path(".ics23", "::ics23") .type_attribute(".google.protobuf.Any", attrs_eq) .type_attribute(".google.protobuf.Any", attrs_jsonschema) From 331937291851b2f743d275882bbff04ea847880a Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Tue, 6 Feb 2024 12:20:56 +0200 Subject: [PATCH 02/11] proto-compiler: import CometBFT protos A work in progress to use the cometbft proto module from BSF instead of the tendermint.* protos in cosmos-sdk. --- scripts/sync-protobuf.sh | 18 +++++-- src/COMETBFT_COMMIT | 1 + tools/proto-compiler/src/cmd/compile.rs | 63 +++++++++++-------------- 3 files changed, 43 insertions(+), 39 deletions(-) create mode 100644 src/COMETBFT_COMMIT diff --git a/scripts/sync-protobuf.sh b/scripts/sync-protobuf.sh index 94ba2a03..94dfed8d 100755 --- a/scripts/sync-protobuf.sh +++ b/scripts/sync-protobuf.sh @@ -22,12 +22,14 @@ set -eou pipefail # repositories over and over again every time # the script is called. -CACHE_PATH="${XDG_CACHE_HOME:-$HOME/.cache}" -COSMOS_SDK_GIT="${COSMOS_SDK_GIT:-$CACHE_PATH/cosmos/cosmos-sdk.git}" +CACHE_PATH="${XDG_CACHE_HOME:-$HOME/.cache}"/ibc-proto-rs-build +COSMOS_SDK_GIT="${COSMOS_SDK_GIT:-$CACHE_PATH/cosmos-sdk.git}" IBC_GO_GIT="${IBC_GO_GIT:-$CACHE_PATH/ibc-go.git}" -COSMOS_ICS_GIT="${COSMOS_ICS_GIT:-$CACHE_PATH/cosmos/interchain-security.git}" -NFT_TRANSFER_GIT="${NFT_TRANSFER_GIT:-$CACHE_PATH/bianjieai/nft-transfer.git}" +COSMOS_ICS_GIT="${COSMOS_ICS_GIT:-$CACHE_PATH/interchain-security.git}" +NFT_TRANSFER_GIT="${NFT_TRANSFER_GIT:-$CACHE_PATH/nft-transfer.git}" +# A tag on buf.build/cometbft/cometbft must be named after the CometBFT commit +COMETBFT_COMMIT="$(cat src/COMETBFT_COMMIT)" COSMOS_SDK_COMMIT="$(cat src/COSMOS_SDK_COMMIT)" IBC_GO_COMMIT="$(cat src/IBC_GO_COMMIT)" INTERCHAIN_SECURITY_COMMIT="$(cat src/INTERCHAIN_SECURITY_COMMIT)" @@ -119,6 +121,12 @@ pushd "$NFT_TRANSFER_GIT" git fetch popd +COMETBFT_DIR=$(mktemp -d /tmp/cometbft-XXXXXXXX) + +pushd "$COMETBFT_DIR" +buf export -v -o . "buf.build/cometbft/cometbft:${COMETBFT_COMMIT}" +popd + # Create a new temporary directory to check out the # actual source files from the bare git repositories. # This is so that we do not accidentally use an unclean @@ -197,6 +205,7 @@ cargo build # and once for no-std version with --build-tonic set to false cargo run -- compile \ + --cmt "$COMETBFT_DIR" \ --ics "$COSMOS_ICS_DIR/proto-include" \ --sdk "$COSMOS_SDK_DIR/proto-include" \ --ibc "$IBC_GO_DIR/proto-include" \ @@ -217,6 +226,7 @@ rm -f src/prost/cosmos.base.store.v1beta1.rs rm -f src/prost/tendermint.abci.rs # Remove the temporary checkouts of the repositories +rm -rf "$COMETBFT_DIR" rm -rf "$COSMOS_ICS_DIR" rm -rf "$COSMOS_SDK_DIR" rm -rf "$IBC_GO_DIR" diff --git a/src/COMETBFT_COMMIT b/src/COMETBFT_COMMIT new file mode 100644 index 00000000..60c8a99d --- /dev/null +++ b/src/COMETBFT_COMMIT @@ -0,0 +1 @@ +76b1cce39127f6d22f8e61385522a25f52b5e6b3 diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index e8e49422..46064c7d 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -9,6 +9,10 @@ use argh::FromArgs; #[argh(subcommand, name = "compile")] /// Compile pub struct CompileCmd { + #[argh(option, short = 't')] + /// path to the CometBFT proto files + cmt: PathBuf, + #[argh(option, short = 'i')] /// path to the IBC-Go proto files ibc: PathBuf, @@ -32,13 +36,7 @@ pub struct CompileCmd { impl CompileCmd { pub fn run(&self) { - Self::compile_ibc_protos( - self.ibc.as_ref(), - self.sdk.as_ref(), - self.ics.as_ref(), - self.nft.as_ref(), - self.out.as_ref(), - ) + self.compile_ibc_protos() .unwrap_or_else(|e| { eprintln!("[error] failed to compile protos: {}", e); process::exit(1); @@ -57,16 +55,10 @@ impl CompileCmd { println!("[info ] Done!"); } - fn compile_ibc_protos( - ibc_dir: &Path, - sdk_dir: &Path, - ics_dir: &Path, - nft_dir: &Path, - out_dir: &Path, - ) -> Result<(), Box> { + fn compile_ibc_protos(&self) -> Result<(), Box> { println!( "[info ] Compiling IBC .proto files to Rust into '{}'...", - out_dir.display() + self.out.display() ); let root = env!("CARGO_MANIFEST_DIR"); @@ -76,26 +68,27 @@ impl CompileCmd { format!("{}/../../definitions/mock", root), format!("{}/../../definitions/ibc/lightclients/localhost/v1", root), format!("{}/../../definitions/stride/interchainquery/v1", root), - format!("{}/ibc", ibc_dir.display()), - format!("{}/cosmos/auth", sdk_dir.display()), - format!("{}/cosmos/gov", sdk_dir.display()), - format!("{}/cosmos/tx", sdk_dir.display()), - format!("{}/cosmos/base", sdk_dir.display()), - format!("{}/cosmos/crypto", sdk_dir.display()), - format!("{}/cosmos/bank", sdk_dir.display()), - format!("{}/cosmos/staking", sdk_dir.display()), - format!("{}/cosmos/upgrade", sdk_dir.display()), - format!("{}/interchain_security/ccv/v1", ics_dir.display()), - format!("{}/interchain_security/ccv/provider", ics_dir.display()), - format!("{}/interchain_security/ccv/consumer", ics_dir.display()), - format!("{}/ibc", nft_dir.display()), + format!("{}/ibc", self.ibc.display()), + format!("{}/cosmos/auth", self.sdk.display()), + format!("{}/cosmos/gov", self.sdk.display()), + format!("{}/cosmos/tx", self.sdk.display()), + format!("{}/cosmos/base", self.sdk.display()), + format!("{}/cosmos/crypto", self.sdk.display()), + format!("{}/cosmos/bank", self.sdk.display()), + format!("{}/cosmos/staking", self.sdk.display()), + format!("{}/cosmos/upgrade", self.sdk.display()), + format!("{}/interchain_security/ccv/v1", self.ics.display()), + format!("{}/interchain_security/ccv/provider", self.ics.display()), + format!("{}/interchain_security/ccv/consumer", self.ics.display()), + format!("{}/ibc", self.nft.display()), ]; let proto_includes_paths = [ - format!("{}", sdk_dir.display()), - format!("{}", ibc_dir.display()), - format!("{}", ics_dir.display()), - format!("{}", nft_dir.display()), + format!("{}", self.cmt.display()), + format!("{}", self.sdk.display()), + format!("{}", self.ibc.display()), + format!("{}", self.ics.display()), + format!("{}", self.nft.display()), format!("{}/../../definitions/mock", root), format!("{}/../../definitions/ibc/lightclients/localhost/v1", root), format!("{}/../../definitions/stride/interchainquery/v1", root), @@ -145,9 +138,9 @@ impl CompileCmd { .client_mod_attribute(".", r#"#[cfg(feature = "client")]"#) .build_server(true) .server_mod_attribute(".", r#"#[cfg(feature = "server")]"#) - .out_dir(out_dir) - .file_descriptor_set_path(out_dir.join("proto_descriptor.bin")) - .extern_path(".tendermint", "::cometbft_proto") + .out_dir(&self.out) + .file_descriptor_set_path(self.out.join("proto_descriptor.bin")) + .extern_path(".cometbft", "::cometbft_proto") .extern_path(".ics23", "::ics23") .type_attribute(".google.protobuf.Any", attrs_eq) .type_attribute(".google.protobuf.Any", attrs_jsonschema) From 3b38c40313a0cdc62b4431b30f15c73fdec15adb Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 7 Feb 2024 21:35:38 +0200 Subject: [PATCH 03/11] Switch to cometbft.crypto.v1 in stride.interchainquery.v1 --- definitions/stride/interchainquery/v1/messages.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/stride/interchainquery/v1/messages.proto b/definitions/stride/interchainquery/v1/messages.proto index 5b247b7b..76c494b9 100755 --- a/definitions/stride/interchainquery/v1/messages.proto +++ b/definitions/stride/interchainquery/v1/messages.proto @@ -4,7 +4,7 @@ package stride.interchainquery.v1; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "google/api/annotations.proto"; -import "tendermint/crypto/proof.proto"; +import "cometbft/crypto/v1/proof.proto"; option go_package = "github.com/Stride-Labs/stride/v3/x/interchainquery/types"; @@ -29,7 +29,7 @@ message MsgSubmitQueryResponse { string chain_id = 1 [ (gogoproto.moretags) = "yaml:\"chain_id\"" ]; string query_id = 2 [ (gogoproto.moretags) = "yaml:\"query_id\"" ]; bytes result = 3 [ (gogoproto.moretags) = "yaml:\"result\"" ]; - tendermint.crypto.ProofOps proof_ops = 4 + cometbft.crypto.v1.ProofOps proof_ops = 4 [ (gogoproto.moretags) = "yaml:\"proof_ops\"" ]; int64 height = 5 [ (gogoproto.moretags) = "yaml:\"height\"" ]; string from_address = 6 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; From 9dd1c3398f5e5c6cc13a947f581d52f4f490dcdb Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 14:40:07 +0200 Subject: [PATCH 04/11] Don't use cometbft checkout to build protos --- .../stride/interchainquery/v1/messages.proto | 4 ++-- scripts/sync-protobuf.sh | 18 ++++-------------- src/COMETBFT_COMMIT | 1 - tools/proto-compiler/src/cmd/compile.rs | 5 ----- 4 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 src/COMETBFT_COMMIT diff --git a/definitions/stride/interchainquery/v1/messages.proto b/definitions/stride/interchainquery/v1/messages.proto index 76c494b9..5b247b7b 100755 --- a/definitions/stride/interchainquery/v1/messages.proto +++ b/definitions/stride/interchainquery/v1/messages.proto @@ -4,7 +4,7 @@ package stride.interchainquery.v1; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "google/api/annotations.proto"; -import "cometbft/crypto/v1/proof.proto"; +import "tendermint/crypto/proof.proto"; option go_package = "github.com/Stride-Labs/stride/v3/x/interchainquery/types"; @@ -29,7 +29,7 @@ message MsgSubmitQueryResponse { string chain_id = 1 [ (gogoproto.moretags) = "yaml:\"chain_id\"" ]; string query_id = 2 [ (gogoproto.moretags) = "yaml:\"query_id\"" ]; bytes result = 3 [ (gogoproto.moretags) = "yaml:\"result\"" ]; - cometbft.crypto.v1.ProofOps proof_ops = 4 + tendermint.crypto.ProofOps proof_ops = 4 [ (gogoproto.moretags) = "yaml:\"proof_ops\"" ]; int64 height = 5 [ (gogoproto.moretags) = "yaml:\"height\"" ]; string from_address = 6 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; diff --git a/scripts/sync-protobuf.sh b/scripts/sync-protobuf.sh index 94dfed8d..39b1f91b 100755 --- a/scripts/sync-protobuf.sh +++ b/scripts/sync-protobuf.sh @@ -28,8 +28,6 @@ IBC_GO_GIT="${IBC_GO_GIT:-$CACHE_PATH/ibc-go.git}" COSMOS_ICS_GIT="${COSMOS_ICS_GIT:-$CACHE_PATH/interchain-security.git}" NFT_TRANSFER_GIT="${NFT_TRANSFER_GIT:-$CACHE_PATH/nft-transfer.git}" -# A tag on buf.build/cometbft/cometbft must be named after the CometBFT commit -COMETBFT_COMMIT="$(cat src/COMETBFT_COMMIT)" COSMOS_SDK_COMMIT="$(cat src/COSMOS_SDK_COMMIT)" IBC_GO_COMMIT="$(cat src/IBC_GO_COMMIT)" INTERCHAIN_SECURITY_COMMIT="$(cat src/INTERCHAIN_SECURITY_COMMIT)" @@ -121,12 +119,6 @@ pushd "$NFT_TRANSFER_GIT" git fetch popd -COMETBFT_DIR=$(mktemp -d /tmp/cometbft-XXXXXXXX) - -pushd "$COMETBFT_DIR" -buf export -v -o . "buf.build/cometbft/cometbft:${COMETBFT_COMMIT}" -popd - # Create a new temporary directory to check out the # actual source files from the bare git repositories. # This is so that we do not accidentally use an unclean @@ -205,7 +197,6 @@ cargo build # and once for no-std version with --build-tonic set to false cargo run -- compile \ - --cmt "$COMETBFT_DIR" \ --ics "$COSMOS_ICS_DIR/proto-include" \ --sdk "$COSMOS_SDK_DIR/proto-include" \ --ibc "$IBC_GO_DIR/proto-include" \ @@ -226,8 +217,7 @@ rm -f src/prost/cosmos.base.store.v1beta1.rs rm -f src/prost/tendermint.abci.rs # Remove the temporary checkouts of the repositories -rm -rf "$COMETBFT_DIR" -rm -rf "$COSMOS_ICS_DIR" -rm -rf "$COSMOS_SDK_DIR" -rm -rf "$IBC_GO_DIR" -rm -rf "$NFT_TRANSFER_DIR" +# rm -rf "$COSMOS_ICS_DIR" +# rm -rf "$COSMOS_SDK_DIR" +# rm -rf "$IBC_GO_DIR" +# rm -rf "$NFT_TRANSFER_DIR" diff --git a/src/COMETBFT_COMMIT b/src/COMETBFT_COMMIT deleted file mode 100644 index 60c8a99d..00000000 --- a/src/COMETBFT_COMMIT +++ /dev/null @@ -1 +0,0 @@ -76b1cce39127f6d22f8e61385522a25f52b5e6b3 diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index bd2beb69..d5685c3d 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -9,10 +9,6 @@ use argh::FromArgs; #[argh(subcommand, name = "compile")] /// Compile pub struct CompileCmd { - #[argh(option, short = 't')] - /// path to the CometBFT proto files - cmt: PathBuf, - #[argh(option, short = 'i')] /// path to the IBC-Go proto files ibc: PathBuf, @@ -84,7 +80,6 @@ impl CompileCmd { ]; let proto_includes_paths = [ - self.cmt.to_path_buf(), self.sdk.to_path_buf(), self.ibc.to_path_buf(), self.ics.to_path_buf(), From 562e8cded36282f7c33b2f11accd20315af9bc57 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 15:02:46 +0200 Subject: [PATCH 05/11] Remap tendermint.* protos to cometbft_proto modules --- tools/proto-compiler/src/cmd/compile.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index d5685c3d..fe445836 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -134,7 +134,8 @@ impl CompileCmd { .file_descriptor_set_path(self.out.join("proto_descriptor.bin")) // Use the v0.34 definition of `abci.Event` which does not enforce valid UTF-8 data // for its `key` and `value` attributes, specifying them as `bytes` instead of `string`. - // This is required, because ibc-go emits event attributes which are not valid UTF-8, + // This is required, because ibc-go emits event attributes which are not valid UTF-8 + // (sounds like a bug if it's up to CometBFT 0.38?), // so we need to use this definition to be able to parse them. // In Protobuf, `bytes` and `string` are wire-compatible, so doing this strictly // increases the amount fo data we can parse. @@ -142,7 +143,12 @@ impl CompileCmd { ".tendermint.abci.Event", "::cometbft_proto::abci::v1beta1::Event", ) - .extern_path(".cometbft", "::cometbft_proto") + // All other types should be up to CometBFT 0.38 + .extern_path(".tendermint.abci", "::cometbft_proto::abci::v1beta3") + .extern_path(".tendermint.crypto", "::cometbft_proto::crypto::v1") + .extern_path(".tendermint.p2p", "::cometbft_proto::p2p::v1") + .extern_path(".tendermint.types", "::cometbft_proto::types::v1") + .extern_path(".tendermint.version", "::cometbft_proto::version::v1") .extern_path(".ics23", "::ics23") .type_attribute(".google.protobuf.Any", attrs_eq) .type_attribute(".google.protobuf.Any", attrs_jsonschema) From 5bb2b45a0bb94398acd0ac0ca2553a7b0aae60bf Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 15:15:03 +0200 Subject: [PATCH 06/11] Update cosmos-sdk checkout to 0.50.4 This brings cosmos protos up to date with tendermint 0.38, which is the version included by the proto files from the ibc-go checkout. --- src/COSMOS_SDK_COMMIT | 2 +- src/prost/cosmos.app.v1alpha1.rs | 2 +- src/prost/cosmos.auth.v1beta1.rs | 722 +-- src/prost/cosmos.bank.module.v1.rs | 4 +- src/prost/cosmos.bank.v1beta1.rs | 2306 +++++---- src/prost/cosmos.bank.v1beta1.serde.rs | 417 ++ src/prost/cosmos.base.abci.v1beta1.rs | 30 + src/prost/cosmos.base.kv.v1beta1.rs | 30 - src/prost/cosmos.base.kv.v1beta1.serde.rs | 205 - src/prost/cosmos.base.node.v1beta1.rs | 118 + src/prost/cosmos.base.node.v1beta1.serde.rs | 302 ++ src/prost/cosmos.base.snapshots.v1beta1.rs | 184 - .../cosmos.base.snapshots.v1beta1.serde.rs | 1082 ----- src/prost/cosmos.base.store.v1beta1.serde.rs | 791 ---- src/prost/cosmos.base.tendermint.v1beta1.rs | 20 +- src/prost/cosmos.base.v1beta1.rs | 2 + src/prost/cosmos.crypto.ed25519.rs | 2 +- src/prost/cosmos.gov.v1.rs | 1698 ++++--- src/prost/cosmos.gov.v1.serde.rs | 585 +++ src/prost/cosmos.gov.v1beta1.rs | 1740 +++---- src/prost/cosmos.staking.module.v1.rs | 6 + src/prost/cosmos.staking.module.v1.serde.rs | 36 + src/prost/cosmos.staking.v1beta1.rs | 4106 +++++++++-------- src/prost/cosmos.staking.v1beta1.serde.rs | 20 + src/prost/cosmos.tx.signing.v1beta1.rs | 7 +- src/prost/cosmos.tx.v1beta1.rs | 42 +- src/prost/cosmos.upgrade.v1beta1.rs | 1156 ++--- src/prost/ibc.applications.fee.v1.rs | 2182 ++++----- ...tions.interchain_accounts.controller.v1.rs | 584 +-- ...pplications.interchain_accounts.host.v1.rs | 210 +- ...ibc.applications.interchain_accounts.v1.rs | 36 +- src/prost/ibc.applications.nft_transfer.v1.rs | 1250 ++--- src/prost/ibc.applications.transfer.v1.rs | 1856 ++++---- src/prost/ibc.core.channel.v1.rs | 3040 ++++++------ src/prost/ibc.core.client.v1.rs | 1676 +++---- src/prost/ibc.core.connection.v1.rs | 1230 ++--- src/prost/ibc.lightclients.tendermint.v1.rs | 6 +- src/prost/ibc.lightclients.wasm.v1.rs | 614 +-- .../interchain_security.ccv.provider.v1.rs | 2164 ++++----- src/prost/interchain_security.ccv.v1.rs | 8 +- src/prost/proto_descriptor.bin | Bin 740422 -> 752736 bytes src/prost/stride.interchainquery.v1.rs | 2 +- 42 files changed, 15145 insertions(+), 15328 deletions(-) delete mode 100644 src/prost/cosmos.base.kv.v1beta1.rs delete mode 100644 src/prost/cosmos.base.kv.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.snapshots.v1beta1.rs delete mode 100644 src/prost/cosmos.base.snapshots.v1beta1.serde.rs delete mode 100644 src/prost/cosmos.base.store.v1beta1.serde.rs diff --git a/src/COSMOS_SDK_COMMIT b/src/COSMOS_SDK_COMMIT index 1eef4d5b..eda5dd55 100644 --- a/src/COSMOS_SDK_COMMIT +++ b/src/COSMOS_SDK_COMMIT @@ -1 +1 @@ -2e9e5d6eea24d6c11eddc9c002c66e89ae036187 +7dbed2fc0c3ed7c285645e21cb1037d8810372ae diff --git a/src/prost/cosmos.app.v1alpha1.rs b/src/prost/cosmos.app.v1alpha1.rs index b70937bf..ec85bb0b 100644 --- a/src/prost/cosmos.app.v1alpha1.rs +++ b/src/prost/cosmos.app.v1alpha1.rs @@ -51,7 +51,7 @@ pub struct PackageReference { /// /// When a new version of a module is released and items are added to existing /// .proto files, these definitions should contain comments of the form - /// "Since Revision N" where N is an integer revision. + /// "Since: Revision N" where N is an integer revision. /// /// When the module runtime starts up, it will check the pinned proto /// image and panic if there are runtime protobuf definitions that are not diff --git a/src/prost/cosmos.auth.v1beta1.rs b/src/prost/cosmos.auth.v1beta1.rs index b6c3e8d7..ec42e6a6 100644 --- a/src/prost/cosmos.auth.v1beta1.rs +++ b/src/prost/cosmos.auth.v1beta1.rs @@ -81,345 +81,24 @@ impl ::prost::Name for Params { ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 +/// GenesisState defines the auth module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/auth parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] +pub struct GenesisState { + /// params defines all the parameters of the module. + #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, + /// accounts are the accounts present at genesis. + #[prost(message, repeated, tag = "2")] + pub accounts: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) - } -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "cosmos.auth.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the x/auth Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// UpdateParams defines a (governance) operation for updating the x/auth module - /// parameters. The authority defaults to the x/gov module account. - /// - /// Since: cosmos-sdk 0.47 - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.auth.v1beta1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.auth.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// UpdateParams defines a (governance) operation for updating the x/auth module - /// parameters. The authority defaults to the x/gov module account. - /// - /// Since: cosmos-sdk 0.47 - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Msg defines the x/auth Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl MsgServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for MsgServer - where - T: Msg, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/cosmos.auth.v1beta1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::update_params(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateParamsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "cosmos.auth.v1beta1.Msg"; - } -} /// QueryAccountsRequest is the request type for the Query/Accounts RPC method. /// /// Since: cosmos-sdk 0.43 @@ -1722,23 +1401,362 @@ pub mod query_server { } "/cosmos.auth.v1beta1.Query/AccountInfo" => { #[allow(non_camel_case_types)] - struct AccountInfoSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AccountInfoSvc { - type Response = super::QueryAccountInfoResponse; + struct AccountInfoSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for AccountInfoSvc { + type Response = super::QueryAccountInfoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::account_info(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = AccountInfoSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "cosmos.auth.v1beta1.Query"; + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/auth parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.auth.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the x/auth Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// UpdateParams defines a (governance) operation for updating the x/auth module + /// parameters. The authority defaults to the x/gov module account. + /// + /// Since: cosmos-sdk 0.47 + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.auth.v1beta1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.auth.v1beta1.Msg", "UpdateParams")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// UpdateParams defines a (governance) operation for updating the x/auth module + /// parameters. The authority defaults to the x/gov module account. + /// + /// Since: cosmos-sdk 0.47 + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the x/auth Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/cosmos.auth.v1beta1.Msg/UpdateParams" => { + #[allow(non_camel_case_types)] + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::account_info(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -1750,7 +1768,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = AccountInfoSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1781,7 +1799,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1793,7 +1811,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1803,25 +1821,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "cosmos.auth.v1beta1.Query"; - } -} -/// GenesisState defines the auth module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// accounts are the accounts present at genesis. - #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.auth.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.auth.v1beta1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "cosmos.auth.v1beta1.Msg"; } } diff --git a/src/prost/cosmos.bank.module.v1.rs b/src/prost/cosmos.bank.module.v1.rs index fe1abca4..68b298e6 100644 --- a/src/prost/cosmos.bank.module.v1.rs +++ b/src/prost/cosmos.bank.module.v1.rs @@ -2,8 +2,8 @@ #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Module { - /// blocked_module_accounts configures exceptional module accounts which should be blocked from receiving funds. - /// If left empty it defaults to the list of account names supplied in the auth module configuration as + /// blocked_module_accounts_override configures exceptional module accounts which should be blocked from receiving + /// funds. If left empty it defaults to the list of account names supplied in the auth module configuration as /// module_account_permissions #[prost(string, repeated, tag = "1")] pub blocked_module_accounts_override: ::prost::alloc::vec::Vec< diff --git a/src/prost/cosmos.bank.v1beta1.rs b/src/prost/cosmos.bank.v1beta1.rs index 842fd5c8..5488403c 100644 --- a/src/prost/cosmos.bank.v1beta1.rs +++ b/src/prost/cosmos.bank.v1beta1.rs @@ -1,3 +1,26 @@ +/// SendAuthorization allows the grantee to spend up to spend_limit coins from +/// the granter's account. +/// +/// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SendAuthorization { + #[prost(message, repeated, tag = "1")] + pub spend_limit: ::prost::alloc::vec::Vec, + /// allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the + /// granter. If omitted, any recipient is allowed. + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, repeated, tag = "2")] + pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for SendAuthorization { + const NAME: &'static str = "SendAuthorization"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} /// Params defines the parameters for the bank module. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -158,1072 +181,524 @@ impl ::prost::Name for Metadata { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgSend represents a message to send coins from one account to another. +/// GenesisState defines the bank module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSend { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, +pub struct GenesisState { + /// params defines all the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, + /// balances is an array containing the balances of all the accounts. + #[prost(message, repeated, tag = "2")] + pub balances: ::prost::alloc::vec::Vec, + /// supply represents the total supply. If it is left empty, then supply will be calculated based on the provided + /// balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, + pub supply: ::prost::alloc::vec::Vec, + /// denom_metadata defines the metadata of the different coins. + #[prost(message, repeated, tag = "4")] + pub denom_metadata: ::prost::alloc::vec::Vec, + /// send_enabled defines the denoms where send is enabled or disabled. + /// + /// Since: cosmos-sdk 0.47 + #[prost(message, repeated, tag = "5")] + pub send_enabled: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgSend { - const NAME: &'static str = "MsgSend"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgSendResponse defines the Msg/Send response type. +/// Balance defines an account address and balance pair used in the bank module's +/// genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendResponse {} -impl ::prost::Name for MsgSendResponse { - const NAME: &'static str = "MsgSendResponse"; +pub struct Balance { + /// address is the address of the balance holder. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// coins defines the different coins this balance holds. + #[prost(message, repeated, tag = "2")] + pub coins: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for Balance { + const NAME: &'static str = "Balance"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +/// QueryBalanceRequest is the request type for the Query/Balance RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSend { - /// Inputs, despite being `repeated`, only allows one sender input. This is - /// checked in MsgMultiSend's ValidateBasic. - #[prost(message, repeated, tag = "1")] - pub inputs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub outputs: ::prost::alloc::vec::Vec, +pub struct QueryBalanceRequest { + /// address is the address to query balances for. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// denom is the coin denom to query balances for. + #[prost(string, tag = "2")] + pub denom: ::prost::alloc::string::String, } -impl ::prost::Name for MsgMultiSend { - const NAME: &'static str = "MsgMultiSend"; +impl ::prost::Name for QueryBalanceRequest { + const NAME: &'static str = "QueryBalanceRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgMultiSendResponse defines the Msg/MultiSend response type. +/// QueryBalanceResponse is the response type for the Query/Balance RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMultiSendResponse {} -impl ::prost::Name for MsgMultiSendResponse { - const NAME: &'static str = "MsgMultiSendResponse"; +pub struct QueryBalanceResponse { + /// balance is the balance of the coin. + #[prost(message, optional, tag = "1")] + pub balance: ::core::option::Option, +} +impl ::prost::Name for QueryBalanceResponse { + const NAME: &'static str = "QueryBalanceResponse"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 +/// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). +pub struct QueryAllBalancesRequest { + /// address is the address to query balances for. #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/bank parameters to update. + pub address: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, + /// resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. /// - /// NOTE: All parameters must be supplied. + /// Since: cosmos-sdk 0.50 + #[prost(bool, tag = "3")] + pub resolve_denom: bool, +} +impl ::prost::Name for QueryAllBalancesRequest { + const NAME: &'static str = "QueryAllBalancesRequest"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAllBalancesResponse { + /// balances is the balances of all the coins. + #[prost(message, repeated, tag = "1")] + pub balances: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryAllBalancesResponse { + const NAME: &'static str = "QueryAllBalancesResponse"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. +/// QuerySpendableBalancesRequest defines the gRPC request structure for querying +/// an account's spendable balances. /// -/// Since: cosmos-sdk 0.47 +/// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QuerySpendableBalancesRequest { + /// address is the address to query spendable balances for. + #[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< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QuerySpendableBalancesRequest { + const NAME: &'static str = "QuerySpendableBalancesRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgSetSendEnabled is the Msg/SetSendEnabled request type. +/// QuerySpendableBalancesResponse defines the gRPC response structure for querying +/// an account's spendable balances. /// -/// Only entries to add/update/delete need to be included. -/// Existing SendEnabled entries that are not included in this -/// message are left unchanged. +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QuerySpendableBalancesResponse { + /// balances is the spendable balances of all the coins. + #[prost(message, repeated, tag = "1")] + pub balances: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QuerySpendableBalancesResponse { + const NAME: &'static str = "QuerySpendableBalancesResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// QuerySpendableBalanceByDenomRequest defines the gRPC request structure for +/// querying an account's spendable balance for a specific denom. /// /// Since: cosmos-sdk 0.47 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetSendEnabled { +pub struct QuerySpendableBalanceByDenomRequest { + /// address is the address to query balances for. #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// send_enabled is the list of entries to add or update. - #[prost(message, repeated, tag = "2")] - pub send_enabled: ::prost::alloc::vec::Vec, - /// use_default_for is a list of denoms that should use the params.default_send_enabled value. - /// Denoms listed here will have their SendEnabled entries deleted. - /// If a denom is included that doesn't have a SendEnabled entry, - /// it will be ignored. - #[prost(string, repeated, tag = "3")] - pub use_default_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + pub address: ::prost::alloc::string::String, + /// denom is the coin denom to query balances for. + #[prost(string, tag = "2")] + pub denom: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSetSendEnabled { - const NAME: &'static str = "MsgSetSendEnabled"; +impl ::prost::Name for QuerySpendableBalanceByDenomRequest { + const NAME: &'static str = "QuerySpendableBalanceByDenomRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. +/// QuerySpendableBalanceByDenomResponse defines the gRPC response structure for +/// querying an account's spendable balance for a specific denom. /// /// Since: cosmos-sdk 0.47 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSetSendEnabledResponse {} -impl ::prost::Name for MsgSetSendEnabledResponse { - const NAME: &'static str = "MsgSetSendEnabledResponse"; +pub struct QuerySpendableBalanceByDenomResponse { + /// balance is the balance of the coin. + #[prost(message, optional, tag = "1")] + pub balance: ::core::option::Option, +} +impl ::prost::Name for QuerySpendableBalanceByDenomResponse { + const NAME: &'static str = "QuerySpendableBalanceByDenomResponse"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the bank Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, +/// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalSupplyRequest { + /// pagination defines an optional pagination for the request. + /// + /// Since: cosmos-sdk 0.43 + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryTotalSupplyRequest { + const NAME: &'static str = "QueryTotalSupplyRequest"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } +} +/// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +/// method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalSupplyResponse { + /// supply is the supply of the coins + #[prost(message, repeated, tag = "1")] + pub supply: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + /// + /// Since: cosmos-sdk 0.43 + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryTotalSupplyResponse { + const NAME: &'static str = "QueryTotalSupplyResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// Send defines a method for sending coins from one account to another account. - pub async fn send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.bank.v1beta1.Msg/Send", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "Send")); - self.inner.unary(req, path, codec).await - } - /// MultiSend defines a method for sending coins from some accounts to other accounts. - pub async fn multi_send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.bank.v1beta1.Msg/MultiSend", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "MultiSend")); - self.inner.unary(req, path, codec).await - } - /// UpdateParams defines a governance operation for updating the x/bank module parameters. - /// The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - pub async fn update_params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.bank.v1beta1.Msg/UpdateParams", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "UpdateParams")); - self.inner.unary(req, path, codec).await - } - /// SetSendEnabled is a governance operation for setting the SendEnabled flag - /// on any number of Denoms. Only the entries to add or update should be - /// included. Entries that already exist in the store, but that aren't - /// included in this message, will be left unchanged. - /// - /// Since: cosmos-sdk 0.47 - pub async fn set_send_enabled( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.bank.v1beta1.Msg/SetSendEnabled", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "SetSendEnabled")); - self.inner.unary(req, path, codec).await - } +} +/// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QuerySupplyOfRequest { + /// denom is the coin denom to query balances for. + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, +} +impl ::prost::Name for QuerySupplyOfRequest { + const NAME: &'static str = "QuerySupplyOfRequest"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// Send defines a method for sending coins from one account to another account. - async fn send( - &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// MultiSend defines a method for sending coins from some accounts to other accounts. - async fn multi_send( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpdateParams defines a governance operation for updating the x/bank module parameters. - /// The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - async fn update_params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SetSendEnabled is a governance operation for setting the SendEnabled flag - /// on any number of Denoms. Only the entries to add or update should be - /// included. Entries that already exist in the store, but that aren't - /// included in this message, will be left unchanged. - /// - /// Since: cosmos-sdk 0.47 - async fn set_send_enabled( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; +/// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QuerySupplyOfResponse { + /// amount is the supply of the coin. + #[prost(message, optional, tag = "1")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for QuerySupplyOfResponse { + const NAME: &'static str = "QuerySupplyOfResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } - /// Msg defines the bank Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, +} +/// QueryParamsRequest defines the request type for querying x/bank parameters. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } - struct _Inner(Arc); - impl MsgServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } +} +/// QueryParamsResponse defines the response type for querying x/bank parameters. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// params provides the parameters of the bank module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } - impl tonic::codegen::Service> for MsgServer - where - T: Msg, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/cosmos.bank.v1beta1.Msg/Send" => { - #[allow(non_camel_case_types)] - struct SendSvc(pub Arc); - impl tonic::server::UnaryService - for SendSvc { - type Response = super::MsgSendResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::send(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SendSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.bank.v1beta1.Msg/MultiSend" => { - #[allow(non_camel_case_types)] - struct MultiSendSvc(pub Arc); - impl tonic::server::UnaryService - for MultiSendSvc { - type Response = super::MsgMultiSendResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::multi_send(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = MultiSendSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.bank.v1beta1.Msg/UpdateParams" => { - #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::update_params(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpdateParamsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.bank.v1beta1.Msg/SetSendEnabled" => { - #[allow(non_camel_case_types)] - struct SetSendEnabledSvc(pub Arc); - impl tonic::server::UnaryService - for SetSendEnabledSvc { - type Response = super::MsgSetSendEnabledResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::set_send_enabled(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SetSendEnabledSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } +} +/// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDenomsMetadataRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryDenomsMetadataRequest { + const NAME: &'static str = "QueryDenomsMetadataRequest"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "cosmos.bank.v1beta1.Msg"; +} +/// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDenomsMetadataResponse { + /// metadata provides the client information for all the registered tokens. + #[prost(message, repeated, tag = "1")] + pub metadatas: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDenomsMetadataResponse { + const NAME: &'static str = "QueryDenomsMetadataResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QueryBalanceRequest is the request type for the Query/Balance RPC method. +/// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBalanceRequest { - /// address is the address to query balances for. +pub struct QueryDenomMetadataRequest { + /// denom is the coin denom to query the metadata for. #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// denom is the coin denom to query balances for. - #[prost(string, tag = "2")] pub denom: ::prost::alloc::string::String, } -impl ::prost::Name for QueryBalanceRequest { - const NAME: &'static str = "QueryBalanceRequest"; +impl ::prost::Name for QueryDenomMetadataRequest { + const NAME: &'static str = "QueryDenomMetadataRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QueryBalanceResponse is the response type for the Query/Balance RPC method. +/// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryBalanceResponse { - /// balance is the balance of the coin. +pub struct QueryDenomMetadataResponse { + /// metadata describes and provides all the client information for the requested token. #[prost(message, optional, tag = "1")] - pub balance: ::core::option::Option, + pub metadata: ::core::option::Option, } -impl ::prost::Name for QueryBalanceResponse { - const NAME: &'static str = "QueryBalanceResponse"; +impl ::prost::Name for QueryDenomMetadataResponse { + const NAME: &'static str = "QueryDenomMetadataResponse"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. +/// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. +/// Identical with QueryDenomMetadataRequest but receives denom as query string. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllBalancesRequest { - /// address is the address to query balances for. +pub struct QueryDenomMetadataByQueryStringRequest { + /// denom is the coin denom to query the metadata for. #[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< - super::super::base::query::v1beta1::PageRequest, - >, + pub denom: ::prost::alloc::string::String, } -impl ::prost::Name for QueryAllBalancesRequest { - const NAME: &'static str = "QueryAllBalancesRequest"; +impl ::prost::Name for QueryDenomMetadataByQueryStringRequest { + const NAME: &'static str = "QueryDenomMetadataByQueryStringRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -/// method. +/// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC +/// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAllBalancesResponse { - /// balances is the balances of all the coins. - #[prost(message, repeated, tag = "1")] - pub balances: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. +pub struct QueryDenomMetadataByQueryStringResponse { + /// metadata describes and provides all the client information for the requested token. + #[prost(message, optional, tag = "1")] + pub metadata: ::core::option::Option, +} +impl ::prost::Name for QueryDenomMetadataByQueryStringResponse { + const NAME: &'static str = "QueryDenomMetadataByQueryStringResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, +/// which queries for a paginated set of all account holders of a particular +/// denomination. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDenomOwnersRequest { + /// denom defines the coin denomination to query all account holders for. + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, + super::super::base::query::v1beta1::PageRequest, >, } -impl ::prost::Name for QueryAllBalancesResponse { - const NAME: &'static str = "QueryAllBalancesResponse"; +impl ::prost::Name for QueryDenomOwnersRequest { + const NAME: &'static str = "QueryDenomOwnersRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QuerySpendableBalancesRequest defines the gRPC request structure for querying -/// an account's spendable balances. +/// DenomOwner defines structure representing an account that owns or holds a +/// particular denominated token. It contains the account address and account +/// balance of the denominated token. /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalancesRequest { - /// address is the address to query spendable balances for. +pub struct DenomOwner { + /// address defines the address that owns a particular denomination. #[prost(string, tag = "1")] pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. + /// balance is the balance of the denominated coin for an account. #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, + pub balance: ::core::option::Option, } -impl ::prost::Name for QuerySpendableBalancesRequest { - const NAME: &'static str = "QuerySpendableBalancesRequest"; +impl ::prost::Name for DenomOwner { + const NAME: &'static str = "DenomOwner"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QuerySpendableBalancesResponse defines the gRPC response structure for querying -/// an account's spendable balances. +/// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalancesResponse { - /// balances is the spendable balances of all the coins. +pub struct QueryDenomOwnersResponse { #[prost(message, repeated, tag = "1")] - pub balances: ::prost::alloc::vec::Vec, + pub denom_owners: ::prost::alloc::vec::Vec, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< super::super::base::query::v1beta1::PageResponse, >, } -impl ::prost::Name for QuerySpendableBalancesResponse { - const NAME: &'static str = "QuerySpendableBalancesResponse"; +impl ::prost::Name for QueryDenomOwnersResponse { + const NAME: &'static str = "QueryDenomOwnersResponse"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QuerySpendableBalanceByDenomRequest defines the gRPC request structure for -/// querying an account's spendable balance for a specific denom. +/// QueryDenomOwnersByQueryRequest defines the request type for the DenomOwnersByQuery RPC query, +/// which queries for a paginated set of all account holders of a particular +/// denomination. /// -/// Since: cosmos-sdk 0.47 +/// Since: cosmos-sdk 0.50.3 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalanceByDenomRequest { - /// address is the address to query balances for. +pub struct QueryDenomOwnersByQueryRequest { + /// denom defines the coin denomination to query all account holders for. #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// denom is the coin denom to query balances for. - #[prost(string, tag = "2")] pub denom: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for QuerySpendableBalanceByDenomRequest { - const NAME: &'static str = "QuerySpendableBalanceByDenomRequest"; +impl ::prost::Name for QueryDenomOwnersByQueryRequest { + const NAME: &'static str = "QueryDenomOwnersByQueryRequest"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) } } -/// QuerySpendableBalanceByDenomResponse defines the gRPC response structure for -/// querying an account's spendable balance for a specific denom. +/// QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. /// -/// Since: cosmos-sdk 0.47 +/// Since: cosmos-sdk 0.50.3 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySpendableBalanceByDenomResponse { - /// balance is the balance of the coin. - #[prost(message, optional, tag = "1")] - pub balance: ::core::option::Option, +pub struct QueryDenomOwnersByQueryResponse { + #[prost(message, repeated, tag = "1")] + pub denom_owners: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, } -impl ::prost::Name for QuerySpendableBalanceByDenomResponse { - const NAME: &'static str = "QuerySpendableBalanceByDenomResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalSupplyRequest { - /// pagination defines an optional pagination for the request. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryTotalSupplyRequest { - const NAME: &'static str = "QueryTotalSupplyRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalSupplyResponse { - /// supply is the supply of the coins - #[prost(message, repeated, tag = "1")] - pub supply: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryTotalSupplyResponse { - const NAME: &'static str = "QueryTotalSupplyResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySupplyOfRequest { - /// denom is the coin denom to query balances for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QuerySupplyOfRequest { - const NAME: &'static str = "QuerySupplyOfRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QuerySupplyOfResponse { - /// amount is the supply of the coin. - #[prost(message, optional, tag = "1")] - pub amount: ::core::option::Option, -} -impl ::prost::Name for QuerySupplyOfResponse { - const NAME: &'static str = "QuerySupplyOfResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsRequest defines the request type for querying x/bank parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsResponse defines the response type for querying x/bank parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomsMetadataRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDenomsMetadataRequest { - const NAME: &'static str = "QueryDenomsMetadataRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomsMetadataResponse { - /// metadata provides the client information for all the registered tokens. - #[prost(message, repeated, tag = "1")] - pub metadatas: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDenomsMetadataResponse { - const NAME: &'static str = "QueryDenomsMetadataResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomMetadataRequest { - /// denom is the coin denom to query the metadata for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDenomMetadataRequest { - const NAME: &'static str = "QueryDenomMetadataRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomMetadataResponse { - /// metadata describes and provides all the client information for the requested token. - #[prost(message, optional, tag = "1")] - pub metadata: ::core::option::Option, -} -impl ::prost::Name for QueryDenomMetadataResponse { - const NAME: &'static str = "QueryDenomMetadataResponse"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -/// which queries for a paginated set of all account holders of a particular -/// denomination. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomOwnersRequest { - /// denom defines the coin denomination to query all account holders for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDenomOwnersRequest { - const NAME: &'static str = "QueryDenomOwnersRequest"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// DenomOwner defines structure representing an account that owns or holds a -/// particular denominated token. It contains the account address and account -/// balance of the denominated token. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomOwner { - /// address defines the address that owns a particular denomination. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// balance is the balance of the denominated coin for an account. - #[prost(message, optional, tag = "2")] - pub balance: ::core::option::Option, -} -impl ::prost::Name for DenomOwner { - const NAME: &'static str = "DenomOwner"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomOwnersResponse { - #[prost(message, repeated, tag = "1")] - pub denom_owners: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDenomOwnersResponse { - const NAME: &'static str = "QueryDenomOwnersResponse"; +impl ::prost::Name for QueryDenomOwnersByQueryResponse { + const NAME: &'static str = "QueryDenomOwnersByQueryResponse"; const PACKAGE: &'static str = "cosmos.bank.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) @@ -1571,7 +1046,7 @@ pub mod query_client { .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "Params")); self.inner.unary(req, path, codec).await } - /// DenomsMetadata queries the client metadata of a given coin denomination. + /// DenomMetadata queries the client metadata of a given coin denomination. pub async fn denom_metadata( &mut self, request: impl tonic::IntoRequest, @@ -1597,6 +1072,39 @@ pub mod query_client { .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomMetadata")); self.inner.unary(req, path, codec).await } + /// DenomMetadataByQueryString queries the client metadata of a given coin denomination. + pub async fn denom_metadata_by_query_string( + &mut self, + request: impl tonic::IntoRequest< + super::QueryDenomMetadataByQueryStringRequest, + >, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "cosmos.bank.v1beta1.Query", + "DenomMetadataByQueryString", + ), + ); + self.inner.unary(req, path, codec).await + } /// DenomsMetadata queries the client metadata for all registered coin /// denominations. pub async fn denoms_metadata( @@ -1656,6 +1164,37 @@ pub mod query_client { .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomOwners")); self.inner.unary(req, path, codec).await } + /// DenomOwnersByQuery queries for all account addresses that own a particular token + /// denomination. + /// + /// Since: cosmos-sdk 0.50.3 + pub async fn denom_owners_by_query( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomOwnersByQuery"), + ); + self.inner.unary(req, path, codec).await + } /// SendEnabled queries for SendEnabled entries. /// /// This query only returns denominations that have specific SendEnabled settings. @@ -1775,7 +1314,7 @@ pub mod query_server { tonic::Response, tonic::Status, >; - /// DenomsMetadata queries the client metadata of a given coin denomination. + /// DenomMetadata queries the client metadata of a given coin denomination. async fn denom_metadata( &self, request: tonic::Request, @@ -1783,6 +1322,14 @@ pub mod query_server { tonic::Response, tonic::Status, >; + /// DenomMetadataByQueryString queries the client metadata of a given coin denomination. + async fn denom_metadata_by_query_string( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// DenomsMetadata queries the client metadata for all registered coin /// denominations. async fn denoms_metadata( @@ -1806,6 +1353,17 @@ pub mod query_server { tonic::Response, tonic::Status, >; + /// DenomOwnersByQuery queries for all account addresses that own a particular token + /// denomination. + /// + /// Since: cosmos-sdk 0.50.3 + async fn denom_owners_by_query( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SendEnabled queries for SendEnabled entries. /// /// This query only returns denominations that have specific SendEnabled settings. @@ -2227,23 +1785,811 @@ pub mod query_server { } "/cosmos.bank.v1beta1.Query/DenomMetadata" => { #[allow(non_camel_case_types)] - struct DenomMetadataSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DenomMetadataSvc { - type Response = super::QueryDenomMetadataResponse; + struct DenomMetadataSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DenomMetadataSvc { + type Response = super::QueryDenomMetadataResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::denom_metadata(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = DenomMetadataSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString" => { + #[allow(non_camel_case_types)] + struct DenomMetadataByQueryStringSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryDenomMetadataByQueryStringRequest, + > for DenomMetadataByQueryStringSvc { + type Response = super::QueryDenomMetadataByQueryStringResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryDenomMetadataByQueryStringRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::denom_metadata_by_query_string( + &inner, + request, + ) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = DenomMetadataByQueryStringSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.bank.v1beta1.Query/DenomsMetadata" => { + #[allow(non_camel_case_types)] + struct DenomsMetadataSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DenomsMetadataSvc { + type Response = super::QueryDenomsMetadataResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::denoms_metadata(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = DenomsMetadataSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.bank.v1beta1.Query/DenomOwners" => { + #[allow(non_camel_case_types)] + struct DenomOwnersSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DenomOwnersSvc { + type Response = super::QueryDenomOwnersResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::denom_owners(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = DenomOwnersSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery" => { + #[allow(non_camel_case_types)] + struct DenomOwnersByQuerySvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DenomOwnersByQuerySvc { + type Response = super::QueryDenomOwnersByQueryResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryDenomOwnersByQueryRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::denom_owners_by_query(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = DenomOwnersByQuerySvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.bank.v1beta1.Query/SendEnabled" => { + #[allow(non_camel_case_types)] + struct SendEnabledSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for SendEnabledSvc { + type Response = super::QuerySendEnabledResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::send_enabled(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = SendEnabledSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "cosmos.bank.v1beta1.Query"; + } +} +/// MsgSend represents a message to send coins from one account to another. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSend { + #[prost(string, tag = "1")] + pub from_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub to_address: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgSend { + const NAME: &'static str = "MsgSend"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgSendResponse defines the Msg/Send response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSendResponse {} +impl ::prost::Name for MsgSendResponse { + const NAME: &'static str = "MsgSendResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMultiSend { + /// Inputs, despite being `repeated`, only allows one sender input. This is + /// checked in MsgMultiSend's ValidateBasic. + #[prost(message, repeated, tag = "1")] + pub inputs: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub outputs: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgMultiSend { + const NAME: &'static str = "MsgMultiSend"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgMultiSendResponse defines the Msg/MultiSend response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgMultiSendResponse {} +impl ::prost::Name for MsgMultiSendResponse { + const NAME: &'static str = "MsgMultiSendResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/bank parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgSetSendEnabled is the Msg/SetSendEnabled request type. +/// +/// Only entries to add/update/delete need to be included. +/// Existing SendEnabled entries that are not included in this +/// message are left unchanged. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSetSendEnabled { + /// authority is the address that controls the module. + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// send_enabled is the list of entries to add or update. + #[prost(message, repeated, tag = "2")] + pub send_enabled: ::prost::alloc::vec::Vec, + /// use_default_for is a list of denoms that should use the params.default_send_enabled value. + /// Denoms listed here will have their SendEnabled entries deleted. + /// If a denom is included that doesn't have a SendEnabled entry, + /// it will be ignored. + #[prost(string, repeated, tag = "3")] + pub use_default_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for MsgSetSendEnabled { + const NAME: &'static str = "MsgSetSendEnabled"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSetSendEnabledResponse {} +impl ::prost::Name for MsgSetSendEnabledResponse { + const NAME: &'static str = "MsgSetSendEnabledResponse"; + const PACKAGE: &'static str = "cosmos.bank.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the bank Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Send defines a method for sending coins from one account to another account. + pub async fn send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.bank.v1beta1.Msg/Send", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "Send")); + self.inner.unary(req, path, codec).await + } + /// MultiSend defines a method for sending coins from some accounts to other accounts. + pub async fn multi_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.bank.v1beta1.Msg/MultiSend", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "MultiSend")); + self.inner.unary(req, path, codec).await + } + /// UpdateParams defines a governance operation for updating the x/bank module parameters. + /// The authority is defined in the keeper. + /// + /// Since: cosmos-sdk 0.47 + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.bank.v1beta1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "UpdateParams")); + self.inner.unary(req, path, codec).await + } + /// SetSendEnabled is a governance operation for setting the SendEnabled flag + /// on any number of Denoms. Only the entries to add or update should be + /// included. Entries that already exist in the store, but that aren't + /// included in this message, will be left unchanged. + /// + /// Since: cosmos-sdk 0.47 + pub async fn set_send_enabled( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.bank.v1beta1.Msg/SetSendEnabled", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.bank.v1beta1.Msg", "SetSendEnabled")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// Send defines a method for sending coins from one account to another account. + async fn send( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// MultiSend defines a method for sending coins from some accounts to other accounts. + async fn multi_send( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UpdateParams defines a governance operation for updating the x/bank module parameters. + /// The authority is defined in the keeper. + /// + /// Since: cosmos-sdk 0.47 + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// SetSendEnabled is a governance operation for setting the SendEnabled flag + /// on any number of Denoms. Only the entries to add or update should be + /// included. Entries that already exist in the store, but that aren't + /// included in this message, will be left unchanged. + /// + /// Since: cosmos-sdk 0.47 + async fn set_send_enabled( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the bank Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/cosmos.bank.v1beta1.Msg/Send" => { + #[allow(non_camel_case_types)] + struct SendSvc(pub Arc); + impl tonic::server::UnaryService + for SendSvc { + type Response = super::MsgSendResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denom_metadata(&inner, request).await + ::send(&inner, request).await }; Box::pin(fut) } @@ -2255,7 +2601,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomMetadataSvc(inner); + let method = SendSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2271,25 +2617,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.bank.v1beta1.Query/DenomsMetadata" => { + "/cosmos.bank.v1beta1.Msg/MultiSend" => { #[allow(non_camel_case_types)] - struct DenomsMetadataSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DenomsMetadataSvc { - type Response = super::QueryDenomsMetadataResponse; + struct MultiSendSvc(pub Arc); + impl tonic::server::UnaryService + for MultiSendSvc { + type Response = super::MsgMultiSendResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denoms_metadata(&inner, request).await + ::multi_send(&inner, request).await }; Box::pin(fut) } @@ -2301,7 +2645,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomsMetadataSvc(inner); + let method = MultiSendSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2317,25 +2661,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.bank.v1beta1.Query/DenomOwners" => { + "/cosmos.bank.v1beta1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] - struct DenomOwnersSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DenomOwnersSvc { - type Response = super::QueryDenomOwnersResponse; + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denom_owners(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -2347,7 +2689,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomOwnersSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2363,25 +2705,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.bank.v1beta1.Query/SendEnabled" => { + "/cosmos.bank.v1beta1.Msg/SetSendEnabled" => { #[allow(non_camel_case_types)] - struct SendEnabledSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for SendEnabledSvc { - type Response = super::QuerySendEnabledResponse; + struct SetSendEnabledSvc(pub Arc); + impl tonic::server::UnaryService + for SetSendEnabledSvc { + type Response = super::MsgSetSendEnabledResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::send_enabled(&inner, request).await + ::set_send_enabled(&inner, request).await }; Box::pin(fut) } @@ -2393,7 +2733,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = SendEnabledSvc(inner); + let method = SetSendEnabledSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2424,7 +2764,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2436,7 +2776,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2446,79 +2786,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "cosmos.bank.v1beta1.Query"; - } -} -/// SendAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SendAuthorization { - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, - /// allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the - /// granter. If omitted, any recipient is allowed. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, repeated, tag = "2")] - pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for SendAuthorization { - const NAME: &'static str = "SendAuthorization"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// GenesisState defines the bank module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// balances is an array containing the balances of all the accounts. - #[prost(message, repeated, tag = "2")] - pub balances: ::prost::alloc::vec::Vec, - /// supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - /// balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - #[prost(message, repeated, tag = "3")] - pub supply: ::prost::alloc::vec::Vec, - /// denom_metadata defines the metadata of the different coins. - #[prost(message, repeated, tag = "4")] - pub denom_metadata: ::prost::alloc::vec::Vec, - /// send_enabled defines the denoms where send is enabled or disabled. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, repeated, tag = "5")] - pub send_enabled: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) - } -} -/// Balance defines an account address and balance pair used in the bank module's -/// genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Balance { - /// address is the address of the balance holder. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// coins defines the different coins this balance holds. - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Balance { - const NAME: &'static str = "Balance"; - const PACKAGE: &'static str = "cosmos.bank.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.bank.v1beta1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "cosmos.bank.v1beta1.Msg"; } } diff --git a/src/prost/cosmos.bank.v1beta1.serde.rs b/src/prost/cosmos.bank.v1beta1.serde.rs index 6fc304d4..bf7c0c94 100644 --- a/src/prost/cosmos.bank.v1beta1.serde.rs +++ b/src/prost/cosmos.bank.v1beta1.serde.rs @@ -1808,6 +1808,9 @@ impl serde::Serialize for QueryAllBalancesRequest { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryAllBalancesRequest", len)?; if true { struct_ser.serialize_field("address", &self.address)?; @@ -1815,6 +1818,9 @@ impl serde::Serialize for QueryAllBalancesRequest { if let Some(v) = self.pagination.as_ref() { struct_ser.serialize_field("pagination", v)?; } + if true { + struct_ser.serialize_field("resolveDenom", &self.resolve_denom)?; + } struct_ser.end() } } @@ -1827,12 +1833,15 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { const FIELDS: &[&str] = &[ "address", "pagination", + "resolve_denom", + "resolveDenom", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Address, Pagination, + ResolveDenom, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -1856,6 +1865,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { match value { "address" => Ok(GeneratedField::Address), "pagination" => Ok(GeneratedField::Pagination), + "resolveDenom" | "resolve_denom" => Ok(GeneratedField::ResolveDenom), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1877,6 +1887,7 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { { let mut address__ = None; let mut pagination__ = None; + let mut resolve_denom__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Address => { @@ -1891,11 +1902,18 @@ impl<'de> serde::Deserialize<'de> for QueryAllBalancesRequest { } pagination__ = map_.next_value()?; } + GeneratedField::ResolveDenom => { + if resolve_denom__.is_some() { + return Err(serde::de::Error::duplicate_field("resolveDenom")); + } + resolve_denom__ = Some(map_.next_value()?); + } } } Ok(QueryAllBalancesRequest { address: address__.unwrap_or_default(), pagination: pagination__, + resolve_denom: resolve_denom__.unwrap_or_default(), }) } } @@ -2209,6 +2227,188 @@ impl<'de> serde::Deserialize<'de> for QueryBalanceResponse { deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryBalanceResponse", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for QueryDenomMetadataByQueryStringRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", len)?; + if true { + struct_ser.serialize_field("denom", &self.denom)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomMetadataByQueryStringRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "denom", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomMetadataByQueryStringRequest; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map_.next_value()?); + } + } + } + Ok(QueryDenomMetadataByQueryStringRequest { + denom: denom__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryDenomMetadataByQueryStringResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", len)?; + if let Some(v) = self.metadata.as_ref() { + struct_ser.serialize_field("metadata", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomMetadataByQueryStringResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "metadata", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Metadata, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "metadata" => Ok(GeneratedField::Metadata), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomMetadataByQueryStringResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut metadata__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Metadata => { + if metadata__.is_some() { + return Err(serde::de::Error::duplicate_field("metadata")); + } + metadata__ = map_.next_value()?; + } + } + } + Ok(QueryDenomMetadataByQueryStringResponse { + metadata: metadata__, + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for QueryDenomMetadataRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result @@ -2391,6 +2591,223 @@ impl<'de> serde::Deserialize<'de> for QueryDenomMetadataResponse { deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomMetadataResponse", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for QueryDenomOwnersByQueryRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", len)?; + if true { + struct_ser.serialize_field("denom", &self.denom)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomOwnersByQueryRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "denom", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Denom, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "denom" => Ok(GeneratedField::Denom), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomOwnersByQueryRequest; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Denom => { + if denom__.is_some() { + return Err(serde::de::Error::duplicate_field("denom")); + } + denom__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryDenomOwnersByQueryRequest { + denom: denom__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryDenomOwnersByQueryResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", len)?; + if true { + struct_ser.serialize_field("denomOwners", &self.denom_owners)?; + } + if let Some(v) = self.pagination.as_ref() { + struct_ser.serialize_field("pagination", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryDenomOwnersByQueryResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "denom_owners", + "denomOwners", + "pagination", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + DenomOwners, + Pagination, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "denomOwners" | "denom_owners" => Ok(GeneratedField::DenomOwners), + "pagination" => Ok(GeneratedField::Pagination), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryDenomOwnersByQueryResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut denom_owners__ = None; + let mut pagination__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::DenomOwners => { + if denom_owners__.is_some() { + return Err(serde::de::Error::duplicate_field("denomOwners")); + } + denom_owners__ = Some(map_.next_value()?); + } + GeneratedField::Pagination => { + if pagination__.is_some() { + return Err(serde::de::Error::duplicate_field("pagination")); + } + pagination__ = map_.next_value()?; + } + } + } + Ok(QueryDenomOwnersByQueryResponse { + denom_owners: denom_owners__.unwrap_or_default(), + pagination: pagination__, + }) + } + } + deserializer.deserialize_struct("cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for QueryDenomOwnersRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result diff --git a/src/prost/cosmos.base.abci.v1beta1.rs b/src/prost/cosmos.base.abci.v1beta1.rs index 30c5b998..16ca03f0 100644 --- a/src/prost/cosmos.base.abci.v1beta1.rs +++ b/src/prost/cosmos.base.abci.v1beta1.rs @@ -251,3 +251,33 @@ impl ::prost::Name for SearchTxsResult { ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) } } +/// SearchBlocksResult defines a structure for querying blocks pageable +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SearchBlocksResult { + /// Count of all blocks + #[prost(int64, tag = "1")] + pub total_count: i64, + /// Count of blocks in current page + #[prost(int64, tag = "2")] + pub count: i64, + /// Index of current page, start from 1 + #[prost(int64, tag = "3")] + pub page_number: i64, + /// Count of total pages + #[prost(int64, tag = "4")] + pub page_total: i64, + /// Max count blocks per page + #[prost(int64, tag = "5")] + pub limit: i64, + /// List of blocks in current page + #[prost(message, repeated, tag = "6")] + pub blocks: ::prost::alloc::vec::Vec<::cometbft_proto::types::v1::Block>, +} +impl ::prost::Name for SearchBlocksResult { + const NAME: &'static str = "SearchBlocksResult"; + const PACKAGE: &'static str = "cosmos.base.abci.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.abci.v1beta1.{}", Self::NAME) + } +} diff --git a/src/prost/cosmos.base.kv.v1beta1.rs b/src/prost/cosmos.base.kv.v1beta1.rs deleted file mode 100644 index 6bd5f9c6..00000000 --- a/src/prost/cosmos.base.kv.v1beta1.rs +++ /dev/null @@ -1,30 +0,0 @@ -/// Pairs defines a repeated slice of Pair objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Pairs { - const NAME: &'static str = "Pairs"; - const PACKAGE: &'static str = "cosmos.base.kv.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.kv.v1beta1.{}", Self::NAME) - } -} -/// Pair defines a key/value bytes tuple. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Pair { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Pair { - const NAME: &'static str = "Pair"; - const PACKAGE: &'static str = "cosmos.base.kv.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.kv.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.base.kv.v1beta1.serde.rs b/src/prost/cosmos.base.kv.v1beta1.serde.rs deleted file mode 100644 index 3e2ed8b5..00000000 --- a/src/prost/cosmos.base.kv.v1beta1.serde.rs +++ /dev/null @@ -1,205 +0,0 @@ -impl serde::Serialize for Pair { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pair", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Pair { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Pair; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.kv.v1beta1.Pair") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(Pair { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pair", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Pairs { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.kv.v1beta1.Pairs", len)?; - if true { - struct_ser.serialize_field("pairs", &self.pairs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Pairs { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "pairs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Pairs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "pairs" => Ok(GeneratedField::Pairs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Pairs; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.kv.v1beta1.Pairs") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut pairs__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Pairs => { - if pairs__.is_some() { - return Err(serde::de::Error::duplicate_field("pairs")); - } - pairs__ = Some(map_.next_value()?); - } - } - } - Ok(Pairs { - pairs: pairs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.kv.v1beta1.Pairs", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.node.v1beta1.rs b/src/prost/cosmos.base.node.v1beta1.rs index 69d16e40..0eae005d 100644 --- a/src/prost/cosmos.base.node.v1beta1.rs +++ b/src/prost/cosmos.base.node.v1beta1.rs @@ -15,6 +15,12 @@ impl ::prost::Name for ConfigRequest { pub struct ConfigResponse { #[prost(string, tag = "1")] pub minimum_gas_price: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub pruning_keep_recent: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub pruning_interval: ::prost::alloc::string::String, + #[prost(uint64, tag = "4")] + pub halt_height: u64, } impl ::prost::Name for ConfigResponse { const NAME: &'static str = "ConfigResponse"; @@ -23,6 +29,46 @@ impl ::prost::Name for ConfigResponse { ::prost::alloc::format!("cosmos.base.node.v1beta1.{}", Self::NAME) } } +/// StateRequest defines the request structure for the status of a node. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StatusRequest {} +impl ::prost::Name for StatusRequest { + const NAME: &'static str = "StatusRequest"; + const PACKAGE: &'static str = "cosmos.base.node.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.node.v1beta1.{}", Self::NAME) + } +} +/// StateResponse defines the response structure for the status of a node. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StatusResponse { + /// earliest block height available in the store + #[prost(uint64, tag = "1")] + pub earliest_store_height: u64, + /// current block height + #[prost(uint64, tag = "2")] + pub height: u64, + /// block height timestamp + #[prost(message, optional, tag = "3")] + pub timestamp: ::core::option::Option< + super::super::super::super::google::protobuf::Timestamp, + >, + /// app hash of the current block + #[prost(bytes = "vec", tag = "4")] + pub app_hash: ::prost::alloc::vec::Vec, + /// validator hash provided by the consensus header + #[prost(bytes = "vec", tag = "5")] + pub validator_hash: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for StatusResponse { + const NAME: &'static str = "StatusResponse"; + const PACKAGE: &'static str = "cosmos.base.node.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.base.node.v1beta1.{}", Self::NAME) + } +} /// Generated client implementations. #[cfg(feature = "client")] pub mod service_client { @@ -133,6 +179,29 @@ pub mod service_client { .insert(GrpcMethod::new("cosmos.base.node.v1beta1.Service", "Config")); self.inner.unary(req, path, codec).await } + /// Status queries for the node status. + pub async fn status( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result, tonic::Status> { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.base.node.v1beta1.Service/Status", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.base.node.v1beta1.Service", "Status")); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -148,6 +217,11 @@ pub mod service_server { &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; + /// Status queries for the node status. + async fn status( + &self, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; } /// Service defines the gRPC querier service for node related queries. #[derive(Debug)] @@ -273,6 +347,50 @@ pub mod service_server { }; Box::pin(fut) } + "/cosmos.base.node.v1beta1.Service/Status" => { + #[allow(non_camel_case_types)] + struct StatusSvc(pub Arc); + impl tonic::server::UnaryService + for StatusSvc { + type Response = super::StatusResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::status(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = StatusSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( diff --git a/src/prost/cosmos.base.node.v1beta1.serde.rs b/src/prost/cosmos.base.node.v1beta1.serde.rs index 24a688cd..e5f74e8a 100644 --- a/src/prost/cosmos.base.node.v1beta1.serde.rs +++ b/src/prost/cosmos.base.node.v1beta1.serde.rs @@ -80,10 +80,29 @@ impl serde::Serialize for ConfigResponse { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.base.node.v1beta1.ConfigResponse", len)?; if true { struct_ser.serialize_field("minimumGasPrice", &self.minimum_gas_price)?; } + if true { + struct_ser.serialize_field("pruningKeepRecent", &self.pruning_keep_recent)?; + } + if true { + struct_ser.serialize_field("pruningInterval", &self.pruning_interval)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("haltHeight", ::alloc::string::ToString::to_string(&self.halt_height).as_str())?; + } struct_ser.end() } } @@ -96,11 +115,20 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { const FIELDS: &[&str] = &[ "minimum_gas_price", "minimumGasPrice", + "pruning_keep_recent", + "pruningKeepRecent", + "pruning_interval", + "pruningInterval", + "halt_height", + "haltHeight", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { MinimumGasPrice, + PruningKeepRecent, + PruningInterval, + HaltHeight, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -123,6 +151,9 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { { match value { "minimumGasPrice" | "minimum_gas_price" => Ok(GeneratedField::MinimumGasPrice), + "pruningKeepRecent" | "pruning_keep_recent" => Ok(GeneratedField::PruningKeepRecent), + "pruningInterval" | "pruning_interval" => Ok(GeneratedField::PruningInterval), + "haltHeight" | "halt_height" => Ok(GeneratedField::HaltHeight), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -143,6 +174,9 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { V: serde::de::MapAccess<'de>, { let mut minimum_gas_price__ = None; + let mut pruning_keep_recent__ = None; + let mut pruning_interval__ = None; + let mut halt_height__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::MinimumGasPrice => { @@ -151,13 +185,281 @@ impl<'de> serde::Deserialize<'de> for ConfigResponse { } minimum_gas_price__ = Some(map_.next_value()?); } + GeneratedField::PruningKeepRecent => { + if pruning_keep_recent__.is_some() { + return Err(serde::de::Error::duplicate_field("pruningKeepRecent")); + } + pruning_keep_recent__ = Some(map_.next_value()?); + } + GeneratedField::PruningInterval => { + if pruning_interval__.is_some() { + return Err(serde::de::Error::duplicate_field("pruningInterval")); + } + pruning_interval__ = Some(map_.next_value()?); + } + GeneratedField::HaltHeight => { + if halt_height__.is_some() { + return Err(serde::de::Error::duplicate_field("haltHeight")); + } + halt_height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } } } Ok(ConfigResponse { minimum_gas_price: minimum_gas_price__.unwrap_or_default(), + pruning_keep_recent: pruning_keep_recent__.unwrap_or_default(), + pruning_interval: pruning_interval__.unwrap_or_default(), + halt_height: halt_height__.unwrap_or_default(), }) } } deserializer.deserialize_struct("cosmos.base.node.v1beta1.ConfigResponse", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for StatusRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.base.node.v1beta1.StatusRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StatusRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StatusRequest; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.base.node.v1beta1.StatusRequest") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(StatusRequest { + }) + } + } + deserializer.deserialize_struct("cosmos.base.node.v1beta1.StatusRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for StatusResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.base.node.v1beta1.StatusResponse", len)?; + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("earliestStoreHeight", ::alloc::string::ToString::to_string(&self.earliest_store_height).as_str())?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("height", ::alloc::string::ToString::to_string(&self.height).as_str())?; + } + if let Some(v) = self.timestamp.as_ref() { + struct_ser.serialize_field("timestamp", v)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("appHash", pbjson::private::base64::encode(&self.app_hash).as_str())?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("validatorHash", pbjson::private::base64::encode(&self.validator_hash).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for StatusResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "earliest_store_height", + "earliestStoreHeight", + "height", + "timestamp", + "app_hash", + "appHash", + "validator_hash", + "validatorHash", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + EarliestStoreHeight, + Height, + Timestamp, + AppHash, + ValidatorHash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "earliestStoreHeight" | "earliest_store_height" => Ok(GeneratedField::EarliestStoreHeight), + "height" => Ok(GeneratedField::Height), + "timestamp" => Ok(GeneratedField::Timestamp), + "appHash" | "app_hash" => Ok(GeneratedField::AppHash), + "validatorHash" | "validator_hash" => Ok(GeneratedField::ValidatorHash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = StatusResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.base.node.v1beta1.StatusResponse") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut earliest_store_height__ = None; + let mut height__ = None; + let mut timestamp__ = None; + let mut app_hash__ = None; + let mut validator_hash__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::EarliestStoreHeight => { + if earliest_store_height__.is_some() { + return Err(serde::de::Error::duplicate_field("earliestStoreHeight")); + } + earliest_store_height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Timestamp => { + if timestamp__.is_some() { + return Err(serde::de::Error::duplicate_field("timestamp")); + } + timestamp__ = map_.next_value()?; + } + GeneratedField::AppHash => { + if app_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("appHash")); + } + app_hash__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + GeneratedField::ValidatorHash => { + if validator_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorHash")); + } + validator_hash__ = + Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(StatusResponse { + earliest_store_height: earliest_store_height__.unwrap_or_default(), + height: height__.unwrap_or_default(), + timestamp: timestamp__, + app_hash: app_hash__.unwrap_or_default(), + validator_hash: validator_hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.base.node.v1beta1.StatusResponse", FIELDS, GeneratedVisitor) + } +} diff --git a/src/prost/cosmos.base.snapshots.v1beta1.rs b/src/prost/cosmos.base.snapshots.v1beta1.rs deleted file mode 100644 index 614c936c..00000000 --- a/src/prost/cosmos.base.snapshots.v1beta1.rs +++ /dev/null @@ -1,184 +0,0 @@ -/// Snapshot contains Tendermint state sync snapshot info. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Snapshot { - #[prost(uint64, tag = "1")] - pub height: u64, - #[prost(uint32, tag = "2")] - pub format: u32, - #[prost(uint32, tag = "3")] - pub chunks: u32, - #[prost(bytes = "vec", tag = "4")] - pub hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub metadata: ::core::option::Option, -} -impl ::prost::Name for Snapshot { - const NAME: &'static str = "Snapshot"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// Metadata contains SDK-specific snapshot metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - /// SHA-256 chunk hashes - #[prost(bytes = "vec", repeated, tag = "1")] - pub chunk_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -impl ::prost::Name for Metadata { - const NAME: &'static str = "Metadata"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotItem is an item contained in a rootmulti.Store snapshot. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotItem { - /// item is the specific type of snapshot item. - #[prost(oneof = "snapshot_item::Item", tags = "1, 2, 3, 4, 5, 6")] - pub item: ::core::option::Option, -} -/// Nested message and enum types in `SnapshotItem`. -pub mod snapshot_item { - /// item is the specific type of snapshot item. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Item { - #[prost(message, tag = "1")] - Store(super::SnapshotStoreItem), - #[prost(message, tag = "2")] - Iavl(super::SnapshotIavlItem), - #[prost(message, tag = "3")] - Extension(super::SnapshotExtensionMeta), - #[prost(message, tag = "4")] - ExtensionPayload(super::SnapshotExtensionPayload), - #[prost(message, tag = "5")] - Kv(super::SnapshotKvItem), - #[prost(message, tag = "6")] - Schema(super::SnapshotSchema), - } -} -impl ::prost::Name for SnapshotItem { - const NAME: &'static str = "SnapshotItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotStoreItem contains metadata about a snapshotted store. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotStoreItem { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -impl ::prost::Name for SnapshotStoreItem { - const NAME: &'static str = "SnapshotStoreItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotIAVLItem is an exported IAVL node. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotIavlItem { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, - /// version is block height - #[prost(int64, tag = "3")] - pub version: i64, - /// height is depth of the tree. - #[prost(int32, tag = "4")] - pub height: i32, -} -impl ::prost::Name for SnapshotIavlItem { - const NAME: &'static str = "SnapshotIAVLItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotExtensionMeta contains metadata about an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotExtensionMeta { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag = "2")] - pub format: u32, -} -impl ::prost::Name for SnapshotExtensionMeta { - const NAME: &'static str = "SnapshotExtensionMeta"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotExtensionPayload contains payloads of an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotExtensionPayload { - #[prost(bytes = "vec", tag = "1")] - pub payload: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for SnapshotExtensionPayload { - const NAME: &'static str = "SnapshotExtensionPayload"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotKVItem is an exported Key/Value Pair -/// -/// Since: cosmos-sdk 0.46 -/// Deprecated: This message was part of store/v2alpha1 which has been deleted from v0.47. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotKvItem { - #[prost(bytes = "vec", tag = "1")] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for SnapshotKvItem { - const NAME: &'static str = "SnapshotKVItem"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} -/// SnapshotSchema is an exported schema of smt store -/// -/// Since: cosmos-sdk 0.46 -/// Deprecated: This message was part of store/v2alpha1 which has been deleted from v0.47. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SnapshotSchema { - #[prost(bytes = "vec", repeated, tag = "1")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -impl ::prost::Name for SnapshotSchema { - const NAME: &'static str = "SnapshotSchema"; - const PACKAGE: &'static str = "cosmos.base.snapshots.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.base.snapshots.v1beta1.{}", Self::NAME) - } -} diff --git a/src/prost/cosmos.base.snapshots.v1beta1.serde.rs b/src/prost/cosmos.base.snapshots.v1beta1.serde.rs deleted file mode 100644 index f28fcfed..00000000 --- a/src/prost/cosmos.base.snapshots.v1beta1.serde.rs +++ /dev/null @@ -1,1082 +0,0 @@ -impl serde::Serialize for Metadata { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Metadata", len)?; - if true { - struct_ser.serialize_field("chunkHashes", &self.chunk_hashes.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Metadata { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "chunk_hashes", - "chunkHashes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ChunkHashes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "chunkHashes" | "chunk_hashes" => Ok(GeneratedField::ChunkHashes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Metadata; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.Metadata") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut chunk_hashes__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::ChunkHashes => { - if chunk_hashes__.is_some() { - return Err(serde::de::Error::duplicate_field("chunkHashes")); - } - chunk_hashes__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(Metadata { - chunk_hashes: chunk_hashes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.Metadata", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Snapshot { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.Snapshot", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("height", ::alloc::string::ToString::to_string(&self.height).as_str())?; - } - if true { - struct_ser.serialize_field("format", &self.format)?; - } - if true { - struct_ser.serialize_field("chunks", &self.chunks)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; - } - if let Some(v) = self.metadata.as_ref() { - struct_ser.serialize_field("metadata", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Snapshot { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - "format", - "chunks", - "hash", - "metadata", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - Format, - Chunks, - Hash, - Metadata, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - "format" => Ok(GeneratedField::Format), - "chunks" => Ok(GeneratedField::Chunks), - "hash" => Ok(GeneratedField::Hash), - "metadata" => Ok(GeneratedField::Metadata), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Snapshot; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.Snapshot") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - let mut format__ = None; - let mut chunks__ = None; - let mut hash__ = None; - let mut metadata__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Format => { - if format__.is_some() { - return Err(serde::de::Error::duplicate_field("format")); - } - format__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Chunks => { - if chunks__.is_some() { - return Err(serde::de::Error::duplicate_field("chunks")); - } - chunks__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Metadata => { - if metadata__.is_some() { - return Err(serde::de::Error::duplicate_field("metadata")); - } - metadata__ = map_.next_value()?; - } - } - } - Ok(Snapshot { - height: height__.unwrap_or_default(), - format: format__.unwrap_or_default(), - chunks: chunks__.unwrap_or_default(), - hash: hash__.unwrap_or_default(), - metadata: metadata__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.Snapshot", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotExtensionMeta { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if true { - struct_ser.serialize_field("format", &self.format)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotExtensionMeta { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "format", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - Format, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "format" => Ok(GeneratedField::Format), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotExtensionMeta; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut format__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::Format => { - if format__.is_some() { - return Err(serde::de::Error::duplicate_field("format")); - } - format__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotExtensionMeta { - name: name__.unwrap_or_default(), - format: format__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionMeta", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotExtensionPayload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("payload", pbjson::private::base64::encode(&self.payload).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotExtensionPayload { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "payload", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Payload, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "payload" => Ok(GeneratedField::Payload), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotExtensionPayload; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut payload__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Payload => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("payload")); - } - payload__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotExtensionPayload { - payload: payload__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotExtensionPayload", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotIavlItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - if true { - struct_ser.serialize_field("height", &self.height)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotIavlItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - "version", - "height", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - Version, - Height, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - "version" => Ok(GeneratedField::Version), - "height" => Ok(GeneratedField::Height), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotIavlItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotIAVLItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - let mut version__ = None; - let mut height__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotIavlItem { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - version: version__.unwrap_or_default(), - height: height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotIAVLItem", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.item.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotItem", len)?; - if let Some(v) = self.item.as_ref() { - match v { - snapshot_item::Item::Store(v) => { - struct_ser.serialize_field("store", v)?; - } - snapshot_item::Item::Iavl(v) => { - struct_ser.serialize_field("iavl", v)?; - } - snapshot_item::Item::Extension(v) => { - struct_ser.serialize_field("extension", v)?; - } - snapshot_item::Item::ExtensionPayload(v) => { - struct_ser.serialize_field("extensionPayload", v)?; - } - snapshot_item::Item::Kv(v) => { - struct_ser.serialize_field("kv", v)?; - } - snapshot_item::Item::Schema(v) => { - struct_ser.serialize_field("schema", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "store", - "iavl", - "extension", - "extension_payload", - "extensionPayload", - "kv", - "schema", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Store, - Iavl, - Extension, - ExtensionPayload, - Kv, - Schema, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "store" => Ok(GeneratedField::Store), - "iavl" => Ok(GeneratedField::Iavl), - "extension" => Ok(GeneratedField::Extension), - "extensionPayload" | "extension_payload" => Ok(GeneratedField::ExtensionPayload), - "kv" => Ok(GeneratedField::Kv), - "schema" => Ok(GeneratedField::Schema), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut item__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Store => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("store")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Store) -; - } - GeneratedField::Iavl => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("iavl")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Iavl) -; - } - GeneratedField::Extension => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("extension")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Extension) -; - } - GeneratedField::ExtensionPayload => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("extensionPayload")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::ExtensionPayload) -; - } - GeneratedField::Kv => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("kv")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Kv) -; - } - GeneratedField::Schema => { - if item__.is_some() { - return Err(serde::de::Error::duplicate_field("schema")); - } - item__ = map_.next_value::<::core::option::Option<_>>()?.map(snapshot_item::Item::Schema) -; - } - } - } - Ok(SnapshotItem { - item: item__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotItem", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotKvItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotKVItem", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotKvItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "key", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotKvItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotKVItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(SnapshotKvItem { - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotKVItem", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotSchema { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotSchema", len)?; - if true { - struct_ser.serialize_field("keys", &self.keys.iter().map(pbjson::private::base64::encode).collect::<::alloc::vec::Vec<_>>())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotSchema { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "keys", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Keys, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "keys" => Ok(GeneratedField::Keys), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotSchema; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotSchema") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut keys__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Keys => { - if keys__.is_some() { - return Err(serde::de::Error::duplicate_field("keys")); - } - keys__ = - Some(map_.next_value::<::alloc::vec::Vec<::pbjson::private::BytesDeserialize<_>>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - } - } - Ok(SnapshotSchema { - keys: keys__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotSchema", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SnapshotStoreItem { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.snapshots.v1beta1.SnapshotStoreItem", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SnapshotStoreItem { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SnapshotStoreItem; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.snapshots.v1beta1.SnapshotStoreItem") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - } - } - Ok(SnapshotStoreItem { - name: name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.snapshots.v1beta1.SnapshotStoreItem", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.store.v1beta1.serde.rs b/src/prost/cosmos.base.store.v1beta1.serde.rs deleted file mode 100644 index 2916d33c..00000000 --- a/src/prost/cosmos.base.store.v1beta1.serde.rs +++ /dev/null @@ -1,791 +0,0 @@ -impl serde::Serialize for BlockMetadata { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.BlockMetadata", len)?; - if let Some(v) = self.request_begin_block.as_ref() { - struct_ser.serialize_field("requestBeginBlock", v)?; - } - if let Some(v) = self.response_begin_block.as_ref() { - struct_ser.serialize_field("responseBeginBlock", v)?; - } - if true { - struct_ser.serialize_field("deliverTxs", &self.deliver_txs)?; - } - if let Some(v) = self.request_end_block.as_ref() { - struct_ser.serialize_field("requestEndBlock", v)?; - } - if let Some(v) = self.response_end_block.as_ref() { - struct_ser.serialize_field("responseEndBlock", v)?; - } - if let Some(v) = self.response_commit.as_ref() { - struct_ser.serialize_field("responseCommit", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BlockMetadata { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "request_begin_block", - "requestBeginBlock", - "response_begin_block", - "responseBeginBlock", - "deliver_txs", - "deliverTxs", - "request_end_block", - "requestEndBlock", - "response_end_block", - "responseEndBlock", - "response_commit", - "responseCommit", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - RequestBeginBlock, - ResponseBeginBlock, - DeliverTxs, - RequestEndBlock, - ResponseEndBlock, - ResponseCommit, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "requestBeginBlock" | "request_begin_block" => Ok(GeneratedField::RequestBeginBlock), - "responseBeginBlock" | "response_begin_block" => Ok(GeneratedField::ResponseBeginBlock), - "deliverTxs" | "deliver_txs" => Ok(GeneratedField::DeliverTxs), - "requestEndBlock" | "request_end_block" => Ok(GeneratedField::RequestEndBlock), - "responseEndBlock" | "response_end_block" => Ok(GeneratedField::ResponseEndBlock), - "responseCommit" | "response_commit" => Ok(GeneratedField::ResponseCommit), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BlockMetadata; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut request_begin_block__ = None; - let mut response_begin_block__ = None; - let mut deliver_txs__ = None; - let mut request_end_block__ = None; - let mut response_end_block__ = None; - let mut response_commit__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::RequestBeginBlock => { - if request_begin_block__.is_some() { - return Err(serde::de::Error::duplicate_field("requestBeginBlock")); - } - request_begin_block__ = map_.next_value()?; - } - GeneratedField::ResponseBeginBlock => { - if response_begin_block__.is_some() { - return Err(serde::de::Error::duplicate_field("responseBeginBlock")); - } - response_begin_block__ = map_.next_value()?; - } - GeneratedField::DeliverTxs => { - if deliver_txs__.is_some() { - return Err(serde::de::Error::duplicate_field("deliverTxs")); - } - deliver_txs__ = Some(map_.next_value()?); - } - GeneratedField::RequestEndBlock => { - if request_end_block__.is_some() { - return Err(serde::de::Error::duplicate_field("requestEndBlock")); - } - request_end_block__ = map_.next_value()?; - } - GeneratedField::ResponseEndBlock => { - if response_end_block__.is_some() { - return Err(serde::de::Error::duplicate_field("responseEndBlock")); - } - response_end_block__ = map_.next_value()?; - } - GeneratedField::ResponseCommit => { - if response_commit__.is_some() { - return Err(serde::de::Error::duplicate_field("responseCommit")); - } - response_commit__ = map_.next_value()?; - } - } - } - Ok(BlockMetadata { - request_begin_block: request_begin_block__, - response_begin_block: response_begin_block__, - deliver_txs: deliver_txs__.unwrap_or_default(), - request_end_block: request_end_block__, - response_end_block: response_end_block__, - response_commit: response_commit__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.BlockMetadata", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for block_metadata::DeliverTx { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.BlockMetadata.DeliverTx", len)?; - if let Some(v) = self.request.as_ref() { - struct_ser.serialize_field("request", v)?; - } - if let Some(v) = self.response.as_ref() { - struct_ser.serialize_field("response", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for block_metadata::DeliverTx { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "request", - "response", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Request, - Response, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "request" => Ok(GeneratedField::Request), - "response" => Ok(GeneratedField::Response), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = block_metadata::DeliverTx; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.BlockMetadata.DeliverTx") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut request__ = None; - let mut response__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Request => { - if request__.is_some() { - return Err(serde::de::Error::duplicate_field("request")); - } - request__ = map_.next_value()?; - } - GeneratedField::Response => { - if response__.is_some() { - return Err(serde::de::Error::duplicate_field("response")); - } - response__ = map_.next_value()?; - } - } - } - Ok(block_metadata::DeliverTx { - request: request__, - response: response__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.BlockMetadata.DeliverTx", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CommitId { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.CommitID", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("hash", pbjson::private::base64::encode(&self.hash).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CommitId { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "version", - "hash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Version, - Hash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "version" => Ok(GeneratedField::Version), - "hash" => Ok(GeneratedField::Hash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CommitId; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.CommitID") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut version__ = None; - let mut hash__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(CommitId { - version: version__.unwrap_or_default(), - hash: hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.CommitID", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CommitInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.CommitInfo", len)?; - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("version", ::alloc::string::ToString::to_string(&self.version).as_str())?; - } - if true { - struct_ser.serialize_field("storeInfos", &self.store_infos)?; - } - if let Some(v) = self.timestamp.as_ref() { - struct_ser.serialize_field("timestamp", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CommitInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "version", - "store_infos", - "storeInfos", - "timestamp", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Version, - StoreInfos, - Timestamp, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "version" => Ok(GeneratedField::Version), - "storeInfos" | "store_infos" => Ok(GeneratedField::StoreInfos), - "timestamp" => Ok(GeneratedField::Timestamp), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CommitInfo; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.CommitInfo") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut version__ = None; - let mut store_infos__ = None; - let mut timestamp__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::StoreInfos => { - if store_infos__.is_some() { - return Err(serde::de::Error::duplicate_field("storeInfos")); - } - store_infos__ = Some(map_.next_value()?); - } - GeneratedField::Timestamp => { - if timestamp__.is_some() { - return Err(serde::de::Error::duplicate_field("timestamp")); - } - timestamp__ = map_.next_value()?; - } - } - } - Ok(CommitInfo { - version: version__.unwrap_or_default(), - store_infos: store_infos__.unwrap_or_default(), - timestamp: timestamp__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.CommitInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for StoreInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.StoreInfo", len)?; - if true { - struct_ser.serialize_field("name", &self.name)?; - } - if let Some(v) = self.commit_id.as_ref() { - struct_ser.serialize_field("commitId", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for StoreInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "name", - "commit_id", - "commitId", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Name, - CommitId, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "name" => Ok(GeneratedField::Name), - "commitId" | "commit_id" => Ok(GeneratedField::CommitId), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StoreInfo; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.StoreInfo") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut name__ = None; - let mut commit_id__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::Name => { - if name__.is_some() { - return Err(serde::de::Error::duplicate_field("name")); - } - name__ = Some(map_.next_value()?); - } - GeneratedField::CommitId => { - if commit_id__.is_some() { - return Err(serde::de::Error::duplicate_field("commitId")); - } - commit_id__ = map_.next_value()?; - } - } - } - Ok(StoreInfo { - name: name__.unwrap_or_default(), - commit_id: commit_id__, - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.StoreInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for StoreKvPair { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> core::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - if true { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("cosmos.base.store.v1beta1.StoreKVPair", len)?; - if true { - struct_ser.serialize_field("storeKey", &self.store_key)?; - } - if true { - struct_ser.serialize_field("delete", &self.delete)?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("key", pbjson::private::base64::encode(&self.key).as_str())?; - } - if true { - #[allow(clippy::needless_borrow)] - struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for StoreKvPair { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "store_key", - "storeKey", - "delete", - "key", - "value", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - StoreKey, - Delete, - Key, - Value, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> core::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> core::result::Result - where - E: serde::de::Error, - { - match value { - "storeKey" | "store_key" => Ok(GeneratedField::StoreKey), - "delete" => Ok(GeneratedField::Delete), - "key" => Ok(GeneratedField::Key), - "value" => Ok(GeneratedField::Value), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = StoreKvPair; - - fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - formatter.write_str("struct cosmos.base.store.v1beta1.StoreKVPair") - } - - fn visit_map(self, mut map_: V) -> core::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut store_key__ = None; - let mut delete__ = None; - let mut key__ = None; - let mut value__ = None; - while let Some(k) = map_.next_key()? { - match k { - GeneratedField::StoreKey => { - if store_key__.is_some() { - return Err(serde::de::Error::duplicate_field("storeKey")); - } - store_key__ = Some(map_.next_value()?); - } - GeneratedField::Delete => { - if delete__.is_some() { - return Err(serde::de::Error::duplicate_field("delete")); - } - delete__ = Some(map_.next_value()?); - } - GeneratedField::Key => { - if key__.is_some() { - return Err(serde::de::Error::duplicate_field("key")); - } - key__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(StoreKvPair { - store_key: store_key__.unwrap_or_default(), - delete: delete__.unwrap_or_default(), - key: key__.unwrap_or_default(), - value: value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("cosmos.base.store.v1beta1.StoreKVPair", FIELDS, GeneratedVisitor) - } -} diff --git a/src/prost/cosmos.base.tendermint.v1beta1.rs b/src/prost/cosmos.base.tendermint.v1beta1.rs index cfe28288..24bbd792 100644 --- a/src/prost/cosmos.base.tendermint.v1beta1.rs +++ b/src/prost/cosmos.base.tendermint.v1beta1.rs @@ -6,11 +6,11 @@ pub struct Block { #[prost(message, optional, tag = "1")] pub header: ::core::option::Option
, #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option<::cometbft_proto::types::Data>, + pub data: ::core::option::Option<::cometbft_proto::types::v1::Data>, #[prost(message, optional, tag = "3")] - pub evidence: ::core::option::Option<::cometbft_proto::types::EvidenceList>, + pub evidence: ::core::option::Option<::cometbft_proto::types::v1::EvidenceList>, #[prost(message, optional, tag = "4")] - pub last_commit: ::core::option::Option<::cometbft_proto::types::Commit>, + pub last_commit: ::core::option::Option<::cometbft_proto::types::v1::Commit>, } impl ::prost::Name for Block { const NAME: &'static str = "Block"; @@ -25,7 +25,7 @@ impl ::prost::Name for Block { pub struct Header { /// basic block info #[prost(message, optional, tag = "1")] - pub version: ::core::option::Option<::cometbft_proto::version::Consensus>, + pub version: ::core::option::Option<::cometbft_proto::version::v1::Consensus>, #[prost(string, tag = "2")] pub chain_id: ::prost::alloc::string::String, #[prost(int64, tag = "3")] @@ -36,7 +36,7 @@ pub struct Header { >, /// prev block info #[prost(message, optional, tag = "5")] - pub last_block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, + pub last_block_id: ::core::option::Option<::cometbft_proto::types::v1::BlockId>, /// hashes of block data /// /// commit from validators from the last block @@ -193,10 +193,10 @@ impl ::prost::Name for GetBlockByHeightRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBlockByHeightResponse { #[prost(message, optional, tag = "1")] - pub block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, + pub block_id: ::core::option::Option<::cometbft_proto::types::v1::BlockId>, /// Deprecated: please use `sdk_block` instead #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option<::cometbft_proto::types::Block>, + pub block: ::core::option::Option<::cometbft_proto::types::v1::Block>, /// Since: cosmos-sdk 0.47 #[prost(message, optional, tag = "3")] pub sdk_block: ::core::option::Option, @@ -224,10 +224,10 @@ impl ::prost::Name for GetLatestBlockRequest { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetLatestBlockResponse { #[prost(message, optional, tag = "1")] - pub block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, + pub block_id: ::core::option::Option<::cometbft_proto::types::v1::BlockId>, /// Deprecated: please use `sdk_block` instead #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option<::cometbft_proto::types::Block>, + pub block: ::core::option::Option<::cometbft_proto::types::v1::Block>, /// Since: cosmos-sdk 0.47 #[prost(message, optional, tag = "3")] pub sdk_block: ::core::option::Option, @@ -281,7 +281,7 @@ impl ::prost::Name for GetNodeInfoRequest { pub struct GetNodeInfoResponse { #[prost(message, optional, tag = "1")] pub default_node_info: ::core::option::Option< - ::cometbft_proto::p2p::DefaultNodeInfo, + ::cometbft_proto::p2p::v1::DefaultNodeInfo, >, #[prost(message, optional, tag = "2")] pub application_version: ::core::option::Option, diff --git a/src/prost/cosmos.base.v1beta1.rs b/src/prost/cosmos.base.v1beta1.rs index e3497310..a1b0c37d 100644 --- a/src/prost/cosmos.base.v1beta1.rs +++ b/src/prost/cosmos.base.v1beta1.rs @@ -37,6 +37,7 @@ impl ::prost::Name for DecCoin { } } /// IntProto defines a Protobuf wrapper around an Int object. +/// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct IntProto { @@ -51,6 +52,7 @@ impl ::prost::Name for IntProto { } } /// DecProto defines a Protobuf wrapper around a Dec object. +/// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecProto { diff --git a/src/prost/cosmos.crypto.ed25519.rs b/src/prost/cosmos.crypto.ed25519.rs index 4195c048..895b751f 100644 --- a/src/prost/cosmos.crypto.ed25519.rs +++ b/src/prost/cosmos.crypto.ed25519.rs @@ -16,7 +16,7 @@ impl ::prost::Name for PubKey { ::prost::alloc::format!("cosmos.crypto.ed25519.{}", Self::NAME) } } -/// Deprecated: PrivKey defines a ed25519 private key. +/// PrivKey defines a ed25519 private key. /// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/prost/cosmos.gov.v1.rs b/src/prost/cosmos.gov.v1.rs index feb0a17d..4e8b9519 100644 --- a/src/prost/cosmos.gov.v1.rs +++ b/src/prost/cosmos.gov.v1.rs @@ -80,6 +80,8 @@ pub struct Proposal { super::super::super::google::protobuf::Timestamp, >, /// metadata is any arbitrary metadata attached to the proposal. + /// the recommended format of the metadata is to be found here: + /// #[prost(string, tag = "10")] pub metadata: ::prost::alloc::string::String, /// title is the title of the proposal @@ -92,11 +94,21 @@ pub struct Proposal { /// Since: cosmos-sdk 0.47 #[prost(string, tag = "12")] pub summary: ::prost::alloc::string::String, - /// Proposer is the address of the proposal sumbitter + /// proposer is the address of the proposal sumbitter /// /// Since: cosmos-sdk 0.47 #[prost(string, tag = "13")] pub proposer: ::prost::alloc::string::String, + /// expedited defines if the proposal is expedited + /// + /// Since: cosmos-sdk 0.50 + #[prost(bool, tag = "14")] + pub expedited: bool, + /// failed_reason defines the reason why the proposal failed + /// + /// Since: cosmos-sdk 0.50 + #[prost(string, tag = "15")] + pub failed_reason: ::prost::alloc::string::String, } impl ::prost::Name for Proposal { const NAME: &'static str = "Proposal"; @@ -143,7 +155,8 @@ pub struct Vote { /// options is the weighted vote options. #[prost(message, repeated, tag = "4")] pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata to attached to the vote. + /// metadata is any arbitrary metadata attached to the vote. + /// the recommended format of the metadata is to be found here: #[prost(string, tag = "5")] pub metadata: ::prost::alloc::string::String, } @@ -249,6 +262,34 @@ pub struct Params { /// The ratio representing the proportion of the deposit value that must be paid at proposal submission. #[prost(string, tag = "7")] pub min_initial_deposit_ratio: ::prost::alloc::string::String, + /// The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. + /// + /// Since: cosmos-sdk 0.50 + #[prost(string, tag = "8")] + pub proposal_cancel_ratio: ::prost::alloc::string::String, + /// The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + /// If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + /// + /// Since: cosmos-sdk 0.50 + #[prost(string, tag = "9")] + pub proposal_cancel_dest: ::prost::alloc::string::String, + /// Duration of the voting period of an expedited proposal. + /// + /// Since: cosmos-sdk 0.50 + #[prost(message, optional, tag = "10")] + pub expedited_voting_period: ::core::option::Option< + super::super::super::google::protobuf::Duration, + >, + /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. + /// + /// Since: cosmos-sdk 0.50 + #[prost(string, tag = "11")] + pub expedited_threshold: ::prost::alloc::string::String, + /// Minimum expedited deposit for a proposal to enter voting period. + #[prost(message, repeated, tag = "12")] + pub expedited_min_deposit: ::prost::alloc::vec::Vec< + super::super::base::v1beta1::Coin, + >, /// burn deposits if a proposal does not meet quorum #[prost(bool, tag = "13")] pub burn_vote_quorum: bool, @@ -258,6 +299,13 @@ pub struct Params { /// burn deposits if quorum with vote type no_veto is met #[prost(bool, tag = "15")] pub burn_vote_veto: bool, + /// The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. + /// Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be + /// required. + /// + /// Since: cosmos-sdk 0.50 + #[prost(string, tag = "16")] + pub min_deposit_ratio: ::prost::alloc::string::String, } impl ::prost::Name for Params { const NAME: &'static str = "Params"; @@ -357,236 +405,396 @@ impl ProposalStatus { } } } -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. +/// GenesisState defines the gov module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// messages are the arbitrary messages to be executed if proposal passes. - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec, - /// initial_deposit is the deposit value that must be paid at proposal submission. +pub struct GenesisState { + /// starting_proposal_id is the ID of the starting proposal. + #[prost(uint64, tag = "1")] + pub starting_proposal_id: u64, + /// deposits defines all the deposits present at genesis. #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// title is the title of the proposal. + pub deposits: ::prost::alloc::vec::Vec, + /// votes defines all the votes present at genesis. + #[prost(message, repeated, tag = "3")] + pub votes: ::prost::alloc::vec::Vec, + /// proposals defines all the proposals present at genesis. + #[prost(message, repeated, tag = "4")] + pub proposals: ::prost::alloc::vec::Vec, + /// Deprecated: Prefer to use `params` instead. + /// deposit_params defines all the paramaters of related to deposit. + #[deprecated] + #[prost(message, optional, tag = "5")] + pub deposit_params: ::core::option::Option, + /// Deprecated: Prefer to use `params` instead. + /// voting_params defines all the paramaters of related to voting. + #[deprecated] + #[prost(message, optional, tag = "6")] + pub voting_params: ::core::option::Option, + /// Deprecated: Prefer to use `params` instead. + /// tally_params defines all the paramaters of related to tally. + #[deprecated] + #[prost(message, optional, tag = "7")] + pub tally_params: ::core::option::Option, + /// params defines all the paramaters of x/gov module. /// /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "5")] - pub title: ::prost::alloc::string::String, - /// summary is the summary of the proposal + #[prost(message, optional, tag = "8")] + pub params: ::core::option::Option, + /// The constitution allows builders to lay a foundation and define purpose. + /// This is an immutable string set in genesis. + /// There are no amendments, to go outside of scope, just fork. + /// constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals. /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "6")] - pub summary: ::prost::alloc::string::String, + /// Since: cosmos-sdk 0.50 + #[prost(string, tag = "9")] + pub constitution: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +/// QueryConstitutionRequest is the request type for the Query/Constitution RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, +pub struct QueryConstitutionRequest {} +impl ::prost::Name for QueryConstitutionRequest { + const NAME: &'static str = "QueryConstitutionRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } } -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; +/// QueryConstitutionResponse is the response type for the Query/Constitution RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryConstitutionResponse { + #[prost(string, tag = "1")] + pub constitution: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryConstitutionResponse { + const NAME: &'static str = "QueryConstitutionResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgExecLegacyContent is used to wrap the legacy content field into a message. -/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. +/// QueryProposalRequest is the request type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContent { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option, - /// authority must be the gov module address. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, +pub struct QueryProposalRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, } -impl ::prost::Name for MsgExecLegacyContent { - const NAME: &'static str = "MsgExecLegacyContent"; +impl ::prost::Name for QueryProposalRequest { + const NAME: &'static str = "QueryProposalRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. +/// QueryProposalResponse is the response type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgExecLegacyContentResponse {} -impl ::prost::Name for MsgExecLegacyContentResponse { - const NAME: &'static str = "MsgExecLegacyContentResponse"; +pub struct QueryProposalResponse { + /// proposal is the requested governance proposal. + #[prost(message, optional, tag = "1")] + pub proposal: ::core::option::Option, +} +impl ::prost::Name for QueryProposalResponse { + const NAME: &'static str = "QueryProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVote defines a message to cast a vote. +/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter is the voter address for the proposal. +pub struct QueryProposalsRequest { + /// proposal_status defines the status of the proposals. + #[prost(enumeration = "ProposalStatus", tag = "1")] + pub proposal_status: i32, + /// voter defines the voter address for the proposals. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, - /// metadata is any arbitrary metadata attached to the Vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, + /// depositor defines the deposit addresses from the proposals. + #[prost(string, tag = "3")] + pub depositor: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "4")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; +impl ::prost::Name for QueryProposalsRequest { + const NAME: &'static str = "QueryProposalsRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVoteResponse defines the Msg/Vote response type. +/// QueryProposalsResponse is the response type for the Query/Proposals RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; +pub struct QueryProposalsResponse { + /// proposals defines all the requested governance proposals. + #[prost(message, repeated, tag = "1")] + pub proposals: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryProposalsResponse { + const NAME: &'static str = "QueryProposalsResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVoteWeighted defines a message to cast a vote. +/// QueryVoteRequest is the request type for the Query/Vote RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { +pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// voter is the voter address for the proposal. + /// voter defines the voter address for the proposals. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata attached to the VoteWeighted. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for MsgVoteWeighted { - const NAME: &'static str = "MsgVoteWeighted"; +impl ::prost::Name for QueryVoteRequest { + const NAME: &'static str = "QueryVoteRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +/// QueryVoteResponse is the response type for the Query/Vote RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -impl ::prost::Name for MsgVoteWeightedResponse { - const NAME: &'static str = "MsgVoteWeightedResponse"; +pub struct QueryVoteResponse { + /// vote defines the queried vote. + #[prost(message, optional, tag = "1")] + pub vote: ::core::option::Option, +} +impl ::prost::Name for QueryVoteResponse { + const NAME: &'static str = "QueryVoteResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgDeposit defines a message to submit a deposit to an existing proposal. +/// QueryVotesRequest is the request type for the Query/Votes RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { +pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgDeposit { - const NAME: &'static str = "MsgDeposit"; +impl ::prost::Name for QueryVotesRequest { + const NAME: &'static str = "QueryVotesRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgDepositResponse defines the Msg/Deposit response type. +/// QueryVotesResponse is the response type for the Query/Votes RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -impl ::prost::Name for MsgDepositResponse { - const NAME: &'static str = "MsgDepositResponse"; +pub struct QueryVotesResponse { + /// votes defines the queried votes. + #[prost(message, repeated, tag = "1")] + pub votes: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryVotesResponse { + const NAME: &'static str = "QueryVotesResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). +pub struct QueryParamsRequest { + /// params_type defines which parameters to query for, can be one of "voting", + /// "tallying" or "deposit". #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/gov parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, + pub params_type: ::prost::alloc::string::String, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) +pub struct QueryParamsResponse { + /// Deprecated: Prefer to use `params` instead. + /// voting_params defines the parameters related to voting. + #[deprecated] + #[prost(message, optional, tag = "1")] + pub voting_params: ::core::option::Option, + /// Deprecated: Prefer to use `params` instead. + /// deposit_params defines the parameters related to deposit. + #[deprecated] + #[prost(message, optional, tag = "2")] + pub deposit_params: ::core::option::Option, + /// Deprecated: Prefer to use `params` instead. + /// tally_params defines the parameters related to tally. + #[deprecated] + #[prost(message, optional, tag = "3")] + pub tally_params: ::core::option::Option, + /// params defines all the paramaters of x/gov module. + /// + /// Since: cosmos-sdk 0.47 + #[prost(message, optional, tag = "4")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// QueryDepositRequest is the request type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// depositor defines the deposit addresses from the proposals. + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryDepositRequest { + const NAME: &'static str = "QueryDepositRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// QueryDepositResponse is the response type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositResponse { + /// deposit defines the requested deposit. + #[prost(message, optional, tag = "1")] + pub deposit: ::core::option::Option, +} +impl ::prost::Name for QueryDepositResponse { + const NAME: &'static str = "QueryDepositResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositsRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryDepositsRequest { + const NAME: &'static str = "QueryDepositsRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositsResponse { + /// deposits defines the requested deposits. + #[prost(message, repeated, tag = "1")] + pub deposits: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDepositsResponse { + const NAME: &'static str = "QueryDepositsResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTallyResultRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, +} +impl ::prost::Name for QueryTallyResultRequest { + const NAME: &'static str = "QueryTallyResultRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTallyResultResponse { + /// tally defines the requested tally. + #[prost(message, optional, tag = "1")] + pub tally: ::core::option::Option, +} +impl ::prost::Name for QueryTallyResultResponse { + const NAME: &'static str = "QueryTallyResultResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the gov Msg service. + /// Query defines the gRPC querier service for gov module #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -597,7 +805,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -615,7 +823,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -629,7 +837,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -662,12 +870,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// SubmitProposal defines a method to create new proposal given the messages. - pub async fn submit_proposal( + /// Constitution queries the chain's constitution. + pub async fn constitution( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -681,20 +889,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Msg/SubmitProposal", + "/cosmos.gov.v1.Query/Constitution", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "SubmitProposal")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Constitution")); self.inner.unary(req, path, codec).await } - /// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - /// to execute a legacy content-based proposal. - pub async fn exec_legacy_content( + /// Proposal queries proposal details based on ProposalID. + pub async fn proposal( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -708,19 +915,45 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Msg/ExecLegacyContent", + "/cosmos.gov.v1.Query/Proposal", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "ExecLegacyContent")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposal")); self.inner.unary(req, path, codec).await } - /// Vote defines a method to add a vote on a specific proposal. + /// Proposals queries all proposals based on given status. + pub async fn proposals( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1.Query/Proposals", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposals")); + self.inner.unary(req, path, codec).await + } + /// Vote queries voted information based on proposalID, voterAddr. pub async fn vote( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -733,17 +966,17 @@ pub mod msg_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/Vote"); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Vote"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Vote")); + req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Query", "Vote")); self.inner.unary(req, path, codec).await } - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - pub async fn vote_weighted( + /// Votes queries votes of a given proposal. + pub async fn votes( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -757,19 +990,44 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Msg/VoteWeighted", + "/cosmos.gov.v1.Query/Votes", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Query", "Votes")); + self.inner.unary(req, path, codec).await + } + /// Params queries all parameters of the gov module. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1.Query/Params", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "VoteWeighted")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Params")); self.inner.unary(req, path, codec).await } - /// Deposit defines a method to add deposit on a specific proposal. + /// Deposit queries single deposit information based on proposalID, depositAddr. pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -783,21 +1041,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Msg/Deposit", + "/cosmos.gov.v1.Query/Deposit", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Deposit")); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposit")); self.inner.unary(req, path, codec).await } - /// UpdateParams defines a governance operation for updating the x/gov module - /// parameters. The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - pub async fn update_params( + /// Deposits queries all deposits of a single proposal. + pub async fn deposits( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -811,76 +1067,125 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Msg/UpdateParams", + "/cosmos.gov.v1.Query/Deposits", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "UpdateParams")); + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposits")); + self.inner.unary(req, path, codec).await + } + /// TallyResult queries the tally of a proposal vote. + pub async fn tally_result( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1.Query/TallyResult", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1.Query", "TallyResult")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// SubmitProposal defines a method to create new proposal given the messages. - async fn submit_proposal( + pub trait Query: Send + Sync + 'static { + /// Constitution queries the chain's constitution. + async fn constitution( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Proposal queries proposal details based on ProposalID. + async fn proposal( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - /// to execute a legacy content-based proposal. - async fn exec_legacy_content( + /// Proposals queries all proposals based on given status. + async fn proposals( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Vote defines a method to add a vote on a specific proposal. + /// Vote queries voted information based on proposalID, voterAddr. async fn vote( &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - async fn vote_weighted( + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Votes queries votes of a given proposal. + async fn votes( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Deposit defines a method to add deposit on a specific proposal. + /// Params queries all parameters of the gov module. + async fn params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Deposit queries single deposit information based on proposalID, depositAddr. async fn deposit( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateParams defines a governance operation for updating the x/gov module - /// parameters. The authority is defined in the keeper. - /// - /// Since: cosmos-sdk 0.47 - async fn update_params( + /// Deposits queries all deposits of a single proposal. + async fn deposits( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// TallyResult queries the tally of a proposal vote. + async fn tally_result( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the gov Msg service. + /// Query defines the gRPC querier service for gov module #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -888,7 +1193,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -940,9 +1245,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -958,23 +1263,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.gov.v1.Msg/SubmitProposal" => { + "/cosmos.gov.v1.Query/Constitution" => { #[allow(non_camel_case_types)] - struct SubmitProposalSvc(pub Arc); - impl tonic::server::UnaryService - for SubmitProposalSvc { - type Response = super::MsgSubmitProposalResponse; + struct ConstitutionSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ConstitutionSvc { + type Response = super::QueryConstitutionResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::submit_proposal(&inner, request).await + ::constitution(&inner, request).await }; Box::pin(fut) } @@ -986,7 +1293,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = SubmitProposalSvc(inner); + let method = ConstitutionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1002,23 +1309,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Msg/ExecLegacyContent" => { + "/cosmos.gov.v1.Query/Proposal" => { #[allow(non_camel_case_types)] - struct ExecLegacyContentSvc(pub Arc); - impl tonic::server::UnaryService - for ExecLegacyContentSvc { - type Response = super::MsgExecLegacyContentResponse; + struct ProposalSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ProposalSvc { + type Response = super::QueryProposalResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::exec_legacy_content(&inner, request).await + ::proposal(&inner, request).await }; Box::pin(fut) } @@ -1030,7 +1339,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ExecLegacyContentSvc(inner); + let method = ProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1046,23 +1355,69 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Msg/Vote" => { + "/cosmos.gov.v1.Query/Proposals" => { #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService + struct ProposalsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ProposalsSvc { + type Response = super::QueryProposalsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::proposals(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ProposalsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1.Query/Vote" => { + #[allow(non_camel_case_types)] + struct VoteSvc(pub Arc); + impl tonic::server::UnaryService for VoteSvc { - type Response = super::MsgVoteResponse; + type Response = super::QueryVoteResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::vote(&inner, request).await + ::vote(&inner, request).await }; Box::pin(fut) } @@ -1090,23 +1445,113 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Msg/VoteWeighted" => { + "/cosmos.gov.v1.Query/Votes" => { #[allow(non_camel_case_types)] - struct VoteWeightedSvc(pub Arc); - impl tonic::server::UnaryService - for VoteWeightedSvc { - type Response = super::MsgVoteWeightedResponse; + struct VotesSvc(pub Arc); + impl tonic::server::UnaryService + for VotesSvc { + type Response = super::QueryVotesResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::votes(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = VotesSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1.Query/Params" => { + #[allow(non_camel_case_types)] + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1.Query/Deposit" => { + #[allow(non_camel_case_types)] + struct DepositSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DepositSvc { + type Response = super::QueryDepositResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::vote_weighted(&inner, request).await + ::deposit(&inner, request).await }; Box::pin(fut) } @@ -1118,7 +1563,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = VoteWeightedSvc(inner); + let method = DepositSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1134,23 +1579,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Msg/Deposit" => { + "/cosmos.gov.v1.Query/Deposits" => { #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl tonic::server::UnaryService - for DepositSvc { - type Response = super::MsgDepositResponse; + struct DepositsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DepositsSvc { + type Response = super::QueryDepositsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::deposit(&inner, request).await + ::deposits(&inner, request).await }; Box::pin(fut) } @@ -1162,7 +1609,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DepositSvc(inner); + let method = DepositsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1178,23 +1625,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Msg/UpdateParams" => { + "/cosmos.gov.v1.Query/TallyResult" => { #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct TallyResultSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for TallyResultSvc { + type Response = super::QueryTallyResultResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_params(&inner, request).await + ::tally_result(&inner, request).await }; Box::pin(fut) } @@ -1206,7 +1655,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateParamsSvc(inner); + let method = TallyResultSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1237,7 +1686,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1249,7 +1698,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1259,306 +1708,274 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "cosmos.gov.v1.Msg"; + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "cosmos.gov.v1.Query"; } } -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. +/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +/// proposal Content. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, +pub struct MsgSubmitProposal { + /// messages are the arbitrary messages to be executed if proposal passes. + #[prost(message, repeated, tag = "1")] + pub messages: ::prost::alloc::vec::Vec, + /// initial_deposit is the deposit value that must be paid at proposal submission. + #[prost(message, repeated, tag = "2")] + pub initial_deposit: ::prost::alloc::vec::Vec, + /// proposer is the account address of the proposer. + #[prost(string, tag = "3")] + pub proposer: ::prost::alloc::string::String, + /// metadata is any arbitrary metadata attached to the proposal. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, + /// title is the title of the proposal. + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, tag = "5")] + pub title: ::prost::alloc::string::String, + /// summary is the summary of the proposal + /// + /// Since: cosmos-sdk 0.47 + #[prost(string, tag = "6")] + pub summary: ::prost::alloc::string::String, + /// expedited defines if the proposal is expedited or not + /// + /// Since: cosmos-sdk 0.50 + #[prost(bool, tag = "7")] + pub expedited: bool, } -impl ::prost::Name for QueryProposalRequest { - const NAME: &'static str = "QueryProposalRequest"; +impl ::prost::Name for MsgSubmitProposal { + const NAME: &'static str = "MsgSubmitProposal"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. +/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - /// proposal is the requested governance proposal. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, +pub struct MsgSubmitProposalResponse { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, } -impl ::prost::Name for QueryProposalResponse { - const NAME: &'static str = "QueryProposalResponse"; +impl ::prost::Name for MsgSubmitProposalResponse { + const NAME: &'static str = "MsgSubmitProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +/// MsgExecLegacyContent is used to wrap the legacy content field into a message. +/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. +pub struct MsgExecLegacyContent { + /// content is the proposal's content. + #[prost(message, optional, tag = "1")] + pub content: ::core::option::Option, + /// authority must be the gov module address. #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, + pub authority: ::prost::alloc::string::String, } -impl ::prost::Name for QueryProposalsRequest { - const NAME: &'static str = "QueryProposalsRequest"; +impl ::prost::Name for MsgExecLegacyContent { + const NAME: &'static str = "MsgExecLegacyContent"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. +/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryProposalsResponse { - const NAME: &'static str = "QueryProposalsResponse"; +pub struct MsgExecLegacyContentResponse {} +impl ::prost::Name for MsgExecLegacyContentResponse { + const NAME: &'static str = "MsgExecLegacyContentResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVoteRequest is the request type for the Query/Vote RPC method. +/// MsgVote defines a message to cast a vote. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteRequest { +pub struct MsgVote { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// voter defines the voter address for the proposals. + /// voter is the voter address for the proposal. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, + /// option defines the vote option. + #[prost(enumeration = "VoteOption", tag = "3")] + pub option: i32, + /// metadata is any arbitrary metadata attached to the Vote. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryVoteRequest { - const NAME: &'static str = "QueryVoteRequest"; +impl ::prost::Name for MsgVote { + const NAME: &'static str = "MsgVote"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVoteResponse is the response type for the Query/Vote RPC method. +/// MsgVoteResponse defines the Msg/Vote response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -impl ::prost::Name for QueryVoteResponse { - const NAME: &'static str = "QueryVoteResponse"; +pub struct MsgVoteResponse {} +impl ::prost::Name for MsgVoteResponse { + const NAME: &'static str = "MsgVoteResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryVotesRequest is the request type for the Query/Votes RPC method. +/// MsgVoteWeighted defines a message to cast a vote. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesRequest { +pub struct MsgVoteWeighted { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryVotesRequest { - const NAME: &'static str = "QueryVotesRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryVotesResponse { - const NAME: &'static str = "QueryVotesResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". - #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) - } -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines the parameters related to voting. - #[deprecated] - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines the parameters related to deposit. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines the parameters related to tally. - #[deprecated] - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, + /// voter is the voter address for the proposal. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// options defines the weighted vote options. + #[prost(message, repeated, tag = "3")] + pub options: ::prost::alloc::vec::Vec, + /// metadata is any arbitrary metadata attached to the VoteWeighted. + #[prost(string, tag = "4")] + pub metadata: ::prost::alloc::string::String, } -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +impl ::prost::Name for MsgVoteWeighted { + const NAME: &'static str = "MsgVoteWeighted"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. +/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositRequest { +pub struct MsgVoteWeightedResponse {} +impl ::prost::Name for MsgVoteWeightedResponse { + const NAME: &'static str = "MsgVoteWeightedResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + } +} +/// MsgDeposit defines a message to submit a deposit to an existing proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDeposit { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "2")] pub depositor: ::prost::alloc::string::String, + /// amount to be deposited by depositor. + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryDepositRequest { - const NAME: &'static str = "QueryDepositRequest"; +impl ::prost::Name for MsgDeposit { + const NAME: &'static str = "MsgDeposit"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. +/// MsgDepositResponse defines the Msg/Deposit response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -impl ::prost::Name for QueryDepositResponse { - const NAME: &'static str = "QueryDepositResponse"; +pub struct MsgDepositResponse {} +impl ::prost::Name for MsgDepositResponse { + const NAME: &'static str = "MsgDepositResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/gov parameters to update. + /// + /// NOTE: All parameters must be supplied. #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, + pub params: ::core::option::Option, } -impl ::prost::Name for QueryDepositsRequest { - const NAME: &'static str = "QueryDepositsRequest"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDepositsResponse { - const NAME: &'static str = "QueryDepositsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +/// MsgCancelProposal is the Msg/CancelProposal request type. +/// +/// Since: cosmos-sdk 0.50 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { +pub struct MsgCancelProposal { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, + /// proposer is the account address of the proposer. + #[prost(string, tag = "2")] + pub proposer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryTallyResultRequest { - const NAME: &'static str = "QueryTallyResultRequest"; +impl ::prost::Name for MsgCancelProposal { + const NAME: &'static str = "MsgCancelProposal"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) } } -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +/// MsgCancelProposalResponse defines the response structure for executing a +/// MsgCancelProposal message. +/// +/// Since: cosmos-sdk 0.50 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, +pub struct MsgCancelProposalResponse { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// canceled_time is the time when proposal is canceled. + #[prost(message, optional, tag = "2")] + pub canceled_time: ::core::option::Option< + super::super::super::google::protobuf::Timestamp, + >, + /// canceled_height defines the block height at which the proposal is canceled. + #[prost(uint64, tag = "3")] + pub canceled_height: u64, } -impl ::prost::Name for QueryTallyResultResponse { - const NAME: &'static str = "QueryTallyResultResponse"; +impl ::prost::Name for MsgCancelProposalResponse { + const NAME: &'static str = "MsgCancelProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) @@ -1566,16 +1983,16 @@ impl ::prost::Name for QueryTallyResultResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service for gov module + /// Msg defines the gov Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -1586,7 +2003,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -1604,7 +2021,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -1618,7 +2035,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -1651,12 +2068,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Proposal queries proposal details based on ProposalID. - pub async fn proposal( + /// SubmitProposal defines a method to create new proposal given the messages. + pub async fn submit_proposal( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1670,19 +2087,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/Proposal", + "/cosmos.gov.v1.Msg/SubmitProposal", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposal")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "SubmitProposal")); self.inner.unary(req, path, codec).await } - /// Proposals queries all proposals based on given status. - pub async fn proposals( + /// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal + /// to execute a legacy content-based proposal. + pub async fn exec_legacy_content( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1696,42 +2114,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/Proposals", + "/cosmos.gov.v1.Msg/ExecLegacyContent", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Proposals")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "ExecLegacyContent")); self.inner.unary(req, path, codec).await } - /// Vote queries voted information based on proposalID, voterAddr. + /// Vote defines a method to add a vote on a specific proposal. pub async fn vote( &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Query/Vote"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Query", "Vote")); - self.inner.unary(req, path, codec).await - } - /// Votes queries votes of a given proposal. - pub async fn votes( - &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1744,19 +2139,17 @@ pub mod query_client { ) })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/Votes", - ); + let path = http::uri::PathAndQuery::from_static("/cosmos.gov.v1.Msg/Vote"); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Query", "Votes")); + req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Vote")); self.inner.unary(req, path, codec).await } - /// Params queries all parameters of the gov module. - pub async fn params( + /// VoteWeighted defines a method to add a weighted vote on a specific proposal. + pub async fn vote_weighted( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1770,19 +2163,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/Params", + "/cosmos.gov.v1.Msg/VoteWeighted", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Params")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "VoteWeighted")); self.inner.unary(req, path, codec).await } - /// Deposit queries single deposit information based proposalID, depositAddr. + /// Deposit defines a method to add deposit on a specific proposal. pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1796,19 +2189,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/Deposit", + "/cosmos.gov.v1.Msg/Deposit", ); let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposit")); + req.extensions_mut().insert(GrpcMethod::new("cosmos.gov.v1.Msg", "Deposit")); self.inner.unary(req, path, codec).await } - /// Deposits queries all deposits of a single proposal. - pub async fn deposits( + /// UpdateParams defines a governance operation for updating the x/gov module + /// parameters. The authority is defined in the keeper. + /// + /// Since: cosmos-sdk 0.47 + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1822,19 +2217,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/Deposits", + "/cosmos.gov.v1.Msg/UpdateParams", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "Deposits")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "UpdateParams")); self.inner.unary(req, path, codec).await } - /// TallyResult queries the tally of a proposal vote. - pub async fn tally_result( + /// CancelProposal defines a method to cancel governance proposal + /// + /// Since: cosmos-sdk 0.50 + pub async fn cancel_proposal( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1848,91 +2245,86 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1.Query/TallyResult", + "/cosmos.gov.v1.Msg/CancelProposal", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1.Query", "TallyResult")); + .insert(GrpcMethod::new("cosmos.gov.v1.Msg", "CancelProposal")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Proposal queries proposal details based on ProposalID. - async fn proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Proposals queries all proposals based on given status. - async fn proposals( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Vote queries voted information based on proposalID, voterAddr. - async fn vote( + pub trait Msg: Send + Sync + 'static { + /// SubmitProposal defines a method to create new proposal given the messages. + async fn submit_proposal( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Votes queries votes of a given proposal. - async fn votes( + /// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal + /// to execute a legacy content-based proposal. + async fn exec_legacy_content( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Params queries all parameters of the gov module. - async fn params( + /// Vote defines a method to add a vote on a specific proposal. + async fn vote( &self, - request: tonic::Request, + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// VoteWeighted defines a method to add a weighted vote on a specific proposal. + async fn vote_weighted( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Deposit queries single deposit information based proposalID, depositAddr. + /// Deposit defines a method to add deposit on a specific proposal. async fn deposit( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Deposits queries all deposits of a single proposal. - async fn deposits( + /// UpdateParams defines a governance operation for updating the x/gov module + /// parameters. The authority is defined in the keeper. + /// + /// Since: cosmos-sdk 0.47 + async fn update_params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// TallyResult queries the tally of a proposal vote. - async fn tally_result( + /// CancelProposal defines a method to cancel governance proposal + /// + /// Since: cosmos-sdk 0.50 + async fn cancel_proposal( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query defines the gRPC querier service for gov module + /// Msg defines the gov Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -1940,7 +2332,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1992,9 +2384,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -2010,25 +2402,23 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.gov.v1.Query/Proposal" => { + "/cosmos.gov.v1.Msg/SubmitProposal" => { #[allow(non_camel_case_types)] - struct ProposalSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalSvc { - type Response = super::QueryProposalResponse; + struct SubmitProposalSvc(pub Arc); + impl tonic::server::UnaryService + for SubmitProposalSvc { + type Response = super::MsgSubmitProposalResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::proposal(&inner, request).await + ::submit_proposal(&inner, request).await }; Box::pin(fut) } @@ -2040,7 +2430,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ProposalSvc(inner); + let method = SubmitProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2056,25 +2446,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Query/Proposals" => { + "/cosmos.gov.v1.Msg/ExecLegacyContent" => { #[allow(non_camel_case_types)] - struct ProposalsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalsSvc { - type Response = super::QueryProposalsResponse; + struct ExecLegacyContentSvc(pub Arc); + impl tonic::server::UnaryService + for ExecLegacyContentSvc { + type Response = super::MsgExecLegacyContentResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::proposals(&inner, request).await + ::exec_legacy_content(&inner, request).await }; Box::pin(fut) } @@ -2086,7 +2474,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ProposalsSvc(inner); + let method = ExecLegacyContentSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2102,23 +2490,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Query/Vote" => { + "/cosmos.gov.v1.Msg/Vote" => { #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService + struct VoteSvc(pub Arc); + impl tonic::server::UnaryService for VoteSvc { - type Response = super::QueryVoteResponse; + type Response = super::MsgVoteResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::vote(&inner, request).await + ::vote(&inner, request).await }; Box::pin(fut) } @@ -2146,67 +2534,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Query/Votes" => { - #[allow(non_camel_case_types)] - struct VotesSvc(pub Arc); - impl tonic::server::UnaryService - for VotesSvc { - type Response = super::QueryVotesResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::votes(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VotesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.gov.v1.Query/Params" => { + "/cosmos.gov.v1.Msg/VoteWeighted" => { #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + struct VoteWeightedSvc(pub Arc); + impl tonic::server::UnaryService + for VoteWeightedSvc { + type Response = super::MsgVoteWeightedResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::vote_weighted(&inner, request).await }; Box::pin(fut) } @@ -2218,7 +2562,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = VoteWeightedSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2234,25 +2578,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Query/Deposit" => { + "/cosmos.gov.v1.Msg/Deposit" => { #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService + struct DepositSvc(pub Arc); + impl tonic::server::UnaryService for DepositSvc { - type Response = super::QueryDepositResponse; + type Response = super::MsgDepositResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::deposit(&inner, request).await + ::deposit(&inner, request).await }; Box::pin(fut) } @@ -2280,25 +2622,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Query/Deposits" => { + "/cosmos.gov.v1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] - struct DepositsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DepositsSvc { - type Response = super::QueryDepositsResponse; + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::deposits(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -2310,7 +2650,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DepositsSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2326,25 +2666,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1.Query/TallyResult" => { + "/cosmos.gov.v1.Msg/CancelProposal" => { #[allow(non_camel_case_types)] - struct TallyResultSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for TallyResultSvc { - type Response = super::QueryTallyResultResponse; + struct CancelProposalSvc(pub Arc); + impl tonic::server::UnaryService + for CancelProposalSvc { + type Response = super::MsgCancelProposalResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::tally_result(&inner, request).await + ::cancel_proposal(&inner, request).await }; Box::pin(fut) } @@ -2356,7 +2694,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TallyResultSvc(inner); + let method = CancelProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2387,7 +2725,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2399,7 +2737,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2409,51 +2747,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "cosmos.gov.v1.Query"; - } -} -/// GenesisState defines the gov module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// starting_proposal_id is the ID of the starting proposal. - #[prost(uint64, tag = "1")] - pub starting_proposal_id: u64, - /// deposits defines all the deposits present at genesis. - #[prost(message, repeated, tag = "2")] - pub deposits: ::prost::alloc::vec::Vec, - /// votes defines all the votes present at genesis. - #[prost(message, repeated, tag = "3")] - pub votes: ::prost::alloc::vec::Vec, - /// proposals defines all the proposals present at genesis. - #[prost(message, repeated, tag = "4")] - pub proposals: ::prost::alloc::vec::Vec, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines all the paramaters of related to deposit. - #[deprecated] - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines all the paramaters of related to voting. - #[deprecated] - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines all the paramaters of related to tally. - #[deprecated] - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "8")] - pub params: ::core::option::Option, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.gov.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "cosmos.gov.v1.Msg"; } } diff --git a/src/prost/cosmos.gov.v1.serde.rs b/src/prost/cosmos.gov.v1.serde.rs index 82932543..4538cd9f 100644 --- a/src/prost/cosmos.gov.v1.serde.rs +++ b/src/prost/cosmos.gov.v1.serde.rs @@ -269,6 +269,9 @@ impl serde::Serialize for GenesisState { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.GenesisState", len)?; if true { #[allow(clippy::needless_borrow)] @@ -295,6 +298,9 @@ impl serde::Serialize for GenesisState { if let Some(v) = self.params.as_ref() { struct_ser.serialize_field("params", v)?; } + if true { + struct_ser.serialize_field("constitution", &self.constitution)?; + } struct_ser.end() } } @@ -317,6 +323,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "tally_params", "tallyParams", "params", + "constitution", ]; #[allow(clippy::enum_variant_names)] @@ -329,6 +336,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { VotingParams, TallyParams, Params, + Constitution, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -358,6 +366,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { "votingParams" | "voting_params" => Ok(GeneratedField::VotingParams), "tallyParams" | "tally_params" => Ok(GeneratedField::TallyParams), "params" => Ok(GeneratedField::Params), + "constitution" => Ok(GeneratedField::Constitution), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -385,6 +394,7 @@ impl<'de> serde::Deserialize<'de> for GenesisState { let mut voting_params__ = None; let mut tally_params__ = None; let mut params__ = None; + let mut constitution__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::StartingProposalId => { @@ -437,6 +447,12 @@ impl<'de> serde::Deserialize<'de> for GenesisState { } params__ = map_.next_value()?; } + GeneratedField::Constitution => { + if constitution__.is_some() { + return Err(serde::de::Error::duplicate_field("constitution")); + } + constitution__ = Some(map_.next_value()?); + } } } Ok(GenesisState { @@ -448,12 +464,259 @@ impl<'de> serde::Deserialize<'de> for GenesisState { voting_params: voting_params__, tally_params: tally_params__, params: params__, + constitution: constitution__.unwrap_or_default(), }) } } deserializer.deserialize_struct("cosmos.gov.v1.GenesisState", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for MsgCancelProposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgCancelProposal", len)?; + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; + } + if true { + struct_ser.serialize_field("proposer", &self.proposer)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCancelProposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_id", + "proposalId", + "proposer", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + Proposer, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "proposer" => Ok(GeneratedField::Proposer), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCancelProposal; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgCancelProposal") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut proposer__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Proposer => { + if proposer__.is_some() { + return Err(serde::de::Error::duplicate_field("proposer")); + } + proposer__ = Some(map_.next_value()?); + } + } + } + Ok(MsgCancelProposal { + proposal_id: proposal_id__.unwrap_or_default(), + proposer: proposer__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgCancelProposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for MsgCancelProposalResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgCancelProposalResponse", len)?; + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("proposalId", ::alloc::string::ToString::to_string(&self.proposal_id).as_str())?; + } + if let Some(v) = self.canceled_time.as_ref() { + struct_ser.serialize_field("canceledTime", v)?; + } + if true { + #[allow(clippy::needless_borrow)] + struct_ser.serialize_field("canceledHeight", ::alloc::string::ToString::to_string(&self.canceled_height).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for MsgCancelProposalResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal_id", + "proposalId", + "canceled_time", + "canceledTime", + "canceled_height", + "canceledHeight", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ProposalId, + CanceledTime, + CanceledHeight, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "proposalId" | "proposal_id" => Ok(GeneratedField::ProposalId), + "canceledTime" | "canceled_time" => Ok(GeneratedField::CanceledTime), + "canceledHeight" | "canceled_height" => Ok(GeneratedField::CanceledHeight), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = MsgCancelProposalResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.MsgCancelProposalResponse") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal_id__ = None; + let mut canceled_time__ = None; + let mut canceled_height__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::ProposalId => { + if proposal_id__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalId")); + } + proposal_id__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::CanceledTime => { + if canceled_time__.is_some() { + return Err(serde::de::Error::duplicate_field("canceledTime")); + } + canceled_time__ = map_.next_value()?; + } + GeneratedField::CanceledHeight => { + if canceled_height__.is_some() { + return Err(serde::de::Error::duplicate_field("canceledHeight")); + } + canceled_height__ = + Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(MsgCancelProposalResponse { + proposal_id: proposal_id__.unwrap_or_default(), + canceled_time: canceled_time__, + canceled_height: canceled_height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.MsgCancelProposalResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for MsgDeposit { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result @@ -859,6 +1122,9 @@ impl serde::Serialize for MsgSubmitProposal { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.MsgSubmitProposal", len)?; if true { struct_ser.serialize_field("messages", &self.messages)?; @@ -878,6 +1144,9 @@ impl serde::Serialize for MsgSubmitProposal { if true { struct_ser.serialize_field("summary", &self.summary)?; } + if true { + struct_ser.serialize_field("expedited", &self.expedited)?; + } struct_ser.end() } } @@ -895,6 +1164,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { "metadata", "title", "summary", + "expedited", ]; #[allow(clippy::enum_variant_names)] @@ -905,6 +1175,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { Metadata, Title, Summary, + Expedited, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -932,6 +1203,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { "metadata" => Ok(GeneratedField::Metadata), "title" => Ok(GeneratedField::Title), "summary" => Ok(GeneratedField::Summary), + "expedited" => Ok(GeneratedField::Expedited), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -957,6 +1229,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { let mut metadata__ = None; let mut title__ = None; let mut summary__ = None; + let mut expedited__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Messages => { @@ -995,6 +1268,12 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { } summary__ = Some(map_.next_value()?); } + GeneratedField::Expedited => { + if expedited__.is_some() { + return Err(serde::de::Error::duplicate_field("expedited")); + } + expedited__ = Some(map_.next_value()?); + } } } Ok(MsgSubmitProposal { @@ -1004,6 +1283,7 @@ impl<'de> serde::Deserialize<'de> for MsgSubmitProposal { metadata: metadata__.unwrap_or_default(), title: title__.unwrap_or_default(), summary: summary__.unwrap_or_default(), + expedited: expedited__.unwrap_or_default(), }) } } @@ -1758,6 +2038,24 @@ impl serde::Serialize for Params { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Params", len)?; if true { struct_ser.serialize_field("minDeposit", &self.min_deposit)?; @@ -1780,6 +2078,21 @@ impl serde::Serialize for Params { if true { struct_ser.serialize_field("minInitialDepositRatio", &self.min_initial_deposit_ratio)?; } + if true { + struct_ser.serialize_field("proposalCancelRatio", &self.proposal_cancel_ratio)?; + } + if true { + struct_ser.serialize_field("proposalCancelDest", &self.proposal_cancel_dest)?; + } + if let Some(v) = self.expedited_voting_period.as_ref() { + struct_ser.serialize_field("expeditedVotingPeriod", v)?; + } + if true { + struct_ser.serialize_field("expeditedThreshold", &self.expedited_threshold)?; + } + if true { + struct_ser.serialize_field("expeditedMinDeposit", &self.expedited_min_deposit)?; + } if true { struct_ser.serialize_field("burnVoteQuorum", &self.burn_vote_quorum)?; } @@ -1789,6 +2102,9 @@ impl serde::Serialize for Params { if true { struct_ser.serialize_field("burnVoteVeto", &self.burn_vote_veto)?; } + if true { + struct_ser.serialize_field("minDepositRatio", &self.min_deposit_ratio)?; + } struct_ser.end() } } @@ -1811,12 +2127,24 @@ impl<'de> serde::Deserialize<'de> for Params { "vetoThreshold", "min_initial_deposit_ratio", "minInitialDepositRatio", + "proposal_cancel_ratio", + "proposalCancelRatio", + "proposal_cancel_dest", + "proposalCancelDest", + "expedited_voting_period", + "expeditedVotingPeriod", + "expedited_threshold", + "expeditedThreshold", + "expedited_min_deposit", + "expeditedMinDeposit", "burn_vote_quorum", "burnVoteQuorum", "burn_proposal_deposit_prevote", "burnProposalDepositPrevote", "burn_vote_veto", "burnVoteVeto", + "min_deposit_ratio", + "minDepositRatio", ]; #[allow(clippy::enum_variant_names)] @@ -1828,9 +2156,15 @@ impl<'de> serde::Deserialize<'de> for Params { Threshold, VetoThreshold, MinInitialDepositRatio, + ProposalCancelRatio, + ProposalCancelDest, + ExpeditedVotingPeriod, + ExpeditedThreshold, + ExpeditedMinDeposit, BurnVoteQuorum, BurnProposalDepositPrevote, BurnVoteVeto, + MinDepositRatio, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -1859,9 +2193,15 @@ impl<'de> serde::Deserialize<'de> for Params { "threshold" => Ok(GeneratedField::Threshold), "vetoThreshold" | "veto_threshold" => Ok(GeneratedField::VetoThreshold), "minInitialDepositRatio" | "min_initial_deposit_ratio" => Ok(GeneratedField::MinInitialDepositRatio), + "proposalCancelRatio" | "proposal_cancel_ratio" => Ok(GeneratedField::ProposalCancelRatio), + "proposalCancelDest" | "proposal_cancel_dest" => Ok(GeneratedField::ProposalCancelDest), + "expeditedVotingPeriod" | "expedited_voting_period" => Ok(GeneratedField::ExpeditedVotingPeriod), + "expeditedThreshold" | "expedited_threshold" => Ok(GeneratedField::ExpeditedThreshold), + "expeditedMinDeposit" | "expedited_min_deposit" => Ok(GeneratedField::ExpeditedMinDeposit), "burnVoteQuorum" | "burn_vote_quorum" => Ok(GeneratedField::BurnVoteQuorum), "burnProposalDepositPrevote" | "burn_proposal_deposit_prevote" => Ok(GeneratedField::BurnProposalDepositPrevote), "burnVoteVeto" | "burn_vote_veto" => Ok(GeneratedField::BurnVoteVeto), + "minDepositRatio" | "min_deposit_ratio" => Ok(GeneratedField::MinDepositRatio), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1888,9 +2228,15 @@ impl<'de> serde::Deserialize<'de> for Params { let mut threshold__ = None; let mut veto_threshold__ = None; let mut min_initial_deposit_ratio__ = None; + let mut proposal_cancel_ratio__ = None; + let mut proposal_cancel_dest__ = None; + let mut expedited_voting_period__ = None; + let mut expedited_threshold__ = None; + let mut expedited_min_deposit__ = None; let mut burn_vote_quorum__ = None; let mut burn_proposal_deposit_prevote__ = None; let mut burn_vote_veto__ = None; + let mut min_deposit_ratio__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::MinDeposit => { @@ -1935,6 +2281,36 @@ impl<'de> serde::Deserialize<'de> for Params { } min_initial_deposit_ratio__ = Some(map_.next_value()?); } + GeneratedField::ProposalCancelRatio => { + if proposal_cancel_ratio__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalCancelRatio")); + } + proposal_cancel_ratio__ = Some(map_.next_value()?); + } + GeneratedField::ProposalCancelDest => { + if proposal_cancel_dest__.is_some() { + return Err(serde::de::Error::duplicate_field("proposalCancelDest")); + } + proposal_cancel_dest__ = Some(map_.next_value()?); + } + GeneratedField::ExpeditedVotingPeriod => { + if expedited_voting_period__.is_some() { + return Err(serde::de::Error::duplicate_field("expeditedVotingPeriod")); + } + expedited_voting_period__ = map_.next_value()?; + } + GeneratedField::ExpeditedThreshold => { + if expedited_threshold__.is_some() { + return Err(serde::de::Error::duplicate_field("expeditedThreshold")); + } + expedited_threshold__ = Some(map_.next_value()?); + } + GeneratedField::ExpeditedMinDeposit => { + if expedited_min_deposit__.is_some() { + return Err(serde::de::Error::duplicate_field("expeditedMinDeposit")); + } + expedited_min_deposit__ = Some(map_.next_value()?); + } GeneratedField::BurnVoteQuorum => { if burn_vote_quorum__.is_some() { return Err(serde::de::Error::duplicate_field("burnVoteQuorum")); @@ -1953,6 +2329,12 @@ impl<'de> serde::Deserialize<'de> for Params { } burn_vote_veto__ = Some(map_.next_value()?); } + GeneratedField::MinDepositRatio => { + if min_deposit_ratio__.is_some() { + return Err(serde::de::Error::duplicate_field("minDepositRatio")); + } + min_deposit_ratio__ = Some(map_.next_value()?); + } } } Ok(Params { @@ -1963,9 +2345,15 @@ impl<'de> serde::Deserialize<'de> for Params { threshold: threshold__.unwrap_or_default(), veto_threshold: veto_threshold__.unwrap_or_default(), min_initial_deposit_ratio: min_initial_deposit_ratio__.unwrap_or_default(), + proposal_cancel_ratio: proposal_cancel_ratio__.unwrap_or_default(), + proposal_cancel_dest: proposal_cancel_dest__.unwrap_or_default(), + expedited_voting_period: expedited_voting_period__, + expedited_threshold: expedited_threshold__.unwrap_or_default(), + expedited_min_deposit: expedited_min_deposit__.unwrap_or_default(), burn_vote_quorum: burn_vote_quorum__.unwrap_or_default(), burn_proposal_deposit_prevote: burn_proposal_deposit_prevote__.unwrap_or_default(), burn_vote_veto: burn_vote_veto__.unwrap_or_default(), + min_deposit_ratio: min_deposit_ratio__.unwrap_or_default(), }) } } @@ -2019,6 +2407,12 @@ impl serde::Serialize for Proposal { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.Proposal", len)?; if true { #[allow(clippy::needless_borrow)] @@ -2062,6 +2456,12 @@ impl serde::Serialize for Proposal { if true { struct_ser.serialize_field("proposer", &self.proposer)?; } + if true { + struct_ser.serialize_field("expedited", &self.expedited)?; + } + if true { + struct_ser.serialize_field("failedReason", &self.failed_reason)?; + } struct_ser.end() } } @@ -2091,6 +2491,9 @@ impl<'de> serde::Deserialize<'de> for Proposal { "title", "summary", "proposer", + "expedited", + "failed_reason", + "failedReason", ]; #[allow(clippy::enum_variant_names)] @@ -2108,6 +2511,8 @@ impl<'de> serde::Deserialize<'de> for Proposal { Title, Summary, Proposer, + Expedited, + FailedReason, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -2142,6 +2547,8 @@ impl<'de> serde::Deserialize<'de> for Proposal { "title" => Ok(GeneratedField::Title), "summary" => Ok(GeneratedField::Summary), "proposer" => Ok(GeneratedField::Proposer), + "expedited" => Ok(GeneratedField::Expedited), + "failedReason" | "failed_reason" => Ok(GeneratedField::FailedReason), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2174,6 +2581,8 @@ impl<'de> serde::Deserialize<'de> for Proposal { let mut title__ = None; let mut summary__ = None; let mut proposer__ = None; + let mut expedited__ = None; + let mut failed_reason__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::Id => { @@ -2256,6 +2665,18 @@ impl<'de> serde::Deserialize<'de> for Proposal { } proposer__ = Some(map_.next_value()?); } + GeneratedField::Expedited => { + if expedited__.is_some() { + return Err(serde::de::Error::duplicate_field("expedited")); + } + expedited__ = Some(map_.next_value()?); + } + GeneratedField::FailedReason => { + if failed_reason__.is_some() { + return Err(serde::de::Error::duplicate_field("failedReason")); + } + failed_reason__ = Some(map_.next_value()?); + } } } Ok(Proposal { @@ -2272,6 +2693,8 @@ impl<'de> serde::Deserialize<'de> for Proposal { title: title__.unwrap_or_default(), summary: summary__.unwrap_or_default(), proposer: proposer__.unwrap_or_default(), + expedited: expedited__.unwrap_or_default(), + failed_reason: failed_reason__.unwrap_or_default(), }) } } @@ -2361,6 +2784,168 @@ impl<'de> serde::Deserialize<'de> for ProposalStatus { deserializer.deserialize_any(GeneratedVisitor) } } +impl serde::Serialize for QueryConstitutionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryConstitutionRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryConstitutionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryConstitutionRequest; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryConstitutionRequest") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map_.next_key::()?.is_some() { + let _ = map_.next_value::()?; + } + Ok(QueryConstitutionRequest { + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.QueryConstitutionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for QueryConstitutionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> core::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if true { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("cosmos.gov.v1.QueryConstitutionResponse", len)?; + if true { + struct_ser.serialize_field("constitution", &self.constitution)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for QueryConstitutionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "constitution", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Constitution, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> core::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> core::result::Result + where + E: serde::de::Error, + { + match value { + "constitution" => Ok(GeneratedField::Constitution), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = QueryConstitutionResponse; + + fn expecting(&self, formatter: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + formatter.write_str("struct cosmos.gov.v1.QueryConstitutionResponse") + } + + fn visit_map(self, mut map_: V) -> core::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut constitution__ = None; + while let Some(k) = map_.next_key()? { + match k { + GeneratedField::Constitution => { + if constitution__.is_some() { + return Err(serde::de::Error::duplicate_field("constitution")); + } + constitution__ = Some(map_.next_value()?); + } + } + } + Ok(QueryConstitutionResponse { + constitution: constitution__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("cosmos.gov.v1.QueryConstitutionResponse", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for QueryDepositRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> core::result::Result diff --git a/src/prost/cosmos.gov.v1beta1.rs b/src/prost/cosmos.gov.v1beta1.rs index d421555b..3af4a744 100644 --- a/src/prost/cosmos.gov.v1beta1.rs +++ b/src/prost/cosmos.gov.v1beta1.rs @@ -314,138 +314,323 @@ impl ProposalStatus { } } } -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. +/// GenesisState defines the gov module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposal { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option, - /// initial_deposit is the deposit value that must be paid at proposal submission. +pub struct GenesisState { + /// starting_proposal_id is the ID of the starting proposal. + #[prost(uint64, tag = "1")] + pub starting_proposal_id: u64, + /// deposits defines all the deposits present at genesis. #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, + pub deposits: ::prost::alloc::vec::Vec, + /// votes defines all the votes present at genesis. + #[prost(message, repeated, tag = "3")] + pub votes: ::prost::alloc::vec::Vec, + /// proposals defines all the proposals present at genesis. + #[prost(message, repeated, tag = "4")] + pub proposals: ::prost::alloc::vec::Vec, + /// deposit_params defines all the parameters related to deposit. + #[prost(message, optional, tag = "5")] + pub deposit_params: ::core::option::Option, + /// voting_params defines all the parameters related to voting. + #[prost(message, optional, tag = "6")] + pub voting_params: ::core::option::Option, + /// tally_params defines all the parameters related to tally. + #[prost(message, optional, tag = "7")] + pub tally_params: ::core::option::Option, } -impl ::prost::Name for MsgSubmitProposal { - const NAME: &'static str = "MsgSubmitProposal"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +/// QueryProposalRequest is the request type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitProposalResponse { +pub struct QueryProposalRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, } -impl ::prost::Name for MsgSubmitProposalResponse { - const NAME: &'static str = "MsgSubmitProposalResponse"; +impl ::prost::Name for QueryProposalRequest { + const NAME: &'static str = "QueryProposalRequest"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgVote defines a message to cast a vote. +/// QueryProposalResponse is the response type for the Query/Proposal RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVote { +pub struct QueryProposalResponse { + #[prost(message, optional, tag = "1")] + pub proposal: ::core::option::Option, +} +impl ::prost::Name for QueryProposalResponse { + const NAME: &'static str = "QueryProposalResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryProposalsRequest { + /// proposal_status defines the status of the proposals. + #[prost(enumeration = "ProposalStatus", tag = "1")] + pub proposal_status: i32, + /// voter defines the voter address for the proposals. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// depositor defines the deposit addresses from the proposals. + #[prost(string, tag = "3")] + pub depositor: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "4")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryProposalsRequest { + const NAME: &'static str = "QueryProposalsRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryProposalsResponse is the response type for the Query/Proposals RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryProposalsResponse { + /// proposals defines all the requested governance proposals. + #[prost(message, repeated, tag = "1")] + pub proposals: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryProposalsResponse { + const NAME: &'static str = "QueryProposalsResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryVoteRequest is the request type for the Query/Vote RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryVoteRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// voter is the voter address for the proposal. + /// voter defines the voter address for the proposals. #[prost(string, tag = "2")] pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - pub option: i32, } -impl ::prost::Name for MsgVote { - const NAME: &'static str = "MsgVote"; +impl ::prost::Name for QueryVoteRequest { + const NAME: &'static str = "QueryVoteRequest"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgVoteResponse defines the Msg/Vote response type. +/// QueryVoteResponse is the response type for the Query/Vote RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteResponse {} -impl ::prost::Name for MsgVoteResponse { - const NAME: &'static str = "MsgVoteResponse"; +pub struct QueryVoteResponse { + /// vote defines the queried vote. + #[prost(message, optional, tag = "1")] + pub vote: ::core::option::Option, +} +impl ::prost::Name for QueryVoteResponse { + const NAME: &'static str = "QueryVoteResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgVoteWeighted defines a message to cast a vote. -/// -/// Since: cosmos-sdk 0.43 +/// QueryVotesRequest is the request type for the Query/Votes RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeighted { +pub struct QueryVotesRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgVoteWeighted { - const NAME: &'static str = "MsgVoteWeighted"; +impl ::prost::Name for QueryVotesRequest { + const NAME: &'static str = "QueryVotesRequest"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -/// -/// Since: cosmos-sdk 0.43 +/// QueryVotesResponse is the response type for the Query/Votes RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgVoteWeightedResponse {} -impl ::prost::Name for MsgVoteWeightedResponse { - const NAME: &'static str = "MsgVoteWeightedResponse"; +pub struct QueryVotesResponse { + /// votes defines the queried votes. + #[prost(message, repeated, tag = "1")] + pub votes: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryVotesResponse { + const NAME: &'static str = "QueryVotesResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgDeposit defines a message to submit a deposit to an existing proposal. +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDeposit { +pub struct QueryParamsRequest { + /// params_type defines which parameters to query for, can be one of "voting", + /// "tallying" or "deposit". + #[prost(string, tag = "1")] + pub params_type: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// voting_params defines the parameters related to voting. + #[prost(message, optional, tag = "1")] + pub voting_params: ::core::option::Option, + /// deposit_params defines the parameters related to deposit. + #[prost(message, optional, tag = "2")] + pub deposit_params: ::core::option::Option, + /// tally_params defines the parameters related to tally. + #[prost(message, optional, tag = "3")] + pub tally_params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryDepositRequest is the request type for the Query/Deposit RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositRequest { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, /// depositor defines the deposit addresses from the proposals. #[prost(string, tag = "2")] pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgDeposit { - const NAME: &'static str = "MsgDeposit"; +impl ::prost::Name for QueryDepositRequest { + const NAME: &'static str = "QueryDepositRequest"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// MsgDepositResponse defines the Msg/Deposit response type. +/// QueryDepositResponse is the response type for the Query/Deposit RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDepositResponse {} -impl ::prost::Name for MsgDepositResponse { - const NAME: &'static str = "MsgDepositResponse"; +pub struct QueryDepositResponse { + /// deposit defines the requested deposit. + #[prost(message, optional, tag = "1")] + pub deposit: ::core::option::Option, +} +impl ::prost::Name for QueryDepositResponse { + const NAME: &'static str = "QueryDepositResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositsRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryDepositsRequest { + const NAME: &'static str = "QueryDepositsRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDepositsResponse { + /// deposits defines the requested deposits. + #[prost(message, repeated, tag = "1")] + pub deposits: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDepositsResponse { + const NAME: &'static str = "QueryDepositsResponse"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTallyResultRequest { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, +} +impl ::prost::Name for QueryTallyResultRequest { + const NAME: &'static str = "QueryTallyResultRequest"; + const PACKAGE: &'static str = "cosmos.gov.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + } +} +/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTallyResultResponse { + /// tally defines the requested tally. + #[prost(message, optional, tag = "1")] + pub tally: ::core::option::Option, +} +impl ::prost::Name for QueryTallyResultResponse { + const NAME: &'static str = "QueryTallyResultResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) @@ -453,16 +638,16 @@ impl ::prost::Name for MsgDepositResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the bank Msg service. + /// Query defines the gRPC querier service for gov module #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -473,7 +658,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -491,7 +676,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -505,7 +690,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -538,12 +723,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// SubmitProposal defines a method to create new proposal given a content. - pub async fn submit_proposal( + /// Proposal queries proposal details based on ProposalID. + pub async fn proposal( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -557,19 +742,45 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Msg/SubmitProposal", + "/cosmos.gov.v1beta1.Query/Proposal", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "SubmitProposal")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposal")); self.inner.unary(req, path, codec).await } - /// Vote defines a method to add a vote on a specific proposal. + /// Proposals queries all proposals based on given status. + pub async fn proposals( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1beta1.Query/Proposals", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposals")); + self.inner.unary(req, path, codec).await + } + /// Vote queries voted information based on proposalID, voterAddr. pub async fn vote( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -583,21 +794,97 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Msg/Vote", + "/cosmos.gov.v1beta1.Query/Vote", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Vote")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Vote")); self.inner.unary(req, path, codec).await } - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - /// - /// Since: cosmos-sdk 0.43 - pub async fn vote_weighted( + /// Votes queries votes of a given proposal. + pub async fn votes( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1beta1.Query/Votes", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Votes")); + self.inner.unary(req, path, codec).await + } + /// Params queries all parameters of the gov module. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1beta1.Query/Params", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + /// Deposit queries single deposit information based on proposalID, depositor address. + pub async fn deposit( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.gov.v1beta1.Query/Deposit", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposit")); + self.inner.unary(req, path, codec).await + } + /// Deposits queries all deposits of a single proposal. + pub async fn deposits( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, tonic::Status, > { self.inner @@ -611,19 +898,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Msg/VoteWeighted", + "/cosmos.gov.v1beta1.Query/Deposits", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "VoteWeighted")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposits")); self.inner.unary(req, path, codec).await } - /// Deposit defines a method to add deposit on a specific proposal. - pub async fn deposit( + /// TallyResult queries the tally of a proposal vote. + pub async fn tally_result( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -637,58 +924,91 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Msg/Deposit", + "/cosmos.gov.v1beta1.Query/TallyResult", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Deposit")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "TallyResult")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// SubmitProposal defines a method to create new proposal given a content. - async fn submit_proposal( + pub trait Query: Send + Sync + 'static { + /// Proposal queries proposal details based on ProposalID. + async fn proposal( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Vote defines a method to add a vote on a specific proposal. + /// Proposals queries all proposals based on given status. + async fn proposals( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Vote queries voted information based on proposalID, voterAddr. async fn vote( &self, - request: tonic::Request, - ) -> std::result::Result, tonic::Status>; - /// VoteWeighted defines a method to add a weighted vote on a specific proposal. - /// - /// Since: cosmos-sdk 0.43 - async fn vote_weighted( + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Votes queries votes of a given proposal. + async fn votes( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Deposit defines a method to add deposit on a specific proposal. + /// Params queries all parameters of the gov module. + async fn params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Deposit queries single deposit information based on proposalID, depositor address. async fn deposit( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// Deposits queries all deposits of a single proposal. + async fn deposits( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// TallyResult queries the tally of a proposal vote. + async fn tally_result( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the bank Msg service. + /// Query defines the gRPC querier service for gov module #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -696,7 +1016,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -748,9 +1068,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -766,23 +1086,203 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.gov.v1beta1.Msg/SubmitProposal" => { + "/cosmos.gov.v1beta1.Query/Proposal" => { + #[allow(non_camel_case_types)] + struct ProposalSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ProposalSvc { + type Response = super::QueryProposalResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::proposal(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ProposalSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1beta1.Query/Proposals" => { + #[allow(non_camel_case_types)] + struct ProposalsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ProposalsSvc { + type Response = super::QueryProposalsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::proposals(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ProposalsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1beta1.Query/Vote" => { + #[allow(non_camel_case_types)] + struct VoteSvc(pub Arc); + impl tonic::server::UnaryService + for VoteSvc { + type Response = super::QueryVoteResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::vote(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = VoteSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1beta1.Query/Votes" => { + #[allow(non_camel_case_types)] + struct VotesSvc(pub Arc); + impl tonic::server::UnaryService + for VotesSvc { + type Response = super::QueryVotesResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::votes(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = VotesSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.gov.v1beta1.Query/Params" => { #[allow(non_camel_case_types)] - struct SubmitProposalSvc(pub Arc); - impl tonic::server::UnaryService - for SubmitProposalSvc { - type Response = super::MsgSubmitProposalResponse; + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::submit_proposal(&inner, request).await + ::params(&inner, request).await }; Box::pin(fut) } @@ -794,7 +1294,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = SubmitProposalSvc(inner); + let method = ParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -810,23 +1310,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Msg/Vote" => { + "/cosmos.gov.v1beta1.Query/Deposit" => { #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService - for VoteSvc { - type Response = super::MsgVoteResponse; + struct DepositSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DepositSvc { + type Response = super::QueryDepositResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::vote(&inner, request).await + ::deposit(&inner, request).await }; Box::pin(fut) } @@ -838,7 +1340,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = VoteSvc(inner); + let method = DepositSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -854,23 +1356,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Msg/VoteWeighted" => { + "/cosmos.gov.v1beta1.Query/Deposits" => { #[allow(non_camel_case_types)] - struct VoteWeightedSvc(pub Arc); - impl tonic::server::UnaryService - for VoteWeightedSvc { - type Response = super::MsgVoteWeightedResponse; + struct DepositsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DepositsSvc { + type Response = super::QueryDepositsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::vote_weighted(&inner, request).await + ::deposits(&inner, request).await }; Box::pin(fut) } @@ -882,7 +1386,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = VoteWeightedSvc(inner); + let method = DepositsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -898,23 +1402,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Msg/Deposit" => { + "/cosmos.gov.v1beta1.Query/TallyResult" => { #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl tonic::server::UnaryService - for DepositSvc { - type Response = super::MsgDepositResponse; + struct TallyResultSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for TallyResultSvc { + type Response = super::QueryTallyResultResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::deposit(&inner, request).await + ::tally_result(&inner, request).await }; Box::pin(fut) } @@ -926,7 +1432,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DepositSvc(inner); + let method = TallyResultSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -957,7 +1463,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -969,7 +1475,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -979,294 +1485,142 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "cosmos.gov.v1beta1.Msg"; - } -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, -} -impl ::prost::Name for QueryProposalRequest { - const NAME: &'static str = "QueryProposalRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalResponse { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -impl ::prost::Name for QueryProposalResponse { - const NAME: &'static str = "QueryProposalResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryProposalsRequest { - const NAME: &'static str = "QueryProposalsRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryProposalsResponse { - const NAME: &'static str = "QueryProposalsResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryVoteRequest { - const NAME: &'static str = "QueryVoteRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -impl ::prost::Name for QueryVoteResponse { - const NAME: &'static str = "QueryVoteResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryVotesRequest { - const NAME: &'static str = "QueryVotesRequest"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) - } -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryVotesResponse { - const NAME: &'static str = "QueryVotesResponse"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "cosmos.gov.v1beta1.Query"; } } -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". - #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, +/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +/// proposal Content. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitProposal { + /// content is the proposal's content. + #[prost(message, optional, tag = "1")] + pub content: ::core::option::Option, + /// initial_deposit is the deposit value that must be paid at proposal submission. + #[prost(message, repeated, tag = "2")] + pub initial_deposit: ::prost::alloc::vec::Vec, + /// proposer is the account address of the proposer. + #[prost(string, tag = "3")] + pub proposer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +impl ::prost::Name for MsgSubmitProposal { + const NAME: &'static str = "MsgSubmitProposal"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// voting_params defines the parameters related to voting. - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// deposit_params defines the parameters related to deposit. - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// tally_params defines the parameters related to tally. - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, +pub struct MsgSubmitProposalResponse { + /// proposal_id defines the unique id of the proposal. + #[prost(uint64, tag = "1")] + pub proposal_id: u64, } -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +impl ::prost::Name for MsgSubmitProposalResponse { + const NAME: &'static str = "MsgSubmitProposalResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. +/// MsgVote defines a message to cast a vote. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositRequest { +pub struct MsgVote { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. + /// voter is the voter address for the proposal. #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, + pub voter: ::prost::alloc::string::String, + /// option defines the vote option. + #[prost(enumeration = "VoteOption", tag = "3")] + pub option: i32, } -impl ::prost::Name for QueryDepositRequest { - const NAME: &'static str = "QueryDepositRequest"; +impl ::prost::Name for MsgVote { + const NAME: &'static str = "MsgVote"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. +/// MsgVoteResponse defines the Msg/Vote response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -impl ::prost::Name for QueryDepositResponse { - const NAME: &'static str = "QueryDepositResponse"; +pub struct MsgVoteResponse {} +impl ::prost::Name for MsgVoteResponse { + const NAME: &'static str = "MsgVoteResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +/// MsgVoteWeighted defines a message to cast a vote. +/// +/// Since: cosmos-sdk 0.43 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsRequest { +pub struct MsgVoteWeighted { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, + /// voter is the voter address for the proposal. + #[prost(string, tag = "2")] + pub voter: ::prost::alloc::string::String, + /// options defines the weighted vote options. + #[prost(message, repeated, tag = "3")] + pub options: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryDepositsRequest { - const NAME: &'static str = "QueryDepositsRequest"; +impl ::prost::Name for MsgVoteWeighted { + const NAME: &'static str = "MsgVoteWeighted"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. +/// +/// Since: cosmos-sdk 0.43 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDepositsResponse { - const NAME: &'static str = "QueryDepositsResponse"; +pub struct MsgVoteWeightedResponse {} +impl ::prost::Name for MsgVoteWeightedResponse { + const NAME: &'static str = "MsgVoteWeightedResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +/// MsgDeposit defines a message to submit a deposit to an existing proposal. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultRequest { +pub struct MsgDeposit { /// proposal_id defines the unique id of the proposal. #[prost(uint64, tag = "1")] pub proposal_id: u64, + /// depositor defines the deposit addresses from the proposals. + #[prost(string, tag = "2")] + pub depositor: ::prost::alloc::string::String, + /// amount to be deposited by depositor. + #[prost(message, repeated, tag = "3")] + pub amount: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryTallyResultRequest { - const NAME: &'static str = "QueryTallyResultRequest"; +impl ::prost::Name for MsgDeposit { + const NAME: &'static str = "MsgDeposit"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) } } -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +/// MsgDepositResponse defines the Msg/Deposit response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -impl ::prost::Name for QueryTallyResultResponse { - const NAME: &'static str = "QueryTallyResultResponse"; +pub struct MsgDepositResponse {} +impl ::prost::Name for MsgDepositResponse { + const NAME: &'static str = "MsgDepositResponse"; const PACKAGE: &'static str = "cosmos.gov.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) @@ -1274,16 +1628,16 @@ impl ::prost::Name for QueryTallyResultResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service for gov module + /// Msg defines the gov Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -1294,7 +1648,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -1312,7 +1666,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -1320,155 +1674,51 @@ pub mod query_client { http::Request, Response = http::Response< >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - QueryClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// Proposal queries proposal details based on ProposalID. - pub async fn proposal( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Proposal", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposal")); - self.inner.unary(req, path, codec).await - } - /// Proposals queries all proposals based on given status. - pub async fn proposals( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Proposals", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Proposals")); - self.inner.unary(req, path, codec).await - } - /// Vote queries voted information based on proposalID, voterAddr. - pub async fn vote( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Vote", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Vote")); - self.inner.unary(req, path, codec).await + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) } - /// Votes queries votes of a given proposal. - pub async fn votes( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Votes", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Votes")); - self.inner.unary(req, path, codec).await + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self } - /// Params queries all parameters of the gov module. - pub async fn params( + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// SubmitProposal defines a method to create new proposal given a content. + pub async fn submit_proposal( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1482,19 +1732,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Params", + "/cosmos.gov.v1beta1.Msg/SubmitProposal", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Params")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "SubmitProposal")); self.inner.unary(req, path, codec).await } - /// Deposit queries single deposit information based proposalID, depositAddr. - pub async fn deposit( + /// Vote defines a method to add a vote on a specific proposal. + pub async fn vote( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1508,19 +1758,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Deposit", + "/cosmos.gov.v1beta1.Msg/Vote", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposit")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Vote")); self.inner.unary(req, path, codec).await } - /// Deposits queries all deposits of a single proposal. - pub async fn deposits( + /// VoteWeighted defines a method to add a weighted vote on a specific proposal. + /// + /// Since: cosmos-sdk 0.43 + pub async fn vote_weighted( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1534,19 +1786,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/Deposits", + "/cosmos.gov.v1beta1.Msg/VoteWeighted", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "Deposits")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "VoteWeighted")); self.inner.unary(req, path, codec).await } - /// TallyResult queries the tally of a proposal vote. - pub async fn tally_result( + /// Deposit defines a method to add deposit on a specific proposal. + pub async fn deposit( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1560,91 +1812,58 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.gov.v1beta1.Query/TallyResult", + "/cosmos.gov.v1beta1.Msg/Deposit", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.gov.v1beta1.Query", "TallyResult")); + .insert(GrpcMethod::new("cosmos.gov.v1beta1.Msg", "Deposit")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Proposal queries proposal details based on ProposalID. - async fn proposal( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Proposals queries all proposals based on given status. - async fn proposals( + pub trait Msg: Send + Sync + 'static { + /// SubmitProposal defines a method to create new proposal given a content. + async fn submit_proposal( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Vote queries voted information based on proposalID, voterAddr. + /// Vote defines a method to add a vote on a specific proposal. async fn vote( &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Votes queries votes of a given proposal. - async fn votes( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Params queries all parameters of the gov module. - async fn params( + request: tonic::Request, + ) -> std::result::Result, tonic::Status>; + /// VoteWeighted defines a method to add a weighted vote on a specific proposal. + /// + /// Since: cosmos-sdk 0.43 + async fn vote_weighted( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Deposit queries single deposit information based proposalID, depositAddr. + /// Deposit defines a method to add deposit on a specific proposal. async fn deposit( &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Deposits queries all deposits of a single proposal. - async fn deposits( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// TallyResult queries the tally of a proposal vote. - async fn tally_result( - &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query defines the gRPC querier service for gov module + /// Msg defines the gov Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -1652,7 +1871,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1699,94 +1918,46 @@ pub mod query_server { /// /// Default: `usize::MAX` #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for QueryServer - where - T: Query, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/cosmos.gov.v1beta1.Query/Proposal" => { - #[allow(non_camel_case_types)] - struct ProposalSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalSvc { - type Response = super::QueryProposalResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::proposal(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ProposalSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.gov.v1beta1.Query/Proposals" => { + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/cosmos.gov.v1beta1.Msg/SubmitProposal" => { #[allow(non_camel_case_types)] - struct ProposalsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ProposalsSvc { - type Response = super::QueryProposalsResponse; + struct SubmitProposalSvc(pub Arc); + impl tonic::server::UnaryService + for SubmitProposalSvc { + type Response = super::MsgSubmitProposalResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::proposals(&inner, request).await + ::submit_proposal(&inner, request).await }; Box::pin(fut) } @@ -1798,7 +1969,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ProposalsSvc(inner); + let method = SubmitProposalSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1814,23 +1985,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Query/Vote" => { + "/cosmos.gov.v1beta1.Msg/Vote" => { #[allow(non_camel_case_types)] - struct VoteSvc(pub Arc); - impl tonic::server::UnaryService + struct VoteSvc(pub Arc); + impl tonic::server::UnaryService for VoteSvc { - type Response = super::QueryVoteResponse; + type Response = super::MsgVoteResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::vote(&inner, request).await + ::vote(&inner, request).await }; Box::pin(fut) } @@ -1858,67 +2029,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Query/Votes" => { - #[allow(non_camel_case_types)] - struct VotesSvc(pub Arc); - impl tonic::server::UnaryService - for VotesSvc { - type Response = super::QueryVotesResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::votes(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VotesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.gov.v1beta1.Query/Params" => { + "/cosmos.gov.v1beta1.Msg/VoteWeighted" => { #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + struct VoteWeightedSvc(pub Arc); + impl tonic::server::UnaryService + for VoteWeightedSvc { + type Response = super::MsgVoteWeightedResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::vote_weighted(&inner, request).await }; Box::pin(fut) } @@ -1930,7 +2057,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = VoteWeightedSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1946,25 +2073,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Query/Deposit" => { + "/cosmos.gov.v1beta1.Msg/Deposit" => { #[allow(non_camel_case_types)] - struct DepositSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService + struct DepositSvc(pub Arc); + impl tonic::server::UnaryService for DepositSvc { - type Response = super::QueryDepositResponse; + type Response = super::MsgDepositResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::deposit(&inner, request).await + ::deposit(&inner, request).await }; Box::pin(fut) } @@ -1992,98 +2117,6 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.gov.v1beta1.Query/Deposits" => { - #[allow(non_camel_case_types)] - struct DepositsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DepositsSvc { - type Response = super::QueryDepositsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::deposits(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = DepositsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.gov.v1beta1.Query/TallyResult" => { - #[allow(non_camel_case_types)] - struct TallyResultSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for TallyResultSvc { - type Response = super::QueryTallyResultResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::tally_result(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = TallyResultSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { Ok( @@ -2099,7 +2132,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2111,7 +2144,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2121,40 +2154,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "cosmos.gov.v1beta1.Query"; - } -} -/// GenesisState defines the gov module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// starting_proposal_id is the ID of the starting proposal. - #[prost(uint64, tag = "1")] - pub starting_proposal_id: u64, - /// deposits defines all the deposits present at genesis. - #[prost(message, repeated, tag = "2")] - pub deposits: ::prost::alloc::vec::Vec, - /// votes defines all the votes present at genesis. - #[prost(message, repeated, tag = "3")] - pub votes: ::prost::alloc::vec::Vec, - /// proposals defines all the proposals present at genesis. - #[prost(message, repeated, tag = "4")] - pub proposals: ::prost::alloc::vec::Vec, - /// params defines all the parameters of related to deposit. - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// params defines all the parameters of related to voting. - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// params defines all the parameters of related to tally. - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.gov.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.gov.v1beta1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "cosmos.gov.v1beta1.Msg"; } } diff --git a/src/prost/cosmos.staking.module.v1.rs b/src/prost/cosmos.staking.module.v1.rs index 2a8d086b..659a269d 100644 --- a/src/prost/cosmos.staking.module.v1.rs +++ b/src/prost/cosmos.staking.module.v1.rs @@ -10,6 +10,12 @@ pub struct Module { /// authority defines the custom module authority. If not set, defaults to the governance module. #[prost(string, tag = "2")] pub authority: ::prost::alloc::string::String, + /// bech32_prefix_validator is the bech32 validator prefix for the app. + #[prost(string, tag = "3")] + pub bech32_prefix_validator: ::prost::alloc::string::String, + /// bech32_prefix_consensus is the bech32 consensus node prefix for the app. + #[prost(string, tag = "4")] + pub bech32_prefix_consensus: ::prost::alloc::string::String, } impl ::prost::Name for Module { const NAME: &'static str = "Module"; diff --git a/src/prost/cosmos.staking.module.v1.serde.rs b/src/prost/cosmos.staking.module.v1.serde.rs index f9224074..9b0e85d3 100644 --- a/src/prost/cosmos.staking.module.v1.serde.rs +++ b/src/prost/cosmos.staking.module.v1.serde.rs @@ -12,6 +12,12 @@ impl serde::Serialize for Module { if true { len += 1; } + if true { + len += 1; + } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.staking.module.v1.Module", len)?; if true { struct_ser.serialize_field("hooksOrder", &self.hooks_order)?; @@ -19,6 +25,12 @@ impl serde::Serialize for Module { if true { struct_ser.serialize_field("authority", &self.authority)?; } + if true { + struct_ser.serialize_field("bech32PrefixValidator", &self.bech32_prefix_validator)?; + } + if true { + struct_ser.serialize_field("bech32PrefixConsensus", &self.bech32_prefix_consensus)?; + } struct_ser.end() } } @@ -32,12 +44,18 @@ impl<'de> serde::Deserialize<'de> for Module { "hooks_order", "hooksOrder", "authority", + "bech32_prefix_validator", + "bech32PrefixValidator", + "bech32_prefix_consensus", + "bech32PrefixConsensus", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { HooksOrder, Authority, + Bech32PrefixValidator, + Bech32PrefixConsensus, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -61,6 +79,8 @@ impl<'de> serde::Deserialize<'de> for Module { match value { "hooksOrder" | "hooks_order" => Ok(GeneratedField::HooksOrder), "authority" => Ok(GeneratedField::Authority), + "bech32PrefixValidator" | "bech32_prefix_validator" => Ok(GeneratedField::Bech32PrefixValidator), + "bech32PrefixConsensus" | "bech32_prefix_consensus" => Ok(GeneratedField::Bech32PrefixConsensus), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -82,6 +102,8 @@ impl<'de> serde::Deserialize<'de> for Module { { let mut hooks_order__ = None; let mut authority__ = None; + let mut bech32_prefix_validator__ = None; + let mut bech32_prefix_consensus__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::HooksOrder => { @@ -96,11 +118,25 @@ impl<'de> serde::Deserialize<'de> for Module { } authority__ = Some(map_.next_value()?); } + GeneratedField::Bech32PrefixValidator => { + if bech32_prefix_validator__.is_some() { + return Err(serde::de::Error::duplicate_field("bech32PrefixValidator")); + } + bech32_prefix_validator__ = Some(map_.next_value()?); + } + GeneratedField::Bech32PrefixConsensus => { + if bech32_prefix_consensus__.is_some() { + return Err(serde::de::Error::duplicate_field("bech32PrefixConsensus")); + } + bech32_prefix_consensus__ = Some(map_.next_value()?); + } } } Ok(Module { hooks_order: hooks_order__.unwrap_or_default(), authority: authority__.unwrap_or_default(), + bech32_prefix_validator: bech32_prefix_validator__.unwrap_or_default(), + bech32_prefix_consensus: bech32_prefix_consensus__.unwrap_or_default(), }) } } diff --git a/src/prost/cosmos.staking.v1beta1.rs b/src/prost/cosmos.staking.v1beta1.rs index be05ca17..664c600e 100644 --- a/src/prost/cosmos.staking.v1beta1.rs +++ b/src/prost/cosmos.staking.v1beta1.rs @@ -1,3 +1,105 @@ +/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. +/// +/// Since: cosmos-sdk 0.43 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StakeAuthorization { + /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is + /// empty, there is no spend limit and any amount of coins can be delegated. + #[prost(message, optional, tag = "1")] + pub max_tokens: ::core::option::Option, + /// authorization_type defines one of AuthorizationType. + #[prost(enumeration = "AuthorizationType", tag = "4")] + pub authorization_type: i32, + /// validators is the oneof that represents either allow_list or deny_list + #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")] + pub validators: ::core::option::Option, +} +/// Nested message and enum types in `StakeAuthorization`. +pub mod stake_authorization { + /// Validators defines list of validator addresses. + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Message)] + pub struct ValidatorsVec { + #[prost(string, repeated, tag = "1")] + pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + } + impl ::prost::Name for ValidatorsVec { + const NAME: &'static str = "Validators"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "cosmos.staking.v1beta1.StakeAuthorization.{}", Self::NAME + ) + } + } + /// validators is the oneof that represents either allow_list or deny_list + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Validators { + /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's + /// account. + #[prost(message, tag = "2")] + AllowList(ValidatorsVec), + /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. + #[prost(message, tag = "3")] + DenyList(ValidatorsVec), + } +} +impl ::prost::Name for StakeAuthorization { + const NAME: &'static str = "StakeAuthorization"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// AuthorizationType defines the type of staking module authorization type +/// +/// Since: cosmos-sdk 0.43 +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AuthorizationType { + /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type + Unspecified = 0, + /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate + Delegate = 1, + /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate + Undelegate = 2, + /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate + Redelegate = 3, + /// AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation + CancelUnbondingDelegation = 4, +} +impl AuthorizationType { + /// 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 { + AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", + AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", + AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", + AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", + AuthorizationType::CancelUnbondingDelegation => { + "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" + } + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), + "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), + "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), + "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => { + Some(Self::CancelUnbondingDelegation) + } + _ => None, + } + } +} /// HistoricalInfo contains header and validator information for a given block. /// It is stored as part of staking module's state, which persists the `n` most /// recent HistoricalInfo @@ -6,7 +108,7 @@ #[derive(Clone, PartialEq, ::prost::Message)] pub struct HistoricalInfo { #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option<::cometbft_proto::types::Header>, + pub header: ::core::option::Option<::cometbft_proto::types::v1::Header>, #[prost(message, repeated, tag = "2")] pub valset: ::prost::alloc::vec::Vec, } @@ -237,10 +339,10 @@ impl ::prost::Name for DvvTriplets { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Delegation { - /// delegator_address is the bech32-encoded address of the delegator. + /// delegator_address is the encoded address of the delegator. #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the bech32-encoded address of the validator. + /// validator_address is the encoded address of the validator. #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, /// shares define the delegation shares received. @@ -259,10 +361,10 @@ impl ::prost::Name for Delegation { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegation { - /// delegator_address is the bech32-encoded address of the delegator. + /// delegator_address is the encoded address of the delegator. #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the bech32-encoded address of the validator. + /// validator_address is the encoded address of the validator. #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, /// entries are the unbonding delegation entries. @@ -477,7 +579,9 @@ impl ::prost::Name for Pool { #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorUpdates { #[prost(message, repeated, tag = "1")] - pub updates: ::prost::alloc::vec::Vec<::cometbft_proto::abci::ValidatorUpdate>, + pub updates: ::prost::alloc::vec::Vec< + ::cometbft_proto::abci::v1beta3::ValidatorUpdate, + >, } impl ::prost::Name for ValidatorUpdates { const NAME: &'static str = "ValidatorUpdates"; @@ -589,323 +693,643 @@ impl InfractionType { } } } -/// MsgCreateValidator defines a SDK message for creating a new validator. +/// GenesisState defines the staking module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidator { +pub struct GenesisState { + /// params defines all the parameters of related to deposit. #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub commission: ::core::option::Option, - #[prost(string, tag = "3")] - pub min_self_delegation: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option, - #[prost(message, optional, tag = "7")] - pub value: ::core::option::Option, + pub params: ::core::option::Option, + /// last_total_power tracks the total amounts of bonded tokens recorded during + /// the previous end block. + #[prost(bytes = "vec", tag = "2")] + pub last_total_power: ::prost::alloc::vec::Vec, + /// last_validator_powers is a special index that provides a historical list + /// of the last-block's bonded validators. + #[prost(message, repeated, tag = "3")] + pub last_validator_powers: ::prost::alloc::vec::Vec, + /// validators defines the validator set at genesis. + #[prost(message, repeated, tag = "4")] + pub validators: ::prost::alloc::vec::Vec, + /// delegations defines the delegations active at genesis. + #[prost(message, repeated, tag = "5")] + pub delegations: ::prost::alloc::vec::Vec, + /// unbonding_delegations defines the unbonding delegations active at genesis. + #[prost(message, repeated, tag = "6")] + pub unbonding_delegations: ::prost::alloc::vec::Vec, + /// redelegations defines the redelegations active at genesis. + #[prost(message, repeated, tag = "7")] + pub redelegations: ::prost::alloc::vec::Vec, + /// exported defines a bool to identify whether the chain dealing with exported or initialized genesis. + #[prost(bool, tag = "8")] + pub exported: bool, } -impl ::prost::Name for MsgCreateValidator { - const NAME: &'static str = "MsgCreateValidator"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +/// LastValidatorPower required for validator set update logic. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateValidatorResponse {} -impl ::prost::Name for MsgCreateValidatorResponse { - const NAME: &'static str = "MsgCreateValidatorResponse"; +pub struct LastValidatorPower { + /// address is the address of the validator. + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// power defines the power of the validator. + #[prost(int64, tag = "2")] + pub power: i64, +} +impl ::prost::Name for LastValidatorPower { + const NAME: &'static str = "LastValidatorPower"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgEditValidator defines a SDK message for editing an existing validator. +/// QueryValidatorsRequest is request type for Query/Validators RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// We pass a reference to the new commission rate and min self delegation as - /// it's not mandatory to update. If not updated, the deserialized rate will be - /// zero with no way to distinguish if an update was intended. - /// REF: #2373 - #[prost(string, tag = "3")] - pub commission_rate: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub min_self_delegation: ::prost::alloc::string::String, +pub struct QueryValidatorsRequest { + /// status enables to query for validators matching a given status. + #[prost(string, tag = "1")] + pub status: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgEditValidator { - const NAME: &'static str = "MsgEditValidator"; +impl ::prost::Name for QueryValidatorsRequest { + const NAME: &'static str = "QueryValidatorsRequest"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgEditValidatorResponse defines the Msg/EditValidator response type. +/// QueryValidatorsResponse is response type for the Query/Validators RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgEditValidatorResponse {} -impl ::prost::Name for MsgEditValidatorResponse { - const NAME: &'static str = "MsgEditValidatorResponse"; +pub struct QueryValidatorsResponse { + /// validators contains all the queried validators. + #[prost(message, repeated, tag = "1")] + pub validators: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryValidatorsResponse { + const NAME: &'static str = "QueryValidatorsResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgDelegate defines a SDK message for performing a delegation of coins -/// from a delegator to a validator. +/// QueryValidatorRequest is response type for the Query/Validator RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegate { +pub struct QueryValidatorRequest { + /// validator_addr defines the validator address to query for. #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, + pub validator_addr: ::prost::alloc::string::String, } -impl ::prost::Name for MsgDelegate { - const NAME: &'static str = "MsgDelegate"; +impl ::prost::Name for QueryValidatorRequest { + const NAME: &'static str = "QueryValidatorRequest"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgDelegateResponse defines the Msg/Delegate response type. +/// QueryValidatorResponse is response type for the Query/Validator RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgDelegateResponse {} -impl ::prost::Name for MsgDelegateResponse { - const NAME: &'static str = "MsgDelegateResponse"; +pub struct QueryValidatorResponse { + /// validator defines the validator info. + #[prost(message, optional, tag = "1")] + pub validator: ::core::option::Option, +} +impl ::prost::Name for QueryValidatorResponse { + const NAME: &'static str = "QueryValidatorResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgBeginRedelegate defines a SDK message for performing a redelegation -/// of coins from a delegator and source validator to a destination validator. +/// QueryValidatorDelegationsRequest is request type for the +/// Query/ValidatorDelegations RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegate { +pub struct QueryValidatorDelegationsRequest { + /// validator_addr defines the validator address to query for. #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub amount: ::core::option::Option, + pub validator_addr: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgBeginRedelegate { - const NAME: &'static str = "MsgBeginRedelegate"; +impl ::prost::Name for QueryValidatorDelegationsRequest { + const NAME: &'static str = "QueryValidatorDelegationsRequest"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +/// QueryValidatorDelegationsResponse is response type for the +/// Query/ValidatorDelegations RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgBeginRedelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, +pub struct QueryValidatorDelegationsResponse { + #[prost(message, repeated, tag = "1")] + pub delegation_responses: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, >, } -impl ::prost::Name for MsgBeginRedelegateResponse { - const NAME: &'static str = "MsgBeginRedelegateResponse"; +impl ::prost::Name for QueryValidatorDelegationsResponse { + const NAME: &'static str = "QueryValidatorDelegationsResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgUndelegate defines a SDK message for performing an undelegation from a -/// delegate and a validator. +/// QueryValidatorUnbondingDelegationsRequest is required type for the +/// Query/ValidatorUnbondingDelegations RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegate { +pub struct QueryValidatorUnbondingDelegationsRequest { + /// validator_addr defines the validator address to query for. #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, + pub validator_addr: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryValidatorUnbondingDelegationsRequest { + const NAME: &'static str = "QueryValidatorUnbondingDelegationsRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryValidatorUnbondingDelegationsResponse is response type for the +/// Query/ValidatorUnbondingDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorUnbondingDelegationsResponse { + #[prost(message, repeated, tag = "1")] + pub unbonding_responses: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryValidatorUnbondingDelegationsResponse { + const NAME: &'static str = "QueryValidatorUnbondingDelegationsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryDelegationRequest is request type for the Query/Delegation RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegationRequest { + /// delegator_addr defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_addr: ::prost::alloc::string::String, + /// validator_addr defines the validator address to query for. #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, + pub validator_addr: ::prost::alloc::string::String, } -impl ::prost::Name for MsgUndelegate { - const NAME: &'static str = "MsgUndelegate"; +impl ::prost::Name for QueryDelegationRequest { + const NAME: &'static str = "QueryDelegationRequest"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgUndelegateResponse defines the Msg/Undelegate response type. +/// QueryDelegationResponse is response type for the Query/Delegation RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUndelegateResponse { +pub struct QueryDelegationResponse { + /// delegation_responses defines the delegation info of a delegation. #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option< - super::super::super::google::protobuf::Timestamp, - >, + pub delegation_response: ::core::option::Option, } -impl ::prost::Name for MsgUndelegateResponse { - const NAME: &'static str = "MsgUndelegateResponse"; +impl ::prost::Name for QueryDelegationResponse { + const NAME: &'static str = "QueryDelegationResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -/// -/// Since: cosmos-sdk 0.46 +/// QueryUnbondingDelegationRequest is request type for the +/// Query/UnbondingDelegation RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegation { +pub struct QueryUnbondingDelegationRequest { + /// delegator_addr defines the delegator address to query for. #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, + pub delegator_addr: ::prost::alloc::string::String, + /// validator_addr defines the validator address to query for. #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// amount is always less than or equal to unbonding delegation entry balance - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "4")] - pub creation_height: i64, + pub validator_addr: ::prost::alloc::string::String, } -impl ::prost::Name for MsgCancelUnbondingDelegation { - const NAME: &'static str = "MsgCancelUnbondingDelegation"; +impl ::prost::Name for QueryUnbondingDelegationRequest { + const NAME: &'static str = "QueryUnbondingDelegationRequest"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgCancelUnbondingDelegationResponse -/// -/// Since: cosmos-sdk 0.46 +/// QueryDelegationResponse is response type for the Query/UnbondingDelegation +/// RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUnbondingDelegationResponse {} -impl ::prost::Name for MsgCancelUnbondingDelegationResponse { - const NAME: &'static str = "MsgCancelUnbondingDelegationResponse"; +pub struct QueryUnbondingDelegationResponse { + /// unbond defines the unbonding information of a delegation. + #[prost(message, optional, tag = "1")] + pub unbond: ::core::option::Option, +} +impl ::prost::Name for QueryUnbondingDelegationResponse { + const NAME: &'static str = "QueryUnbondingDelegationResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 +/// QueryDelegatorDelegationsRequest is request type for the +/// Query/DelegatorDelegations RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). +pub struct QueryDelegatorDelegationsRequest { + /// delegator_addr defines the delegator address to query for. #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/staking parameters to update. - /// - /// NOTE: All parameters must be supplied. + pub delegator_addr: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryDelegatorDelegationsRequest { + const NAME: &'static str = "QueryDelegatorDelegationsRequest"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 +/// QueryDelegatorDelegationsResponse is response type for the +/// Query/DelegatorDelegations RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryDelegatorDelegationsResponse { + /// delegation_responses defines all the delegations' info of a delegator. + #[prost(message, repeated, tag = "1")] + pub delegation_responses: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDelegatorDelegationsResponse { + const NAME: &'static str = "QueryDelegatorDelegationsResponse"; const PACKAGE: &'static str = "cosmos.staking.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the staking Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, +/// QueryDelegatorUnbondingDelegationsRequest is request type for the +/// Query/DelegatorUnbondingDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegatorUnbondingDelegationsRequest { + /// delegator_addr defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_addr: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryDelegatorUnbondingDelegationsRequest { + const NAME: &'static str = "QueryDelegatorUnbondingDelegationsRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } +} +/// QueryUnbondingDelegatorDelegationsResponse is response type for the +/// Query/UnbondingDelegatorDelegations RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegatorUnbondingDelegationsResponse { + #[prost(message, repeated, tag = "1")] + pub unbonding_responses: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDelegatorUnbondingDelegationsResponse { + const NAME: &'static str = "QueryDelegatorUnbondingDelegationsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, +} +/// QueryRedelegationsRequest is request type for the Query/Redelegations RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryRedelegationsRequest { + /// delegator_addr defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_addr: ::prost::alloc::string::String, + /// src_validator_addr defines the validator address to redelegate from. + #[prost(string, tag = "2")] + pub src_validator_addr: ::prost::alloc::string::String, + /// dst_validator_addr defines the validator address to redelegate to. + #[prost(string, tag = "3")] + pub dst_validator_addr: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "4")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryRedelegationsRequest { + const NAME: &'static str = "QueryRedelegationsRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryRedelegationsResponse { + #[prost(message, repeated, tag = "1")] + pub redelegation_responses: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryRedelegationsResponse { + const NAME: &'static str = "QueryRedelegationsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryDelegatorValidatorsRequest is request type for the +/// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegatorValidatorsRequest { + /// delegator_addr defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_addr: ::prost::alloc::string::String, + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryDelegatorValidatorsRequest { + const NAME: &'static str = "QueryDelegatorValidatorsRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryDelegatorValidatorsResponse is response type for the +/// Query/DelegatorValidators RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegatorValidatorsResponse { + /// validators defines the validators' info of a delegator. + #[prost(message, repeated, tag = "1")] + pub validators: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDelegatorValidatorsResponse { + const NAME: &'static str = "QueryDelegatorValidatorsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryDelegatorValidatorRequest is request type for the +/// Query/DelegatorValidator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegatorValidatorRequest { + /// delegator_addr defines the delegator address to query for. + #[prost(string, tag = "1")] + pub delegator_addr: ::prost::alloc::string::String, + /// validator_addr defines the validator address to query for. + #[prost(string, tag = "2")] + pub validator_addr: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryDelegatorValidatorRequest { + const NAME: &'static str = "QueryDelegatorValidatorRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryDelegatorValidatorResponse response type for the +/// Query/DelegatorValidator RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDelegatorValidatorResponse { + /// validator defines the validator info. + #[prost(message, optional, tag = "1")] + pub validator: ::core::option::Option, +} +impl ::prost::Name for QueryDelegatorValidatorResponse { + const NAME: &'static str = "QueryDelegatorValidatorResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryHistoricalInfoRequest { + /// height defines at which height to query the historical info. + #[prost(int64, tag = "1")] + pub height: i64, +} +impl ::prost::Name for QueryHistoricalInfoRequest { + const NAME: &'static str = "QueryHistoricalInfoRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryHistoricalInfoResponse { + /// hist defines the historical info at the given height. + #[prost(message, optional, tag = "1")] + pub hist: ::core::option::Option, +} +impl ::prost::Name for QueryHistoricalInfoResponse { + const NAME: &'static str = "QueryHistoricalInfoResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryPoolRequest is request type for the Query/Pool RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryPoolRequest {} +impl ::prost::Name for QueryPoolRequest { + const NAME: &'static str = "QueryPoolRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryPoolResponse is response type for the Query/Pool RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryPoolResponse { + /// pool defines the pool info. + #[prost(message, optional, tag = "1")] + pub pool: ::core::option::Option, +} +impl ::prost::Name for QueryPoolResponse { + const NAME: &'static str = "QueryPoolResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryParamsRequest is request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// QueryParamsResponse is response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// params holds all the parameters of this module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query defines the gRPC querier service. + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self + } + impl QueryClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self } /// Limits the maximum size of a decoded message. /// @@ -923,12 +1347,15 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// CreateValidator defines a method for creating a new validator. - pub async fn create_validator( + /// Validators queries all validators that match the given status. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn validators( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -942,21 +1369,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/CreateValidator", + "/cosmos.staking.v1beta1.Query/Validators", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Msg", "CreateValidator"), - ); + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validators")); self.inner.unary(req, path, codec).await } - /// EditValidator defines a method for editing an existing validator. - pub async fn edit_validator( + /// Validator queries validator info for given validator address. + pub async fn validator( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -970,20 +1395,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/EditValidator", + "/cosmos.staking.v1beta1.Query/Validator", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "EditValidator")); + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validator")); self.inner.unary(req, path, codec).await } - /// Delegate defines a method for performing a delegation of coins - /// from a delegator to a validator. - pub async fn delegate( + /// ValidatorDelegations queries delegate info for given validator. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn validator_delegations( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -997,20 +1424,29 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/Delegate", + "/cosmos.staking.v1beta1.Query/ValidatorDelegations", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Delegate")); + .insert( + GrpcMethod::new( + "cosmos.staking.v1beta1.Query", + "ValidatorDelegations", + ), + ); self.inner.unary(req, path, codec).await } - /// BeginRedelegate defines a method for performing a redelegation - /// of coins from a delegator and source validator to a destination validator. - pub async fn begin_redelegate( + /// ValidatorUnbondingDelegations queries unbonding delegations of a validator. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn validator_unbonding_delegations( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest< + super::QueryValidatorUnbondingDelegationsRequest, + >, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1024,22 +1460,24 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/BeginRedelegate", + "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Msg", "BeginRedelegate"), + GrpcMethod::new( + "cosmos.staking.v1beta1.Query", + "ValidatorUnbondingDelegations", + ), ); self.inner.unary(req, path, codec).await } - /// Undelegate defines a method for performing an undelegation from a - /// delegate and a validator. - pub async fn undelegate( + /// Delegation queries delegate info for given validator delegator pair. + pub async fn delegation( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1053,22 +1491,54 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/Undelegate", + "/cosmos.staking.v1beta1.Query/Delegation", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Undelegate")); + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Delegation")); self.inner.unary(req, path, codec).await } - /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - /// and delegate back to previous validator. + /// UnbondingDelegation queries unbonding info for given validator delegator + /// pair. + pub async fn unbonding_delegation( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/UnbondingDelegation", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "cosmos.staking.v1beta1.Query", + "UnbondingDelegation", + ), + ); + self.inner.unary(req, path, codec).await + } + /// DelegatorDelegations queries all delegations of a given delegator address. /// - /// Since: cosmos-sdk 0.46 - pub async fn cancel_unbonding_delegation( + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn delegator_delegations( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1082,26 +1552,30 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", + "/cosmos.staking.v1beta1.Query/DelegatorDelegations", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "cosmos.staking.v1beta1.Msg", - "CancelUnbondingDelegation", + "cosmos.staking.v1beta1.Query", + "DelegatorDelegations", ), ); self.inner.unary(req, path, codec).await } - /// UpdateParams defines an operation for updating the x/staking module - /// parameters. - /// Since: cosmos-sdk 0.47 - pub async fn update_params( + /// DelegatorUnbondingDelegations queries all unbonding delegations of a given + /// delegator address. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn delegator_unbonding_delegations( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest< + super::QueryDelegatorUnbondingDelegationsRequest, + >, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1115,136 +1589,389 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Msg/UpdateParams", + "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "UpdateParams")); + .insert( + GrpcMethod::new( + "cosmos.staking.v1beta1.Query", + "DelegatorUnbondingDelegations", + ), + ); self.inner.unary(req, path, codec).await } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// CreateValidator defines a method for creating a new validator. - async fn create_validator( - &self, - request: tonic::Request, + /// Redelegations queries redelegations of given address. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn redelegations( + &mut self, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - >; - /// EditValidator defines a method for editing an existing validator. - async fn edit_validator( - &self, - request: tonic::Request, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/Redelegations", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.staking.v1beta1.Query", "Redelegations"), + ); + self.inner.unary(req, path, codec).await + } + /// DelegatorValidators queries all validators info for given delegator + /// address. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + pub async fn delegator_validators( + &mut self, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - >; - /// Delegate defines a method for performing a delegation of coins - /// from a delegator to a validator. - async fn delegate( + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/DelegatorValidators", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "cosmos.staking.v1beta1.Query", + "DelegatorValidators", + ), + ); + self.inner.unary(req, path, codec).await + } + /// DelegatorValidator queries validator info for given delegator validator + /// pair. + pub async fn delegator_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/DelegatorValidator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.staking.v1beta1.Query", "DelegatorValidator"), + ); + self.inner.unary(req, path, codec).await + } + /// HistoricalInfo queries the historical info for given height. + pub async fn historical_info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/HistoricalInfo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.staking.v1beta1.Query", "HistoricalInfo"), + ); + self.inner.unary(req, path, codec).await + } + /// Pool queries the pool info. + pub async fn pool( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/Pool", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Pool")); + self.inner.unary(req, path, codec).await + } + /// Parameters queries the staking parameters. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Query/Params", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod query_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + #[async_trait] + pub trait Query: Send + Sync + 'static { + /// Validators queries all validators that match the given status. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn validators( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// BeginRedelegate defines a method for performing a redelegation - /// of coins from a delegator and source validator to a destination validator. - async fn begin_redelegate( + /// Validator queries validator info for given validator address. + async fn validator( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Undelegate defines a method for performing an undelegation from a - /// delegate and a validator. - async fn undelegate( + /// ValidatorDelegations queries delegate info for given validator. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn validator_delegations( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - /// and delegate back to previous validator. + /// ValidatorUnbondingDelegations queries unbonding delegations of a validator. /// - /// Since: cosmos-sdk 0.46 - async fn cancel_unbonding_delegation( + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn validator_unbonding_delegations( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateParams defines an operation for updating the x/staking module - /// parameters. - /// Since: cosmos-sdk 0.47 - async fn update_params( + /// Delegation queries delegate info for given validator delegator pair. + async fn delegation( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - } - /// Msg defines the staking Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl MsgServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. + /// UnbondingDelegation queries unbonding info for given validator delegator + /// pair. + async fn unbonding_delegation( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// DelegatorDelegations queries all delegations of a given delegator address. /// - /// Default: `4MB` + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn delegator_delegations( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// DelegatorUnbondingDelegations queries all unbonding delegations of a given + /// delegator address. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn delegator_unbonding_delegations( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Redelegations queries redelegations of given address. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn redelegations( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// DelegatorValidators queries all validators info for given delegator + /// address. + /// + /// When called from another module, this query might consume a high amount of + /// gas if the pagination field is incorrectly set. + async fn delegator_validators( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// DelegatorValidator queries validator info for given delegator validator + /// pair. + async fn delegator_validator( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// HistoricalInfo queries the historical info for given height. + async fn historical_info( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Pool queries the pool info. + async fn pool( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Parameters queries the staking parameters. + async fn params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Query defines the gRPC querier service. + #[derive(Debug)] + pub struct QueryServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl QueryServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` #[must_use] pub fn max_decoding_message_size(mut self, limit: usize) -> Self { self.max_decoding_message_size = Some(limit); @@ -1259,9 +1986,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -1277,23 +2004,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.staking.v1beta1.Msg/CreateValidator" => { + "/cosmos.staking.v1beta1.Query/Validators" => { #[allow(non_camel_case_types)] - struct CreateValidatorSvc(pub Arc); - impl tonic::server::UnaryService - for CreateValidatorSvc { - type Response = super::MsgCreateValidatorResponse; + struct ValidatorsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ValidatorsSvc { + type Response = super::QueryValidatorsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::create_validator(&inner, request).await + ::validators(&inner, request).await }; Box::pin(fut) } @@ -1305,7 +2034,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CreateValidatorSvc(inner); + let method = ValidatorsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1321,23 +2050,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Msg/EditValidator" => { + "/cosmos.staking.v1beta1.Query/Validator" => { #[allow(non_camel_case_types)] - struct EditValidatorSvc(pub Arc); - impl tonic::server::UnaryService - for EditValidatorSvc { - type Response = super::MsgEditValidatorResponse; + struct ValidatorSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ValidatorSvc { + type Response = super::QueryValidatorResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::edit_validator(&inner, request).await + ::validator(&inner, request).await }; Box::pin(fut) } @@ -1349,7 +2080,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = EditValidatorSvc(inner); + let method = ValidatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1365,23 +2096,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Msg/Delegate" => { + "/cosmos.staking.v1beta1.Query/ValidatorDelegations" => { #[allow(non_camel_case_types)] - struct DelegateSvc(pub Arc); - impl tonic::server::UnaryService - for DelegateSvc { - type Response = super::MsgDelegateResponse; + struct ValidatorDelegationsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryValidatorDelegationsRequest, + > for ValidatorDelegationsSvc { + type Response = super::QueryValidatorDelegationsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryValidatorDelegationsRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::delegate(&inner, request).await + ::validator_delegations(&inner, request).await }; Box::pin(fut) } @@ -1393,7 +2129,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DelegateSvc(inner); + let method = ValidatorDelegationsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1409,23 +2145,32 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Msg/BeginRedelegate" => { + "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations" => { #[allow(non_camel_case_types)] - struct BeginRedelegateSvc(pub Arc); - impl tonic::server::UnaryService - for BeginRedelegateSvc { - type Response = super::MsgBeginRedelegateResponse; + struct ValidatorUnbondingDelegationsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryValidatorUnbondingDelegationsRequest, + > for ValidatorUnbondingDelegationsSvc { + type Response = super::QueryValidatorUnbondingDelegationsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryValidatorUnbondingDelegationsRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::begin_redelegate(&inner, request).await + ::validator_unbonding_delegations( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -1437,7 +2182,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = BeginRedelegateSvc(inner); + let method = ValidatorUnbondingDelegationsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1453,23 +2198,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Msg/Undelegate" => { + "/cosmos.staking.v1beta1.Query/Delegation" => { #[allow(non_camel_case_types)] - struct UndelegateSvc(pub Arc); - impl tonic::server::UnaryService - for UndelegateSvc { - type Response = super::MsgUndelegateResponse; + struct DelegationSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DelegationSvc { + type Response = super::QueryDelegationResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::undelegate(&inner, request).await + ::delegation(&inner, request).await }; Box::pin(fut) } @@ -1481,7 +2228,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UndelegateSvc(inner); + let method = DelegationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1497,26 +2244,27 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation" => { + "/cosmos.staking.v1beta1.Query/UnbondingDelegation" => { #[allow(non_camel_case_types)] - struct CancelUnbondingDelegationSvc(pub Arc); + struct UnbondingDelegationSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for CancelUnbondingDelegationSvc { - type Response = super::MsgCancelUnbondingDelegationResponse; + T: Query, + > tonic::server::UnaryService + for UnbondingDelegationSvc { + type Response = super::QueryUnbondingDelegationResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryUnbondingDelegationRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::cancel_unbonding_delegation(&inner, request) - .await + ::unbonding_delegation(&inner, request).await }; Box::pin(fut) } @@ -1528,7 +2276,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CancelUnbondingDelegationSvc(inner); + let method = UnbondingDelegationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1544,23 +2292,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Msg/UpdateParams" => { + "/cosmos.staking.v1beta1.Query/DelegatorDelegations" => { #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct DelegatorDelegationsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryDelegatorDelegationsRequest, + > for DelegatorDelegationsSvc { + type Response = super::QueryDelegatorDelegationsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryDelegatorDelegationsRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_params(&inner, request).await + ::delegator_delegations(&inner, request).await }; Box::pin(fut) } @@ -1572,7 +2325,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateParamsSvc(inner); + let method = DelegatorDelegationsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1588,1367 +2341,78 @@ pub mod msg_server { }; Box::pin(fut) } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) + "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations" => { + #[allow(non_camel_case_types)] + struct DelegatorUnbondingDelegationsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryDelegatorUnbondingDelegationsRequest, + > for DelegatorUnbondingDelegationsSvc { + type Response = super::QueryDelegatorUnbondingDelegationsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryDelegatorUnbondingDelegationsRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::delegator_unbonding_delegations( + &inner, + request, + ) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = DelegatorUnbondingDelegationsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "cosmos.staking.v1beta1.Msg"; - } -} -/// QueryValidatorsRequest is request type for Query/Validators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorsRequest { - /// status enables to query for validators matching a given status. - #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryValidatorsRequest { - const NAME: &'static str = "QueryValidatorsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorsResponse is response type for the Query/Validators RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorsResponse { - /// validators contains all the queried validators. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryValidatorsResponse { - const NAME: &'static str = "QueryValidatorsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorRequest is response type for the Query/Validator RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryValidatorRequest { - const NAME: &'static str = "QueryValidatorRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorResponse is response type for the Query/Validator RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -impl ::prost::Name for QueryValidatorResponse { - const NAME: &'static str = "QueryValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorDelegationsRequest is request type for the -/// Query/ValidatorDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorDelegationsRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryValidatorDelegationsRequest { - const NAME: &'static str = "QueryValidatorDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorDelegationsResponse is response type for the -/// Query/ValidatorDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub delegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryValidatorDelegationsResponse { - const NAME: &'static str = "QueryValidatorDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorUnbondingDelegationsRequest is required type for the -/// Query/ValidatorUnbondingDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorUnbondingDelegationsRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryValidatorUnbondingDelegationsRequest { - const NAME: &'static str = "QueryValidatorUnbondingDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryValidatorUnbondingDelegationsResponse is response type for the -/// Query/ValidatorUnbondingDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryValidatorUnbondingDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub unbonding_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryValidatorUnbondingDelegationsResponse { - const NAME: &'static str = "QueryValidatorUnbondingDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegationRequest is request type for the Query/Delegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDelegationRequest { - const NAME: &'static str = "QueryDelegationRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegationResponse is response type for the Query/Delegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegationResponse { - /// delegation_responses defines the delegation info of a delegation. - #[prost(message, optional, tag = "1")] - pub delegation_response: ::core::option::Option, -} -impl ::prost::Name for QueryDelegationResponse { - const NAME: &'static str = "QueryDelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryUnbondingDelegationRequest is request type for the -/// Query/UnbondingDelegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnbondingDelegationRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryUnbondingDelegationRequest { - const NAME: &'static str = "QueryUnbondingDelegationRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegationResponse is response type for the Query/UnbondingDelegation -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnbondingDelegationResponse { - /// unbond defines the unbonding information of a delegation. - #[prost(message, optional, tag = "1")] - pub unbond: ::core::option::Option, -} -impl ::prost::Name for QueryUnbondingDelegationResponse { - const NAME: &'static str = "QueryUnbondingDelegationResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorDelegationsRequest is request type for the -/// Query/DelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorDelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDelegatorDelegationsRequest { - const NAME: &'static str = "QueryDelegatorDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorDelegationsResponse is response type for the -/// Query/DelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorDelegationsResponse { - /// delegation_responses defines all the delegations' info of a delegator. - #[prost(message, repeated, tag = "1")] - pub delegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDelegatorDelegationsResponse { - const NAME: &'static str = "QueryDelegatorDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorUnbondingDelegationsRequest is request type for the -/// Query/DelegatorUnbondingDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorUnbondingDelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDelegatorUnbondingDelegationsRequest { - const NAME: &'static str = "QueryDelegatorUnbondingDelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryUnbondingDelegatorDelegationsResponse is response type for the -/// Query/UnbondingDelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorUnbondingDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub unbonding_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDelegatorUnbondingDelegationsResponse { - const NAME: &'static str = "QueryDelegatorUnbondingDelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRedelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// src_validator_addr defines the validator address to redelegate from. - #[prost(string, tag = "2")] - pub src_validator_addr: ::prost::alloc::string::String, - /// dst_validator_addr defines the validator address to redelegate to. - #[prost(string, tag = "3")] - pub dst_validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryRedelegationsRequest { - const NAME: &'static str = "QueryRedelegationsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryRedelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub redelegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryRedelegationsResponse { - const NAME: &'static str = "QueryRedelegationsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorsRequest is request type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDelegatorValidatorsRequest { - const NAME: &'static str = "QueryDelegatorValidatorsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorsResponse is response type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorsResponse { - /// validators defines the validators' info of a delegator. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDelegatorValidatorsResponse { - const NAME: &'static str = "QueryDelegatorValidatorsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorRequest is request type for the -/// Query/DelegatorValidator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDelegatorValidatorRequest { - const NAME: &'static str = "QueryDelegatorValidatorRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryDelegatorValidatorResponse response type for the -/// Query/DelegatorValidator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDelegatorValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -impl ::prost::Name for QueryDelegatorValidatorResponse { - const NAME: &'static str = "QueryDelegatorValidatorResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryHistoricalInfoRequest { - /// height defines at which height to query the historical info. - #[prost(int64, tag = "1")] - pub height: i64, -} -impl ::prost::Name for QueryHistoricalInfoRequest { - const NAME: &'static str = "QueryHistoricalInfoRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryHistoricalInfoResponse { - /// hist defines the historical info at the given height. - #[prost(message, optional, tag = "1")] - pub hist: ::core::option::Option, -} -impl ::prost::Name for QueryHistoricalInfoResponse { - const NAME: &'static str = "QueryHistoricalInfoResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryPoolRequest is request type for the Query/Pool RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPoolRequest {} -impl ::prost::Name for QueryPoolRequest { - const NAME: &'static str = "QueryPoolRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryPoolResponse is response type for the Query/Pool RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPoolResponse { - /// pool defines the pool info. - #[prost(message, optional, tag = "1")] - pub pool: ::core::option::Option, -} -impl ::prost::Name for QueryPoolResponse { - const NAME: &'static str = "QueryPoolResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the gRPC querier service. - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl QueryClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - QueryClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// Validators queries all validators that match the given status. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn validators( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/Validators", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validators")); - self.inner.unary(req, path, codec).await - } - /// Validator queries validator info for given validator address. - pub async fn validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/Validator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validator")); - self.inner.unary(req, path, codec).await - } - /// ValidatorDelegations queries delegate info for given validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn validator_delegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/ValidatorDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "ValidatorDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ValidatorUnbondingDelegations queries unbonding delegations of a validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn validator_unbonding_delegations( - &mut self, - request: impl tonic::IntoRequest< - super::QueryValidatorUnbondingDelegationsRequest, - >, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "ValidatorUnbondingDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// Delegation queries delegate info for given validator delegator pair. - pub async fn delegation( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/Delegation", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Delegation")); - self.inner.unary(req, path, codec).await - } - /// UnbondingDelegation queries unbonding info for given validator delegator - /// pair. - pub async fn unbonding_delegation( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/UnbondingDelegation", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "UnbondingDelegation", - ), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorDelegations queries all delegations of a given delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn delegator_delegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/DelegatorDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "DelegatorDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorUnbondingDelegations queries all unbonding delegations of a given - /// delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn delegator_unbonding_delegations( - &mut self, - request: impl tonic::IntoRequest< - super::QueryDelegatorUnbondingDelegationsRequest, - >, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "DelegatorUnbondingDelegations", - ), - ); - self.inner.unary(req, path, codec).await - } - /// Redelegations queries redelegations of given address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn redelegations( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/Redelegations", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Query", "Redelegations"), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorValidators queries all validators info for given delegator - /// address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - pub async fn delegator_validators( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/DelegatorValidators", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.staking.v1beta1.Query", - "DelegatorValidators", - ), - ); - self.inner.unary(req, path, codec).await - } - /// DelegatorValidator queries validator info for given delegator validator - /// pair. - pub async fn delegator_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/DelegatorValidator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Query", "DelegatorValidator"), - ); - self.inner.unary(req, path, codec).await - } - /// HistoricalInfo queries the historical info for given height. - pub async fn historical_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/HistoricalInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.staking.v1beta1.Query", "HistoricalInfo"), - ); - self.inner.unary(req, path, codec).await - } - /// Pool queries the pool info. - pub async fn pool( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/Pool", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Pool")); - self.inner.unary(req, path, codec).await - } - /// Parameters queries the staking parameters. - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.staking.v1beta1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Validators queries all validators that match the given status. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn validators( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Validator queries validator info for given validator address. - async fn validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ValidatorDelegations queries delegate info for given validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn validator_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ValidatorUnbondingDelegations queries unbonding delegations of a validator. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn validator_unbonding_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Delegation queries delegate info for given validator delegator pair. - async fn delegation( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UnbondingDelegation queries unbonding info for given validator delegator - /// pair. - async fn unbonding_delegation( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorDelegations queries all delegations of a given delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn delegator_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorUnbondingDelegations queries all unbonding delegations of a given - /// delegator address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn delegator_unbonding_delegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Redelegations queries redelegations of given address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn redelegations( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorValidators queries all validators info for given delegator - /// address. - /// - /// When called from another module, this query might consume a high amount of - /// gas if the pagination field is incorrectly set. - async fn delegator_validators( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DelegatorValidator queries validator info for given delegator validator - /// pair. - async fn delegator_validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// HistoricalInfo queries the historical info for given height. - async fn historical_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Pool queries the pool info. - async fn pool( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Parameters queries the staking parameters. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query defines the gRPC querier service. - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl QueryServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for QueryServer - where - T: Query, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/cosmos.staking.v1beta1.Query/Validators" => { - #[allow(non_camel_case_types)] - struct ValidatorsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ValidatorsSvc { - type Response = super::QueryValidatorsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::validators(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ValidatorsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.staking.v1beta1.Query/Validator" => { + "/cosmos.staking.v1beta1.Query/Redelegations" => { #[allow(non_camel_case_types)] - struct ValidatorSvc(pub Arc); + struct RedelegationsSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for ValidatorSvc { - type Response = super::QueryValidatorResponse; + > tonic::server::UnaryService + for RedelegationsSvc { + type Response = super::QueryRedelegationsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::validator(&inner, request).await + ::redelegations(&inner, request).await }; Box::pin(fut) } @@ -2960,7 +2424,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ValidatorSvc(inner); + let method = RedelegationsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2976,15 +2440,14 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/ValidatorDelegations" => { + "/cosmos.staking.v1beta1.Query/DelegatorValidators" => { #[allow(non_camel_case_types)] - struct ValidatorDelegationsSvc(pub Arc); + struct DelegatorValidatorsSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService< - super::QueryValidatorDelegationsRequest, - > for ValidatorDelegationsSvc { - type Response = super::QueryValidatorDelegationsResponse; + > tonic::server::UnaryService + for DelegatorValidatorsSvc { + type Response = super::QueryDelegatorValidatorsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, @@ -2992,12 +2455,12 @@ pub mod query_server { fn call( &mut self, request: tonic::Request< - super::QueryValidatorDelegationsRequest, + super::QueryDelegatorValidatorsRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::validator_delegations(&inner, request).await + ::delegator_validators(&inner, request).await }; Box::pin(fut) } @@ -3009,7 +2472,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ValidatorDelegationsSvc(inner); + let method = DelegatorValidatorsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3025,15 +2488,14 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations" => { + "/cosmos.staking.v1beta1.Query/DelegatorValidator" => { #[allow(non_camel_case_types)] - struct ValidatorUnbondingDelegationsSvc(pub Arc); + struct DelegatorValidatorSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService< - super::QueryValidatorUnbondingDelegationsRequest, - > for ValidatorUnbondingDelegationsSvc { - type Response = super::QueryValidatorUnbondingDelegationsResponse; + > tonic::server::UnaryService + for DelegatorValidatorSvc { + type Response = super::QueryDelegatorValidatorResponse; type Future = BoxFuture< tonic::Response, tonic::Status, @@ -3041,16 +2503,12 @@ pub mod query_server { fn call( &mut self, request: tonic::Request< - super::QueryValidatorUnbondingDelegationsRequest, + super::QueryDelegatorValidatorRequest, >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::validator_unbonding_delegations( - &inner, - request, - ) - .await + ::delegator_validator(&inner, request).await }; Box::pin(fut) } @@ -3062,7 +2520,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ValidatorUnbondingDelegationsSvc(inner); + let method = DelegatorValidatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3078,25 +2536,25 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/Delegation" => { + "/cosmos.staking.v1beta1.Query/HistoricalInfo" => { #[allow(non_camel_case_types)] - struct DelegationSvc(pub Arc); + struct HistoricalInfoSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for DelegationSvc { - type Response = super::QueryDelegationResponse; + > tonic::server::UnaryService + for HistoricalInfoSvc { + type Response = super::QueryHistoricalInfoResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::delegation(&inner, request).await + ::historical_info(&inner, request).await }; Box::pin(fut) } @@ -3108,7 +2566,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DelegationSvc(inner); + let method = HistoricalInfoSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3124,27 +2582,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/UnbondingDelegation" => { + "/cosmos.staking.v1beta1.Query/Pool" => { #[allow(non_camel_case_types)] - struct UnbondingDelegationSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for UnbondingDelegationSvc { - type Response = super::QueryUnbondingDelegationResponse; + struct PoolSvc(pub Arc); + impl tonic::server::UnaryService + for PoolSvc { + type Response = super::QueryPoolResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryUnbondingDelegationRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::unbonding_delegation(&inner, request).await + ::pool(&inner, request).await }; Box::pin(fut) } @@ -3156,7 +2610,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UnbondingDelegationSvc(inner); + let method = PoolSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3172,28 +2626,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/DelegatorDelegations" => { + "/cosmos.staking.v1beta1.Query/Params" => { #[allow(non_camel_case_types)] - struct DelegatorDelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryDelegatorDelegationsRequest, - > for DelegatorDelegationsSvc { - type Response = super::QueryDelegatorDelegationsResponse; + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryDelegatorDelegationsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::delegator_delegations(&inner, request).await + ::params(&inner, request).await }; Box::pin(fut) } @@ -3205,7 +2654,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DelegatorDelegationsSvc(inner); + let method = ParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3221,32 +2670,761 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations" => { + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "cosmos.staking.v1beta1.Query"; + } +} +/// MsgCreateValidator defines a SDK message for creating a new validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCreateValidator { + #[prost(message, optional, tag = "1")] + pub description: ::core::option::Option, + #[prost(message, optional, tag = "2")] + pub commission: ::core::option::Option, + #[prost(string, tag = "3")] + pub min_self_delegation: ::prost::alloc::string::String, + /// Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. + /// The validator address bytes and delegator address bytes refer to the same account while creating validator (defer + /// only in bech32 notation). + #[deprecated] + #[prost(string, tag = "4")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "5")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "6")] + pub pubkey: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub value: ::core::option::Option, +} +impl ::prost::Name for MsgCreateValidator { + const NAME: &'static str = "MsgCreateValidator"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCreateValidatorResponse {} +impl ::prost::Name for MsgCreateValidatorResponse { + const NAME: &'static str = "MsgCreateValidatorResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgEditValidator defines a SDK message for editing an existing validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgEditValidator { + #[prost(message, optional, tag = "1")] + pub description: ::core::option::Option, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + /// We pass a reference to the new commission rate and min self delegation as + /// it's not mandatory to update. If not updated, the deserialized rate will be + /// zero with no way to distinguish if an update was intended. + /// REF: #2373 + #[prost(string, tag = "3")] + pub commission_rate: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub min_self_delegation: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgEditValidator { + const NAME: &'static str = "MsgEditValidator"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgEditValidatorResponse defines the Msg/EditValidator response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgEditValidatorResponse {} +impl ::prost::Name for MsgEditValidatorResponse { + const NAME: &'static str = "MsgEditValidatorResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgDelegate defines a SDK message for performing a delegation of coins +/// from a delegator to a validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDelegate { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgDelegate { + const NAME: &'static str = "MsgDelegate"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgDelegateResponse defines the Msg/Delegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgDelegateResponse {} +impl ::prost::Name for MsgDelegateResponse { + const NAME: &'static str = "MsgDelegateResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgBeginRedelegate defines a SDK message for performing a redelegation +/// of coins from a delegator and source validator to a destination validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgBeginRedelegate { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_src_address: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub validator_dst_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "4")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgBeginRedelegate { + const NAME: &'static str = "MsgBeginRedelegate"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgBeginRedelegateResponse { + #[prost(message, optional, tag = "1")] + pub completion_time: ::core::option::Option< + super::super::super::google::protobuf::Timestamp, + >, +} +impl ::prost::Name for MsgBeginRedelegateResponse { + const NAME: &'static str = "MsgBeginRedelegateResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUndelegate defines a SDK message for performing an undelegation from a +/// delegate and a validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUndelegate { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgUndelegate { + const NAME: &'static str = "MsgUndelegate"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUndelegateResponse defines the Msg/Undelegate response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUndelegateResponse { + #[prost(message, optional, tag = "1")] + pub completion_time: ::core::option::Option< + super::super::super::google::protobuf::Timestamp, + >, + /// amount returns the amount of undelegated coins + /// + /// Since: cosmos-sdk 0.50 + #[prost(message, optional, tag = "2")] + pub amount: ::core::option::Option, +} +impl ::prost::Name for MsgUndelegateResponse { + const NAME: &'static str = "MsgUndelegateResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCancelUnbondingDelegation { + #[prost(string, tag = "1")] + pub delegator_address: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub validator_address: ::prost::alloc::string::String, + /// amount is always less than or equal to unbonding delegation entry balance + #[prost(message, optional, tag = "3")] + pub amount: ::core::option::Option, + /// creation_height is the height which the unbonding took place. + #[prost(int64, tag = "4")] + pub creation_height: i64, +} +impl ::prost::Name for MsgCancelUnbondingDelegation { + const NAME: &'static str = "MsgCancelUnbondingDelegation"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgCancelUnbondingDelegationResponse +/// +/// Since: cosmos-sdk 0.46 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgCancelUnbondingDelegationResponse {} +impl ::prost::Name for MsgCancelUnbondingDelegationResponse { + const NAME: &'static str = "MsgCancelUnbondingDelegationResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the x/staking parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// +/// Since: cosmos-sdk 0.47 +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "cosmos.staking.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the staking Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// CreateValidator defines a method for creating a new validator. + pub async fn create_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/CreateValidator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.staking.v1beta1.Msg", "CreateValidator"), + ); + self.inner.unary(req, path, codec).await + } + /// EditValidator defines a method for editing an existing validator. + pub async fn edit_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/EditValidator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "EditValidator")); + self.inner.unary(req, path, codec).await + } + /// Delegate defines a method for performing a delegation of coins + /// from a delegator to a validator. + pub async fn delegate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/Delegate", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Delegate")); + self.inner.unary(req, path, codec).await + } + /// BeginRedelegate defines a method for performing a redelegation + /// of coins from a delegator and source validator to a destination validator. + pub async fn begin_redelegate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/BeginRedelegate", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.staking.v1beta1.Msg", "BeginRedelegate"), + ); + self.inner.unary(req, path, codec).await + } + /// Undelegate defines a method for performing an undelegation from a + /// delegate and a validator. + pub async fn undelegate( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/Undelegate", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Undelegate")); + self.inner.unary(req, path, codec).await + } + /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation + /// and delegate back to previous validator. + /// + /// Since: cosmos-sdk 0.46 + pub async fn cancel_unbonding_delegation( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "cosmos.staking.v1beta1.Msg", + "CancelUnbondingDelegation", + ), + ); + self.inner.unary(req, path, codec).await + } + /// UpdateParams defines an operation for updating the x/staking module + /// parameters. + /// Since: cosmos-sdk 0.47 + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.staking.v1beta1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "UpdateParams")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// CreateValidator defines a method for creating a new validator. + async fn create_validator( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// EditValidator defines a method for editing an existing validator. + async fn edit_validator( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Delegate defines a method for performing a delegation of coins + /// from a delegator to a validator. + async fn delegate( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// BeginRedelegate defines a method for performing a redelegation + /// of coins from a delegator and source validator to a destination validator. + async fn begin_redelegate( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Undelegate defines a method for performing an undelegation from a + /// delegate and a validator. + async fn undelegate( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation + /// and delegate back to previous validator. + /// + /// Since: cosmos-sdk 0.46 + async fn cancel_unbonding_delegation( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UpdateParams defines an operation for updating the x/staking module + /// parameters. + /// Since: cosmos-sdk 0.47 + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the staking Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/cosmos.staking.v1beta1.Msg/CreateValidator" => { #[allow(non_camel_case_types)] - struct DelegatorUnbondingDelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryDelegatorUnbondingDelegationsRequest, - > for DelegatorUnbondingDelegationsSvc { - type Response = super::QueryDelegatorUnbondingDelegationsResponse; + struct CreateValidatorSvc(pub Arc); + impl tonic::server::UnaryService + for CreateValidatorSvc { + type Response = super::MsgCreateValidatorResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryDelegatorUnbondingDelegationsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::delegator_unbonding_delegations( - &inner, - request, - ) - .await + ::create_validator(&inner, request).await }; Box::pin(fut) } @@ -3258,7 +3436,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DelegatorUnbondingDelegationsSvc(inner); + let method = CreateValidatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3274,25 +3452,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/Redelegations" => { + "/cosmos.staking.v1beta1.Msg/EditValidator" => { #[allow(non_camel_case_types)] - struct RedelegationsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for RedelegationsSvc { - type Response = super::QueryRedelegationsResponse; + struct EditValidatorSvc(pub Arc); + impl tonic::server::UnaryService + for EditValidatorSvc { + type Response = super::MsgEditValidatorResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::redelegations(&inner, request).await + ::edit_validator(&inner, request).await }; Box::pin(fut) } @@ -3304,7 +3480,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = RedelegationsSvc(inner); + let method = EditValidatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3320,27 +3496,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/DelegatorValidators" => { + "/cosmos.staking.v1beta1.Msg/Delegate" => { #[allow(non_camel_case_types)] - struct DelegatorValidatorsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DelegatorValidatorsSvc { - type Response = super::QueryDelegatorValidatorsResponse; + struct DelegateSvc(pub Arc); + impl tonic::server::UnaryService + for DelegateSvc { + type Response = super::MsgDelegateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryDelegatorValidatorsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::delegator_validators(&inner, request).await + ::delegate(&inner, request).await }; Box::pin(fut) } @@ -3352,7 +3524,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DelegatorValidatorsSvc(inner); + let method = DelegateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3368,27 +3540,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/DelegatorValidator" => { + "/cosmos.staking.v1beta1.Msg/BeginRedelegate" => { #[allow(non_camel_case_types)] - struct DelegatorValidatorSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for DelegatorValidatorSvc { - type Response = super::QueryDelegatorValidatorResponse; + struct BeginRedelegateSvc(pub Arc); + impl tonic::server::UnaryService + for BeginRedelegateSvc { + type Response = super::MsgBeginRedelegateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryDelegatorValidatorRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::delegator_validator(&inner, request).await + ::begin_redelegate(&inner, request).await }; Box::pin(fut) } @@ -3400,7 +3568,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DelegatorValidatorSvc(inner); + let method = BeginRedelegateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3416,25 +3584,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/HistoricalInfo" => { + "/cosmos.staking.v1beta1.Msg/Undelegate" => { #[allow(non_camel_case_types)] - struct HistoricalInfoSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for HistoricalInfoSvc { - type Response = super::QueryHistoricalInfoResponse; + struct UndelegateSvc(pub Arc); + impl tonic::server::UnaryService + for UndelegateSvc { + type Response = super::MsgUndelegateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::historical_info(&inner, request).await + ::undelegate(&inner, request).await }; Box::pin(fut) } @@ -3446,7 +3612,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = HistoricalInfoSvc(inner); + let method = UndelegateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3462,23 +3628,26 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/Pool" => { + "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation" => { #[allow(non_camel_case_types)] - struct PoolSvc(pub Arc); - impl tonic::server::UnaryService - for PoolSvc { - type Response = super::QueryPoolResponse; + struct CancelUnbondingDelegationSvc(pub Arc); + impl< + T: Msg, + > tonic::server::UnaryService + for CancelUnbondingDelegationSvc { + type Response = super::MsgCancelUnbondingDelegationResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::pool(&inner, request).await + ::cancel_unbonding_delegation(&inner, request) + .await }; Box::pin(fut) } @@ -3490,7 +3659,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PoolSvc(inner); + let method = CancelUnbondingDelegationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3506,23 +3675,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.staking.v1beta1.Query/Params" => { + "/cosmos.staking.v1beta1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -3534,7 +3703,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3565,7 +3734,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -3577,7 +3746,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -3587,156 +3756,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "cosmos.staking.v1beta1.Query"; - } -} -/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct StakeAuthorization { - /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - /// empty, there is no spend limit and any amount of coins can be delegated. - #[prost(message, optional, tag = "1")] - pub max_tokens: ::core::option::Option, - /// authorization_type defines one of AuthorizationType. - #[prost(enumeration = "AuthorizationType", tag = "4")] - pub authorization_type: i32, - /// validators is the oneof that represents either allow_list or deny_list - #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")] - pub validators: ::core::option::Option, -} -/// Nested message and enum types in `StakeAuthorization`. -pub mod stake_authorization { - /// Validators defines list of validator addresses. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct ValidatorsVec { - #[prost(string, repeated, tag = "1")] - pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - } - impl ::prost::Name for ValidatorsVec { - const NAME: &'static str = "Validators"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "cosmos.staking.v1beta1.StakeAuthorization.{}", Self::NAME - ) - } - } - /// validators is the oneof that represents either allow_list or deny_list - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Validators { - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - #[prost(message, tag = "2")] - AllowList(ValidatorsVec), - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - #[prost(message, tag = "3")] - DenyList(ValidatorsVec), - } -} -impl ::prost::Name for StakeAuthorization { - const NAME: &'static str = "StakeAuthorization"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// AuthorizationType defines the type of staking module authorization type -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum AuthorizationType { - /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - Unspecified = 0, - /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - Delegate = 1, - /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - Undelegate = 2, - /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - Redelegate = 3, -} -impl AuthorizationType { - /// 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 { - AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", - AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", - AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", - AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), - "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), - "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), - _ => None, - } - } -} -/// GenesisState defines the staking module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// params defines all the parameters of related to deposit. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// last_total_power tracks the total amounts of bonded tokens recorded during - /// the previous end block. - #[prost(bytes = "vec", tag = "2")] - pub last_total_power: ::prost::alloc::vec::Vec, - /// last_validator_powers is a special index that provides a historical list - /// of the last-block's bonded validators. - #[prost(message, repeated, tag = "3")] - pub last_validator_powers: ::prost::alloc::vec::Vec, - /// delegations defines the validator set at genesis. - #[prost(message, repeated, tag = "4")] - pub validators: ::prost::alloc::vec::Vec, - /// delegations defines the delegations active at genesis. - #[prost(message, repeated, tag = "5")] - pub delegations: ::prost::alloc::vec::Vec, - /// unbonding_delegations defines the unbonding delegations active at genesis. - #[prost(message, repeated, tag = "6")] - pub unbonding_delegations: ::prost::alloc::vec::Vec, - /// redelegations defines the redelegations active at genesis. - #[prost(message, repeated, tag = "7")] - pub redelegations: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "8")] - pub exported: bool, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) - } -} -/// LastValidatorPower required for validator set update logic. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LastValidatorPower { - /// address is the address of the validator. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// power defines the power of the validator. - #[prost(int64, tag = "2")] - pub power: i64, -} -impl ::prost::Name for LastValidatorPower { - const NAME: &'static str = "LastValidatorPower"; - const PACKAGE: &'static str = "cosmos.staking.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.staking.v1beta1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "cosmos.staking.v1beta1.Msg"; } } diff --git a/src/prost/cosmos.staking.v1beta1.serde.rs b/src/prost/cosmos.staking.v1beta1.serde.rs index 38ca4a23..8195e71b 100644 --- a/src/prost/cosmos.staking.v1beta1.serde.rs +++ b/src/prost/cosmos.staking.v1beta1.serde.rs @@ -9,6 +9,7 @@ impl serde::Serialize for AuthorizationType { Self::Delegate => "AUTHORIZATION_TYPE_DELEGATE", Self::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", Self::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", + Self::CancelUnbondingDelegation => "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION", }; serializer.serialize_str(variant) } @@ -24,6 +25,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizationType { "AUTHORIZATION_TYPE_DELEGATE", "AUTHORIZATION_TYPE_UNDELEGATE", "AUTHORIZATION_TYPE_REDELEGATE", + "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION", ]; struct GeneratedVisitor; @@ -68,6 +70,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizationType { "AUTHORIZATION_TYPE_DELEGATE" => Ok(AuthorizationType::Delegate), "AUTHORIZATION_TYPE_UNDELEGATE" => Ok(AuthorizationType::Undelegate), "AUTHORIZATION_TYPE_REDELEGATE" => Ok(AuthorizationType::Redelegate), + "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => Ok(AuthorizationType::CancelUnbondingDelegation), _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), } } @@ -3062,10 +3065,16 @@ impl serde::Serialize for MsgUndelegateResponse { if true { len += 1; } + if true { + len += 1; + } let mut struct_ser = serializer.serialize_struct("cosmos.staking.v1beta1.MsgUndelegateResponse", len)?; if let Some(v) = self.completion_time.as_ref() { struct_ser.serialize_field("completionTime", v)?; } + if let Some(v) = self.amount.as_ref() { + struct_ser.serialize_field("amount", v)?; + } struct_ser.end() } } @@ -3078,11 +3087,13 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { const FIELDS: &[&str] = &[ "completion_time", "completionTime", + "amount", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { CompletionTime, + Amount, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> core::result::Result @@ -3105,6 +3116,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { { match value { "completionTime" | "completion_time" => Ok(GeneratedField::CompletionTime), + "amount" => Ok(GeneratedField::Amount), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3125,6 +3137,7 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { V: serde::de::MapAccess<'de>, { let mut completion_time__ = None; + let mut amount__ = None; while let Some(k) = map_.next_key()? { match k { GeneratedField::CompletionTime => { @@ -3133,10 +3146,17 @@ impl<'de> serde::Deserialize<'de> for MsgUndelegateResponse { } completion_time__ = map_.next_value()?; } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = map_.next_value()?; + } } } Ok(MsgUndelegateResponse { completion_time: completion_time__, + amount: amount__, }) } } diff --git a/src/prost/cosmos.tx.signing.v1beta1.rs b/src/prost/cosmos.tx.signing.v1beta1.rs index 4685364f..48f7ca1a 100644 --- a/src/prost/cosmos.tx.signing.v1beta1.rs +++ b/src/prost/cosmos.tx.signing.v1beta1.rs @@ -135,12 +135,13 @@ pub enum SignMode { Direct = 1, /// SIGN_MODE_TEXTUAL is a future signing mode that will verify some /// human-readable textual representation on top of the binary representation - /// from SIGN_MODE_DIRECT. It is currently not supported. + /// from SIGN_MODE_DIRECT. + /// + /// Since: cosmos-sdk 0.50 Textual = 2, /// SIGN_MODE_DIRECT_AUX specifies a signing mode which uses /// SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - /// require signers signing over other signers' `signer_info`. It also allows - /// for adding Tips in transactions. + /// require signers signing over other signers' `signer_info`. /// /// Since: cosmos-sdk 0.46 DirectAux = 3, diff --git a/src/prost/cosmos.tx.v1beta1.rs b/src/prost/cosmos.tx.v1beta1.rs index 1a4a46e7..87a35d3a 100644 --- a/src/prost/cosmos.tx.v1beta1.rs +++ b/src/prost/cosmos.tx.v1beta1.rs @@ -104,12 +104,8 @@ pub struct SignDocDirectAux { /// sequence is the sequence number of the signing account. #[prost(uint64, tag = "5")] pub sequence: u64, - /// Tip is the optional tip used for transactions fees paid in another denom. - /// It should be left empty if the signer is not the tipper for this - /// transaction. - /// - /// This field is ignored if the chain didn't enable tips, i.e. didn't add the - /// `TipDecorator` in its posthandler. + /// tips have been depreacted and should not be used + #[deprecated] #[prost(message, optional, tag = "6")] pub tip: ::core::option::Option, } @@ -187,6 +183,7 @@ pub struct AuthInfo { /// `TipDecorator` in its posthandler. /// /// Since: cosmos-sdk 0.46 + #[deprecated] #[prost(message, optional, tag = "3")] pub tip: ::core::option::Option, } @@ -383,6 +380,9 @@ impl ::prost::Name for AuxSignerData { #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetTxsEventRequest { /// events is the list of transaction event type. + /// Deprecated post v0.47.x: use query instead, which should contain a valid + /// events query. + #[deprecated] #[prost(string, repeated, tag = "1")] pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// pagination defines a pagination for the request. @@ -394,13 +394,20 @@ pub struct GetTxsEventRequest { >, #[prost(enumeration = "OrderBy", tag = "3")] pub order_by: i32, - /// page is the page number to query, starts at 1. If not provided, will default to first page. + /// page is the page number to query, starts at 1. If not provided, will + /// default to first page. #[prost(uint64, tag = "4")] pub page: u64, /// limit is the total number of results to be returned in the result page. /// If left empty it will default to a value to be set by each app. #[prost(uint64, tag = "5")] pub limit: u64, + /// query defines the transaction event query that is proxied to Tendermint's + /// TxSearch RPC method. The query must be valid. + /// + /// Since cosmos-sdk 0.50 + #[prost(string, tag = "6")] + pub query: ::prost::alloc::string::String, } impl ::prost::Name for GetTxsEventRequest { const NAME: &'static str = "GetTxsEventRequest"; @@ -577,7 +584,8 @@ impl ::prost::Name for GetBlockWithTxsRequest { ::prost::alloc::format!("cosmos.tx.v1beta1.{}", Self::NAME) } } -/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. +/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs +/// method. /// /// Since: cosmos-sdk 0.45.2 #[allow(clippy::derive_partial_eq_without_eq)] @@ -587,9 +595,9 @@ pub struct GetBlockWithTxsResponse { #[prost(message, repeated, tag = "1")] pub txs: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] - pub block_id: ::core::option::Option<::cometbft_proto::types::BlockId>, + pub block_id: ::core::option::Option<::cometbft_proto::types::v1::BlockId>, #[prost(message, optional, tag = "3")] - pub block: ::core::option::Option<::cometbft_proto::types::Block>, + pub block: ::core::option::Option<::cometbft_proto::types::v1::Block>, /// pagination defines a pagination for the response. #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option< @@ -747,7 +755,8 @@ impl ::prost::Name for TxDecodeAminoResponse { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum OrderBy { - /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. + /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults + /// to ASC in this case. Unspecified = 0, /// ORDER_BY_ASC defines ascending order Asc = 1, @@ -776,7 +785,8 @@ impl OrderBy { } } } -/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. +/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC +/// method. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum BroadcastMode { @@ -785,11 +795,11 @@ pub enum BroadcastMode { /// DEPRECATED: use BROADCAST_MODE_SYNC instead, /// BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. Block = 1, - /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - /// a CheckTx execution response only. + /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + /// for a CheckTx execution response only. Sync = 2, - /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - /// immediately. + /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + /// returns immediately. Async = 3, } impl BroadcastMode { diff --git a/src/prost/cosmos.upgrade.v1beta1.rs b/src/prost/cosmos.upgrade.v1beta1.rs index 2bb5cab7..3fe838d6 100644 --- a/src/prost/cosmos.upgrade.v1beta1.rs +++ b/src/prost/cosmos.upgrade.v1beta1.rs @@ -105,64 +105,161 @@ impl ::prost::Name for ModuleVersion { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. +/// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryCurrentPlanRequest {} +impl ::prost::Name for QueryCurrentPlanRequest { + const NAME: &'static str = "QueryCurrentPlanRequest"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryCurrentPlanResponse { + /// plan is the current upgrade plan. + #[prost(message, optional, tag = "1")] + pub plan: ::core::option::Option, +} +impl ::prost::Name for QueryCurrentPlanResponse { + const NAME: &'static str = "QueryCurrentPlanResponse"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAppliedPlanRequest { + /// name is the name of the applied plan to query for. + #[prost(string, tag = "1")] + pub name: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryAppliedPlanRequest { + const NAME: &'static str = "QueryAppliedPlanRequest"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAppliedPlanResponse { + /// height is the block height at which the plan was applied. + #[prost(int64, tag = "1")] + pub height: i64, +} +impl ::prost::Name for QueryAppliedPlanResponse { + const NAME: &'static str = "QueryAppliedPlanResponse"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUpgradedConsensusStateRequest { + /// last height of the current chain must be sent in request + /// as this is the height under which next consensus state is stored + #[prost(int64, tag = "1")] + pub last_height: i64, +} +impl ::prost::Name for QueryUpgradedConsensusStateRequest { + const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState +/// RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUpgradedConsensusStateResponse { + /// Since: cosmos-sdk 0.43 + #[prost(bytes = "vec", tag = "2")] + pub upgraded_consensus_state: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryUpgradedConsensusStateResponse { + const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; + const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + } +} +/// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions +/// RPC method. /// -/// Since: cosmos-sdk 0.46 +/// Since: cosmos-sdk 0.43 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). +pub struct QueryModuleVersionsRequest { + /// module_name is a field to query a specific module + /// consensus version from state. Leaving this empty will + /// fetch the full list of module versions from state #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// plan is the upgrade plan. - #[prost(message, optional, tag = "2")] - pub plan: ::core::option::Option, + pub module_name: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSoftwareUpgrade { - const NAME: &'static str = "MsgSoftwareUpgrade"; +impl ::prost::Name for QueryModuleVersionsRequest { + const NAME: &'static str = "QueryModuleVersionsRequest"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. +/// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions +/// RPC method. /// -/// Since: cosmos-sdk 0.46 +/// Since: cosmos-sdk 0.43 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSoftwareUpgradeResponse {} -impl ::prost::Name for MsgSoftwareUpgradeResponse { - const NAME: &'static str = "MsgSoftwareUpgradeResponse"; +pub struct QueryModuleVersionsResponse { + /// module_versions is a list of module names with their consensus versions. + #[prost(message, repeated, tag = "1")] + pub module_versions: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryModuleVersionsResponse { + const NAME: &'static str = "QueryModuleVersionsResponse"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. +/// QueryAuthorityRequest is the request type for Query/Authority /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgCancelUpgrade { - const NAME: &'static str = "MsgCancelUpgrade"; +pub struct QueryAuthorityRequest {} +impl ::prost::Name for QueryAuthorityRequest { + const NAME: &'static str = "QueryAuthorityRequest"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. +/// QueryAuthorityResponse is the response type for Query/Authority /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCancelUpgradeResponse {} -impl ::prost::Name for MsgCancelUpgradeResponse { - const NAME: &'static str = "MsgCancelUpgradeResponse"; +pub struct QueryAuthorityResponse { + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryAuthorityResponse { + const NAME: &'static str = "QueryAuthorityResponse"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) @@ -170,16 +267,16 @@ impl ::prost::Name for MsgCancelUpgradeResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the upgrade Msg service. + /// Query defines the gRPC upgrade querier service. #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -190,7 +287,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -208,7 +305,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -222,7 +319,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -255,14 +352,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// SoftwareUpgrade is a governance operation for initiating a software upgrade. - /// - /// Since: cosmos-sdk 0.46 - pub async fn software_upgrade( + /// CurrentPlan queries the current upgrade plan. + pub async fn current_plan( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -276,24 +371,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", + "/cosmos.upgrade.v1beta1.Query/CurrentPlan", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("cosmos.upgrade.v1beta1.Msg", "SoftwareUpgrade"), - ); + .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "CurrentPlan")); self.inner.unary(req, path, codec).await } - /// CancelUpgrade is a governance operation for cancelling a previously - /// approved software upgrade. - /// - /// Since: cosmos-sdk 0.46 - pub async fn cancel_upgrade( + /// AppliedPlan queries a previously applied upgrade plan by its name. + pub async fn applied_plan( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -307,48 +397,170 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", + "/cosmos.upgrade.v1beta1.Query/AppliedPlan", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Msg", "CancelUpgrade")); + .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "AppliedPlan")); self.inner.unary(req, path, codec).await } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// SoftwareUpgrade is a governance operation for initiating a software upgrade. - /// - /// Since: cosmos-sdk 0.46 - async fn software_upgrade( - &self, - request: tonic::Request, + /// UpgradedConsensusState queries the consensus state that will serve + /// as a trusted kernel for the next version of this chain. It will only be + /// stored at the last height of this chain. + /// UpgradedConsensusState RPC not supported with legacy querier + /// This rpc is deprecated now that IBC has its own replacement + /// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + pub async fn upgraded_consensus_state( + &mut self, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, - >; - /// CancelUpgrade is a governance operation for cancelling a previously - /// approved software upgrade. + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "cosmos.upgrade.v1beta1.Query", + "UpgradedConsensusState", + ), + ); + self.inner.unary(req, path, codec).await + } + /// ModuleVersions queries the list of module versions from state. /// - /// Since: cosmos-sdk 0.46 - async fn cancel_upgrade( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, + /// Since: cosmos-sdk 0.43 + pub async fn module_versions( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.upgrade.v1beta1.Query/ModuleVersions", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "ModuleVersions"), + ); + self.inner.unary(req, path, codec).await + } + /// Returns the account with authority to conduct upgrades + /// + /// Since: cosmos-sdk 0.46 + pub async fn authority( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/cosmos.upgrade.v1beta1.Query/Authority", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "Authority")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod query_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + #[async_trait] + pub trait Query: Send + Sync + 'static { + /// CurrentPlan queries the current upgrade plan. + async fn current_plan( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// AppliedPlan queries a previously applied upgrade plan by its name. + async fn applied_plan( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UpgradedConsensusState queries the consensus state that will serve + /// as a trusted kernel for the next version of this chain. It will only be + /// stored at the last height of this chain. + /// UpgradedConsensusState RPC not supported with legacy querier + /// This rpc is deprecated now that IBC has its own replacement + /// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + async fn upgraded_consensus_state( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// ModuleVersions queries the list of module versions from state. + /// + /// Since: cosmos-sdk 0.43 + async fn module_versions( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Returns the account with authority to conduct upgrades + /// + /// Since: cosmos-sdk 0.46 + async fn authority( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the upgrade Msg service. + /// Query defines the gRPC upgrade querier service. #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -356,7 +568,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -408,9 +620,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -426,23 +638,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade" => { + "/cosmos.upgrade.v1beta1.Query/CurrentPlan" => { #[allow(non_camel_case_types)] - struct SoftwareUpgradeSvc(pub Arc); - impl tonic::server::UnaryService - for SoftwareUpgradeSvc { - type Response = super::MsgSoftwareUpgradeResponse; + struct CurrentPlanSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for CurrentPlanSvc { + type Response = super::QueryCurrentPlanResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::software_upgrade(&inner, request).await + ::current_plan(&inner, request).await }; Box::pin(fut) } @@ -454,7 +668,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = SoftwareUpgradeSvc(inner); + let method = CurrentPlanSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -470,23 +684,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade" => { + "/cosmos.upgrade.v1beta1.Query/AppliedPlan" => { #[allow(non_camel_case_types)] - struct CancelUpgradeSvc(pub Arc); - impl tonic::server::UnaryService - for CancelUpgradeSvc { - type Response = super::MsgCancelUpgradeResponse; + struct AppliedPlanSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for AppliedPlanSvc { + type Response = super::QueryAppliedPlanResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::cancel_upgrade(&inner, request).await + ::applied_plan(&inner, request).await }; Box::pin(fut) } @@ -498,7 +714,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CancelUpgradeSvc(inner); + let method = AppliedPlanSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -514,202 +730,247 @@ pub mod msg_server { }; Box::pin(fut) } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) + "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState" => { + #[allow(non_camel_case_types)] + struct UpgradedConsensusStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryUpgradedConsensusStateRequest, + > for UpgradedConsensusStateSvc { + type Response = super::QueryUpgradedConsensusStateResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryUpgradedConsensusStateRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::upgraded_consensus_state(&inner, request) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpgradedConsensusStateSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "cosmos.upgrade.v1beta1.Msg"; - } -} -/// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCurrentPlanRequest {} -impl ::prost::Name for QueryCurrentPlanRequest { - const NAME: &'static str = "QueryCurrentPlanRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) - } -} -/// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCurrentPlanResponse { - /// plan is the current upgrade plan. - #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option, -} -impl ::prost::Name for QueryCurrentPlanResponse { - const NAME: &'static str = "QueryCurrentPlanResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + "/cosmos.upgrade.v1beta1.Query/ModuleVersions" => { + #[allow(non_camel_case_types)] + struct ModuleVersionsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ModuleVersionsSvc { + type Response = super::QueryModuleVersionsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::module_versions(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ModuleVersionsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/cosmos.upgrade.v1beta1.Query/Authority" => { + #[allow(non_camel_case_types)] + struct AuthoritySvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for AuthoritySvc { + type Response = super::QueryAuthorityResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::authority(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = AuthoritySvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } } -} -/// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAppliedPlanRequest { - /// name is the name of the applied plan to query for. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAppliedPlanRequest { - const NAME: &'static str = "QueryAppliedPlanRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } } -} -/// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAppliedPlanResponse { - /// height is the block height at which the plan was applied. - #[prost(int64, tag = "1")] - pub height: i64, -} -impl ::prost::Name for QueryAppliedPlanResponse { - const NAME: &'static str = "QueryAppliedPlanResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } } -} -/// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateRequest { - /// last height of the current chain must be sent in request - /// as this is the height under which next consensus state is stored - #[prost(int64, tag = "1")] - pub last_height: i64, -} -impl ::prost::Name for QueryUpgradedConsensusStateRequest { - const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } } -} -/// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateResponse { - /// Since: cosmos-sdk 0.43 - #[prost(bytes = "vec", tag = "2")] - pub upgraded_consensus_state: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryUpgradedConsensusStateResponse { - const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; - const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "cosmos.upgrade.v1beta1.Query"; } } -/// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -/// RPC method. +/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. /// -/// Since: cosmos-sdk 0.43 +/// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleVersionsRequest { - /// module_name is a field to query a specific module - /// consensus version from state. Leaving this empty will - /// fetch the full list of module versions from state +pub struct MsgSoftwareUpgrade { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). #[prost(string, tag = "1")] - pub module_name: ::prost::alloc::string::String, + pub authority: ::prost::alloc::string::String, + /// plan is the upgrade plan. + #[prost(message, optional, tag = "2")] + pub plan: ::core::option::Option, } -impl ::prost::Name for QueryModuleVersionsRequest { - const NAME: &'static str = "QueryModuleVersionsRequest"; +impl ::prost::Name for MsgSoftwareUpgrade { + const NAME: &'static str = "MsgSoftwareUpgrade"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -/// RPC method. +/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. /// -/// Since: cosmos-sdk 0.43 +/// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryModuleVersionsResponse { - /// module_versions is a list of module names with their consensus versions. - #[prost(message, repeated, tag = "1")] - pub module_versions: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryModuleVersionsResponse { - const NAME: &'static str = "QueryModuleVersionsResponse"; +pub struct MsgSoftwareUpgradeResponse {} +impl ::prost::Name for MsgSoftwareUpgradeResponse { + const NAME: &'static str = "MsgSoftwareUpgradeResponse"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// QueryAuthorityRequest is the request type for Query/Authority +/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAuthorityRequest {} -impl ::prost::Name for QueryAuthorityRequest { - const NAME: &'static str = "QueryAuthorityRequest"; +pub struct MsgCancelUpgrade { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgCancelUpgrade { + const NAME: &'static str = "MsgCancelUpgrade"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) } } -/// QueryAuthorityResponse is the response type for Query/Authority +/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. /// /// Since: cosmos-sdk 0.46 #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryAuthorityResponse { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryAuthorityResponse { - const NAME: &'static str = "QueryAuthorityResponse"; +pub struct MsgCancelUpgradeResponse {} +impl ::prost::Name for MsgCancelUpgradeResponse { + const NAME: &'static str = "MsgCancelUpgradeResponse"; const PACKAGE: &'static str = "cosmos.upgrade.v1beta1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("cosmos.upgrade.v1beta1.{}", Self::NAME) @@ -717,16 +978,16 @@ impl ::prost::Name for QueryAuthorityResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query defines the gRPC upgrade querier service. + /// Msg defines the upgrade Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -737,7 +998,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -755,7 +1016,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -769,7 +1030,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -802,102 +1063,14 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// CurrentPlan queries the current upgrade plan. - pub async fn current_plan( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/CurrentPlan", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "CurrentPlan")); - self.inner.unary(req, path, codec).await - } - /// AppliedPlan queries a previously applied upgrade plan by its name. - pub async fn applied_plan( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/AppliedPlan", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "AppliedPlan")); - self.inner.unary(req, path, codec).await - } - /// UpgradedConsensusState queries the consensus state that will serve - /// as a trusted kernel for the next version of this chain. It will only be - /// stored at the last height of this chain. - /// UpgradedConsensusState RPC not supported with legacy querier - /// This rpc is deprecated now that IBC has its own replacement - /// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - pub async fn upgraded_consensus_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "cosmos.upgrade.v1beta1.Query", - "UpgradedConsensusState", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ModuleVersions queries the list of module versions from state. + /// SoftwareUpgrade is a governance operation for initiating a software upgrade. /// - /// Since: cosmos-sdk 0.43 - pub async fn module_versions( + /// Since: cosmos-sdk 0.46 + pub async fn software_upgrade( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -911,23 +1084,24 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/ModuleVersions", + "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "ModuleVersions"), + GrpcMethod::new("cosmos.upgrade.v1beta1.Msg", "SoftwareUpgrade"), ); self.inner.unary(req, path, codec).await } - /// Returns the account with authority to conduct upgrades + /// CancelUpgrade is a governance operation for cancelling a previously + /// approved software upgrade. /// /// Since: cosmos-sdk 0.46 - pub async fn authority( + pub async fn cancel_upgrade( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -941,76 +1115,48 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/cosmos.upgrade.v1beta1.Query/Authority", + "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Query", "Authority")); + .insert(GrpcMethod::new("cosmos.upgrade.v1beta1.Msg", "CancelUpgrade")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// CurrentPlan queries the current upgrade plan. - async fn current_plan( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// AppliedPlan queries a previously applied upgrade plan by its name. - async fn applied_plan( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// UpgradedConsensusState queries the consensus state that will serve - /// as a trusted kernel for the next version of this chain. It will only be - /// stored at the last height of this chain. - /// UpgradedConsensusState RPC not supported with legacy querier - /// This rpc is deprecated now that IBC has its own replacement - /// (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - async fn upgraded_consensus_state( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ModuleVersions queries the list of module versions from state. + pub trait Msg: Send + Sync + 'static { + /// SoftwareUpgrade is a governance operation for initiating a software upgrade. /// - /// Since: cosmos-sdk 0.43 - async fn module_versions( + /// Since: cosmos-sdk 0.46 + async fn software_upgrade( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Returns the account with authority to conduct upgrades + /// CancelUpgrade is a governance operation for cancelling a previously + /// approved software upgrade. /// /// Since: cosmos-sdk 0.46 - async fn authority( + async fn cancel_upgrade( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query defines the gRPC upgrade querier service. + /// Msg defines the upgrade Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -1018,7 +1164,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1070,9 +1216,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -1088,167 +1234,23 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/cosmos.upgrade.v1beta1.Query/CurrentPlan" => { - #[allow(non_camel_case_types)] - struct CurrentPlanSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for CurrentPlanSvc { - type Response = super::QueryCurrentPlanResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::current_plan(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CurrentPlanSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.upgrade.v1beta1.Query/AppliedPlan" => { - #[allow(non_camel_case_types)] - struct AppliedPlanSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AppliedPlanSvc { - type Response = super::QueryAppliedPlanResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::applied_plan(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AppliedPlanSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState" => { - #[allow(non_camel_case_types)] - struct UpgradedConsensusStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryUpgradedConsensusStateRequest, - > for UpgradedConsensusStateSvc { - type Response = super::QueryUpgradedConsensusStateResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryUpgradedConsensusStateRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::upgraded_consensus_state(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UpgradedConsensusStateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/cosmos.upgrade.v1beta1.Query/ModuleVersions" => { + "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade" => { #[allow(non_camel_case_types)] - struct ModuleVersionsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ModuleVersionsSvc { - type Response = super::QueryModuleVersionsResponse; + struct SoftwareUpgradeSvc(pub Arc); + impl tonic::server::UnaryService + for SoftwareUpgradeSvc { + type Response = super::MsgSoftwareUpgradeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::module_versions(&inner, request).await + ::software_upgrade(&inner, request).await }; Box::pin(fut) } @@ -1260,7 +1262,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ModuleVersionsSvc(inner); + let method = SoftwareUpgradeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1276,25 +1278,23 @@ pub mod query_server { }; Box::pin(fut) } - "/cosmos.upgrade.v1beta1.Query/Authority" => { + "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade" => { #[allow(non_camel_case_types)] - struct AuthoritySvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for AuthoritySvc { - type Response = super::QueryAuthorityResponse; + struct CancelUpgradeSvc(pub Arc); + impl tonic::server::UnaryService + for CancelUpgradeSvc { + type Response = super::MsgCancelUpgradeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::authority(&inner, request).await + ::cancel_upgrade(&inner, request).await }; Box::pin(fut) } @@ -1306,7 +1306,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = AuthoritySvc(inner); + let method = CancelUpgradeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1337,7 +1337,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1349,7 +1349,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1359,7 +1359,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "cosmos.upgrade.v1beta1.Query"; + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "cosmos.upgrade.v1beta1.Msg"; } } diff --git a/src/prost/ibc.applications.fee.v1.rs b/src/prost/ibc.applications.fee.v1.rs index 9d798dce..d4e4bee8 100644 --- a/src/prost/ibc.applications.fee.v1.rs +++ b/src/prost/ibc.applications.fee.v1.rs @@ -1,3 +1,24 @@ +/// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct IncentivizedAcknowledgement { + /// the underlying app acknowledgement bytes + #[prost(bytes = "vec", tag = "1")] + pub app_acknowledgement: ::prost::alloc::vec::Vec, + /// the relayer address which submits the recv packet message + #[prost(string, tag = "2")] + pub forward_relayer_address: ::prost::alloc::string::String, + /// success flag of the base application callback + #[prost(bool, tag = "3")] + pub underlying_app_success: bool, +} +impl ::prost::Name for IncentivizedAcknowledgement { + const NAME: &'static str = "IncentivizedAcknowledgement"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} /// Fee defines the ICS29 receive, acknowledgement and timeout fees #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -81,852 +102,427 @@ impl ::prost::Name for IdentifiedPacketFees { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgRegisterPayee defines the request type for the RegisterPayee rpc +/// GenesisState defines the ICS29 fee middleware genesis state #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterPayee { +pub struct GenesisState { + /// list of identified packet fees + #[prost(message, repeated, tag = "1")] + pub identified_fees: ::prost::alloc::vec::Vec, + /// list of fee enabled channels + #[prost(message, repeated, tag = "2")] + pub fee_enabled_channels: ::prost::alloc::vec::Vec, + /// list of registered payees + #[prost(message, repeated, tag = "3")] + pub registered_payees: ::prost::alloc::vec::Vec, + /// list of registered counterparty payees + #[prost(message, repeated, tag = "4")] + pub registered_counterparty_payees: ::prost::alloc::vec::Vec< + RegisteredCounterpartyPayee, + >, + /// list of forward relayer addresses + #[prost(message, repeated, tag = "5")] + pub forward_relayers: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FeeEnabledChannel { /// unique port identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, /// unique channel identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "3")] - pub relayer: ::prost::alloc::string::String, - /// the payee address - #[prost(string, tag = "4")] - pub payee: ::prost::alloc::string::String, } -impl ::prost::Name for MsgRegisterPayee { - const NAME: &'static str = "MsgRegisterPayee"; +impl ::prost::Name for FeeEnabledChannel { + const NAME: &'static str = "FeeEnabledChannel"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +/// RegisteredPayee contains the relayer address and payee address for a specific channel #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterPayeeResponse {} -impl ::prost::Name for MsgRegisterPayeeResponse { - const NAME: &'static str = "MsgRegisterPayeeResponse"; +pub struct RegisteredPayee { + /// unique channel identifier + #[prost(string, tag = "1")] + pub channel_id: ::prost::alloc::string::String, + /// the relayer address + #[prost(string, tag = "2")] + pub relayer: ::prost::alloc::string::String, + /// the payee address + #[prost(string, tag = "3")] + pub payee: ::prost::alloc::string::String, +} +impl ::prost::Name for RegisteredPayee { + const NAME: &'static str = "RegisteredPayee"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +/// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used +/// for recv fee distribution) #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterCounterpartyPayee { - /// unique port identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, +pub struct RegisteredCounterpartyPayee { /// unique channel identifier - #[prost(string, tag = "2")] + #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, /// the relayer address - #[prost(string, tag = "3")] + #[prost(string, tag = "2")] pub relayer: ::prost::alloc::string::String, /// the counterparty payee address - #[prost(string, tag = "4")] + #[prost(string, tag = "3")] pub counterparty_payee: ::prost::alloc::string::String, } -impl ::prost::Name for MsgRegisterCounterpartyPayee { - const NAME: &'static str = "MsgRegisterCounterpartyPayee"; +impl ::prost::Name for RegisteredCounterpartyPayee { + const NAME: &'static str = "RegisteredCounterpartyPayee"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +/// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterCounterpartyPayeeResponse {} -impl ::prost::Name for MsgRegisterCounterpartyPayeeResponse { - const NAME: &'static str = "MsgRegisterCounterpartyPayeeResponse"; +pub struct ForwardRelayerAddress { + /// the forward relayer address + #[prost(string, tag = "1")] + pub address: ::prost::alloc::string::String, + /// unique packet identifer comprised of the channel ID, port ID and sequence + #[prost(message, optional, tag = "2")] + pub packet_id: ::core::option::Option< + super::super::super::core::channel::v1::PacketId, + >, +} +impl ::prost::Name for ForwardRelayerAddress { + const NAME: &'static str = "ForwardRelayerAddress"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgPayPacketFee defines the request type for the PayPacketFee rpc -/// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be -/// paid for +/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring +/// See ICS004: #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFee { - /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet - #[prost(message, optional, tag = "1")] - pub fee: ::core::option::Option, - /// the source port unique identifier +pub struct Metadata { + /// fee_version defines the ICS29 fee version + #[prost(string, tag = "1")] + pub fee_version: ::prost::alloc::string::String, + /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring #[prost(string, tag = "2")] - pub source_port_id: ::prost::alloc::string::String, - /// the source channel unique identifer - #[prost(string, tag = "3")] - pub source_channel_id: ::prost::alloc::string::String, - /// account address to refund fee if necessary - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, - /// optional list of relayers permitted to the receive packet fees - #[prost(string, repeated, tag = "5")] - pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + pub app_version: ::prost::alloc::string::String, } -impl ::prost::Name for MsgPayPacketFee { - const NAME: &'static str = "MsgPayPacketFee"; +impl ::prost::Name for Metadata { + const NAME: &'static str = "Metadata"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc +/// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFeeResponse {} -impl ::prost::Name for MsgPayPacketFeeResponse { - const NAME: &'static str = "MsgPayPacketFeeResponse"; +pub struct QueryIncentivizedPacketsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, + /// block height at which to query + #[prost(uint64, tag = "2")] + pub query_height: u64, +} +impl ::prost::Name for QueryIncentivizedPacketsRequest { + const NAME: &'static str = "QueryIncentivizedPacketsRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc -/// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) +/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFeeAsync { - /// unique packet identifier comprised of the channel ID, port ID and sequence +pub struct QueryIncentivizedPacketsResponse { + /// list of identified fees for incentivized packets + #[prost(message, repeated, tag = "1")] + pub incentivized_packets: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryIncentivizedPacketsResponse { + const NAME: &'static str = "QueryIncentivizedPacketsResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryIncentivizedPacketRequest { + /// unique packet identifier comprised of channel ID, port ID and sequence #[prost(message, optional, tag = "1")] pub packet_id: ::core::option::Option< super::super::super::core::channel::v1::PacketId, >, - /// the packet fee associated with a particular IBC packet - #[prost(message, optional, tag = "2")] - pub packet_fee: ::core::option::Option, + /// block height at which to query + #[prost(uint64, tag = "2")] + pub query_height: u64, } -impl ::prost::Name for MsgPayPacketFeeAsync { - const NAME: &'static str = "MsgPayPacketFeeAsync"; +impl ::prost::Name for QueryIncentivizedPacketRequest { + const NAME: &'static str = "QueryIncentivizedPacketRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc +/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgPayPacketFeeAsyncResponse {} -impl ::prost::Name for MsgPayPacketFeeAsyncResponse { - const NAME: &'static str = "MsgPayPacketFeeAsyncResponse"; +pub struct QueryIncentivizedPacketResponse { + /// the identified fees for the incentivized packet + #[prost(message, optional, tag = "1")] + pub incentivized_packet: ::core::option::Option, +} +impl ::prost::Name for QueryIncentivizedPacketResponse { + const NAME: &'static str = "QueryIncentivizedPacketResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the ICS29 Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, +/// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets +/// for a specific channel +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryIncentivizedPacketsForChannelRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, + #[prost(string, tag = "2")] + pub port_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub channel_id: ::prost::alloc::string::String, + /// Height to query at + #[prost(uint64, tag = "4")] + pub query_height: u64, +} +impl ::prost::Name for QueryIncentivizedPacketsForChannelRequest { + const NAME: &'static str = "QueryIncentivizedPacketsForChannelRequest"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } +} +/// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryIncentivizedPacketsForChannelResponse { + /// Map of all incentivized_packets + #[prost(message, repeated, tag = "1")] + pub incentivized_packets: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryIncentivizedPacketsForChannelResponse { + const NAME: &'static str = "QueryIncentivizedPacketsForChannelResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// RegisterPayee defines a rpc handler method for MsgRegisterPayee - /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional - /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on - /// the source chain from which packets originate as this is where fee distribution takes place. This function may be - /// called more than once by a relayer, in which case, the latest payee is always used. - pub async fn register_payee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.fee.v1.Msg/RegisterPayee", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "RegisterPayee")); - self.inner.unary(req, path, codec).await - } - /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee - /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty - /// payee address before relaying. This ensures they will be properly compensated for forward relaying since - /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function - /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. - pub async fn register_counterparty_payee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.fee.v1.Msg", - "RegisterCounterpartyPayee", - ), - ); - self.inner.unary(req, path, codec).await - } - /// PayPacketFee defines a rpc handler method for MsgPayPacketFee - /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - /// incentivize the relaying of the packet at the next sequence - /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows - /// initiates the lifecycle of the incentivized packet - pub async fn pay_packet_fee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.fee.v1.Msg/PayPacketFee", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFee")); - self.inner.unary(req, path, codec).await - } - /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync - /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to - /// incentivize the relaying of a known packet (i.e. at a particular sequence) - pub async fn pay_packet_fee_async( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFeeAsync"), - ); - self.inner.unary(req, path, codec).await - } +} +/// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalRecvFeesRequest { + /// the packet identifier for the associated fees + #[prost(message, optional, tag = "1")] + pub packet_id: ::core::option::Option< + super::super::super::core::channel::v1::PacketId, + >, +} +impl ::prost::Name for QueryTotalRecvFeesRequest { + const NAME: &'static str = "QueryTotalRecvFeesRequest"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// RegisterPayee defines a rpc handler method for MsgRegisterPayee - /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional - /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on - /// the source chain from which packets originate as this is where fee distribution takes place. This function may be - /// called more than once by a relayer, in which case, the latest payee is always used. - async fn register_payee( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee - /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty - /// payee address before relaying. This ensures they will be properly compensated for forward relaying since - /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function - /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. - async fn register_counterparty_payee( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// PayPacketFee defines a rpc handler method for MsgPayPacketFee - /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - /// incentivize the relaying of the packet at the next sequence - /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows - /// initiates the lifecycle of the incentivized packet - async fn pay_packet_fee( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync - /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to - /// incentivize the relaying of a known packet (i.e. at a particular sequence) - async fn pay_packet_fee_async( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; +/// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalRecvFeesResponse { + /// the total packet receive fees + #[prost(message, repeated, tag = "1")] + pub recv_fees: ::prost::alloc::vec::Vec< + super::super::super::super::cosmos::base::v1beta1::Coin, + >, +} +impl ::prost::Name for QueryTotalRecvFeesResponse { + const NAME: &'static str = "QueryTotalRecvFeesResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } - /// Msg defines the ICS29 Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, +} +/// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalAckFeesRequest { + /// the packet identifier for the associated fees + #[prost(message, optional, tag = "1")] + pub packet_id: ::core::option::Option< + super::super::super::core::channel::v1::PacketId, + >, +} +impl ::prost::Name for QueryTotalAckFeesRequest { + const NAME: &'static str = "QueryTotalAckFeesRequest"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } - struct _Inner(Arc); - impl MsgServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for MsgServer - where - T: Msg, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/ibc.applications.fee.v1.Msg/RegisterPayee" => { - #[allow(non_camel_case_types)] - struct RegisterPayeeSvc(pub Arc); - impl tonic::server::UnaryService - for RegisterPayeeSvc { - type Response = super::MsgRegisterPayeeResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::register_payee(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RegisterPayeeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee" => { - #[allow(non_camel_case_types)] - struct RegisterCounterpartyPayeeSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for RegisterCounterpartyPayeeSvc { - type Response = super::MsgRegisterCounterpartyPayeeResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::register_counterparty_payee(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RegisterCounterpartyPayeeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.fee.v1.Msg/PayPacketFee" => { - #[allow(non_camel_case_types)] - struct PayPacketFeeSvc(pub Arc); - impl tonic::server::UnaryService - for PayPacketFeeSvc { - type Response = super::MsgPayPacketFeeResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::pay_packet_fee(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = PayPacketFeeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync" => { - #[allow(non_camel_case_types)] - struct PayPacketFeeAsyncSvc(pub Arc); - impl tonic::server::UnaryService - for PayPacketFeeAsyncSvc { - type Response = super::MsgPayPacketFeeAsyncResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::pay_packet_fee_async(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = PayPacketFeeAsyncSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.applications.fee.v1.Msg"; +} +/// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalAckFeesResponse { + /// the total packet acknowledgement fees + #[prost(message, repeated, tag = "1")] + pub ack_fees: ::prost::alloc::vec::Vec< + super::super::super::super::cosmos::base::v1beta1::Coin, + >, +} +impl ::prost::Name for QueryTotalAckFeesResponse { + const NAME: &'static str = "QueryTotalAckFeesResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware +/// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct IncentivizedAcknowledgement { - /// the underlying app acknowledgement bytes - #[prost(bytes = "vec", tag = "1")] - pub app_acknowledgement: ::prost::alloc::vec::Vec, - /// the relayer address which submits the recv packet message - #[prost(string, tag = "2")] - pub forward_relayer_address: ::prost::alloc::string::String, - /// success flag of the base application callback - #[prost(bool, tag = "3")] - pub underlying_app_success: bool, +pub struct QueryTotalTimeoutFeesRequest { + /// the packet identifier for the associated fees + #[prost(message, optional, tag = "1")] + pub packet_id: ::core::option::Option< + super::super::super::core::channel::v1::PacketId, + >, } -impl ::prost::Name for IncentivizedAcknowledgement { - const NAME: &'static str = "IncentivizedAcknowledgement"; +impl ::prost::Name for QueryTotalTimeoutFeesRequest { + const NAME: &'static str = "QueryTotalTimeoutFeesRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// GenesisState defines the ICS29 fee middleware genesis state +/// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// list of identified packet fees +pub struct QueryTotalTimeoutFeesResponse { + /// the total packet timeout fees #[prost(message, repeated, tag = "1")] - pub identified_fees: ::prost::alloc::vec::Vec, - /// list of fee enabled channels - #[prost(message, repeated, tag = "2")] - pub fee_enabled_channels: ::prost::alloc::vec::Vec, - /// list of registered payees - #[prost(message, repeated, tag = "3")] - pub registered_payees: ::prost::alloc::vec::Vec, - /// list of registered counterparty payees - #[prost(message, repeated, tag = "4")] - pub registered_counterparty_payees: ::prost::alloc::vec::Vec< - RegisteredCounterpartyPayee, + pub timeout_fees: ::prost::alloc::vec::Vec< + super::super::super::super::cosmos::base::v1beta1::Coin, >, - /// list of forward relayer addresses - #[prost(message, repeated, tag = "5")] - pub forward_relayers: ::prost::alloc::vec::Vec, } -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; +impl ::prost::Name for QueryTotalTimeoutFeesResponse { + const NAME: &'static str = "QueryTotalTimeoutFeesResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel +/// QueryPayeeRequest defines the request type for the Payee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct FeeEnabledChannel { - /// unique port identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, +pub struct QueryPayeeRequest { /// unique channel identifier - #[prost(string, tag = "2")] + #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, + /// the relayer address to which the distribution address is registered + #[prost(string, tag = "2")] + pub relayer: ::prost::alloc::string::String, } -impl ::prost::Name for FeeEnabledChannel { - const NAME: &'static str = "FeeEnabledChannel"; +impl ::prost::Name for QueryPayeeRequest { + const NAME: &'static str = "QueryPayeeRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// RegisteredPayee contains the relayer address and payee address for a specific channel +/// QueryPayeeResponse defines the response type for the Payee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RegisteredPayee { - /// unique channel identifier +pub struct QueryPayeeResponse { + /// the payee address to which packet fees are paid out #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, - /// the payee address - #[prost(string, tag = "3")] - pub payee: ::prost::alloc::string::String, + pub payee_address: ::prost::alloc::string::String, } -impl ::prost::Name for RegisteredPayee { - const NAME: &'static str = "RegisteredPayee"; +impl ::prost::Name for QueryPayeeResponse { + const NAME: &'static str = "QueryPayeeResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used -/// for recv fee distribution) +/// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RegisteredCounterpartyPayee { +pub struct QueryCounterpartyPayeeRequest { /// unique channel identifier #[prost(string, tag = "1")] pub channel_id: ::prost::alloc::string::String, - /// the relayer address + /// the relayer address to which the counterparty is registered #[prost(string, tag = "2")] pub relayer: ::prost::alloc::string::String, - /// the counterparty payee address - #[prost(string, tag = "3")] - pub counterparty_payee: ::prost::alloc::string::String, } -impl ::prost::Name for RegisteredCounterpartyPayee { - const NAME: &'static str = "RegisteredCounterpartyPayee"; +impl ::prost::Name for QueryCounterpartyPayeeRequest { + const NAME: &'static str = "QueryCounterpartyPayeeRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements +/// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ForwardRelayerAddress { - /// the forward relayer address +pub struct QueryCounterpartyPayeeResponse { + /// the counterparty payee address used to compensate forward relaying #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// unique packet identifer comprised of the channel ID, port ID and sequence - #[prost(message, optional, tag = "2")] - pub packet_id: ::core::option::Option< - super::super::super::core::channel::v1::PacketId, - >, + pub counterparty_payee: ::prost::alloc::string::String, } -impl ::prost::Name for ForwardRelayerAddress { - const NAME: &'static str = "ForwardRelayerAddress"; +impl ::prost::Name for QueryCounterpartyPayeeResponse { + const NAME: &'static str = "QueryCounterpartyPayeeResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc +/// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryIncentivizedPacketsRequest { +pub struct QueryFeeEnabledChannelsRequest { /// pagination defines an optional pagination for the request. #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option< @@ -936,375 +532,87 @@ pub struct QueryIncentivizedPacketsRequest { #[prost(uint64, tag = "2")] pub query_height: u64, } -impl ::prost::Name for QueryIncentivizedPacketsRequest { - const NAME: &'static str = "QueryIncentivizedPacketsRequest"; +impl ::prost::Name for QueryFeeEnabledChannelsRequest { + const NAME: &'static str = "QueryFeeEnabledChannelsRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc +/// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryIncentivizedPacketsResponse { - /// list of identified fees for incentivized packets +pub struct QueryFeeEnabledChannelsResponse { + /// list of fee enabled channels #[prost(message, repeated, tag = "1")] - pub incentivized_packets: ::prost::alloc::vec::Vec, + pub fee_enabled_channels: ::prost::alloc::vec::Vec, /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option< super::super::super::super::cosmos::base::query::v1beta1::PageResponse, >, } -impl ::prost::Name for QueryIncentivizedPacketsResponse { - const NAME: &'static str = "QueryIncentivizedPacketsResponse"; +impl ::prost::Name for QueryFeeEnabledChannelsResponse { + const NAME: &'static str = "QueryFeeEnabledChannelsResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc +/// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryIncentivizedPacketRequest { - /// unique packet identifier comprised of channel ID, port ID and sequence - #[prost(message, optional, tag = "1")] - pub packet_id: ::core::option::Option< - super::super::super::core::channel::v1::PacketId, - >, - /// block height at which to query - #[prost(uint64, tag = "2")] - pub query_height: u64, -} -impl ::prost::Name for QueryIncentivizedPacketRequest { - const NAME: &'static str = "QueryIncentivizedPacketRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryIncentivizedPacketResponse { - /// the identified fees for the incentivized packet - #[prost(message, optional, tag = "1")] - pub incentivized_packet: ::core::option::Option, -} -impl ::prost::Name for QueryIncentivizedPacketResponse { - const NAME: &'static str = "QueryIncentivizedPacketResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets -/// for a specific channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryIncentivizedPacketsForChannelRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - #[prost(string, tag = "2")] +pub struct QueryFeeEnabledChannelRequest { + /// unique port identifier + #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub channel_id: ::prost::alloc::string::String, - /// Height to query at - #[prost(uint64, tag = "4")] - pub query_height: u64, -} -impl ::prost::Name for QueryIncentivizedPacketsForChannelRequest { - const NAME: &'static str = "QueryIncentivizedPacketsForChannelRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryIncentivizedPacketsForChannelResponse { - /// Map of all incentivized_packets - #[prost(message, repeated, tag = "1")] - pub incentivized_packets: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryIncentivizedPacketsForChannelResponse { - const NAME: &'static str = "QueryIncentivizedPacketsForChannelResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalRecvFeesRequest { - /// the packet identifier for the associated fees - #[prost(message, optional, tag = "1")] - pub packet_id: ::core::option::Option< - super::super::super::core::channel::v1::PacketId, - >, -} -impl ::prost::Name for QueryTotalRecvFeesRequest { - const NAME: &'static str = "QueryTotalRecvFeesRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalRecvFeesResponse { - /// the total packet receive fees - #[prost(message, repeated, tag = "1")] - pub recv_fees: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, -} -impl ::prost::Name for QueryTotalRecvFeesResponse { - const NAME: &'static str = "QueryTotalRecvFeesResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalAckFeesRequest { - /// the packet identifier for the associated fees - #[prost(message, optional, tag = "1")] - pub packet_id: ::core::option::Option< - super::super::super::core::channel::v1::PacketId, - >, -} -impl ::prost::Name for QueryTotalAckFeesRequest { - const NAME: &'static str = "QueryTotalAckFeesRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalAckFeesResponse { - /// the total packet acknowledgement fees - #[prost(message, repeated, tag = "1")] - pub ack_fees: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, -} -impl ::prost::Name for QueryTotalAckFeesResponse { - const NAME: &'static str = "QueryTotalAckFeesResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalTimeoutFeesRequest { - /// the packet identifier for the associated fees - #[prost(message, optional, tag = "1")] - pub packet_id: ::core::option::Option< - super::super::super::core::channel::v1::PacketId, - >, -} -impl ::prost::Name for QueryTotalTimeoutFeesRequest { - const NAME: &'static str = "QueryTotalTimeoutFeesRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalTimeoutFeesResponse { - /// the total packet timeout fees - #[prost(message, repeated, tag = "1")] - pub timeout_fees: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, -} -impl ::prost::Name for QueryTotalTimeoutFeesResponse { - const NAME: &'static str = "QueryTotalTimeoutFeesResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryPayeeRequest defines the request type for the Payee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPayeeRequest { /// unique channel identifier - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address to which the distribution address is registered #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, + pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPayeeRequest { - const NAME: &'static str = "QueryPayeeRequest"; +impl ::prost::Name for QueryFeeEnabledChannelRequest { + const NAME: &'static str = "QueryFeeEnabledChannelRequest"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// QueryPayeeResponse defines the response type for the Payee rpc +/// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPayeeResponse { - /// the payee address to which packet fees are paid out - #[prost(string, tag = "1")] - pub payee_address: ::prost::alloc::string::String, +pub struct QueryFeeEnabledChannelResponse { + /// boolean flag representing the fee enabled channel status + #[prost(bool, tag = "1")] + pub fee_enabled: bool, } -impl ::prost::Name for QueryPayeeResponse { - const NAME: &'static str = "QueryPayeeResponse"; +impl ::prost::Name for QueryFeeEnabledChannelResponse { + const NAME: &'static str = "QueryFeeEnabledChannelResponse"; const PACKAGE: &'static str = "ibc.applications.fee.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) } } -/// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCounterpartyPayeeRequest { - /// unique channel identifier - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address to which the counterparty is registered - #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryCounterpartyPayeeRequest { - const NAME: &'static str = "QueryCounterpartyPayeeRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query defines the ICS29 gRPC querier service. + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, } -} -/// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCounterpartyPayeeResponse { - /// the counterparty payee address used to compensate forward relaying - #[prost(string, tag = "1")] - pub counterparty_payee: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryCounterpartyPayeeResponse { - const NAME: &'static str = "QueryCounterpartyPayeeResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryFeeEnabledChannelsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// block height at which to query - #[prost(uint64, tag = "2")] - pub query_height: u64, -} -impl ::prost::Name for QueryFeeEnabledChannelsRequest { - const NAME: &'static str = "QueryFeeEnabledChannelsRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryFeeEnabledChannelsResponse { - /// list of fee enabled channels - #[prost(message, repeated, tag = "1")] - pub fee_enabled_channels: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryFeeEnabledChannelsResponse { - const NAME: &'static str = "QueryFeeEnabledChannelsResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryFeeEnabledChannelRequest { - /// unique port identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryFeeEnabledChannelRequest { - const NAME: &'static str = "QueryFeeEnabledChannelRequest"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryFeeEnabledChannelResponse { - /// boolean flag representing the fee enabled channel status - #[prost(bool, tag = "1")] - pub fee_enabled: bool, -} -impl ::prost::Name for QueryFeeEnabledChannelResponse { - const NAME: &'static str = "QueryFeeEnabledChannelResponse"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query defines the ICS29 gRPC querier service. - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } } impl QueryClient where @@ -2123,21 +1431,737 @@ pub mod query_server { } "/ibc.applications.fee.v1.Query/Payee" => { #[allow(non_camel_case_types)] - struct PayeeSvc(pub Arc); - impl tonic::server::UnaryService - for PayeeSvc { - type Response = super::QueryPayeeResponse; + struct PayeeSvc(pub Arc); + impl tonic::server::UnaryService + for PayeeSvc { + type Response = super::QueryPayeeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::payee(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = PayeeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.fee.v1.Query/CounterpartyPayee" => { + #[allow(non_camel_case_types)] + struct CounterpartyPayeeSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for CounterpartyPayeeSvc { + type Response = super::QueryCounterpartyPayeeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::counterparty_payee(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = CounterpartyPayeeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.fee.v1.Query/FeeEnabledChannels" => { + #[allow(non_camel_case_types)] + struct FeeEnabledChannelsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for FeeEnabledChannelsSvc { + type Response = super::QueryFeeEnabledChannelsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryFeeEnabledChannelsRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::fee_enabled_channels(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = FeeEnabledChannelsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.fee.v1.Query/FeeEnabledChannel" => { + #[allow(non_camel_case_types)] + struct FeeEnabledChannelSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for FeeEnabledChannelSvc { + type Response = super::QueryFeeEnabledChannelResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::fee_enabled_channel(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = FeeEnabledChannelSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.applications.fee.v1.Query"; + } +} +/// MsgRegisterPayee defines the request type for the RegisterPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterPayee { + /// unique port identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// unique channel identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// the relayer address + #[prost(string, tag = "3")] + pub relayer: ::prost::alloc::string::String, + /// the payee address + #[prost(string, tag = "4")] + pub payee: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterPayee { + const NAME: &'static str = "MsgRegisterPayee"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterPayeeResponse {} +impl ::prost::Name for MsgRegisterPayeeResponse { + const NAME: &'static str = "MsgRegisterPayeeResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterCounterpartyPayee { + /// unique port identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// unique channel identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// the relayer address + #[prost(string, tag = "3")] + pub relayer: ::prost::alloc::string::String, + /// the counterparty payee address + #[prost(string, tag = "4")] + pub counterparty_payee: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterCounterpartyPayee { + const NAME: &'static str = "MsgRegisterCounterpartyPayee"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterCounterpartyPayeeResponse {} +impl ::prost::Name for MsgRegisterCounterpartyPayeeResponse { + const NAME: &'static str = "MsgRegisterCounterpartyPayeeResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFee defines the request type for the PayPacketFee rpc +/// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be +/// paid for +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFee { + /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet + #[prost(message, optional, tag = "1")] + pub fee: ::core::option::Option, + /// the source port unique identifier + #[prost(string, tag = "2")] + pub source_port_id: ::prost::alloc::string::String, + /// the source channel unique identifer + #[prost(string, tag = "3")] + pub source_channel_id: ::prost::alloc::string::String, + /// account address to refund fee if necessary + #[prost(string, tag = "4")] + pub signer: ::prost::alloc::string::String, + /// optional list of relayers permitted to the receive packet fees + #[prost(string, repeated, tag = "5")] + pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for MsgPayPacketFee { + const NAME: &'static str = "MsgPayPacketFee"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFeeResponse {} +impl ::prost::Name for MsgPayPacketFeeResponse { + const NAME: &'static str = "MsgPayPacketFeeResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc +/// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFeeAsync { + /// unique packet identifier comprised of the channel ID, port ID and sequence + #[prost(message, optional, tag = "1")] + pub packet_id: ::core::option::Option< + super::super::super::core::channel::v1::PacketId, + >, + /// the packet fee associated with a particular IBC packet + #[prost(message, optional, tag = "2")] + pub packet_fee: ::core::option::Option, +} +impl ::prost::Name for MsgPayPacketFeeAsync { + const NAME: &'static str = "MsgPayPacketFeeAsync"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgPayPacketFeeAsyncResponse {} +impl ::prost::Name for MsgPayPacketFeeAsyncResponse { + const NAME: &'static str = "MsgPayPacketFeeAsyncResponse"; + const PACKAGE: &'static str = "ibc.applications.fee.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the ICS29 Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// RegisterPayee defines a rpc handler method for MsgRegisterPayee + /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + /// the source chain from which packets originate as this is where fee distribution takes place. This function may be + /// called more than once by a relayer, in which case, the latest payee is always used. + pub async fn register_payee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.fee.v1.Msg/RegisterPayee", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "RegisterPayee")); + self.inner.unary(req, path, codec).await + } + /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + /// payee address before relaying. This ensures they will be properly compensated for forward relaying since + /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function + /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + pub async fn register_counterparty_payee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.fee.v1.Msg", + "RegisterCounterpartyPayee", + ), + ); + self.inner.unary(req, path, codec).await + } + /// PayPacketFee defines a rpc handler method for MsgPayPacketFee + /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + /// incentivize the relaying of the packet at the next sequence + /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows + /// initiates the lifecycle of the incentivized packet + pub async fn pay_packet_fee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.fee.v1.Msg/PayPacketFee", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFee")); + self.inner.unary(req, path, codec).await + } + /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync + /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to + /// incentivize the relaying of a known packet (i.e. at a particular sequence) + pub async fn pay_packet_fee_async( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.applications.fee.v1.Msg", "PayPacketFeeAsync"), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// RegisterPayee defines a rpc handler method for MsgRegisterPayee + /// RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional + /// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on + /// the source chain from which packets originate as this is where fee distribution takes place. This function may be + /// called more than once by a relayer, in which case, the latest payee is always used. + async fn register_payee( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee + /// RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty + /// payee address before relaying. This ensures they will be properly compensated for forward relaying since + /// the destination chain must include the registered counterparty payee address in the acknowledgement. This function + /// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. + async fn register_counterparty_payee( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// PayPacketFee defines a rpc handler method for MsgPayPacketFee + /// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to + /// incentivize the relaying of the packet at the next sequence + /// NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows + /// initiates the lifecycle of the incentivized packet + async fn pay_packet_fee( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync + /// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to + /// incentivize the relaying of a known packet (i.e. at a particular sequence) + async fn pay_packet_fee_async( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the ICS29 Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.applications.fee.v1.Msg/RegisterPayee" => { + #[allow(non_camel_case_types)] + struct RegisterPayeeSvc(pub Arc); + impl tonic::server::UnaryService + for RegisterPayeeSvc { + type Response = super::MsgRegisterPayeeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::payee(&inner, request).await + ::register_payee(&inner, request).await }; Box::pin(fut) } @@ -2149,7 +2173,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PayeeSvc(inner); + let method = RegisterPayeeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2165,25 +2189,26 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.fee.v1.Query/CounterpartyPayee" => { + "/ibc.applications.fee.v1.Msg/RegisterCounterpartyPayee" => { #[allow(non_camel_case_types)] - struct CounterpartyPayeeSvc(pub Arc); + struct RegisterCounterpartyPayeeSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService - for CounterpartyPayeeSvc { - type Response = super::QueryCounterpartyPayeeResponse; + T: Msg, + > tonic::server::UnaryService + for RegisterCounterpartyPayeeSvc { + type Response = super::MsgRegisterCounterpartyPayeeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::counterparty_payee(&inner, request).await + ::register_counterparty_payee(&inner, request) + .await }; Box::pin(fut) } @@ -2195,7 +2220,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CounterpartyPayeeSvc(inner); + let method = RegisterCounterpartyPayeeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2211,27 +2236,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.fee.v1.Query/FeeEnabledChannels" => { + "/ibc.applications.fee.v1.Msg/PayPacketFee" => { #[allow(non_camel_case_types)] - struct FeeEnabledChannelsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for FeeEnabledChannelsSvc { - type Response = super::QueryFeeEnabledChannelsResponse; + struct PayPacketFeeSvc(pub Arc); + impl tonic::server::UnaryService + for PayPacketFeeSvc { + type Response = super::MsgPayPacketFeeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryFeeEnabledChannelsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::fee_enabled_channels(&inner, request).await + ::pay_packet_fee(&inner, request).await }; Box::pin(fut) } @@ -2243,7 +2264,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = FeeEnabledChannelsSvc(inner); + let method = PayPacketFeeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2259,25 +2280,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.fee.v1.Query/FeeEnabledChannel" => { + "/ibc.applications.fee.v1.Msg/PayPacketFeeAsync" => { #[allow(non_camel_case_types)] - struct FeeEnabledChannelSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for FeeEnabledChannelSvc { - type Response = super::QueryFeeEnabledChannelResponse; + struct PayPacketFeeAsyncSvc(pub Arc); + impl tonic::server::UnaryService + for PayPacketFeeAsyncSvc { + type Response = super::MsgPayPacketFeeAsyncResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::fee_enabled_channel(&inner, request).await + ::pay_packet_fee_async(&inner, request).await }; Box::pin(fut) } @@ -2289,7 +2308,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = FeeEnabledChannelSvc(inner); + let method = PayPacketFeeAsyncSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2320,7 +2339,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2332,7 +2351,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2342,26 +2361,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.applications.fee.v1.Query"; - } -} -/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring -/// See ICS004: -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Metadata { - /// fee_version defines the ICS29 fee version - #[prost(string, tag = "1")] - pub fee_version: ::prost::alloc::string::String, - /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring - #[prost(string, tag = "2")] - pub app_version: ::prost::alloc::string::String, -} -impl ::prost::Name for Metadata { - const NAME: &'static str = "Metadata"; - const PACKAGE: &'static str = "ibc.applications.fee.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.fee.v1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.applications.fee.v1.Msg"; } } diff --git a/src/prost/ibc.applications.interchain_accounts.controller.v1.rs b/src/prost/ibc.applications.interchain_accounts.controller.v1.rs index 00e306a3..d2373198 100644 --- a/src/prost/ibc.applications.interchain_accounts.controller.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.controller.v1.rs @@ -16,37 +16,17 @@ impl ::prost::Name for Params { ) } } -/// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount +/// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterInterchainAccount { +pub struct QueryInterchainAccountRequest { #[prost(string, tag = "1")] pub owner: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, } -impl ::prost::Name for MsgRegisterInterchainAccount { - const NAME: &'static str = "MsgRegisterInterchainAccount"; - const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.controller.v1.{}", Self::NAME - ) - } -} -/// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRegisterInterchainAccountResponse { - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub port_id: ::prost::alloc::string::String, -} -impl ::prost::Name for MsgRegisterInterchainAccountResponse { - const NAME: &'static str = "MsgRegisterInterchainAccountResponse"; +impl ::prost::Name for QueryInterchainAccountRequest { + const NAME: &'static str = "QueryInterchainAccountRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -54,25 +34,15 @@ impl ::prost::Name for MsgRegisterInterchainAccountResponse { ) } } -/// MsgSendTx defines the payload for Msg/SendTx +/// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendTx { +pub struct QueryInterchainAccountResponse { #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub packet_data: ::core::option::Option< - super::super::v1::InterchainAccountPacketData, - >, - /// Relative timeout timestamp provided will be added to the current block time during transaction execution. - /// The timeout timestamp must be non-zero. - #[prost(uint64, tag = "4")] - pub relative_timeout: u64, + pub address: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSendTx { - const NAME: &'static str = "MsgSendTx"; +impl ::prost::Name for QueryInterchainAccountResponse { + const NAME: &'static str = "QueryInterchainAccountResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -80,15 +50,12 @@ impl ::prost::Name for MsgSendTx { ) } } -/// MsgSendTxResponse defines the response for MsgSendTx +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSendTxResponse { - #[prost(uint64, tag = "1")] - pub sequence: u64, -} -impl ::prost::Name for MsgSendTxResponse { - const NAME: &'static str = "MsgSendTxResponse"; +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -96,34 +63,16 @@ impl ::prost::Name for MsgSendTxResponse { ) } } -/// MsgUpdateParams defines the payload for Msg/UpdateParams +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/controller parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; - const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!( - "ibc.applications.interchain_accounts.controller.v1.{}", Self::NAME - ) - } -} -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -133,16 +82,16 @@ impl ::prost::Name for MsgUpdateParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the 27-interchain-accounts/controller Msg service. + /// Query provides defines the gRPC querier service. #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -153,7 +102,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -171,7 +120,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -185,7 +134,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -218,43 +167,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. - pub async fn register_interchain_account( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "RegisterInterchainAccount", - ), - ); - self.inner.unary(req, path, codec).await - } - /// SendTx defines a rpc handler for MsgSendTx. - pub async fn send_tx( + /// InterchainAccount returns the interchain account address for a given owner address on a given connection + pub async fn interchain_account( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -268,24 +186,24 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx", + "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "SendTx", + "ibc.applications.interchain_accounts.controller.v1.Query", + "InterchainAccount", ), ); self.inner.unary(req, path, codec).await } - /// UpdateParams defines a rpc handler for MsgUpdateParams. - pub async fn update_params( + /// Params queries all parameters of the ICA controller submodule. + pub async fn params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -299,14 +217,14 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams", + "/ibc.applications.interchain_accounts.controller.v1.Query/Params", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Msg", - "UpdateParams", + "ibc.applications.interchain_accounts.controller.v1.Query", + "Params", ), ); self.inner.unary(req, path, codec).await @@ -315,40 +233,32 @@ pub mod msg_client { } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. - async fn register_interchain_account( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// SendTx defines a rpc handler for MsgSendTx. - async fn send_tx( + pub trait Query: Send + Sync + 'static { + /// InterchainAccount returns the interchain account address for a given owner address on a given connection + async fn interchain_account( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateParams defines a rpc handler for MsgUpdateParams. - async fn update_params( + /// Params queries all parameters of the ICA controller submodule. + async fn params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Msg defines the 27-interchain-accounts/controller Msg service. + /// Query provides defines the gRPC querier service. #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -356,7 +266,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -408,9 +318,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -426,70 +336,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount" => { + "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount" => { #[allow(non_camel_case_types)] - struct RegisterInterchainAccountSvc(pub Arc); + struct InterchainAccountSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for RegisterInterchainAccountSvc { - type Response = super::MsgRegisterInterchainAccountResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::register_interchain_account(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RegisterInterchainAccountSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx" => { - #[allow(non_camel_case_types)] - struct SendTxSvc(pub Arc); - impl tonic::server::UnaryService - for SendTxSvc { - type Response = super::MsgSendTxResponse; + T: Query, + > tonic::server::UnaryService + for InterchainAccountSvc { + type Response = super::QueryInterchainAccountResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::send_tx(&inner, request).await + ::interchain_account(&inner, request).await }; Box::pin(fut) } @@ -501,7 +366,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = SendTxSvc(inner); + let method = InterchainAccountSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -517,23 +382,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams" => { + "/ibc.applications.interchain_accounts.controller.v1.Query/Params" => { #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_params(&inner, request).await + ::params(&inner, request).await }; Box::pin(fut) } @@ -545,7 +410,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateParamsSvc(inner); + let method = ParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -576,7 +441,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -588,7 +453,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -598,21 +463,67 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.applications.interchain_accounts.controller.v1.Msg"; + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.applications.interchain_accounts.controller.v1.Query"; } } -/// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. +/// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterInterchainAccount { + #[prost(string, tag = "1")] + pub owner: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub connection_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub version: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterInterchainAccount { + const NAME: &'static str = "MsgRegisterInterchainAccount"; + const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "ibc.applications.interchain_accounts.controller.v1.{}", Self::NAME + ) + } +} +/// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRegisterInterchainAccountResponse { + #[prost(string, tag = "1")] + pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub port_id: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgRegisterInterchainAccountResponse { + const NAME: &'static str = "MsgRegisterInterchainAccountResponse"; + const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!( + "ibc.applications.interchain_accounts.controller.v1.{}", Self::NAME + ) + } +} +/// MsgSendTx defines the payload for Msg/SendTx #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInterchainAccountRequest { +pub struct MsgSendTx { #[prost(string, tag = "1")] pub owner: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub connection_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub packet_data: ::core::option::Option< + super::super::v1::InterchainAccountPacketData, + >, + /// Relative timeout timestamp provided will be added to the current block time during transaction execution. + /// The timeout timestamp must be non-zero. + #[prost(uint64, tag = "4")] + pub relative_timeout: u64, } -impl ::prost::Name for QueryInterchainAccountRequest { - const NAME: &'static str = "QueryInterchainAccountRequest"; +impl ::prost::Name for MsgSendTx { + const NAME: &'static str = "MsgSendTx"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -620,15 +531,15 @@ impl ::prost::Name for QueryInterchainAccountRequest { ) } } -/// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. +/// MsgSendTxResponse defines the response for MsgSendTx #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryInterchainAccountResponse { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, +pub struct MsgSendTxResponse { + #[prost(uint64, tag = "1")] + pub sequence: u64, } -impl ::prost::Name for QueryInterchainAccountResponse { - const NAME: &'static str = "QueryInterchainAccountResponse"; +impl ::prost::Name for MsgSendTxResponse { + const NAME: &'static str = "MsgSendTxResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -636,12 +547,21 @@ impl ::prost::Name for QueryInterchainAccountResponse { ) } } -/// QueryParamsRequest is the request type for the Query/Params RPC method. +/// MsgUpdateParams defines the payload for Msg/UpdateParams #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the 27-interchain-accounts/controller parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -649,16 +569,12 @@ impl ::prost::Name for QueryParamsRequest { ) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.controller.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -668,16 +584,16 @@ impl ::prost::Name for QueryParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service. + /// Msg defines the 27-interchain-accounts/controller Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -688,7 +604,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -706,7 +622,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -720,7 +636,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -753,12 +669,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// InterchainAccount returns the interchain account address for a given owner address on a given connection - pub async fn interchain_account( + /// RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. + pub async fn register_interchain_account( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -772,24 +688,24 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount", + "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Query", - "InterchainAccount", + "ibc.applications.interchain_accounts.controller.v1.Msg", + "RegisterInterchainAccount", ), ); self.inner.unary(req, path, codec).await } - /// Params queries all parameters of the ICA controller submodule. - pub async fn params( + /// SendTx defines a rpc handler for MsgSendTx. + pub async fn send_tx( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -803,14 +719,45 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.controller.v1.Query/Params", + "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.interchain_accounts.controller.v1.Query", - "Params", + "ibc.applications.interchain_accounts.controller.v1.Msg", + "SendTx", + ), + ); + self.inner.unary(req, path, codec).await + } + /// UpdateParams defines a rpc handler for MsgUpdateParams. + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.interchain_accounts.controller.v1.Msg", + "UpdateParams", ), ); self.inner.unary(req, path, codec).await @@ -819,32 +766,40 @@ pub mod query_client { } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// InterchainAccount returns the interchain account address for a given owner address on a given connection - async fn interchain_account( + pub trait Msg: Send + Sync + 'static { + /// RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. + async fn register_interchain_account( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Params queries all parameters of the ICA controller submodule. - async fn params( + /// SendTx defines a rpc handler for MsgSendTx. + async fn send_tx( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// UpdateParams defines a rpc handler for MsgUpdateParams. + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Query provides defines the gRPC querier service. + /// Msg defines the 27-interchain-accounts/controller Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -852,7 +807,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -904,9 +859,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -922,25 +877,26 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount" => { + "/ibc.applications.interchain_accounts.controller.v1.Msg/RegisterInterchainAccount" => { #[allow(non_camel_case_types)] - struct InterchainAccountSvc(pub Arc); + struct RegisterInterchainAccountSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService - for InterchainAccountSvc { - type Response = super::QueryInterchainAccountResponse; + T: Msg, + > tonic::server::UnaryService + for RegisterInterchainAccountSvc { + type Response = super::MsgRegisterInterchainAccountResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::interchain_account(&inner, request).await + ::register_interchain_account(&inner, request) + .await }; Box::pin(fut) } @@ -952,7 +908,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = InterchainAccountSvc(inner); + let method = RegisterInterchainAccountSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -968,23 +924,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.interchain_accounts.controller.v1.Query/Params" => { + "/ibc.applications.interchain_accounts.controller.v1.Msg/SendTx" => { #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + struct SendTxSvc(pub Arc); + impl tonic::server::UnaryService + for SendTxSvc { + type Response = super::MsgSendTxResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::send_tx(&inner, request).await }; Box::pin(fut) } @@ -996,7 +952,51 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = SendTxSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams" => { + #[allow(non_camel_case_types)] + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1027,7 +1027,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1039,7 +1039,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1049,7 +1049,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.applications.interchain_accounts.controller.v1.Query"; + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.applications.interchain_accounts.controller.v1.Msg"; } } diff --git a/src/prost/ibc.applications.interchain_accounts.host.v1.rs b/src/prost/ibc.applications.interchain_accounts.host.v1.rs index 0cbc62ef..12264b74 100644 --- a/src/prost/ibc.applications.interchain_accounts.host.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.host.v1.rs @@ -19,21 +19,12 @@ impl ::prost::Name for Params { ) } } -/// MsgUpdateParams defines the payload for Msg/UpdateParams +/// QueryParamsRequest is the request type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/host parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -41,12 +32,16 @@ impl ::prost::Name for MsgUpdateParams { ) } } -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams +/// QueryParamsResponse is the response type for the Query/Params RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -56,16 +51,16 @@ impl ::prost::Name for MsgUpdateParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the 27-interchain-accounts/host Msg service. + /// Query provides defines the gRPC querier service. #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -76,7 +71,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -94,7 +89,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -108,7 +103,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -141,12 +136,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// UpdateParams defines a rpc handler for MsgUpdateParams. - pub async fn update_params( + /// Params queries all parameters of the ICA host submodule. + pub async fn params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -160,14 +155,14 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams", + "/ibc.applications.interchain_accounts.host.v1.Query/Params", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.interchain_accounts.host.v1.Msg", - "UpdateParams", + "ibc.applications.interchain_accounts.host.v1.Query", + "Params", ), ); self.inner.unary(req, path, codec).await @@ -176,24 +171,24 @@ pub mod msg_client { } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// UpdateParams defines a rpc handler for MsgUpdateParams. - async fn update_params( + pub trait Query: Send + Sync + 'static { + /// Params queries all parameters of the ICA host submodule. + async fn params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Msg defines the 27-interchain-accounts/host Msg service. + /// Query provides defines the gRPC querier service. #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -201,7 +196,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -253,9 +248,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -271,23 +266,23 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams" => { + "/ibc.applications.interchain_accounts.host.v1.Query/Params" => { #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_params(&inner, request).await + ::params(&inner, request).await }; Box::pin(fut) } @@ -299,7 +294,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateParamsSvc(inner); + let method = ParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -330,7 +325,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -342,7 +337,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -352,16 +347,25 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.applications.interchain_accounts.host.v1.Msg"; + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.applications.interchain_accounts.host.v1.Query"; } } -/// QueryParamsRequest is the request type for the Query/Params RPC method. +/// MsgUpdateParams defines the payload for Msg/UpdateParams #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the 27-interchain-accounts/host parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -369,16 +373,12 @@ impl ::prost::Name for QueryParamsRequest { ) } } -/// QueryParamsResponse is the response type for the Query/Params RPC method. +/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.applications.interchain_accounts.host.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!( @@ -388,16 +388,16 @@ impl ::prost::Name for QueryParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service. + /// Msg defines the 27-interchain-accounts/host Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -408,7 +408,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -426,7 +426,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -440,7 +440,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -473,12 +473,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Params queries all parameters of the ICA host submodule. - pub async fn params( + /// UpdateParams defines a rpc handler for MsgUpdateParams. + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -492,14 +492,14 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.interchain_accounts.host.v1.Query/Params", + "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.interchain_accounts.host.v1.Query", - "Params", + "ibc.applications.interchain_accounts.host.v1.Msg", + "UpdateParams", ), ); self.inner.unary(req, path, codec).await @@ -508,24 +508,24 @@ pub mod query_client { } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Params queries all parameters of the ICA host submodule. - async fn params( + pub trait Msg: Send + Sync + 'static { + /// UpdateParams defines a rpc handler for MsgUpdateParams. + async fn update_params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query provides defines the gRPC querier service. + /// Msg defines the 27-interchain-accounts/host Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -533,7 +533,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -585,9 +585,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -603,23 +603,23 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.interchain_accounts.host.v1.Query/Params" => { + "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -631,7 +631,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -662,7 +662,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -674,7 +674,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -684,7 +684,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.applications.interchain_accounts.host.v1.Query"; + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.applications.interchain_accounts.host.v1.Msg"; } } diff --git a/src/prost/ibc.applications.interchain_accounts.v1.rs b/src/prost/ibc.applications.interchain_accounts.v1.rs index 045606e3..94bedba8 100644 --- a/src/prost/ibc.applications.interchain_accounts.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.v1.rs @@ -1,21 +1,3 @@ -/// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InterchainAccount { - #[prost(message, optional, tag = "1")] - pub base_account: ::core::option::Option< - super::super::super::super::cosmos::auth::v1beta1::BaseAccount, - >, - #[prost(string, tag = "2")] - pub account_owner: ::prost::alloc::string::String, -} -impl ::prost::Name for InterchainAccount { - const NAME: &'static str = "InterchainAccount"; - const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) - } -} /// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -80,6 +62,24 @@ impl Type { } } } +/// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InterchainAccount { + #[prost(message, optional, tag = "1")] + pub base_account: ::core::option::Option< + super::super::super::super::cosmos::auth::v1beta1::BaseAccount, + >, + #[prost(string, tag = "2")] + pub account_owner: ::prost::alloc::string::String, +} +impl ::prost::Name for InterchainAccount { + const NAME: &'static str = "InterchainAccount"; + const PACKAGE: &'static str = "ibc.applications.interchain_accounts.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.interchain_accounts.v1.{}", Self::NAME) + } +} /// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring /// See ICS004: #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.nft_transfer.v1.rs b/src/prost/ibc.applications.nft_transfer.v1.rs index bea5ee5a..b0430a8c 100644 --- a/src/prost/ibc.applications.nft_transfer.v1.rs +++ b/src/prost/ibc.applications.nft_transfer.v1.rs @@ -40,95 +40,225 @@ impl ::prost::Name for Params { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// MsgTransfer defines a msg to transfer non fungible tokens between -/// ICS721 enabled chains. See ICS Spec here: +/// GenesisState defines the ibc-nft-transfer genesis state +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub traces: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub params: ::core::option::Option, +} +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// NonFungibleTokenPacketData defines a struct for the packet payload +/// See NonFungibleTokenPacketData spec: /// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransfer { - /// the port on which the packet will be sent +pub struct NonFungibleTokenPacketData { + /// the class_id of class to be transferred #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent + pub class_id: ::prost::alloc::string::String, + /// the class_uri of class to be transferred #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// the class_id of tokens to be transferred + pub class_uri: ::prost::alloc::string::String, + /// the class_data of class to be transferred #[prost(string, tag = "3")] - pub class_id: ::prost::alloc::string::String, + pub class_data: ::prost::alloc::string::String, /// the non fungible tokens to be transferred #[prost(string, repeated, tag = "4")] pub token_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// the non fungible tokens's uri to be transferred + #[prost(string, repeated, tag = "5")] + pub token_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// the non fungible tokens's data to be transferred + #[prost(string, repeated, tag = "6")] + pub token_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// the sender address - #[prost(string, tag = "5")] + #[prost(string, tag = "7")] pub sender: ::prost::alloc::string::String, /// the recipient address on the destination chain - #[prost(string, tag = "6")] + #[prost(string, tag = "8")] pub receiver: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(message, optional, tag = "7")] - pub timeout_height: ::core::option::Option< - super::super::super::core::client::v1::Height, - >, - /// Timeout timestamp in absolute nanoseconds since unix epoch. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "8")] - pub timeout_timestamp: u64, /// optional memo #[prost(string, tag = "9")] pub memo: ::prost::alloc::string::String, } -impl ::prost::Name for MsgTransfer { - const NAME: &'static str = "MsgTransfer"; +impl ::prost::Name for NonFungibleTokenPacketData { + const NAME: &'static str = "NonFungibleTokenPacketData"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// MsgTransferResponse defines the Msg/Transfer response type. +/// QueryClassTraceRequest is the request type for the Query/ClassDenom RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransferResponse { - /// sequence number of the transfer packet sent - #[prost(uint64, tag = "1")] - pub sequence: u64, +pub struct QueryClassTraceRequest { + /// hash (in hex format) or classID (full classID with ibc prefix) of the + /// denomination trace information. + #[prost(string, tag = "1")] + pub hash: ::prost::alloc::string::String, } -impl ::prost::Name for MsgTransferResponse { - const NAME: &'static str = "MsgTransferResponse"; +impl ::prost::Name for QueryClassTraceRequest { + const NAME: &'static str = "QueryClassTraceRequest"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// +/// QueryClassTraceResponse is the response type for the Query/ClassDenom RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the nft-transfer parameters to update. - /// - /// NOTE: All parameters must be supplied. +pub struct QueryClassTraceResponse { + /// class_trace returns the requested class trace information. + #[prost(message, optional, tag = "1")] + pub class_trace: ::core::option::Option, +} +impl ::prost::Name for QueryClassTraceResponse { + const NAME: &'static str = "QueryClassTraceResponse"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryConnectionsRequest is the request type for the Query/ClassTraces RPC +/// method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryClassTracesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryClassTracesRequest { + const NAME: &'static str = "QueryClassTracesRequest"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryClassTracesResponse is the response type for the Query/ClassTraces RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryClassTracesResponse { + /// class_traces returns all class trace information. + #[prost(message, repeated, tag = "1")] + pub class_traces: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryClassTracesResponse { + const NAME: &'static str = "QueryClassTracesResponse"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// +/// QueryClassHashRequest is the request type for the Query/ClassHash RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryClassHashRequest { + /// The class trace `([port_id]/[channel_id])+/[class]` + #[prost(string, tag = "1")] + pub trace: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryClassHashRequest { + const NAME: &'static str = "QueryClassHashRequest"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryClassHashResponse is the response type for the Query/ClassHash RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryClassHashResponse { + /// hash (in hex format) of the denomination trace information. + #[prost(string, tag = "1")] + pub hash: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryClassHashResponse { + const NAME: &'static str = "QueryClassHashResponse"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryEscrowAddressRequest { + /// unique port identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// unique channel identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryEscrowAddressRequest { + const NAME: &'static str = "QueryEscrowAddressRequest"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryEscrowAddressResponse { + /// the escrow account address + #[prost(string, tag = "1")] + pub escrow_address: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryEscrowAddressResponse { + const NAME: &'static str = "QueryEscrowAddressResponse"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryParamsRequest is request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } +} +/// QueryParamsResponse is response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// params holds all the parameters of this module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) @@ -136,16 +266,16 @@ impl ::prost::Name for MsgUpdateParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the ibc/nft-transfer Msg service. + /// Query provides defines the gRPC querier service. #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -156,7 +286,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -174,7 +304,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -188,7 +318,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -221,12 +351,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Transfer defines a rpc handler method for MsgTransfer. - pub async fn transfer( + /// ClassTrace queries a class trace information. + pub async fn class_trace( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -240,23 +370,24 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Msg/Transfer", + "/ibc.applications.nft_transfer.v1.Query/ClassTrace", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.applications.nft_transfer.v1.Msg", "Transfer"), + GrpcMethod::new( + "ibc.applications.nft_transfer.v1.Query", + "ClassTrace", + ), ); self.inner.unary(req, path, codec).await } - /// UpdateParams defines a governance operation for updating the nft-transfer module parameters. - /// The authority is defined in the keeper. - /// - pub async fn update_params( + /// ClassTraces queries all class traces. + pub async fn class_traces( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -270,50 +401,164 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Msg/UpdateParams", + "/ibc.applications.nft_transfer.v1.Query/ClassTraces", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.nft_transfer.v1.Msg", - "UpdateParams", + "ibc.applications.nft_transfer.v1.Query", + "ClassTraces", ), ); self.inner.unary(req, path, codec).await } + /// ClassHash queries a class hash information. + pub async fn class_hash( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.nft_transfer.v1.Query/ClassHash", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.nft_transfer.v1.Query", + "ClassHash", + ), + ); + self.inner.unary(req, path, codec).await + } + /// EscrowAddress returns the escrow address for a particular port and channel + /// id. + pub async fn escrow_address( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.nft_transfer.v1.Query/EscrowAddress", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.nft_transfer.v1.Query", + "EscrowAddress", + ), + ); + self.inner.unary(req, path, codec).await + } + /// Params queries all parameters of the nft-transfer module. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.nft_transfer.v1.Query/Params", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.applications.nft_transfer.v1.Query", "Params"), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// Transfer defines a rpc handler method for MsgTransfer. - async fn transfer( + pub trait Query: Send + Sync + 'static { + /// ClassTrace queries a class trace information. + async fn class_trace( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateParams defines a governance operation for updating the nft-transfer module parameters. - /// The authority is defined in the keeper. - /// - async fn update_params( + /// ClassTraces queries all class traces. + async fn class_traces( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// ClassHash queries a class hash information. + async fn class_hash( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// EscrowAddress returns the escrow address for a particular port and channel + /// id. + async fn escrow_address( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// Params queries all parameters of the nft-transfer module. + async fn params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the ibc/nft-transfer Msg service. + /// Query provides defines the gRPC querier service. #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -321,7 +566,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -373,9 +618,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -391,23 +636,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.nft_transfer.v1.Msg/Transfer" => { + "/ibc.applications.nft_transfer.v1.Query/ClassTrace" => { #[allow(non_camel_case_types)] - struct TransferSvc(pub Arc); - impl tonic::server::UnaryService - for TransferSvc { - type Response = super::MsgTransferResponse; + struct ClassTraceSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClassTraceSvc { + type Response = super::QueryClassTraceResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::transfer(&inner, request).await + ::class_trace(&inner, request).await }; Box::pin(fut) } @@ -419,7 +666,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TransferSvc(inner); + let method = ClassTraceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -435,23 +682,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.applications.nft_transfer.v1.Msg/UpdateParams" => { + "/ibc.applications.nft_transfer.v1.Query/ClassTraces" => { #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct ClassTracesSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClassTracesSvc { + type Response = super::QueryClassTracesResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_params(&inner, request).await + ::class_traces(&inner, request).await }; Box::pin(fut) } @@ -463,7 +712,143 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateParamsSvc(inner); + let method = ClassTracesSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.nft_transfer.v1.Query/ClassHash" => { + #[allow(non_camel_case_types)] + struct ClassHashSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClassHashSvc { + type Response = super::QueryClassHashResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::class_hash(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ClassHashSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.nft_transfer.v1.Query/EscrowAddress" => { + #[allow(non_camel_case_types)] + struct EscrowAddressSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for EscrowAddressSvc { + type Response = super::QueryEscrowAddressResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::escrow_address(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = EscrowAddressSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.applications.nft_transfer.v1.Query/Params" => { + #[allow(non_camel_case_types)] + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -494,7 +879,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -504,223 +889,111 @@ pub mod msg_server { max_decoding_message_size: self.max_decoding_message_size, max_encoding_message_size: self.max_encoding_message_size, } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.applications.nft_transfer.v1.Msg"; - } -} -/// NonFungibleTokenPacketData defines a struct for the packet payload -/// See NonFungibleTokenPacketData spec: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct NonFungibleTokenPacketData { - /// the class_id of class to be transferred - #[prost(string, tag = "1")] - pub class_id: ::prost::alloc::string::String, - /// the class_uri of class to be transferred - #[prost(string, tag = "2")] - pub class_uri: ::prost::alloc::string::String, - /// the class_data of class to be transferred - #[prost(string, tag = "3")] - pub class_data: ::prost::alloc::string::String, - /// the non fungible tokens to be transferred - #[prost(string, repeated, tag = "4")] - pub token_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// the non fungible tokens's uri to be transferred - #[prost(string, repeated, tag = "5")] - pub token_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// the non fungible tokens's data to be transferred - #[prost(string, repeated, tag = "6")] - pub token_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// the sender address - #[prost(string, tag = "7")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "8")] - pub receiver: ::prost::alloc::string::String, - /// optional memo - #[prost(string, tag = "9")] - pub memo: ::prost::alloc::string::String, -} -impl ::prost::Name for NonFungibleTokenPacketData { - const NAME: &'static str = "NonFungibleTokenPacketData"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) - } -} -/// QueryClassTraceRequest is the request type for the Query/ClassDenom RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassTraceRequest { - /// hash (in hex format) or classID (full classID with ibc prefix) of the - /// denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClassTraceRequest { - const NAME: &'static str = "QueryClassTraceRequest"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) - } -} -/// QueryClassTraceResponse is the response type for the Query/ClassDenom RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassTraceResponse { - /// class_trace returns the requested class trace information. - #[prost(message, optional, tag = "1")] - pub class_trace: ::core::option::Option, -} -impl ::prost::Name for QueryClassTraceResponse { - const NAME: &'static str = "QueryClassTraceResponse"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) - } -} -/// QueryConnectionsRequest is the request type for the Query/ClassTraces RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassTracesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryClassTracesRequest { - const NAME: &'static str = "QueryClassTracesRequest"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) - } -} -/// QueryClassTracesResponse is the response type for the Query/ClassTraces RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassTracesResponse { - /// class_traces returns all class trace information. - #[prost(message, repeated, tag = "1")] - pub class_traces: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryClassTracesResponse { - const NAME: &'static str = "QueryClassTracesResponse"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) - } -} -/// QueryClassHashRequest is the request type for the Query/ClassHash RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassHashRequest { - /// The class trace `([port_id]/[channel_id])+/[class]` - #[prost(string, tag = "1")] - pub trace: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClassHashRequest { - const NAME: &'static str = "QueryClassHashRequest"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + } } -} -/// QueryClassHashResponse is the response type for the Query/ClassHash RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClassHashResponse { - /// hash (in hex format) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClassHashResponse { - const NAME: &'static str = "QueryClassHashResponse"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.applications.nft_transfer.v1.Query"; } } -/// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC -/// method. +/// MsgTransfer defines a msg to transfer non fungible tokens between +/// ICS721 enabled chains. See ICS Spec here: +/// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryEscrowAddressRequest { - /// unique port identifier +pub struct MsgTransfer { + /// the port on which the packet will be sent #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier + pub source_port: ::prost::alloc::string::String, + /// the channel by which the packet will be sent #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, + pub source_channel: ::prost::alloc::string::String, + /// the class_id of tokens to be transferred + #[prost(string, tag = "3")] + pub class_id: ::prost::alloc::string::String, + /// the non fungible tokens to be transferred + #[prost(string, repeated, tag = "4")] + pub token_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// the sender address + #[prost(string, tag = "5")] + pub sender: ::prost::alloc::string::String, + /// the recipient address on the destination chain + #[prost(string, tag = "6")] + pub receiver: ::prost::alloc::string::String, + /// Timeout height relative to the current block height. + /// The timeout is disabled when set to 0. + #[prost(message, optional, tag = "7")] + pub timeout_height: ::core::option::Option< + super::super::super::core::client::v1::Height, + >, + /// Timeout timestamp in absolute nanoseconds since unix epoch. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "8")] + pub timeout_timestamp: u64, + /// optional memo + #[prost(string, tag = "9")] + pub memo: ::prost::alloc::string::String, } -impl ::prost::Name for QueryEscrowAddressRequest { - const NAME: &'static str = "QueryEscrowAddressRequest"; +impl ::prost::Name for MsgTransfer { + const NAME: &'static str = "MsgTransfer"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC -/// method. +/// MsgTransferResponse defines the Msg/Transfer response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryEscrowAddressResponse { - /// the escrow account address - #[prost(string, tag = "1")] - pub escrow_address: ::prost::alloc::string::String, +pub struct MsgTransferResponse { + /// sequence number of the transfer packet sent + #[prost(uint64, tag = "1")] + pub sequence: u64, } -impl ::prost::Name for QueryEscrowAddressResponse { - const NAME: &'static str = "QueryEscrowAddressResponse"; +impl ::prost::Name for MsgTransferResponse { + const NAME: &'static str = "MsgTransferResponse"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// QueryParamsRequest is request type for the Query/Params RPC method. +/// MsgUpdateParams is the Msg/UpdateParams request type. +/// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; +pub struct MsgUpdateParams { + /// authority is the address that controls the module (defaults to x/gov unless overwritten). + #[prost(string, tag = "1")] + pub authority: ::prost::alloc::string::String, + /// params defines the nft-transfer parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) } } -/// QueryParamsResponse is response type for the Query/Params RPC method. +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +/// #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) @@ -728,16 +1001,16 @@ impl ::prost::Name for QueryParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service. + /// Msg defines the ibc/nft-transfer Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -748,7 +1021,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -766,7 +1039,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -780,7 +1053,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -813,74 +1086,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// ClassTrace queries a class trace information. - pub async fn class_trace( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Query/ClassTrace", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.nft_transfer.v1.Query", - "ClassTrace", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ClassTraces queries all class traces. - pub async fn class_traces( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Query/ClassTraces", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.nft_transfer.v1.Query", - "ClassTraces", - ), - ); - self.inner.unary(req, path, codec).await - } - /// ClassHash queries a class hash information. - pub async fn class_hash( + /// Transfer defines a rpc handler method for MsgTransfer. + pub async fn transfer( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -894,25 +1105,23 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Query/ClassHash", + "/ibc.applications.nft_transfer.v1.Msg/Transfer", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new( - "ibc.applications.nft_transfer.v1.Query", - "ClassHash", - ), + GrpcMethod::new("ibc.applications.nft_transfer.v1.Msg", "Transfer"), ); self.inner.unary(req, path, codec).await } - /// EscrowAddress returns the escrow address for a particular port and channel - /// id. - pub async fn escrow_address( + /// UpdateParams defines a governance operation for updating the nft-transfer module parameters. + /// The authority is defined in the keeper. + /// + pub async fn update_params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -926,101 +1135,50 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Query/EscrowAddress", + "/ibc.applications.nft_transfer.v1.Msg/UpdateParams", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.applications.nft_transfer.v1.Query", - "EscrowAddress", + "ibc.applications.nft_transfer.v1.Msg", + "UpdateParams", ), ); self.inner.unary(req, path, codec).await } - /// Params queries all parameters of the nft-transfer module. - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.nft_transfer.v1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.applications.nft_transfer.v1.Query", "Params"), - ); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// ClassTrace queries a class trace information. - async fn class_trace( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ClassTraces queries all class traces. - async fn class_traces( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ClassHash queries a class hash information. - async fn class_hash( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// EscrowAddress returns the escrow address for a particular port and channel - /// id. - async fn escrow_address( + pub trait Msg: Send + Sync + 'static { + /// Transfer defines a rpc handler method for MsgTransfer. + async fn transfer( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Params queries all parameters of the nft-transfer module. - async fn params( + /// UpdateParams defines a governance operation for updating the nft-transfer module parameters. + /// The authority is defined in the keeper. + /// + async fn update_params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query provides defines the gRPC querier service. + /// Msg defines the ibc/nft-transfer Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -1028,7 +1186,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1080,9 +1238,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -1098,163 +1256,23 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.nft_transfer.v1.Query/ClassTrace" => { - #[allow(non_camel_case_types)] - struct ClassTraceSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClassTraceSvc { - type Response = super::QueryClassTraceResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::class_trace(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClassTraceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.nft_transfer.v1.Query/ClassTraces" => { - #[allow(non_camel_case_types)] - struct ClassTracesSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClassTracesSvc { - type Response = super::QueryClassTracesResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::class_traces(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClassTracesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.nft_transfer.v1.Query/ClassHash" => { - #[allow(non_camel_case_types)] - struct ClassHashSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClassHashSvc { - type Response = super::QueryClassHashResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::class_hash(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClassHashSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.nft_transfer.v1.Query/EscrowAddress" => { + "/ibc.applications.nft_transfer.v1.Msg/Transfer" => { #[allow(non_camel_case_types)] - struct EscrowAddressSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for EscrowAddressSvc { - type Response = super::QueryEscrowAddressResponse; + struct TransferSvc(pub Arc); + impl tonic::server::UnaryService + for TransferSvc { + type Response = super::MsgTransferResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::escrow_address(&inner, request).await + ::transfer(&inner, request).await }; Box::pin(fut) } @@ -1266,7 +1284,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = EscrowAddressSvc(inner); + let method = TransferSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1282,23 +1300,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.nft_transfer.v1.Query/Params" => { + "/ibc.applications.nft_transfer.v1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -1310,7 +1328,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1341,7 +1359,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1353,7 +1371,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1363,25 +1381,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.applications.nft_transfer.v1.Query"; - } -} -/// GenesisState defines the ibc-nft-transfer genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub traces: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.nft_transfer.v1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.applications.nft_transfer.v1.Msg"; } } diff --git a/src/prost/ibc.applications.transfer.v1.rs b/src/prost/ibc.applications.transfer.v1.rs index 0c84ba34..f3af1956 100644 --- a/src/prost/ibc.applications.transfer.v1.rs +++ b/src/prost/ibc.applications.transfer.v1.rs @@ -1,3 +1,45 @@ +/// Allocation defines the spend limit for a particular port and channel +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Allocation { + /// the port on which the packet will be sent + #[prost(string, tag = "1")] + pub source_port: ::prost::alloc::string::String, + /// the channel by which the packet will be sent + #[prost(string, tag = "2")] + pub source_channel: ::prost::alloc::string::String, + /// spend limitation on the channel + #[prost(message, repeated, tag = "3")] + pub spend_limit: ::prost::alloc::vec::Vec< + super::super::super::super::cosmos::base::v1beta1::Coin, + >, + /// allow list of receivers, an empty allow list permits any receiver address + #[prost(string, repeated, tag = "4")] + pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for Allocation { + const NAME: &'static str = "Allocation"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// TransferAuthorization allows the grantee to spend up to spend_limit coins from +/// the granter's account for ibc transfer on a specific channel +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TransferAuthorization { + /// port and channel amounts + #[prost(message, repeated, tag = "1")] + pub allocations: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for TransferAuthorization { + const NAME: &'static str = "TransferAuthorization"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} /// DenomTrace contains the base denomination for ICS20 fungible tokens and the /// source tracing information path. #[allow(clippy::derive_partial_eq_without_eq)] @@ -41,128 +83,253 @@ impl ::prost::Name for Params { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -/// ICS20 enabled chains. See ICS Spec here: -/// +/// GenesisState defines the ibc-transfer genesis state #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransfer { - /// the port on which the packet will be sent +pub struct GenesisState { #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// the tokens to be transferred + pub port_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub denom_traces: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] - pub token: ::core::option::Option< + pub params: ::core::option::Option, + /// total_escrowed contains the total amount of tokens escrowed + /// by the transfer module + #[prost(message, repeated, tag = "4")] + pub total_escrowed: ::prost::alloc::vec::Vec< super::super::super::super::cosmos::base::v1beta1::Coin, >, - /// the sender address - #[prost(string, tag = "4")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "5")] - pub receiver: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(message, optional, tag = "6")] - pub timeout_height: ::core::option::Option< - super::super::super::core::client::v1::Height, - >, - /// Timeout timestamp in absolute nanoseconds since unix epoch. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "7")] - pub timeout_timestamp: u64, - /// optional memo - #[prost(string, tag = "8")] - pub memo: ::prost::alloc::string::String, } -impl ::prost::Name for MsgTransfer { - const NAME: &'static str = "MsgTransfer"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// MsgTransferResponse defines the Msg/Transfer response type. +/// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTransferResponse { - /// sequence number of the transfer packet sent - #[prost(uint64, tag = "1")] - pub sequence: u64, +pub struct QueryDenomTraceRequest { + /// hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. + #[prost(string, tag = "1")] + pub hash: ::prost::alloc::string::String, } -impl ::prost::Name for MsgTransferResponse { - const NAME: &'static str = "MsgTransferResponse"; +impl ::prost::Name for QueryDenomTraceRequest { + const NAME: &'static str = "QueryDenomTraceRequest"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// MsgUpdateParams is the Msg/UpdateParams request type. +/// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the transfer parameters to update. - /// - /// NOTE: All parameters must be supplied. +pub struct QueryDenomTraceResponse { + /// denom_trace returns the requested denomination trace information. + #[prost(message, optional, tag = "1")] + pub denom_trace: ::core::option::Option, +} +impl ::prost::Name for QueryDenomTraceResponse { + const NAME: &'static str = "QueryDenomTraceResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +/// method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDenomTracesRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, +} +impl ::prost::Name for QueryDenomTracesRequest { + const NAME: &'static str = "QueryDenomTracesRequest"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDenomTracesResponse { + /// denom_traces returns all denominations trace information. + #[prost(message, repeated, tag = "1")] + pub denom_traces: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryDenomTracesResponse { + const NAME: &'static str = "QueryDenomTracesResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// QueryParamsRequest is the request type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsRequest {} +impl ::prost::Name for QueryParamsRequest { + const NAME: &'static str = "QueryParamsRequest"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// QueryParamsResponse is the response type for the Query/Params RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryParamsResponse { + const NAME: &'static str = "QueryParamsResponse"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. +/// QueryDenomHashRequest is the request type for the Query/DenomHash RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryDenomHashRequest { + /// The denomination trace `([port_id]/[channel_id])+/[denom]` + #[prost(string, tag = "1")] + pub trace: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryDenomHashRequest { + const NAME: &'static str = "QueryDenomHashRequest"; const PACKAGE: &'static str = "ibc.applications.transfer.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the ibc/transfer Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, +/// QueryDenomHashResponse is the response type for the Query/DenomHash RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryDenomHashResponse { + /// hash (in hex format) of the denomination trace information. + #[prost(string, tag = "1")] + pub hash: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryDenomHashResponse { + const NAME: &'static str = "QueryDenomHashResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } +} +/// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryEscrowAddressRequest { + /// unique port identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// unique channel identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryEscrowAddressRequest { + const NAME: &'static str = "QueryEscrowAddressRequest"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); +} +/// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryEscrowAddressResponse { + /// the escrow account address + #[prost(string, tag = "1")] + pub escrow_address: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryEscrowAddressResponse { + const NAME: &'static str = "QueryEscrowAddressResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// QueryTotalEscrowForDenomRequest is the request type for TotalEscrowForDenom RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalEscrowForDenomRequest { + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryTotalEscrowForDenomRequest { + const NAME: &'static str = "QueryTotalEscrowForDenomRequest"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTotalEscrowForDenomResponse { + #[prost(message, optional, tag = "1")] + pub amount: ::core::option::Option< + super::super::super::super::cosmos::base::v1beta1::Coin, + >, +} +impl ::prost::Name for QueryTotalEscrowForDenomResponse { + const NAME: &'static str = "QueryTotalEscrowForDenomResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query provides defines the gRPC querier service. + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl QueryClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_origin(inner: T, origin: Uri) -> Self { @@ -172,7 +339,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -186,7 +353,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -219,12 +386,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Transfer defines a rpc handler method for MsgTransfer. - pub async fn transfer( + /// DenomTraces queries all denomination traces. + pub async fn denom_traces( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -238,19 +405,21 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Msg/Transfer", + "/ibc.applications.transfer.v1.Query/DenomTraces", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.applications.transfer.v1.Msg", "Transfer")); + .insert( + GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTraces"), + ); self.inner.unary(req, path, codec).await } - /// UpdateParams defines a rpc handler for MsgUpdateParams. - pub async fn update_params( + /// DenomTrace queries a denomination trace information. + pub async fn denom_trace( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -264,12 +433,128 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Msg/UpdateParams", + "/ibc.applications.transfer.v1.Query/DenomTrace", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Msg", "UpdateParams"), + GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTrace"), + ); + self.inner.unary(req, path, codec).await + } + /// Params queries all parameters of the ibc-transfer module. + pub async fn params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Query/Params", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.applications.transfer.v1.Query", "Params")); + self.inner.unary(req, path, codec).await + } + /// DenomHash queries a denomination hash information. + pub async fn denom_hash( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Query/DenomHash", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomHash"), + ); + self.inner.unary(req, path, codec).await + } + /// EscrowAddress returns the escrow address for a particular port and channel id. + pub async fn escrow_address( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Query/EscrowAddress", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.transfer.v1.Query", + "EscrowAddress", + ), + ); + self.inner.unary(req, path, codec).await + } + /// TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom. + pub async fn total_escrow_for_denom( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.transfer.v1.Query", + "TotalEscrowForDenom", + ), ); self.inner.unary(req, path, codec).await } @@ -277,40 +562,72 @@ pub mod msg_client { } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// Transfer defines a rpc handler method for MsgTransfer. - async fn transfer( + pub trait Query: Send + Sync + 'static { + /// DenomTraces queries all denomination traces. + async fn denom_traces( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateParams defines a rpc handler for MsgUpdateParams. - async fn update_params( + /// DenomTrace queries a denomination trace information. + async fn denom_trace( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - } - /// Msg defines the ibc/transfer Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl MsgServer { + /// Params queries all parameters of the ibc-transfer module. + async fn params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// DenomHash queries a denomination hash information. + async fn denom_hash( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// EscrowAddress returns the escrow address for a particular port and channel id. + async fn escrow_address( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom. + async fn total_escrow_for_denom( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Query provides defines the gRPC querier service. + #[derive(Debug)] + pub struct QueryServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -362,9 +679,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -380,23 +697,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.transfer.v1.Msg/Transfer" => { + "/ibc.applications.transfer.v1.Query/DenomTraces" => { #[allow(non_camel_case_types)] - struct TransferSvc(pub Arc); - impl tonic::server::UnaryService - for TransferSvc { - type Response = super::MsgTransferResponse; + struct DenomTracesSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DenomTracesSvc { + type Response = super::QueryDenomTracesResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::transfer(&inner, request).await + ::denom_traces(&inner, request).await }; Box::pin(fut) } @@ -408,7 +727,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TransferSvc(inner); + let method = DenomTracesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -424,23 +743,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Msg/UpdateParams" => { + "/ibc.applications.transfer.v1.Query/DenomTrace" => { #[allow(non_camel_case_types)] - struct UpdateParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct DenomTraceSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for DenomTraceSvc { + type Response = super::QueryDenomTraceResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_params(&inner, request).await + ::denom_trace(&inner, request).await }; Box::pin(fut) } @@ -452,7 +773,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateParamsSvc(inner); + let method = DenomTraceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -468,656 +789,69 @@ pub mod msg_server { }; Box::pin(fut) } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) + "/ibc.applications.transfer.v1.Query/Params" => { + #[allow(non_camel_case_types)] + struct ParamsSvc(pub Arc); + impl tonic::server::UnaryService + for ParamsSvc { + type Response = super::QueryParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.applications.transfer.v1.Msg"; - } -} -/// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTraceRequest { - /// hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDenomTraceRequest { - const NAME: &'static str = "QueryDenomTraceRequest"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTraceResponse { - /// denom_trace returns the requested denomination trace information. - #[prost(message, optional, tag = "1")] - pub denom_trace: ::core::option::Option, -} -impl ::prost::Name for QueryDenomTraceResponse { - const NAME: &'static str = "QueryDenomTraceResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTracesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryDenomTracesRequest { - const NAME: &'static str = "QueryDenomTracesRequest"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomTracesResponse { - /// denom_traces returns all denominations trace information. - #[prost(message, repeated, tag = "1")] - pub denom_traces: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -impl ::prost::Name for QueryDenomTracesResponse { - const NAME: &'static str = "QueryDenomTracesResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsRequest {} -impl ::prost::Name for QueryParamsRequest { - const NAME: &'static str = "QueryParamsRequest"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryParamsResponse { - const NAME: &'static str = "QueryParamsResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryDenomHashRequest is the request type for the Query/DenomHash RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomHashRequest { - /// The denomination trace `([port_id]/[channel_id])+/[denom]` - #[prost(string, tag = "1")] - pub trace: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDenomHashRequest { - const NAME: &'static str = "QueryDenomHashRequest"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryDenomHashResponse is the response type for the Query/DenomHash RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryDenomHashResponse { - /// hash (in hex format) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryDenomHashResponse { - const NAME: &'static str = "QueryDenomHashResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryEscrowAddressRequest { - /// unique port identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryEscrowAddressRequest { - const NAME: &'static str = "QueryEscrowAddressRequest"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryEscrowAddressResponse { - /// the escrow account address - #[prost(string, tag = "1")] - pub escrow_address: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryEscrowAddressResponse { - const NAME: &'static str = "QueryEscrowAddressResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryTotalEscrowForDenomRequest is the request type for TotalEscrowForDenom RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalEscrowForDenomRequest { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryTotalEscrowForDenomRequest { - const NAME: &'static str = "QueryTotalEscrowForDenomRequest"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryTotalEscrowForDenomResponse { - #[prost(message, optional, tag = "1")] - pub amount: ::core::option::Option< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, -} -impl ::prost::Name for QueryTotalEscrowForDenomResponse { - const NAME: &'static str = "QueryTotalEscrowForDenomResponse"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod query_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service. - #[derive(Debug, Clone)] - pub struct QueryClient { - inner: tonic::client::Grpc, - } - impl QueryClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl QueryClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> QueryClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - QueryClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// DenomTraces queries all denomination traces. - pub async fn denom_traces( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/DenomTraces", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTraces"), - ); - self.inner.unary(req, path, codec).await - } - /// DenomTrace queries a denomination trace information. - pub async fn denom_trace( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/DenomTrace", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTrace"), - ); - self.inner.unary(req, path, codec).await - } - /// Params queries all parameters of the ibc-transfer module. - pub async fn params( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/Params", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.applications.transfer.v1.Query", "Params")); - self.inner.unary(req, path, codec).await - } - /// DenomHash queries a denomination hash information. - pub async fn denom_hash( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/DenomHash", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomHash"), - ); - self.inner.unary(req, path, codec).await - } - /// EscrowAddress returns the escrow address for a particular port and channel id. - pub async fn escrow_address( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/EscrowAddress", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.transfer.v1.Query", - "EscrowAddress", - ), - ); - self.inner.unary(req, path, codec).await - } - /// TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom. - pub async fn total_escrow_for_denom( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.applications.transfer.v1.Query", - "TotalEscrowForDenom", - ), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - /// DenomTraces queries all denomination traces. - async fn denom_traces( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DenomTrace queries a denomination trace information. - async fn denom_trace( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Params queries all parameters of the ibc-transfer module. - async fn params( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// DenomHash queries a denomination hash information. - async fn denom_hash( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// EscrowAddress returns the escrow address for a particular port and channel id. - async fn escrow_address( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom. - async fn total_escrow_for_denom( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - /// Query provides defines the gRPC querier service. - #[derive(Debug)] - pub struct QueryServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl QueryServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for QueryServer - where - T: Query, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/ibc.applications.transfer.v1.Query/DenomTraces" => { + "/ibc.applications.transfer.v1.Query/DenomHash" => { #[allow(non_camel_case_types)] - struct DenomTracesSvc(pub Arc); + struct DenomHashSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for DenomTracesSvc { - type Response = super::QueryDenomTracesResponse; + > tonic::server::UnaryService + for DenomHashSvc { + type Response = super::QueryDenomHashResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denom_traces(&inner, request).await + ::denom_hash(&inner, request).await }; Box::pin(fut) } @@ -1129,7 +863,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomTracesSvc(inner); + let method = DenomHashSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1145,69 +879,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Query/DenomTrace" => { + "/ibc.applications.transfer.v1.Query/EscrowAddress" => { #[allow(non_camel_case_types)] - struct DenomTraceSvc(pub Arc); + struct EscrowAddressSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for DenomTraceSvc { - type Response = super::QueryDenomTraceResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::denom_trace(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = DenomTraceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.applications.transfer.v1.Query/Params" => { - #[allow(non_camel_case_types)] - struct ParamsSvc(pub Arc); - impl tonic::server::UnaryService - for ParamsSvc { - type Response = super::QueryParamsResponse; + > tonic::server::UnaryService + for EscrowAddressSvc { + type Response = super::QueryEscrowAddressResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::params(&inner, request).await + ::escrow_address(&inner, request).await }; Box::pin(fut) } @@ -1219,7 +909,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ParamsSvc(inner); + let method = EscrowAddressSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1235,25 +925,27 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Query/DenomHash" => { + "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom" => { #[allow(non_camel_case_types)] - struct DenomHashSvc(pub Arc); + struct TotalEscrowForDenomSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for DenomHashSvc { - type Response = super::QueryDenomHashResponse; + > tonic::server::UnaryService + for TotalEscrowForDenomSvc { + type Response = super::QueryTotalEscrowForDenomResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryTotalEscrowForDenomRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denom_hash(&inner, request).await + ::total_escrow_for_denom(&inner, request).await }; Box::pin(fut) } @@ -1265,7 +957,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomHashSvc(inner); + let method = TotalEscrowForDenomSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1281,25 +973,403 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Query/EscrowAddress" => { + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.applications.transfer.v1.Query"; + } +} +/// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between +/// ICS20 enabled chains. See ICS Spec here: +/// +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgTransfer { + /// the port on which the packet will be sent + #[prost(string, tag = "1")] + pub source_port: ::prost::alloc::string::String, + /// the channel by which the packet will be sent + #[prost(string, tag = "2")] + pub source_channel: ::prost::alloc::string::String, + /// the tokens to be transferred + #[prost(message, optional, tag = "3")] + pub token: ::core::option::Option< + super::super::super::super::cosmos::base::v1beta1::Coin, + >, + /// the sender address + #[prost(string, tag = "4")] + pub sender: ::prost::alloc::string::String, + /// the recipient address on the destination chain + #[prost(string, tag = "5")] + pub receiver: ::prost::alloc::string::String, + /// Timeout height relative to the current block height. + /// The timeout is disabled when set to 0. + #[prost(message, optional, tag = "6")] + pub timeout_height: ::core::option::Option< + super::super::super::core::client::v1::Height, + >, + /// Timeout timestamp in absolute nanoseconds since unix epoch. + /// The timeout is disabled when set to 0. + #[prost(uint64, tag = "7")] + pub timeout_timestamp: u64, + /// optional memo + #[prost(string, tag = "8")] + pub memo: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgTransfer { + const NAME: &'static str = "MsgTransfer"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// MsgTransferResponse defines the Msg/Transfer response type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgTransferResponse { + /// sequence number of the transfer packet sent + #[prost(uint64, tag = "1")] + pub sequence: u64, +} +impl ::prost::Name for MsgTransferResponse { + const NAME: &'static str = "MsgTransferResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// MsgUpdateParams is the Msg/UpdateParams request type. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the transfer parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; + const PACKAGE: &'static str = "ibc.applications.transfer.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the ibc/transfer Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// Transfer defines a rpc handler method for MsgTransfer. + pub async fn transfer( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Msg/Transfer", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.applications.transfer.v1.Msg", "Transfer")); + self.inner.unary(req, path, codec).await + } + /// UpdateParams defines a rpc handler for MsgUpdateParams. + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.applications.transfer.v1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.applications.transfer.v1.Msg", "UpdateParams"), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// Transfer defines a rpc handler method for MsgTransfer. + async fn transfer( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UpdateParams defines a rpc handler for MsgUpdateParams. + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the ibc/transfer Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.applications.transfer.v1.Msg/Transfer" => { #[allow(non_camel_case_types)] - struct EscrowAddressSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for EscrowAddressSvc { - type Response = super::QueryEscrowAddressResponse; + struct TransferSvc(pub Arc); + impl tonic::server::UnaryService + for TransferSvc { + type Response = super::MsgTransferResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::escrow_address(&inner, request).await + ::transfer(&inner, request).await }; Box::pin(fut) } @@ -1311,7 +1381,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = EscrowAddressSvc(inner); + let method = TransferSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1327,27 +1397,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom" => { + "/ibc.applications.transfer.v1.Msg/UpdateParams" => { #[allow(non_camel_case_types)] - struct TotalEscrowForDenomSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for TotalEscrowForDenomSvc { - type Response = super::QueryTotalEscrowForDenomResponse; + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryTotalEscrowForDenomRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::total_escrow_for_denom(&inner, request).await + ::update_params(&inner, request).await }; Box::pin(fut) } @@ -1359,7 +1425,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TotalEscrowForDenomSvc(inner); + let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1390,7 +1456,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1402,7 +1468,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1412,73 +1478,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.applications.transfer.v1.Query"; - } -} -/// Allocation defines the spend limit for a particular port and channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Allocation { - /// the port on which the packet will be sent - #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// spend limitation on the channel - #[prost(message, repeated, tag = "3")] - pub spend_limit: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, - /// allow list of receivers, an empty allow list permits any receiver address - #[prost(string, repeated, tag = "4")] - pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -impl ::prost::Name for Allocation { - const NAME: &'static str = "Allocation"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// TransferAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account for ibc transfer on a specific channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TransferAuthorization { - /// port and channel amounts - #[prost(message, repeated, tag = "1")] - pub allocations: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for TransferAuthorization { - const NAME: &'static str = "TransferAuthorization"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) - } -} -/// GenesisState defines the ibc-transfer genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub denom_traces: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, - /// total_escrowed contains the total amount of tokens escrowed - /// by the transfer module - #[prost(message, repeated, tag = "4")] - pub total_escrowed: ::prost::alloc::vec::Vec< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "ibc.applications.transfer.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.applications.transfer.v1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.applications.transfer.v1.Msg"; } } diff --git a/src/prost/ibc.core.channel.v1.rs b/src/prost/ibc.core.channel.v1.rs index b354e656..7f27ee78 100644 --- a/src/prost/ibc.core.channel.v1.rs +++ b/src/prost/ibc.core.channel.v1.rs @@ -356,417 +356,637 @@ impl ::prost::Name for PacketSequence { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -/// is called by a relayer on Chain A. +/// QueryChannelRequest is the request type for the Query/Channel RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenInit { +pub struct QueryChannelRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for MsgChannelOpenInit { - const NAME: &'static str = "MsgChannelOpenInit"; +impl ::prost::Name for QueryChannelRequest { + const NAME: &'static str = "QueryChannelRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. +/// QueryChannelResponse is the response type for the Query/Channel RPC method. +/// Besides the Channel end, it includes a proof and the height from which the +/// proof was retrieved. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenInitResponse { - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, +pub struct QueryChannelResponse { + /// channel associated with the request identifiers + #[prost(message, optional, tag = "1")] + pub channel: ::core::option::Option, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for MsgChannelOpenInitResponse { - const NAME: &'static str = "MsgChannelOpenInitResponse"; +impl ::prost::Name for QueryChannelResponse { + const NAME: &'static str = "QueryChannelResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -/// on Chain B. The version field within the Channel field has been deprecated. Its -/// value will be ignored by core IBC. +/// QueryChannelsRequest is the request type for the Query/Channels RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenTry { - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. - #[deprecated] - #[prost(string, tag = "2")] - pub previous_channel_id: ::prost::alloc::string::String, - /// NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. - #[prost(message, optional, tag = "3")] - pub channel: ::core::option::Option, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, +pub struct QueryChannelsRequest { + /// pagination request + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgChannelOpenTry { - const NAME: &'static str = "MsgChannelOpenTry"; +impl ::prost::Name for QueryChannelsRequest { + const NAME: &'static str = "QueryChannelsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. +/// QueryChannelsResponse is the response type for the Query/Channels RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenTryResponse { - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, +pub struct QueryChannelsResponse { + /// list of stored channels of the chain. + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] + pub height: ::core::option::Option, } -impl ::prost::Name for MsgChannelOpenTryResponse { - const NAME: &'static str = "MsgChannelOpenTryResponse"; +impl ::prost::Name for QueryChannelsResponse { + const NAME: &'static str = "QueryChannelsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -/// the change of channel state to TRYOPEN on Chain B. +/// QueryConnectionChannelsRequest is the request type for the +/// Query/QueryConnectionChannels RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenAck { +pub struct QueryConnectionChannelsRequest { + /// connection unique identifier #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub counterparty_channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - pub proof_try: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, + pub connection: ::prost::alloc::string::String, + /// pagination request + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgChannelOpenAck { - const NAME: &'static str = "MsgChannelOpenAck"; +impl ::prost::Name for QueryConnectionChannelsRequest { + const NAME: &'static str = "QueryConnectionChannelsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. +/// QueryConnectionChannelsResponse is the Response type for the +/// Query/QueryConnectionChannels RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenAckResponse {} -impl ::prost::Name for MsgChannelOpenAckResponse { - const NAME: &'static str = "MsgChannelOpenAckResponse"; +pub struct QueryConnectionChannelsResponse { + /// list of channels associated with a connection. + #[prost(message, repeated, tag = "1")] + pub channels: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] + pub height: ::core::option::Option, +} +impl ::prost::Name for QueryConnectionChannelsResponse { + const NAME: &'static str = "QueryConnectionChannelsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of channel state to OPEN on Chain A. +/// QueryChannelClientStateRequest is the request type for the Query/ClientState +/// RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenConfirm { +pub struct QueryChannelClientStateRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgChannelOpenConfirm { - const NAME: &'static str = "MsgChannelOpenConfirm"; +impl ::prost::Name for QueryChannelClientStateRequest { + const NAME: &'static str = "QueryChannelClientStateRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -/// type. +/// QueryChannelClientStateResponse is the Response type for the +/// Query/QueryChannelClientState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelOpenConfirmResponse {} -impl ::prost::Name for MsgChannelOpenConfirmResponse { - const NAME: &'static str = "MsgChannelOpenConfirmResponse"; +pub struct QueryChannelClientStateResponse { + /// client state associated with the channel + #[prost(message, optional, tag = "1")] + pub identified_client_state: ::core::option::Option< + super::super::client::v1::IdentifiedClientState, + >, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryChannelClientStateResponse { + const NAME: &'static str = "QueryChannelClientStateResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -/// to close a channel with Chain B. +/// QueryChannelConsensusStateRequest is the request type for the +/// Query/ConsensusState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseInit { +pub struct QueryChannelConsensusStateRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + /// revision number of the consensus state + #[prost(uint64, tag = "3")] + pub revision_number: u64, + /// revision height of the consensus state + #[prost(uint64, tag = "4")] + pub revision_height: u64, } -impl ::prost::Name for MsgChannelCloseInit { - const NAME: &'static str = "MsgChannelCloseInit"; +impl ::prost::Name for QueryChannelConsensusStateRequest { + const NAME: &'static str = "QueryChannelConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. +/// QueryChannelClientStateResponse is the Response type for the +/// Query/QueryChannelClientState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseInitResponse {} -impl ::prost::Name for MsgChannelCloseInitResponse { - const NAME: &'static str = "MsgChannelCloseInitResponse"; +pub struct QueryChannelConsensusStateResponse { + /// consensus state associated with the channel + #[prost(message, optional, tag = "1")] + pub consensus_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + /// client ID associated with the consensus state + #[prost(string, tag = "2")] + pub client_id: ::prost::alloc::string::String, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "3")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryChannelConsensusStateResponse { + const NAME: &'static str = "QueryChannelConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -/// to acknowledge the change of channel state to CLOSED on Chain A. +/// QueryPacketCommitmentRequest is the request type for the +/// Query/PacketCommitment RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseConfirm { +pub struct QueryPacketCommitmentRequest { + /// port unique identifier #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, + /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, + /// packet sequence + #[prost(uint64, tag = "3")] + pub sequence: u64, } -impl ::prost::Name for MsgChannelCloseConfirm { - const NAME: &'static str = "MsgChannelCloseConfirm"; +impl ::prost::Name for QueryPacketCommitmentRequest { + const NAME: &'static str = "QueryPacketCommitmentRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -/// type. +/// QueryPacketCommitmentResponse defines the client query response for a packet +/// which also includes a proof and the height from which the proof was +/// retrieved #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgChannelCloseConfirmResponse {} -impl ::prost::Name for MsgChannelCloseConfirmResponse { - const NAME: &'static str = "MsgChannelCloseConfirmResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// MsgRecvPacket receives incoming IBC packet -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecvPacket { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, +pub struct QueryPacketCommitmentResponse { + /// packet associated with the request fields + #[prost(bytes = "vec", tag = "1")] + pub commitment: ::prost::alloc::vec::Vec, + /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] - pub proof_commitment: ::prost::alloc::vec::Vec, + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgRecvPacket { - const NAME: &'static str = "MsgRecvPacket"; +impl ::prost::Name for QueryPacketCommitmentResponse { + const NAME: &'static str = "QueryPacketCommitmentResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgRecvPacketResponse defines the Msg/RecvPacket response type. +/// QueryPacketCommitmentsRequest is the request type for the +/// Query/QueryPacketCommitments RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecvPacketResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryPacketCommitmentsRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// pagination request + #[prost(message, optional, tag = "3")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgRecvPacketResponse { - const NAME: &'static str = "MsgRecvPacketResponse"; +impl ::prost::Name for QueryPacketCommitmentsRequest { + const NAME: &'static str = "QueryPacketCommitmentsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeout receives timed-out packet +/// QueryPacketCommitmentsResponse is the request type for the +/// Query/QueryPacketCommitments RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeout { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_unreceived: ::prost::alloc::vec::Vec, +pub struct QueryPacketCommitmentsResponse { + #[prost(message, repeated, tag = "1")] + pub commitments: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "4")] - pub next_sequence_recv: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, + pub height: ::core::option::Option, } -impl ::prost::Name for MsgTimeout { - const NAME: &'static str = "MsgTimeout"; +impl ::prost::Name for QueryPacketCommitmentsResponse { + const NAME: &'static str = "QueryPacketCommitmentsResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeoutResponse defines the Msg/Timeout response type. +/// QueryPacketReceiptRequest is the request type for the +/// Query/PacketReceipt RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryPacketReceiptRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// packet sequence + #[prost(uint64, tag = "3")] + pub sequence: u64, } -impl ::prost::Name for MsgTimeoutResponse { - const NAME: &'static str = "MsgTimeoutResponse"; +impl ::prost::Name for QueryPacketReceiptRequest { + const NAME: &'static str = "QueryPacketReceiptRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. +/// QueryPacketReceiptResponse defines the client query response for a packet +/// receipt which also includes a proof, and the height from which the proof was +/// retrieved #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutOnClose { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - pub proof_unreceived: ::prost::alloc::vec::Vec, +pub struct QueryPacketReceiptResponse { + /// success flag for if receipt exists + #[prost(bool, tag = "2")] + pub received: bool, + /// merkle proof of existence #[prost(bytes = "vec", tag = "3")] - pub proof_close: ::prost::alloc::vec::Vec, + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved #[prost(message, optional, tag = "4")] pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub next_sequence_recv: u64, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgTimeoutOnClose { - const NAME: &'static str = "MsgTimeoutOnClose"; +impl ::prost::Name for QueryPacketReceiptResponse { + const NAME: &'static str = "QueryPacketReceiptResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. +/// QueryPacketAcknowledgementRequest is the request type for the +/// Query/PacketAcknowledgement RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgTimeoutOnCloseResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryPacketAcknowledgementRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// packet sequence + #[prost(uint64, tag = "3")] + pub sequence: u64, } -impl ::prost::Name for MsgTimeoutOnCloseResponse { - const NAME: &'static str = "MsgTimeoutOnCloseResponse"; +impl ::prost::Name for QueryPacketAcknowledgementRequest { + const NAME: &'static str = "QueryPacketAcknowledgementRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgAcknowledgement receives incoming IBC acknowledgement +/// QueryPacketAcknowledgementResponse defines the client query response for a +/// packet which also includes a proof and the height from which the +/// proof was retrieved #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAcknowledgement { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] +pub struct QueryPacketAcknowledgementResponse { + /// packet associated with the request fields + #[prost(bytes = "vec", tag = "1")] pub acknowledgement: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub proof_acked: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgAcknowledgement { - const NAME: &'static str = "MsgAcknowledgement"; +impl ::prost::Name for QueryPacketAcknowledgementResponse { + const NAME: &'static str = "QueryPacketAcknowledgementResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. +/// QueryPacketAcknowledgementsRequest is the request type for the +/// Query/QueryPacketCommitments RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAcknowledgementResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - pub result: i32, +pub struct QueryPacketAcknowledgementsRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// pagination request + #[prost(message, optional, tag = "3")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, + /// list of packet sequences + #[prost(uint64, repeated, tag = "4")] + pub packet_commitment_sequences: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgAcknowledgementResponse { - const NAME: &'static str = "MsgAcknowledgementResponse"; +impl ::prost::Name for QueryPacketAcknowledgementsRequest { + const NAME: &'static str = "QueryPacketAcknowledgementsRequest"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// ResponseResultType defines the possible outcomes of the execution of a message -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum ResponseResultType { - /// Default zero value enumeration - Unspecified = 0, - /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - Noop = 1, - /// The message was executed successfully - Success = 2, +/// QueryPacketAcknowledgemetsResponse is the request type for the +/// Query/QueryPacketAcknowledgements RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryPacketAcknowledgementsResponse { + #[prost(message, repeated, tag = "1")] + pub acknowledgements: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] + pub height: ::core::option::Option, } -impl ResponseResultType { - /// 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 { - ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", - ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", - ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), - "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), - _ => None, - } +impl ::prost::Name for QueryPacketAcknowledgementsResponse { + const NAME: &'static str = "QueryPacketAcknowledgementsResponse"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the ibc/channel Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, - } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result +/// QueryUnreceivedPacketsRequest is the request type for the +/// Query/UnreceivedPackets RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUnreceivedPacketsRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// list of packet sequences + #[prost(uint64, repeated, tag = "3")] + pub packet_commitment_sequences: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryUnreceivedPacketsRequest { + const NAME: &'static str = "QueryUnreceivedPacketsRequest"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QueryUnreceivedPacketsResponse is the response type for the +/// Query/UnreceivedPacketCommitments RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUnreceivedPacketsResponse { + /// list of unreceived packet sequences + #[prost(uint64, repeated, tag = "1")] + pub sequences: ::prost::alloc::vec::Vec, + /// query block height + #[prost(message, optional, tag = "2")] + pub height: ::core::option::Option, +} +impl ::prost::Name for QueryUnreceivedPacketsResponse { + const NAME: &'static str = "QueryUnreceivedPacketsResponse"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QueryUnreceivedAcks is the request type for the +/// Query/UnreceivedAcks RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUnreceivedAcksRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// list of acknowledgement sequences + #[prost(uint64, repeated, tag = "3")] + pub packet_ack_sequences: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryUnreceivedAcksRequest { + const NAME: &'static str = "QueryUnreceivedAcksRequest"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QueryUnreceivedAcksResponse is the response type for the +/// Query/UnreceivedAcks RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUnreceivedAcksResponse { + /// list of unreceived acknowledgement sequences + #[prost(uint64, repeated, tag = "1")] + pub sequences: ::prost::alloc::vec::Vec, + /// query block height + #[prost(message, optional, tag = "2")] + pub height: ::core::option::Option, +} +impl ::prost::Name for QueryUnreceivedAcksResponse { + const NAME: &'static str = "QueryUnreceivedAcksResponse"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QueryNextSequenceReceiveRequest is the request type for the +/// Query/QueryNextSequenceReceiveRequest RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryNextSequenceReceiveRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryNextSequenceReceiveRequest { + const NAME: &'static str = "QueryNextSequenceReceiveRequest"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QuerySequenceResponse is the request type for the +/// Query/QueryNextSequenceReceiveResponse RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryNextSequenceReceiveResponse { + /// next sequence receive number + #[prost(uint64, tag = "1")] + pub next_sequence_receive: u64, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryNextSequenceReceiveResponse { + const NAME: &'static str = "QueryNextSequenceReceiveResponse"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QueryNextSequenceSendRequest is the request type for the +/// Query/QueryNextSequenceSend RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryNextSequenceSendRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryNextSequenceSendRequest { + const NAME: &'static str = "QueryNextSequenceSendRequest"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// QueryNextSequenceSendResponse is the request type for the +/// Query/QueryNextSequenceSend RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryNextSequenceSendResponse { + /// next sequence send number + #[prost(uint64, tag = "1")] + pub next_sequence_send: u64, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryNextSequenceSendResponse { + const NAME: &'static str = "QueryNextSequenceSendResponse"; + const PACKAGE: &'static str = "ibc.core.channel.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Query provides defines the gRPC querier service + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result where D: TryInto, D::Error: Into, @@ -775,7 +995,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -793,7 +1013,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -807,7 +1027,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -840,12 +1060,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - pub async fn channel_open_init( + /// Channel queries an IBC Channel. + pub async fn channel( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -859,19 +1079,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelOpenInit", + "/ibc.core.channel.v1.Query/Channel", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenInit")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channel")); self.inner.unary(req, path, codec).await } - /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - pub async fn channel_open_try( + /// Channels queries all the IBC channels of a chain. + pub async fn channels( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -885,19 +1105,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelOpenTry", + "/ibc.core.channel.v1.Query/Channels", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenTry")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channels")); self.inner.unary(req, path, codec).await } - /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - pub async fn channel_open_ack( + /// ConnectionChannels queries all the channels associated with a connection + /// end. + pub async fn connection_channels( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -911,19 +1132,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelOpenAck", + "/ibc.core.channel.v1.Query/ConnectionChannels", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenAck")); + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "ConnectionChannels"), + ); self.inner.unary(req, path, codec).await } - /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - pub async fn channel_open_confirm( + /// ChannelClientState queries for the client state for the channel associated + /// with the provided channel identifiers. + pub async fn channel_client_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -937,21 +1161,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelOpenConfirm", + "/ibc.core.channel.v1.Query/ChannelClientState", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenConfirm"), + GrpcMethod::new("ibc.core.channel.v1.Query", "ChannelClientState"), ); self.inner.unary(req, path, codec).await } - /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - pub async fn channel_close_init( + /// ChannelConsensusState queries for the consensus state for the channel + /// associated with the provided channel identifiers. + pub async fn channel_consensus_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -965,20 +1190,21 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelCloseInit", + "/ibc.core.channel.v1.Query/ChannelConsensusState", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelCloseInit")); + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "ChannelConsensusState"), + ); self.inner.unary(req, path, codec).await } - /// ChannelCloseConfirm defines a rpc handler method for - /// MsgChannelCloseConfirm. - pub async fn channel_close_confirm( + /// PacketCommitment queries a stored packet commitment hash. + pub async fn packet_commitment( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -992,21 +1218,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/ChannelCloseConfirm", + "/ibc.core.channel.v1.Query/PacketCommitment", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelCloseConfirm"), + GrpcMethod::new("ibc.core.channel.v1.Query", "PacketCommitment"), ); self.inner.unary(req, path, codec).await } - /// RecvPacket defines a rpc handler method for MsgRecvPacket. - pub async fn recv_packet( + /// PacketCommitments returns all the packet commitments hashes associated + /// with a channel. + pub async fn packet_commitments( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1020,19 +1247,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/RecvPacket", + "/ibc.core.channel.v1.Query/PacketCommitments", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "RecvPacket")); + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "PacketCommitments"), + ); self.inner.unary(req, path, codec).await } - /// Timeout defines a rpc handler method for MsgTimeout. - pub async fn timeout( + /// PacketReceipt queries if a given packet sequence has been received on the + /// queried chain + pub async fn packet_receipt( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1046,19 +1276,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/Timeout", + "/ibc.core.channel.v1.Query/PacketReceipt", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Timeout")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "PacketReceipt")); self.inner.unary(req, path, codec).await } - /// TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. - pub async fn timeout_on_close( + /// PacketAcknowledgement queries a stored packet acknowledgement hash. + pub async fn packet_acknowledgement( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1072,19 +1302,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/TimeoutOnClose", + "/ibc.core.channel.v1.Query/PacketAcknowledgement", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "TimeoutOnClose")); + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "PacketAcknowledgement"), + ); self.inner.unary(req, path, codec).await } - /// Acknowledgement defines a rpc handler method for MsgAcknowledgement. - pub async fn acknowledgement( + /// PacketAcknowledgements returns all the packet acknowledgements associated + /// with a channel. + pub async fn packet_acknowledgements( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1098,108 +1331,264 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Msg/Acknowledgement", + "/ibc.core.channel.v1.Query/PacketAcknowledgements", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Acknowledgement")); + .insert( + GrpcMethod::new( + "ibc.core.channel.v1.Query", + "PacketAcknowledgements", + ), + ); + self.inner.unary(req, path, codec).await + } + /// UnreceivedPackets returns all the unreceived IBC packets associated with a + /// channel and sequences. + pub async fn unreceived_packets( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/UnreceivedPackets", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "UnreceivedPackets"), + ); + self.inner.unary(req, path, codec).await + } + /// UnreceivedAcks returns all the unreceived IBC acknowledgements associated + /// with a channel and sequences. + pub async fn unreceived_acks( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/UnreceivedAcks", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "UnreceivedAcks")); + self.inner.unary(req, path, codec).await + } + /// NextSequenceReceive returns the next receive sequence for a given channel. + pub async fn next_sequence_receive( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/NextSequenceReceive", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceReceive"), + ); + self.inner.unary(req, path, codec).await + } + /// NextSequenceSend returns the next send sequence for a given channel. + pub async fn next_sequence_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.channel.v1.Query/NextSequenceSend", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceSend"), + ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - async fn channel_open_init( + pub trait Query: Send + Sync + 'static { + /// Channel queries an IBC Channel. + async fn channel( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - async fn channel_open_try( + /// Channels queries all the IBC channels of a chain. + async fn channels( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - async fn channel_open_ack( + /// ConnectionChannels queries all the channels associated with a connection + /// end. + async fn connection_channels( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - async fn channel_open_confirm( + /// ChannelClientState queries for the client state for the channel associated + /// with the provided channel identifiers. + async fn channel_client_state( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - async fn channel_close_init( + /// ChannelConsensusState queries for the consensus state for the channel + /// associated with the provided channel identifiers. + async fn channel_consensus_state( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ChannelCloseConfirm defines a rpc handler method for - /// MsgChannelCloseConfirm. - async fn channel_close_confirm( + /// PacketCommitment queries a stored packet commitment hash. + async fn packet_commitment( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// RecvPacket defines a rpc handler method for MsgRecvPacket. - async fn recv_packet( + /// PacketCommitments returns all the packet commitments hashes associated + /// with a channel. + async fn packet_commitments( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Timeout defines a rpc handler method for MsgTimeout. - async fn timeout( + /// PacketReceipt queries if a given packet sequence has been received on the + /// queried chain + async fn packet_receipt( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. - async fn timeout_on_close( + /// PacketAcknowledgement queries a stored packet acknowledgement hash. + async fn packet_acknowledgement( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Acknowledgement defines a rpc handler method for MsgAcknowledgement. - async fn acknowledgement( + /// PacketAcknowledgements returns all the packet acknowledgements associated + /// with a channel. + async fn packet_acknowledgements( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// UnreceivedPackets returns all the unreceived IBC packets associated with a + /// channel and sequences. + async fn unreceived_packets( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UnreceivedAcks returns all the unreceived IBC acknowledgements associated + /// with a channel and sequences. + async fn unreceived_acks( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// NextSequenceReceive returns the next receive sequence for a given channel. + async fn next_sequence_receive( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// NextSequenceSend returns the next send sequence for a given channel. + async fn next_sequence_send( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the ibc/channel Msg service. + /// Query provides defines the gRPC querier service #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -1207,7 +1596,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1259,9 +1648,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -1277,23 +1666,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.core.channel.v1.Msg/ChannelOpenInit" => { + "/ibc.core.channel.v1.Query/Channel" => { #[allow(non_camel_case_types)] - struct ChannelOpenInitSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelOpenInitSvc { - type Response = super::MsgChannelOpenInitResponse; + struct ChannelSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ChannelSvc { + type Response = super::QueryChannelResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_open_init(&inner, request).await + ::channel(&inner, request).await }; Box::pin(fut) } @@ -1305,7 +1696,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelOpenInitSvc(inner); + let method = ChannelSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1321,23 +1712,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelOpenTry" => { + "/ibc.core.channel.v1.Query/Channels" => { #[allow(non_camel_case_types)] - struct ChannelOpenTrySvc(pub Arc); - impl tonic::server::UnaryService - for ChannelOpenTrySvc { - type Response = super::MsgChannelOpenTryResponse; + struct ChannelsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ChannelsSvc { + type Response = super::QueryChannelsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_open_try(&inner, request).await + ::channels(&inner, request).await }; Box::pin(fut) } @@ -1349,7 +1742,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelOpenTrySvc(inner); + let method = ChannelsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1365,23 +1758,27 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelOpenAck" => { + "/ibc.core.channel.v1.Query/ConnectionChannels" => { #[allow(non_camel_case_types)] - struct ChannelOpenAckSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelOpenAckSvc { - type Response = super::MsgChannelOpenAckResponse; + struct ConnectionChannelsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ConnectionChannelsSvc { + type Response = super::QueryConnectionChannelsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryConnectionChannelsRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_open_ack(&inner, request).await + ::connection_channels(&inner, request).await }; Box::pin(fut) } @@ -1393,7 +1790,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelOpenAckSvc(inner); + let method = ConnectionChannelsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1409,25 +1806,27 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelOpenConfirm" => { + "/ibc.core.channel.v1.Query/ChannelClientState" => { #[allow(non_camel_case_types)] - struct ChannelOpenConfirmSvc(pub Arc); + struct ChannelClientStateSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for ChannelOpenConfirmSvc { - type Response = super::MsgChannelOpenConfirmResponse; + T: Query, + > tonic::server::UnaryService + for ChannelClientStateSvc { + type Response = super::QueryChannelClientStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryChannelClientStateRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_open_confirm(&inner, request).await + ::channel_client_state(&inner, request).await }; Box::pin(fut) } @@ -1439,7 +1838,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelOpenConfirmSvc(inner); + let method = ChannelClientStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1455,23 +1854,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelCloseInit" => { + "/ibc.core.channel.v1.Query/ChannelConsensusState" => { #[allow(non_camel_case_types)] - struct ChannelCloseInitSvc(pub Arc); - impl tonic::server::UnaryService - for ChannelCloseInitSvc { - type Response = super::MsgChannelCloseInitResponse; + struct ChannelConsensusStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryChannelConsensusStateRequest, + > for ChannelConsensusStateSvc { + type Response = super::QueryChannelConsensusStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryChannelConsensusStateRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_close_init(&inner, request).await + ::channel_consensus_state(&inner, request).await }; Box::pin(fut) } @@ -1483,7 +1887,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelCloseInitSvc(inner); + let method = ChannelConsensusStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1499,25 +1903,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/ChannelCloseConfirm" => { + "/ibc.core.channel.v1.Query/PacketCommitment" => { #[allow(non_camel_case_types)] - struct ChannelCloseConfirmSvc(pub Arc); + struct PacketCommitmentSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for ChannelCloseConfirmSvc { - type Response = super::MsgChannelCloseConfirmResponse; + T: Query, + > tonic::server::UnaryService + for PacketCommitmentSvc { + type Response = super::QueryPacketCommitmentResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_close_confirm(&inner, request).await + ::packet_commitment(&inner, request).await }; Box::pin(fut) } @@ -1529,7 +1933,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelCloseConfirmSvc(inner); + let method = PacketCommitmentSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1545,23 +1949,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/RecvPacket" => { + "/ibc.core.channel.v1.Query/PacketCommitments" => { #[allow(non_camel_case_types)] - struct RecvPacketSvc(pub Arc); - impl tonic::server::UnaryService - for RecvPacketSvc { - type Response = super::MsgRecvPacketResponse; + struct PacketCommitmentsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for PacketCommitmentsSvc { + type Response = super::QueryPacketCommitmentsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::recv_packet(&inner, request).await + ::packet_commitments(&inner, request).await }; Box::pin(fut) } @@ -1573,7 +1979,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = RecvPacketSvc(inner); + let method = PacketCommitmentsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1589,23 +1995,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/Timeout" => { + "/ibc.core.channel.v1.Query/PacketReceipt" => { #[allow(non_camel_case_types)] - struct TimeoutSvc(pub Arc); - impl tonic::server::UnaryService - for TimeoutSvc { - type Response = super::MsgTimeoutResponse; + struct PacketReceiptSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for PacketReceiptSvc { + type Response = super::QueryPacketReceiptResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::timeout(&inner, request).await + ::packet_receipt(&inner, request).await }; Box::pin(fut) } @@ -1617,7 +2025,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TimeoutSvc(inner); + let method = PacketReceiptSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1633,23 +2041,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/TimeoutOnClose" => { + "/ibc.core.channel.v1.Query/PacketAcknowledgement" => { #[allow(non_camel_case_types)] - struct TimeoutOnCloseSvc(pub Arc); - impl tonic::server::UnaryService - for TimeoutOnCloseSvc { - type Response = super::MsgTimeoutOnCloseResponse; + struct PacketAcknowledgementSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryPacketAcknowledgementRequest, + > for PacketAcknowledgementSvc { + type Response = super::QueryPacketAcknowledgementResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryPacketAcknowledgementRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::timeout_on_close(&inner, request).await + ::packet_acknowledgement(&inner, request).await }; Box::pin(fut) } @@ -1661,7 +2074,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = TimeoutOnCloseSvc(inner); + let method = PacketAcknowledgementSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1677,23 +2090,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Msg/Acknowledgement" => { + "/ibc.core.channel.v1.Query/PacketAcknowledgements" => { #[allow(non_camel_case_types)] - struct AcknowledgementSvc(pub Arc); - impl tonic::server::UnaryService - for AcknowledgementSvc { - type Response = super::MsgAcknowledgementResponse; + struct PacketAcknowledgementsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryPacketAcknowledgementsRequest, + > for PacketAcknowledgementsSvc { + type Response = super::QueryPacketAcknowledgementsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryPacketAcknowledgementsRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::acknowledgement(&inner, request).await + ::packet_acknowledgements(&inner, request).await }; Box::pin(fut) } @@ -1705,7 +2123,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = AcknowledgementSvc(inner); + let method = PacketAcknowledgementsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1721,8 +2139,194 @@ pub mod msg_server { }; Box::pin(fut) } - _ => { - Box::pin(async move { + "/ibc.core.channel.v1.Query/UnreceivedPackets" => { + #[allow(non_camel_case_types)] + struct UnreceivedPacketsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for UnreceivedPacketsSvc { + type Response = super::QueryUnreceivedPacketsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::unreceived_packets(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UnreceivedPacketsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.channel.v1.Query/UnreceivedAcks" => { + #[allow(non_camel_case_types)] + struct UnreceivedAcksSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for UnreceivedAcksSvc { + type Response = super::QueryUnreceivedAcksResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::unreceived_acks(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UnreceivedAcksSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.channel.v1.Query/NextSequenceReceive" => { + #[allow(non_camel_case_types)] + struct NextSequenceReceiveSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for NextSequenceReceiveSvc { + type Response = super::QueryNextSequenceReceiveResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryNextSequenceReceiveRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::next_sequence_receive(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = NextSequenceReceiveSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.channel.v1.Query/NextSequenceSend" => { + #[allow(non_camel_case_types)] + struct NextSequenceSendSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for NextSequenceSendSvc { + type Response = super::QueryNextSequenceSendResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::next_sequence_send(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = NextSequenceSendSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { Ok( http::Response::builder() .status(200) @@ -1736,7 +2340,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1748,7 +2352,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1758,639 +2362,419 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.core.channel.v1.Msg"; + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.core.channel.v1.Query"; } } -/// QueryChannelRequest is the request type for the Query/Channel RPC method +/// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It +/// is called by a relayer on Chain A. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelRequest { - /// port unique identifier +pub struct MsgChannelOpenInit { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryChannelRequest { - const NAME: &'static str = "QueryChannelRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryChannelResponse is the response type for the Query/Channel RPC method. -/// Besides the Channel end, it includes a proof and the height from which the -/// proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelResponse { - /// channel associated with the request identifiers - #[prost(message, optional, tag = "1")] + #[prost(message, optional, tag = "2")] pub channel: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelResponse { - const NAME: &'static str = "QueryChannelResponse"; +impl ::prost::Name for MsgChannelOpenInit { + const NAME: &'static str = "MsgChannelOpenInit"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelsRequest is the request type for the Query/Channels RPC method +/// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelsRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, +pub struct MsgChannelOpenInitResponse { + #[prost(string, tag = "1")] + pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub version: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelsRequest { - const NAME: &'static str = "QueryChannelsRequest"; +impl ::prost::Name for MsgChannelOpenInitResponse { + const NAME: &'static str = "MsgChannelOpenInitResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelsResponse is the response type for the Query/Channels RPC method. +/// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel +/// on Chain B. The version field within the Channel field has been deprecated. Its +/// value will be ignored by core IBC. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelsResponse { - /// list of stored channels of the chain. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height +pub struct MsgChannelOpenTry { + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. + #[deprecated] + #[prost(string, tag = "2")] + pub previous_channel_id: ::prost::alloc::string::String, + /// NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, + pub channel: ::core::option::Option, + #[prost(string, tag = "4")] + pub counterparty_version: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "5")] + pub proof_init: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "7")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelsResponse { - const NAME: &'static str = "QueryChannelsResponse"; +impl ::prost::Name for MsgChannelOpenTry { + const NAME: &'static str = "MsgChannelOpenTry"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryConnectionChannelsRequest is the request type for the -/// Query/QueryConnectionChannels RPC method +/// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionChannelsRequest { - /// connection unique identifier +pub struct MsgChannelOpenTryResponse { #[prost(string, tag = "1")] - pub connection: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryConnectionChannelsRequest { - const NAME: &'static str = "QueryConnectionChannelsRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryConnectionChannelsResponse is the Response type for the -/// Query/QueryConnectionChannels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionChannelsResponse { - /// list of channels associated with a connection. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, + pub version: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConnectionChannelsResponse { - const NAME: &'static str = "QueryConnectionChannelsResponse"; +impl ::prost::Name for MsgChannelOpenTryResponse { + const NAME: &'static str = "MsgChannelOpenTryResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelClientStateRequest is the request type for the Query/ClientState -/// RPC method +/// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge +/// the change of channel state to TRYOPEN on Chain B. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelClientStateRequest { - /// port unique identifier +pub struct MsgChannelOpenAck { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub counterparty_channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "4")] + pub counterparty_version: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "5")] + pub proof_try: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "6")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "7")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelClientStateRequest { - const NAME: &'static str = "QueryChannelClientStateRequest"; +impl ::prost::Name for MsgChannelOpenAck { + const NAME: &'static str = "MsgChannelOpenAck"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method +/// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: ::core::option::Option< - super::super::client::v1::IdentifiedClientState, - >, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryChannelClientStateResponse { - const NAME: &'static str = "QueryChannelClientStateResponse"; +pub struct MsgChannelOpenAckResponse {} +impl ::prost::Name for MsgChannelOpenAckResponse { + const NAME: &'static str = "MsgChannelOpenAckResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelConsensusStateRequest is the request type for the -/// Query/ConsensusState RPC method +/// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to +/// acknowledge the change of channel state to OPEN on Chain A. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelConsensusStateRequest { - /// port unique identifier +pub struct MsgChannelOpenConfirm { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// revision number of the consensus state - #[prost(uint64, tag = "3")] - pub revision_number: u64, - /// revision height of the consensus state - #[prost(uint64, tag = "4")] - pub revision_height: u64, + #[prost(bytes = "vec", tag = "3")] + pub proof_ack: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryChannelConsensusStateRequest { - const NAME: &'static str = "QueryChannelConsensusStateRequest"; +impl ::prost::Name for MsgChannelOpenConfirm { + const NAME: &'static str = "MsgChannelOpenConfirm"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method +/// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response +/// type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChannelConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryChannelConsensusStateResponse { - const NAME: &'static str = "QueryChannelConsensusStateResponse"; +pub struct MsgChannelOpenConfirmResponse {} +impl ::prost::Name for MsgChannelOpenConfirmResponse { + const NAME: &'static str = "MsgChannelOpenConfirmResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentRequest is the request type for the -/// Query/PacketCommitment RPC method +/// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A +/// to close a channel with Chain B. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentRequest { - /// port unique identifier +pub struct MsgChannelCloseInit { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketCommitmentRequest { - const NAME: &'static str = "QueryPacketCommitmentRequest"; +impl ::prost::Name for MsgChannelCloseInit { + const NAME: &'static str = "MsgChannelCloseInit"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentResponse defines the client query response for a packet -/// which also includes a proof and the height from which the proof was -/// retrieved +/// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - pub commitment: ::prost::alloc::vec::Vec, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryPacketCommitmentResponse { - const NAME: &'static str = "QueryPacketCommitmentResponse"; +pub struct MsgChannelCloseInitResponse {} +impl ::prost::Name for MsgChannelCloseInitResponse { + const NAME: &'static str = "MsgChannelCloseInitResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method +/// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B +/// to acknowledge the change of channel state to CLOSED on Chain A. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentsRequest { - /// port unique identifier +pub struct MsgChannelCloseConfirm { #[prost(string, tag = "1")] pub port_id: ::prost::alloc::string::String, - /// channel unique identifier #[prost(string, tag = "2")] pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, + #[prost(bytes = "vec", tag = "3")] + pub proof_init: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketCommitmentsRequest { - const NAME: &'static str = "QueryPacketCommitmentsRequest"; +impl ::prost::Name for MsgChannelCloseConfirm { + const NAME: &'static str = "MsgChannelCloseConfirm"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketCommitmentsResponse is the request type for the -/// Query/QueryPacketCommitments RPC method +/// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response +/// type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketCommitmentsResponse { - #[prost(message, repeated, tag = "1")] - pub commitments: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -impl ::prost::Name for QueryPacketCommitmentsResponse { - const NAME: &'static str = "QueryPacketCommitmentsResponse"; +pub struct MsgChannelCloseConfirmResponse {} +impl ::prost::Name for MsgChannelCloseConfirmResponse { + const NAME: &'static str = "MsgChannelCloseConfirmResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketReceiptRequest is the request type for the -/// Query/PacketReceipt RPC method +/// MsgRecvPacket receives incoming IBC packet #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketReceiptRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, -} -impl ::prost::Name for QueryPacketReceiptRequest { - const NAME: &'static str = "QueryPacketReceiptRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryPacketReceiptResponse defines the client query response for a packet -/// receipt which also includes a proof, and the height from which the proof was -/// retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketReceiptResponse { - /// success flag for if receipt exists - #[prost(bool, tag = "2")] - pub received: bool, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] +pub struct MsgRecvPacket { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub proof_commitment: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, + #[prost(string, tag = "4")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketReceiptResponse { - const NAME: &'static str = "QueryPacketReceiptResponse"; +impl ::prost::Name for MsgRecvPacket { + const NAME: &'static str = "MsgRecvPacket"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgementRequest is the request type for the -/// Query/PacketAcknowledgement RPC method +/// MsgRecvPacketResponse defines the Msg/RecvPacket response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - pub sequence: u64, +pub struct MsgRecvPacketResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryPacketAcknowledgementRequest { - const NAME: &'static str = "QueryPacketAcknowledgementRequest"; +impl ::prost::Name for MsgRecvPacketResponse { + const NAME: &'static str = "MsgRecvPacketResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgementResponse defines the client query response for a -/// packet which also includes a proof and the height from which the -/// proof was retrieved +/// MsgTimeout receives timed-out packet #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - pub acknowledgement: ::prost::alloc::vec::Vec, - /// merkle proof of existence +pub struct MsgTimeout { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved + pub proof_unreceived: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, + #[prost(uint64, tag = "4")] + pub next_sequence_recv: u64, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketAcknowledgementResponse { - const NAME: &'static str = "QueryPacketAcknowledgementResponse"; +impl ::prost::Name for MsgTimeout { + const NAME: &'static str = "MsgTimeout"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgementsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method +/// MsgTimeoutResponse defines the Msg/Timeout response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// list of packet sequences - #[prost(uint64, repeated, tag = "4")] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, +pub struct MsgTimeoutResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryPacketAcknowledgementsRequest { - const NAME: &'static str = "QueryPacketAcknowledgementsRequest"; +impl ::prost::Name for MsgTimeoutResponse { + const NAME: &'static str = "MsgTimeoutResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryPacketAcknowledgemetsResponse is the request type for the -/// Query/QueryPacketAcknowledgements RPC method +/// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryPacketAcknowledgementsResponse { - #[prost(message, repeated, tag = "1")] - pub acknowledgements: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, +pub struct MsgTimeoutOnClose { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub proof_unreceived: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub proof_close: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, + #[prost(uint64, tag = "5")] + pub next_sequence_recv: u64, + #[prost(string, tag = "6")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryPacketAcknowledgementsResponse { - const NAME: &'static str = "QueryPacketAcknowledgementsResponse"; +impl ::prost::Name for MsgTimeoutOnClose { + const NAME: &'static str = "MsgTimeoutOnClose"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedPacketsRequest is the request type for the -/// Query/UnreceivedPackets RPC method +/// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedPacketsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// list of packet sequences - #[prost(uint64, repeated, tag = "3")] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, +pub struct MsgTimeoutOnCloseResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryUnreceivedPacketsRequest { - const NAME: &'static str = "QueryUnreceivedPacketsRequest"; +impl ::prost::Name for MsgTimeoutOnCloseResponse { + const NAME: &'static str = "MsgTimeoutOnCloseResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedPacketsResponse is the response type for the -/// Query/UnreceivedPacketCommitments RPC method +/// MsgAcknowledgement receives incoming IBC acknowledgement #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedPacketsResponse { - /// list of unreceived packet sequences - #[prost(uint64, repeated, tag = "1")] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, +pub struct MsgAcknowledgement { + #[prost(message, optional, tag = "1")] + pub packet: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub acknowledgement: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub proof_acked: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryUnreceivedPacketsResponse { - const NAME: &'static str = "QueryUnreceivedPacketsResponse"; +impl ::prost::Name for MsgAcknowledgement { + const NAME: &'static str = "MsgAcknowledgement"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedAcks is the request type for the -/// Query/UnreceivedAcks RPC method +/// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedAcksRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// list of acknowledgement sequences - #[prost(uint64, repeated, tag = "3")] - pub packet_ack_sequences: ::prost::alloc::vec::Vec, +pub struct MsgAcknowledgementResponse { + #[prost(enumeration = "ResponseResultType", tag = "1")] + pub result: i32, } -impl ::prost::Name for QueryUnreceivedAcksRequest { - const NAME: &'static str = "QueryUnreceivedAcksRequest"; +impl ::prost::Name for MsgAcknowledgementResponse { + const NAME: &'static str = "MsgAcknowledgementResponse"; const PACKAGE: &'static str = "ibc.core.channel.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) } } -/// QueryUnreceivedAcksResponse is the response type for the -/// Query/UnreceivedAcks RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUnreceivedAcksResponse { - /// list of unreceived acknowledgement sequences - #[prost(uint64, repeated, tag = "1")] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, +/// ResponseResultType defines the possible outcomes of the execution of a message +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum ResponseResultType { + /// Default zero value enumeration + Unspecified = 0, + /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + Noop = 1, + /// The message was executed successfully + Success = 2, } -impl ::prost::Name for QueryUnreceivedAcksResponse { - const NAME: &'static str = "QueryUnreceivedAcksResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryNextSequenceReceiveRequest is the request type for the -/// Query/QueryNextSequenceReceiveRequest RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceReceiveRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryNextSequenceReceiveRequest { - const NAME: &'static str = "QueryNextSequenceReceiveRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QuerySequenceResponse is the request type for the -/// Query/QueryNextSequenceReceiveResponse RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceReceiveResponse { - /// next sequence receive number - #[prost(uint64, tag = "1")] - pub next_sequence_receive: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryNextSequenceReceiveResponse { - const NAME: &'static str = "QueryNextSequenceReceiveResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryNextSequenceSendRequest is the request type for the -/// Query/QueryNextSequenceSend RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceSendRequest { - /// port unique identifier - #[prost(string, tag = "1")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryNextSequenceSendRequest { - const NAME: &'static str = "QueryNextSequenceSendRequest"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) - } -} -/// QueryNextSequenceSendResponse is the request type for the -/// Query/QueryNextSequenceSend RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryNextSequenceSendResponse { - /// next sequence send number - #[prost(uint64, tag = "1")] - pub next_sequence_send: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryNextSequenceSendResponse { - const NAME: &'static str = "QueryNextSequenceSendResponse"; - const PACKAGE: &'static str = "ibc.core.channel.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.channel.v1.{}", Self::NAME) +impl ResponseResultType { + /// 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 { + ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", + ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", + ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), + "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), + "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), + _ => None, + } } } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service + /// Msg defines the ibc/channel Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -2401,7 +2785,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -2419,7 +2803,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -2433,7 +2817,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -2466,12 +2850,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Channel queries an IBC Channel. - pub async fn channel( + /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. + pub async fn channel_open_init( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2485,19 +2869,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/Channel", + "/ibc.core.channel.v1.Msg/ChannelOpenInit", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channel")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenInit")); self.inner.unary(req, path, codec).await } - /// Channels queries all the IBC channels of a chain. - pub async fn channels( + /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. + pub async fn channel_open_try( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2511,20 +2895,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/Channels", + "/ibc.core.channel.v1.Msg/ChannelOpenTry", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "Channels")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenTry")); self.inner.unary(req, path, codec).await } - /// ConnectionChannels queries all the channels associated with a connection - /// end. - pub async fn connection_channels( + /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. + pub async fn channel_open_ack( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2538,22 +2921,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ConnectionChannels", + "/ibc.core.channel.v1.Msg/ChannelOpenAck", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "ConnectionChannels"), - ); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenAck")); self.inner.unary(req, path, codec).await } - /// ChannelClientState queries for the client state for the channel associated - /// with the provided channel identifiers. - pub async fn channel_client_state( + /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. + pub async fn channel_open_confirm( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2567,22 +2947,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ChannelClientState", + "/ibc.core.channel.v1.Msg/ChannelOpenConfirm", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "ChannelClientState"), + GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelOpenConfirm"), ); self.inner.unary(req, path, codec).await } - /// ChannelConsensusState queries for the consensus state for the channel - /// associated with the provided channel identifiers. - pub async fn channel_consensus_state( + /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. + pub async fn channel_close_init( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2596,21 +2975,20 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/ChannelConsensusState", + "/ibc.core.channel.v1.Msg/ChannelCloseInit", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "ChannelConsensusState"), - ); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelCloseInit")); self.inner.unary(req, path, codec).await } - /// PacketCommitment queries a stored packet commitment hash. - pub async fn packet_commitment( + /// ChannelCloseConfirm defines a rpc handler method for + /// MsgChannelCloseConfirm. + pub async fn channel_close_confirm( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2624,22 +3002,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketCommitment", + "/ibc.core.channel.v1.Msg/ChannelCloseConfirm", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "PacketCommitment"), + GrpcMethod::new("ibc.core.channel.v1.Msg", "ChannelCloseConfirm"), ); self.inner.unary(req, path, codec).await } - /// PacketCommitments returns all the packet commitments hashes associated - /// with a channel. - pub async fn packet_commitments( + /// RecvPacket defines a rpc handler method for MsgRecvPacket. + pub async fn recv_packet( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2653,22 +3030,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketCommitments", + "/ibc.core.channel.v1.Msg/RecvPacket", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "PacketCommitments"), - ); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "RecvPacket")); self.inner.unary(req, path, codec).await } - /// PacketReceipt queries if a given packet sequence has been received on the - /// queried chain - pub async fn packet_receipt( + /// Timeout defines a rpc handler method for MsgTimeout. + pub async fn timeout( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2682,19 +3056,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketReceipt", + "/ibc.core.channel.v1.Msg/Timeout", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "PacketReceipt")); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Timeout")); self.inner.unary(req, path, codec).await } - /// PacketAcknowledgement queries a stored packet acknowledgement hash. - pub async fn packet_acknowledgement( + /// TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. + pub async fn timeout_on_close( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2708,22 +3082,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketAcknowledgement", + "/ibc.core.channel.v1.Msg/TimeoutOnClose", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "PacketAcknowledgement"), - ); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "TimeoutOnClose")); self.inner.unary(req, path, codec).await } - /// PacketAcknowledgements returns all the packet acknowledgements associated - /// with a channel. - pub async fn packet_acknowledgements( + /// Acknowledgement defines a rpc handler method for MsgAcknowledgement. + pub async fn acknowledgement( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -2737,264 +3108,108 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/PacketAcknowledgements", + "/ibc.core.channel.v1.Msg/Acknowledgement", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.core.channel.v1.Query", - "PacketAcknowledgements", - ), - ); + .insert(GrpcMethod::new("ibc.core.channel.v1.Msg", "Acknowledgement")); self.inner.unary(req, path, codec).await } - /// UnreceivedPackets returns all the unreceived IBC packets associated with a - /// channel and sequences. - pub async fn unreceived_packets( - &mut self, - request: impl tonic::IntoRequest, + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. + async fn channel_open_init( + &self, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/UnreceivedPackets", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "UnreceivedPackets"), - ); - self.inner.unary(req, path, codec).await - } - /// UnreceivedAcks returns all the unreceived IBC acknowledgements associated - /// with a channel and sequences. - pub async fn unreceived_acks( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/UnreceivedAcks", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.channel.v1.Query", "UnreceivedAcks")); - self.inner.unary(req, path, codec).await - } - /// NextSequenceReceive returns the next receive sequence for a given channel. - pub async fn next_sequence_receive( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/NextSequenceReceive", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceReceive"), - ); - self.inner.unary(req, path, codec).await - } - /// NextSequenceSend returns the next send sequence for a given channel. - pub async fn next_sequence_send( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.channel.v1.Query/NextSequenceSend", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceSend"), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod query_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. - #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Channel queries an IBC Channel. - async fn channel( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Channels queries all the IBC channels of a chain. - async fn channels( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ConnectionChannels queries all the channels associated with a connection - /// end. - async fn connection_channels( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ChannelClientState queries for the client state for the channel associated - /// with the provided channel identifiers. - async fn channel_client_state( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ChannelConsensusState queries for the consensus state for the channel - /// associated with the provided channel identifiers. - async fn channel_consensus_state( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// PacketCommitment queries a stored packet commitment hash. - async fn packet_commitment( + /// ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. + async fn channel_open_try( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// PacketCommitments returns all the packet commitments hashes associated - /// with a channel. - async fn packet_commitments( + /// ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. + async fn channel_open_ack( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// PacketReceipt queries if a given packet sequence has been received on the - /// queried chain - async fn packet_receipt( + /// ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. + async fn channel_open_confirm( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// PacketAcknowledgement queries a stored packet acknowledgement hash. - async fn packet_acknowledgement( + /// ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. + async fn channel_close_init( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// PacketAcknowledgements returns all the packet acknowledgements associated - /// with a channel. - async fn packet_acknowledgements( + /// ChannelCloseConfirm defines a rpc handler method for + /// MsgChannelCloseConfirm. + async fn channel_close_confirm( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UnreceivedPackets returns all the unreceived IBC packets associated with a - /// channel and sequences. - async fn unreceived_packets( + /// RecvPacket defines a rpc handler method for MsgRecvPacket. + async fn recv_packet( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UnreceivedAcks returns all the unreceived IBC acknowledgements associated - /// with a channel and sequences. - async fn unreceived_acks( + /// Timeout defines a rpc handler method for MsgTimeout. + async fn timeout( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// NextSequenceReceive returns the next receive sequence for a given channel. - async fn next_sequence_receive( + /// TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. + async fn timeout_on_close( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// NextSequenceSend returns the next send sequence for a given channel. - async fn next_sequence_send( + /// Acknowledgement defines a rpc handler method for MsgAcknowledgement. + async fn acknowledgement( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query provides defines the gRPC querier service + /// Msg defines the ibc/channel Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -3002,7 +3217,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -3014,274 +3229,81 @@ pub mod query_server { send_compression_encodings: Default::default(), max_decoding_message_size: None, max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for QueryServer - where - T: Query, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/ibc.core.channel.v1.Query/Channel" => { - #[allow(non_camel_case_types)] - struct ChannelSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ChannelSvc { - type Response = super::QueryChannelResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Query/Channels" => { - #[allow(non_camel_case_types)] - struct ChannelsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ChannelsSvc { - type Response = super::QueryChannelsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channels(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Query/ConnectionChannels" => { - #[allow(non_camel_case_types)] - struct ConnectionChannelsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ConnectionChannelsSvc { - type Response = super::QueryConnectionChannelsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryConnectionChannelsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::connection_channels(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ConnectionChannelsSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Query/ChannelClientState" => { - #[allow(non_camel_case_types)] - struct ChannelClientStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ChannelClientStateSvc { - type Response = super::QueryChannelClientStateResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::QueryChannelClientStateRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::channel_client_state(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ChannelClientStateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.channel.v1.Query/ChannelConsensusState" => { + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.core.channel.v1.Msg/ChannelOpenInit" => { #[allow(non_camel_case_types)] - struct ChannelConsensusStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryChannelConsensusStateRequest, - > for ChannelConsensusStateSvc { - type Response = super::QueryChannelConsensusStateResponse; + struct ChannelOpenInitSvc(pub Arc); + impl tonic::server::UnaryService + for ChannelOpenInitSvc { + type Response = super::MsgChannelOpenInitResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryChannelConsensusStateRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::channel_consensus_state(&inner, request).await + ::channel_open_init(&inner, request).await }; Box::pin(fut) } @@ -3293,7 +3315,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChannelConsensusStateSvc(inner); + let method = ChannelOpenInitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3309,25 +3331,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/PacketCommitment" => { + "/ibc.core.channel.v1.Msg/ChannelOpenTry" => { #[allow(non_camel_case_types)] - struct PacketCommitmentSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for PacketCommitmentSvc { - type Response = super::QueryPacketCommitmentResponse; + struct ChannelOpenTrySvc(pub Arc); + impl tonic::server::UnaryService + for ChannelOpenTrySvc { + type Response = super::MsgChannelOpenTryResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::packet_commitment(&inner, request).await + ::channel_open_try(&inner, request).await }; Box::pin(fut) } @@ -3339,7 +3359,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PacketCommitmentSvc(inner); + let method = ChannelOpenTrySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3355,25 +3375,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/PacketCommitments" => { + "/ibc.core.channel.v1.Msg/ChannelOpenAck" => { #[allow(non_camel_case_types)] - struct PacketCommitmentsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for PacketCommitmentsSvc { - type Response = super::QueryPacketCommitmentsResponse; + struct ChannelOpenAckSvc(pub Arc); + impl tonic::server::UnaryService + for ChannelOpenAckSvc { + type Response = super::MsgChannelOpenAckResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::packet_commitments(&inner, request).await + ::channel_open_ack(&inner, request).await }; Box::pin(fut) } @@ -3385,7 +3403,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PacketCommitmentsSvc(inner); + let method = ChannelOpenAckSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3401,25 +3419,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/PacketReceipt" => { + "/ibc.core.channel.v1.Msg/ChannelOpenConfirm" => { #[allow(non_camel_case_types)] - struct PacketReceiptSvc(pub Arc); + struct ChannelOpenConfirmSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService - for PacketReceiptSvc { - type Response = super::QueryPacketReceiptResponse; + T: Msg, + > tonic::server::UnaryService + for ChannelOpenConfirmSvc { + type Response = super::MsgChannelOpenConfirmResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::packet_receipt(&inner, request).await + ::channel_open_confirm(&inner, request).await }; Box::pin(fut) } @@ -3431,7 +3449,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PacketReceiptSvc(inner); + let method = ChannelOpenConfirmSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3447,28 +3465,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/PacketAcknowledgement" => { + "/ibc.core.channel.v1.Msg/ChannelCloseInit" => { #[allow(non_camel_case_types)] - struct PacketAcknowledgementSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryPacketAcknowledgementRequest, - > for PacketAcknowledgementSvc { - type Response = super::QueryPacketAcknowledgementResponse; + struct ChannelCloseInitSvc(pub Arc); + impl tonic::server::UnaryService + for ChannelCloseInitSvc { + type Response = super::MsgChannelCloseInitResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryPacketAcknowledgementRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::packet_acknowledgement(&inner, request).await + ::channel_close_init(&inner, request).await }; Box::pin(fut) } @@ -3480,7 +3493,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PacketAcknowledgementSvc(inner); + let method = ChannelCloseInitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3496,28 +3509,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/PacketAcknowledgements" => { + "/ibc.core.channel.v1.Msg/ChannelCloseConfirm" => { #[allow(non_camel_case_types)] - struct PacketAcknowledgementsSvc(pub Arc); + struct ChannelCloseConfirmSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService< - super::QueryPacketAcknowledgementsRequest, - > for PacketAcknowledgementsSvc { - type Response = super::QueryPacketAcknowledgementsResponse; + T: Msg, + > tonic::server::UnaryService + for ChannelCloseConfirmSvc { + type Response = super::MsgChannelCloseConfirmResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryPacketAcknowledgementsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::packet_acknowledgements(&inner, request).await + ::channel_close_confirm(&inner, request).await }; Box::pin(fut) } @@ -3529,7 +3539,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = PacketAcknowledgementsSvc(inner); + let method = ChannelCloseConfirmSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3545,25 +3555,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/UnreceivedPackets" => { + "/ibc.core.channel.v1.Msg/RecvPacket" => { #[allow(non_camel_case_types)] - struct UnreceivedPacketsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for UnreceivedPacketsSvc { - type Response = super::QueryUnreceivedPacketsResponse; + struct RecvPacketSvc(pub Arc); + impl tonic::server::UnaryService + for RecvPacketSvc { + type Response = super::MsgRecvPacketResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::unreceived_packets(&inner, request).await + ::recv_packet(&inner, request).await }; Box::pin(fut) } @@ -3575,7 +3583,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UnreceivedPacketsSvc(inner); + let method = RecvPacketSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3591,25 +3599,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/UnreceivedAcks" => { + "/ibc.core.channel.v1.Msg/Timeout" => { #[allow(non_camel_case_types)] - struct UnreceivedAcksSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for UnreceivedAcksSvc { - type Response = super::QueryUnreceivedAcksResponse; + struct TimeoutSvc(pub Arc); + impl tonic::server::UnaryService + for TimeoutSvc { + type Response = super::MsgTimeoutResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::unreceived_acks(&inner, request).await + ::timeout(&inner, request).await }; Box::pin(fut) } @@ -3621,7 +3627,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UnreceivedAcksSvc(inner); + let method = TimeoutSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3637,27 +3643,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/NextSequenceReceive" => { + "/ibc.core.channel.v1.Msg/TimeoutOnClose" => { #[allow(non_camel_case_types)] - struct NextSequenceReceiveSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for NextSequenceReceiveSvc { - type Response = super::QueryNextSequenceReceiveResponse; + struct TimeoutOnCloseSvc(pub Arc); + impl tonic::server::UnaryService + for TimeoutOnCloseSvc { + type Response = super::MsgTimeoutOnCloseResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryNextSequenceReceiveRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::next_sequence_receive(&inner, request).await + ::timeout_on_close(&inner, request).await }; Box::pin(fut) } @@ -3669,7 +3671,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = NextSequenceReceiveSvc(inner); + let method = TimeoutOnCloseSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3685,25 +3687,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.channel.v1.Query/NextSequenceSend" => { + "/ibc.core.channel.v1.Msg/Acknowledgement" => { #[allow(non_camel_case_types)] - struct NextSequenceSendSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for NextSequenceSendSvc { - type Response = super::QueryNextSequenceSendResponse; + struct AcknowledgementSvc(pub Arc); + impl tonic::server::UnaryService + for AcknowledgementSvc { + type Response = super::MsgAcknowledgementResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::next_sequence_send(&inner, request).await + ::acknowledgement(&inner, request).await }; Box::pin(fut) } @@ -3715,7 +3715,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = NextSequenceSendSvc(inner); + let method = AcknowledgementSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -3746,7 +3746,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -3758,7 +3758,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -3768,7 +3768,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.core.channel.v1.Query"; + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.core.channel.v1.Msg"; } } diff --git a/src/prost/ibc.core.client.v1.rs b/src/prost/ibc.core.client.v1.rs index fc33ec80..25d097ed 100644 --- a/src/prost/ibc.core.client.v1.rs +++ b/src/prost/ibc.core.client.v1.rs @@ -238,263 +238,335 @@ impl ::prost::Name for IdentifiedGenesisMetadata { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgCreateClient defines a message to create an IBC client +/// QueryClientStateRequest is the request type for the Query/ClientState RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateClient { - /// light client state +pub struct QueryClientStateRequest { + /// client state unique identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryClientStateRequest { + const NAME: &'static str = "QueryClientStateRequest"; + const PACKAGE: &'static str = "ibc.core.client.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + } +} +/// QueryClientStateResponse is the response type for the Query/ClientState RPC +/// method. Besides the client state, it includes a proof and the height from +/// which the proof was retrieved. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryClientStateResponse { + /// client state associated with the request identifier #[prost(message, optional, tag = "1")] pub client_state: ::core::option::Option< super::super::super::super::google::protobuf::Any, >, - /// consensus state associated with the client that corresponds to a given - /// height. - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryClientStateResponse { + const NAME: &'static str = "QueryClientStateResponse"; + const PACKAGE: &'static str = "ibc.core.client.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + } +} +/// QueryClientStatesRequest is the request type for the Query/ClientStates RPC +/// method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryClientStatesRequest { + /// pagination request + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgCreateClient { - const NAME: &'static str = "MsgCreateClient"; +impl ::prost::Name for QueryClientStatesRequest { + const NAME: &'static str = "QueryClientStatesRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgCreateClientResponse defines the Msg/CreateClient response type. +/// QueryClientStatesResponse is the response type for the Query/ClientStates RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgCreateClientResponse {} -impl ::prost::Name for MsgCreateClientResponse { - const NAME: &'static str = "MsgCreateClientResponse"; +pub struct QueryClientStatesResponse { + /// list of stored ClientStates of the chain. + #[prost(message, repeated, tag = "1")] + pub client_states: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryClientStatesResponse { + const NAME: &'static str = "QueryClientStatesResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -/// the given client message. +/// QueryConsensusStateRequest is the request type for the Query/ConsensusState +/// RPC method. Besides the consensus state, it includes a proof and the height +/// from which the proof was retrieved. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateClient { - /// client unique identifier +pub struct QueryConsensusStateRequest { + /// client identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// client message to update the light client - #[prost(message, optional, tag = "2")] - pub client_message: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + /// consensus state revision number + #[prost(uint64, tag = "2")] + pub revision_number: u64, + /// consensus state revision height + #[prost(uint64, tag = "3")] + pub revision_height: u64, + /// latest_height overrrides the height field and queries the latest stored + /// ConsensusState + #[prost(bool, tag = "4")] + pub latest_height: bool, } -impl ::prost::Name for MsgUpdateClient { - const NAME: &'static str = "MsgUpdateClient"; +impl ::prost::Name for QueryConsensusStateRequest { + const NAME: &'static str = "QueryConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateClientResponse defines the Msg/UpdateClient response type. +/// QueryConsensusStateResponse is the response type for the Query/ConsensusState +/// RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateClientResponse {} -impl ::prost::Name for MsgUpdateClientResponse { - const NAME: &'static str = "MsgUpdateClientResponse"; +pub struct QueryConsensusStateResponse { + /// consensus state associated with the client identifier at the given height + #[prost(message, optional, tag = "1")] + pub consensus_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryConsensusStateResponse { + const NAME: &'static str = "QueryConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -/// state +/// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +/// RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpgradeClient { - /// client unique identifier +pub struct QueryConsensusStatesRequest { + /// client identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// upgraded client state + /// pagination request #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - /// upgraded consensus state, only contains enough information to serve as a - /// basis of trust in update logic - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, - /// proof that old chain committed to new client - #[prost(bytes = "vec", tag = "4")] - pub proof_upgrade_client: ::prost::alloc::vec::Vec, - /// proof that old chain committed to new consensus state - #[prost(bytes = "vec", tag = "5")] - pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, - /// signer address - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgUpgradeClient { - const NAME: &'static str = "MsgUpgradeClient"; +impl ::prost::Name for QueryConsensusStatesRequest { + const NAME: &'static str = "QueryConsensusStatesRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. +/// QueryConsensusStatesResponse is the response type for the +/// Query/ConsensusStates RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpgradeClientResponse {} -impl ::prost::Name for MsgUpgradeClientResponse { - const NAME: &'static str = "MsgUpgradeClientResponse"; +pub struct QueryConsensusStatesResponse { + /// consensus states associated with the identifier + #[prost(message, repeated, tag = "1")] + pub consensus_states: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryConsensusStatesResponse { + const NAME: &'static str = "QueryConsensusStatesResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -/// light client misbehaviour. -/// This message has been deprecated. Use MsgUpdateClient instead. +/// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights +/// RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitMisbehaviour { - /// client unique identifier +pub struct QueryConsensusStateHeightsRequest { + /// client identifier #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, - /// misbehaviour used for freezing the light client + /// pagination request #[prost(message, optional, tag = "2")] - pub misbehaviour: ::core::option::Option< - super::super::super::super::google::protobuf::Any, + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgSubmitMisbehaviour { - const NAME: &'static str = "MsgSubmitMisbehaviour"; +impl ::prost::Name for QueryConsensusStateHeightsRequest { + const NAME: &'static str = "QueryConsensusStateHeightsRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -/// type. +/// QueryConsensusStateHeightsResponse is the response type for the +/// Query/ConsensusStateHeights RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitMisbehaviourResponse {} -impl ::prost::Name for MsgSubmitMisbehaviourResponse { - const NAME: &'static str = "MsgSubmitMisbehaviourResponse"; +pub struct QueryConsensusStateHeightsResponse { + /// consensus state heights + #[prost(message, repeated, tag = "1")] + pub consensus_state_heights: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryConsensusStateHeightsResponse { + const NAME: &'static str = "QueryConsensusStateHeightsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgRecoverClient defines the message used to recover a frozen or expired client. +/// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecoverClient { - /// the client identifier for the client to be updated if the proposal passes +pub struct QueryClientStatusRequest { + /// client unique identifier #[prost(string, tag = "1")] - pub subject_client_id: ::prost::alloc::string::String, - /// the substitute client identifier for the client which will replace the subject - /// client - #[prost(string, tag = "2")] - pub substitute_client_id: ::prost::alloc::string::String, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + pub client_id: ::prost::alloc::string::String, } -impl ::prost::Name for MsgRecoverClient { - const NAME: &'static str = "MsgRecoverClient"; +impl ::prost::Name for QueryClientStatusRequest { + const NAME: &'static str = "QueryClientStatusRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgRecoverClientResponse defines the Msg/RecoverClient response type. +/// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC +/// method. It returns the current status of the IBC client. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRecoverClientResponse {} -impl ::prost::Name for MsgRecoverClientResponse { - const NAME: &'static str = "MsgRecoverClientResponse"; +pub struct QueryClientStatusResponse { + #[prost(string, tag = "1")] + pub status: ::prost::alloc::string::String, +} +impl ::prost::Name for QueryClientStatusResponse { + const NAME: &'static str = "QueryClientStatusResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal +/// QueryClientParamsRequest is the request type for the Query/ClientParams RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSoftwareUpgrade { +pub struct QueryClientParamsRequest {} +impl ::prost::Name for QueryClientParamsRequest { + const NAME: &'static str = "QueryClientParamsRequest"; + const PACKAGE: &'static str = "ibc.core.client.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + } +} +/// QueryClientParamsResponse is the response type for the Query/ClientParams RPC +/// method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryClientParamsResponse { + /// params defines the parameters of the module. #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option< - super::super::super::super::cosmos::upgrade::v1beta1::Plan, - >, - /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. - /// This will make the chain commit to the correct upgraded (self) client state - /// before the upgrade occurs, so that connecting chains can verify that the - /// new upgraded client is valid by verifying a proof on the previous version - /// of the chain. This will allow IBC connections to persist smoothly across - /// planned chain upgrades. Correspondingly, the UpgradedClientState field has been - /// deprecated in the Cosmos SDK to allow for this logic to exist solely in - /// the 02-client module. - #[prost(message, optional, tag = "2")] - pub upgraded_client_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, + pub params: ::core::option::Option, } -impl ::prost::Name for MsgIbcSoftwareUpgrade { - const NAME: &'static str = "MsgIBCSoftwareUpgrade"; +impl ::prost::Name for QueryClientParamsResponse { + const NAME: &'static str = "QueryClientParamsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. +/// QueryUpgradedClientStateRequest is the request type for the +/// Query/UpgradedClientState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgIbcSoftwareUpgradeResponse {} -impl ::prost::Name for MsgIbcSoftwareUpgradeResponse { - const NAME: &'static str = "MsgIBCSoftwareUpgradeResponse"; +pub struct QueryUpgradedClientStateRequest {} +impl ::prost::Name for QueryUpgradedClientStateRequest { + const NAME: &'static str = "QueryUpgradedClientStateRequest"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. +/// QueryUpgradedClientStateResponse is the response type for the +/// Query/UpgradedClientState RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the client parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, +pub struct QueryUpgradedClientStateResponse { + /// client state associated with the request identifier + #[prost(message, optional, tag = "1")] + pub upgraded_client_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryUpgradedClientStateResponse { + const NAME: &'static str = "QueryUpgradedClientStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +/// QueryUpgradedConsensusStateRequest is the request type for the +/// Query/UpgradedConsensusState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryUpgradedConsensusStateRequest {} +impl ::prost::Name for QueryUpgradedConsensusStateRequest { + const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; + const PACKAGE: &'static str = "ibc.core.client.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + } +} +/// QueryUpgradedConsensusStateResponse is the response type for the +/// Query/UpgradedConsensusState RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryUpgradedConsensusStateResponse { + /// Consensus state associated with the request identifier + #[prost(message, optional, tag = "1")] + pub upgraded_consensus_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, +} +impl ::prost::Name for QueryUpgradedConsensusStateResponse { + const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) @@ -502,16 +574,16 @@ impl ::prost::Name for MsgUpdateParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the ibc/client Msg service. + /// Query provides defines the gRPC querier service #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -522,7 +594,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -540,7 +612,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -554,7 +626,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -587,12 +659,65 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// CreateClient defines a rpc handler method for MsgCreateClient. - pub async fn create_client( + /// ClientState queries an IBC light client. + pub async fn client_state( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.client.v1.Query/ClientState", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientState")); + self.inner.unary(req, path, codec).await + } + /// ClientStates queries all the IBC light clients of a chain. + pub async fn client_states( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.client.v1.Query/ClientStates", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStates")); + self.inner.unary(req, path, codec).await + } + /// ConsensusState queries a consensus state associated with a client state at + /// a given height. + pub async fn consensus_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -606,19 +731,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/CreateClient", + "/ibc.core.client.v1.Query/ConsensusState", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "CreateClient")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ConsensusState")); self.inner.unary(req, path, codec).await } - /// UpdateClient defines a rpc handler method for MsgUpdateClient. - pub async fn update_client( + /// ConsensusStates queries all the consensus state associated with a given + /// client. + pub async fn consensus_states( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -632,19 +758,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/UpdateClient", + "/ibc.core.client.v1.Query/ConsensusStates", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClient")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ConsensusStates")); self.inner.unary(req, path, codec).await } - /// UpgradeClient defines a rpc handler method for MsgUpgradeClient. - pub async fn upgrade_client( + /// ConsensusStateHeights queries the height of every consensus states associated with a given client. + pub async fn consensus_state_heights( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -658,19 +784,21 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/UpgradeClient", + "/ibc.core.client.v1.Query/ConsensusStateHeights", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpgradeClient")); + .insert( + GrpcMethod::new("ibc.core.client.v1.Query", "ConsensusStateHeights"), + ); self.inner.unary(req, path, codec).await } - /// SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - pub async fn submit_misbehaviour( + /// Status queries the status of an IBC client. + pub async fn client_status( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -684,19 +812,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/SubmitMisbehaviour", + "/ibc.core.client.v1.Query/ClientStatus", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "SubmitMisbehaviour")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStatus")); self.inner.unary(req, path, codec).await } - /// RecoverClient defines a rpc handler method for MsgRecoverClient. - pub async fn recover_client( + /// ClientParams queries all parameters of the ibc client submodule. + pub async fn client_params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -710,19 +838,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/RecoverClient", + "/ibc.core.client.v1.Query/ClientParams", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "RecoverClient")); + .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientParams")); self.inner.unary(req, path, codec).await } - /// IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. - pub async fn ibc_software_upgrade( + /// UpgradedClientState queries an Upgraded IBC light client. + pub async fn upgraded_client_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -736,19 +864,21 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/IBCSoftwareUpgrade", + "/ibc.core.client.v1.Query/UpgradedClientState", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "IBCSoftwareUpgrade")); + .insert( + GrpcMethod::new("ibc.core.client.v1.Query", "UpgradedClientState"), + ); self.inner.unary(req, path, codec).await } - /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. - pub async fn update_client_params( + /// UpgradedConsensusState queries an Upgraded IBC consensus state. + pub async fn upgraded_consensus_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -762,83 +892,103 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Msg/UpdateClientParams", + "/ibc.core.client.v1.Query/UpgradedConsensusState", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClientParams")); + .insert( + GrpcMethod::new("ibc.core.client.v1.Query", "UpgradedConsensusState"), + ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// CreateClient defines a rpc handler method for MsgCreateClient. - async fn create_client( + pub trait Query: Send + Sync + 'static { + /// ClientState queries an IBC light client. + async fn client_state( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateClient defines a rpc handler method for MsgUpdateClient. - async fn update_client( + /// ClientStates queries all the IBC light clients of a chain. + async fn client_states( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpgradeClient defines a rpc handler method for MsgUpgradeClient. - async fn upgrade_client( + /// ConsensusState queries a consensus state associated with a client state at + /// a given height. + async fn consensus_state( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - async fn submit_misbehaviour( + /// ConsensusStates queries all the consensus state associated with a given + /// client. + async fn consensus_states( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// RecoverClient defines a rpc handler method for MsgRecoverClient. - async fn recover_client( + /// ConsensusStateHeights queries the height of every consensus states associated with a given client. + async fn consensus_state_heights( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. - async fn ibc_software_upgrade( + /// Status queries the status of an IBC client. + async fn client_status( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. - async fn update_client_params( + /// ClientParams queries all parameters of the ibc client submodule. + async fn client_params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// UpgradedClientState queries an Upgraded IBC light client. + async fn upgraded_client_state( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UpgradedConsensusState queries an Upgraded IBC consensus state. + async fn upgraded_consensus_state( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the ibc/client Msg service. + /// Query provides defines the gRPC querier service #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -846,7 +996,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -898,9 +1048,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -916,23 +1066,117 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.core.client.v1.Msg/CreateClient" => { + "/ibc.core.client.v1.Query/ClientState" => { + #[allow(non_camel_case_types)] + struct ClientStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClientStateSvc { + type Response = super::QueryClientStateResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::client_state(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ClientStateSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.client.v1.Query/ClientStates" => { + #[allow(non_camel_case_types)] + struct ClientStatesSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClientStatesSvc { + type Response = super::QueryClientStatesResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::client_states(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ClientStatesSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.client.v1.Query/ConsensusState" => { #[allow(non_camel_case_types)] - struct CreateClientSvc(pub Arc); - impl tonic::server::UnaryService - for CreateClientSvc { - type Response = super::MsgCreateClientResponse; + struct ConsensusStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ConsensusStateSvc { + type Response = super::QueryConsensusStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::create_client(&inner, request).await + ::consensus_state(&inner, request).await }; Box::pin(fut) } @@ -944,7 +1188,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CreateClientSvc(inner); + let method = ConsensusStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -960,23 +1204,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/UpdateClient" => { + "/ibc.core.client.v1.Query/ConsensusStates" => { #[allow(non_camel_case_types)] - struct UpdateClientSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateClientSvc { - type Response = super::MsgUpdateClientResponse; + struct ConsensusStatesSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ConsensusStatesSvc { + type Response = super::QueryConsensusStatesResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_client(&inner, request).await + ::consensus_states(&inner, request).await }; Box::pin(fut) } @@ -988,7 +1234,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateClientSvc(inner); + let method = ConsensusStatesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1004,23 +1250,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/UpgradeClient" => { + "/ibc.core.client.v1.Query/ConsensusStateHeights" => { #[allow(non_camel_case_types)] - struct UpgradeClientSvc(pub Arc); - impl tonic::server::UnaryService - for UpgradeClientSvc { - type Response = super::MsgUpgradeClientResponse; + struct ConsensusStateHeightsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryConsensusStateHeightsRequest, + > for ConsensusStateHeightsSvc { + type Response = super::QueryConsensusStateHeightsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryConsensusStateHeightsRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::upgrade_client(&inner, request).await + ::consensus_state_heights(&inner, request).await }; Box::pin(fut) } @@ -1032,7 +1283,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpgradeClientSvc(inner); + let method = ConsensusStateHeightsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1048,25 +1299,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/SubmitMisbehaviour" => { + "/ibc.core.client.v1.Query/ClientStatus" => { #[allow(non_camel_case_types)] - struct SubmitMisbehaviourSvc(pub Arc); + struct ClientStatusSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for SubmitMisbehaviourSvc { - type Response = super::MsgSubmitMisbehaviourResponse; + T: Query, + > tonic::server::UnaryService + for ClientStatusSvc { + type Response = super::QueryClientStatusResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::submit_misbehaviour(&inner, request).await + ::client_status(&inner, request).await }; Box::pin(fut) } @@ -1078,7 +1329,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = SubmitMisbehaviourSvc(inner); + let method = ClientStatusSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1094,23 +1345,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/RecoverClient" => { + "/ibc.core.client.v1.Query/ClientParams" => { #[allow(non_camel_case_types)] - struct RecoverClientSvc(pub Arc); - impl tonic::server::UnaryService - for RecoverClientSvc { - type Response = super::MsgRecoverClientResponse; + struct ClientParamsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClientParamsSvc { + type Response = super::QueryClientParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::recover_client(&inner, request).await + ::client_params(&inner, request).await }; Box::pin(fut) } @@ -1122,7 +1375,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = RecoverClientSvc(inner); + let method = ClientParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1138,25 +1391,27 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/IBCSoftwareUpgrade" => { + "/ibc.core.client.v1.Query/UpgradedClientState" => { #[allow(non_camel_case_types)] - struct IBCSoftwareUpgradeSvc(pub Arc); + struct UpgradedClientStateSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for IBCSoftwareUpgradeSvc { - type Response = super::MsgIbcSoftwareUpgradeResponse; + T: Query, + > tonic::server::UnaryService + for UpgradedClientStateSvc { + type Response = super::QueryUpgradedClientStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryUpgradedClientStateRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::ibc_software_upgrade(&inner, request).await + ::upgraded_client_state(&inner, request).await }; Box::pin(fut) } @@ -1168,7 +1423,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = IBCSoftwareUpgradeSvc(inner); + let method = UpgradedClientStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1184,23 +1439,29 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Msg/UpdateClientParams" => { + "/ibc.core.client.v1.Query/UpgradedConsensusState" => { #[allow(non_camel_case_types)] - struct UpdateClientParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateClientParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct UpgradedConsensusStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryUpgradedConsensusStateRequest, + > for UpgradedConsensusStateSvc { + type Response = super::QueryUpgradedConsensusStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryUpgradedConsensusStateRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_client_params(&inner, request).await + ::upgraded_consensus_state(&inner, request) + .await }; Box::pin(fut) } @@ -1212,7 +1473,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateClientParamsSvc(inner); + let method = UpgradedConsensusStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1243,7 +1504,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1255,7 +1516,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1265,339 +1526,267 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.core.client.v1.Msg"; - } -} -/// QueryClientStateRequest is the request type for the Query/ClientState RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStateRequest { - /// client state unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClientStateRequest { - const NAME: &'static str = "QueryClientStateRequest"; - const PACKAGE: &'static str = "ibc.core.client.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.core.client.v1.Query"; } } -/// QueryClientStateResponse is the response type for the Query/ClientState RPC -/// method. Besides the client state, it includes a proof and the height from -/// which the proof was retrieved. +/// MsgCreateClient defines a message to create an IBC client #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStateResponse { - /// client state associated with the request identifier +pub struct MsgCreateClient { + /// light client state #[prost(message, optional, tag = "1")] pub client_state: ::core::option::Option< super::super::super::super::google::protobuf::Any, >, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryClientStateResponse { - const NAME: &'static str = "QueryClientStateResponse"; - const PACKAGE: &'static str = "ibc.core.client.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) - } -} -/// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatesRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryClientStatesRequest { - const NAME: &'static str = "QueryClientStatesRequest"; - const PACKAGE: &'static str = "ibc.core.client.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) - } -} -/// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatesResponse { - /// list of stored ClientStates of the chain. - #[prost(message, repeated, tag = "1")] - pub client_states: ::prost::alloc::vec::Vec, - /// pagination response + /// consensus state associated with the client that corresponds to a given + /// height. #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + pub consensus_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, >, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryClientStatesResponse { - const NAME: &'static str = "QueryClientStatesResponse"; +impl ::prost::Name for MsgCreateClient { + const NAME: &'static str = "MsgCreateClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateRequest is the request type for the Query/ConsensusState -/// RPC method. Besides the consensus state, it includes a proof and the height -/// from which the proof was retrieved. +/// MsgCreateClientResponse defines the Msg/CreateClient response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateRequest { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// consensus state revision number - #[prost(uint64, tag = "2")] - pub revision_number: u64, - /// consensus state revision height - #[prost(uint64, tag = "3")] - pub revision_height: u64, - /// latest_height overrrides the height field and queries the latest stored - /// ConsensusState - #[prost(bool, tag = "4")] - pub latest_height: bool, -} -impl ::prost::Name for QueryConsensusStateRequest { - const NAME: &'static str = "QueryConsensusStateRequest"; +pub struct MsgCreateClientResponse {} +impl ::prost::Name for MsgCreateClientResponse { + const NAME: &'static str = "MsgCreateClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateResponse is the response type for the Query/ConsensusState -/// RPC method +/// MsgUpdateClient defines an sdk.Msg to update a IBC client state using +/// the given client message. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateResponse { - /// consensus state associated with the client identifier at the given height - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option< +pub struct MsgUpdateClient { + /// client unique identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// client message to update the light client + #[prost(message, optional, tag = "2")] + pub client_message: ::core::option::Option< super::super::super::super::google::protobuf::Any, >, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStateResponse { - const NAME: &'static str = "QueryConsensusStateResponse"; +impl ::prost::Name for MsgUpdateClient { + const NAME: &'static str = "MsgUpdateClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -/// RPC method. +/// MsgUpdateClientResponse defines the Msg/UpdateClient response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStatesRequest { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryConsensusStatesRequest { - const NAME: &'static str = "QueryConsensusStatesRequest"; +pub struct MsgUpdateClientResponse {} +impl ::prost::Name for MsgUpdateClientResponse { + const NAME: &'static str = "MsgUpdateClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStatesResponse is the response type for the -/// Query/ConsensusStates RPC method +/// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client +/// state #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStatesResponse { - /// consensus states associated with the identifier - #[prost(message, repeated, tag = "1")] - pub consensus_states: ::prost::alloc::vec::Vec, - /// pagination response +pub struct MsgUpgradeClient { + /// client unique identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// upgraded client state #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + pub client_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + /// upgraded consensus state, only contains enough information to serve as a + /// basis of trust in update logic + #[prost(message, optional, tag = "3")] + pub consensus_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, >, + /// proof that old chain committed to new client + #[prost(bytes = "vec", tag = "4")] + pub proof_upgrade_client: ::prost::alloc::vec::Vec, + /// proof that old chain committed to new consensus state + #[prost(bytes = "vec", tag = "5")] + pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, + /// signer address + #[prost(string, tag = "6")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStatesResponse { - const NAME: &'static str = "QueryConsensusStatesResponse"; +impl ::prost::Name for MsgUpgradeClient { + const NAME: &'static str = "MsgUpgradeClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights -/// RPC method. +/// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateHeightsRequest { - /// client identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryConsensusStateHeightsRequest { - const NAME: &'static str = "QueryConsensusStateHeightsRequest"; +pub struct MsgUpgradeClientResponse {} +impl ::prost::Name for MsgUpgradeClientResponse { + const NAME: &'static str = "MsgUpgradeClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryConsensusStateHeightsResponse is the response type for the -/// Query/ConsensusStateHeights RPC method +/// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for +/// light client misbehaviour. +/// This message has been deprecated. Use MsgUpdateClient instead. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsensusStateHeightsResponse { - /// consensus state heights - #[prost(message, repeated, tag = "1")] - pub consensus_state_heights: ::prost::alloc::vec::Vec, - /// pagination response +pub struct MsgSubmitMisbehaviour { + /// client unique identifier + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// misbehaviour used for freezing the light client #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + pub misbehaviour: ::core::option::Option< + super::super::super::super::google::protobuf::Any, >, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConsensusStateHeightsResponse { - const NAME: &'static str = "QueryConsensusStateHeightsResponse"; +impl ::prost::Name for MsgSubmitMisbehaviour { + const NAME: &'static str = "MsgSubmitMisbehaviour"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -/// method +/// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response +/// type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatusRequest { - /// client unique identifier - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClientStatusRequest { - const NAME: &'static str = "QueryClientStatusRequest"; +pub struct MsgSubmitMisbehaviourResponse {} +impl ::prost::Name for MsgSubmitMisbehaviourResponse { + const NAME: &'static str = "MsgSubmitMisbehaviourResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -/// method. It returns the current status of the IBC client. +/// MsgRecoverClient defines the message used to recover a frozen or expired client. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientStatusResponse { +pub struct MsgRecoverClient { + /// the client identifier for the client to be updated if the proposal passes #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, + pub subject_client_id: ::prost::alloc::string::String, + /// the substitute client identifier for the client which will replace the subject + /// client + #[prost(string, tag = "2")] + pub substitute_client_id: ::prost::alloc::string::String, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryClientStatusResponse { - const NAME: &'static str = "QueryClientStatusResponse"; +impl ::prost::Name for MsgRecoverClient { + const NAME: &'static str = "MsgRecoverClient"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -/// method. +/// MsgRecoverClientResponse defines the Msg/RecoverClient response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientParamsRequest {} -impl ::prost::Name for QueryClientParamsRequest { - const NAME: &'static str = "QueryClientParamsRequest"; +pub struct MsgRecoverClientResponse {} +impl ::prost::Name for MsgRecoverClientResponse { + const NAME: &'static str = "MsgRecoverClientResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -/// method. +/// MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientParamsResponse { - /// params defines the parameters of the module. +pub struct MsgIbcSoftwareUpgrade { #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, + pub plan: ::core::option::Option< + super::super::super::super::cosmos::upgrade::v1beta1::Plan, + >, + /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. + /// This will make the chain commit to the correct upgraded (self) client state + /// before the upgrade occurs, so that connecting chains can verify that the + /// new upgraded client is valid by verifying a proof on the previous version + /// of the chain. This will allow IBC connections to persist smoothly across + /// planned chain upgrades. Correspondingly, the UpgradedClientState field has been + /// deprecated in the Cosmos SDK to allow for this logic to exist solely in + /// the 02-client module. + #[prost(message, optional, tag = "2")] + pub upgraded_client_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryClientParamsResponse { - const NAME: &'static str = "QueryClientParamsResponse"; +impl ::prost::Name for MsgIbcSoftwareUpgrade { + const NAME: &'static str = "MsgIBCSoftwareUpgrade"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedClientStateRequest is the request type for the -/// Query/UpgradedClientState RPC method +/// MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedClientStateRequest {} -impl ::prost::Name for QueryUpgradedClientStateRequest { - const NAME: &'static str = "QueryUpgradedClientStateRequest"; +pub struct MsgIbcSoftwareUpgradeResponse {} +impl ::prost::Name for MsgIbcSoftwareUpgradeResponse { + const NAME: &'static str = "MsgIBCSoftwareUpgradeResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedClientStateResponse is the response type for the -/// Query/UpgradedClientState RPC method. +/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedClientStateResponse { - /// client state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_client_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, -} -impl ::prost::Name for QueryUpgradedClientStateResponse { - const NAME: &'static str = "QueryUpgradedClientStateResponse"; - const PACKAGE: &'static str = "ibc.core.client.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) - } +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the client parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, } -/// QueryUpgradedConsensusStateRequest is the request type for the -/// Query/UpgradedConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateRequest {} -impl ::prost::Name for QueryUpgradedConsensusStateRequest { - const NAME: &'static str = "QueryUpgradedConsensusStateRequest"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) } } -/// QueryUpgradedConsensusStateResponse is the response type for the -/// Query/UpgradedConsensusState RPC method. +/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryUpgradedConsensusStateResponse { - /// Consensus state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_consensus_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, -} -impl ::prost::Name for QueryUpgradedConsensusStateResponse { - const NAME: &'static str = "QueryUpgradedConsensusStateResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.core.client.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.client.v1.{}", Self::NAME) @@ -1605,16 +1794,16 @@ impl ::prost::Name for QueryUpgradedConsensusStateResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service + /// Msg defines the ibc/client Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -1625,7 +1814,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -1643,7 +1832,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -1657,7 +1846,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -1690,65 +1879,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// ClientState queries an IBC light client. - pub async fn client_state( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ClientState", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientState")); - self.inner.unary(req, path, codec).await - } - /// ClientStates queries all the IBC light clients of a chain. - pub async fn client_states( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ClientStates", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStates")); - self.inner.unary(req, path, codec).await - } - /// ConsensusState queries a consensus state associated with a client state at - /// a given height. - pub async fn consensus_state( + /// CreateClient defines a rpc handler method for MsgCreateClient. + pub async fn create_client( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1762,20 +1898,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ConsensusState", + "/ibc.core.client.v1.Msg/CreateClient", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ConsensusState")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "CreateClient")); self.inner.unary(req, path, codec).await } - /// ConsensusStates queries all the consensus state associated with a given - /// client. - pub async fn consensus_states( + /// UpdateClient defines a rpc handler method for MsgUpdateClient. + pub async fn update_client( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1789,19 +1924,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ConsensusStates", + "/ibc.core.client.v1.Msg/UpdateClient", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ConsensusStates")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClient")); self.inner.unary(req, path, codec).await } - /// ConsensusStateHeights queries the height of every consensus states associated with a given client. - pub async fn consensus_state_heights( + /// UpgradeClient defines a rpc handler method for MsgUpgradeClient. + pub async fn upgrade_client( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1815,21 +1950,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ConsensusStateHeights", + "/ibc.core.client.v1.Msg/UpgradeClient", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.client.v1.Query", "ConsensusStateHeights"), - ); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpgradeClient")); self.inner.unary(req, path, codec).await } - /// Status queries the status of an IBC client. - pub async fn client_status( + /// SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. + pub async fn submit_misbehaviour( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1843,19 +1976,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ClientStatus", + "/ibc.core.client.v1.Msg/SubmitMisbehaviour", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientStatus")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "SubmitMisbehaviour")); self.inner.unary(req, path, codec).await } - /// ClientParams queries all parameters of the ibc client submodule. - pub async fn client_params( + /// RecoverClient defines a rpc handler method for MsgRecoverClient. + pub async fn recover_client( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1869,19 +2002,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/ClientParams", + "/ibc.core.client.v1.Msg/RecoverClient", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.client.v1.Query", "ClientParams")); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "RecoverClient")); self.inner.unary(req, path, codec).await } - /// UpgradedClientState queries an Upgraded IBC light client. - pub async fn upgraded_client_state( + /// IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. + pub async fn ibc_software_upgrade( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1895,21 +2028,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/UpgradedClientState", + "/ibc.core.client.v1.Msg/IBCSoftwareUpgrade", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.client.v1.Query", "UpgradedClientState"), - ); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "IBCSoftwareUpgrade")); self.inner.unary(req, path, codec).await } - /// UpgradedConsensusState queries an Upgraded IBC consensus state. - pub async fn upgraded_consensus_state( + /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. + pub async fn update_client_params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1923,103 +2054,83 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.client.v1.Query/UpgradedConsensusState", + "/ibc.core.client.v1.Msg/UpdateClientParams", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.client.v1.Query", "UpgradedConsensusState"), - ); + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClientParams")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// ClientState queries an IBC light client. - async fn client_state( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ClientStates queries all the IBC light clients of a chain. - async fn client_states( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// ConsensusState queries a consensus state associated with a client state at - /// a given height. - async fn consensus_state( + pub trait Msg: Send + Sync + 'static { + /// CreateClient defines a rpc handler method for MsgCreateClient. + async fn create_client( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConsensusStates queries all the consensus state associated with a given - /// client. - async fn consensus_states( + /// UpdateClient defines a rpc handler method for MsgUpdateClient. + async fn update_client( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConsensusStateHeights queries the height of every consensus states associated with a given client. - async fn consensus_state_heights( + /// UpgradeClient defines a rpc handler method for MsgUpgradeClient. + async fn upgrade_client( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Status queries the status of an IBC client. - async fn client_status( + /// SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. + async fn submit_misbehaviour( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ClientParams queries all parameters of the ibc client submodule. - async fn client_params( + /// RecoverClient defines a rpc handler method for MsgRecoverClient. + async fn recover_client( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpgradedClientState queries an Upgraded IBC light client. - async fn upgraded_client_state( + /// IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. + async fn ibc_software_upgrade( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpgradedConsensusState queries an Upgraded IBC consensus state. - async fn upgraded_consensus_state( + /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. + async fn update_client_params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query provides defines the gRPC querier service + /// Msg defines the ibc/client Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -2027,7 +2138,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -2079,9 +2190,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -2097,117 +2208,23 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.core.client.v1.Query/ClientState" => { - #[allow(non_camel_case_types)] - struct ClientStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClientStateSvc { - type Response = super::QueryClientStateResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::client_state(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClientStateSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.client.v1.Query/ClientStates" => { - #[allow(non_camel_case_types)] - struct ClientStatesSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClientStatesSvc { - type Response = super::QueryClientStatesResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::client_states(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ClientStatesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.client.v1.Query/ConsensusState" => { + "/ibc.core.client.v1.Msg/CreateClient" => { #[allow(non_camel_case_types)] - struct ConsensusStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ConsensusStateSvc { - type Response = super::QueryConsensusStateResponse; + struct CreateClientSvc(pub Arc); + impl tonic::server::UnaryService + for CreateClientSvc { + type Response = super::MsgCreateClientResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::consensus_state(&inner, request).await + ::create_client(&inner, request).await }; Box::pin(fut) } @@ -2219,7 +2236,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConsensusStateSvc(inner); + let method = CreateClientSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2235,25 +2252,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Query/ConsensusStates" => { + "/ibc.core.client.v1.Msg/UpdateClient" => { #[allow(non_camel_case_types)] - struct ConsensusStatesSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ConsensusStatesSvc { - type Response = super::QueryConsensusStatesResponse; + struct UpdateClientSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateClientSvc { + type Response = super::MsgUpdateClientResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::consensus_states(&inner, request).await + ::update_client(&inner, request).await }; Box::pin(fut) } @@ -2265,7 +2280,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConsensusStatesSvc(inner); + let method = UpdateClientSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2281,28 +2296,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Query/ConsensusStateHeights" => { + "/ibc.core.client.v1.Msg/UpgradeClient" => { #[allow(non_camel_case_types)] - struct ConsensusStateHeightsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryConsensusStateHeightsRequest, - > for ConsensusStateHeightsSvc { - type Response = super::QueryConsensusStateHeightsResponse; + struct UpgradeClientSvc(pub Arc); + impl tonic::server::UnaryService + for UpgradeClientSvc { + type Response = super::MsgUpgradeClientResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryConsensusStateHeightsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::consensus_state_heights(&inner, request).await + ::upgrade_client(&inner, request).await }; Box::pin(fut) } @@ -2314,7 +2324,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConsensusStateHeightsSvc(inner); + let method = UpgradeClientSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2330,25 +2340,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Query/ClientStatus" => { + "/ibc.core.client.v1.Msg/SubmitMisbehaviour" => { #[allow(non_camel_case_types)] - struct ClientStatusSvc(pub Arc); + struct SubmitMisbehaviourSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService - for ClientStatusSvc { - type Response = super::QueryClientStatusResponse; + T: Msg, + > tonic::server::UnaryService + for SubmitMisbehaviourSvc { + type Response = super::MsgSubmitMisbehaviourResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::client_status(&inner, request).await + ::submit_misbehaviour(&inner, request).await }; Box::pin(fut) } @@ -2360,7 +2370,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ClientStatusSvc(inner); + let method = SubmitMisbehaviourSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2376,25 +2386,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Query/ClientParams" => { + "/ibc.core.client.v1.Msg/RecoverClient" => { #[allow(non_camel_case_types)] - struct ClientParamsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClientParamsSvc { - type Response = super::QueryClientParamsResponse; + struct RecoverClientSvc(pub Arc); + impl tonic::server::UnaryService + for RecoverClientSvc { + type Response = super::MsgRecoverClientResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::client_params(&inner, request).await + ::recover_client(&inner, request).await }; Box::pin(fut) } @@ -2406,7 +2414,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ClientParamsSvc(inner); + let method = RecoverClientSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2422,27 +2430,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Query/UpgradedClientState" => { + "/ibc.core.client.v1.Msg/IBCSoftwareUpgrade" => { #[allow(non_camel_case_types)] - struct UpgradedClientStateSvc(pub Arc); + struct IBCSoftwareUpgradeSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService - for UpgradedClientStateSvc { - type Response = super::QueryUpgradedClientStateResponse; + T: Msg, + > tonic::server::UnaryService + for IBCSoftwareUpgradeSvc { + type Response = super::MsgIbcSoftwareUpgradeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryUpgradedClientStateRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::upgraded_client_state(&inner, request).await + ::ibc_software_upgrade(&inner, request).await }; Box::pin(fut) } @@ -2454,7 +2460,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpgradedClientStateSvc(inner); + let method = IBCSoftwareUpgradeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2470,29 +2476,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.client.v1.Query/UpgradedConsensusState" => { + "/ibc.core.client.v1.Msg/UpdateClientParams" => { #[allow(non_camel_case_types)] - struct UpgradedConsensusStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryUpgradedConsensusStateRequest, - > for UpgradedConsensusStateSvc { - type Response = super::QueryUpgradedConsensusStateResponse; + struct UpdateClientParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateClientParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryUpgradedConsensusStateRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::upgraded_consensus_state(&inner, request) - .await + ::update_client_params(&inner, request).await }; Box::pin(fut) } @@ -2504,7 +2504,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpgradedConsensusStateSvc(inner); + let method = UpdateClientParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2535,7 +2535,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2547,7 +2547,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2557,7 +2557,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.core.client.v1.Query"; + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.core.client.v1.Msg"; } } diff --git a/src/prost/ibc.core.connection.v1.rs b/src/prost/ibc.core.connection.v1.rs index 01a54671..96192f83 100644 --- a/src/prost/ibc.core.connection.v1.rs +++ b/src/prost/ibc.core.connection.v1.rs @@ -227,213 +227,232 @@ impl ::prost::Name for GenesisState { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -/// initialize a connection with Chain B. +/// QueryConnectionRequest is the request type for the Query/Connection RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenInit { +pub struct QueryConnectionRequest { + /// connection unique identifier #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub counterparty: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(uint64, tag = "4")] - pub delay_period: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, + pub connection_id: ::prost::alloc::string::String, } -impl ::prost::Name for MsgConnectionOpenInit { - const NAME: &'static str = "MsgConnectionOpenInit"; +impl ::prost::Name for QueryConnectionRequest { + const NAME: &'static str = "QueryConnectionRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -/// type. +/// QueryConnectionResponse is the response type for the Query/Connection RPC +/// method. Besides the connection end, it includes a proof and the height from +/// which the proof was retrieved. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenInitResponse {} -impl ::prost::Name for MsgConnectionOpenInitResponse { - const NAME: &'static str = "MsgConnectionOpenInitResponse"; +pub struct QueryConnectionResponse { + /// connection associated with the request identifier + #[prost(message, optional, tag = "1")] + pub connection: ::core::option::Option, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryConnectionResponse { + const NAME: &'static str = "QueryConnectionResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -/// connection on Chain B. +/// QueryConnectionsRequest is the request type for the Query/Connections RPC +/// method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenTry { - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, - /// Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. - #[deprecated] - #[prost(string, tag = "2")] - pub previous_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub client_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, +pub struct QueryConnectionsRequest { + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, >, - #[prost(message, optional, tag = "4")] - pub counterparty: ::core::option::Option, - #[prost(uint64, tag = "5")] - pub delay_period: u64, - #[prost(message, repeated, tag = "6")] - pub counterparty_versions: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "7")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain A: `UNITIALIZED -> - /// INIT` - #[prost(bytes = "vec", tag = "8")] - pub proof_init: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "9")] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "10")] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "11")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "12")] - pub signer: ::prost::alloc::string::String, - /// optional proof data for host state machines that are unable to introspect their own consensus state - #[prost(bytes = "vec", tag = "13")] - pub host_consensus_state_proof: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgConnectionOpenTry { - const NAME: &'static str = "MsgConnectionOpenTry"; +impl ::prost::Name for QueryConnectionsRequest { + const NAME: &'static str = "QueryConnectionsRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. +/// QueryConnectionsResponse is the response type for the Query/Connections RPC +/// method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenTryResponse {} -impl ::prost::Name for MsgConnectionOpenTryResponse { - const NAME: &'static str = "MsgConnectionOpenTryResponse"; +pub struct QueryConnectionsResponse { + /// list of stored connections of the chain. + #[prost(message, repeated, tag = "1")] + pub connections: ::prost::alloc::vec::Vec, + /// pagination response + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, + /// query block height + #[prost(message, optional, tag = "3")] + pub height: ::core::option::Option, +} +impl ::prost::Name for QueryConnectionsResponse { + const NAME: &'static str = "QueryConnectionsResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -/// acknowledge the change of connection state to TRYOPEN on Chain B. +/// QueryClientConnectionsRequest is the request type for the +/// Query/ClientConnections RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenAck { +pub struct QueryClientConnectionsRequest { + /// client identifier associated with a connection #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub counterparty_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub client_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain B: `UNITIALIZED -> - /// TRYOPEN` - #[prost(bytes = "vec", tag = "6")] - pub proof_try: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "7")] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "8")] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "9")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "10")] - pub signer: ::prost::alloc::string::String, - /// optional proof data for host state machines that are unable to introspect their own consensus state - #[prost(bytes = "vec", tag = "11")] - pub host_consensus_state_proof: ::prost::alloc::vec::Vec, + pub client_id: ::prost::alloc::string::String, } -impl ::prost::Name for MsgConnectionOpenAck { - const NAME: &'static str = "MsgConnectionOpenAck"; +impl ::prost::Name for QueryClientConnectionsRequest { + const NAME: &'static str = "QueryClientConnectionsRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. +/// QueryClientConnectionsResponse is the response type for the +/// Query/ClientConnections RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenAckResponse {} -impl ::prost::Name for MsgConnectionOpenAckResponse { - const NAME: &'static str = "MsgConnectionOpenAckResponse"; +pub struct QueryClientConnectionsResponse { + /// slice of all the connection paths associated with a client. + #[prost(string, repeated, tag = "1")] + pub connection_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was generated + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} +impl ::prost::Name for QueryClientConnectionsResponse { + const NAME: &'static str = "QueryClientConnectionsResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of connection state to OPEN on Chain A. +/// QueryConnectionClientStateRequest is the request type for the +/// Query/ConnectionClientState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenConfirm { +pub struct QueryConnectionClientStateRequest { + /// connection identifier #[prost(string, tag = "1")] pub connection_id: ::prost::alloc::string::String, - /// proof for the change of the connection state on Chain A: `INIT -> OPEN` +} +impl ::prost::Name for QueryConnectionClientStateRequest { + const NAME: &'static str = "QueryConnectionClientStateRequest"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// QueryConnectionClientStateResponse is the response type for the +/// Query/ConnectionClientState RPC method +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryConnectionClientStateResponse { + /// client state associated with the channel + #[prost(message, optional, tag = "1")] + pub identified_client_state: ::core::option::Option< + super::super::client::v1::IdentifiedClientState, + >, + /// merkle proof of existence #[prost(bytes = "vec", tag = "2")] - pub proof_ack: ::prost::alloc::vec::Vec, + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for MsgConnectionOpenConfirm { - const NAME: &'static str = "MsgConnectionOpenConfirm"; +impl ::prost::Name for QueryConnectionClientStateResponse { + const NAME: &'static str = "QueryConnectionClientStateResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -/// response type. +/// QueryConnectionConsensusStateRequest is the request type for the +/// Query/ConnectionConsensusState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgConnectionOpenConfirmResponse {} -impl ::prost::Name for MsgConnectionOpenConfirmResponse { - const NAME: &'static str = "MsgConnectionOpenConfirmResponse"; +pub struct QueryConnectionConsensusStateRequest { + /// connection identifier + #[prost(string, tag = "1")] + pub connection_id: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub revision_number: u64, + #[prost(uint64, tag = "3")] + pub revision_height: u64, +} +impl ::prost::Name for QueryConnectionConsensusStateRequest { + const NAME: &'static str = "QueryConnectionConsensusStateRequest"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. +/// QueryConnectionConsensusStateResponse is the response type for the +/// Query/ConnectionConsensusState RPC method #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the connection parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, +pub struct QueryConnectionConsensusStateResponse { + /// consensus state associated with the channel + #[prost(message, optional, tag = "1")] + pub consensus_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + /// client ID associated with the consensus state + #[prost(string, tag = "2")] + pub client_id: ::prost::alloc::string::String, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "3")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "4")] + pub proof_height: ::core::option::Option, } -impl ::prost::Name for MsgUpdateParams { - const NAME: &'static str = "MsgUpdateParams"; +impl ::prost::Name for QueryConnectionConsensusStateResponse { + const NAME: &'static str = "QueryConnectionConsensusStateResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +/// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgUpdateParamsResponse {} -impl ::prost::Name for MsgUpdateParamsResponse { - const NAME: &'static str = "MsgUpdateParamsResponse"; +pub struct QueryConnectionParamsRequest {} +impl ::prost::Name for QueryConnectionParamsRequest { + const NAME: &'static str = "QueryConnectionParamsRequest"; + const PACKAGE: &'static str = "ibc.core.connection.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) + } +} +/// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryConnectionParamsResponse { + /// params defines the parameters of the module. + #[prost(message, optional, tag = "1")] + pub params: ::core::option::Option, +} +impl ::prost::Name for QueryConnectionParamsResponse { + const NAME: &'static str = "QueryConnectionParamsResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) @@ -441,16 +460,16 @@ impl ::prost::Name for MsgUpdateParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the ibc/connection Msg service. + /// Query provides defines the gRPC querier service #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -461,7 +480,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -479,7 +498,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -493,7 +512,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -526,12 +545,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. - pub async fn connection_open_init( + /// Connection queries an IBC connection end. + pub async fn connection( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -545,21 +564,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenInit", + "/ibc.core.connection.v1.Query/Connection", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenInit"), - ); + .insert(GrpcMethod::new("ibc.core.connection.v1.Query", "Connection")); self.inner.unary(req, path, codec).await } - /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. - pub async fn connection_open_try( + /// Connections queries all the IBC connections of a chain. + pub async fn connections( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -573,21 +590,20 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenTry", + "/ibc.core.connection.v1.Query/Connections", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenTry"), - ); + .insert(GrpcMethod::new("ibc.core.connection.v1.Query", "Connections")); self.inner.unary(req, path, codec).await } - /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. - pub async fn connection_open_ack( + /// ClientConnections queries the connection paths associated with a client + /// state. + pub async fn client_connections( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -601,22 +617,22 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenAck", + "/ibc.core.connection.v1.Query/ClientConnections", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenAck"), + GrpcMethod::new("ibc.core.connection.v1.Query", "ClientConnections"), ); self.inner.unary(req, path, codec).await } - /// ConnectionOpenConfirm defines a rpc handler method for - /// MsgConnectionOpenConfirm. - pub async fn connection_open_confirm( + /// ConnectionClientState queries the client state associated with the + /// connection. + pub async fn connection_client_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -630,25 +646,25 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm", + "/ibc.core.connection.v1.Query/ConnectionClientState", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "ConnectionOpenConfirm", + "ibc.core.connection.v1.Query", + "ConnectionClientState", ), ); self.inner.unary(req, path, codec).await } - /// UpdateConnectionParams defines a rpc handler method for - /// MsgUpdateParams. - pub async fn update_connection_params( + /// ConnectionConsensusState queries the consensus state associated with the + /// connection. + pub async fn connection_consensus_state( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -662,74 +678,111 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Msg/UpdateConnectionParams", + "/ibc.core.connection.v1.Query/ConnectionConsensusState", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.core.connection.v1.Msg", - "UpdateConnectionParams", + "ibc.core.connection.v1.Query", + "ConnectionConsensusState", ), ); self.inner.unary(req, path, codec).await } + /// ConnectionParams queries all parameters of the ibc connection submodule. + pub async fn connection_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.core.connection.v1.Query/ConnectionParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.core.connection.v1.Query", "ConnectionParams"), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. - async fn connection_open_init( + pub trait Query: Send + Sync + 'static { + /// Connection queries an IBC connection end. + async fn connection( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. - async fn connection_open_try( + /// Connections queries all the IBC connections of a chain. + async fn connections( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. - async fn connection_open_ack( + /// ClientConnections queries the connection paths associated with a client + /// state. + async fn client_connections( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConnectionOpenConfirm defines a rpc handler method for - /// MsgConnectionOpenConfirm. - async fn connection_open_confirm( + /// ConnectionClientState queries the client state associated with the + /// connection. + async fn connection_client_state( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// UpdateConnectionParams defines a rpc handler method for - /// MsgUpdateParams. - async fn update_connection_params( + /// ConnectionConsensusState queries the consensus state associated with the + /// connection. + async fn connection_consensus_state( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// ConnectionParams queries all parameters of the ibc connection submodule. + async fn connection_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Msg defines the ibc/connection Msg service. + /// Query provides defines the gRPC querier service #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -737,7 +790,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -789,9 +842,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -807,25 +860,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.core.connection.v1.Msg/ConnectionOpenInit" => { + "/ibc.core.connection.v1.Query/Connection" => { #[allow(non_camel_case_types)] - struct ConnectionOpenInitSvc(pub Arc); + struct ConnectionSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for ConnectionOpenInitSvc { - type Response = super::MsgConnectionOpenInitResponse; + T: Query, + > tonic::server::UnaryService + for ConnectionSvc { + type Response = super::QueryConnectionResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_open_init(&inner, request).await + ::connection(&inner, request).await }; Box::pin(fut) } @@ -837,7 +890,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionOpenInitSvc(inner); + let method = ConnectionSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -853,23 +906,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Msg/ConnectionOpenTry" => { + "/ibc.core.connection.v1.Query/Connections" => { #[allow(non_camel_case_types)] - struct ConnectionOpenTrySvc(pub Arc); - impl tonic::server::UnaryService - for ConnectionOpenTrySvc { - type Response = super::MsgConnectionOpenTryResponse; + struct ConnectionsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ConnectionsSvc { + type Response = super::QueryConnectionsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_open_try(&inner, request).await + ::connections(&inner, request).await }; Box::pin(fut) } @@ -881,7 +936,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionOpenTrySvc(inner); + let method = ConnectionsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -897,23 +952,25 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Msg/ConnectionOpenAck" => { + "/ibc.core.connection.v1.Query/ClientConnections" => { #[allow(non_camel_case_types)] - struct ConnectionOpenAckSvc(pub Arc); - impl tonic::server::UnaryService - for ConnectionOpenAckSvc { - type Response = super::MsgConnectionOpenAckResponse; + struct ClientConnectionsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ClientConnectionsSvc { + type Response = super::QueryClientConnectionsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_open_ack(&inner, request).await + ::client_connections(&inner, request).await }; Box::pin(fut) } @@ -925,7 +982,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionOpenAckSvc(inner); + let method = ClientConnectionsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -941,25 +998,28 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm" => { + "/ibc.core.connection.v1.Query/ConnectionClientState" => { #[allow(non_camel_case_types)] - struct ConnectionOpenConfirmSvc(pub Arc); + struct ConnectionClientStateSvc(pub Arc); impl< - T: Msg, - > tonic::server::UnaryService - for ConnectionOpenConfirmSvc { - type Response = super::MsgConnectionOpenConfirmResponse; + T: Query, + > tonic::server::UnaryService< + super::QueryConnectionClientStateRequest, + > for ConnectionClientStateSvc { + type Response = super::QueryConnectionClientStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryConnectionClientStateRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_open_confirm(&inner, request).await + ::connection_client_state(&inner, request).await }; Box::pin(fut) } @@ -971,7 +1031,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionOpenConfirmSvc(inner); + let method = ConnectionClientStateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -987,23 +1047,29 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Msg/UpdateConnectionParams" => { + "/ibc.core.connection.v1.Query/ConnectionConsensusState" => { #[allow(non_camel_case_types)] - struct UpdateConnectionParamsSvc(pub Arc); - impl tonic::server::UnaryService - for UpdateConnectionParamsSvc { - type Response = super::MsgUpdateParamsResponse; + struct ConnectionConsensusStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryConnectionConsensusStateRequest, + > for ConnectionConsensusStateSvc { + type Response = super::QueryConnectionConsensusStateResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::QueryConnectionConsensusStateRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::update_connection_params(&inner, request).await + ::connection_consensus_state(&inner, request) + .await }; Box::pin(fut) } @@ -1015,7 +1081,53 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = UpdateConnectionParamsSvc(inner); + let method = ConnectionConsensusStateSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.connection.v1.Query/ConnectionParams" => { + #[allow(non_camel_case_types)] + struct ConnectionParamsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ConnectionParamsSvc { + type Response = super::QueryConnectionParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::connection_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = ConnectionParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1046,7 +1158,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1058,7 +1170,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -1068,236 +1180,217 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.core.connection.v1.Msg"; + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.core.connection.v1.Query"; } } -/// QueryConnectionRequest is the request type for the Query/Connection RPC -/// method +/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to +/// initialize a connection with Chain B. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionRequest { - /// connection unique identifier +pub struct MsgConnectionOpenInit { #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryConnectionRequest { - const NAME: &'static str = "QueryConnectionRequest"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } -} -/// QueryConnectionResponse is the response type for the Query/Connection RPC -/// method. Besides the connection end, it includes a proof and the height from -/// which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionResponse { - /// connection associated with the request identifier - #[prost(message, optional, tag = "1")] - pub connection: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved + pub client_id: ::prost::alloc::string::String, + #[prost(message, optional, tag = "2")] + pub counterparty: ::core::option::Option, #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, + pub version: ::core::option::Option, + #[prost(uint64, tag = "4")] + pub delay_period: u64, + #[prost(string, tag = "5")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConnectionResponse { - const NAME: &'static str = "QueryConnectionResponse"; +impl ::prost::Name for MsgConnectionOpenInit { + const NAME: &'static str = "MsgConnectionOpenInit"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionsRequest is the request type for the Query/Connections RPC -/// method +/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response +/// type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionsRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -impl ::prost::Name for QueryConnectionsRequest { - const NAME: &'static str = "QueryConnectionsRequest"; +pub struct MsgConnectionOpenInitResponse {} +impl ::prost::Name for MsgConnectionOpenInitResponse { + const NAME: &'static str = "MsgConnectionOpenInitResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionsResponse is the response type for the Query/Connections RPC -/// method. +/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a +/// connection on Chain B. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionsResponse { - /// list of stored connections of the chain. - #[prost(message, repeated, tag = "1")] - pub connections: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height +pub struct MsgConnectionOpenTry { + #[prost(string, tag = "1")] + pub client_id: ::prost::alloc::string::String, + /// Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. + #[deprecated] + #[prost(string, tag = "2")] + pub previous_connection_id: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, + pub client_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + #[prost(message, optional, tag = "4")] + pub counterparty: ::core::option::Option, + #[prost(uint64, tag = "5")] + pub delay_period: u64, + #[prost(message, repeated, tag = "6")] + pub counterparty_versions: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "7")] + pub proof_height: ::core::option::Option, + /// proof of the initialization the connection on Chain A: `UNITIALIZED -> + /// INIT` + #[prost(bytes = "vec", tag = "8")] + pub proof_init: ::prost::alloc::vec::Vec, + /// proof of client state included in message + #[prost(bytes = "vec", tag = "9")] + pub proof_client: ::prost::alloc::vec::Vec, + /// proof of client consensus state + #[prost(bytes = "vec", tag = "10")] + pub proof_consensus: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "11")] + pub consensus_height: ::core::option::Option, + #[prost(string, tag = "12")] + pub signer: ::prost::alloc::string::String, + /// optional proof data for host state machines that are unable to introspect their own consensus state + #[prost(bytes = "vec", tag = "13")] + pub host_consensus_state_proof: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryConnectionsResponse { - const NAME: &'static str = "QueryConnectionsResponse"; +impl ::prost::Name for MsgConnectionOpenTry { + const NAME: &'static str = "MsgConnectionOpenTry"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryClientConnectionsRequest is the request type for the -/// Query/ClientConnections RPC method +/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientConnectionsRequest { - /// client identifier associated with a connection - #[prost(string, tag = "1")] - pub client_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryClientConnectionsRequest { - const NAME: &'static str = "QueryClientConnectionsRequest"; +pub struct MsgConnectionOpenTryResponse {} +impl ::prost::Name for MsgConnectionOpenTryResponse { + const NAME: &'static str = "MsgConnectionOpenTryResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryClientConnectionsResponse is the response type for the -/// Query/ClientConnections RPC method +/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to +/// acknowledge the change of connection state to TRYOPEN on Chain B. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryClientConnectionsResponse { - /// slice of all the connection paths associated with a client. - #[prost(string, repeated, tag = "1")] - pub connection_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was generated +pub struct MsgConnectionOpenAck { + #[prost(string, tag = "1")] + pub connection_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub counterparty_connection_id: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] + pub version: ::core::option::Option, + #[prost(message, optional, tag = "4")] + pub client_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + #[prost(message, optional, tag = "5")] pub proof_height: ::core::option::Option, + /// proof of the initialization the connection on Chain B: `UNITIALIZED -> + /// TRYOPEN` + #[prost(bytes = "vec", tag = "6")] + pub proof_try: ::prost::alloc::vec::Vec, + /// proof of client state included in message + #[prost(bytes = "vec", tag = "7")] + pub proof_client: ::prost::alloc::vec::Vec, + /// proof of client consensus state + #[prost(bytes = "vec", tag = "8")] + pub proof_consensus: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "9")] + pub consensus_height: ::core::option::Option, + #[prost(string, tag = "10")] + pub signer: ::prost::alloc::string::String, + /// optional proof data for host state machines that are unable to introspect their own consensus state + #[prost(bytes = "vec", tag = "11")] + pub host_consensus_state_proof: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryClientConnectionsResponse { - const NAME: &'static str = "QueryClientConnectionsResponse"; +impl ::prost::Name for MsgConnectionOpenAck { + const NAME: &'static str = "MsgConnectionOpenAck"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionClientStateRequest is the request type for the -/// Query/ConnectionClientState RPC method +/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionClientStateRequest { - /// connection identifier - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryConnectionClientStateRequest { - const NAME: &'static str = "QueryConnectionClientStateRequest"; +pub struct MsgConnectionOpenAckResponse {} +impl ::prost::Name for MsgConnectionOpenAckResponse { + const NAME: &'static str = "MsgConnectionOpenAckResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionClientStateResponse is the response type for the -/// Query/ConnectionClientState RPC method +/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to +/// acknowledge the change of connection state to OPEN on Chain A. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: ::core::option::Option< - super::super::client::v1::IdentifiedClientState, - >, - /// merkle proof of existence +pub struct MsgConnectionOpenConfirm { + #[prost(string, tag = "1")] + pub connection_id: ::prost::alloc::string::String, + /// proof for the change of the connection state on Chain A: `INIT -> OPEN` #[prost(bytes = "vec", tag = "2")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved + pub proof_ack: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, + #[prost(string, tag = "4")] + pub signer: ::prost::alloc::string::String, } -impl ::prost::Name for QueryConnectionClientStateResponse { - const NAME: &'static str = "QueryConnectionClientStateResponse"; +impl ::prost::Name for MsgConnectionOpenConfirm { + const NAME: &'static str = "MsgConnectionOpenConfirm"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionConsensusStateRequest is the request type for the -/// Query/ConnectionConsensusState RPC method +/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm +/// response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionConsensusStateRequest { - /// connection identifier - #[prost(string, tag = "1")] - pub connection_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - pub revision_number: u64, - #[prost(uint64, tag = "3")] - pub revision_height: u64, -} -impl ::prost::Name for QueryConnectionConsensusStateRequest { - const NAME: &'static str = "QueryConnectionConsensusStateRequest"; +pub struct MsgConnectionOpenConfirmResponse {} +impl ::prost::Name for MsgConnectionOpenConfirmResponse { + const NAME: &'static str = "MsgConnectionOpenConfirmResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionConsensusStateResponse is the response type for the -/// Query/ConnectionConsensusState RPC method +/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option< - super::super::super::super::google::protobuf::Any, - >, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -impl ::prost::Name for QueryConnectionConsensusStateResponse { - const NAME: &'static str = "QueryConnectionConsensusStateResponse"; - const PACKAGE: &'static str = "ibc.core.connection.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) - } +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the connection parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, } -/// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionParamsRequest {} -impl ::prost::Name for QueryConnectionParamsRequest { - const NAME: &'static str = "QueryConnectionParamsRequest"; +impl ::prost::Name for MsgUpdateParams { + const NAME: &'static str = "MsgUpdateParams"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) } } -/// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. +/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConnectionParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -impl ::prost::Name for QueryConnectionParamsResponse { - const NAME: &'static str = "QueryConnectionParamsResponse"; +pub struct MsgUpdateParamsResponse {} +impl ::prost::Name for MsgUpdateParamsResponse { + const NAME: &'static str = "MsgUpdateParamsResponse"; const PACKAGE: &'static str = "ibc.core.connection.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.core.connection.v1.{}", Self::NAME) @@ -1305,16 +1398,16 @@ impl ::prost::Name for QueryConnectionParamsResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query provides defines the gRPC querier service + /// Msg defines the ibc/connection Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -1325,7 +1418,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -1343,7 +1436,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -1357,7 +1450,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -1390,38 +1483,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Connection queries an IBC connection end. - pub async fn connection( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/Connection", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.connection.v1.Query", "Connection")); - self.inner.unary(req, path, codec).await - } - /// Connections queries all the IBC connections of a chain. - pub async fn connections( + /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. + pub async fn connection_open_init( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1435,20 +1502,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/Connections", + "/ibc.core.connection.v1.Msg/ConnectionOpenInit", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.core.connection.v1.Query", "Connections")); + .insert( + GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenInit"), + ); self.inner.unary(req, path, codec).await } - /// ClientConnections queries the connection paths associated with a client - /// state. - pub async fn client_connections( + /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. + pub async fn connection_open_try( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1462,22 +1530,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ClientConnections", + "/ibc.core.connection.v1.Msg/ConnectionOpenTry", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.connection.v1.Query", "ClientConnections"), + GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenTry"), ); self.inner.unary(req, path, codec).await } - /// ConnectionClientState queries the client state associated with the - /// connection. - pub async fn connection_client_state( + /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. + pub async fn connection_open_ack( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1491,25 +1558,22 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ConnectionClientState", + "/ibc.core.connection.v1.Msg/ConnectionOpenAck", ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionClientState", - ), + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenAck"), ); self.inner.unary(req, path, codec).await } - /// ConnectionConsensusState queries the consensus state associated with the - /// connection. - pub async fn connection_consensus_state( + /// ConnectionOpenConfirm defines a rpc handler method for + /// MsgConnectionOpenConfirm. + pub async fn connection_open_confirm( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1523,24 +1587,25 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ConnectionConsensusState", + "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm", ); let mut req = request.into_request(); req.extensions_mut() .insert( GrpcMethod::new( - "ibc.core.connection.v1.Query", - "ConnectionConsensusState", + "ibc.core.connection.v1.Msg", + "ConnectionOpenConfirm", ), ); self.inner.unary(req, path, codec).await } - /// ConnectionParams queries all parameters of the ibc connection submodule. - pub async fn connection_params( + /// UpdateConnectionParams defines a rpc handler method for + /// MsgUpdateParams. + pub async fn update_connection_params( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -1554,12 +1619,15 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.core.connection.v1.Query/ConnectionParams", + "/ibc.core.connection.v1.Msg/UpdateConnectionParams", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.core.connection.v1.Query", "ConnectionParams"), + GrpcMethod::new( + "ibc.core.connection.v1.Msg", + "UpdateConnectionParams", + ), ); self.inner.unary(req, path, codec).await } @@ -1567,67 +1635,58 @@ pub mod query_client { } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Connection queries an IBC connection end. - async fn connection( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// Connections queries all the IBC connections of a chain. - async fn connections( + pub trait Msg: Send + Sync + 'static { + /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. + async fn connection_open_init( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ClientConnections queries the connection paths associated with a client - /// state. - async fn client_connections( + /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. + async fn connection_open_try( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConnectionClientState queries the client state associated with the - /// connection. - async fn connection_client_state( + /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. + async fn connection_open_ack( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConnectionConsensusState queries the consensus state associated with the - /// connection. - async fn connection_consensus_state( + /// ConnectionOpenConfirm defines a rpc handler method for + /// MsgConnectionOpenConfirm. + async fn connection_open_confirm( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// ConnectionParams queries all parameters of the ibc connection submodule. - async fn connection_params( + /// UpdateConnectionParams defines a rpc handler method for + /// MsgUpdateParams. + async fn update_connection_params( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Query provides defines the gRPC querier service + /// Msg defines the ibc/connection Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -1635,7 +1694,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1687,9 +1746,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -1705,71 +1764,25 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.core.connection.v1.Query/Connection" => { - #[allow(non_camel_case_types)] - struct ConnectionSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ConnectionSvc { - type Response = super::QueryConnectionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::connection(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = ConnectionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.core.connection.v1.Query/Connections" => { + "/ibc.core.connection.v1.Msg/ConnectionOpenInit" => { #[allow(non_camel_case_types)] - struct ConnectionsSvc(pub Arc); + struct ConnectionOpenInitSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService - for ConnectionsSvc { - type Response = super::QueryConnectionsResponse; + T: Msg, + > tonic::server::UnaryService + for ConnectionOpenInitSvc { + type Response = super::MsgConnectionOpenInitResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connections(&inner, request).await + ::connection_open_init(&inner, request).await }; Box::pin(fut) } @@ -1781,7 +1794,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionsSvc(inner); + let method = ConnectionOpenInitSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1797,25 +1810,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Query/ClientConnections" => { + "/ibc.core.connection.v1.Msg/ConnectionOpenTry" => { #[allow(non_camel_case_types)] - struct ClientConnectionsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ClientConnectionsSvc { - type Response = super::QueryClientConnectionsResponse; + struct ConnectionOpenTrySvc(pub Arc); + impl tonic::server::UnaryService + for ConnectionOpenTrySvc { + type Response = super::MsgConnectionOpenTryResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::client_connections(&inner, request).await + ::connection_open_try(&inner, request).await }; Box::pin(fut) } @@ -1827,7 +1838,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ClientConnectionsSvc(inner); + let method = ConnectionOpenTrySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1843,28 +1854,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Query/ConnectionClientState" => { + "/ibc.core.connection.v1.Msg/ConnectionOpenAck" => { #[allow(non_camel_case_types)] - struct ConnectionClientStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService< - super::QueryConnectionClientStateRequest, - > for ConnectionClientStateSvc { - type Response = super::QueryConnectionClientStateResponse; + struct ConnectionOpenAckSvc(pub Arc); + impl tonic::server::UnaryService + for ConnectionOpenAckSvc { + type Response = super::MsgConnectionOpenAckResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryConnectionClientStateRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_client_state(&inner, request).await + ::connection_open_ack(&inner, request).await }; Box::pin(fut) } @@ -1876,7 +1882,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionClientStateSvc(inner); + let method = ConnectionOpenAckSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1892,29 +1898,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Query/ConnectionConsensusState" => { + "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm" => { #[allow(non_camel_case_types)] - struct ConnectionConsensusStateSvc(pub Arc); + struct ConnectionOpenConfirmSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService< - super::QueryConnectionConsensusStateRequest, - > for ConnectionConsensusStateSvc { - type Response = super::QueryConnectionConsensusStateResponse; + T: Msg, + > tonic::server::UnaryService + for ConnectionOpenConfirmSvc { + type Response = super::MsgConnectionOpenConfirmResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryConnectionConsensusStateRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_consensus_state(&inner, request) - .await + ::connection_open_confirm(&inner, request).await }; Box::pin(fut) } @@ -1926,7 +1928,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionConsensusStateSvc(inner); + let method = ConnectionOpenConfirmSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -1942,25 +1944,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.core.connection.v1.Query/ConnectionParams" => { + "/ibc.core.connection.v1.Msg/UpdateConnectionParams" => { #[allow(non_camel_case_types)] - struct ConnectionParamsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ConnectionParamsSvc { - type Response = super::QueryConnectionParamsResponse; + struct UpdateConnectionParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateConnectionParamsSvc { + type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::connection_params(&inner, request).await + ::update_connection_params(&inner, request).await }; Box::pin(fut) } @@ -1972,7 +1972,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ConnectionParamsSvc(inner); + let method = UpdateConnectionParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2003,7 +2003,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2015,7 +2015,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2025,7 +2025,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.core.connection.v1.Query"; + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.core.connection.v1.Msg"; } } diff --git a/src/prost/ibc.lightclients.tendermint.v1.rs b/src/prost/ibc.lightclients.tendermint.v1.rs index 751b07f3..fda4aeef 100644 --- a/src/prost/ibc.lightclients.tendermint.v1.rs +++ b/src/prost/ibc.lightclients.tendermint.v1.rs @@ -125,16 +125,16 @@ impl ::prost::Name for Misbehaviour { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Header { #[prost(message, optional, tag = "1")] - pub signed_header: ::core::option::Option<::cometbft_proto::types::SignedHeader>, + pub signed_header: ::core::option::Option<::cometbft_proto::types::v1::SignedHeader>, #[prost(message, optional, tag = "2")] - pub validator_set: ::core::option::Option<::cometbft_proto::types::ValidatorSet>, + pub validator_set: ::core::option::Option<::cometbft_proto::types::v1::ValidatorSet>, #[prost(message, optional, tag = "3")] pub trusted_height: ::core::option::Option< super::super::super::core::client::v1::Height, >, #[prost(message, optional, tag = "4")] pub trusted_validators: ::core::option::Option< - ::cometbft_proto::types::ValidatorSet, + ::cometbft_proto::types::v1::ValidatorSet, >, } impl ::prost::Name for Header { diff --git a/src/prost/ibc.lightclients.wasm.v1.rs b/src/prost/ibc.lightclients.wasm.v1.rs index 0d4a2936..ff580f78 100644 --- a/src/prost/ibc.lightclients.wasm.v1.rs +++ b/src/prost/ibc.lightclients.wasm.v1.rs @@ -1,95 +1,94 @@ -/// MsgStoreCode defines the request type for the StoreCode rpc. +/// GenesisState defines 08-wasm's keeper genesis state #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCode { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// wasm byte code of light client contract. It can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - pub wasm_byte_code: ::prost::alloc::vec::Vec, +pub struct GenesisState { + /// uploaded light client wasm contracts + #[prost(message, repeated, tag = "1")] + pub contracts: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgStoreCode { - const NAME: &'static str = "MsgStoreCode"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// MsgStoreCodeResponse defines the response type for the StoreCode rpc +/// Contract stores contract code #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgStoreCodeResponse { - /// checksum is the sha256 hash of the stored code +pub struct Contract { + /// contract byte code #[prost(bytes = "vec", tag = "1")] - pub checksum: ::prost::alloc::vec::Vec, + pub code_bytes: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MsgStoreCodeResponse { - const NAME: &'static str = "MsgStoreCodeResponse"; +impl ::prost::Name for Contract { + const NAME: &'static str = "Contract"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. +/// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRemoveChecksum { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// checksum is the sha256 hash to be removed from the store - #[prost(bytes = "vec", tag = "2")] - pub checksum: ::prost::alloc::vec::Vec, +pub struct QueryChecksumsRequest { + /// pagination defines an optional pagination for the request. + #[prost(message, optional, tag = "1")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageRequest, + >, } -impl ::prost::Name for MsgRemoveChecksum { - const NAME: &'static str = "MsgRemoveChecksum"; +impl ::prost::Name for QueryChecksumsRequest { + const NAME: &'static str = "QueryChecksumsRequest"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// MsgStoreChecksumResponse defines the response type for the StoreCode rpc +/// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgRemoveChecksumResponse {} -impl ::prost::Name for MsgRemoveChecksumResponse { - const NAME: &'static str = "MsgRemoveChecksumResponse"; +pub struct QueryChecksumsResponse { + /// checksums is a list of the hex encoded checksums of all wasm codes stored. + #[prost(string, repeated, tag = "1")] + pub checksums: ::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< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, +} +impl ::prost::Name for QueryChecksumsResponse { + const NAME: &'static str = "QueryChecksumsResponse"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// MsgMigrateContract defines the request type for the MigrateContract rpc. +/// QueryCodeRequest is the request type for the Query/Code RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContract { - /// signer address +pub struct QueryCodeRequest { + /// checksum is a hex encoded string of the code stored. #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// the client id of the contract - #[prost(string, tag = "2")] - pub client_id: ::prost::alloc::string::String, - /// checksum is the sha256 hash of the new wasm byte code for the contract - #[prost(bytes = "vec", tag = "3")] - pub checksum: ::prost::alloc::vec::Vec, - /// the json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - pub msg: ::prost::alloc::vec::Vec, + pub checksum: ::prost::alloc::string::String, } -impl ::prost::Name for MsgMigrateContract { - const NAME: &'static str = "MsgMigrateContract"; +impl ::prost::Name for QueryCodeRequest { + const NAME: &'static str = "QueryCodeRequest"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// MsgMigrateContractResponse defines the response type for the MigrateContract rpc +/// QueryCodeResponse is the response type for the Query/Code RPC method. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgMigrateContractResponse {} -impl ::prost::Name for MsgMigrateContractResponse { - const NAME: &'static str = "MsgMigrateContractResponse"; +pub struct QueryCodeResponse { + #[prost(bytes = "vec", tag = "1")] + pub data: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for QueryCodeResponse { + const NAME: &'static str = "QueryCodeResponse"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) @@ -97,16 +96,16 @@ impl ::prost::Name for MsgMigrateContractResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod msg_client { +pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Msg defines the ibc/08-wasm Msg service. + /// Query service for wasm module #[derive(Debug, Clone)] - pub struct MsgClient { + pub struct QueryClient { inner: tonic::client::Grpc, } - impl MsgClient { + impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -117,7 +116,7 @@ pub mod msg_client { Ok(Self::new(conn)) } } - impl MsgClient + impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, @@ -135,7 +134,7 @@ pub mod msg_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> MsgClient> + ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -149,7 +148,7 @@ pub mod msg_client { http::Request, >>::Error: Into + Send + Sync, { - MsgClient::new(InterceptedService::new(inner, interceptor)) + QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -182,38 +181,12 @@ pub mod msg_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// StoreCode defines a rpc handler method for MsgStoreCode. - pub async fn store_code( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Msg/StoreCode", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "StoreCode")); - self.inner.unary(req, path, codec).await - } - /// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. - pub async fn remove_checksum( + /// Get all Wasm checksums + pub async fn checksums( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -227,21 +200,19 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", + "/ibc.lightclients.wasm.v1.Query/Checksums", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "RemoveChecksum"), - ); + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Checksums")); self.inner.unary(req, path, codec).await } - /// MigrateContract defines a rpc handler method for MsgMigrateContract. - pub async fn migrate_contract( + /// Get Wasm code for given code hash + pub async fn code( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -255,53 +226,43 @@ pub mod msg_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Msg/MigrateContract", + "/ibc.lightclients.wasm.v1.Query/Code", ); let mut req = request.into_request(); req.extensions_mut() - .insert( - GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "MigrateContract"), - ); + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Code")); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod msg_server { +pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] - pub trait Msg: Send + Sync + 'static { - /// StoreCode defines a rpc handler method for MsgStoreCode. - async fn store_code( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - /// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. - async fn remove_checksum( + pub trait Query: Send + Sync + 'static { + /// Get all Wasm checksums + async fn checksums( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// MigrateContract defines a rpc handler method for MsgMigrateContract. - async fn migrate_contract( + /// Get Wasm code for given code hash + async fn code( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; } - /// Msg defines the ibc/08-wasm Msg service. + /// Query service for wasm module #[derive(Debug)] - pub struct MsgServer { + pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -309,7 +270,7 @@ pub mod msg_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl MsgServer { + impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -361,9 +322,9 @@ pub mod msg_server { self } } - impl tonic::codegen::Service> for MsgServer + impl tonic::codegen::Service> for QueryServer where - T: Msg, + T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -379,67 +340,25 @@ pub mod msg_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.lightclients.wasm.v1.Msg/StoreCode" => { - #[allow(non_camel_case_types)] - struct StoreCodeSvc(pub Arc); - impl tonic::server::UnaryService - for StoreCodeSvc { - type Response = super::MsgStoreCodeResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::store_code(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = StoreCodeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum" => { + "/ibc.lightclients.wasm.v1.Query/Checksums" => { #[allow(non_camel_case_types)] - struct RemoveChecksumSvc(pub Arc); - impl tonic::server::UnaryService - for RemoveChecksumSvc { - type Response = super::MsgRemoveChecksumResponse; + struct ChecksumsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for ChecksumsSvc { + type Response = super::QueryChecksumsResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::remove_checksum(&inner, request).await + ::checksums(&inner, request).await }; Box::pin(fut) } @@ -451,7 +370,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = RemoveChecksumSvc(inner); + let method = ChecksumsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -467,23 +386,23 @@ pub mod msg_server { }; Box::pin(fut) } - "/ibc.lightclients.wasm.v1.Msg/MigrateContract" => { + "/ibc.lightclients.wasm.v1.Query/Code" => { #[allow(non_camel_case_types)] - struct MigrateContractSvc(pub Arc); - impl tonic::server::UnaryService - for MigrateContractSvc { - type Response = super::MsgMigrateContractResponse; + struct CodeSvc(pub Arc); + impl tonic::server::UnaryService + for CodeSvc { + type Response = super::QueryCodeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::migrate_contract(&inner, request).await + ::code(&inner, request).await }; Box::pin(fut) } @@ -495,7 +414,7 @@ pub mod msg_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = MigrateContractSvc(inner); + let method = CodeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -526,7 +445,7 @@ pub mod msg_server { } } } - impl Clone for MsgServer { + impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -538,7 +457,7 @@ pub mod msg_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -548,71 +467,102 @@ pub mod msg_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "ibc.lightclients.wasm.v1.Msg"; + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "ibc.lightclients.wasm.v1.Query"; } } -/// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. +/// MsgStoreCode defines the request type for the StoreCode rpc. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChecksumsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, +pub struct MsgStoreCode { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// wasm byte code of light client contract. It can be raw or gzip compressed + #[prost(bytes = "vec", tag = "2")] + pub wasm_byte_code: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryChecksumsRequest { - const NAME: &'static str = "QueryChecksumsRequest"; +impl ::prost::Name for MsgStoreCode { + const NAME: &'static str = "MsgStoreCode"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. +/// MsgStoreCodeResponse defines the response type for the StoreCode rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryChecksumsResponse { - /// checksums is a list of the hex encoded checksums of all wasm codes stored. - #[prost(string, repeated, tag = "1")] - pub checksums: ::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< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, +pub struct MsgStoreCodeResponse { + /// checksum is the sha256 hash of the stored code + #[prost(bytes = "vec", tag = "1")] + pub checksum: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryChecksumsResponse { - const NAME: &'static str = "QueryChecksumsResponse"; +impl ::prost::Name for MsgStoreCodeResponse { + const NAME: &'static str = "MsgStoreCodeResponse"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRemoveChecksum { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// checksum is the sha256 hash to be removed from the store + #[prost(bytes = "vec", tag = "2")] + pub checksum: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for MsgRemoveChecksum { + const NAME: &'static str = "MsgRemoveChecksum"; + const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + } +} +/// MsgStoreChecksumResponse defines the response type for the StoreCode rpc +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRemoveChecksumResponse {} +impl ::prost::Name for MsgRemoveChecksumResponse { + const NAME: &'static str = "MsgRemoveChecksumResponse"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryCodeRequest is the request type for the Query/Code RPC method. +/// MsgMigrateContract defines the request type for the MigrateContract rpc. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeRequest { - /// checksum is a hex encoded string of the code stored. +pub struct MsgMigrateContract { + /// signer address #[prost(string, tag = "1")] - pub checksum: ::prost::alloc::string::String, + pub signer: ::prost::alloc::string::String, + /// the client id of the contract + #[prost(string, tag = "2")] + pub client_id: ::prost::alloc::string::String, + /// checksum is the sha256 hash of the new wasm byte code for the contract + #[prost(bytes = "vec", tag = "3")] + pub checksum: ::prost::alloc::vec::Vec, + /// the json encoded message to be passed to the contract on migration + #[prost(bytes = "vec", tag = "4")] + pub msg: ::prost::alloc::vec::Vec, } -impl ::prost::Name for QueryCodeRequest { - const NAME: &'static str = "QueryCodeRequest"; +impl ::prost::Name for MsgMigrateContract { + const NAME: &'static str = "MsgMigrateContract"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) } } -/// QueryCodeResponse is the response type for the Query/Code RPC method. +/// MsgMigrateContractResponse defines the response type for the MigrateContract rpc #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryCodeResponse { - #[prost(bytes = "vec", tag = "1")] - pub data: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryCodeResponse { - const NAME: &'static str = "QueryCodeResponse"; +pub struct MsgMigrateContractResponse {} +impl ::prost::Name for MsgMigrateContractResponse { + const NAME: &'static str = "MsgMigrateContractResponse"; const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) @@ -620,16 +570,16 @@ impl ::prost::Name for QueryCodeResponse { } /// Generated client implementations. #[cfg(feature = "client")] -pub mod query_client { +pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; use tonic::codegen::http::Uri; - /// Query service for wasm module + /// Msg defines the ibc/08-wasm Msg service. #[derive(Debug, Clone)] - pub struct QueryClient { + pub struct MsgClient { inner: tonic::client::Grpc, } - impl QueryClient { + impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where @@ -640,7 +590,7 @@ pub mod query_client { Ok(Self::new(conn)) } } - impl QueryClient + impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, @@ -658,7 +608,7 @@ pub mod query_client { pub fn with_interceptor( inner: T, interceptor: F, - ) -> QueryClient> + ) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -672,7 +622,7 @@ pub mod query_client { http::Request, >>::Error: Into + Send + Sync, { - QueryClient::new(InterceptedService::new(inner, interceptor)) + MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// @@ -705,12 +655,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// Get all Wasm checksums - pub async fn checksums( + /// StoreCode defines a rpc handler method for MsgStoreCode. + pub async fn store_code( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -724,19 +674,19 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Query/Checksums", + "/ibc.lightclients.wasm.v1.Msg/StoreCode", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Checksums")); + .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "StoreCode")); self.inner.unary(req, path, codec).await } - /// Get Wasm code for given code hash - pub async fn code( + /// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. + pub async fn remove_checksum( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -750,43 +700,81 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.lightclients.wasm.v1.Query/Code", + "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum", ); let mut req = request.into_request(); req.extensions_mut() - .insert(GrpcMethod::new("ibc.lightclients.wasm.v1.Query", "Code")); + .insert( + GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "RemoveChecksum"), + ); + self.inner.unary(req, path, codec).await + } + /// MigrateContract defines a rpc handler method for MsgMigrateContract. + pub async fn migrate_contract( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/ibc.lightclients.wasm.v1.Msg/MigrateContract", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.lightclients.wasm.v1.Msg", "MigrateContract"), + ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. #[cfg(feature = "server")] -pub mod query_server { +pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] - pub trait Query: Send + Sync + 'static { - /// Get all Wasm checksums - async fn checksums( + pub trait Msg: Send + Sync + 'static { + /// StoreCode defines a rpc handler method for MsgStoreCode. + async fn store_code( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, >; - /// Get Wasm code for given code hash - async fn code( + /// RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. + async fn remove_checksum( &self, - request: tonic::Request, + request: tonic::Request, ) -> std::result::Result< - tonic::Response, + tonic::Response, + tonic::Status, + >; + /// MigrateContract defines a rpc handler method for MsgMigrateContract. + async fn migrate_contract( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, tonic::Status, >; } - /// Query service for wasm module + /// Msg defines the ibc/08-wasm Msg service. #[derive(Debug)] - pub struct QueryServer { + pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, @@ -794,7 +782,7 @@ pub mod query_server { max_encoding_message_size: Option, } struct _Inner(Arc); - impl QueryServer { + impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -846,9 +834,9 @@ pub mod query_server { self } } - impl tonic::codegen::Service> for QueryServer + impl tonic::codegen::Service> for MsgServer where - T: Query, + T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { @@ -864,25 +852,23 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.lightclients.wasm.v1.Query/Checksums" => { + "/ibc.lightclients.wasm.v1.Msg/StoreCode" => { #[allow(non_camel_case_types)] - struct ChecksumsSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for ChecksumsSvc { - type Response = super::QueryChecksumsResponse; + struct StoreCodeSvc(pub Arc); + impl tonic::server::UnaryService + for StoreCodeSvc { + type Response = super::MsgStoreCodeResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::checksums(&inner, request).await + ::store_code(&inner, request).await }; Box::pin(fut) } @@ -894,7 +880,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = ChecksumsSvc(inner); + let method = StoreCodeSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -910,23 +896,23 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.lightclients.wasm.v1.Query/Code" => { + "/ibc.lightclients.wasm.v1.Msg/RemoveChecksum" => { #[allow(non_camel_case_types)] - struct CodeSvc(pub Arc); - impl tonic::server::UnaryService - for CodeSvc { - type Response = super::QueryCodeResponse; + struct RemoveChecksumSvc(pub Arc); + impl tonic::server::UnaryService + for RemoveChecksumSvc { + type Response = super::MsgRemoveChecksumResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::code(&inner, request).await + ::remove_checksum(&inner, request).await }; Box::pin(fut) } @@ -938,7 +924,51 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = CodeSvc(inner); + let method = RemoveChecksumSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.lightclients.wasm.v1.Msg/MigrateContract" => { + #[allow(non_camel_case_types)] + struct MigrateContractSvc(pub Arc); + impl tonic::server::UnaryService + for MigrateContractSvc { + type Response = super::MsgMigrateContractResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::migrate_contract(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = MigrateContractSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -969,7 +999,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -981,7 +1011,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -991,38 +1021,8 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "ibc.lightclients.wasm.v1.Query"; - } -} -/// GenesisState defines 08-wasm's keeper genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// uploaded light client wasm contracts - #[prost(message, repeated, tag = "1")] - pub contracts: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) - } -} -/// Contract stores contract code -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Contract { - /// contract byte code - #[prost(bytes = "vec", tag = "1")] - pub code_bytes: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for Contract { - const NAME: &'static str = "Contract"; - const PACKAGE: &'static str = "ibc.lightclients.wasm.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("ibc.lightclients.wasm.v1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.lightclients.wasm.v1.Msg"; } } /// Wasm light client's Client state diff --git a/src/prost/interchain_security.ccv.provider.v1.rs b/src/prost/interchain_security.ccv.provider.v1.rs index c579b3cc..d44ba204 100644 --- a/src/prost/interchain_security.ccv.provider.v1.rs +++ b/src/prost/interchain_security.ccv.provider.v1.rs @@ -1,915 +1,607 @@ +/// ConsumerAdditionProposal is a governance proposal on the provider chain to +/// spawn a new consumer chain. If it passes, then all validators on the provider +/// chain are expected to validate the consumer chain at spawn time or get +/// slashed. It is recommended that spawn time occurs after the proposal end +/// time. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAssignConsumerKey { - /// The chain id of the consumer chain to assign a consensus public key to +pub struct ConsumerAdditionProposal { + /// the title of the proposal #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - /// The validator address on the provider + pub title: ::prost::alloc::string::String, + /// the description of the proposal #[prost(string, tag = "2")] - pub provider_addr: ::prost::alloc::string::String, - /// The consensus public key to use on the consumer. - /// in json string format corresponding to proto-any, ex: - /// `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}` + pub description: ::prost::alloc::string::String, + /// the proposed chain-id of the new consumer chain, must be different from all + /// other consumer chain ids of the executing provider chain. #[prost(string, tag = "3")] - pub consumer_key: ::prost::alloc::string::String, + pub chain_id: ::prost::alloc::string::String, + /// the proposed initial height of new consumer chain. + /// For a completely new chain, this will be {0,1}. However, it may be + /// different if this is a chain that is converting to a consumer chain. + #[prost(message, optional, tag = "4")] + pub initial_height: ::core::option::Option< + super::super::super::super::ibc::core::client::v1::Height, + >, + /// The hash of the consumer chain genesis state without the consumer CCV + /// module genesis params. It is used for off-chain confirmation of + /// genesis.json validity by validators and other parties. + #[prost(bytes = "vec", tag = "5")] + pub genesis_hash: ::prost::alloc::vec::Vec, + /// The hash of the consumer chain binary that should be run by validators on + /// chain initialization. It is used for off-chain confirmation of binary + /// validity by validators and other parties. + #[prost(bytes = "vec", tag = "6")] + pub binary_hash: ::prost::alloc::vec::Vec, + /// spawn time is the time on the provider chain at which the consumer chain + /// genesis is finalized and all validators will be responsible for starting + /// their consumer chain validator node. + #[prost(message, optional, tag = "7")] + pub spawn_time: ::core::option::Option< + super::super::super::super::google::protobuf::Timestamp, + >, + /// Unbonding period for the consumer, + /// which should be smaller than that of the provider in general. + #[prost(message, optional, tag = "8")] + pub unbonding_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// Sent CCV related IBC packets will timeout after this duration + #[prost(message, optional, tag = "9")] + pub ccv_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// Sent transfer related IBC packets will timeout after this duration + #[prost(message, optional, tag = "10")] + pub transfer_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The fraction of tokens allocated to the consumer redistribution address + /// during distribution events. The fraction is a string representing a + /// decimal number. For example "0.75" would represent 75%. + #[prost(string, tag = "11")] + pub consumer_redistribution_fraction: ::prost::alloc::string::String, + /// BlocksPerDistributionTransmission is the number of blocks between + /// ibc-token-transfers from the consumer chain to the provider chain. On + /// sending transmission event, `consumer_redistribution_fraction` of the + /// accumulated tokens are sent to the consumer redistribution address. + #[prost(int64, tag = "12")] + pub blocks_per_distribution_transmission: i64, + /// The number of historical info entries to persist in store. + /// This param is a part of the cosmos sdk staking module. In the case of + /// a ccv enabled consumer chain, the ccv module acts as the staking module. + #[prost(int64, tag = "13")] + pub historical_entries: i64, + /// The ID of a token transfer channel used for the Reward Distribution + /// sub-protocol. If DistributionTransmissionChannel == "", a new transfer + /// channel is created on top of the same connection as the CCV channel. + /// Note that transfer_channel_id is the ID of the channel end on the consumer + /// chain. it is most relevant for chains performing a sovereign to consumer + /// changeover in order to maintan the existing ibc transfer channel + #[prost(string, tag = "14")] + pub distribution_transmission_channel: ::prost::alloc::string::String, } -impl ::prost::Name for MsgAssignConsumerKey { - const NAME: &'static str = "MsgAssignConsumerKey"; +impl ::prost::Name for ConsumerAdditionProposal { + const NAME: &'static str = "ConsumerAdditionProposal"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } +/// ConsumerRemovalProposal is a governance proposal on the provider chain to +/// remove (and stop) a consumer chain. If it passes, all the consumer chain's +/// state is removed from the provider chain. The outstanding unbonding operation +/// funds are released. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgAssignConsumerKeyResponse {} -impl ::prost::Name for MsgAssignConsumerKeyResponse { - const NAME: &'static str = "MsgAssignConsumerKeyResponse"; +pub struct ConsumerRemovalProposal { + /// the title of the proposal + #[prost(string, tag = "1")] + pub title: ::prost::alloc::string::String, + /// the description of the proposal + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// the chain-id of the consumer chain to be stopped + #[prost(string, tag = "3")] + pub chain_id: ::prost::alloc::string::String, + /// the time on the provider chain at which all validators are responsible to + /// stop their consumer chain validator node + #[prost(message, optional, tag = "4")] + pub stop_time: ::core::option::Option< + super::super::super::super::google::protobuf::Timestamp, + >, +} +impl ::prost::Name for ConsumerRemovalProposal { + const NAME: &'static str = "ConsumerRemovalProposal"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// MsgSubmitConsumerMisbehaviour defines a message that reports a light client attack, -/// also known as a misbehaviour, observed on a consumer chain +/// ChangeRewardDenomsProposal is a governance proposal on the provider chain to +/// mutate the set of denoms accepted by the provider as rewards. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitConsumerMisbehaviour { +pub struct ChangeRewardDenomsProposal { + /// the title of the proposal #[prost(string, tag = "1")] - pub submitter: ::prost::alloc::string::String, - /// The Misbehaviour of the consumer chain wrapping - /// two conflicting IBC headers - #[prost(message, optional, tag = "2")] - pub misbehaviour: ::core::option::Option< - super::super::super::super::ibc::lightclients::tendermint::v1::Misbehaviour, - >, + pub title: ::prost::alloc::string::String, + /// the description of the proposal + #[prost(string, tag = "2")] + pub description: ::prost::alloc::string::String, + /// the list of consumer reward denoms to add + #[prost(string, repeated, tag = "3")] + pub denoms_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// the list of consumer reward denoms to remove + #[prost(string, repeated, tag = "4")] + pub denoms_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -impl ::prost::Name for MsgSubmitConsumerMisbehaviour { - const NAME: &'static str = "MsgSubmitConsumerMisbehaviour"; +impl ::prost::Name for ChangeRewardDenomsProposal { + const NAME: &'static str = "ChangeRewardDenomsProposal"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } +/// A persisted queue entry indicating that a slash packet data instance needs to +/// be handled. This type belongs in the "global" queue, to coordinate slash +/// packet handling times between consumers. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitConsumerMisbehaviourResponse {} -impl ::prost::Name for MsgSubmitConsumerMisbehaviourResponse { - const NAME: &'static str = "MsgSubmitConsumerMisbehaviourResponse"; +pub struct GlobalSlashEntry { + /// Block time that slash packet was received by provider chain. + /// This field is used for store key iteration ordering. + #[prost(message, optional, tag = "1")] + pub recv_time: ::core::option::Option< + super::super::super::super::google::protobuf::Timestamp, + >, + /// The consumer that sent a slash packet. + #[prost(string, tag = "2")] + pub consumer_chain_id: ::prost::alloc::string::String, + /// The IBC sequence number of the recv packet. + /// This field is used in the store key to ensure uniqueness. + #[prost(uint64, tag = "3")] + pub ibc_seq_num: u64, + /// The provider's consensus address of the validator being slashed. + /// This field is used to obtain validator power in HandleThrottleQueues. + /// + /// This field is not used in the store key, but is persisted in value bytes, + /// see QueueGlobalSlashEntry. + #[prost(bytes = "vec", tag = "4")] + pub provider_val_cons_addr: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for GlobalSlashEntry { + const NAME: &'static str = "GlobalSlashEntry"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// MsgSubmitConsumerDoubleVoting defines a message that reports -/// a double signing infraction observed on a consumer chain +/// Params defines the parameters for CCV Provider module #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitConsumerDoubleVoting { - #[prost(string, tag = "1")] - pub submitter: ::prost::alloc::string::String, - /// The equivocation of the consumer chain wrapping - /// an evidence of a validator that signed two conflicting votes - #[prost(message, optional, tag = "2")] - pub duplicate_vote_evidence: ::core::option::Option< - ::cometbft_proto::types::DuplicateVoteEvidence, +pub struct Params { + #[prost(message, optional, tag = "1")] + pub template_client: ::core::option::Option< + super::super::super::super::ibc::lightclients::tendermint::v1::ClientState, >, - /// The light client header of the infraction block + /// TrustingPeriodFraction is used to compute the consumer and provider IBC + /// client's TrustingPeriod from the chain defined UnbondingPeriod + #[prost(string, tag = "2")] + pub trusting_period_fraction: ::prost::alloc::string::String, + /// Sent IBC packets will timeout after this duration #[prost(message, optional, tag = "3")] - pub infraction_block_header: ::core::option::Option< - super::super::super::super::ibc::lightclients::tendermint::v1::Header, + pub ccv_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The channel initialization (IBC channel opening handshake) will timeout + /// after this duration + #[prost(message, optional, tag = "4")] + pub init_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The VSC packets sent by the provider will timeout after this duration. + /// Note that unlike ccv_timeout_period which is an IBC param, + /// the vsc_timeout_period is a provider-side param that enables the provider + /// to timeout VSC packets even when a consumer chain is not live. + #[prost(message, optional, tag = "5")] + pub vsc_timeout_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The period for which the slash meter is replenished + #[prost(message, optional, tag = "6")] + pub slash_meter_replenish_period: ::core::option::Option< + super::super::super::super::google::protobuf::Duration, + >, + /// The fraction of total voting power that is replenished to the slash meter + /// every replenish period. This param also serves as a maximum fraction of + /// total voting power that the slash meter can hold. + #[prost(string, tag = "7")] + pub slash_meter_replenish_fraction: ::prost::alloc::string::String, + /// The maximum amount of throttled slash or vsc matured packets + /// that can be queued for a single consumer before the provider chain halts. + #[prost(int64, tag = "8")] + pub max_throttled_packets: i64, + /// The fee required to be paid to add a reward denom + #[prost(message, optional, tag = "9")] + pub consumer_reward_denom_registration_fee: ::core::option::Option< + super::super::super::super::cosmos::base::v1beta1::Coin, >, } -impl ::prost::Name for MsgSubmitConsumerDoubleVoting { - const NAME: &'static str = "MsgSubmitConsumerDoubleVoting"; +impl ::prost::Name for Params { + const NAME: &'static str = "Params"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } +/// SlashAcks contains cons addresses of consumer chain validators +/// successfully slashed on the provider chain. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MsgSubmitConsumerDoubleVotingResponse {} -impl ::prost::Name for MsgSubmitConsumerDoubleVotingResponse { - const NAME: &'static str = "MsgSubmitConsumerDoubleVotingResponse"; +pub struct SlashAcks { + #[prost(string, repeated, tag = "1")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +impl ::prost::Name for SlashAcks { + const NAME: &'static str = "SlashAcks"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// Generated client implementations. -#[cfg(feature = "client")] -pub mod msg_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - /// Msg defines the Msg service. - #[derive(Debug, Clone)] - pub struct MsgClient { - inner: tonic::client::Grpc, +/// ConsumerAdditionProposals holds pending governance proposals on the provider +/// chain to spawn a new chain. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsumerAdditionProposals { + /// proposals waiting for spawn_time to pass + #[prost(message, repeated, tag = "1")] + pub pending: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ConsumerAdditionProposals { + const NAME: &'static str = "ConsumerAdditionProposals"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } - impl MsgClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } +} +/// ConsumerRemovalProposals holds pending governance proposals on the provider +/// chain to remove (and stop) a consumer chain. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsumerRemovalProposals { + /// proposals waiting for stop_time to pass + #[prost(message, repeated, tag = "1")] + pub pending: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for ConsumerRemovalProposals { + const NAME: &'static str = "ConsumerRemovalProposals"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } - impl MsgClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> MsgClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - MsgClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn assign_consumer_key( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/interchain_security.ccv.provider.v1.Msg/AssignConsumerKey", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "interchain_security.ccv.provider.v1.Msg", - "AssignConsumerKey", - ), - ); - self.inner.unary(req, path, codec).await - } - pub async fn submit_consumer_misbehaviour( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerMisbehaviour", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "interchain_security.ccv.provider.v1.Msg", - "SubmitConsumerMisbehaviour", - ), - ); - self.inner.unary(req, path, codec).await - } - pub async fn submit_consumer_double_voting( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerDoubleVoting", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "interchain_security.ccv.provider.v1.Msg", - "SubmitConsumerDoubleVoting", - ), - ); - self.inner.unary(req, path, codec).await - } +} +/// AddressList contains a list of consensus addresses +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddressList { + #[prost(bytes = "vec", repeated, tag = "1")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +impl ::prost::Name for AddressList { + const NAME: &'static str = "AddressList"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// Generated server implementations. -#[cfg(feature = "server")] -pub mod msg_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. - #[async_trait] - pub trait Msg: Send + Sync + 'static { - async fn assign_consumer_key( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn submit_consumer_misbehaviour( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn submit_consumer_double_voting( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ChannelToChain { + #[prost(string, tag = "1")] + pub channel_id: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub chain_id: ::prost::alloc::string::String, +} +impl ::prost::Name for ChannelToChain { + const NAME: &'static str = "ChannelToChain"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } - /// Msg defines the Msg service. - #[derive(Debug)] - pub struct MsgServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, +} +/// VscUnbondingOps contains the IDs of unbonding operations that are waiting for +/// at least one VSCMaturedPacket with vscID from a consumer chain +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VscUnbondingOps { + #[prost(uint64, tag = "1")] + pub vsc_id: u64, + #[prost(uint64, repeated, tag = "2")] + pub unbonding_op_ids: ::prost::alloc::vec::Vec, +} +impl ::prost::Name for VscUnbondingOps { + const NAME: &'static str = "VscUnbondingOps"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } - struct _Inner(Arc); - impl MsgServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for MsgServer - where - T: Msg, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/interchain_security.ccv.provider.v1.Msg/AssignConsumerKey" => { - #[allow(non_camel_case_types)] - struct AssignConsumerKeySvc(pub Arc); - impl tonic::server::UnaryService - for AssignConsumerKeySvc { - type Response = super::MsgAssignConsumerKeyResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::assign_consumer_key(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = AssignConsumerKeySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerMisbehaviour" => { - #[allow(non_camel_case_types)] - struct SubmitConsumerMisbehaviourSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for SubmitConsumerMisbehaviourSvc { - type Response = super::MsgSubmitConsumerMisbehaviourResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::submit_consumer_misbehaviour(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SubmitConsumerMisbehaviourSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerDoubleVoting" => { - #[allow(non_camel_case_types)] - struct SubmitConsumerDoubleVotingSvc(pub Arc); - impl< - T: Msg, - > tonic::server::UnaryService - for SubmitConsumerDoubleVotingSvc { - type Response = super::MsgSubmitConsumerDoubleVotingResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::submit_consumer_double_voting(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SubmitConsumerDoubleVotingSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for MsgServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for MsgServer { - const NAME: &'static str = "interchain_security.ccv.provider.v1.Msg"; +} +/// UnbondingOp contains the ids of consumer chains that need to unbond before +/// the unbonding operation with the given ID can unbond +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnbondingOp { + #[prost(uint64, tag = "1")] + pub id: u64, + /// consumer chains that are still unbonding + #[prost(string, repeated, tag = "2")] + pub unbonding_consumer_chains: ::prost::alloc::vec::Vec< + ::prost::alloc::string::String, + >, +} +impl ::prost::Name for UnbondingOp { + const NAME: &'static str = "UnbondingOp"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ConsumerAdditionProposal is a governance proposal on the provider chain to -/// spawn a new consumer chain. If it passes, then all validators on the provider -/// chain are expected to validate the consumer chain at spawn time or get -/// slashed. It is recommended that spawn time occurs after the proposal end -/// time. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerAdditionProposal { - /// the title of the proposal +pub struct InitTimeoutTimestamp { #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// the description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// the proposed chain-id of the new consumer chain, must be different from all - /// other consumer chain ids of the executing provider chain. - #[prost(string, tag = "3")] pub chain_id: ::prost::alloc::string::String, - /// the proposed initial height of new consumer chain. - /// For a completely new chain, this will be {0,1}. However, it may be - /// different if this is a chain that is converting to a consumer chain. - #[prost(message, optional, tag = "4")] - pub initial_height: ::core::option::Option< - super::super::super::super::ibc::core::client::v1::Height, - >, - /// The hash of the consumer chain genesis state without the consumer CCV - /// module genesis params. It is used for off-chain confirmation of - /// genesis.json validity by validators and other parties. - #[prost(bytes = "vec", tag = "5")] - pub genesis_hash: ::prost::alloc::vec::Vec, - /// The hash of the consumer chain binary that should be run by validators on - /// chain initialization. It is used for off-chain confirmation of binary - /// validity by validators and other parties. - #[prost(bytes = "vec", tag = "6")] - pub binary_hash: ::prost::alloc::vec::Vec, - /// spawn time is the time on the provider chain at which the consumer chain - /// genesis is finalized and all validators will be responsible for starting - /// their consumer chain validator node. - #[prost(message, optional, tag = "7")] - pub spawn_time: ::core::option::Option< - super::super::super::super::google::protobuf::Timestamp, - >, - /// Unbonding period for the consumer, - /// which should be smaller than that of the provider in general. - #[prost(message, optional, tag = "8")] - pub unbonding_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// Sent CCV related IBC packets will timeout after this duration - #[prost(message, optional, tag = "9")] - pub ccv_timeout_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// Sent transfer related IBC packets will timeout after this duration - #[prost(message, optional, tag = "10")] - pub transfer_timeout_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// The fraction of tokens allocated to the consumer redistribution address - /// during distribution events. The fraction is a string representing a - /// decimal number. For example "0.75" would represent 75%. - #[prost(string, tag = "11")] - pub consumer_redistribution_fraction: ::prost::alloc::string::String, - /// BlocksPerDistributionTransmission is the number of blocks between - /// ibc-token-transfers from the consumer chain to the provider chain. On - /// sending transmission event, `consumer_redistribution_fraction` of the - /// accumulated tokens are sent to the consumer redistribution address. - #[prost(int64, tag = "12")] - pub blocks_per_distribution_transmission: i64, - /// The number of historical info entries to persist in store. - /// This param is a part of the cosmos sdk staking module. In the case of - /// a ccv enabled consumer chain, the ccv module acts as the staking module. - #[prost(int64, tag = "13")] - pub historical_entries: i64, - /// The ID of a token transfer channel used for the Reward Distribution - /// sub-protocol. If DistributionTransmissionChannel == "", a new transfer - /// channel is created on top of the same connection as the CCV channel. - /// Note that transfer_channel_id is the ID of the channel end on the consumer - /// chain. it is most relevant for chains performing a sovereign to consumer - /// changeover in order to maintan the existing ibc transfer channel - #[prost(string, tag = "14")] - pub distribution_transmission_channel: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub timestamp: u64, } -impl ::prost::Name for ConsumerAdditionProposal { - const NAME: &'static str = "ConsumerAdditionProposal"; +impl ::prost::Name for InitTimeoutTimestamp { + const NAME: &'static str = "InitTimeoutTimestamp"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ConsumerRemovalProposal is a governance proposal on the provider chain to -/// remove (and stop) a consumer chain. If it passes, all the consumer chain's -/// state is removed from the provider chain. The outstanding unbonding operation -/// funds are released. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerRemovalProposal { - /// the title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// the description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// the chain-id of the consumer chain to be stopped - #[prost(string, tag = "3")] - pub chain_id: ::prost::alloc::string::String, - /// the time on the provider chain at which all validators are responsible to - /// stop their consumer chain validator node - #[prost(message, optional, tag = "4")] - pub stop_time: ::core::option::Option< +pub struct VscSendTimestamp { + #[prost(uint64, tag = "1")] + pub vsc_id: u64, + #[prost(message, optional, tag = "2")] + pub timestamp: ::core::option::Option< super::super::super::super::google::protobuf::Timestamp, >, } -impl ::prost::Name for ConsumerRemovalProposal { - const NAME: &'static str = "ConsumerRemovalProposal"; +impl ::prost::Name for VscSendTimestamp { + const NAME: &'static str = "VscSendTimestamp"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ChangeRewardDenomsProposal is a governance proposal on the provider chain to -/// mutate the set of denoms accepted by the provider as rewards. +/// ValidatorSetChangePackets is a pb list of ccv.ValidatorSetChangePacketData. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChangeRewardDenomsProposal { - /// the title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// the description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// the list of consumer reward denoms to add - #[prost(string, repeated, tag = "3")] - pub denoms_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// the list of consumer reward denoms to remove - #[prost(string, repeated, tag = "4")] - pub denoms_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +pub struct ValidatorSetChangePackets { + #[prost(message, repeated, tag = "1")] + pub list: ::prost::alloc::vec::Vec, } -impl ::prost::Name for ChangeRewardDenomsProposal { - const NAME: &'static str = "ChangeRewardDenomsProposal"; +impl ::prost::Name for ValidatorSetChangePackets { + const NAME: &'static str = "ValidatorSetChangePackets"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// A persisted queue entry indicating that a slash packet data instance needs to -/// be handled. This type belongs in the "global" queue, to coordinate slash -/// packet handling times between consumers. +/// MaturedUnbondingOps defines a list of ids corresponding to ids of matured +/// unbonding operations. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GlobalSlashEntry { - /// Block time that slash packet was received by provider chain. - /// This field is used for store key iteration ordering. - #[prost(message, optional, tag = "1")] - pub recv_time: ::core::option::Option< - super::super::super::super::google::protobuf::Timestamp, - >, - /// The consumer that sent a slash packet. - #[prost(string, tag = "2")] - pub consumer_chain_id: ::prost::alloc::string::String, - /// The IBC sequence number of the recv packet. - /// This field is used in the store key to ensure uniqueness. - #[prost(uint64, tag = "3")] - pub ibc_seq_num: u64, - /// The provider's consensus address of the validator being slashed. - /// This field is used to obtain validator power in HandleThrottleQueues. - /// - /// This field is not used in the store key, but is persisted in value bytes, - /// see QueueGlobalSlashEntry. - #[prost(bytes = "vec", tag = "4")] - pub provider_val_cons_addr: ::prost::alloc::vec::Vec, +pub struct MaturedUnbondingOps { + #[prost(uint64, repeated, tag = "1")] + pub ids: ::prost::alloc::vec::Vec, } -impl ::prost::Name for GlobalSlashEntry { - const NAME: &'static str = "GlobalSlashEntry"; +impl ::prost::Name for MaturedUnbondingOps { + const NAME: &'static str = "MaturedUnbondingOps"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// Params defines the parameters for CCV Provider module +/// ExportedVscSendTimestamps is VscSendTimestamp with chainID info for exporting to genesis #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - #[prost(message, optional, tag = "1")] - pub template_client: ::core::option::Option< - super::super::super::super::ibc::lightclients::tendermint::v1::ClientState, - >, - /// TrustingPeriodFraction is used to compute the consumer and provider IBC - /// client's TrustingPeriod from the chain defined UnbondingPeriod - #[prost(string, tag = "2")] - pub trusting_period_fraction: ::prost::alloc::string::String, - /// Sent IBC packets will timeout after this duration - #[prost(message, optional, tag = "3")] - pub ccv_timeout_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// The channel initialization (IBC channel opening handshake) will timeout - /// after this duration - #[prost(message, optional, tag = "4")] - pub init_timeout_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// The VSC packets sent by the provider will timeout after this duration. - /// Note that unlike ccv_timeout_period which is an IBC param, - /// the vsc_timeout_period is a provider-side param that enables the provider - /// to timeout VSC packets even when a consumer chain is not live. - #[prost(message, optional, tag = "5")] - pub vsc_timeout_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// The period for which the slash meter is replenished - #[prost(message, optional, tag = "6")] - pub slash_meter_replenish_period: ::core::option::Option< - super::super::super::super::google::protobuf::Duration, - >, - /// The fraction of total voting power that is replenished to the slash meter - /// every replenish period. This param also serves as a maximum fraction of - /// total voting power that the slash meter can hold. - #[prost(string, tag = "7")] - pub slash_meter_replenish_fraction: ::prost::alloc::string::String, - /// The maximum amount of throttled slash or vsc matured packets - /// that can be queued for a single consumer before the provider chain halts. - #[prost(int64, tag = "8")] - pub max_throttled_packets: i64, - /// The fee required to be paid to add a reward denom - #[prost(message, optional, tag = "9")] - pub consumer_reward_denom_registration_fee: ::core::option::Option< - super::super::super::super::cosmos::base::v1beta1::Coin, - >, +pub struct ExportedVscSendTimestamp { + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub vsc_send_timestamps: ::prost::alloc::vec::Vec, } -impl ::prost::Name for Params { - const NAME: &'static str = "Params"; +impl ::prost::Name for ExportedVscSendTimestamp { + const NAME: &'static str = "ExportedVscSendTimestamp"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// SlashAcks contains cons addresses of consumer chain validators -/// successfully slashed on the provider chain. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct SlashAcks { - #[prost(string, repeated, tag = "1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +pub struct KeyAssignmentReplacement { + #[prost(bytes = "vec", tag = "1")] + pub provider_addr: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "2")] + pub prev_c_key: ::core::option::Option<::cometbft_proto::crypto::v1::PublicKey>, + #[prost(int64, tag = "3")] + pub power: i64, } -impl ::prost::Name for SlashAcks { - const NAME: &'static str = "SlashAcks"; +impl ::prost::Name for KeyAssignmentReplacement { + const NAME: &'static str = "KeyAssignmentReplacement"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ConsumerAdditionProposals holds pending governance proposals on the provider -/// chain to spawn a new chain. +/// Used to serialize the ValidatorConsumerPubKey index from key assignment +/// ValidatorConsumerPubKey: (chainID, providerAddr consAddr) -> consumerKey +/// tmprotocrypto.PublicKey #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerAdditionProposals { - /// proposals waiting for spawn_time to pass - #[prost(message, repeated, tag = "1")] - pub pending: ::prost::alloc::vec::Vec, +pub struct ValidatorConsumerPubKey { + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub provider_addr: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "3")] + pub consumer_key: ::core::option::Option<::cometbft_proto::crypto::v1::PublicKey>, } -impl ::prost::Name for ConsumerAdditionProposals { - const NAME: &'static str = "ConsumerAdditionProposals"; +impl ::prost::Name for ValidatorConsumerPubKey { + const NAME: &'static str = "ValidatorConsumerPubKey"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ConsumerRemovalProposals holds pending governance proposals on the provider -/// chain to remove (and stop) a consumer chain. +/// Used to serialize the ValidatorConsumerAddr index from key assignment +/// ValidatorByConsumerAddr: (chainID, consumerAddr consAddr) -> providerAddr +/// consAddr #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerRemovalProposals { - /// proposals waiting for stop_time to pass - #[prost(message, repeated, tag = "1")] - pub pending: ::prost::alloc::vec::Vec, +pub struct ValidatorByConsumerAddr { + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + #[prost(bytes = "vec", tag = "2")] + pub consumer_addr: ::prost::alloc::vec::Vec, + #[prost(bytes = "vec", tag = "3")] + pub provider_addr: ::prost::alloc::vec::Vec, } -impl ::prost::Name for ConsumerRemovalProposals { - const NAME: &'static str = "ConsumerRemovalProposals"; +impl ::prost::Name for ValidatorByConsumerAddr { + const NAME: &'static str = "ValidatorByConsumerAddr"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// AddressList contains a list of consensus addresses +/// Used to serialize the ConsumerAddrsToPrune index from key assignment +/// ConsumerAddrsToPrune: (chainID, vscID uint64) -> consumerAddrs AddressList #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressList { - #[prost(bytes = "vec", repeated, tag = "1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +pub struct ConsumerAddrsToPrune { + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub vsc_id: u64, + #[prost(message, optional, tag = "3")] + pub consumer_addrs: ::core::option::Option, } -impl ::prost::Name for AddressList { - const NAME: &'static str = "AddressList"; +impl ::prost::Name for ConsumerAddrsToPrune { + const NAME: &'static str = "ConsumerAddrsToPrune"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } +/// GenesisState defines the CCV provider chain genesis state #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ChannelToChain { - #[prost(string, tag = "1")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub chain_id: ::prost::alloc::string::String, +pub struct GenesisState { + /// strictly positive and set to 1 (DefaultValsetUpdateID) for a new chain + #[prost(uint64, tag = "1")] + pub valset_update_id: u64, + /// empty for a new chain + #[prost(message, repeated, tag = "2")] + pub consumer_states: ::prost::alloc::vec::Vec, + /// empty for a new chain + #[prost(message, repeated, tag = "3")] + pub unbonding_ops: ::prost::alloc::vec::Vec, + /// empty for a new chain + #[prost(message, optional, tag = "4")] + pub mature_unbonding_ops: ::core::option::Option, + /// empty for a new chain + #[prost(message, repeated, tag = "5")] + pub valset_update_id_to_height: ::prost::alloc::vec::Vec, + /// empty for a new chain + #[prost(message, repeated, tag = "6")] + pub consumer_addition_proposals: ::prost::alloc::vec::Vec, + /// empty for a new chain + #[prost(message, repeated, tag = "7")] + pub consumer_removal_proposals: ::prost::alloc::vec::Vec, + #[prost(message, optional, tag = "8")] + pub params: ::core::option::Option, + /// empty for a new chain + #[prost(message, repeated, tag = "9")] + pub validator_consumer_pubkeys: ::prost::alloc::vec::Vec, + /// empty for a new chain + #[prost(message, repeated, tag = "10")] + pub validators_by_consumer_addr: ::prost::alloc::vec::Vec, + /// empty for a new chain + #[prost(message, repeated, tag = "11")] + pub consumer_addrs_to_prune: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "12")] + pub init_timeout_timestamps: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "13")] + pub exported_vsc_send_timestamps: ::prost::alloc::vec::Vec, } -impl ::prost::Name for ChannelToChain { - const NAME: &'static str = "ChannelToChain"; +impl ::prost::Name for GenesisState { + const NAME: &'static str = "GenesisState"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// VscUnbondingOps contains the IDs of unbonding operations that are waiting for -/// at least one VSCMaturedPacket with vscID from a consumer chain +/// The provider CCV module's knowledge of consumer state. +/// +/// Note this type is only used internally to the provider CCV module. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct VscUnbondingOps { - #[prost(uint64, tag = "1")] - pub vsc_id: u64, - #[prost(uint64, repeated, tag = "2")] - pub unbonding_op_ids: ::prost::alloc::vec::Vec, +pub struct ConsumerState { + /// ChainID defines the chain ID for the consumer chain + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + /// ChannelID defines the IBC channel ID for the consumer chain + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, + /// ClientID defines the IBC client ID for the consumer chain + #[prost(string, tag = "3")] + pub client_id: ::prost::alloc::string::String, + /// InitalHeight defines the initial block height for the consumer chain + #[prost(uint64, tag = "4")] + pub initial_height: u64, + /// ConsumerGenesis defines the initial consumer chain genesis states + #[prost(message, optional, tag = "5")] + pub consumer_genesis: ::core::option::Option, + /// PendingValsetChanges defines the pending validator set changes for the + /// consumer chain + #[prost(message, repeated, tag = "6")] + pub pending_valset_changes: ::prost::alloc::vec::Vec< + super::super::v1::ValidatorSetChangePacketData, + >, + #[prost(string, repeated, tag = "7")] + pub slash_downtime_ack: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// UnbondingOpsIndex defines the unbonding operations waiting on this consumer + /// chain + #[prost(message, repeated, tag = "8")] + pub unbonding_ops_index: ::prost::alloc::vec::Vec, } -impl ::prost::Name for VscUnbondingOps { - const NAME: &'static str = "VscUnbondingOps"; +impl ::prost::Name for ConsumerState { + const NAME: &'static str = "ConsumerState"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// UnbondingOp contains the ids of consumer chains that need to unbond before -/// the unbonding operation with the given ID can unbond +/// ValsetUpdateIdToHeight defines the genesis information for the mapping +/// of each valset udpate id to a block height #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnbondingOp { +pub struct ValsetUpdateIdToHeight { #[prost(uint64, tag = "1")] - pub id: u64, - /// consumer chains that are still unbonding - #[prost(string, repeated, tag = "2")] - pub unbonding_consumer_chains: ::prost::alloc::vec::Vec< - ::prost::alloc::string::String, - >, + pub valset_update_id: u64, + #[prost(uint64, tag = "2")] + pub height: u64, } -impl ::prost::Name for UnbondingOp { - const NAME: &'static str = "UnbondingOp"; +impl ::prost::Name for ValsetUpdateIdToHeight { + const NAME: &'static str = "ValsetUpdateIdToHeight"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) @@ -917,14 +609,12 @@ impl ::prost::Name for UnbondingOp { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct InitTimeoutTimestamp { +pub struct QueryConsumerGenesisRequest { #[prost(string, tag = "1")] pub chain_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - pub timestamp: u64, } -impl ::prost::Name for InitTimeoutTimestamp { - const NAME: &'static str = "InitTimeoutTimestamp"; +impl ::prost::Name for QueryConsumerGenesisRequest { + const NAME: &'static str = "QueryConsumerGenesisRequest"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) @@ -932,61 +622,45 @@ impl ::prost::Name for InitTimeoutTimestamp { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct VscSendTimestamp { - #[prost(uint64, tag = "1")] - pub vsc_id: u64, - #[prost(message, optional, tag = "2")] - pub timestamp: ::core::option::Option< - super::super::super::super::google::protobuf::Timestamp, - >, +pub struct QueryConsumerGenesisResponse { + #[prost(message, optional, tag = "1")] + pub genesis_state: ::core::option::Option, } -impl ::prost::Name for VscSendTimestamp { - const NAME: &'static str = "VscSendTimestamp"; +impl ::prost::Name for QueryConsumerGenesisResponse { + const NAME: &'static str = "QueryConsumerGenesisResponse"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ValidatorSetChangePackets is a pb list of ccv.ValidatorSetChangePacketData. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorSetChangePackets { - #[prost(message, repeated, tag = "1")] - pub list: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ValidatorSetChangePackets { - const NAME: &'static str = "ValidatorSetChangePackets"; +pub struct QueryConsumerChainsRequest {} +impl ::prost::Name for QueryConsumerChainsRequest { + const NAME: &'static str = "QueryConsumerChainsRequest"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// MaturedUnbondingOps defines a list of ids corresponding to ids of matured -/// unbonding operations. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct MaturedUnbondingOps { - #[prost(uint64, repeated, tag = "1")] - pub ids: ::prost::alloc::vec::Vec, +pub struct QueryConsumerChainsResponse { + #[prost(message, repeated, tag = "1")] + pub chains: ::prost::alloc::vec::Vec, } -impl ::prost::Name for MaturedUnbondingOps { - const NAME: &'static str = "MaturedUnbondingOps"; +impl ::prost::Name for QueryConsumerChainsResponse { + const NAME: &'static str = "QueryConsumerChainsResponse"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) } } -/// ExportedVscSendTimestamps is VscSendTimestamp with chainID info for exporting to genesis #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExportedVscSendTimestamp { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub vsc_send_timestamps: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ExportedVscSendTimestamp { - const NAME: &'static str = "ExportedVscSendTimestamp"; +pub struct QueryConsumerChainStartProposalsRequest {} +impl ::prost::Name for QueryConsumerChainStartProposalsRequest { + const NAME: &'static str = "QueryConsumerChainStartProposalsRequest"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) @@ -994,147 +668,12 @@ impl ::prost::Name for ExportedVscSendTimestamp { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct KeyAssignmentReplacement { - #[prost(bytes = "vec", tag = "1")] - pub provider_addr: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub prev_c_key: ::core::option::Option<::cometbft_proto::crypto::PublicKey>, - #[prost(int64, tag = "3")] - pub power: i64, +pub struct QueryConsumerChainStartProposalsResponse { + #[prost(message, optional, tag = "1")] + pub proposals: ::core::option::Option, } -impl ::prost::Name for KeyAssignmentReplacement { - const NAME: &'static str = "KeyAssignmentReplacement"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -/// Used to serialize the ValidatorConsumerPubKey index from key assignment -/// ValidatorConsumerPubKey: (chainID, providerAddr consAddr) -> consumerKey -/// tmprotocrypto.PublicKey -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorConsumerPubKey { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - pub provider_addr: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub consumer_key: ::core::option::Option<::cometbft_proto::crypto::PublicKey>, -} -impl ::prost::Name for ValidatorConsumerPubKey { - const NAME: &'static str = "ValidatorConsumerPubKey"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -/// Used to serialize the ValidatorConsumerAddr index from key assignment -/// ValidatorByConsumerAddr: (chainID, consumerAddr consAddr) -> providerAddr -/// consAddr -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorByConsumerAddr { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - pub consumer_addr: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - pub provider_addr: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ValidatorByConsumerAddr { - const NAME: &'static str = "ValidatorByConsumerAddr"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -/// Used to serialize the ConsumerAddrsToPrune index from key assignment -/// ConsumerAddrsToPrune: (chainID, vscID uint64) -> consumerAddrs AddressList -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerAddrsToPrune { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - pub vsc_id: u64, - #[prost(message, optional, tag = "3")] - pub consumer_addrs: ::core::option::Option, -} -impl ::prost::Name for ConsumerAddrsToPrune { - const NAME: &'static str = "ConsumerAddrsToPrune"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsumerGenesisRequest { - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, -} -impl ::prost::Name for QueryConsumerGenesisRequest { - const NAME: &'static str = "QueryConsumerGenesisRequest"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsumerGenesisResponse { - #[prost(message, optional, tag = "1")] - pub genesis_state: ::core::option::Option, -} -impl ::prost::Name for QueryConsumerGenesisResponse { - const NAME: &'static str = "QueryConsumerGenesisResponse"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsumerChainsRequest {} -impl ::prost::Name for QueryConsumerChainsRequest { - const NAME: &'static str = "QueryConsumerChainsRequest"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsumerChainsResponse { - #[prost(message, repeated, tag = "1")] - pub chains: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for QueryConsumerChainsResponse { - const NAME: &'static str = "QueryConsumerChainsResponse"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsumerChainStartProposalsRequest {} -impl ::prost::Name for QueryConsumerChainStartProposalsRequest { - const NAME: &'static str = "QueryConsumerChainStartProposalsRequest"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct QueryConsumerChainStartProposalsResponse { - #[prost(message, optional, tag = "1")] - pub proposals: ::core::option::Option, -} -impl ::prost::Name for QueryConsumerChainStartProposalsResponse { - const NAME: &'static str = "QueryConsumerChainStartProposalsResponse"; +impl ::prost::Name for QueryConsumerChainStartProposalsResponse { + const NAME: &'static str = "QueryConsumerChainStartProposalsResponse"; const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; fn full_name() -> ::prost::alloc::string::String { ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) @@ -2216,23 +1755,602 @@ pub mod query_server { } "/interchain_security.ccv.provider.v1.Query/QueryThrottleState" => { #[allow(non_camel_case_types)] - struct QueryThrottleStateSvc(pub Arc); - impl< - T: Query, - > tonic::server::UnaryService - for QueryThrottleStateSvc { - type Response = super::QueryThrottleStateResponse; + struct QueryThrottleStateSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for QueryThrottleStateSvc { + type Response = super::QueryThrottleStateResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::query_throttle_state(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = QueryThrottleStateSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/interchain_security.ccv.provider.v1.Query/QueryThrottledConsumerPacketData" => { + #[allow(non_camel_case_types)] + struct QueryThrottledConsumerPacketDataSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryThrottledConsumerPacketDataRequest, + > for QueryThrottledConsumerPacketDataSvc { + type Response = super::QueryThrottledConsumerPacketDataResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryThrottledConsumerPacketDataRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::query_throttled_consumer_packet_data( + &inner, + request, + ) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = QueryThrottledConsumerPacketDataSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms" => { + #[allow(non_camel_case_types)] + struct QueryRegisteredConsumerRewardDenomsSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService< + super::QueryRegisteredConsumerRewardDenomsRequest, + > for QueryRegisteredConsumerRewardDenomsSvc { + type Response = super::QueryRegisteredConsumerRewardDenomsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::QueryRegisteredConsumerRewardDenomsRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::query_registered_consumer_reward_denoms( + &inner, + request, + ) + .await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = QueryRegisteredConsumerRewardDenomsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for QueryServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for QueryServer { + const NAME: &'static str = "interchain_security.ccv.provider.v1.Query"; + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgAssignConsumerKey { + /// The chain id of the consumer chain to assign a consensus public key to + #[prost(string, tag = "1")] + pub chain_id: ::prost::alloc::string::String, + /// The validator address on the provider + #[prost(string, tag = "2")] + pub provider_addr: ::prost::alloc::string::String, + /// The consensus public key to use on the consumer. + /// in json string format corresponding to proto-any, ex: + /// `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}` + #[prost(string, tag = "3")] + pub consumer_key: ::prost::alloc::string::String, +} +impl ::prost::Name for MsgAssignConsumerKey { + const NAME: &'static str = "MsgAssignConsumerKey"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgAssignConsumerKeyResponse {} +impl ::prost::Name for MsgAssignConsumerKeyResponse { + const NAME: &'static str = "MsgAssignConsumerKeyResponse"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + } +} +/// MsgSubmitConsumerMisbehaviour defines a message that reports a light client attack, +/// also known as a misbehaviour, observed on a consumer chain +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitConsumerMisbehaviour { + #[prost(string, tag = "1")] + pub submitter: ::prost::alloc::string::String, + /// The Misbehaviour of the consumer chain wrapping + /// two conflicting IBC headers + #[prost(message, optional, tag = "2")] + pub misbehaviour: ::core::option::Option< + super::super::super::super::ibc::lightclients::tendermint::v1::Misbehaviour, + >, +} +impl ::prost::Name for MsgSubmitConsumerMisbehaviour { + const NAME: &'static str = "MsgSubmitConsumerMisbehaviour"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitConsumerMisbehaviourResponse {} +impl ::prost::Name for MsgSubmitConsumerMisbehaviourResponse { + const NAME: &'static str = "MsgSubmitConsumerMisbehaviourResponse"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + } +} +/// MsgSubmitConsumerDoubleVoting defines a message that reports +/// a double signing infraction observed on a consumer chain +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitConsumerDoubleVoting { + #[prost(string, tag = "1")] + pub submitter: ::prost::alloc::string::String, + /// The equivocation of the consumer chain wrapping + /// an evidence of a validator that signed two conflicting votes + #[prost(message, optional, tag = "2")] + pub duplicate_vote_evidence: ::core::option::Option< + ::cometbft_proto::types::v1::DuplicateVoteEvidence, + >, + /// The light client header of the infraction block + #[prost(message, optional, tag = "3")] + pub infraction_block_header: ::core::option::Option< + super::super::super::super::ibc::lightclients::tendermint::v1::Header, + >, +} +impl ::prost::Name for MsgSubmitConsumerDoubleVoting { + const NAME: &'static str = "MsgSubmitConsumerDoubleVoting"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgSubmitConsumerDoubleVotingResponse {} +impl ::prost::Name for MsgSubmitConsumerDoubleVotingResponse { + const NAME: &'static str = "MsgSubmitConsumerDoubleVotingResponse"; + const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; + fn full_name() -> ::prost::alloc::string::String { + ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + } +} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn assign_consumer_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/interchain_security.ccv.provider.v1.Msg/AssignConsumerKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "interchain_security.ccv.provider.v1.Msg", + "AssignConsumerKey", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn submit_consumer_misbehaviour( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerMisbehaviour", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "interchain_security.ccv.provider.v1.Msg", + "SubmitConsumerMisbehaviour", + ), + ); + self.inner.unary(req, path, codec).await + } + pub async fn submit_consumer_double_voting( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerDoubleVoting", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "interchain_security.ccv.provider.v1.Msg", + "SubmitConsumerDoubleVoting", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + async fn assign_consumer_key( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn submit_consumer_misbehaviour( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn submit_consumer_double_voting( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/interchain_security.ccv.provider.v1.Msg/AssignConsumerKey" => { + #[allow(non_camel_case_types)] + struct AssignConsumerKeySvc(pub Arc); + impl tonic::server::UnaryService + for AssignConsumerKeySvc { + type Response = super::MsgAssignConsumerKeyResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::query_throttle_state(&inner, request).await + ::assign_consumer_key(&inner, request).await }; Box::pin(fut) } @@ -2244,7 +2362,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = QueryThrottleStateSvc(inner); + let method = AssignConsumerKeySvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2260,31 +2378,25 @@ pub mod query_server { }; Box::pin(fut) } - "/interchain_security.ccv.provider.v1.Query/QueryThrottledConsumerPacketData" => { + "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerMisbehaviour" => { #[allow(non_camel_case_types)] - struct QueryThrottledConsumerPacketDataSvc(pub Arc); + struct SubmitConsumerMisbehaviourSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService< - super::QueryThrottledConsumerPacketDataRequest, - > for QueryThrottledConsumerPacketDataSvc { - type Response = super::QueryThrottledConsumerPacketDataResponse; + T: Msg, + > tonic::server::UnaryService + for SubmitConsumerMisbehaviourSvc { + type Response = super::MsgSubmitConsumerMisbehaviourResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryThrottledConsumerPacketDataRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::query_throttled_consumer_packet_data( - &inner, - request, - ) + ::submit_consumer_misbehaviour(&inner, request) .await }; Box::pin(fut) @@ -2297,7 +2409,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = QueryThrottledConsumerPacketDataSvc(inner); + let method = SubmitConsumerMisbehaviourSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2313,31 +2425,25 @@ pub mod query_server { }; Box::pin(fut) } - "/interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms" => { + "/interchain_security.ccv.provider.v1.Msg/SubmitConsumerDoubleVoting" => { #[allow(non_camel_case_types)] - struct QueryRegisteredConsumerRewardDenomsSvc(pub Arc); + struct SubmitConsumerDoubleVotingSvc(pub Arc); impl< - T: Query, - > tonic::server::UnaryService< - super::QueryRegisteredConsumerRewardDenomsRequest, - > for QueryRegisteredConsumerRewardDenomsSvc { - type Response = super::QueryRegisteredConsumerRewardDenomsResponse; + T: Msg, + > tonic::server::UnaryService + for SubmitConsumerDoubleVotingSvc { + type Response = super::MsgSubmitConsumerDoubleVotingResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request< - super::QueryRegisteredConsumerRewardDenomsRequest, - >, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::query_registered_consumer_reward_denoms( - &inner, - request, - ) + ::submit_consumer_double_voting(&inner, request) .await }; Box::pin(fut) @@ -2350,7 +2456,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = QueryRegisteredConsumerRewardDenomsSvc(inner); + let method = SubmitConsumerDoubleVotingSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -2381,7 +2487,7 @@ pub mod query_server { } } } - impl Clone for QueryServer { + impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -2393,7 +2499,7 @@ pub mod query_server { } } } - impl Clone for _Inner { + impl Clone for _Inner { fn clone(&self) -> Self { Self(Arc::clone(&self.0)) } @@ -2403,113 +2509,7 @@ pub mod query_server { write!(f, "{:?}", self.0) } } - impl tonic::server::NamedService for QueryServer { - const NAME: &'static str = "interchain_security.ccv.provider.v1.Query"; - } -} -/// GenesisState defines the CCV provider chain genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GenesisState { - /// strictly positive and set to 1 (DefaultValsetUpdateID) for a new chain - #[prost(uint64, tag = "1")] - pub valset_update_id: u64, - /// empty for a new chain - #[prost(message, repeated, tag = "2")] - pub consumer_states: ::prost::alloc::vec::Vec, - /// empty for a new chain - #[prost(message, repeated, tag = "3")] - pub unbonding_ops: ::prost::alloc::vec::Vec, - /// empty for a new chain - #[prost(message, optional, tag = "4")] - pub mature_unbonding_ops: ::core::option::Option, - /// empty for a new chain - #[prost(message, repeated, tag = "5")] - pub valset_update_id_to_height: ::prost::alloc::vec::Vec, - /// empty for a new chain - #[prost(message, repeated, tag = "6")] - pub consumer_addition_proposals: ::prost::alloc::vec::Vec, - /// empty for a new chain - #[prost(message, repeated, tag = "7")] - pub consumer_removal_proposals: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub params: ::core::option::Option, - /// empty for a new chain - #[prost(message, repeated, tag = "9")] - pub validator_consumer_pubkeys: ::prost::alloc::vec::Vec, - /// empty for a new chain - #[prost(message, repeated, tag = "10")] - pub validators_by_consumer_addr: ::prost::alloc::vec::Vec, - /// empty for a new chain - #[prost(message, repeated, tag = "11")] - pub consumer_addrs_to_prune: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "12")] - pub init_timeout_timestamps: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "13")] - pub exported_vsc_send_timestamps: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for GenesisState { - const NAME: &'static str = "GenesisState"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -/// The provider CCV module's knowledge of consumer state. -/// -/// Note this type is only used internally to the provider CCV module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsumerState { - /// ChainID defines the chain ID for the consumer chain - #[prost(string, tag = "1")] - pub chain_id: ::prost::alloc::string::String, - /// ChannelID defines the IBC channel ID for the consumer chain - #[prost(string, tag = "2")] - pub channel_id: ::prost::alloc::string::String, - /// ClientID defines the IBC client ID for the consumer chain - #[prost(string, tag = "3")] - pub client_id: ::prost::alloc::string::String, - /// InitalHeight defines the initial block height for the consumer chain - #[prost(uint64, tag = "4")] - pub initial_height: u64, - /// ConsumerGenesis defines the initial consumer chain genesis states - #[prost(message, optional, tag = "5")] - pub consumer_genesis: ::core::option::Option, - /// PendingValsetChanges defines the pending validator set changes for the - /// consumer chain - #[prost(message, repeated, tag = "6")] - pub pending_valset_changes: ::prost::alloc::vec::Vec< - super::super::v1::ValidatorSetChangePacketData, - >, - #[prost(string, repeated, tag = "7")] - pub slash_downtime_ack: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// UnbondingOpsIndex defines the unbonding operations waiting on this consumer - /// chain - #[prost(message, repeated, tag = "8")] - pub unbonding_ops_index: ::prost::alloc::vec::Vec, -} -impl ::prost::Name for ConsumerState { - const NAME: &'static str = "ConsumerState"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) - } -} -/// ValsetUpdateIdToHeight defines the genesis information for the mapping -/// of each valset udpate id to a block height -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValsetUpdateIdToHeight { - #[prost(uint64, tag = "1")] - pub valset_update_id: u64, - #[prost(uint64, tag = "2")] - pub height: u64, -} -impl ::prost::Name for ValsetUpdateIdToHeight { - const NAME: &'static str = "ValsetUpdateIdToHeight"; - const PACKAGE: &'static str = "interchain_security.ccv.provider.v1"; - fn full_name() -> ::prost::alloc::string::String { - ::prost::alloc::format!("interchain_security.ccv.provider.v1.{}", Self::NAME) + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "interchain_security.ccv.provider.v1.Msg"; } } diff --git a/src/prost/interchain_security.ccv.v1.rs b/src/prost/interchain_security.ccv.v1.rs index 86721f42..0be05bbc 100644 --- a/src/prost/interchain_security.ccv.v1.rs +++ b/src/prost/interchain_security.ccv.v1.rs @@ -8,7 +8,7 @@ pub struct ValidatorSetChangePacketData { #[prost(message, repeated, tag = "1")] pub validator_updates: ::prost::alloc::vec::Vec< - ::cometbft_proto::abci::ValidatorUpdate, + ::cometbft_proto::abci::v1beta3::ValidatorUpdate, >, #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -47,7 +47,7 @@ impl ::prost::Name for VscMaturedPacketData { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashPacketData { #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option<::cometbft_proto::abci::Validator>, + pub validator: ::core::option::Option<::cometbft_proto::abci::v1beta3::Validator>, /// map to the infraction block height on the provider #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -142,7 +142,7 @@ impl ::prost::Name for ConsumerPacketDataV1 { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashPacketDataV1 { #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option<::cometbft_proto::abci::Validator>, + pub validator: ::core::option::Option<::cometbft_proto::abci::v1beta3::Validator>, /// map to the infraction block height on the provider #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -340,7 +340,7 @@ pub struct ConsumerGenesisState { /// InitialValset filled in on new chain and on restart. #[prost(message, repeated, tag = "8")] pub initial_val_set: ::prost::alloc::vec::Vec< - ::cometbft_proto::abci::ValidatorUpdate, + ::cometbft_proto::abci::v1beta3::ValidatorUpdate, >, /// HeightToValsetUpdateId nil on new chain, filled in on restart. #[prost(message, repeated, tag = "9")] diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index e1e93ac386d6ecbc3b90d519fa4116c2f21aa8d8..aadc057280e08c8fa4a6995638cbd57aa2bb2455 100644 GIT binary patch delta 91671 zcmbrn34C0|kv~5D=DjyFPxt7sJi11QEm_trTed8p@+lvZ5Ba{3rLiqrmnGTQ4q*Tj z!eL|XCP2WDgFr|e5|YU#WP#-hM?wgMO<*A*VF@`lfrW$|g#5o%-S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zOu9?=?AvqG+ingT$EWju4%+odANX64XrF#zVD{eP^sQ^M)4Az;=4O9Wl-@i$dx-o0 E0FubQFaQ7m diff --git a/src/prost/stride.interchainquery.v1.rs b/src/prost/stride.interchainquery.v1.rs index 5a81bfdd..7881d6c7 100644 --- a/src/prost/stride.interchainquery.v1.rs +++ b/src/prost/stride.interchainquery.v1.rs @@ -9,7 +9,7 @@ pub struct MsgSubmitQueryResponse { #[prost(bytes = "vec", tag = "3")] pub result: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] - pub proof_ops: ::core::option::Option<::cometbft_proto::crypto::ProofOps>, + pub proof_ops: ::core::option::Option<::cometbft_proto::crypto::v1::ProofOps>, #[prost(int64, tag = "5")] pub height: i64, #[prost(string, tag = "6")] From 223e7e3204e39f546810765ca567825a4f1fc221 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 15:29:54 +0200 Subject: [PATCH 07/11] Restore temp directory cleanup in sync-protobuf.sh --- scripts/sync-protobuf.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/sync-protobuf.sh b/scripts/sync-protobuf.sh index 39b1f91b..dbf5b653 100755 --- a/scripts/sync-protobuf.sh +++ b/scripts/sync-protobuf.sh @@ -217,7 +217,7 @@ rm -f src/prost/cosmos.base.store.v1beta1.rs rm -f src/prost/tendermint.abci.rs # Remove the temporary checkouts of the repositories -# rm -rf "$COSMOS_ICS_DIR" -# rm -rf "$COSMOS_SDK_DIR" -# rm -rf "$IBC_GO_DIR" -# rm -rf "$NFT_TRANSFER_DIR" +rm -rf "$COSMOS_ICS_DIR" +rm -rf "$COSMOS_SDK_DIR" +rm -rf "$IBC_GO_DIR" +rm -rf "$NFT_TRANSFER_DIR" From 35f0512bf9fbff8499d1a34773c21eb654710cd9 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 15:49:30 +0200 Subject: [PATCH 08/11] proto-compiler: fix fmt error --- tools/proto-compiler/src/cmd/compile.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index fe445836..a93a4827 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -32,8 +32,7 @@ pub struct CompileCmd { impl CompileCmd { pub fn run(&self) { - self.compile_ibc_protos() - .unwrap_or_else(|e| { + self.compile_ibc_protos().unwrap_or_else(|e| { eprintln!("[error] failed to compile protos: {}", e); process::exit(1); }); From 062119be3af696cc154c5d87dfdef81fef2f5e1f Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 16:04:04 +0200 Subject: [PATCH 09/11] Remove generated files for protos not in cosmos-sdk 0.50 --- src/lib.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f2339b7a..24c3011d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,20 +144,6 @@ pub mod cosmos { include_proto!("cosmos.base.tendermint.v1beta1.rs"); } } - pub mod kv { - pub mod v1beta1 { - include_proto!("cosmos.base.kv.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.kv.v1beta1.serde.rs"); - } - } - pub mod snapshots { - pub mod v1beta1 { - include_proto!("cosmos.base.snapshots.v1beta1.rs"); - #[cfg(feature = "serde")] - include_proto!("cosmos.base.snapshots.v1beta1.serde.rs"); - } - } } pub mod crypto { pub mod multisig { From a3772cdba771bb9a9d3023558a2e53dc91822aad Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 16:04:51 +0200 Subject: [PATCH 10/11] Remap some abci protos to the correct cometbft_proto mod --- src/prost/cosmos.staking.v1beta1.rs | 2 +- src/prost/interchain_security.ccv.v1.rs | 8 ++++---- tools/proto-compiler/src/cmd/compile.rs | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/prost/cosmos.staking.v1beta1.rs b/src/prost/cosmos.staking.v1beta1.rs index 664c600e..b5de8490 100644 --- a/src/prost/cosmos.staking.v1beta1.rs +++ b/src/prost/cosmos.staking.v1beta1.rs @@ -580,7 +580,7 @@ impl ::prost::Name for Pool { pub struct ValidatorUpdates { #[prost(message, repeated, tag = "1")] pub updates: ::prost::alloc::vec::Vec< - ::cometbft_proto::abci::v1beta3::ValidatorUpdate, + ::cometbft_proto::abci::v1beta1::ValidatorUpdate, >, } impl ::prost::Name for ValidatorUpdates { diff --git a/src/prost/interchain_security.ccv.v1.rs b/src/prost/interchain_security.ccv.v1.rs index 0be05bbc..48dbe8e0 100644 --- a/src/prost/interchain_security.ccv.v1.rs +++ b/src/prost/interchain_security.ccv.v1.rs @@ -8,7 +8,7 @@ pub struct ValidatorSetChangePacketData { #[prost(message, repeated, tag = "1")] pub validator_updates: ::prost::alloc::vec::Vec< - ::cometbft_proto::abci::v1beta3::ValidatorUpdate, + ::cometbft_proto::abci::v1beta1::ValidatorUpdate, >, #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -47,7 +47,7 @@ impl ::prost::Name for VscMaturedPacketData { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashPacketData { #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option<::cometbft_proto::abci::v1beta3::Validator>, + pub validator: ::core::option::Option<::cometbft_proto::abci::v1beta1::Validator>, /// map to the infraction block height on the provider #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -142,7 +142,7 @@ impl ::prost::Name for ConsumerPacketDataV1 { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SlashPacketDataV1 { #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option<::cometbft_proto::abci::v1beta3::Validator>, + pub validator: ::core::option::Option<::cometbft_proto::abci::v1beta1::Validator>, /// map to the infraction block height on the provider #[prost(uint64, tag = "2")] pub valset_update_id: u64, @@ -340,7 +340,7 @@ pub struct ConsumerGenesisState { /// InitialValset filled in on new chain and on restart. #[prost(message, repeated, tag = "8")] pub initial_val_set: ::prost::alloc::vec::Vec< - ::cometbft_proto::abci::v1beta3::ValidatorUpdate, + ::cometbft_proto::abci::v1beta1::ValidatorUpdate, >, /// HeightToValsetUpdateId nil on new chain, filled in on restart. #[prost(message, repeated, tag = "9")] diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index a93a4827..67abf887 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -143,6 +143,8 @@ impl CompileCmd { "::cometbft_proto::abci::v1beta1::Event", ) // All other types should be up to CometBFT 0.38 + .extern_path(".tendermint.abci.Validator", "::cometbft_proto::abci::v1beta1::Validator") + .extern_path(".tendermint.abci.ValidatorUpdate", "::cometbft_proto::abci::v1beta1::ValidatorUpdate") .extern_path(".tendermint.abci", "::cometbft_proto::abci::v1beta3") .extern_path(".tendermint.crypto", "::cometbft_proto::crypto::v1") .extern_path(".tendermint.p2p", "::cometbft_proto::p2p::v1") From a2682134d74b3b8bcbdc84576d2ea5ff543a26a9 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 26 Feb 2024 16:06:49 +0200 Subject: [PATCH 11/11] proto-compiler: fix a fresh fmt error --- tools/proto-compiler/src/cmd/compile.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/proto-compiler/src/cmd/compile.rs b/tools/proto-compiler/src/cmd/compile.rs index 67abf887..7caffdc5 100644 --- a/tools/proto-compiler/src/cmd/compile.rs +++ b/tools/proto-compiler/src/cmd/compile.rs @@ -143,8 +143,14 @@ impl CompileCmd { "::cometbft_proto::abci::v1beta1::Event", ) // All other types should be up to CometBFT 0.38 - .extern_path(".tendermint.abci.Validator", "::cometbft_proto::abci::v1beta1::Validator") - .extern_path(".tendermint.abci.ValidatorUpdate", "::cometbft_proto::abci::v1beta1::ValidatorUpdate") + .extern_path( + ".tendermint.abci.Validator", + "::cometbft_proto::abci::v1beta1::Validator", + ) + .extern_path( + ".tendermint.abci.ValidatorUpdate", + "::cometbft_proto::abci::v1beta1::ValidatorUpdate", + ) .extern_path(".tendermint.abci", "::cometbft_proto::abci::v1beta3") .extern_path(".tendermint.crypto", "::cometbft_proto::crypto::v1") .extern_path(".tendermint.p2p", "::cometbft_proto::p2p::v1")