Function: deployCompetition(address _admin, string _ipfsCompetition, uint256 _topNParameter)
This should deploy a new Competition contract.
Inputs
_admin
Control: Fully controlled by the caller.
Constraints: Cannot be zero address.
Impact: Sets the admin variable of the Competition contract.
_ipfsCompetition
Control: Fully controlled by the caller.
Constraints: Cannot be empty.
Impact: Sets the
ipfsCompetition
variable of the Competition contract.
_topNParameter
Control: Fully controlled by the caller.
Constraints: Cannot be zero.
Impact: Sets the
topNParameter
variable of the Competition contract.
Branches and code coverage
Intended branches
Check that
_ipfsCompetition
has not been used before. Currently not performed.Assure that the
initialize
function is called on the Competition contract.Append the new Competition contract to the
allCompetitions
array.Deploy the new Competition contract.
Negative behavior
_admin
cannot be zero address._ipfsCompetition
cannot be empty._topNParameter
cannot be zero.Caller is the owner.