RPS Raffle
RPS Raffle is the core smart contract powering our customizable raffle systems. It handles ticket generation, fund management, and raffle logistics, offering a range of configurable parameters for a tailor-made user experience.
Roles
Operator
This backend account is crucial for managing the raffle mechanics. It is responsible for executing the raffle process once the winning tickets have been randomly selected. Importantly, the Operator is needed for this task because the raffle contract does not maintain information regarding ticket ownership.
Router
Represents the RPSRouter contract.
Owner
Holds ultimate control over raffle parameters, such as pot limits, ticket costs, and prize distributions.
State variables
Mappings
External functions
Generates tickets for the _user based on _amountInWei; can only be called by router.
Generates tickets for multiple trades.
This function represents the final stage of the raffle process and is exclusively invoked by the Operator account. It performs two critical tasks:
Winner Assignment: It sets the addresses of the winning participants based on their associated ticket IDs.
Fund Release: Upon this assignment, the raffle funds are unlocked, enabling winners to claim their prizes.
The need for Operator intervention arises because the raffle contract does not store ticket ownership information
For raffle winners to claim their funds.
Last updated