Egis-Security / CTF_Challenge

Repository containing CTF challenges from nmirchev8, deth and bOgO.
14 stars 8 forks source link

deth_ctf : The variable of `Vault:owner` should be declared as immutable #43

Open hrmneffdii opened 1 month ago

hrmneffdii commented 1 month ago

Severity : Informational

Description

State variables that is Vault:owner, it is not updated following functionality or after deployment. It should be declared as immutable variable to save more gas.

Recommendation

Add the immutable syntax to the variable Vault:owner

-      address public owner;
+     address public immutable i_owner;
       . . . 

      constructor(address _owner){
-     owner     = _owner;
+    i_owner  = _owner;
     }
0xdeth commented 3 weeks ago

Informational.