0xada100874d00e3331d00f2007a9c336a65009718
Solidity v0.8.34+commit.80d5c536
Admin & Risk
Who can change the rules?
Detected pausable and ownable controls from the verified ABI.
Current controls
- Owner
- 0x47ebfac3353314c788b96cdcbf41daadfe03629c ↗ Polygonscan → smarts
Architecture
Polymarket contract role
Polymarket Collateral Adapter
Bridges Polymarket pUSD collateral into the standard Conditional Tokens path used by binary markets.
Overview
Read Functions
Block #89,865,105 · just nowReturns the address of the pUSD collateral token used by this adapter.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | address | Address of the collateral token (pUSD) accepted by the adapter.✨ AI |
Returns the Conditional Tokens contract address used by this Polymarket collateral adapter.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address of the Conditional Tokens contract that the adapter forwards pUSD collateral to.✨ AI |
Return the address of the pUSD collateral token used by this Polymarket collateral adapter.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address of the pUSD collateral token that the adapter exposes to the Conditional Tokens system.✨ AI |
Check whether an account holds all roles specified and return true if it does.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | Account whose roles will be checked.✨ AI |
| roles | uint256 | Bitmask or combined role identifiers to verify the account possesses.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the account holds all specified roles, false otherwise.✨ AI |
Return whether a given user holds any of the specified roles.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | Address to check roles for.✨ AI |
| roles | uint256 | Bitmask of role flags to test; non-zero overlap yields true.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the user holds at least one of the specified roles; otherwise false.✨ AI |
Returns the owner address of the Collateral Adapter contract.✨ AI
Returns
| Name | Type | Description |
|---|---|---|
| result | address | result: address - Owner address with administrative permissions over the adapter.✨ AI |
Returns the timestamp when a pending ownership handover for an account expires.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| pendingOwner | address | Address that requested the ownership handover.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| result | uint256 | Unix timestamp (seconds) when the pending handover expires; 0 if no pending handover.✨ AI |
Check if the adapter is paused for a given address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if the adapter is paused for the provided address, otherwise false.✨ AI |
Return the roles assigned to a user in the Collateral Adapter.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | Address to query roles for.✨ AI |
Returns
| Name | Type | Description |
|---|---|---|
| roles | uint256 | A uint256 bitmask representing the user's roles within the adapter.✨ AI |
ERC-165 interface detection
Parameters
| Name | Type | Description |
|---|---|---|
| interfaceId | bytes4 | - The interface identifier to check |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Write Functions
Adds a new admin
Parameters
| Name | Type | Description |
|---|---|---|
| _admin | address | The address of the new admin |
Cancel a pending ownership handover to prevent the pending account from becoming the owner.✨ AI
Finalize transfer of contract ownership to the pendingOwner address.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| pendingOwner | address | Address proposed to become the new contract owner.✨ AI |
Grants a role bitmask to a user, enabling privileged adapter actions.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | Address that will receive the specified roles.✨ AI |
| roles | uint256 | Bitmask (uint256) encoding one or more roles to grant.✨ AI |
Merges conditional token positions back into collateral
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | bytes32 | |
| _conditionId | bytes32 | The condition ID to merge on |
| — | uint256[] | |
| _amount | uint256 | The amount of each position to merge |
Handles receipt of a batch of ERC1155 tokens.
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256[] | |
| — | uint256[] | |
| — | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes4 | The function selector for acceptance. |
Handles receipt of a single ERC1155 token.
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | address | |
| — | uint256 | |
| — | uint256 | |
| — | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes4 | The function selector for acceptance. |
Pauses the wrapping/unwrapping of a supported asset
Parameters
| Name | Type | Description |
|---|---|---|
| _asset | address | The asset to pause |
Redeems conditional token positions for collateral after resolution
Polymarket context Redeems winning or partially winning outcome tokens after a condition has resolved.
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | bytes32 | |
| _conditionId | bytes32 | The condition ID to redeem |
| — | uint256[] |
Removes an admin
Parameters
| Name | Type | Description |
|---|---|---|
| _admin | address | The address of the admin to remove |
Permanently renounce ownership and remove the owner from the contract.✨ AI
Renounce one or more permission roles held by the caller on this collateral adapter.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| roles | uint256 | Bitmask of roles to renounce from the caller.✨ AI |
Requests an ownership handover to initiate the owner transfer handshake.✨ AI
Revoke specified roles from a user in the adapter so they lose assigned permissions.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| user | address | Address of the account to remove roles from.✨ AI |
| roles | uint256 | Bitmap of roles to revoke from the user (uint256 bitmask).✨ AI |
Splits collateral into conditional token positions
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | bytes32 | |
| _conditionId | bytes32 | The condition ID to split on |
| — | uint256[] | |
| _amount | uint256 | The amount of collateral to split |
Transfers contract ownership to newOwner; payable and callable by the current owner.✨ AI
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | Address to receive ownership.✨ AI |
Unpauses the wrapping/unwrapping of a supported asset
Parameters
| Name | Type | Description |
|---|---|---|
| _asset | address | The asset to unpause |
Events
| Name | Type | Indexed | Description |
|---|---|---|---|
| pendingOwner | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| pendingOwner | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| oldOwner | address | ✓ | |
| newOwner | address | ✓ |
Emitted when wrapping/unwrapping is paused.
| Name | Type | Indexed | Description |
|---|---|---|---|
| asset | address | ✓ | The paused asset address. |
| Name | Type | Indexed | Description |
|---|---|---|---|
| user | address | ✓ | |
| roles | uint256 | ✓ |
Emitted when wrapping/unwrapping is unpaused.
| Name | Type | Indexed | Description |
|---|---|---|---|
| asset | address | ✓ | The unpaused asset address. |