π Description
total_liquidity_all() sums total liquidity across every asset in one call, and contract_info() gives a version/paused/fee/count snapshot β but there's no single-call equivalent summing total_settled_amount(status) across every status, so a dashboard wanting an overall settled-volume figure has to call the per-status variant once per known status and sum client-side.
π§© Requirements and context
- Add
total_settled_amount_all(env) -> i128 summing settled amount across every settlement status, mirroring total_liquidity_all()'s pattern.
- No change to the existing per-status
total_settled_amount(status).
- Consider whether it belongs alongside
contract_info()'s snapshot fields, or stays a standalone read β pick one and be consistent with existing naming conventions.
π οΈ Suggested execution
- Add the new
pub fn to src/lib.rs, reusing whatever aggregate-tracking storage.rs maintains per status.
- Add tests in
src/test.rs verifying the sum matches manually adding every per-status call.
- Update the README's Settlement table.
β
Acceptance criteria
π Security notes
Read-only addition; no new attack surface.
π Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
π Description
total_liquidity_all()sums total liquidity across every asset in one call, andcontract_info()gives a version/paused/fee/count snapshot β but there's no single-call equivalent summingtotal_settled_amount(status)across every status, so a dashboard wanting an overall settled-volume figure has to call the per-status variant once per known status and sum client-side.π§© Requirements and context
total_settled_amount_all(env) -> i128summing settled amount across every settlement status, mirroringtotal_liquidity_all()'s pattern.total_settled_amount(status).contract_info()'s snapshot fields, or stays a standalone read β pick one and be consistent with existing naming conventions.π οΈ Suggested execution
pub fntosrc/lib.rs, reusing whatever aggregate-trackingstorage.rsmaintains per status.src/test.rsverifying the sum matches manually adding every per-status call.β Acceptance criteria
total_settled_amount_all()returns the correct cross-status sum.π Security notes
Read-only addition; no new attack surface.
π Guidelines