15,000 USDC
View results
Submission Details
Severity: low
Valid

Missing events after changing state variables

After the state variable s_DSCMinted is modified, no event is emitted. After every change of a state variable, an event should be emitted, as recommended in the Chainlink Styleguide.

Instances(2):

File: src/DSCEngine.sol
198: s_DSCMinted[msg.sender] += amountDscToMint;
273: s_DSCMinted[onBehalfOf] -= amountDscToBurn;

Recommendation

Create events like this and emit them after changing the state variable:

event DSCMinted(address indexed user, uint256 amount);
event DSCBurned(address indexed from, address indexed onBehalfOf, uint256 indexed amount);

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.