Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Subgraph

The subgraph indexes all slot deployments, ownership transitions, tax events, and metadata updates.

Endpoints

NetworkEndpoint
Base Mainnethttps://gateway.thegraph.com/api/subgraphs/id/4sZrdv1SFzN4KzE9jiWDRuUyM4CnCrmvQ54Rv1s65qUq
Base Sepoliahttps://gateway.thegraph.com/api/subgraphs/id/Z361DLoMdPh9WAopH7shJP8WoXYAB9XeKrLUCTYjdZR

Key Entities

EntityKey Fields
Slotid, recipient, currency, occupant, price, deposit, taxPercentage, collectedTax, totalCollected, createdAt, metadata
Accountid, type (EOA/CONTRACT/DELEGATED/SPLIT), slotCount, occupiedCount, slotsAsRecipient, slotsAsOccupant
Currencyid, name, symbol, decimals
Moduleid, name, version, verified
MetadataSlotid, uri, rawJson, adType, updatedBy, updateCount

Event Entities

All events include slot, timestamp, blockNumber, and tx.

EntityKey Fields
BoughtEventbuyer, previousOccupant, price, selfAssessedPrice
ReleasedEventoccupant, refund
LiquidatedEventliquidator, occupant, bounty
SettledEventtaxOwed, taxPaid, depositRemaining
TaxCollectedEventrecipient, amount
PriceUpdatedEventoldPrice, newPrice
MetadataUpdatedEventauthor, uri, rawJson, adType

Example Queries

List Slots

{
  slots(first: 10, orderBy: createdAt, orderDirection: desc) {
    id
    recipient
    occupant
    price
    deposit
    taxPercentage
    currency { symbol decimals }
    module { name verified }
    createdAt
  }
}

Slot Activity

query GetSlotActivity($slot: String!) {
  boughtEvents(where: { slot: $slot }, orderBy: timestamp, orderDirection: desc) {
    buyer
    price
    selfAssessedPrice
    timestamp
  }
  releasedEvents(where: { slot: $slot }, orderBy: timestamp, orderDirection: desc) {
    occupant
    refund
    timestamp
  }
  liquidatedEvents(where: { slot: $slot }, orderBy: timestamp, orderDirection: desc) {
    liquidator
    bounty
    timestamp
  }
}

SDK equivalent: await client.getSlotActivity({ slot: "0x..." })

Account Lookup

query GetAccount($id: ID!) {
  account(id: $id) {
    id
    type
    slotCount
    occupiedCount
    slotsAsRecipient { id price totalCollected }
    slotsAsOccupant { id price deposit }
  }
}