Hey there! I have a smart contract that accepts messages from users. I would like to keep a history of requests. Tell me, please, how can I save a list of pairs (address, text of the message)? Do I understand correctly that I cannot use tuple for such a case because it has a limit of 256 entries? Are there any best practices for storing such a dynamic list?
Aug 21, 2022, 11:28 AM
Interestingly that the fourh task in ton challenge event was about making linked list out of the tuple. You can find solutions for that. You can store in the map, but you have to realize that you are paying for just storing, so with a big number of messages the price would raise. So at least consider eviction of old messages or reading and storing locally with removing request, unless low number of the messages are expected.
Aug 21, 2022, 12:10 PM
Thank you for the detailed answer!
Aug 21, 2022, 12:33 PM