test(betting): add per-entrypoint auth snapshot suite for betting - #1019
Merged
greatest0fallt1me merged 1 commit intoJul 26, 2026
Merged
Conversation
Covers 22 betting-related entrypoints not previously tested in auth_snapshot.rs: Write entrypoints (11): place_bets, cancel_event, refund_on_oracle_failure, distribute_payouts, set_global_bet_limits, set_event_bet_limits, set_market_max_bet_cap, remove_market_max_bet_cap, set_governance_min_bet_bps, commit_fee_config, withdraw_collected_fees Read-only entrypoints (8): get_bet, has_user_bet, get_implied_probability, get_payout_multiplier, get_effective_bet_limits, get_market_max_bet_cap, calculate_bet_payout, query_user_bets_paged Edge cases (4): non-admin rejection for set_global_bet_limits, set_market_max_bet_cap, cancel_event, commit_fee_config No-auth tests (4): should_panic tests for cancel_event, refund_on_oracle_failure, commit_fee_config, withdraw_collected_fees Note: reveal_fee_config omitted because fees::FeeConfig is in a private module. Admin-only auth is guaranteed by the same require_primary_admin call shared with commit_fee_config. Refs Predictify-org#866
|
@Vicistar-V 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 26, 2026
92351a3
into
Predictify-org:master
0 of 2 checks passed
4 tasks
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.
Summary
Creates
contracts/predictify-hybrid/tests/auth_snapshot_betting.rs— a dedicated auth snapshot suite covering 22 betting-related entrypoints not previously tested inauth_snapshot.rs.Write entrypoints (11)
place_betscancel_eventrefund_on_oracle_failuredistribute_payoutsset_global_bet_limitsset_event_bet_limitsset_market_max_bet_capremove_market_max_bet_capset_governance_min_bet_bpscommit_fee_configwithdraw_collected_feesRead-only entrypoints (8)
get_bet,has_user_bet,get_implied_probability,get_payout_multiplier,get_effective_bet_limits,get_market_max_bet_cap,calculate_bet_payout,query_user_bets_paged— all verified to require no auth.Edge cases (4)
Non-admin rejection tests for
set_global_bet_limits,set_market_max_bet_cap,cancel_event,commit_fee_config.No-auth tests (4)
#[should_panic]tests provingrequire_authfires forcancel_event,refund_on_oracle_failure,commit_fee_config,withdraw_collected_fees.Notes
reveal_fee_configomitted becausefees::FeeConfigis in a private module. Admin-only auth is guaranteed by the samerequire_primary_admincall shared withcommit_fee_config.contracts/betting/tests/auth_snap.rs(issue spec) to the monolithicpredictify-hybrid/tests/structure.Test Plan
Cargo.tomlas[[test]] name = "auth_snapshot_betting"auth_snapshot.rspatterns and fixture structureCloses #866