Function _getDayEmission can be simplified (PublicSale.sol) #118
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
ye0lde
Vulnerability details
Impact
Code clarity
Proof of Concept
The function is here:
https://github.com/code-423n4/2021-11-bootfinance/blob/7c457b2b5ba6b2c887dafdf7428fd577e405d652/tge/contracts/PublicSale.sol#L291-L298
Tools Used
Visual Studio Code, Remix
Recommended Mitigation Steps
I suggest making the changes below to simplify:
function getDayEmission() public view returns (uint) { return (remainingSupply > emission ? emission : remainingSupply); }
The text was updated successfully, but these errors were encountered: