Polymarket UMA Adapter

Polygon PoS Polymarket

0x2f5e3684cb1f318ec51b00edba38d79ac2c0aa9d

Solidity v0.8.15+commit.e14f2714

🤖
透過你的 AI 查詢此合約
參考: polymarket-uma-adapter-v3-polygon 0x2f5e3684cb1f318ec51b00edba38d79ac2c0aa9d
範例提示詞: "Tell me the current state of polymarket-uma-adapter-v3-polygon"
還沒有接入 AI?→ mcp.smarts.md

管理與風險

誰能修改規則?

Detected pausable controls from the verified ABI.

Polymarket 合約治理
讓你的 AI 查詢誰可以暫停、升級或更改此 Polymarket 合約的角色。
Pausable

架構

Polymarket 合約角色

Polymarket UMA Adapter

polymarket-uma-adapter-v3-polygon

Connects Polymarket questions to UMA's optimistic oracle, including initialization, disputes, and final answers.

Question initialized Answer proposed Dispute window Question resolved CTF payout

概覽

讀取函式
17
寫入函式
13
事件
11

讀取函式

Block #87,444,172 · just now
EMERGENCY_SAFETY_PERIOD() view → 172,800

Return 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
MAX_ANCILLARY_DATA() view → 8,139

Return the maximum allowed ancillary data size for UMA oracle requests.✨ AI

回傳值

名稱 類型 描述
uint256 Maximum allowed ancillary data length in bytes (uint256).✨ AI
YES_OR_NO_IDENTIFIER() view → 0x5945535f4f525f4e4f5f51554552590000000000000000000000000000000000

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
admins(address) view

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
collateralWhitelist() view → 0x1020ae36548ab28bc0c41fd2a08d24132c82cc55

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
ctf() view → 0x71523d0f655b41e805cec45b17163f528b59b820

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
getExpectedPayouts(questionID: bytes32) view

Retrieves the expected payout array of the question

參數

名稱 類型 描述
questionID bytes32 - The unique questionID of the question

回傳值

名稱 類型 描述
uint256[]
getLatestUpdate(questionID: bytes32, owner: address) view

Gets the latest update for a questionID and owner

參數

名稱 類型 描述
questionID bytes32 - The unique questionID
owner address - The address of the question initializer

回傳值

名稱 類型 描述
tuple
getQuestion(questionID: bytes32) view

Gets the QuestionData for the given questionID

參數

名稱 類型 描述
questionID bytes32 - The unique questionID

回傳值

名稱 類型 描述
tuple
getUpdates(questionID: bytes32, owner: address) view

Gets all updates for a questionID and owner

參數

名稱 類型 描述
questionID bytes32 - The unique questionID
owner address - The address of the question initializer

回傳值

名稱 類型 描述
tuple[]
isAdmin(addr: address) view

Checks if an address is an admin

參數

名稱 類型 描述
addr address - The address to be checked

回傳值

名稱 類型 描述
bool
isFlagged(questionID: bytes32) view

Checks if a question has been flagged for emergency resolution

參數

名稱 類型 描述
questionID bytes32 - The unique questionID

回傳值

名稱 類型 描述
bool
isInitialized(questionID: bytes32) view

Checks if a question is initialized

參數

名稱 類型 描述
questionID bytes32 - The unique questionID

回傳值

名稱 類型 描述
bool
optimisticOracle() view → 0xee3afe347d5c74317041e2618c49534daf887c24

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
questions(bytes32) view

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
ready(questionID: bytes32) view

Checks whether a questionID is ready to be resolved

參數

名稱 類型 描述
questionID bytes32 - The unique questionID

回傳值

名稱 類型 描述
bool
updates(bytes32, uint256) view

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

寫入函式

addAdmin(admin: address) nonpayable

Adds an Admin

參數

名稱 類型 描述
admin address - The address of the admin
emergencyResolve(questionID: bytes32, payouts: uint256[]) nonpayable

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
flag(questionID: bytes32) nonpayable

Flags a market for emergency resolution

參數

名稱 類型 描述
questionID bytes32 - The unique questionID of the question
initialize(ancillaryData: bytes, rewardToken: address, reward: uint256, proposalBond: uint256, liveness: uint256) nonpayable

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
pause(questionID: bytes32) nonpayable

Allows an admin to pause market resolution in an emergency

參數

名稱 類型 描述
questionID bytes32 - The unique questionID of the question
postUpdate(questionID: bytes32, update: bytes) nonpayable

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
priceDisputed(bytes32, uint256, ancillaryData: bytes, uint256) nonpayable

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
removeAdmin(admin: address) nonpayable

Removes an admin

參數

名稱 類型 描述
admin address - The address of the admin to be removed
renounceAdmin() nonpayable

Renounces Admin privileges from the caller

reset(questionID: bytes32) nonpayable

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
resolve(questionID: bytes32) nonpayable

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
unflag(questionID: bytes32) nonpayable

Unflags a market for emergency resolution

參數

名稱 類型 描述
questionID bytes32 - The unique questionID of the question
unpause(questionID: bytes32) nonpayable

Allows an admin to unpause market resolution in an emergency

參數

名稱 類型 描述
questionID bytes32 - The unique questionID of the question

事件

AncillaryDataUpdated(questionID: bytes32, owner: address, update: bytes)

Emitted when an ancillary data update is posted

名稱 類型 已索引 描述
questionID bytes32
owner address
update bytes
NewAdmin(admin: address, newAdminAddress: address)

Emitted when a new admin is added

名稱 類型 已索引 描述
admin address
newAdminAddress address
QuestionEmergencyResolved(questionID: bytes32, payouts: uint256[])

Emitted when a question is emergency resolved

名稱 類型 已索引 描述
questionID bytes32
payouts uint256[]
QuestionFlagged(questionID: bytes32)

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
QuestionInitialized(questionID: bytes32, requestTimestamp: uint256, creator: address, ancillaryData: bytes, rewardToken: address, reward: uint256, proposalBond: uint256)

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
QuestionPaused(questionID: bytes32)

Emitted when a question is paused by an authorized user

名稱 類型 已索引 描述
questionID bytes32
QuestionReset(questionID: bytes32)

Emitted when a question is reset

名稱 類型 已索引 描述
questionID bytes32
QuestionResolved(questionID: bytes32, settledPrice: int256, payouts: uint256[])

Emitted when a question is resolved

Polymarket 上下文 The UMA adapter finalized an answer and can drive market settlement.

名稱 類型 已索引 描述
questionID bytes32
settledPrice int256
payouts uint256[]
QuestionUnflagged(questionID: bytes32)

Emitted when a question is unflagged by an admin

名稱 類型 已索引 描述
questionID bytes32
QuestionUnpaused(questionID: bytes32)

Emitted when a question is unpaused by an authorized user

名稱 類型 已索引 描述
questionID bytes32
RemovedAdmin(admin: address, removedAdmin: address)

Emitted when an admin is removed

名稱 類型 已索引 描述
admin address
removedAdmin address