Skip to content

fix: fix audit FIND-075#1231

Open
mamoralesiob wants to merge 1 commit into
developmentfrom
fix/find-075
Open

fix: fix audit FIND-075#1231
mamoralesiob wants to merge 1 commit into
developmentfrom
fix/find-075

Conversation

@mamoralesiob
Copy link
Copy Markdown
Contributor

Description

https://iobuilders.atlassian.net/browse/BBND-1792

Type of change

  • Bug fix 🐞
  • New feature ✨
  • Breaking change 💥
  • Documentation update 📖
  • Refactor 🔧

Testing

Node version:

  • 20
  • 22
  • 24

Checklist

  • Style Guidelines followed ✅
  • Documentation Updated 📚
  • Linters - No New Warnings ⚠️
  • Local Tests Pass ✅
  • Effective Tests Added ✔️
  • No reduction of Coverage

@mamoralesiob mamoralesiob self-assigned this Jun 1, 2026
@mamoralesiob mamoralesiob requested review from a team as code owners June 1, 2026 14:06
@mamoralesiob mamoralesiob requested a review from sergmetelin June 1, 2026 14:06
* @param exponent The value to validate before use as a power-of-ten exponent.
*/
function checkExponentOverflow(uint256 exponent) internal pure {
if (exponent >= MAX_DECIMALS) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mamoralesiob where is MAX_DECIMALS set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the same DecimalsLib.sol library the checkExponentOverflow function is defined in.

* @param exponent The value to validate before use as a power-of-ten exponent.
*/
function checkExponentOverflow(uint256 exponent) internal pure {
if (exponent >= MAX_DECIMALS) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is cheaper > than >=. Can we go by this way?

Signed-off-by: mamoralesiob <miguelangel@io.builders>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants