I start study NFT based on IPFS project flow is 1- install IPFS 2- upload asset photo by IPFS and get hash 3- create metadata json file by this hash url
{
"name": "NFT",
"description": "This image shows the true nature of NFT.",
"image": "https://ipfs.io/ipfs/QmUnMkaEB5FBMDhjPsEtLyHr4ShSAoHUrwqVryCeuMosNr"
}
4- upload this json file to IPFS and get next hash url
https://ipfs.io/ipfs/QmNSKewexhgY4rYwPoxPgNFN7BSjeiLXJif9q5FjeCrsmg
5-Go to solidity and create minting function and deploy by MATIC Mumbai network
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "https://github.com/0xcert/ethereum-erc721/src/contracts/tokens/nf-token-metadata.sol";
import "https://github.com/0xcert/ethereum-erc721/src/contracts/ownership/ownable.sol";
contract newNFT is NFTokenMetadata, Ownable {
constructor() {
nftName = "Synth NFT";
nftSymbol = "SYN";
}
function mint(address _to, uint256 _tokenId, string calldata _uri) external onlyOwner {
super._mint(_to, _tokenId);
super._setTokenUri(_tokenId, _uri);
}
}
6-After deploy this contract and mint as follow
7- go to opensea testnet and collection , chose mumbai and insert address of NFT owner
8 - finally see NFT on testnet collection
But I want to make this programatically in javascript How can upload metadata json file to IPFS by javascript and is any template already .where is source And How can use this mint function from react.js frontend and web3.js is any template ?Where can I get it thanks you I am beginner to NFT
