Polymarket Collateral Adapter

Polygon PoS Polymarket 浏览链

0xada100874d00e3331d00f2007a9c336a65009718

Solidity v0.8.34+commit.80d5c536

🤖
通过你的 AI 查询此合约
引用: polymarket-collateral-adapter-polygon 0xada100874d00e3331d00f2007a9c336a65009718
示例提示词: "Tell me the current state of polymarket-collateral-adapter-polygon"
还没有接入 AI?→ mcp.smarts.md · 浏览链

管理与风险

谁能修改规则?

Block #89,919,545

Detected pausable and ownable controls from the verified ABI.

Polymarket 合约治理
让你的 AI 查询谁可以暂停、升级或更改此 Polymarket 合约的角色。
Pausable Ownable

当前控制

Owner
0x47ebfac3353314c788b96cdcbf41daadfe03629c ↗ Polygonscan → smarts

架构

Polymarket 合约角色

Polymarket Collateral Adapter

polymarket-collateral-adapter-polygon

Bridges Polymarket pUSD collateral into the standard Conditional Tokens path used by binary markets.

pUSD Collateral Adapter Conditional Tokens Binary market positions

概览

读取函数
10
写入函数
17
事件
6

读取函数

Block #89,919,545 · just now
COLLATERAL_TOKEN() view → 0xc011a7e12a19f7b1f670d46f03b03f3342e82dfb

Returns the address of the pUSD collateral token used by this adapter.✨ AI

返回值

名称 类型 描述
address Address of the collateral token (pUSD) accepted by the adapter.✨ AI
CONDITIONAL_TOKENS() view → 0x4d97dcd97ec945f40cf65f87097ace5ea0476045

Returns the Conditional Tokens contract address used by this Polymarket collateral adapter.✨ AI

返回值

名称 类型 描述
address The address of the Conditional Tokens contract that the adapter forwards pUSD collateral to.✨ AI
USDCE() view → 0x2791bca1f2de4661ed88a30c99a7a9449aa84174

Return the address of the pUSD collateral token used by this Polymarket collateral adapter.✨ AI

返回值

名称 类型 描述
address The address of the pUSD collateral token that the adapter exposes to the Conditional Tokens system.✨ AI
hasAllRoles(user: address, roles: uint256) view

Check whether an account holds all roles specified and return true if it does.✨ AI

开发者: Returns whether `user` has all of `roles`.

参数

名称 类型 描述
user address Account whose roles will be checked.✨ AI
roles uint256 Bitmask or combined role identifiers to verify the account possesses.✨ AI

返回值

名称 类型 描述
bool True if the account holds all specified roles, false otherwise.✨ AI
hasAnyRole(user: address, roles: uint256) view

Return whether a given user holds any of the specified roles.✨ AI

开发者: Returns whether `user` has any of `roles`.

参数

名称 类型 描述
user address Address to check roles for.✨ AI
roles uint256 Bitmask of role flags to test; non-zero overlap yields true.✨ AI

返回值

名称 类型 描述
bool True if the user holds at least one of the specified roles; otherwise false.✨ AI
owner() view → 0x47ebfac3353314c788b96cdcbf41daadfe03629c

Returns the owner address of the Collateral Adapter contract.✨ AI

开发者: Returns the owner of the contract.

返回值

名称 类型 描述
result address result: address - Owner address with administrative permissions over the adapter.✨ AI
ownershipHandoverExpiresAt(pendingOwner: address) view

Returns the timestamp when a pending ownership handover for an account expires.✨ AI

开发者: Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.

参数

名称 类型 描述
pendingOwner address Address that requested the ownership handover.✨ AI

返回值

名称 类型 描述
result uint256 Unix timestamp (seconds) when the pending handover expires; 0 if no pending handover.✨ AI
paused(address) view

Check if the adapter is paused for a given address.✨ AI

参数

名称 类型 描述
address

返回值

名称 类型 描述
bool True if the adapter is paused for the provided address, otherwise false.✨ AI
rolesOf(user: address) view

Return the roles assigned to a user in the Collateral Adapter.✨ AI

开发者: Returns the roles of `user`.

参数

名称 类型 描述
user address Address to query roles for.✨ AI

返回值

名称 类型 描述
roles uint256 A uint256 bitmask representing the user's roles within the adapter.✨ AI
supportsInterface(interfaceId: bytes4) pure

ERC-165 interface detection

参数

名称 类型 描述
interfaceId bytes4 - The interface identifier to check

返回值

名称 类型 描述
bool

写入函数

addAdmin(_admin: address) nonpayable

Adds a new admin

参数

名称 类型 描述
_admin address The address of the new admin
cancelOwnershipHandover() payable

Cancel a pending ownership handover to prevent the pending account from becoming the owner.✨ AI

开发者: Cancels the two-step ownership handover to the caller, if any.
completeOwnershipHandover(pendingOwner: address) payable

Finalize transfer of contract ownership to the pendingOwner address.✨ AI

开发者: Allows the owner to complete the two-step ownership handover to `pendingOwner`. Reverts if there is no existing ownership handover requested by `pendingOwner`.

参数

名称 类型 描述
pendingOwner address Address proposed to become the new contract owner.✨ AI
grantRoles(user: address, roles: uint256) payable

Grants a role bitmask to a user, enabling privileged adapter actions.✨ AI

开发者: Allows the owner to grant `user` `roles`. If the `user` already has a role, then it will be an no-op for the role.

参数

名称 类型 描述
user address Address that will receive the specified roles.✨ AI
roles uint256 Bitmask (uint256) encoding one or more roles to grant.✨ AI
mergePositions(address, bytes32, _conditionId: bytes32, uint256[], _amount: uint256) nonpayable

Merges conditional token positions back into collateral

开发者: Unnamed params retained for IConditionalTokens interface compatibility

参数

名称 类型 描述
address
bytes32
_conditionId bytes32 The condition ID to merge on
uint256[]
_amount uint256 The amount of each position to merge
onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) nonpayable

Handles receipt of a batch of ERC1155 tokens.

参数

名称 类型 描述
address
address
uint256[]
uint256[]
bytes

返回值

名称 类型 描述
bytes4 The function selector for acceptance.
onERC1155Received(address, address, uint256, uint256, bytes) nonpayable

Handles receipt of a single ERC1155 token.

参数

名称 类型 描述
address
address
uint256
uint256
bytes

返回值

名称 类型 描述
bytes4 The function selector for acceptance.
pause(_asset: address) nonpayable

Pauses the wrapping/unwrapping of a supported asset

开发者: The caller must have the ADMIN_ROLE role

参数

名称 类型 描述
_asset address The asset to pause
redeemPositions(address, bytes32, _conditionId: bytes32, uint256[]) nonpayable

Redeems conditional token positions for collateral after resolution

Polymarket 上下文 Redeems winning or partially winning outcome tokens after a condition has resolved.

开发者: Unnamed params retained for IConditionalTokens interface compatibility

参数

名称 类型 描述
address
bytes32
_conditionId bytes32 The condition ID to redeem
uint256[]
removeAdmin(_admin: address) nonpayable

Removes an admin

参数

名称 类型 描述
_admin address The address of the admin to remove
renounceOwnership() payable

Permanently renounce ownership and remove the owner from the contract.✨ AI

开发者: Allows the owner to renounce their ownership.
renounceRoles(roles: uint256) payable

Renounce one or more permission roles held by the caller on this collateral adapter.✨ AI

开发者: Allow the caller to remove their own roles. If the caller does not have a role, then it will be an no-op for the role.

参数

名称 类型 描述
roles uint256 Bitmask of roles to renounce from the caller.✨ AI
requestOwnershipHandover() payable

Requests an ownership handover to initiate the owner transfer handshake.✨ AI

开发者: Request a two-step ownership handover to the caller. The request will automatically expire in 48 hours (172800 seconds) by default.
revokeRoles(user: address, roles: uint256) payable

Revoke specified roles from a user in the adapter so they lose assigned permissions.✨ AI

开发者: Allows the owner to remove `user` `roles`. If the `user` does not have a role, then it will be an no-op for the role.

参数

名称 类型 描述
user address Address of the account to remove roles from.✨ AI
roles uint256 Bitmap of roles to revoke from the user (uint256 bitmask).✨ AI
splitPosition(address, bytes32, _conditionId: bytes32, uint256[], _amount: uint256) nonpayable

Splits collateral into conditional token positions

开发者: Unnamed params retained for IConditionalTokens interface compatibility

参数

名称 类型 描述
address
bytes32
_conditionId bytes32 The condition ID to split on
uint256[]
_amount uint256 The amount of collateral to split
transferOwnership(newOwner: address) payable

Transfers contract ownership to newOwner; payable and callable by the current owner.✨ AI

开发者: Allows the owner to transfer the ownership to `newOwner`.

参数

名称 类型 描述
newOwner address Address to receive ownership.✨ AI
unpause(_asset: address) nonpayable

Unpauses the wrapping/unwrapping of a supported asset

开发者: The caller must have the ADMIN_ROLE role

参数

名称 类型 描述
_asset address The asset to unpause

事件

OwnershipHandoverCanceled(pendingOwner: address)
名称 类型 已索引 描述
pendingOwner address
OwnershipHandoverRequested(pendingOwner: address)
名称 类型 已索引 描述
pendingOwner address
OwnershipTransferred(oldOwner: address, newOwner: address)
名称 类型 已索引 描述
oldOwner address
newOwner address
Paused(asset: address)

Emitted when wrapping/unwrapping is paused.

名称 类型 已索引 描述
asset address The paused asset address.
RolesUpdated(user: address, roles: uint256)
名称 类型 已索引 描述
user address
roles uint256
Unpaused(asset: address)

Emitted when wrapping/unwrapping is unpaused.

名称 类型 已索引 描述
asset address The unpaused asset address.