Description
min_funding_bps sets the minimum percentage of the invoice total that must be funded before release. There is no bounds check; a value above 10 000 would require more than 100% funding, making the invoice permanently unreleasable.
Acceptance Criteria
Context
- Target file:
contracts/split/src/lib.rs
Description
min_funding_bpssets the minimum percentage of the invoice total that must be funded before release. There is no bounds check; a value above 10 000 would require more than 100% funding, making the invoice permanently unreleasable.Acceptance Criteria
create_invoicereturnsContractError::InvalidAmountwhenmin_funding_bps > 10_000min_funding_bps = 10_001is rejectedmin_funding_bps = 10_000is acceptedcargo testpassesContext
contracts/split/src/lib.rs