SecretNET.NFT Namespace

Snip721Tx..::..BatchSendNft Method

BatchSendNft is used to perform multiple token transfers, and then call the recipient contracts' BatchReceiveNft (or ReceiveNft) if they have registered their receiver interface with the NFT contract or if their ReceiverInfo is provided. The message sender may specify a list of tokens to send to one recipient address in each Send object, and any memo or msg provided will be applied to every token transferred in that one Send object. If the list of transferred tokens belonged to multiple previous owners, a separate BatchReceiveNft callback will be performed for each of the previous owners. If the contract only implements ReceiveNft, one ReceiveNft will be performed for every sent token. Therefore it is highly recommended to implement BatchReceiveNft if there is the possibility of being sent multiple tokens at one time. This will significantly reduce gas costs. The message sender may provide multiple Send objects to perform sends to multiple addresses, providing a different memo and msg for each address if desired. Each individual transfer of a token will show separately in transaction histories. The message sender must have permission to transfer all the tokens listed (either by being the owner or being granted transfer approval) and every token ID must be valid. A contract may use the VerifyTransferApproval query to verify that it has permission to transfer all the tokens. If the message sender does not have permission to transfer any one of the listed tokens, the entire message will fail (no tokens will be transferred) and the error will provide the ID of the first token encountered in which the sender does not have the required permission. If any token transfer involves a recipient address that is the same as its current owner, the contract will throw an error. Any token that is transferred to a new owner will have its single-token approvals cleared.If any BatchReceiveNft(or ReceiveNft) callback fails, the entire transaction will be reverted (even the transfers 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<BatchSendNftResponse>> BatchSendNft(
	MsgBatchSendNft msg,
	Nullable<TxOptions> txOptions
)
Public Function BatchSendNft ( _
	msg As MsgBatchSendNft, _
	txOptions As Nullable(Of TxOptions) _
) As Task(Of SingleSecretTx(Of BatchSendNftResponse))
public:
Task<SingleSecretTx<BatchSendNftResponse^>^>^ BatchSendNft(
	MsgBatchSendNft^ msg, 
	Nullable<TxOptions^> txOptions
)

Parameters

msg
Type: SecretNET.NFT..::..MsgBatchSendNft
The MSG.
txOptions
Type: Nullable<(Of <(<'TxOptions>)>)>
The tx options.

Return Value

SingleSecretTx<BatchSendNftResponse>.