Challenge #4 – Gas Optimization & Storage Refunds
Difficulty: High
#Security#AccessControl
what do you think the gas costs will be?

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract GasTest {
uint256 public number;
function setNumber(uint256 _num) public {
number = _num;
}
💡 Hint: We all know storage writes cost gas, but did you know resetting a variable to zero can actually give a gas refund? Let's put that to the test.