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
  • Market
  • MarketsCount
  • Question
  • MarketQuestion
  • Condition
  • Position
  1. Developers
  2. 🌐 Subgraph

GraphQL Schema

Market

type Market @entity {
  id: ID!
  factory: Bytes!
  creator: Bytes!
  marketName: String!
  rules: String!
  outcomes: [String!]!
  outcomesSupply: BigInt!
  lowerBound: BigInt!
  upperBound: BigInt!
  parentCollectionId: Bytes!
  parentOutcome: BigInt!
  parentMarket: Bytes!
  conditionId: Bytes!
  questionId: Bytes!
  questionsIds: [Bytes!]!
  templateId: BigInt!
  encodedQuestions: [String!]!
  payoutReported: Boolean!
  blockNumber: BigInt!
  blockTimestamp: BigInt!
  transactionHash: Bytes!
  questions: [MarketQuestion!]! @derivedFrom(field: "market")
  openingTs: BigInt!
  hasAnswers: Boolean!
  " finalizeTs is equal to 33260976000 (random big number) if there is any unanswered question, otherwise it contains the finalizeTs value of the lattest question. This allows us to filter multi scalar markets using `finalizeTs > now` for markets with pending answers, and `finalizeTs < now` for markets with pending execution "
  finalizeTs: BigInt!
  questionsInArbitration: BigInt!
  index: BigInt!
}

MarketsCount

type MarketsCount @entity {
  id: ID!
  count: BigInt!
}

Question

type Question @entity {
  id: ID!
  index: Int!
  arbitrator: Bytes!
  opening_ts: BigInt!
  timeout: BigInt!
  finalize_ts: BigInt!
  is_pending_arbitration: Boolean!
  best_answer: Bytes!
  bond: BigInt!
  min_bond: BigInt!
  arbitration_occurred: Boolean!
  markets: [MarketQuestion!]! @derivedFrom(field: "question")
}

MarketQuestion

type MarketQuestion @entity {
  id: ID!
  market: Market!
  question: Question!
  " a market can have the same question multiple times, we use the index to identify each one of them "
  index: Int!
}

Condition

type Condition @entity {
  " Conditional token conditionId "
  id: ID!
  market: Market!
}

Position

type Position @entity {
  " Conditional token positionId "
  id: ID!
  market: Market!
}
PreviousCurateNextSubgraph ID

Last updated 8 months ago