How would I go about burning an nft I just minted on the testnet?
check this old post to make an idea
Or read this guide
Thank you @Alexd1985, I saw the first post earlier on but didn’t understand how I could do it. It’s alright now though. I have another couple of questions, it’s about the policy script
- How is it possible to add royalties to your policy?
- How to allow to mint more than one NFT per transaction?
- What are the pros and cons to locking your script?
- What are the pros and cons of not locking your script?
- What limitations exist with a simple/native script? Like what can/can’t you do with a simple/native policy script that you can/can’t do with a smart contract?
@Alexd1985 Also, how do I allow users to mint more than one NFT per transaction?
you will need to customize the script (need conditions)…
like
if I received 5 ADA mint/send 1 nft
if I received 10 ADA mint/send 2 nfts…
etc…
Is that to be done in the policy script or in the minting script that I am using?
minting script… the script which listening/check for transactions and perform the mint
Ok and how would I go about sending 2 nfts if say 10 ada is sent? Do I just execute the same transaction twice or is there anything special I need to do in order to make this happen?
mint + 1 you will replace with mint +2 right?
Here is the transaction script that I am currently using
cmd.runSync([
`${CARDANO_CLI} transaction build`,
CARDANO_NETWORK_TYPE,
CARDANO_ERA,
`--tx-in ${utxo}#${txid}`,
`--tx-out ${sender_address}+${minimum_lovelace}+"1 ${policy_id}.${hashed_token_name}"`,
`--change-address ${SEND_CHANGE_TO_ADDRESS}`,
`--mint="1 ${policy_id}.${hashed_token_name}"`,
`--minting-script-file ${_account}/policy/policy.script`,
`--metadata-json-file ./_nft/metadata/${metadata_pathname}`,
`--invalid-hereafter ${slot_number}`,
`--witness-override 2`,
`--out-file ${_account}/tx/matx.raw`
].join(" "));
Where it says --mint="1 ${policy_id}.${hashed_token_name}"
is that where I change the 1 to a 2?
exactly … that number tell the script how many nfts should be minted … but be carefull to change the metadata… otherwise you will mint 2 nfts with same metadata (onfy for NFTs not for FTs).
and also this counter should be changed to 2 +"1 ${policy_id}.
beause you will want to send both nfts
Ok nd how would the metadata look would it be similar to the example shown here?
first, it will be unique NFTs or a token?
I prefer to make one metadata file for each nft
each metadata should be like this
mynft001.json
{
"721": {
"1573568cde0f3c340266e50f0d108795f5e4190de939081f15287a24": {
"mynft001": {
"name": "mynft# 001",
"image": "ipfs://QmfVzQceRW7Awo1t82CrzdLeoLddQqz4SB3kNC2wiWyGAs",
"mediaType": "image/gif",
"description": "My TEST NFT 001",
"propety1": "Serie 1",
"propety2": "Red"
}
}
}
}
mynft002.json
{
"721": {
"1573568cde0f3c340266e50f0d108795f5e4190de939081f15287a24": {
"mynft002": {
"name": "mynft# 002",
"image": "ipfs://QmfVzQceRW7Awo1t82CrzdLeoLddQqz4SB3kNC2wiWyGAs",
"mediaType": "image/gif",
"description": "My TEST NFT 002",
"propety1": "Serie 1",
"propety2": "Red"
}
}
}
}
Oh right ok, yeah it will be an nft so that makes sense I just need to change the script to accept more than just enough payment for one nft and not refund if it is over the amount needed.
yeah, you must think to all scenarios…
to move the metadata used in another location to prevent re-use it.
and for example if someone will send you ADA + asset … this should be sent back… of course you cand do it manually but…
Thank you so much for your help once again. I have another couple of questions, it’s about the policy script
- How is it possible to add royalties to your policy?
- What are the pros and cons to locking your script?
- What are the pros and cons of not locking your script?
- What limitations exist with a simple/native script? Like what can/can’t you do with a simple/native policy script that you can/can’t do with a smart contract?
- How is it possible to add royalties to your policy?
you will be set royalties when you’ll register the project on 2nd market
- What are the pros and cons to locking your script?
What are the pros and cons of not locking your script?
if the script/policy is locked you’ll can’t mint/burn nfts under the policy. TBH for NFTs projects the policy should be kept unlocked for 2-3 years… anyway this is up to project owner;
- What limitations exist with a simple/native script? Like what can/can’t you do with a simple/native policy script that you can/can’t do with a smart contract?
with a simple script few scenarios can happen and you will need to fix it manually. in the beginning the projects owners minted and sent the NFTS manually after they received the funds… but now the scripts evolved to do all automatically (because you need to sleep sometimes)… and smart contracts I believe make your life easier and it should be more trustable for holders.
So there is no downside to leaving your script unlocked? No security issues?
of course if someone will steal your files… he can mint/burn assets (causing damage to the project) as long the policy is opened… you must think in how much time you will mint all assets and if you want or not to modify them in the future…
Ok I see and when you say
Do you mean my payment skey and vkeys? Or what files are you referring to please.