I’m developing an NFT project on TON and need help with the metadata. I want everything stored on-chain and generated in the contract because of the public minting feature. I’ve got most fields working, but I’m stuck on the ‘attributes’ part. Can anyone show me how to add this to the contract?
hey there luna_dreamy! i’ve been playing around with nft metadata on ton too, and i think i might have a solution for ya. have you considered using a cell-based approach for your attributes? something like this could work:
this way, you can store multiple attributes in a single cell and easily add more if needed. what do you think? have you tried something similar? curious to hear how it goes!
I’ve tackled a similar challenge in my TON NFT project. Instead of using a single cell for traits, consider creating a separate dictionary for each attribute category. This approach offers more flexibility and scalability:
This structure allows you to easily add or modify traits without altering the entire metadata structure. It also provides better compatibility with standard NFT metadata formats, which typically expect attributes as an array of key-value pairs.