/Dynamic-SVG-NFT

It is a Dynamic SVG Mood NFT built on Ethereum Blockchain. It creates a mood nft(happy or sad). This is built in solidity language and foundry framework. It is tested also. We can see the NFTs on Metamask minted by 0x5D74A1e8F2154ab57a31C1449Dbd4BCf2a6dA693 In this Nft, we can flip the mood accordingly.

Primary LanguageSolidity

It is a well-written and tested NFT contract in solidity. @Author Parth Sharma @notice You can see these NFTs on this 0x5D74A1e8F2154ab57a31C1449Dbd4BCf2a6dA693 address on Metamask.

Contract named: BasicNft is a Dog NFT in which a user can mint an NFT that has an adorable pug. Contract named: MoodNft is an NFT that can flip mood by the user and minted also. It has two moods happy or sad.

Following are the Details of the contracts these details are internal.

happyMoodSVG:

data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAwIDIwMCIgd2lkdGg9IjQwMCIgIGhlaWdodD0iNDAwIiB4bWxu cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjEwMCIgY3k9IjEwMCIg ZmlsbD0ieWVsbG93IiByPSI3OCIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIzIi8+PGcg Y2xhc3M9ImV5ZXMiPjxjaXJjbGUgY3g9IjYxIiBjeT0iODIiIHI9IjEyIi8+PGNpcmNsZSBjeD0i MTI3IiBjeT0iODIiIHI9IjEyIi8+PC9nPjxwYXRoIGQ9Im0xMzYuODEgMTE2LjUzYy42OSAyNi4x Ny02NC4xMSA0Mi04MS41Mi0uNzMiIHN0eWxlPSJmaWxsOm5vbmU7IHN0cm9rZTogYmxhY2s7IHN0 cm9rZS13aWR0aDogMzsiLz48L3N2Zz4=

sadMoodSVG:

data:image/svg+xml;base64, PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pjxzdmcgd2lkdGg9IjEwMjRweCIg aGVpZ2h0PSIxMDI0cHgiIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHhtbG5zPSJodHRwOi8vd3d3 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EtNy40IDMuNy00OS41IDQ1LjMt ODguNiA5NS44LTg4LjZzOTIgMzkuMSA5NS44IDg4LjZjLjMgNC4yIDMuOSA3LjQgOC4xIDcuNEg2 NjRhOCA4IDAgMCAwIDgtOC40QzY2Ny42IDYwMC4zIDU5Ny41IDUzMyA1MTIgNTMzem0xMjgtMTEy YTQ4IDQ4IDAgMSAwIDk2IDAgNDggNDggMCAxIDAtOTYgMHoiLz48L3N2Zz4=

Whenever we have to assure that we do the right call.

  1. check the address (read the function).
  2. check the function selector.
  3. decode the calldata (check the parameters).