Skip to content

test(governance): add protocol config bounds matrix#1382

Merged
Baskarayelu merged 6 commits into
QuickLendX:mainfrom
Kuhai9801:test/qlx-1346-config-bounds
Jun 19, 2026
Merged

test(governance): add protocol config bounds matrix#1382
Baskarayelu merged 6 commits into
QuickLendX:mainfrom
Kuhai9801:test/qlx-1346-config-bounds

Conversation

@Kuhai9801

Copy link
Copy Markdown
Contributor

📝 Description

Adds a focused bounds-enforcement matrix for set_fee_config and set_protocol_config.

🔧 Changes Made

  • Adds quicklendx-contracts/src/test_config_bounds_matrix.rs.
  • Verifies fee bps accepts 0 and 1000, rejects 1001, and preserves state after rejection.
  • Verifies protocol config lower/upper boundaries for min invoice amount, max due-date days, and grace-period seconds.
  • Verifies non-admin calls to both setters reject with NotAdmin and leave readable config unchanged.

🧪 Testing

  • rustfmt --check --edition 2021 quicklendx-contracts/src/test_config_bounds_matrix.rs
  • git diff --check
  • Not run locally: cargo test / cargo clippy

🔗 Related Issues

Closes #1346

🧪 How to Test

  1. cd quicklendx-contracts
  2. cargo test test_config_bounds_matrix -- --nocapture

@Kuhai9801 Kuhai9801 marked this pull request as ready for review June 19, 2026 08:17
@Baskarayelu

Copy link
Copy Markdown
Contributor

a full bounds matrix on set_protocol_config / set_fee_config is exactly the guardrail coverage we wanted. merging 👍

@Baskarayelu Baskarayelu merged commit f9b4ce5 into QuickLendX:main Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a protocol-config bounds enforcement test matrix for set_protocol_config and set_fee_config in init.rs

2 participants