From 7f31a2c0353d31f05e7a9f00421a35141e127f5b Mon Sep 17 00:00:00 2001 From: bt3gl <1130416+bt3gl@users.noreply.github.com> Date: Thu, 29 Sep 2022 04:40:22 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solidity/saving_gas.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/solidity/saving_gas.md b/solidity/saving_gas.md index 8c682d9..12db511 100644 --- a/solidity/saving_gas.md +++ b/solidity/saving_gas.md @@ -115,6 +115,18 @@ uint256 world; //good, cheap
+--- + +
+ +## negative gas costs + +- Deleting a contract (SELFDESTRUCT) is worth a refund of 24,000 gas. +- Changing a storage address from a nonzero value to zero (SSTORE[x] = 0) is worth a refund of 15,000 gas. + +
+ + --- ## resources and tools