We have developed a small program that uses the EOS blockchain and we are storing some of our data in an EOS smart contract. Together with a UUID we are storing the object status. Our goal is to have an immutable record of the UUID and the object status, so that a 3rd party can look up the UUID for verification.
Over the last months, we have created thousands of record entries and used up quite some RAM already. As of today around we used - 77.46 MB of RAM. With the growing adoption of our application, we will need to buy a lot more EOS and buy RAM in the future.
I have the following questions
- How can I optimize my smart contract to use less RAM? One status update at the moment cost us 479 Bytes. We have 3 per UUID. So in total 1437 Bytes for a full lifecycle.
- Can I "delete" old records that are not used, or false posted and free up the used RAM?
- If the application is no longer developed and the project closed, can I remove the smart contract and reduce the amount of RAM and get the EOS back?
Do you have any other suggestions on how to optimize our RAM use for our EOS smart contract? I was looking on Reddit and elsewhere for answers, but there is not much discussion about RAM out here.