Platform: Code4rena
Start Date: 17/07/2023
Pot Size: $85,500 USDC
Total HM: 11
Participants: 26
Period: 14 days
Judge: Picodes
Total Solo HM: 1
Id: 263
League: ETH
Rank: 12/26
Findings: 1
Award: $31.38
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: MiloTruck
Also found by: 0xAnah, AlexCzm, Bughunter101, BugzyVonBuggernaut, DavidGiladi, Emmanuel, Iurii3, Kaysoft, MohammedRizwan, Prestige, Rolezn, Sathish9098, Stormreckson, adeolu, descharre, evmboi32, fatherOfBlocks, ginlee, ihtishamsudo, juancito, mrudenko, tnquanghuy0512
31.3772 USDC - $31.38
block.timestamp
in an event since it is part of a transactionThere is no need to emit block.timestamp
in an event since it is part of a transaction
File:
/// @inheritdoc ILensProfiles function DANGER__disableTokenGuardian() external onlyEOA { if (StorageLib.tokenGuardianDisablingTimestamp()[msg.sender] != 0) { revert Errors.DisablingAlreadyTriggered(); } StorageLib.tokenGuardianDisablingTimestamp()[msg.sender] = block.timestamp + TOKEN_GUARDIAN_COOLDOWN; emit Events.TokenGuardianStateChanged({ wallet: msg.sender, enabled: false, tokenGuardianDisablingTimestamp: block.timestamp + TOKEN_GUARDIAN_COOLDOWN, timestamp: block.timestamp//@audit no need to emit block.timestamp }); }
Consider removing block.timestamp from events because it is already in the transaction details.
Commented code sometimes is an indication of unfinished work. Consider removing it.
function executeLensV2Upgrade() external onlyOwner { // _preUpgradeChecks(); //@audit commmented code. _upgrade(); // _postUpgradeChecks(); //@audit commmented code. }
Consider removing all commented codes.
owner
parameter of ControlByContract.sol::contstructor
shadows Ownable.owner
The owner parameter of the constructor of ControlByContract.sol contract shadows the owner
state variable of the parent Ownable
contract.
constructor(address owner) Ownable() { _transferOwnership(owner); //@audit shadowing Ownable.owner }
Consider renaming the owner
parameter of the ControlByContract.sol to avoid variable shadowing.
#0 - c4-judge
2023-08-28T18:18:36Z
Picodes marked the issue as grade-b