Assessment reports>Spectral Modelers>Threat Model>upgradeCompetition

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 the newCompetition 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.

Zellic © 2024Back to top ↑