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
Issue: Variables should not be initialized to their default values
Explanation: Initializing variables to their default values is unnecessary and costs gas
Issue: Variables should not be initialized to their default values
Explanation: Initializing variables to their default values is unnecessary and costs gas
https://github.com/code-423n4/2022-05-runes/blob/060b4f82b79c8308fe65674a39a07c44fa586cd3/contracts/ForgottenRunesWarriorsGuild.sol#L24
Change 'uint256 public numMinted;' to 'uint256 public numMinted;'
Issue:
Require
message too longExplanation: The
require
message below can be shortened to 32 characters or fewer (as shown) to save gashttps://github.com/code-423n4/2022-05-runes/blob/060b4f82b79c8308fe65674a39a07c44fa586cd3/contracts/ForgottenRunesWarriorsMinter.sol#L148
'Ether value sent is not sufficient'
Change message to
Ether value sent is insufficient
Multiple issues
There are three opportunities to save gas in each of the two identical code blocks below:
!= 0
instead of> 0
because> 0
costs more gas andnumWarriors
cannot be < zero (since it is aunit
)require
into two separaterequire
messages instead of using '&&'require
message to 32 characters or fewerhttps://github.com/code-423n4/2022-05-runes/blob/060b4f82b79c8308fe65674a39a07c44fa586cd3/contracts/ForgottenRunesWarriorsMinter.sol#L140-L143
https://github.com/code-423n4/2022-05-runes/blob/060b4f82b79c8308fe65674a39a07c44fa586cd3/contracts/ForgottenRunesWarriorsMinter.sol#L210-L213
Change to:
The text was updated successfully, but these errors were encountered: