#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessTypeParam {
#[prost(enumeration = "AccessType", tag = "1")]
pub value: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccessConfig {
#[prost(enumeration = "AccessType", tag = "1")]
pub permission: i32,
#[prost(string, tag = "2")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(message, optional, tag = "1")]
pub code_upload_access: ::core::option::Option<AccessConfig>,
#[prost(enumeration = "AccessType", tag = "2")]
pub instantiate_default_permission: i32,
#[prost(uint64, tag = "3")]
pub max_wasm_code_size: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodeInfo {
#[prost(bytes = "vec", tag = "1")]
pub code_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub creator: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub instantiate_config: ::core::option::Option<AccessConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractInfo {
#[prost(uint64, tag = "1")]
pub code_id: u64,
#[prost(string, tag = "2")]
pub creator: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub admin: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub label: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub created: ::core::option::Option<AbsoluteTxPosition>,
#[prost(string, tag = "6")]
pub ibc_port_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub extension: ::core::option::Option<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractCodeHistoryEntry {
#[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")]
pub operation: i32,
#[prost(uint64, tag = "2")]
pub code_id: u64,
#[prost(message, optional, tag = "3")]
pub updated: ::core::option::Option<AbsoluteTxPosition>,
#[prost(bytes = "vec", tag = "4")]
pub msg: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AbsoluteTxPosition {
#[prost(uint64, tag = "1")]
pub block_height: u64,
#[prost(uint64, tag = "2")]
pub tx_index: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Model {
#[prost(bytes = "vec", tag = "1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AccessType {
Unspecified = 0,
Nobody = 1,
OnlyAddress = 2,
Everybody = 3,
}
impl AccessType {
pub fn as_str_name(&self) -> &'static str {
match self {
AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED",
AccessType::Nobody => "ACCESS_TYPE_NOBODY",
AccessType::OnlyAddress => "ACCESS_TYPE_ONLY_ADDRESS",
AccessType::Everybody => "ACCESS_TYPE_EVERYBODY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ACCESS_TYPE_NOBODY" => Some(Self::Nobody),
"ACCESS_TYPE_ONLY_ADDRESS" => Some(Self::OnlyAddress),
"ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContractCodeHistoryOperationType {
Unspecified = 0,
Init = 1,
Migrate = 2,
Genesis = 3,
}
impl ContractCodeHistoryOperationType {
pub fn as_str_name(&self) -> &'static str {
match self {
ContractCodeHistoryOperationType::Unspecified => {
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED"
}
ContractCodeHistoryOperationType::Init => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",
ContractCodeHistoryOperationType::Migrate => {
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE"
}
ContractCodeHistoryOperationType::Genesis => {
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => Some(Self::Init),
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => Some(Self::Migrate),
"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => Some(Self::Genesis),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgStoreCode {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "5")]
pub instantiate_permission: ::core::option::Option<AccessConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgStoreCodeResponse {
#[prost(uint64, tag = "1")]
pub code_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgInstantiateContract {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub admin: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub code_id: u64,
#[prost(string, tag = "4")]
pub label: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "5")]
pub msg: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "6")]
pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgInstantiateContractResponse {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgExecuteContract {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contract: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub msg: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "5")]
pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgExecuteContractResponse {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMigrateContract {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contract: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub code_id: u64,
#[prost(bytes = "vec", tag = "4")]
pub msg: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgMigrateContractResponse {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateAdmin {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub new_admin: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateAdminResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgClearAdmin {
#[prost(string, tag = "1")]
pub sender: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgClearAdminResponse {}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod msg_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl MsgClient<tonic::transport::Channel> {
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::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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<F>(inner: T, interceptor: F) -> MsgClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn store_code(
&mut self,
request: impl tonic::IntoRequest<super::MsgStoreCode>,
) -> Result<tonic::Response<super::MsgStoreCodeResponse>, 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("/cosmwasm.wasm.v1.Msg/StoreCode");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn instantiate_contract(
&mut self,
request: impl tonic::IntoRequest<super::MsgInstantiateContract>,
) -> Result<tonic::Response<super::MsgInstantiateContractResponse>, 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("/cosmwasm.wasm.v1.Msg/InstantiateContract");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn execute_contract(
&mut self,
request: impl tonic::IntoRequest<super::MsgExecuteContract>,
) -> Result<tonic::Response<super::MsgExecuteContractResponse>, 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("/cosmwasm.wasm.v1.Msg/ExecuteContract");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn migrate_contract(
&mut self,
request: impl tonic::IntoRequest<super::MsgMigrateContract>,
) -> Result<tonic::Response<super::MsgMigrateContractResponse>, 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("/cosmwasm.wasm.v1.Msg/MigrateContract");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_admin(
&mut self,
request: impl tonic::IntoRequest<super::MsgUpdateAdmin>,
) -> Result<tonic::Response<super::MsgUpdateAdminResponse>, 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("/cosmwasm.wasm.v1.Msg/UpdateAdmin");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn clear_admin(
&mut self,
request: impl tonic::IntoRequest<super::MsgClearAdmin>,
) -> Result<tonic::Response<super::MsgClearAdminResponse>, 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("/cosmwasm.wasm.v1.Msg/ClearAdmin");
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgIbcSend {
#[prost(string, tag = "2")]
pub channel: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub timeout_height: u64,
#[prost(uint64, tag = "5")]
pub timeout_timestamp: u64,
#[prost(bytes = "vec", tag = "6")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgIbcCloseChannel {
#[prost(string, tag = "2")]
pub channel: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreCodeProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub run_as: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "4")]
pub wasm_byte_code: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "7")]
pub instantiate_permission: ::core::option::Option<AccessConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstantiateContractProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub run_as: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub admin: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub code_id: u64,
#[prost(string, tag = "6")]
pub label: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "7")]
pub msg: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "8")]
pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrateContractProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub contract: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub code_id: u64,
#[prost(bytes = "vec", tag = "6")]
pub msg: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SudoContractProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "4")]
pub msg: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteContractProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub run_as: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub contract: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "5")]
pub msg: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "6")]
pub funds: ::prost::alloc::vec::Vec<super::super::super::cosmos::base::v1beta1::Coin>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAdminProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub new_admin: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub contract: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClearAdminProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub contract: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PinCodesProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(uint64, repeated, packed = "false", tag = "3")]
pub code_ids: ::prost::alloc::vec::Vec<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnpinCodesProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(uint64, repeated, packed = "false", tag = "3")]
pub code_ids: ::prost::alloc::vec::Vec<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryContractInfoRequest {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryContractInfoResponse {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub contract_info: ::core::option::Option<ContractInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryContractHistoryRequest {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryContractHistoryResponse {
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<ContractCodeHistoryEntry>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryContractsByCodeRequest {
#[prost(uint64, tag = "1")]
pub code_id: u64,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryContractsByCodeResponse {
#[prost(string, repeated, tag = "1")]
pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllContractStateRequest {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllContractStateResponse {
#[prost(message, repeated, tag = "1")]
pub models: ::prost::alloc::vec::Vec<Model>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRawContractStateRequest {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub query_data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRawContractStateResponse {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySmartContractStateRequest {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub query_data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySmartContractStateResponse {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCodeRequest {
#[prost(uint64, tag = "1")]
pub code_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodeInfoResponse {
#[prost(uint64, tag = "1")]
pub code_id: u64,
#[prost(string, tag = "2")]
pub creator: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub data_hash: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCodeResponse {
#[prost(message, optional, tag = "1")]
pub code_info: ::core::option::Option<CodeInfoResponse>,
#[prost(bytes = "vec", tag = "2")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCodesRequest {
#[prost(message, optional, tag = "1")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCodesResponse {
#[prost(message, repeated, tag = "1")]
pub code_infos: ::prost::alloc::vec::Vec<CodeInfoResponse>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPinnedCodesRequest {
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPinnedCodesResponse {
#[prost(uint64, repeated, packed = "false", tag = "1")]
pub code_ids: ::prost::alloc::vec::Vec<u64>,
#[prost(message, optional, tag = "2")]
pub pagination:
::core::option::Option<super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod query_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl QueryClient<tonic::transport::Channel> {
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> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + 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<F>(
inner: T,
interceptor: F,
) -> QueryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn contract_info(
&mut self,
request: impl tonic::IntoRequest<super::QueryContractInfoRequest>,
) -> Result<tonic::Response<super::QueryContractInfoResponse>, 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("/cosmwasm.wasm.v1.Query/ContractInfo");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn contract_history(
&mut self,
request: impl tonic::IntoRequest<super::QueryContractHistoryRequest>,
) -> Result<tonic::Response<super::QueryContractHistoryResponse>, 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("/cosmwasm.wasm.v1.Query/ContractHistory");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn contracts_by_code(
&mut self,
request: impl tonic::IntoRequest<super::QueryContractsByCodeRequest>,
) -> Result<tonic::Response<super::QueryContractsByCodeResponse>, 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("/cosmwasm.wasm.v1.Query/ContractsByCode");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn all_contract_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryAllContractStateRequest>,
) -> Result<tonic::Response<super::QueryAllContractStateResponse>, 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("/cosmwasm.wasm.v1.Query/AllContractState");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn raw_contract_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryRawContractStateRequest>,
) -> Result<tonic::Response<super::QueryRawContractStateResponse>, 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("/cosmwasm.wasm.v1.Query/RawContractState");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn smart_contract_state(
&mut self,
request: impl tonic::IntoRequest<super::QuerySmartContractStateRequest>,
) -> Result<tonic::Response<super::QuerySmartContractStateResponse>, 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("/cosmwasm.wasm.v1.Query/SmartContractState");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn code(
&mut self,
request: impl tonic::IntoRequest<super::QueryCodeRequest>,
) -> Result<tonic::Response<super::QueryCodeResponse>, 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("/cosmwasm.wasm.v1.Query/Code");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn codes(
&mut self,
request: impl tonic::IntoRequest<super::QueryCodesRequest>,
) -> Result<tonic::Response<super::QueryCodesResponse>, 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("/cosmwasm.wasm.v1.Query/Codes");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn pinned_codes(
&mut self,
request: impl tonic::IntoRequest<super::QueryPinnedCodesRequest>,
) -> Result<tonic::Response<super::QueryPinnedCodesResponse>, 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("/cosmwasm.wasm.v1.Query/PinnedCodes");
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
#[prost(message, repeated, tag = "2")]
pub codes: ::prost::alloc::vec::Vec<Code>,
#[prost(message, repeated, tag = "3")]
pub contracts: ::prost::alloc::vec::Vec<Contract>,
#[prost(message, repeated, tag = "4")]
pub sequences: ::prost::alloc::vec::Vec<Sequence>,
#[prost(message, repeated, tag = "5")]
pub gen_msgs: ::prost::alloc::vec::Vec<genesis_state::GenMsgs>,
}
pub mod genesis_state {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenMsgs {
#[prost(oneof = "gen_msgs::Sum", tags = "1, 2, 3")]
pub sum: ::core::option::Option<gen_msgs::Sum>,
}
pub mod gen_msgs {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Sum {
#[prost(message, tag = "1")]
StoreCode(super::super::MsgStoreCode),
#[prost(message, tag = "2")]
InstantiateContract(super::super::MsgInstantiateContract),
#[prost(message, tag = "3")]
ExecuteContract(super::super::MsgExecuteContract),
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Code {
#[prost(uint64, tag = "1")]
pub code_id: u64,
#[prost(message, optional, tag = "2")]
pub code_info: ::core::option::Option<CodeInfo>,
#[prost(bytes = "vec", tag = "3")]
pub code_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "4")]
pub pinned: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Contract {
#[prost(string, tag = "1")]
pub contract_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub contract_info: ::core::option::Option<ContractInfo>,
#[prost(message, repeated, tag = "3")]
pub contract_state: ::prost::alloc::vec::Vec<Model>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Sequence {
#[prost(bytes = "vec", tag = "1")]
pub id_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "2")]
pub value: u64,
}