NFT - Policy & SmartContracts

Hello everyone. I’m some days old in Cardano, just got interest about it since the new Mary Fork.

I want to learn how to mint tokens for an art project, setting up rules. I found a little reading (You want to create your own NFT? Here’s how you do it on the Cardano blockchain. | by Silas Stulz | Mar, 2021 | Medium) on how it is now possible to create NFTs on the blockchain, and how you can set up a variety of rules.

I also found on the docs (Minting policies and the multiasset ledger — Cardano Ledger 1.0.0 documentation) that there are multiple types of policies you can set, and this is what I’m trying to understand.

  • Single-issuer policy
  • Time-locked mint policy
  • One-time mint policy

Are there any tutorial/docs that show a variety of samples of policies/smartcontracts for different usecases?

The one on the Medium link I posted above, shows this policy:

{
  "keyHash": "5805823e303fb28231a736a3eb4420261bb42019dc3605dd83cccd04",
  "type": "sig"
}

Which of what I understood, tokens from this asset can only be minted by this key.

How could I:

  • Make a policy that protects the NFT from minted again. (So it only exists one of it)
  • Make a policy that protects the NFT from minted more than X times. (So it could only exist X copies of it)
  • Make a policy so whenever the NFT re-sells, X% amount of the sold price is rewarded to it’s creator

I’ve read there are smart-contracts as well, using the Plutus Platform, so what are the limits of just writing policies, rather than jumping straight to code a smart-contract.

Thank you in advance.

3 Likes

Firsst pls consider those who do not have medium.com account too. As I do not know what was written that medium post. Anyway.

Use RequireTimeBefore time locking features or wait till Plutus smart contract, see details below.

How you can mint more than one time? Also native tokens NFT usually mean value=1, so in native tokens NFT means (in general) one asset with value=1. E.g. you can mint NFTs similar to the following:

  1. minting <yourpolicy id>.yourveryrarenft1 1
  2. mintint <samepolicy id>.yourveryrarenft2 1

And you can make it as NFT if you use locking, meaning before 7am tomorrow morning, and when it’s time passes that time, nobody would mint an other (and also see that there was minted more than one befire). Otherwise it would not be real NFT as there would be possibility for the owner to mint one or more other asset. Example:

  • minting <samepolicy id>.yourveryrarenft2 1000, therefore it would not be uniq, as you would be able to send one token to 1000 ppl (but it can be interpreted as shared ownership).

As you can have an NFT asset that is shared between owners.
Like, similar as above but you can use 100, and you can think of it as 100% of the NFT.
Also, there are other possibilities, but in general an NFT is an . /w value=1.

Only in Plutus smart contract.

You can learn about native tokens and related things in the links below:

6 Likes

I understood what the original question was and why it was being asked; I want to do the same.

Unfortunately non of what I’ve read makes any sense to me being a plain old rock musician.

It would be great one day if there was a site that could help people like me to make NFTs and sell them etc.

2 Likes

Same here, being not too tech savvy. I try to make an NFT in which I can later down the road change the metadata. The idea is to send people a ´proof of donation´ NFT and later add information about the status of the donation into the NFT (picture of the people impacted from the donation, items bought, etc.). I know it can be done, but is there some guidance to this?