diff --git a/.gitignore b/.gitignore index 2c96eb1b..44709884 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ target/ -Cargo.lock +Cargo.lock \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/COSMOS_SDK_COMMIT b/cosmos-sdk-proto/src/prost/COSMOS_SDK_COMMIT index f412c7b3..628867f7 100644 --- a/cosmos-sdk-proto/src/prost/COSMOS_SDK_COMMIT +++ b/cosmos-sdk-proto/src/prost/COSMOS_SDK_COMMIT @@ -1 +1 @@ -v0.44.1 \ No newline at end of file +v0.45.1 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/IBC_COMMIT b/cosmos-sdk-proto/src/prost/IBC_COMMIT index 0408c30b..201271f0 100644 --- a/cosmos-sdk-proto/src/prost/IBC_COMMIT +++ b/cosmos-sdk-proto/src/prost/IBC_COMMIT @@ -1 +1 @@ -v1.2.0 \ No newline at end of file +v2.0.3 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/WASMD_COMMIT b/cosmos-sdk-proto/src/prost/WASMD_COMMIT index fcc9d59a..964a04d9 100644 --- a/cosmos-sdk-proto/src/prost/WASMD_COMMIT +++ b/cosmos-sdk-proto/src/prost/WASMD_COMMIT @@ -1 +1 @@ -v0.21.0 \ No newline at end of file +v0.23.0 \ No newline at end of file diff --git a/cosmos-sdk-proto/src/prost/cosmos.authz.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos.authz.v1beta1.rs new file mode 100644 index 00000000..2780391b --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos.authz.v1beta1.rs @@ -0,0 +1,325 @@ +/// GenericAuthorization gives the grantee unrestricted permissions to execute +/// the provided method on behalf of the granter's account. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenericAuthorization { + /// Msg, identified by it's type URL, to grant unrestricted permissions to execute + #[prost(string, tag = "1")] + pub msg: ::prost::alloc::string::String, +} +/// Grant gives permissions to execute +/// the provide method with expiration time. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Grant { + #[prost(message, optional, tag = "1")] + pub authorization: ::core::option::Option<::prost_types::Any>, + #[prost(message, optional, tag = "2")] + pub expiration: ::core::option::Option<::prost_types::Timestamp>, +} +/// MsgGrant is a request type for Grant method. It declares authorization to the grantee +/// on behalf of the granter with the provided expiration time. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgGrant { + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub grant: ::core::option::Option, +} +/// MsgExecResponse defines the Msg/MsgExecResponse response type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgExecResponse { + #[prost(bytes = "vec", repeated, tag = "1")] + pub results: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +/// MsgExec attempts to execute the provided messages using +/// authorizations granted to the grantee. Each message should have only +/// one signer corresponding to the granter of the authorization. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgExec { + #[prost(string, tag = "1")] + pub grantee: ::prost::alloc::string::String, + /// Authorization Msg requests to execute. Each msg must implement Authorization interface + /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) + /// triple and validate it. + #[prost(message, repeated, tag = "2")] + pub msgs: ::prost::alloc::vec::Vec<::prost_types::Any>, +} +/// MsgGrantResponse defines the Msg/MsgGrant response type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgGrantResponse {} +/// MsgRevoke revokes any authorization with the provided sdk.Msg type on the +/// granter's account with that has been granted to the grantee. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRevoke { + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + #[prost(string, tag = "3")] + pub msg_type_url: ::prost::alloc::string::String, +} +/// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRevokeResponse {} +#[cfg(feature = "grpc")] +#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] +#[doc = r" Generated client implementations."] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + #[doc = " Msg defines the authz Msg service."] + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + #[doc = r" Attempt to create a new client by connecting to a given endpoint."] + pub async fn connect(dst: D) -> Result + where + D: std::convert::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::ResponseBody: Body + Send + 'static, + T::Error: Into, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + #[doc = r" Compress requests with `gzip`."] + #[doc = r""] + #[doc = r" This requires the server to support it otherwise it might respond with an"] + #[doc = r" error."] + pub fn send_gzip(mut self) -> Self { + self.inner = self.inner.send_gzip(); + self + } + #[doc = r" Enable decompressing responses with `gzip`."] + pub fn accept_gzip(mut self) -> Self { + self.inner = self.inner.accept_gzip(); + self + } + #[doc = " Grant grants the provided authorization to the grantee on the granter's"] + #[doc = " account with the provided expiration time. If there is already a grant"] + #[doc = " for the given (granter, grantee, Authorization) triple, then the grant"] + #[doc = " will be overwritten."] + pub async fn grant( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.authz.v1beta1.Msg/Grant"); + self.inner.unary(request.into_request(), path, codec).await + } + #[doc = " Exec attempts to execute the provided messages using"] + #[doc = " authorizations granted to the grantee. Each message should have only"] + #[doc = " one signer corresponding to the granter of the authorization."] + pub async fn exec( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.authz.v1beta1.Msg/Exec"); + self.inner.unary(request.into_request(), path, codec).await + } + #[doc = " Revoke revokes any authorization corresponding to the provided method name on the"] + #[doc = " granter's account that has been granted to the grantee."] + pub async fn revoke( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.authz.v1beta1.Msg/Revoke"); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// QueryGrantsRequest is the request type for the Query/Grants RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryGrantsRequest { + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + /// Optional, msg_type_url, when set, will query only grants matching given msg type. + #[prost(string, tag = "3")] + pub msg_type_url: ::prost::alloc::string::String, + /// pagination defines an pagination for the request. + #[prost(message, optional, tag = "4")] + pub pagination: ::core::option::Option, +} +/// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryGrantsResponse { + /// authorizations is a list of grants granted for grantee by granter. + #[prost(message, repeated, tag = "1")] + pub grants: ::prost::alloc::vec::Vec, + /// pagination defines an pagination for the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +#[cfg(feature = "grpc")] +#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] +#[doc = r" Generated client implementations."] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + #[doc = " Query defines the gRPC querier service."] + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + #[doc = r" Attempt to create a new client by connecting to a given endpoint."] + pub async fn connect(dst: D) -> Result + where + D: std::convert::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::ResponseBody: Body + Send + 'static, + T::Error: Into, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + #[doc = r" Compress requests with `gzip`."] + #[doc = r""] + #[doc = r" This requires the server to support it otherwise it might respond with an"] + #[doc = r" error."] + pub fn send_gzip(mut self) -> Self { + self.inner = self.inner.send_gzip(); + self + } + #[doc = r" Enable decompressing responses with `gzip`."] + pub fn accept_gzip(mut self) -> Self { + self.inner = self.inner.accept_gzip(); + self + } + #[doc = " Returns list of `Authorization`, granted to the grantee by the granter."] + pub async fn grants( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.authz.v1beta1.Query/Grants"); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// EventGrant is emitted on Msg/Grant +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventGrant { + /// Msg type URL for which an autorization is granted + #[prost(string, tag = "2")] + pub msg_type_url: ::prost::alloc::string::String, + /// Granter account address + #[prost(string, tag = "3")] + pub granter: ::prost::alloc::string::String, + /// Grantee account address + #[prost(string, tag = "4")] + pub grantee: ::prost::alloc::string::String, +} +/// EventRevoke is emitted on Msg/Revoke +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EventRevoke { + /// Msg type URL for which an autorization is revoked + #[prost(string, tag = "2")] + pub msg_type_url: ::prost::alloc::string::String, + /// Granter account address + #[prost(string, tag = "3")] + pub granter: ::prost::alloc::string::String, + /// Grantee account address + #[prost(string, tag = "4")] + pub grantee: ::prost::alloc::string::String, +} +/// GenesisState defines the authz module's genesis state. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(message, repeated, tag = "1")] + pub authorization: ::prost::alloc::vec::Vec, +} +/// GrantAuthorization defines the GenesisState/GrantAuthorization type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GrantAuthorization { + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + #[prost(message, optional, tag = "3")] + pub authorization: ::core::option::Option<::prost_types::Any>, + #[prost(message, optional, tag = "4")] + pub expiration: ::core::option::Option<::prost_types::Timestamp>, +} diff --git a/cosmos-sdk-proto/src/prost/cosmos.base.query.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos.base.query.v1beta1.rs index dd279dc4..2053f9ae 100644 --- a/cosmos-sdk-proto/src/prost/cosmos.base.query.v1beta1.rs +++ b/cosmos-sdk-proto/src/prost/cosmos.base.query.v1beta1.rs @@ -27,6 +27,11 @@ pub struct PageRequest { /// is set. #[prost(bool, tag = "4")] pub count_total: bool, + /// reverse is set to true if results are to be returned in the descending order. + /// + /// Since: cosmos-sdk 0.43 + #[prost(bool, tag = "5")] + pub reverse: bool, } /// PageResponse is to be embedded in gRPC response messages where the /// corresponding request message has used PageRequest. diff --git a/cosmos-sdk-proto/src/prost/cosmos.feegrant.v1beta1.rs b/cosmos-sdk-proto/src/prost/cosmos.feegrant.v1beta1.rs new file mode 100644 index 00000000..aaf365b9 --- /dev/null +++ b/cosmos-sdk-proto/src/prost/cosmos.feegrant.v1beta1.rs @@ -0,0 +1,326 @@ +/// MsgGrantAllowance adds permission for Grantee to spend up to Allowance +/// of fees from the account of Granter. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgGrantAllowance { + /// granter is the address of the user granting an allowance of their funds. + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + /// grantee is the address of the user being granted an allowance of another user's funds. + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + /// allowance can be any of basic and filtered fee allowance. + #[prost(message, optional, tag = "3")] + pub allowance: ::core::option::Option<::prost_types::Any>, +} +/// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgGrantAllowanceResponse {} +/// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRevokeAllowance { + /// granter is the address of the user granting an allowance of their funds. + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + /// grantee is the address of the user being granted an allowance of another user's funds. + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, +} +/// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRevokeAllowanceResponse {} +#[cfg(feature = "grpc")] +#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] +#[doc = r" Generated client implementations."] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + #[doc = " Msg defines the feegrant msg service."] + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + #[doc = r" Attempt to create a new client by connecting to a given endpoint."] + pub async fn connect(dst: D) -> Result + where + D: std::convert::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::ResponseBody: Body + Send + 'static, + T::Error: Into, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> + where + F: tonic::service::Interceptor, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + #[doc = r" Compress requests with `gzip`."] + #[doc = r""] + #[doc = r" This requires the server to support it otherwise it might respond with an"] + #[doc = r" error."] + pub fn send_gzip(mut self) -> Self { + self.inner = self.inner.send_gzip(); + self + } + #[doc = r" Enable decompressing responses with `gzip`."] + pub fn accept_gzip(mut self) -> Self { + self.inner = self.inner.accept_gzip(); + self + } + #[doc = " GrantAllowance grants fee allowance to the grantee on the granter's"] + #[doc = " account with the provided expiration time."] + pub async fn grant_allowance( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.feegrant.v1beta1.Msg/GrantAllowance"); + self.inner.unary(request.into_request(), path, codec).await + } + #[doc = " RevokeAllowance revokes any fee allowance of granter's account that"] + #[doc = " has been granted to the grantee."] + pub async fn revoke_allowance( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.feegrant.v1beta1.Msg/RevokeAllowance", + ); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// BasicAllowance implements Allowance with a one-time grant of tokens +/// that optionally expires. The grantee can use up to SpendLimit to cover fees. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BasicAllowance { + /// spend_limit specifies the maximum amount of tokens that can be spent + /// by this allowance and will be updated as tokens are spent. If it is + /// empty, there is no spend limit and any amount of coins can be spent. + #[prost(message, repeated, tag = "1")] + pub spend_limit: ::prost::alloc::vec::Vec, + /// expiration specifies an optional time when this allowance expires + #[prost(message, optional, tag = "2")] + pub expiration: ::core::option::Option<::prost_types::Timestamp>, +} +/// PeriodicAllowance extends Allowance to allow for both a maximum cap, +/// as well as a limit per time period. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PeriodicAllowance { + /// basic specifies a struct of `BasicAllowance` + #[prost(message, optional, tag = "1")] + pub basic: ::core::option::Option, + /// period specifies the time duration in which period_spend_limit coins can + /// be spent before that allowance is reset + #[prost(message, optional, tag = "2")] + pub period: ::core::option::Option<::prost_types::Duration>, + /// period_spend_limit specifies the maximum number of coins that can be spent + /// in the period + #[prost(message, repeated, tag = "3")] + pub period_spend_limit: ::prost::alloc::vec::Vec, + /// period_can_spend is the number of coins left to be spent before the period_reset time + #[prost(message, repeated, tag = "4")] + pub period_can_spend: ::prost::alloc::vec::Vec, + /// period_reset is the time at which this period resets and a new one begins, + /// it is calculated from the start time of the first transaction after the + /// last period ended + #[prost(message, optional, tag = "5")] + pub period_reset: ::core::option::Option<::prost_types::Timestamp>, +} +/// AllowedMsgAllowance creates allowance only for specified message types. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AllowedMsgAllowance { + /// allowance can be any of basic and filtered fee allowance. + #[prost(message, optional, tag = "1")] + pub allowance: ::core::option::Option<::prost_types::Any>, + /// allowed_messages are the messages for which the grantee has the access. + #[prost(string, repeated, tag = "2")] + pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Grant is stored in the KVStore to record a grant with full context +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Grant { + /// granter is the address of the user granting an allowance of their funds. + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + /// grantee is the address of the user being granted an allowance of another user's funds. + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, + /// allowance can be any of basic and filtered fee allowance. + #[prost(message, optional, tag = "3")] + pub allowance: ::core::option::Option<::prost_types::Any>, +} +/// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAllowanceRequest { + /// granter is the address of the user granting an allowance of their funds. + #[prost(string, tag = "1")] + pub granter: ::prost::alloc::string::String, + /// grantee is the address of the user being granted an allowance of another user's funds. + #[prost(string, tag = "2")] + pub grantee: ::prost::alloc::string::String, +} +/// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAllowanceResponse { + /// allowance is a allowance granted for grantee by granter. + #[prost(message, optional, tag = "1")] + pub allowance: ::core::option::Option, +} +/// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAllowancesRequest { + #[prost(string, tag = "1")] + pub grantee: ::prost::alloc::string::String, + /// pagination defines an pagination for the request. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +/// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryAllowancesResponse { + /// allowances are allowance's granted for grantee by granter. + #[prost(message, repeated, tag = "1")] + pub allowances: ::prost::alloc::vec::Vec, + /// pagination defines an pagination for the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option, +} +#[cfg(feature = "grpc")] +#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] +#[doc = r" Generated client implementations."] +pub mod query_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + #[doc = " Query defines the gRPC querier service."] + #[derive(Debug, Clone)] + pub struct QueryClient { + inner: tonic::client::Grpc, + } + impl QueryClient { + #[doc = r" Attempt to create a new client by connecting to a given endpoint."] + pub async fn connect(dst: D) -> Result + where + D: std::convert::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::ResponseBody: Body + Send + 'static, + T::Error: Into, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> QueryClient> + where + F: tonic::service::Interceptor, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + >>::Error: + Into + Send + Sync, + { + QueryClient::new(InterceptedService::new(inner, interceptor)) + } + #[doc = r" Compress requests with `gzip`."] + #[doc = r""] + #[doc = r" This requires the server to support it otherwise it might respond with an"] + #[doc = r" error."] + pub fn send_gzip(mut self) -> Self { + self.inner = self.inner.send_gzip(); + self + } + #[doc = r" Enable decompressing responses with `gzip`."] + pub fn accept_gzip(mut self) -> Self { + self.inner = self.inner.accept_gzip(); + self + } + #[doc = " Allowance returns fee granted to the grantee by the granter."] + pub async fn allowance( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.feegrant.v1beta1.Query/Allowance"); + self.inner.unary(request.into_request(), path, codec).await + } + #[doc = " Allowances returns all the grants for address."] + pub async fn allowances( + &mut self, + request: impl tonic::IntoRequest, + ) -> 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.feegrant.v1beta1.Query/Allowances"); + self.inner.unary(request.into_request(), path, codec).await + } + } +} +/// GenesisState contains a set of fee allowances, persisted from the store +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GenesisState { + #[prost(message, repeated, tag = "1")] + pub allowances: ::prost::alloc::vec::Vec, +} diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs index bfc19511..a7523f5d 100644 --- a/proto-build/src/main.rs +++ b/proto-build/src/main.rs @@ -20,13 +20,13 @@ use walkdir::WalkDir; static QUIET: AtomicBool = AtomicBool::new(false); /// The Cosmos SDK commit or tag to be cloned and used to build the proto files -const COSMOS_SDK_REV: &str = "v0.44.1"; +const COSMOS_SDK_REV: &str = "v0.45.1"; /// The Cosmos ibc-go commit or tag to be cloned and used to build the proto files -const IBC_REV: &str = "v1.2.0"; +const IBC_REV: &str = "v2.0.3"; /// The wasmd commit or tag to be cloned and used to build the proto files -const WASMD_REV: &str = "v0.21.0"; +const WASMD_REV: &str = "v0.23.0"; // All paths must end with a / and either be absolute or include a ./ to reference the current // working directory. @@ -222,6 +222,7 @@ fn compile_sdk_protos_and_services(out_dir: &Path) { let proto_paths = [ format!("{}/../proto/definitions/mock", root), format!("{}/proto/cosmos/auth", sdk_dir.display()), + format!("{}/proto/cosmos/authz", sdk_dir.display()), format!("{}/proto/cosmos/bank", sdk_dir.display()), format!("{}/proto/cosmos/base", sdk_dir.display()), format!("{}/proto/cosmos/base/tendermint", sdk_dir.display()), @@ -230,6 +231,7 @@ fn compile_sdk_protos_and_services(out_dir: &Path) { format!("{}/proto/cosmos/crypto", sdk_dir.display()), format!("{}/proto/cosmos/distribution", sdk_dir.display()), format!("{}/proto/cosmos/evidence", sdk_dir.display()), + format!("{}/proto/cosmos/feegrant", sdk_dir.display()), format!("{}/proto/cosmos/genutil", sdk_dir.display()), format!("{}/proto/cosmos/gov", sdk_dir.display()), format!("{}/proto/cosmos/mint", sdk_dir.display()), diff --git a/wasmd b/wasmd index 4ffba672..891b4061 160000 --- a/wasmd +++ b/wasmd @@ -1 +1 @@ -Subproject commit 4ffba672739a41d395827b78cb610f4a51eea83c +Subproject commit 891b4061a63fe9f5802e11d9e0482f9605dd4bdc