Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.59 KB

MoodNftDetails.md

File metadata and controls

23 lines (17 loc) · 1.59 KB

MoodNft

  • To mint an NFT we need a token URI
  • We have convert svg into token URI
  • To convert svg into token URI we have encode the svg into base64 encoded
  • base64 -i
  • To tell the browser it is a svg we have to few things before the base64 encoded data
  • data:image/svg+xml;base64,
base64 -i images/happy.svg
base64 -i images/sad.svg
  • Since we got a tokenUri instead of using IPFS hash we can actually use 100% on chain using this svg
  • Since svg is basically code, onchain we can update and interact with it