Skip to main content

Variables

payoutNumerators

payoutDenominator

Events

ConditionPreparation

Emitted upon the successful preparation of a condition. Parameters

ConditionResolution

PositionSplit

Emitted when a position is successfully split.

PositionsMerge

Emitted when positions are successfully merged.

PayoutRedemption

Functions

prepareCondition

This function prepares a condition by initializing a payout vector associated with the condition. Parameters

reportPayouts

Called by the oracle for reporting results of conditions. Will set the payout vector for the condition with the ID keccak256(abi.encodePacked(oracle, questionId, outcomeSlotCount)), where oracle is the message sender, questionId is one of the parameters of this function, and outcomeSlotCount is the length of the payouts parameter, which contains the payoutNumerators for each outcome slot of the condition. Parameters

splitPosition

This function splits a position. If splitting from the collateral, this contract will attempt to transfer amount collateral from the message sender to itself. Otherwise, this contract will burn amount stake held by the message sender in the position being split worth of EIP 1155 tokens. Regardless, if successful, amount stake will be minted in the split target positions. If any of the transfers, mints, or burns fail, the transaction will revert. The transaction will also revert if the given partition is trivial, invalid, or refers to more slots than the condition is prepared with. Parameters

mergePositions

redeemPositions

getOutcomeSlotCount

Gets the outcome slot count of a condition. Parameters Return Values

getConditionId

Constructs a condition ID from an oracle, a question ID, and the outcome slot count for the question. Parameters

getCollectionId

Constructs an outcome collection ID from a parent collection and an outcome collection. Parameters

getPositionId

Constructs a position ID from a collateral token and an outcome collection. These IDs are used as the ERC-1155 ID for this contract. Parameters