Snip721Tx..::..RegisterReceiveNft Method
A contract will use RegisterReceiveNft to notify the NFT contract that it implements ReceiveNft and possibly also BatchReceiveNft (see below).
This enables the NFT contract to call the registered contract whenever it is Sent a token (or tokens).
In order to comply with CW-721, ReceiveNft only informs the recipient contract that it has been sent a single token, and it only informs the recipient contract
who the token's previous owner was, not who sent the token (which may be different addresses) despite calling the previous owner sender (see below).
BatchReceiveNft, on the other hand, can be used to inform a contract that it was sent multiple tokens, and notifies the recipient of both, the token's previous owner and the sender.
If a contract implements BatchReceiveNft, the NFT contract will always call BatchReceiveNft even if there is only one token being sent,
in which case the token_ids array will only have one element.
Namespace:
SecretNET.NFTAssembly: SecretNET.NFT (in SecretNET.NFT.dll)
Syntax
public Task<SingleSecretTx<RegisterReceiveNftResponse>> RegisterReceiveNft( MsgRegisterReceiveNft msg, Nullable<TxOptions> txOptions )
Public Function RegisterReceiveNft ( _ msg As MsgRegisterReceiveNft, _ txOptions As Nullable(Of TxOptions) _ ) As Task(Of SingleSecretTx(Of RegisterReceiveNftResponse))
public: Task<SingleSecretTx<RegisterReceiveNftResponse^>^>^ RegisterReceiveNft( MsgRegisterReceiveNft^ msg, Nullable<TxOptions^> txOptions )
Parameters
- msg
- Type: SecretNET.NFT..::..MsgRegisterReceiveNft
The MSG.
- txOptions
- Type: Nullable<(Of <(<'TxOptions>)>)>
The tx options.