Skip to main content

Entities


You can begin making queries in our hosted GraphQL playground on both Ethereum Mainnet and Rinkeby.

Ethereum Data#

The ZORA Indexer stores the raw data for Transactions and Event Logs that it finds "interesting", namely transactions that interact with the ZORA Protocol or that result in a transfer of an ERC-721 NFT.

Transaction#

{  Transaction {    # Fields    blockHash    blockNumber    blockTimestamp    failureReason    from    gas    gasPrice    hash    input    network    nonce    status    to    transactionIndex    value
    # Relationships    eventLogs    <event table name>Events # i.e. auctionApprovalUpdatedEvents)    mediaMints # see MediaMint table for context  }}

Event Log#

{  EventLog {    # Fields    address    blockHash    blockNumber    blockTimestamp    data    id # format: <transactionHash>-<logIndex> i.e. 0xbd7c2c6e978cc78e826ddc9404c769b6151cf762ac43e78bafade98b7d3dd5e1-24    logIndex    topics    transactionHash
    # Relationships    <event table name>Event # i.e. auctionApprovalUpdatedEvent    mediaMints # see MediaMint table for context    transaction  }}

Aggregated Tables#

The Indexer keeps track of aggregated tables that represent the most up to date state of an object. At any block number, the aggregate view will mirror the view of the object on the blockchain. Token, Media, and Auction are the three aggregate tables.

Token#

Non ZORA ERC-721 NFTs

{  Token {    # Fields    address # contract address    id # format: <address>-<tokenId> i.e. 0x7C2668BD0D3c050703CEcC956C11Bd520c26f7d4-241    metadataId # this is a uuid to make the metadata relationship possible    mintTransferEventId # same format as EventLog id, to make mintTransferEvent relationship possible    minter # same as mintTransferEvent.to    name    owner    supportsMetadata    symbol    tokenId    tokenURI
    # Relationships    auctions # all Auctions for this token    <event table name>Event # i.e. auctionApprovalUpdatedEvent    media # ZORA Media info (only available for ZORA NFTs)    metadata # metadata json blob, if exists    mintTransferEvent # TokenTransferEvent where .from is the 0x00... address    tokenContract # TokenContract has information like name and symbol    transferEvents # all TokenTransferEvents  }}

Media#

ZORA NFTs - view Media.sol for context

{  Media {    # Fields    address # always the same contract address, makes many relationships possible    contentHash    contentURI    creator    creatorBidShare    metadataHash    metadataURI    mintTransferEventId    owner    ownerBidShare    prevOwner    prevOwnerBidShare    tokenId
    # Relationships    askEvents # array of MarketAskEvents    asks # array of MarketAsks    auctions # array of Auctions for this token    bidEvents # array of MarketBidEvents    bids # array of MarketBids    metadata # metadata json blob    token # Token    tokenMetadataURIUpdatedEvents # array of MediaTokenMetadataURIUpdatedEvents    tokenURIUpdatedEvents # array of MediaTokenURIUpdatedEvents    transferEvents # array of TokenTransferEvents  }}

Auction#

ZORA Auction House - view AuctionHouse.sol contract for more context

# many Auction fields and relationships can be null depending on the state of the auction{  Auction {    # Fields    amountTokenOwnerReceived    approved    auctionCurrency    auctionId    curator    curatorFee    curatorFeePercentage    duration # always current with AuctionDurationExtended events    expiresAt - firstBidTime + current duration    firstBidTime    lastBidAmount    lastBidder    reservePrice    tokenContract    tokenId    tokenOwner    winner
    # Relationships    approvalEvents # array of AuctionApprovalEvents    bidEvents # array of AuctionBidEvents    canceledEvent # single AuctionCanceledEvent    createdEvent # single AuctionCreatedEvent    durationExtendedEvents # array of AuctionDurationExtendedEvents    endedEvent # single AuctionEndedEvent    media # single Media object if the token is a ZORA NFT    reservePriceUpdatedEvents # array of AuctionReservePriceUpdatedEvents    token # single Token object  }}

Event Tables#

Protocol event tables are generally named by the following format:

<contract name><exact name for the event>Event.

  • ZORA's Auction House events have the prefix Auction
  • ZORA Media and Market events have prefixes Media and Market
  • Generic ERC-721 events have the prefix Token.

The field names should match the specific contract event field names (exception: a struct in an event will be flattened into all the struct field names), plus there are several other useful fields that all Event tables share.

# ZORA AuctionHouse AuctionBid event - see contract for more context
{  AuctionBidEvent {    # common Event fields    address # contract that emitted event    blockNumber    blockTimestamp    eventLogId    id # same format as EventLog, so same as eventLogId    logIndex    transactionHash
    # event-specific fields    auctionId    extended    firstBid    sender    tokenContract    tokenId    value
    # common Event relationships    eventLog    transaction    media    token
    # event-specific relationships    auction # all Auction__ events have this  }}

Other Tables#

TokenContract is how the Indexer keeps track of the contracts it is monitoring.

{  TokenContract {    # fields    address    deployedAtBlockNumber    name    supportsMetadata # supports ERC721Metadata standard    symbol  }}

TokenMetadata stores a metadata JSON blob and information associating it with a specific token. There may be many TokenMetadata entries with the same URI and thus the same metadata.

{  TokenMetadata {    # fields    address # Token address    id # uuid, ignore    json # data blob    tokenId    tokenURI
    # relationships    token  }}