Seer documentation
  • Overview
    • 📘 What is Seer?
    • 📚 Glossary
  • Getting Started
    • 💡 Wallet and network
    • 💰 Deposit tokens
      • On Ethereum
        • Deposit DAI
        • Deposit sDAI
      • On Gnosis
        • Deposit xDAI
        • Deposit wxDAI or sDAI
    • 🧭 Navigate Our Site
      • Create a market
      • Verify market
      • Mint, merge, redeem outcome tokens
      • Buy, sell outcome tokens
      • Report answer
      • Raise a dispute
      • Resolve market
      • Provide Liquidity
      • Conditional Markets
      • Futarchy Markets
  • Developers
    • 📝 Intro
    • 🔄 Diagrams
      • Seer overall interaction
      • Create Market
      • Split, Merge, Redeem
      • Question and Resolve
    • 🔗 Interact with Seer
      • Create a market
      • Resolve a market
      • Split, Merge and Redeem
      • Market example
      • Conditional market
      • Futarchy market
    • 📜 Contracts
      • Core
        • MarketFactory
        • Market
        • MarketView
        • Router
        • GnosisRouter
        • MainnetRouter
        • RealityProxy
        • Interfaces
      • Futarchy (test)
        • FutarchyFactory
        • FutarchyProposal
        • FutarchyRouter
        • FutarchyRealityProxy
      • Token
        • Seer
      • Interaction
        • 1155-to-20
          • Wrapped1155Factory
        • conditional-tokens
          • ERC1155
            • ERC1155
            • ERC1155TokenReceiver
            • IERC1155
            • IERC1155TokenReceiver
          • ConditionalTokens
          • CTHelpers
        • cross-chain-realitio-proxy
          • dependencies
            • IAMB
            • RealitioInterface
          • ArbitrationProxyInterfaces
          • RealitioForeignArbitrationProxyWithAppeals
          • RealitioHomeArbitrationProxy
        • reality
          • RealityETH-3.0
        • sDAI-on-Gnosis
          • interfaces
            • IBridgeInterestReceiver
            • IWXDAI
          • periphery
            • SavingsXDaiAdapter
          • SavingsXDai
      • Deployed contracts
    • 🌐 Subgraph
      • Query Examples
      • GraphQl Query
        • Market
        • Swapr
        • Curate
      • GraphQL Schema
      • Subgraph ID
  • OTHER
    • 🔍 Audit Reports
Powered by GitBook
On this page
  • Variables
  • P
  • B
  • Functions
  • getConditionId
  • getCollectionId
  • getPositionId
  1. Developers
  2. 📜 Contracts
  3. Interaction
  4. conditional-tokens

CTHelpers

Variables

P

uint256 P

B

uint256 B

Functions

getConditionId

function getConditionId(address oracle, bytes32 questionId, uint256 outcomeSlotCount) internal pure returns (bytes32)

Constructs a condition ID from an oracle, a question ID, and the outcome slot count for the question.

Parameters

Name
Type
Description

oracle

address

The account assigned to report the result for the prepared condition.

questionId

bytes32

An identifier for the question to be answered by the oracle.

outcomeSlotCount

uint256

The number of outcome slots which should be used for this condition. Must not exceed 256.

getCollectionId

function getCollectionId(bytes32 parentCollectionId, bytes32 conditionId, uint256 indexSet) internal view returns (bytes32)

Constructs an outcome collection ID from a parent collection and an outcome collection.

Parameters

Name
Type
Description

parentCollectionId

bytes32

Collection ID of the parent outcome collection, or bytes32(0) if there's no parent.

conditionId

bytes32

Condition ID of the outcome collection to combine with the parent outcome collection.

indexSet

uint256

Index set of the outcome collection to combine with the parent outcome collection.

getPositionId

function getPositionId(contract IERC20 collateralToken, bytes32 collectionId) internal pure returns (uint256)

Constructs a position ID from a collateral token and an outcome collection. These IDs are used as the ERC-1155 ID for this contract.

Parameters

Name
Type
Description

collateralToken

contract IERC20

Collateral token which backs the position.

collectionId

bytes32

ID of the outcome collection associated with this position.

PreviousConditionalTokensNextcross-chain-realitio-proxy

Last updated 8 months ago