ve3-shared 0.9.1

ve(3,3) msgs in cosmwasm
Documentation
use osmosis_std_derive::CosmwasmExt;
use std::convert::{TryFrom, TryInto};

// see https://github.com/notional-labs/wasmd/blob/v0.30.0-sdk469.4/proto/cosmwasm/tokenfactory/v1beta1/tx.proto

/// Coin defines a token with a denomination and an amount.
///
/// NOTE: The amount field is an Int which implements the custom method
/// signatures required by gogoproto.
#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/cosmos.base.v1beta1.Coin")]
pub struct Coin {
  #[prost(string, tag = "1")]
  pub denom: ::prost::alloc::string::String,
  #[prost(string, tag = "2")]
  pub amount: ::prost::alloc::string::String,
}

/// MsgCreateDenom defines the message structure for the CreateDenom gRPC service
/// method. It allows an account to create a new denom. It requires a sender
/// address and a sub denomination. The (sender_address, sub_denomination) tuple
/// must be unique and cannot be re-used.
///
/// The resulting denom created is defined as
/// <factory/{creatorAddress}/{subdenom}>. The resulting denom's admin is
/// originally set to be the creator, but this can be changed later. The token
/// denom does not indicate the current admin.
#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgCreateDenom")]
pub struct MsgCreateDenom {
  #[prost(string, tag = "1")]
  pub sender: ::prost::alloc::string::String,
  /// subdenom can be up to 44 "alphanumeric" characters long.
  #[prost(string, tag = "2")]
  pub subdenom: ::prost::alloc::string::String,
}

/// MsgCreateDenomResponse is the return value of MsgCreateDenom
/// It returns the full string of the newly created denom
#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse")]
pub struct MsgCreateDenomResponse {
  #[prost(string, tag = "1")]
  pub new_token_denom: ::prost::alloc::string::String,
}

/// MsgMint is the sdk.Msg type for allowing an admin account to mint
/// more of a token.  For now, we only support minting to the sender account
#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgMint")]
pub struct MsgMint {
  #[prost(string, tag = "1")]
  pub sender: ::prost::alloc::string::String,
  #[prost(message, optional, tag = "2")]
  pub amount: ::core::option::Option<Coin>,
  #[prost(string, tag = "3")]
  pub mint_to_address: ::prost::alloc::string::String,
}

#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgMintResponse")]
pub struct MsgMintResponse {}

/// MsgBurn is the sdk.Msg type for allowing an admin account to burn
/// a token.  For now, we only support burning from the sender account.
#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgBurn")]
pub struct MsgBurn {
  #[prost(string, tag = "1")]
  pub sender: ::prost::alloc::string::String,
  #[prost(message, optional, tag = "2")]
  pub amount: ::core::option::Option<Coin>,
  #[prost(string, tag = "3")]
  pub burn_from_address: ::prost::alloc::string::String,
}

#[derive(
  Clone,
  PartialEq,
  Eq,
  ::prost::Message,
  serde::Serialize,
  serde::Deserialize,
  schemars::JsonSchema,
  CosmwasmExt,
)]
#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgBurnResponse")]
pub struct MsgBurnResponse {}