Hey everyone! I’m working on a Solidity project and I’m a bit confused about NFTs. My contract has a struct for images with fields like image, title, description, and price. Users can input this data from the frontend.
I’m wondering if I let people buy and sell these image posts, would they count as NFTs? Or do I have to use the ERC721 standard and publish metadata somewhere else?
Right now, I’m just storing the data in a struct instead of using ERC721 with separate metadata. I’m not sure if this is the right way to go.
Has anyone dealt with something similar? What’s the best approach here? Any advice would be awesome! Thanks in advance!
yo pixstar54, interesting stuff! while ur image data is unique, it’s not really an NFT without ERC721. that standard gives u important features like ownership tracking n transferability.
why not use ERC721 and store image data off-chain (like IPFS)? it’d make ur contract lighter n more compatible with nft platforms. just my 2 cents! good luck with ur project!
hey pixstar54! that’s a super interesting question u got there
i’m no expert, but i’ve been tinkering with nfts too and from what i understand, technically your image data could be considered a type of token… but it’s not really an NFT in the traditional sense without ERC721.
the thing is, ERC721 gives you a bunch of built-in features that make life easier - like tracking ownership, transfers, and all that good stuff. plus it’s what most marketplaces and wallets expect when dealing with NFTs.
but i’m curious - why are you thinking of doing it this way? is there a specific reason you wanna avoid ERC721? maybe there’s a cool use case i’m not thinking of!
have you thought about using IPFS for storing the actual image data? that could be a neat way to keep your contract lighter while still having the benefits of ERC721.
anyway, just some thoughts! let me know what you end up doing - i’d love to hear how your project turns out!
While your approach of storing image data in a struct is interesting, it doesn’t strictly qualify as an NFT without implementing the ERC721 standard. ERC721 provides crucial functionality for NFTs, including unique identifiers, ownership tracking, and transfer mechanisms.
That said, your current setup could be considered a custom token system. However, it may lack interoperability with existing NFT marketplaces and wallets, which typically expect ERC721 compliance.
If you’re aiming for true NFT functionality, I’d recommend implementing ERC721 and storing the image data off-chain (e.g., IPFS) with metadata referencing it. This approach optimizes gas costs and aligns with common NFT practices.
Ultimately, the best path depends on your specific project goals and requirements. Consider the trade-offs between your custom approach and standard NFT implementation carefully.