Polymarket UMA Adapter
Polygon PoS Polymarket0x2f5e3684cb1f318ec51b00edba38d79ac2c0aa9d
Solidity v0.8.15+commit.e14f2714
管理与风险
谁能修改规则?
Detected pausable controls from the verified ABI.
架构
Polymarket 合约角色
Polymarket UMA Adapter
Connects Polymarket questions to UMA's optimistic oracle, including initialization, disputes, and final answers.
概览
读取函数
Block #87,444,172 · just nowReturn the contract's emergency safety period in seconds.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Duration of the emergency safety period, in seconds, used to limit actions during emergency scenarios.✨ AI |
Return the maximum allowed ancillary data size for UMA oracle requests.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Maximum allowed ancillary data length in bytes (uint256).✨ AI |
Returns the UMA identifier the adapter uses for yes/no (binary) questions.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 | bytes32 UMA identifier used to represent the Yes/No (binary) outcome for oracle requests.✨ AI |
Get the stored admin value for the specified address.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256 | Unsigned integer stored for that address in admins mapping representing admin state.✨ AI |
Returns the address of the collateral whitelist used to validate allowed collateral.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address of the collateral whitelist contract used to verify allowed collateral tokens.✨ AI |
Returns the address of the CTF contract used for final payout and claim processing.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | The address of the CTF contract that receives payouts and handles claims.✨ AI |
Retrieves the expected payout array of the question
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | uint256[] |
Gets the latest update for a questionID and owner
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
| owner | address | - The address of the question initializer |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | tuple |
Gets the QuestionData for the given questionID
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | tuple |
Gets all updates for a questionID and owner
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
| owner | address | - The address of the question initializer |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | tuple[] |
Checks if an address is an admin
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| addr | address | - The address to be checked |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
Checks if a question has been flagged for emergency resolution
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
Checks if a question is initialized
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
Returns the address of the UMA optimistic oracle used by this adapter.✨ AI
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | address | Address of the UMA optimistic oracle contract used for proposals, disputes, and final answers.✨ AI |
Return metadata and current status for a Polymarket UMA question identified by a bytes32 id.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| requestTimestamp | uint256 | requestTimestamp: uint256 - timestamp when the UMA request for this question was created✨ AI |
| reward | uint256 | reward: uint256 - amount offered as reward for providing the answer✨ AI |
| proposalBond | uint256 | proposalBond: uint256 - bond required to propose an answer to the UMA oracle✨ AI |
| liveness | uint256 | liveness: uint256 - dispute liveness period in seconds for proposed answers✨ AI |
| emergencyResolutionTimestamp | uint256 | emergencyResolutionTimestamp: uint256 - timestamp after which emergency resolution is allowed✨ AI |
| resolved | bool | resolved: bool - whether the question has a final resolved answer✨ AI |
| paused | bool | paused: bool - whether question actions are currently paused✨ AI |
| reset | bool | reset: bool - whether the question has been reset after a dispute✨ AI |
| refund | bool | refund: bool - whether the reward is eligible for refunding✨ AI |
| rewardToken | address | rewardToken: address - ERC20 token address used for the reward (zero address for ETH)✨ AI |
| creator | address | creator: address - address that created the question✨ AI |
| ancillaryData | bytes | ancillaryData: bytes - ancillary data submitted to the UMA optimistic oracle✨ AI |
Checks whether a questionID is ready to be resolved
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bool |
Fetch the latest UMA optimistic oracle update for a given Polymarket question.✨ AI
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 | |
| — | uint256 |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| timestamp | uint256 | timestamp: Unix timestamp of the returned update.✨ AI |
| update | bytes | update: ABI-encoded update payload containing the answer and related metadata.✨ AI |
写入函数
Adds an Admin
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| admin | address | - The address of the admin |
Allows an admin to resolve a CTF market in an emergency
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
| payouts | uint256[] | - Array of position payouts for the referenced question |
Flags a market for emergency resolution
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
Initializes a question Atomically adds the question to the Adapter, prepares it on the ConditionalTokens Framework and requests a price from the OO. If a reward is provided, the caller must have approved the Adapter as spender and have enough rewardToken to pay for the price request. Prepares the condition using the Adapter as the oracle and a fixed outcome slot count = 2.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| ancillaryData | bytes | - Data used to resolve a question |
| rewardToken | address | - ERC20 token address used for payment of rewards and fees |
| reward | uint256 | - Reward offered to a successful OO proposer. Must be chosen carefully, to properly economically incentize OO proposers. |
| proposalBond | uint256 | - Bond required to be posted by OO proposers/disputers. If 0, the default OO bond is used. Must be chosen carefully, to properly economically incentize OO proposers and disputers. Questions expected to secure a large amount of value should consider a larger proposal bond. |
| liveness | uint256 | - OO liveness period in seconds. If 0, the default liveness period of 2 hours is used. Must be chosen carefully, depending on the value backed by the question. Questions expected to secure a large amount of value should consider a longer liveness period. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 |
Allows an admin to pause market resolution in an emergency
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
Post an update for the question Anyone can post an update for any questionID, but users should only consider updates posted by the question creator
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
| update | bytes | - The update for the question |
Callback which is executed on dispute Resets the question and sends out a new price request to the OO
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| — | bytes32 | |
| — | uint256 | |
| ancillaryData | bytes | - Ancillary data of the request |
| — | uint256 |
Removes an admin
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| admin | address | - The address of the admin to be removed |
Renounces Admin privileges from the caller
Allows an admin to reset a question, sending out a new price request to the OO. Failsafe to be used if the priceDisputed callback reverts during execution.
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID |
Resolves a question Pulls price information from the OO and resolves the underlying CTF market. Reverts if price is not available on the OO Resets the question if the price returned by the OO is the Ignore price
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
Unflags a market for emergency resolution
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
Allows an admin to unpause market resolution in an emergency
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| questionID | bytes32 | - The unique questionID of the question |
事件
Emitted when an ancillary data update is posted
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ | |
| owner | address | ✓ | |
| update | bytes |
Emitted when a new admin is added
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| admin | address | ✓ | |
| newAdminAddress | address | ✓ |
Emitted when a question is emergency resolved
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ | |
| payouts | uint256[] |
Emitted when a question is flagged by an admin for emergency resolution
Polymarket 上下文 A UMA question was flagged for review, the on-chain signal Polymarket uses for disputed or abnormal resolution flow.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ |
Emitted when a questionID is initialized
Polymarket 上下文 A market question entered the UMA adapter resolution flow.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ | |
| requestTimestamp | uint256 | ✓ | |
| creator | address | ✓ | |
| ancillaryData | bytes | ||
| rewardToken | address | ||
| reward | uint256 | ||
| proposalBond | uint256 |
Emitted when a question is paused by an authorized user
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ |
Emitted when a question is reset
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ |
Emitted when a question is resolved
Polymarket 上下文 The UMA adapter finalized an answer and can drive market settlement.
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ | |
| settledPrice | int256 | ✓ | |
| payouts | uint256[] |
Emitted when a question is unflagged by an admin
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ |
Emitted when a question is unpaused by an authorized user
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| questionID | bytes32 | ✓ |
Emitted when an admin is removed
| 名称 | 类型 | 已索引 | 描述 |
|---|---|---|---|
| admin | address | ✓ | |
| removedAdmin | address | ✓ |