Create NFT (contract)
Last updated
Last updated
To start we will access the SimpleAssets (Jungle4)
Below we will see all the actions allowed by the contract.
To create the NFT we will use the "Create" action which will display the following form at the bottom of the page.
These fields are in charge of filling in the information needed to compose the NFT and display it properly in its sections as shown in the example of the finished NFT.
-Author Field: Here we will put the name of the creator's account, we will use the same one from which we coined the NFT, in this case "niceonedemos". (This will apply the Author information from section 2).
-Category: We must assign a category in which our NFT will be classified together with others that we create in the future and we want them to be under a specific category. In this case we have used "niconetest" because we want that all the NFT of test, are grouped in the same category. (This hata that in the section 2 the field "Category" is assigned and it is possible to access to all the NFT that contains this category). -Owner: Here we will put the account name that must be the actual owner of the NFT, not to be confused with the creator. In this case we have put our own account "niceonedemos" because we want to receive the NFT once it is minted. (This field will define in section 2 the NFT owner). -iData: Here we can add as much immutable information as we wish. This means that once the NFT is created this information cannot be modified again, not even by the creator of the NFT itself. (We will use this field to assign the name of the NFT in section 3, which will serve to assign a name to the NFT itself).
-mData: Here we will have fields and values that can be modified and updated by the NFT creator at any time. (This will specify the fields and values of the section 4, )
Field "img" we can assign an image from IPFS which will be the one shown in section 1, as the representative image of the NFT. (In this case we add the "img" as mdata, in case it is necessary to update it in the future).
In both the iData and mData sections you can add as many fields and values as necessary following the structure shown, fields such as "name" and "img" are required for the NFT to have all the necessary information.
The value of section 2 "Product ID" is generated automatically and is a unique identifier of the NFT in question. (There are no 2 NFTs with the same "Product ID" even if they have the same fields and values.
-Requireclaim: If this option is checked, the specified owner must claim the NFT to have it in his account, otherwise he will receive the NFT in his account once it is minted.
In this way we will have generated an NFT with all the basic information and belonging to a collection of 1/1 , since only 1 NFT has been created as this one.