Condition Entity
Description
Represents a betting condition within a game. It defines the possible outcomes for a specific condition and tracks the status, turnover, and other attributes of the condition. List of condition statuses:
- Created: The condition has been created and is available for betting.
- Resolved: The condition has been resolved, and the outcomes have been determined.
- Canceled: The condition has been canceled, and any associated bets may be voided.
- Paused: The condition has been temporarily paused, likely due to game delays or other interruptions.
Usage
If you need to display or manage betting conditions within a game (e.g., over/under, match-winner), this is the entity to use. It allows you to track the status and outcomes of specific betting conditions.
Attributes
Attribute | Type | Description |
---|---|---|
id | ID! | Unique identifier for the condition (Core contract address + Condition ID). |
core | CoreContract! | Reference to the core contract associated with this condition. |
coreAddress | String! | Address of the core contract. |
conditionId | BigInt! | Numeric identifier of the condition. |
game | Game! | Reference to the game the condition is linked to. |
outcomes | [Outcome!]! @derivedFrom | List of outcomes related to this condition. |
outcomesIds | [BigInt!] | List of outcome IDs associated with this condition. |
wonOutcomes | [Outcome!] | List of outcomes that have been won. |
wonOutcomeIds | [BigInt!] | IDs of the won outcomes. |
margin | BigInt! | Margin value for the condition, used in calculating bets. |
reinforcement | BigInt! | Reinforcement value used to back the condition. |
status | ConditionStatus! | Status of the condition (Created , Resolved , Canceled , Paused ). |
turnover | BigInt! | Total turnover generated by the condition. |
provider | BigInt! | Provider associated with the condition. |
createdBlockNumber | BigInt! | Block number when the condition was created. |
createdBlockTimestamp | BigInt! | Timestamp of the block when the condition was created. |
createdTxHash | String! | Transaction hash for the creation of the condition. |
resolvedBlockNumber | BigInt | Block number when the condition was resolved (if applicable). |
resolvedBlockTimestamp | BigInt | Timestamp of the block when the condition was resolved. |
resolvedTxHash | String | Transaction hash for the resolution of the condition. |
internalStartsAt | BigInt | Internal start time for the condition (timestamp). |
isExpressForbidden | Boolean! | Indicates if express betting is forbidden for this condition. |
_winningOutcomesCount | Int! | Count of expecting winning outcomes for the condition. |