Skip to content

Commit

Permalink
Fix cosmos-sdk v0.44.1 protos
Browse files Browse the repository at this point in the history
See previous commit regarding the code fix leading to these updated
compiled proto files.
  • Loading branch information
ChristianBorst committed Oct 7, 2021
1 parent 9da9375 commit 5936e62
Show file tree
Hide file tree
Showing 14 changed files with 716 additions and 316 deletions.
10 changes: 10 additions & 0 deletions cosmos-sdk-proto/src/prost/cosmos.auth.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ pub struct Params {
#[prost(uint64, tag = "5")]
pub sig_verify_cost_secp256k1: u64,
}
/// GenesisState defines the auth module's genesis state.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
/// params defines all the paramaters of the module.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
/// accounts are the accounts present at genesis.
#[prost(message, repeated, tag = "2")]
pub accounts: ::prost::alloc::vec::Vec<::prost_types::Any>,
}
/// QueryAccountsRequest is the request type for the Query/Accounts RPC method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAccountsRequest {
Expand Down
243 changes: 139 additions & 104 deletions cosmos-sdk-proto/src/prost/cosmos.bank.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,145 @@ pub struct Metadata {
#[prost(string, tag = "6")]
pub symbol: ::prost::alloc::string::String,
}
/// MsgSend represents a message to send coins from one account to another.
#[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<super::super::base::v1beta1::Coin>,
}
/// MsgSendResponse defines the Msg/Send response type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSendResponse {}
/// MsgMultiSend represents an arbitrary multi-in, multi-out send message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMultiSend {
#[prost(message, repeated, tag = "1")]
pub inputs: ::prost::alloc::vec::Vec<Input>,
#[prost(message, repeated, tag = "2")]
pub outputs: ::prost::alloc::vec::Vec<Output>,
}
/// MsgMultiSendResponse defines the Msg/MultiSend response type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMultiSendResponse {}
#[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)]
use tonic::codegen::*;
#[doc = " Msg defines the bank Msg service."]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MsgClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self {
let inner = tonic::client::Grpc::with_interceptor(inner, interceptor);
Self { inner }
}
#[doc = " Send defines a method for sending coins from one account to another account."]
pub async fn send(
&mut self,
request: impl tonic::IntoRequest<super::MsgSend>,
) -> Result<tonic::Response<super::MsgSendResponse>, 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");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " MultiSend defines a method for sending coins from some accounts to other accounts."]
pub async fn multi_send(
&mut self,
request: impl tonic::IntoRequest<super::MsgMultiSend>,
) -> Result<tonic::Response<super::MsgMultiSendResponse>, 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");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for MsgClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
impl<T> std::fmt::Debug for MsgClient<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MsgClient {{ ... }}")
}
}
}
/// SendAuthorization allows the grantee to spend up to spend_limit coins from
/// the granter's account.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendAuthorization {
#[prost(message, repeated, tag = "1")]
pub spend_limit: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
}
/// GenesisState defines the bank module's genesis state.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
/// params defines all the paramaters of the module.
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
/// balances is an array containing the balances of all the accounts.
#[prost(message, repeated, tag = "2")]
pub balances: ::prost::alloc::vec::Vec<Balance>,
/// 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<super::super::base::v1beta1::Coin>,
/// denom_metadata defines the metadata of the differents coins.
#[prost(message, repeated, tag = "4")]
pub denom_metadata: ::prost::alloc::vec::Vec<Metadata>,
}
/// Balance defines an account address and balance pair used in the bank module's
/// genesis state.
#[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<super::super::base::v1beta1::Coin>,
}
/// QueryBalanceRequest is the request type for the Query/Balance RPC method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryBalanceRequest {
Expand Down Expand Up @@ -353,107 +492,3 @@ pub mod query_client {
}
}
}
/// MsgSend represents a message to send coins from one account to another.
#[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<super::super::base::v1beta1::Coin>,
}
/// MsgSendResponse defines the Msg/Send response type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSendResponse {}
/// MsgMultiSend represents an arbitrary multi-in, multi-out send message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMultiSend {
#[prost(message, repeated, tag = "1")]
pub inputs: ::prost::alloc::vec::Vec<Input>,
#[prost(message, repeated, tag = "2")]
pub outputs: ::prost::alloc::vec::Vec<Output>,
}
/// MsgMultiSendResponse defines the Msg/MultiSend response type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMultiSendResponse {}
#[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)]
use tonic::codegen::*;
#[doc = " Msg defines the bank Msg service."]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MsgClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self {
let inner = tonic::client::Grpc::with_interceptor(inner, interceptor);
Self { inner }
}
#[doc = " Send defines a method for sending coins from one account to another account."]
pub async fn send(
&mut self,
request: impl tonic::IntoRequest<super::MsgSend>,
) -> Result<tonic::Response<super::MsgSendResponse>, 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");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " MultiSend defines a method for sending coins from some accounts to other accounts."]
pub async fn multi_send(
&mut self,
request: impl tonic::IntoRequest<super::MsgMultiSend>,
) -> Result<tonic::Response<super::MsgMultiSendResponse>, 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");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for MsgClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
impl<T> std::fmt::Debug for MsgClient<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MsgClient {{ ... }}")
}
}
}
2 changes: 1 addition & 1 deletion cosmos-sdk-proto/src/prost/cosmos.base.abci.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,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<::tendermint_proto::abci::Event>,
}
/// SimulationResponse defines the response generated when a transaction is
/// successfully simulated.
Expand Down
86 changes: 86 additions & 0 deletions cosmos-sdk-proto/src/prost/cosmos.base.reflection.v1beta1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,89 @@ pub struct ListImplementationsResponse {
#[prost(string, repeated, tag = "1")]
pub implementation_message_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
#[doc = r" Generated client implementations."]
pub mod reflection_service_client {
#![allow(unused_variables, dead_code, missing_docs)]
use tonic::codegen::*;
#[doc = " ReflectionService defines a service for interface reflection."]
pub struct ReflectionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ReflectionServiceClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ReflectionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor(inner: T, interceptor: impl Into<tonic::Interceptor>) -> Self {
let inner = tonic::client::Grpc::with_interceptor(inner, interceptor);
Self { inner }
}
#[doc = " ListAllInterfaces lists all the interfaces registered in the interface"]
#[doc = " registry."]
pub async fn list_all_interfaces(
&mut self,
request: impl tonic::IntoRequest<super::ListAllInterfacesRequest>,
) -> Result<tonic::Response<super::ListAllInterfacesResponse>, 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.reflection.v1beta1.ReflectionService/ListAllInterfaces",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " ListImplementations list all the concrete types that implement a given"]
#[doc = " interface."]
pub async fn list_implementations(
&mut self,
request: impl tonic::IntoRequest<super::ListImplementationsRequest>,
) -> Result<tonic::Response<super::ListImplementationsResponse>, 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.reflection.v1beta1.ReflectionService/ListImplementations",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for ReflectionServiceClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
impl<T> std::fmt::Debug for ReflectionServiceClient<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReflectionServiceClient {{ ... }}")
}
}
}
Loading

0 comments on commit 5936e62

Please sign in to comment.