IUmaCtfAdapter interface defines the main contract interface for interacting with the UMA CTF Adapter, which bridges UMA’s Optimistic Oracle with Gnosis Conditional Tokens Framework.
Structs
QuestionData
Contains all metadata and state for a question/market.Fields
requestTimestamp- Request timestamp, set when a request is made to the Optimistic Oracle. Used to identify the request and NOT used by the DVM to determine validity.reward- Reward offered to a successful proposer.proposalBond- Additional bond required by Optimistic oracle proposers/disputers.liveness- Custom liveness period.manualResolutionTimestamp- Manual resolution timestamp, set when a market is flagged for manual resolution.resolved- Flag marking whether a question is resolved.paused- Flag marking whether a question is paused.reset- Flag marking whether a question has been reset. A question can only be reset once.refund- Flag marking whether a question’s reward should be refunded.rewardToken- ERC20 token address used for payment of rewards, proposal bonds and fees.creator- The address of the question creator.ancillaryData- Data used to resolve a condition.
Functions
initialize
Initializes a new question and makes a price request to the Optimistic Oracle.Parameters
ancillaryData- Data used to resolve a condition.rewardToken- ERC20 token address used for payment of rewards, proposal bonds and fees.reward- Reward offered to a successful proposer.proposalBond- Additional bond required by Optimistic oracle proposers/disputers.liveness- Custom liveness period for the request.
Returns
bytes32- The question ID.
ready
Checks if a question is ready to be resolved.Parameters
questionID- The ID of the question to check.
Returns
bool- True if the question is ready to be resolved.
resolve
Resolves a question and reports the payout to the Conditional Tokens contract.Parameters
questionID- The ID of the question to resolve.
flag
Flags a question for manual resolution by an admin.Parameters
questionID- The ID of the question to flag.
reset
Resets a question, allowing it to be re-initialized. A question can only be reset once.Parameters
questionID- The ID of the question to reset.
pause
Pauses a question, preventing resolution.Parameters
questionID- The ID of the question to pause.
unpause
Unpauses a previously paused question.Parameters
questionID- The ID of the question to unpause.
getQuestion
Retrieves the question data for a given question ID.Parameters
questionID- The ID of the question to retrieve.
Returns
QuestionData- The question data struct.