You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The changeState function in the Contest smart contract allows for non-sequential state transitions, which can lead to invalid state changes and potentially bypass critical phases of the contest.
To Reproduce
Steps to reproduce the behavior:
Deploy the Contest smart contract.
Call the changeState function with a state value that is not the immediate next phase (e.g., changing from reg directly to done).
Observe that the state transition occurs without error.
Expected behavior
The changeState function should only allow transitions to the next immediate phase to ensure the contest proceeds in a valid and sequential manner (i.e., from reg to voting to done).
Screenshots
N/A
Desktop (please complete the following information):
OS: Any
Browser Any
Version Any
Smartphone (please complete the following information):
Device: Any
OS: Any
Browser Any
Version Any
Additional context
This issue can lead to scenarios where voting can be skipped entirely if the state is changed from reg to done directly. To prevent this, the changeState function should include a check to ensure only the next phase can be transitioned to.
Please assign me this issue under GSSOC'24.
The text was updated successfully, but these errors were encountered:
Describe the bug
The changeState function in the Contest smart contract allows for non-sequential state transitions, which can lead to invalid state changes and potentially bypass critical phases of the contest.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The changeState function should only allow transitions to the next immediate phase to ensure the contest proceeds in a valid and sequential manner (i.e., from reg to voting to done).
Screenshots
N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
This issue can lead to scenarios where voting can be skipped entirely if the state is changed from reg to done directly. To prevent this, the changeState function should include a check to ensure only the next phase can be transitioned to.
Please assign me this issue under GSSOC'24.
The text was updated successfully, but these errors were encountered: