3.1 Competition
The base Competition contract is an interface for tracking competition progression and results. It serves as the foundation for the other two competition types, enabling organizers to create and manage events with ease.
Function 1: start
This function starts the competition.
Name | Type | Description |
---|---|---|
(no params) |
Function 2: setTeamNames
This function sets the team names in the competition.
Name | Type | Description |
---|---|---|
_names | string[] calldata | Array of team names. |
Function 3: completeMatch
This function completes a match and records the winning team.
Name | Type | Description |
---|---|---|
_matchId | uint256 | The ID of the match. |
_winningTeamId | uint8 | The ID of the winning team. |
Function 4: advanceRound
This function advances the competition to the next round using the provided match results.
Name | Type | Description |
---|---|---|
_matchResults | uint8[] calldata | Array of winning team IDs. |
Function 5: advanceRound
This function advances the competition to the next round, assuming all matches are completed.
Name | Type | Description |
---|---|---|
(no params) |
Function 6: getCompetitionProgression
This function returns the competition's bracket progression.
Name | Type | Description |
---|---|---|
bracketProgress_ | MatchOutcome[] memory | Array of match outcomes. |
Function 7: getMatchOutcome
This function returns the outcome of a specific match.
Name | Type | Description |
---|---|---|
_matchId | uint256 | The ID of the match. |
matchOutcome_ | MatchOutcome memory | The match outcome. |
Last updated