Skip to content

[contracts] Add bet amount validation (min/max) in place_bet() #967

Description

@Ehonrie

Enforce min_bet_amount and max_bet_amount from ProtocolConfig inside place_bet() in contracts/market/src/lib.rs.

Add the validation gate before any token transfer occurs.

Acceptance Criteria:

  • Bet below min_bet_amount panics with 'below minimum bet' error
  • Bet above max_bet_amount panics with 'above maximum bet' error
  • Bet exactly at min_bet_amount succeeds
  • Bet exactly at max_bet_amount succeeds
  • Unit tests cover all four boundary cases

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions