Function: upgradeCompetition(ICompetition newCompetition)
This facilitates upgrading the logic contract for the Competition contract.
Inputs
newCompetition
Control: Fully controlled by the caller.
Constraints: Cannot be zero address.
Impact: Sets the
competitionLogic
variable.
Branches and code coverage
Intended branches
Assure that the upgrade procedure did not overwrite storage. Currently not performed specifically.
Assure that the newCompetition contract is initialized. Currently not explicitly performed.
Should set the
competitionLogic
variable to thenewCompetition
parameter.Increment the
competitionVersion
variable.
Negative behavior
Should not allow upgrading to a
newCompetition
that has not been deployed by the factory. Currently not performed.Should not be callable by anyone other than the owner.