Skip to content
Request an audit

‹ All findings

No need to set isActive to false if that mapping entry was deleted

Low/InfoM^0 Minter Gateway·Three Sigma · Stablecoin framework · 8th January, 2024Codebase3S-M^0-N03

Description

In MinterGateway.deactivateMinter the minter's entry in _minterStates is deleted using the

solidity
delete keyword: function deactivateMinter(address minter_) external
onlyActiveMinter(minter_) returns (uint240 inactiveOwedM_) {
    // ... delete _minterStates[minter_];
    delete _mintProposals[minter_];
    _minterStates[minter_].isDeactivated = true;
    _minterStates[minter_].isActive = false;
    // ... }

This action sets all types of that specific entry to its default value, and so, there is no need to set isActive to false as this is the default value set by the delete keyword.

Recommendation

Remove the following line from deactivateMinter function: _minterStates[minter_].isActive = false;

Status

Addressed in #8024584.