Cyfrin / foundry-nft-cu

22 stars 25 forks source link

Question about former chainlink project. #11

Closed whatTHEh3ll closed 1 year ago

whatTHEh3ll commented 1 year ago

I've been messing around with the code from basic nft code. I changed the contract name and mint function. I tested it with 80% coverage and deployed it to testnet. I used the basicNft.sol and created my own custom deployment. I can view it on opensea testnet.

I was also wondering If I could do the same thing with the Moodnft? Instead of having flipmood svg just have a basicSvg contract complete with scripts and deployment in foundry forge? I tried tinkering with a new copy of the MoodNft contract and changed some of the code around to try and get just a simple basic svg image. However my testTokenURIDefaultIsCorrectlySet functions gives me errors. I'm referencing this contract https://github.com/PatrickAlphaC/all-on-chain-generated-nft/blob/main/contracts/SVGNFT.sol.

Would there be a way to tear apart the moodNft.sol in the foundry-nft-f23 so that it would just have one basic on chain svg? Maybe even modify the existing deployment scripts and test scripts? Just some ideas?

Basically I would just wondering if could get some pointers on how to tweak the current project to accommodate the https://github.com/PatrickAlphaC/all-on-chain-generated-nft/blob/main/contracts/SVGNFT.sol

Thanx

PatrickAlphaC commented 1 year ago

Hello! Thanks for making this issue.

In the future, can you:

  1. Make this a discusson on the full repo? https://github.com/Cyfrin/foundry-full-course-f23/discussions

But, to answer your question, you'd have to update that test to have the new default URI: https://github.com/Cyfrin/foundry-nft-f23/blob/757690de44347ebe0b27a2d8015d6de7cd27fda5/test/MoodNftTest.sol#L19

Or, you could just remove that test for now.