CTWrapper Interaction Guide
TheCTWrapper is the primary entry point for converting Conditional Tokens (ERC1155) into tradeable ERC20 assets. This guide covers the key interactions for developers.
Contract Addresses
For deployment addresses, please refer to the Deployments page.Key Methods
1. Wrapping Tokens
To wrap tokens, you must first have the underlying ERC1155 tokens from the Conditional Tokens Framework.conditionId: The unique identifier of the condition (question).amounts: An array of amounts to wrap for each outcome slot.
2. Unwrapping Tokens
Unwrapping burns the ERC20 tokens and returns the underlying ERC1155s.unwrap typically unwraps a specific amount of all outcome tokens associated with that condition back to the user’s wallet.
3. Deploying Converted Tokens
Before a condition can be traded, its ERC20 representations must be deployed.- Determinism: This uses
CREATE3, so the address is deterministic based on theconditionId. - First Settler: The first person to call this sets the name/symbol, but the address is constant.
Event Listeners
Listen forTokenDeployed events to discover new markets.

