SecretNET.NFT Namespace

Snip721Tx..::..SendNft Method

SendNft is used to transfer ownership of the token to the contract address, and then call the recipient's BatchReceiveNft (or ReceiveNft) if the recipient contract has registered its receiver interface with the NFT contract or if its ReceiverInfo is provided. If the recipient contract registered (or if the ReceiverInfo indicates) that it implements BatchReceiveNft, a BatchReceiveNft callback will be performed with only the single token ID in the token_ids array. While SendNft keeps the contract field name in order to maintain CW-721 compliance, Secret Network does not have the same limitations as Cosmos, and it is possible to use SendNft to transfer token ownership to a personal address(not a contract) or to a contract that does not implement any Receiver Interface. SendNft requires a valid token_id and the message sender must either be the owner or an address with valid transfer approval.If the recipient address is the same as the current owner, the contract will throw an error.If the token is transferred to a new owner, its single-token approvals will be cleared.If the BatchReceiveNft(or ReceiveNft) callback fails, the entire transaction will be reverted(even the transfer will not take place). This implementation will throw an error if trying to send a SNIP-722 non-transferable token.

Namespace:  SecretNET.NFT
Assembly:  SecretNET.NFT (in SecretNET.NFT.dll)

Syntax


public Task<SingleSecretTx<SendNftResponse>> SendNft(
	MsgSendNft msg,
	Nullable<TxOptions> txOptions
)
Public Function SendNft ( _
	msg As MsgSendNft, _
	txOptions As Nullable(Of TxOptions) _
) As Task(Of SingleSecretTx(Of SendNftResponse))
public:
Task<SingleSecretTx<SendNftResponse^>^>^ SendNft(
	MsgSendNft^ msg, 
	Nullable<TxOptions^> txOptions
)

Parameters

msg
Type: SecretNET.NFT..::..MsgSendNft
txOptions
Type: Nullable<(Of <(<'TxOptions>)>)>

Return Value