Deploying a contract uses RAM. If I deploy a contract, am I going to get the RAM back? In not, is there any other way to get it back?


Just re-deploy another contract instead, that does not use as much RAM.

1 Answer 1


You answered your own question in a few minutes, but I'll post this anyway since I typed it out.

Let's say you deploy an eosio.token contract that allows users to create their own 0 balance to opt into an air drop. That's ~188kb for you and ~0.3kb per user to create their row. That user has committed RAM to have the ability to execute a transfer command in the future. If you set an empty contract (I believe this is the way of freeing up the RAM) then you should be able to get your RAM back; however, if your users do not have the ability to execute transfer commands or free their RAM if they've transferred all their tokens, then they will be unhappy and will ask you to remedy the situation somehow.

I'm not sure if pushing an empty contract with set contract is the way to go (being that is also wants an ABI) or if setting the code with an empty WASM would be better and maybe the ABI is just a sunk cost.

  • I've done the Hello contract, it is almost empty, and it worked. Accepted your answer, thank you for typing ! Commented Jul 15, 2018 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.