Skip to content

feat(issue-114): add admin freeze clawback smoke tests#133

Merged
Ibinola merged 1 commit intoLead-Studios:mainfrom
mxllv:feat/issue-114-admin-freeze-clawback-smoke
Mar 28, 2026
Merged

feat(issue-114): add admin freeze clawback smoke tests#133
Ibinola merged 1 commit intoLead-Studios:mainfrom
mxllv:feat/issue-114-admin-freeze-clawback-smoke

Conversation

@mxllv
Copy link
Copy Markdown
Contributor

@mxllv mxllv commented Mar 28, 2026

Summary

Added contract-level smoke coverage for admin rotation, freeze and unfreeze behavior, and clawback through VeritixTokenClient so these security-sensitive entrypoints are exercised through the public contract interface.

Changes

  • Activated the existing admin/freeze state smoke test so it now runs in the normal suite
  • Added a new public-client smoke test covering admin rotation, freeze/unfreeze, and clawback in one flow
  • Removed redundant helper-level admin auth checks in freeze.rs because the public contract entrypoints already enforce admin authorization and the duplicate check aborted the active client smoke path
  • Files affected: veritixpay/contract/token/src/test.rs, veritixpay/contract/token/src/freeze.rs

Validation

  • cd veritixpay/contract/token && cargo +stable build
  • cd veritixpay/contract/token && cargo +stable test test_admin_and_freeze_views_follow_state_changes
  • cd veritixpay/contract/token && cargo +stable test test_admin_freeze_and_clawback_smoke_via_client
  • cd veritixpay/contract/token && cargo +stable test
  • Results: build passed; both targeted tests passed; full test suite passed (21 passed, 15 ignored)

Mismatch Handling (if applicable)

  • The admin/freeze smoke path exposed a mismatch in the current repo: freeze and unfreeze already authenticate the admin in contract.rs, but freeze.rs repeated require_auth() again and caused the active Soroban client smoke tests to abort
  • Added only the smallest viable scaffold by removing the redundant helper-level auth and leaving the public authorization boundary in contract.rs
  • The solution was kept minimal so the branch stayed focused on enabling the required smoke coverage without broad authorization refactors

Notes

  • This branch intentionally covers the public happy-path smoke behavior only
  • Negative-path authorization coverage remains separate from this issue’s scope

Closes #114

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

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

@Ibinola Ibinola merged commit aed6c43 into Lead-Studios:main Mar 28, 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

Development

Successfully merging this pull request may close these issues.

Add contract-level smoke tests for admin, freeze, and clawback via VeritixTokenClient

2 participants