Smart Contract NFTs
Last updated
Last updated
In order to integrate NFTs into a game, we need a smart contract for the NFTs. We'll create an NFT project locally, edit the NFT smart contract, fund the testnet account with STX and upload it there. The clarinet project should be created in the root folder of the cloned repository.
Follow Hiro NFT example
from https://token.stacks.co/{id}.json
to ipfs://QmNLo4oeN741Ai5PEafBnDtpXh2XMea8wBUGicTeErCtEB/{id}.json
Connect wallet
Select last option from the right list and press Request STX
.nft-trait
and .my-nft
smart contracts on testnetSelect first option from the right list, paste the nft-trait contract from the local project, rename contract name to nft-trait
, press Deploy
and confirm the transaction
Paste the my-nft contract from the local project, rename contract name to my-nft
press Deploy
and confirm the transaction
Copy my-nft
contract address
Go back to sandbox, pick the second option from the right list and paste the contract name there
Select claim
and call the function