Market
Last updated
Last updated
The market contract represents a single prediction market and is initialized in .
Flag to initialize the market only once.
Contains the information associated to Reality.
Contains the information associated to Conditional Tokens.
The name of the market.
The market outcomes, doesn't include the INVALID_RESULT outcome.
Lower bound, only used for scalar markets.
Upper bound, only used for scalar markets.
Conditional Tokens parameters.
Reality parameters.
Oracle contract.
Initializer.
Parameters
_marketName
string
The name of the market.
_outcomes
string[]
The market outcomes, doesn't include the INVALID_RESULT outcome.
_lowerBound
uint256
Lower bound, only used for scalar markets.
_upperBound
uint256
Upper bound, only used for scalar markets.
_conditionalTokensParams
struct Market.ConditionalTokensParams
Conditional Tokens params.
_realityParams
struct Market.RealityParams
Reality params.
_realityProxy
contract RealityProxy
Oracle contract.
The templateId associated to the Reality question.
Return Values
[0]
uint256
The template id.
Returns the Reality questions ids. Multi Scalar markets have one question for each outcome, while any other market has only one question.
Return Values
[0]
bytes32[]
The Reality questions ids.
Encoded questions parameters, needed to create and reopen a question.
Parameters
index
uint256
The question index.
Return Values
[0]
string
The encoded question.
Conditional Tokens questionId.
Return Values
[0]
bytes32
the question ID.
Conditional Tokens conditionId.
Return Values
[0]
bytes32
The condition ID.
Conditional Tokens parentCollectionId.
Return Values
[0]
bytes32
The parent collection ID.
The parent market (optional). This market redeems to an outcome token of the parent market.
Return Values
[0]
address
The parent market address.
The parent outcome (optional). The parent market's outcome token this market redeems for.
Return Values
[0]
uint256
The parent outcome index.
Returns the wrapped1155 and the data corresponding to an outcome token.
Parameters
index
uint256
The outcome index.
Return Values
wrapped1155
contract IERC20
The wrapped token.
data
bytes
The token data.
Returns the wrapped1155 and the data corresponding to the parent market.
Return Values
wrapped1155
contract IERC20
The wrapped token.
data
bytes
The token data.
Returns the number of outcomes. Doesn't include the INVALID_RESULT outcome.
Return Values
[0]
uint256
The number of outcomes.
Helper function to resolve the market.