webhookSubgraph

Molecule Subgraph Documentation

The Molecule Subgraph indexes all on-chain events from Molecule Protocol contracts, providing a fast GraphQL API for querying IP-NFTs, IPTs, crowdsales, and marketplace activity. It's powered by The Graph and requires no authentication.

Quick Start

Query the subgraph directly with any GraphQL client:

const response = await fetch(
  'https://subgraph.satsuma-prod.com/742d8952ab24/molecule--4039244/ip-nft-mainnet/api',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      query: `{ ipts(first: 5) { id metadata { symbol name } } }`
    })
  }
)
const { data } = await response.json()

Or explore interactively in the Playgroundarrow-up-right.

Endpoints

Entities

Core Entities

  • IPNFT: IP-NFT tokens

    • Key Fields: id, tokenId, owner, tokenURI, symbol, createdAt

  • IPT: Tokenized IP-NFTs (ERC-20)

    • Key Fields: id, tokenContract, ipnft, metadata, totalIssued, capped

  • IPTBalance: User balances of IPTs

    • Key Fields: id, ipt, holder, balance

  • IpnftMetadata: IPFS metadata

    • Key Fields: id, name, image, external_url, properties

Fundraising

  • CrowdSale: Fundraising campaigns

    • Key Fields: id, state, auctionToken, biddingToken, fundingGoal, closingTime, totalBids

  • Contribution: Individual bids

    • Key Fields: id, crowdSale, contributor, amount, claimed

Marketplace

  • Listing: SchmackoSwap listings

    • Key Fields: id, tokenContract, tokenId, creator, askPrice, state

Vesting

  • TimelockedToken: Vested token contracts

    • Key Fields: id, underlyingToken, ipt

  • LockedSchedule: Vesting schedules

    • Key Fields: id, beneficiary, amount, releaseTime, released

Common Queries

Finding IPToken Addresses

IPTokens are dynamically created through the Tokenizer. It is recommended not to hardcode IPToken addresses. Instead, use the methods outlined below to retrieve them.

On-Chain Query

To find an IPToken address on-chain, use the following method:

Subgraph Query

Alternatively, query via a subgraph using the query structure below:

Follow the provided methods to dynamically obtain IPToken addresses, ensuring accuracy and adaptability in your implementations.

Get all IPTs

Get IP-NFTs by owner

Get user's IPT balances

Get crowdsale with contributions

Get active marketplace listings

JavaScript Client

A minimal client for querying the subgraph:

Pagination

The subgraph limits results to 1000 items per query. For larger datasets, use cursor-based pagination:

Filtering & Sorting

Filter operators

  • Exact match: ipts(where: { capped: true })

  • Comparison: crowdSales(where: { fundingGoal_gte: "1000000000000000000" })

  • Multiple conditions (AND): contributions(where: { claimed: false, amount_gt: "0" })

  • Pattern matching: ipnfts(where: { symbol_contains: "BIO" })

Available operators

Operator
Example
Description

_eq

owner: "0x..."

Equals (default)

_not

state_not: FAILED

Not equals

_gt/_gte

amount_gte: "1000"

Greater than

_lt/_lte

closingTime_lt: 1700000000

Less than

_in

state_in: [RUNNING, SETTLED]

In list

_contains

symbol_contains: "VITA"

String contains

Sorting

  • ipts(orderBy: createdAt, orderDirection: desc)

  • contributions(orderBy: amount, orderDirection: desc)

Rate Limits

Limit
Value

Requests

1,000/minute

Max results

1,000/query

Query complexity

Limited by The Graph

No authentication required.

Resources

Last updated