Integration Flow
Step-by-step guide for integrating with the Tournament Builder for Forge Digital Ventures
This guide outlines the step-by-step process for integrating with the Tournament Builder developed for Forge Digital Ventures. For technical details of the architecture, see the Overview document.
1. Tournament Creation
Prepare Tournament Configuration
Define bracket size, entry fees, and payout structure
Identify administrator address
Gather UTXOs for transaction fees
Create Tournament Transaction
Call the
/tournaments
endpoint with configurationReceive transaction hex in response
Sign and Submit Transaction
Sign the transaction with appropriate keys
Submit the signed transaction (see Transaction Overview for details)
When successful, the tournament is created and an NFT is minted to represent it on-chain. The tournament is now ready to accept registrations.
2. Registration Management
The Tournament Builder uses a two-phase registration process:
Participants self-register (creating registration UTXOs)
Tournament administrator collects these registrations and officially adds participants
Phase 1: Participants Register
Participant Initiates Registration
Call
POST /tournaments/{id}/register
with participant addressInclude UTXOs covering entry fee
Submit resulting transaction
This creates a registration UTXO at the registration script address
Verification
Query
GET /tournaments/{id}/registrations
to confirm registrationValidate status and fee payment
Participants must monitor their registration status
Optional: Registration Cancellation
If needed, participants can cancel their registration before being added to the tournament
The registration UTXO with the full entry fee amount is returned to the participant
This provides a complete refund mechanism for participants who change their mind
Phase 2: Tournament Administrator Adds Participants
Collect Registration Outputs
Tournament administrator gathers valid registration output references
Uses
GET /tournaments/{id}/registrations
to find valid registrations
Add Participants to Tournament
Administrator calls
POST /tournaments/{id}/participants
with registration listOnly the tournament admin can perform this action
Administrator signs and submits transaction
This transaction consumes the registration UTXOs and updates the tournament datum
Participants are now officially part of the tournament
Phase 3: Tournament Settlement
Finalize Participant List
Administrator reviews and confirms all participants
Conduct Tournament
Actual competition happens off-chain
Results are determined through competition
Submit Results
Tournament administrator submits final standings using the
PATCH /tournaments/{id}/settle
endpointSmart contract distributes rewards according to payout structure defined at tournament creation
Each prize recipient receives their prize as a transaction output with the tournament ID as datum
For details on prize distribution and fees, see the Fee Structure document
Last updated
Was this helpful?