fix(contracts): admin-only mint auth matrix/docs; treasury signer-spe… - #1697
Open
charityagbenu12-cmd wants to merge 1 commit into
Open
fix(contracts): admin-only mint auth matrix/docs; treasury signer-spe…#1697charityagbenu12-cmd wants to merge 1 commit into
charityagbenu12-cmd wants to merge 1 commit into
Conversation
…cific auth tests ## Closes MyFanss#1627 Replace `mock_all_auths()` with signer-specific `mock_auths` in test_unauthorized_deposit_reverts so the deposit/initialize auth test path uses explicit signer auth, matching the pattern already used by test_initialize_requires_admin_auth and test_deposit_requires_from_auth. ## Closes MyFanss#1628 Verified test_unauthorized_withdraw_reverts already covers non-creator withdraw with signer-specific `mock_auths`, asserts the stake is unchanged, and the README documents the creator auth requirement. No code change needed. ## Closes MyFanss#1629 `mint` is admin-only in contracts/myfans-token/src/lib.rs (`admin.require_auth()`, `Error::Unauthorized`). Update stale docs: - contract/AUTH_MATRIX.md: mint signer changed from `none` to `admin`. - docs/interfaces/myfans-token.md: mint Auth changed from `admin?` to `admin`. ## Closes MyFanss#1630 Verified content-access lifecycle coverage already exists: test_unlock_with_expired_purchase (expired -> PurchaseExpired), test_unlock_content_works (active succeeds), test_unlock_with_wrong_content_id, test_unlock_as_non_buyer, test_access_is_creator_specific, and test_unlock_content_requires_buyer_auth. No "cancelled" state exists in the contract, and the AUTH_MATRIX content-access rows already document the signer requirements.
|
@charityagbenu12-cmd 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR
Closes #1627
Closes #1628
Closes #1629
Closes #1630
Closes #1628
Verified test_unauthorized_withdraw_reverts already covers non-creator withdraw with signer-specific
mock_auths, asserts the stake is unchanged, and the README documents the creator auth requirement. No code change needed.Closes #1629
mintis admin-only in contracts/myfans-token/src/lib.rs (admin.require_auth(),Error::Unauthorized). Update stale docs:nonetoadmin.admin?toadmin.Closes #1630
Verified content-access lifecycle coverage already exists: test_unlock_with_expired_purchase (expired -> PurchaseExpired), test_unlock_content_works (active succeeds), test_unlock_with_wrong_content_id, test_unlock_as_non_buyer, test_access_is_creator_specific, and test_unlock_content_requires_buyer_auth. No "cancelled" state exists in the contract, and the AUTH_MATRIX content-access rows already document the signer requirements.
Summary
Changes
Test Plan
Automated tests added or updated
backend/src/**/*.spec.ts) — service/guard/decorator logic in isolationbackend/test/**/*.e2e-spec.ts) — HTTP round-trips with mocked infrastructurefrontend/src/**/*.test.{ts,tsx}) — React component behaviourfrontend/e2e/**/*.spec.ts) — Playwright browser flowscontract/) — Soroban/Rust unit tests viacargo testHow to run the tests locally
Manual verification checklist
cd backend && npm run lint/cd frontend && npm run lint