Al-Qa-qa / dyad-private-audit

4 stars 1 forks source link

[I-01] mappings key/value support names, no need to comment them #8

Open Al-Qa-qa opened 5 months ago

Al-Qa-qa commented 5 months ago

There is an embedded comment in lastDeposit mappings that expresses the label for the mappings key and value. but solidity supports naming mapping itself without comments, so there is no need to comment them.

  mapping (uint/* id */ => uint/* block */)  public   lastDeposit;

Mitigation

remove comments.

- mapping (uint/* id */ => uint/* block */)  public   lastDeposit;
+   mapping (uint id => uint block) public lastDeposit;
shafu0x commented 4 months ago

will leave it as it is

Al-Qa-qa commented 4 months ago

Sponsor Acknowledge.