To follow the lecture you need a 100% sync node, follow the steps in lesson 3 that you find here
Send funds for minting
Inside our folder excerise01 we should send some funds to the wallet we built in the last lesson that you can find here.
The address can be shown with the command
Create the policy keys
To create the key to control the policyid we will use the command:
we need to get also the key hash and we get it with:
let’s take note of the output, we will use it in the minting script
Create the policy script
let’s open the editor and create the script:
and then:
"keyHash":
"HASHOFOURPOLICY",
"type":"sig"
}
Let’s save and close with “CTRL+S CTRL+X”
Get the policyID of the NFT
To get the policy instead it is enough to run the following command:
And the output is the policyid our nft will have
Create the metadata
and inside the editor
"721":
{
"POLICYID":
{
"assetname_you_wish":
{
"name":"My first NFT"
"image":"ipfs://QmVxruSdQHiiwRStw8WE52siqpvYYAuDFaSsaXqYRTmW88"
}
}
}
}
let’s save and close the editor with “CTRL+S CTRL+X”
how do you get the IPFS hash?
easy, upload your file to https://app.pinata.cloud/
Mint the NFT
Let’s get the funds transaction hash with
let’s build the transaction
+0+"1 policyidwegotbefore.assetname_you_wish" --mint="1 policyidwegotbefore.assetname_you_wish" --script-file policy.script
--json-metadata-no-schema --metadata-json-file metadata.json --out-file matx.raw
Now we can evaluate the fee as shown in lesson 3
and we get the fee to mint, as you see the minting fee is really low
let’s rewrite again the transaction with the actual fee:
Sign and mint the nft
Finally we can sign the transaction with
and
And we have just minted our first NFT!
Support the project
You can support our videos and development you can check one of our NFT project:
@jurassikchained 10k onchain dinos
@cardano_waifus 1/1 waifus that can change background
@fabul_art Interactive 3D art Fabergè eggs