Open novusnota opened 1 month ago
Actually, refunding on deployment should not be done, this is a bug and should be fixed. The contract should manage its gas so that it has enough funds to pay for storage at all times. And a good practice is to introduce a "topup" receiver that can be used to top up the contract's balance in case there is still not enough gas to pay for storage.
And that it's done automatically.
Also, mention that receivers don't do that by default — in order to do refunds in receivers one has to use, say,
self.notify("Cashback".asComment());
or alike by the end of their body.