Task/resolution authsnap - #1054
Merged
greatest0fallt1me merged 4 commits intoJul 27, 2026
Merged
Conversation
Add BetBatchPlacedEvent and BetStatsUpdatedEvent with emit methods, update event topic catalog, and integrate emissions into betting code. - BetBatchPlacedEvent: emitted for batch bet operations (place_bets) - BetStatsUpdatedEvent: emitted when per-market bet stats change - Event topic catalog updated with all betting lifecycle topics - Focused tests for struct creation, publication, storage, and edge cases
Add comprehensive auth coverage tests for all resolution entrypoints: - resolve_market_manual (authorized/forged/no-auth/wrong-subject/uninitialized) - resolve_market_with_ties (authorized/forged/no-auth) - force_resolve_market (authorized/forged/no-auth/wrong-subject) - resolve_dispute (authorized/forged/no-auth) - admin_override_verification (authorized/forged/no-auth) Each entrypoint has positive (authorized admin succeeds) and negative (forged admin / no-auth rejected) tests, following the same patterns as require_auth_coverage_tests.rs.
|
@Ayomide-codex 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! 🚀 |
greatest0fallt1me
merged commit Jul 27, 2026
f6e32ef
into
Predictify-org:master
0 of 2 checks passed
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.
Pull Request Description
📋 Basic Information
Type of Change
Related Issues
Closes #873
Priority Level
📝 Detailed Description
What does this PR do?
This PR adds per-entrypoint authorization snapshot tests for the resolution contract. The new tests verify that each state-changing entrypoint requires the expected authorization by capturing and validating the required auth snapshots.
Additionally:
contracts/resolution/tests/auth_snap.rs.Why is this change needed?
Authorization snapshot tests help ensure that every state-changing resolution entrypoint continues to enforce the correct
require_authbehavior. These tests act as regression protection, making it easier to detect unintended authentication changes during future development.How was this tested?
Alternative Solutions Considered
Runtime authorization checks alone were considered sufficient, but snapshot tests provide stronger regression guarantees by validating the complete authorization requirements for each entrypoint over time.
🏗️ Smart Contract Specific
Contract Changes
Security Considerations
🧪 Testing
Test Coverage
Test Results
Manual Testing Steps
cargo test.require_authbehavior for each resolution entrypoint.📚 Documentation
Documentation Updates
Breaking Changes
Breaking Changes: None.
🔍 Code Quality
Code Review Checklist
Performance Impact
Security Review
🚀 Deployment & Integration
Deployment Notes
Integration Points
📊 Impact Assessment
User Impact
Business Impact
💬 Notes for Reviewers
Please pay special attention to: