onlydustxyz/starkonquest

Close registrations automatically when required ship count is reached

Closed this issue · 0 comments

ofux commented

User story

Details

As a tournament admin, I want the tournament to close registrations automatically when the required ship count is reached.

Currently, the tournament admin must call the close_registrations function manually once all ships have registered. We want it to be done automatically.

To do:

  • move the close_registrations function of the tournament library in the internal namespace.
  • remove the close_registrations function from the tournament contract and its interface.
  • in the register function, check if ship_count is equal to required_total_ship_count, and if it the case, call the internal close_registrations function.

Acceptance Criteria

  • close_registrations function is no longer external
  • register function automatically closes registrations when all ships are registered
  • new unit test(s) must cover this case
  • documentation in scripts/README.md must be updated accordingly
  • script scripts/run/close-registrations.py must be deleted