Enum token_bindings::TokenMsg
source · pub enum TokenMsg {
CreateDenom {
subdenom: String,
metadata: Option<Metadata>,
},
ChangeAdmin {
denom: String,
new_admin_address: String,
},
MintTokens {
denom: String,
amount: Uint128,
mint_to_address: String,
},
BurnTokens {
denom: String,
amount: Uint128,
burn_from_address: String,
},
ForceTransfer {
denom: String,
amount: Uint128,
from_address: String,
to_address: String,
},
SetMetadata {
denom: String,
metadata: Metadata,
},
}Expand description
Special messages to be supported by any chain that supports token_factory
Variants§
CreateDenom
CreateDenom creates a new factory denom, of denomination: factory/{creating contract bech32 address}/{Subdenom} Subdenom can be of length at most 44 characters, in [0-9a-zA-Z./] Empty subdenoms are valid. The (creating contract address, subdenom) pair must be unique. The created denom’s admin is the creating contract address, but this admin can be changed using the UpdateAdmin binding.
If you set an initial metadata here, this is equivalent to calling SetMetadata directly on the returned denom.
ChangeAdmin
ChangeAdmin changes the admin for a factory denom. Can only be called by the current contract admin. If the NewAdminAddress is empty, the denom will have no admin.
MintTokens
Contracts can mint native tokens for an existing factory denom that they are the admin of.
BurnTokens
Contracts can burn native tokens for an existing factory denom that they are the admin of.
ForceTransfer
Contracts can force transfer tokens for an existing factory denom that they are the admin of.
SetMetadata
Implementations§
source§impl TokenMsg
impl TokenMsg
pub fn mint_contract_tokens( denom: String, amount: Uint128, mint_to_address: String ) -> Self
pub fn burn_contract_tokens( denom: String, amount: Uint128, burn_from_address: String ) -> Self
pub fn force_transfer_tokens( denom: String, amount: Uint128, from_address: String, to_address: String ) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for TokenMsg
impl<'de> Deserialize<'de> for TokenMsg
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl JsonSchema for TokenMsg
impl JsonSchema for TokenMsg
source§fn schema_name() -> String
fn schema_name() -> String
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moresource§impl PartialEq<TokenMsg> for TokenMsg
impl PartialEq<TokenMsg> for TokenMsg
impl StructuralPartialEq for TokenMsg
Auto Trait Implementations§
impl RefUnwindSafe for TokenMsg
impl Send for TokenMsg
impl Sync for TokenMsg
impl Unpin for TokenMsg
impl UnwindSafe for TokenMsg
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more