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 new contracts, follow detailed instructions at Add new Contract.
NOTE: To use this example with Clarinet inside Hiro Platform, you can open the terminal session inside VS code by navigating to File -> View -> Terminal.
- You can manually test your your contracts in the Clarinet console.
- You can programmatically test your contracts with unit tests.