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:
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
"name":"My first NFT"
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 we have just minted our first NFT!