Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.adipredictstreet.com/llms.txt

Use this file to discover all available pages before exploring further.

Standard Gnosis / Polymarket conditional token framework. Unchanged from upstream — PredictStreet uses it as the settlement substrate.

Key concepts

  • Condition — an (oracle, questionId, outcomeSlotCount) tuple.
  • Position — an ERC-1155 balance of a specific outcome slot within a condition.
  • Redemption — once the oracle reports payouts, holders call redeemPositions to exchange winning tokens for USDC.

Prepare a condition

function prepareCondition(
    address oracle,
    bytes32 questionId,
    uint256 outcomeSlotCount
) external;
Called by oracle-service as part of market deployment.

Redeem winning positions

function redeemPositions(
    IERC20 collateralToken,
    bytes32 parentCollectionId,
    bytes32 conditionId,
    uint256[] calldata indexSets
) external;

Redeeming via the contract

Partners can either call ConditionalTokens.redeemPositions directly from their own client (this page describes that signature), or hand the job to the platform via POST /api/me/redemptions — the off-chain helper queues a submitter-executed redemption against your vault. Either path lands the same PayoutRedemption event on-chain. The off-chain ledger picks it up via chain-watcher and credits /api/me/balances.collateral accordingly; no extra API call is required to “claim” winnings beyond the initial redemption.

Events

event ConditionPreparation(bytes32 indexed conditionId, address indexed oracle, ...);
event ConditionResolution(bytes32 indexed conditionId, ...);
event PositionSplit(address indexed stakeholder, ...);
event PositionsMerge(address indexed stakeholder, ...);
event PayoutRedemption(address indexed redeemer, bytes32 indexed conditionId, ...);

Source

0x296B91AF13f317367879aCc1726148481929490E on Blockscout . Tracks upstream Gnosis ConditionalTokens v1.0.1 with only build-system changes.