Function: deployCompetition(address _admin, string _ipfsCompetition, uint256 _topNParameter)
This should deploy a new Competition contract.
Inputs
_adminControl: Fully controlled by the caller.
Constraints: Cannot be zero address.
Impact: Sets the admin variable of the Competition contract.
_ipfsCompetitionControl: Fully controlled by the caller.
Constraints: Cannot be empty.
Impact: Sets the
ipfsCompetitionvariable of the Competition contract.
_topNParameterControl: Fully controlled by the caller.
Constraints: Cannot be zero.
Impact: Sets the
topNParametervariable of the Competition contract.
Branches and code coverage
Intended branches
Check that
_ipfsCompetitionhas not been used before. Currently not performed.Assure that the
initializefunction is called on the Competition contract.Append the new Competition contract to the
allCompetitionsarray.Deploy the new Competition contract.
Negative behavior
_admincannot be zero address._ipfsCompetitioncannot be empty._topNParametercannot be zero.Caller is the owner.