NFT sales history

Hello !

I was wondering if there was a solution to store the transaction history of an NFT on the blockchain (with owner and price) ? Or if it was a bad idea and simply store it in a DB was a better solution. Thanks for your time and your help,

Have a nice day,


You could have something in each nft that tracks each account it has been in, like an array of addresses:
[Address]. And every time it gets deposited into a collection in an account, you’d update that array to show its history.

I would say that you should only do this if you need to have that information on chain. Does that information need to be accessed by other smart contracts or it is vitally important that it is immutable? If the answer is no to both of those, then it might not make sense to put it on chain.

Does that make sense?

It does, thanks.