Skip to content

test(milestones): add set_fee_bps tests — step limit, BPS cap, auth guard - #737

Merged
chonilius merged 2 commits into
MergeFi:mainfrom
defimomof2:feat/469-milestones-set-fee-bps-test
Oct 18, 2026
Merged

chonilius merged 2 commits into
MergeFi:mainfrom
defimomof2:feat/469-milestones-set-fee-bps-test

Conversation

@defimomof2

@defimomof2 defimomof2 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses regression bounties for missing milestones::set_fee_bps test coverage.

Resolved

  • [Regression on closed #243] milestones::set_fee_bps still has no test #469 — milestones::set_fee_bps still has no test

    Added 4 tests to contracts/milestones/src/test.rs:

    • test_set_fee_bps_admin_can_change_within_step_limit — admin changes fee by exactly MAX_FEE_CHANGE_BPS (500 bps); succeeds
    • test_set_fee_bps_rejects_step_exceeding_max — jump of 501 bps returns Error::InvalidFee
    • test_set_fee_bps_rejects_above_bps_denominator — value > 10 000 returns Error::InvalidFee regardless of step size
    • test_set_fee_bps_requires_admin_auth — call without admin auth mocked fails

Closes #469

To be completed

@defimomof2
defimomof2 requested a review from chonilius as a code owner October 18, 2026 13:58
@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

@defimomof2 is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@defimomof2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chonilius
chonilius merged commit 7e2c8e7 into MergeFi:main Oct 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants