Demonstartes a minimalistic NFT marketplace that allows users to list NFTs for sale.
The nft-marketplace.clar contract includes the following functionality.
list-asset
lists an asset along with its contracttransfer-nft
transfers an NFT asset from a sender to a given recipienttransfer-ft
transfers fungible tokens from a sender to a given recipientget-listing
function retrieves a listing by its IDcancel-listing
cancels a listing using an asset contract
To add a new contract, use Clarinet.
- You can manually test your your contracts in the Clarinet console.
- You can programmatically test your contracts with unit tests.