pub enum ExecuteMsg {
Show 20 variants CurateTokenIds { initial_tokens: Vec<CurateTokenId>, memo: Option<String>, padding: Option<String>, }, MintTokens { mint_tokens: Vec<TokenAmount>, memo: Option<String>, padding: Option<String>, }, BurnTokens { burn_tokens: Vec<TokenAmount>, memo: Option<String>, padding: Option<String>, }, ChangeMetadata { token_id: String, public_metadata: Box<Option<Metadata>>, private_metadata: Box<Option<Metadata>>, }, Transfer { token_id: String, from: Addr, recipient: Addr, amount: Uint128, memo: Option<String>, padding: Option<String>, }, BatchTransfer { actions: Vec<TransferAction>, padding: Option<String>, }, Send { token_id: String, from: Addr, recipient: Addr, recipient_code_hash: Option<String>, amount: Uint128, msg: Option<Binary>, memo: Option<String>, padding: Option<String>, }, BatchSend { actions: Vec<SendAction>, padding: Option<String>, }, GivePermission { allowed_address: Addr, token_id: String, view_balance: Option<bool>, view_balance_expiry: Option<Expiration>, view_private_metadata: Option<bool>, view_private_metadata_expiry: Option<Expiration>, transfer: Option<Uint128>, transfer_expiry: Option<Expiration>, padding: Option<String>, }, RevokePermission { token_id: String, owner: Addr, allowed_address: Addr, padding: Option<String>, }, CreateViewingKey { entropy: String, padding: Option<String>, }, SetViewingKey { key: String, padding: Option<String>, }, RevokePermit { permit_name: String, padding: Option<String>, }, AddCurators { add_curators: Vec<Addr>, padding: Option<String>, }, RemoveCurators { remove_curators: Vec<Addr>, padding: Option<String>, }, AddMinters { token_id: String, add_minters: Vec<Addr>, padding: Option<String>, }, RemoveMinters { token_id: String, remove_minters: Vec<Addr>, padding: Option<String>, }, ChangeAdmin { new_admin: Addr, padding: Option<String>, }, RemoveAdmin { current_admin: Addr, contract_address: Addr, padding: Option<String>, }, RegisterReceive { code_hash: String, padding: Option<String>, },
}
Expand description

Handle messages to SNIP1155 contract.

Mostly responds with HandleAnswer { <variant_name>: { status: success }} if successful. See HandleAnswer for the response messages for each variant.

Variants§

§

CurateTokenIds

Fields

§initial_tokens: Vec<CurateTokenId>
§padding: Option<String>

curates new token_ids. Only curators can access this function.

§

MintTokens

Fields

§mint_tokens: Vec<TokenAmount>
§padding: Option<String>

mints additional tokens of existing fungible token_ids, if configuration allows this, ie enable_mint == true. Only minters can access this function

§

BurnTokens

Fields

§burn_tokens: Vec<TokenAmount>
§padding: Option<String>

burns existing tokens, if configuration allows this, ie enable_burn == true. Only owners can burn their own tokens in the base specifications. Flexibility is built into the contract functions to allow other addresses to burn tokens, allowed in additional specifications.

§

ChangeMetadata

Fields

§token_id: String
§public_metadata: Box<Option<Metadata>>

does not attempt to change if left blank. Can effectively remove metadata by setting metadata to Some(Metadata {token_uri: None, extension: None}) used Box to reduce the total size of the enum variant, to decrease size difference between variants. Not strictly necessary.

§private_metadata: Box<Option<Metadata>>

does not attempt to change if left blank. Can effectively remove metadata by setting metadata to Some(Metadata {token_uri: None, extension: None}) used Box to reduce the total size of the enum variant, to decrease size difference between variants. Not strictly necessary.

allows owner or minter to change metadata if allowed by token_id configuration.

§

Transfer

Fields

§token_id: String
§from: Addr
§recipient: Addr
§amount: Uint128
§padding: Option<String>

transfers one or more tokens of a single token_id. Other third address can perform this function if it has permission to transfer. ie: if addr3 can call this function to transfer tokens from addr0 to addr2, if addr0 gives addr3 enough transfer allowance.

§

BatchTransfer

Fields

§padding: Option<String>

performs transfers of multiple token_ids in a single transaction

§

Send

Fields

§token_id: String
§from: Addr
§recipient: Addr
§recipient_code_hash: Option<String>
§amount: Uint128
§msg: Option<Binary>
§padding: Option<String>

similar to transfer, but also sends a cosmos message. The recipient needs to be a contract that has a SNIP1155Receive handle function. See receiver for more information.

§

BatchSend

Fields

§actions: Vec<SendAction>
§padding: Option<String>

performs send of multiple token_ids in a single transaction

§

GivePermission

Fields

§allowed_address: Addr

address being granted/revoked permission

§token_id: String

token id to apply approval/revocation to. Additional Spec feature: if == None, perform action for all owner’s token_ids

§view_balance: Option<bool>

optional permission level for viewing balance. If ignored, leaves current permission settings

§view_balance_expiry: Option<Expiration>
§view_private_metadata: Option<bool>

optional permission level for viewing private metadata. If ignored, leaves current permission settings

§view_private_metadata_expiry: Option<Expiration>
§transfer: Option<Uint128>

set allowance by for transfer approvals. If ignored, leaves current permission settings

§transfer_expiry: Option<Expiration>
§padding: Option<String>

optional message length padding

allows an owner of token_ids to change transfer or viewership permissions to other addresses.

The base specification has three types of permissions:

  • view balance permission: owner can allow another address to view owner’s balance of specific token_ids
  • view private metadata: owner can allow another address to view private metadata of specific token_ids
  • transfer allowance: owner can give permission to another address to transfer tokens up to a certain limit (cumulatively) Owners can set an expiry for each of these permissions.

SNIP1155 gives flexibility for permissions to have any combination of

  • type of permission granted
  • on which token_ids
§

RevokePermission

Fields

§token_id: String
§owner: Addr

token owner

§allowed_address: Addr

address which has permission

§padding: Option<String>

Removes all permissions that a specific owner has granted to a specific address, for a specific token_id. A permission grantee can use this function to renounce a permission it has been given. For owners, the GivePermission message can be used instead to have the same effect as RevokePermission.

§

CreateViewingKey

Fields

§entropy: String
§padding: Option<String>
§

SetViewingKey

Fields

§padding: Option<String>
§

RevokePermit

Fields

§permit_name: String
§padding: Option<String>

disallow the use of a query permit

§

AddCurators

Fields

§add_curators: Vec<Addr>
§padding: Option<String>
§

RemoveCurators

Fields

§remove_curators: Vec<Addr>
§padding: Option<String>
§

AddMinters

Fields

§token_id: String
§add_minters: Vec<Addr>
§padding: Option<String>
§

RemoveMinters

Fields

§token_id: String
§remove_minters: Vec<Addr>
§padding: Option<String>
§

ChangeAdmin

Fields

§new_admin: Addr
§padding: Option<String>
§

RemoveAdmin

Fields

§current_admin: Addr
§contract_address: Addr
§padding: Option<String>

Permanently breaks admin keys for this contract. No admin function can be called after this action. Any existing curators or minters will remain as curators or minters; no new curators can be added and no current curator can be removed.

Requires caller to input current admin address and contract address. These inputs are not strictly necessary, but as a safety precaution to reduce the chances of accidentally calling this function.

§

RegisterReceive

Fields

§code_hash: String
§padding: Option<String>

Trait Implementations§

source§

impl Clone for ExecuteMsg

source§

fn clone(&self) -> ExecuteMsg

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExecuteMsg

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ExecuteMsg

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl JsonSchema for ExecuteMsg

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl Serialize for ExecuteMsg

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,