Build an nft pc
Description
Create post-conditions for NFT transfers to ensure specific tokens are or aren't transferred
Use Cases
Protecting valuable NFTs from accidental transfers
Ensuring specific NFTs are transferred in marketplace transactions
Safeguarding NFT collections during contract interactions
Key Concepts
Asset identifier - Contract address + asset name with
::separatorToken ID - The specific NFT ID as a Clarity value (using
Cl.uint())NFT post-conditions use the
.nft()method.willMaybeSendAsset()- The NFT may or may not be sent, and the condition always passes. It still counts as covering that NFT instance underDenyorOriginatormode, so an optional transfer can be authorised without falling back toAllow. Added by SIP-040, available in@stacks/transactions7.4.0 and later.
Last updated
Was this helpful?