The PaidPredictableCompetition contract extends the PredictableCompetition features by adding customizable registration fee requirements, including customizable payment tokens. This implementation enables organizers to monetize their events while providing additional incentives for participants.
Function 1: createBracketPrediction
Copy function createBracketPrediction ( address _registrant , uint8 [] calldata _matchPredictions ) public override ( PredictableCompetition , IPaidPredictableCompetition ) whenNotLive This function allows users to create a bracket prediction and handles the registration fee payment.
The address of the user creating the bracket prediction
An array containing the user's match predictions
Function 2: createBracketPredictionGasToken
Copy function createBracketPredictionGasToken ( address _registrant , uint8 [] calldata _matchPredictions ) external payable override whenNotLive This function allows users to create a bracket prediction and handles the registration fee payment using gas token.
The address of the user creating the bracket prediction
An array containing the user's match predictions
Function 3: refundRegistrationFee
Copy function refundRegistrationFee () external override whenExpired This function allows users to request a refund of their registration fee when the competition has expired.
Function 4: claimRewards
Copy function claimRewards () external override whenCompleted This function allows users to claim their rewards when the competition is completed.
Function 5: calculatePendingRewards
Copy function calculatePendingRewards ( address _user ) public view override returns ( uint256 pendingRewards_ ) This function calculates the pending rewards for a user.
Function 6: getBracketPredictionFeeInfo
This function returns the registration fee information for bracket predictions.