Skip to content

Fix issues #493, #494, #495, #497 - #664

Merged
DeFiVC merged 1 commit into
ChainLearnOfficial:mainfrom
MarcusDavidG:fix/issues-493-494-495-497
Oct 20, 2026
Merged

DeFiVC merged 1 commit into
ChainLearnOfficial:mainfrom
MarcusDavidG:fix/issues-493-494-495-497

Conversation

@MarcusDavidG

@MarcusDavidG MarcusDavidG commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR fixes four issues assigned to me:

Issue #493: test_contract_upgrade never actually calls upgrade()

  • Fix: Removed the redundant test in since already correctly tests the upgrade flow with actual calls and post-upgrade assertions.

Issue #494: Gas benchmark assertions are trivially true (assert!(cost > 0))

  • Fix: Replaced all 14 trivial assertions in with meaningful regression thresholds based on measured baseline values with a 2x margin. Each threshold is documented with its baseline and rationale.

Issue #495: No authorization tests for progress-tracker and credential-nft admin functions

  • Fix: Added 15 negative authorization tests in covering all admin functions:
    • Progress-tracker: , , , , , , ,
    • Credential-nft: , , , , ,
    • Tests use targeted auth (no ) to verify non-admin callers are rejected.

Issue #497: batch_claim_reward bypasses pause check while claim_reward checks it

  • Fix: Added at the start of in (line 854), matching the pattern in .
  • Tests: Added two regression tests in :
    • : Verifies batch claims are blocked when paused
    • : Verifies batch claims work after unpause

Testing

All changes are test-only or minimal code additions with corresponding tests. No builds or package installations were run as per instructions.

Closes #493
closes #494
closes #495
closes #497

…Official#495, ChainLearnOfficial#497

Closes ChainLearnOfficial#493: Remove redundant test_contract_upgrade that never actually calls upgrade()
Closes ChainLearnOfficial#494: Replace trivial gas benchmark assertions with meaningful regression thresholds
Closes ChainLearnOfficial#495: Add negative authorization tests for progress-tracker and credential-nft admin functions
Closes ChainLearnOfficial#497: Add pause check to batch_claim_reward and add regression tests
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@MarcusDavidG 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment