pub enum HandleMsg {
Show 21 variants TransferNft { recipient: HumanAddr, token_id: String, memo: Option<String>, padding: Option<String>, }, SendNft { contract: HumanAddr, token_id: String, msg: Option<Binary>, memo: Option<String>, padding: Option<String>, }, Approve { spender: HumanAddr, token_id: String, expires: Option<Expiration>, padding: Option<String>, }, Revoke { spender: HumanAddr, token_id: String, padding: Option<String>, }, ApproveAll { operator: HumanAddr, expires: Option<Expiration>, padding: Option<String>, }, RevokeAll { operator: HumanAddr, padding: Option<String>, }, SetWhitelistedApproval { address: HumanAddr, token_id: Option<String>, view_owner: Option<AccessLevel>, view_private_metadata: Option<AccessLevel>, transfer: Option<AccessLevel>, expires: Option<Expiration>, padding: Option<String>, }, RegisterReceiveNft { code_hash: String, also_implements_batch_receive_nft: Option<bool>, padding: Option<String>, }, SetViewingKey { key: String, padding: Option<String>, }, MintNft { token_id: Option<String>, owner: Option<HumanAddr>, public_metadata: Option<Metadata>, private_metadata: Option<Metadata>, memo: Option<String>, padding: Option<String>, }, AddMinters { minters: Vec<HumanAddr>, padding: Option<String>, }, RemoveMinters { minters: Vec<HumanAddr>, padding: Option<String>, }, SetMinters { minters: Vec<HumanAddr>, padding: Option<String>, }, SetMetadata { token_id: String, public_metadata: Option<Metadata>, private_metadata: Option<Metadata>, padding: Option<String>, }, BatchMintNft { mints: Vec<Mint>, padding: Option<String>, }, BatchTransferNft { transfers: Vec<Transfer>, padding: Option<String>, }, BatchSendNft { sends: Vec<Send>, padding: Option<String>, }, BurnNft { token_id: String, memo: Option<String>, padding: Option<String>, }, BatchBurnNft { burns: Vec<Burn>, padding: Option<String>, }, SetGlobalApproval { token_id: Option<String>, view_owner: Option<AccessLevel>, view_private_metadata: Option<AccessLevel>, expires: Option<Expiration>, padding: Option<String>, }, Reveal { token_id: String, padding: Option<String>, },
}
Expand description

SNIP-721 contract handle messages

Variants

TransferNft

Fields

recipient: HumanAddr

recipient of the transfer

token_id: String

id of the token to transfer

memo: Option<String>

optional memo for the tx

padding: Option<String>

optional message length padding

transfer a token

SendNft

Fields

contract: HumanAddr

address to send the token to

token_id: String

id of the token to send

msg: Option<Binary>

optional message to send with the (Batch)RecieveNft callback

memo: Option<String>

optional memo for the tx

padding: Option<String>

optional message length padding

send a token and call receiving contract’s (Batch)ReceiveNft

Approve

Fields

spender: HumanAddr

address being granted the permission

token_id: String

id of the token that the spender can transfer

expires: Option<Expiration>

optional expiration for this approval

padding: Option<String>

optional message length padding

gives the spender permission to transfer the specified token. If you are the owner of the token, you can use SetWhitelistedApproval to accomplish the same thing. If you are an operator, you can only use Approve

Revoke

Fields

spender: HumanAddr

address whose permission is revoked

token_id: String

id of the token that the spender can no longer transfer

padding: Option<String>

optional message length padding

revokes the spender’s permission to transfer the specified token. If you are the owner of the token, you can use SetWhitelistedApproval to accomplish the same thing. If you are an operator, you can only use Revoke, but you can not revoke the transfer approval of another operator

ApproveAll

Fields

operator: HumanAddr

address being granted permission to transfer

expires: Option<Expiration>

optional expiration for this approval

padding: Option<String>

optional message length padding

provided for cw721 compliance, but can be done with SetWhitelistedApproval… gives the operator permission to transfer all of the message sender’s tokens

RevokeAll

Fields

operator: HumanAddr

address whose permissions are revoked

padding: Option<String>

optional message length padding

provided for cw721 compliance, but can be done with SetWhitelistedApproval… revokes the operator’s permission to transfer any of the message sender’s tokens

SetWhitelistedApproval

Fields

address: HumanAddr

address being granted/revoked permission

token_id: Option<String>

optional token id to apply approval/revocation to

view_owner: Option<AccessLevel>

optional permission level for viewing the owner

view_private_metadata: Option<AccessLevel>

optional permission level for viewing private metadata

transfer: Option<AccessLevel>

optional permission level for transferring

expires: Option<Expiration>

optional expiration

padding: Option<String>

optional message length padding

add/remove approval(s) for a specific address on the token(s) you own. Any permissions that are omitted will keep the current permission setting for that whitelist address

RegisterReceiveNft

Fields

code_hash: String

receving contract’s code hash

also_implements_batch_receive_nft: Option<bool>

optionally true if the contract also implements BatchReceiveNft. Defaults to false if not specified

padding: Option<String>

optional message length padding

register that the message sending contract implements ReceiveNft and possibly BatchReceiveNft

SetViewingKey

Fields

key: String

desired viewing key

padding: Option<String>

optional message length padding

set viewing key

MintNft

Fields

token_id: Option<String>

optional token id. if omitted, uses current token index

owner: Option<HumanAddr>

optional owner address. if omitted, owned by the message sender

public_metadata: Option<Metadata>

optional public metadata that can be seen by everyone

private_metadata: Option<Metadata>

optional private metadata that can only be seen by the owner and whitelist

memo: Option<String>

optional memo for the tx

padding: Option<String>

optional message length padding

mint new token

AddMinters

Fields

minters: Vec<HumanAddr>

list of addresses that can now mint

padding: Option<String>

optional message length padding

add addresses with minting authority

RemoveMinters

Fields

minters: Vec<HumanAddr>

list of addresses no longer allowed to mint

padding: Option<String>

optional message length padding

revoke minting authority from addresses

SetMinters

Fields

minters: Vec<HumanAddr>

list of addresses with minting authority

padding: Option<String>

optional message length padding

define list of addresses with minting authority

SetMetadata

Fields

token_id: String

id of the token whose metadata should be updated

public_metadata: Option<Metadata>

the optional new public metadata

private_metadata: Option<Metadata>

the optional new private metadata

padding: Option<String>

optional message length padding

set the public and/or private metadata.

BatchMintNft

Fields

mints: Vec<Mint>

list of mint operations to perform

padding: Option<String>

optional message length padding

Mint multiple tokens

BatchTransferNft

Fields

transfers: Vec<Transfer>

list of transfers to perform

padding: Option<String>

optional message length padding

transfer many tokens

BatchSendNft

Fields

sends: Vec<Send>

list of sends to perform

padding: Option<String>

optional message length padding

send many tokens and call receiving contracts’ (Batch)ReceiveNft

BurnNft

Fields

token_id: String

token to burn

memo: Option<String>

optional memo for the tx

padding: Option<String>

optional message length padding

burn a token

BatchBurnNft

Fields

burns: Vec<Burn>

list of burns to perform

padding: Option<String>

optional message length padding

burn many tokens

SetGlobalApproval

Fields

token_id: Option<String>

optional token id to apply approval/revocation to

view_owner: Option<AccessLevel>

optional permission level for viewing the owner

view_private_metadata: Option<AccessLevel>

optional permission level for viewing private metadata

expires: Option<Expiration>

optional expiration

padding: Option<String>

optional message length padding

add/remove approval(s) that whitelist everyone (makes public)

Reveal

Fields

token_id: String

id of the token to unwrap

padding: Option<String>

optional message length padding

Reveal the private metadata of a sealed token and mark the token as having been unwrapped

Implementations

Returns a StdResult used to execute a SNIP721 contract function

Arguments
  • block_size - pad the message to blocks of this size
  • callback_code_hash - String holding the code hash of the contract being called
  • contract_addr - address of the contract being called
  • send_amount - Optional Uint128 amount of native coin to send with the callback message NOTE: No SNIP721 messages send native coin, but the parameter is included in case that ever changes

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.