Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.signalium.site/llms.txt

Use this file to discover all available pages before exploring further.

Source: packages/subgraph/ Indexes:
  • MarketCreated and MarketYieldDeployed from MarketFactory → creates a Market entity, attaches treasury + gimoAdapter.
  • PositionTaken, Claimed, MarketResolved, MarketVoided, ResolutionPending from each PredictionMarket clone (template).
  • YieldSnapshotted and HouseWithdrawn for per-market and protocol-wide yield totals.
  • ResolutionSubmitted from AIResolver for audit trails.
The API (apps/api) prefers the subgraph for /markets reads (one round-trip per page, fully hydrated, with rolling counters) and falls back to direct chain reads when GOLDSKY_GRAPHQL_URL is unset.

Deploy

cd packages/subgraph
goldsky login
pnpm deploy:goldsky
pnpm tag:goldsky-prod
The prod tag is what GOLDSKY_GRAPHQL_URL points at. Bump version in package.json before each deploy so older versions aren’t overwritten.

Querying

Production endpoint: https://api.goldsky.com/api/public/project_cmioox8y90t7401znbgia8tcm/subgraphs/signalium/prod/gn. Example — list the 5 most recent yield-enabled markets:
{
  markets(first: 5, orderBy: createdAt, orderDirection: desc) {
    id
    question
    treasury
    gimoAdapter
    yesPool
    noPool
    yieldSnapshotted
    bettorsYieldShare
    protocolYieldShare
  }
  protocolStats(id: "protocol") {
    marketCount
    totalYieldEarned
    totalProtocolYieldShare
    totalHouseWithdrawn
  }
}
See packages/subgraph/README.md for the full schema reference.