Joining Raffles

How to participate in existing Gaambl Raafl games

Joining Process

Players can join active raffles by paying the entry fee in the specified token.

Requirements

  • • Raffle must be in ACTIVE state
  • • Raffle must not be expired or full
  • • Pay exact entry fee in specified token
  • • Cannot join the same raffle twice

Function Signature

function joinRaffle(uint256 raffleId) external payable

Payment Requirements

ETH Raffles

  • • Send exact entry fee as msg.value
  • • No token approval needed
  • • Payment handled automatically

ERC-20 Raffles

  • • Approve token transfer first
  • • Send msg.value = 0
  • • Token transfer handled by contract

Raffle Completion

When Raffles Complete

Raffles automatically trigger completion in two scenarios:

Max Players Reached

When the last player joins and reaches the maximum player limit, the raffle immediately requests randomness and begins the completion process.

Manual Completion

Anyone can call completeExpiredRaffle(raffleId) after the raffle duration expires to trigger completion for raffles with 2+ players.