Assessment reports>Spectral Modelers>Threat Model>upgradeModelerContract

Function: upgradeModelerContract(IModeler newModelerContract)

This facilitates upgrading the logic contract for the Modeler contract.

Inputs

  • newModelerContract

    • Control: Fully controlled by the caller.

    • Constraints: Cannot be zero address.

    • Impact: Sets the modelerLogic variable.

Branches and code coverage

Intended branches

  • Assure that the upgrade procedure did not overwrite storage. Currently not performed specifically.

  • Assure that the newModelerContract contract is initialized. Currently not explicitly performed.

  • Should set the modelerLogic variable to the newModelerContract parameter.

  • Increment the modelerVersion variable.

Negative behavior

  • Should not allow upgrading to a newModelerContract 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 ↑