You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Statement.validate_token(&env, &token) calls the token's decimals() and
accepts 0..=38 as valid. The boundary cases (0, 38, 39, div by 0 due to decimals=0
division) are not exercised.
Why it matters. Precision loans on tokens with 0 decimals would silently succeed
even if the integration team's policy requires minimum 6 or 7.
Technical Context.lib.rs::validate_token.
Expected Outcome. Tests for decimals = 0, 7, 38, 39. New policy field min_decimals
(default 0) configurable via admin.
Acceptance Criteria.
fund with decimals=39 returns new Error::InvalidTokenDecimals.
fund with decimals=0 still works unless policy is configured otherwise.
Files or modules likely to be affected.src/lib.rs, tests/aid_escrow_tests.rs.
Hey! validate_token in lib.rs accepts 0..=38 decimals but the boundary cases aren't tested. I'll add cases for decimals 0, 7, 38, and 39 in tests/aid_escrow_tests.rs, plus a min_decimals policy field (default 0) so fund with 39 returns Error::InvalidTokenDecimals. I can have this in a couple hours. Mind if I take this on?
Hi, I am a fullStack developer with years of experience, I have worked on so many project and I can submit a PR in less than 24hrs. Can I work on this please
Activity
GBOYEE commentedon Jul 15, 2026
Hey!
validate_tokeninlib.rsaccepts 0..=38 decimals but the boundary cases aren't tested. I'll add cases for decimals 0, 7, 38, and 39 intests/aid_escrow_tests.rs, plus amin_decimalspolicy field (default 0) sofundwith 39 returnsError::InvalidTokenDecimals. I can have this in a couple hours. Mind if I take this on?mercy60 commentedon Jul 21, 2026
Hi, I am a fullStack developer with years of experience, I have worked on so many project and I can submit a PR in less than 24hrs. Can I work on this please
grantfox-oss commentedon Jul 21, 2026
🦊 GrantFox — @mercy60 has been assigned to this issue as part of the Official Campaign | FWC26 campaign!
Next steps:
Closes #235)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Jul 28, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!
@mercy60's PR #412 was approved and merged by @kilodesodiq-arch.
🏆 @mercy60: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (121 total points). Track your full progress on GrantFox.
👏 Great work, @mercy60! Keep contributing to ChainForgee.
feat(onchain/aid_escrow): decimal-edge tests for validate_token + min…