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.
Difficulty. Medium
Estimated effort. S
Backlog item #27 from `docs/maintainer-issue-backlog.md.
Problem Statement.
validate_token(&env, &token)calls the token'sdecimals()andaccepts
0..=38as valid. The boundary cases (0, 38, 39, div by 0 due to decimals=0division) 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.
fundwith decimals=39 returns newError::InvalidTokenDecimals.fundwith decimals=0 still works unless policy is configured otherwise.Files or modules likely to be affected.
src/lib.rs,tests/aid_escrow_tests.rs.Difficulty. Medium
Estimated effort. S
Backlog item #27 from `docs/maintainer-issue-backlog.md.