Description
distribute_with_remainder in contracts/split/src/calc.rs does not use BASIS_POINTS_TOTAL from types.rs. Any inline use of the literal 10_000 in calc.rs should be replaced with BASIS_POINTS_TOTAL (or BASIS_POINTS_TOTAL as i128) for consistency and to keep the constant as the single source of truth.
Acceptance Criteria
Context
- Target file:
contracts/split/src/calc.rs
BASIS_POINTS_TOTAL is declared in contracts/split/src/types.rs
Description
distribute_with_remainderincontracts/split/src/calc.rsdoes not useBASIS_POINTS_TOTALfromtypes.rs. Any inline use of the literal10_000incalc.rsshould be replaced withBASIS_POINTS_TOTAL(orBASIS_POINTS_TOTAL as i128) for consistency and to keep the constant as the single source of truth.Acceptance Criteria
BASIS_POINTS_TOTALfromcrate::typesincontracts/split/src/calc.rs10_000incalc.rswithBASIS_POINTS_TOTAL as i128(oru32as appropriate)distribute_with_remainderdoc comment mentioning typicaldenomvaluescargo testpassesContext
contracts/split/src/calc.rsBASIS_POINTS_TOTALis declared incontracts/split/src/types.rs