Reporting Payouts
So far, we talked about conditional tokens as if tokens as if they had a value denominated in some backing ERC20 token in the case that a specific condition is met.
First, let's look at the first condition we have prepared with three outcome slots (A, B, and C).
In order to resolve this condition, we used the method reportPayouts
, which takes two parameters.
questionID
: the bytes32 representation of your question. We'ved used0x0000000000000000000000000000000000000000000000000000000000000001
and0x0000000000000000000000000000000000000000000000000000000000000002
.payouts
: an array of uint256 values representing the ratio of the collateral that each outcome can claim. The length of this array must be equal to theoutcomeSlotCount
.
In most cases, the oracle would be expected to set one outcome as true and the others false.
Let's use our first question (0x0...1
), with three outcome slots (A, B, and C) as an example and resolve it to B.
Call reportPayouts()
using the first condition's question ID as for the questionId
parameter and [0,1,0]
for the parouts
parameter.
Now that we have successfully reported the results of this condition, conditional tokens that depend on this condition can now use the redemption functionality to claim the underlying collateral.