Skip to content

test: betting err stability - #1090

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Phantomcall:task/betting-errstab-v7
Jul 28, 2026
Merged

test: betting err stability#1090
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Phantomcall:task/betting-errstab-v7

Conversation

@Phantomcall

@Phantomcall Phantomcall commented Jul 27, 2026

Copy link
Copy Markdown

Add ContractError stability test for betting (v7)

Freeze client-facing error code numbers for betting entrypoints.

This PR adds contracts/betting/tests/err_stab.rs which freezes the numeric discriminants of every betting-related predictify_hybrid::Error variant that a client application can receive from betting entrypoints (place_bet, place_bets, cancel_bet, claim_winnings, set_max_bet_cap).

Changes

  • contracts/betting/tests/err_stab.rs — New stability test file covering:
    • User-operation betting errors (codes 100-113)
    • Fee and cap errors (codes 508, 673, 674)
    • Batch idempotency error (code 509)
    • General state errors reachable from betting (codes 400, 401)
    • Pairwise uniqueness guard ensuring no duplicate discriminants
  • contracts/betting/Cargo.toml — Register [[test]] err_stab entry

Acceptance Criteria

  • Implementation matches the description
  • Tests added following existing err_stab patterns
  • Code adheres to repo lint and code style
  • NatSpec-style rustdoc on all public items

Closes #924

@Phantomcall
Phantomcall force-pushed the task/betting-errstab-v7 branch from ede8947 to 2c113d2 Compare July 27, 2026 23:50
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

@greatest0fallt1me
greatest0fallt1me merged commit 0e6e78f into Predictify-org:master Jul 28, 2026
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 ContractError stability test for betting (v7)

2 participants