You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here, in withdraw, the nonReentrant keyword is useless as the vault is burn line 335 before any external call, any reentrant call would fail because of the require line 323 as the owner would be the 0 address. Overall, ReentrancyGuard inheritance can be removed.
[G - 02] In CallyNFT, override transferFrom
Although the transfer functions of CallyNFT won’t revert because arithmetics are unchecked (see code), the contracts should still override transferFrom to remove the modifications of _balanceOf . First out of coherence and then for gas savings. You could also remove the _balanceOf mapping as it becomes useless. Note that this does not concern the Cally contract which does override transferFrom but only for other contracts that may use CallyNFT.
The text was updated successfully, but these errors were encountered:
[G - 01] Useless
nonReentrant
keywordHere, in
withdraw
, thenonReentrant
keyword is useless as thevault
is burn line 335 before any external call, any reentrant call would fail because of the require line 323 as the owner would be the 0 address. Overall,ReentrancyGuard
inheritance can be removed.[G - 02] In CallyNFT, override
transferFrom
Although the transfer functions of CallyNFT won’t revert because arithmetics are unchecked (see code), the contracts should still override
transferFrom
to remove the modifications of_balanceOf
. First out of coherence and then for gas savings. You could also remove the_balanceOf
mapping as it becomes useless. Note that this does not concern the Cally contract which does overridetransferFrom
but only for other contracts that may use CallyNFT.The text was updated successfully, but these errors were encountered: