Hey everyone, I’m working on a Solidity project and I’m a bit confused. I’ve got this struct that holds image data like the actual image, a title, description, and price. Users can input this stuff from the frontend. Now I’m wondering if I let people buy and sell these image posts, would they count as NFTs? Or do I need to use ERC721 and put the metadata somewhere else to make them proper NFTs?
I tried just storing everything in a data structure instead of using ERC721 with separate metadata. But now I’m not sure if that’s enough to call them NFTs.
Has anyone dealt with something like this before? What’s the right way to handle it? Thanks for any help you can give!
Storing image info in a struct alone doesn’t create an NFT. NFTs require the ERC721 standard to establish uniqueness and ownership on the blockchain. Your current approach essentially creates a centralized database of images within the contract.
To make these true NFTs, you’d need to implement ERC721 and likely store the image data off-chain (e.g., IPFS) for cost efficiency. The ERC721 token would then reference this off-chain data.
If you’re aiming for a simpler system without full NFT functionality, your current approach could work for basic buying and selling. However, it would lack the interoperability and established standards that come with ERC721 tokens.
hey elias87, that’s an interesting question! i’ve been playing around with nfts myself and it can definitely get confusing.
from what i understand, just storing image data in a struct doesn’t automatically make it an nft. the key thing about nfts is that they’re unique tokens on the blockchain that can prove ownership. the erc721 standard is what gives them that special nft status and functionality.
have you thought about using ipfs to store the actual image data off-chain? that’s pretty common for nfts. then you could use erc721 tokens to represent ownership of those images.
but i’m curious - what made you want to avoid using erc721? are there specific features you’re trying to achieve with your custom setup? maybe there’s a creative solution we could brainstorm!