Skip to content

Latest commit

 

History

History
87 lines (75 loc) · 2.05 KB

README.md

File metadata and controls

87 lines (75 loc) · 2.05 KB

Sablier Legacy Subgraph

This is the subgraph of the Sablier Legacy token streaming protocol. The most recent release is called Lockup and can be found here. For more details about how Sablier works, check out our docs at docs.sablier.com/.

You can interact with the subgraph using The Graph's hosted service:

Queries

Below are a few ways to show how to query the Sablier Legacy subgraph for data. The queries show most of the information that is queryable, but there are many other filtering options that can be used. Just check out the GraphQL API.

Query All Streams

{
  streams {
    id
    cancellation {
      recipientBalance
      timestamp
      txhash
    }
    deposit
    ratePerSecond
    recipient
    sender
    startTime
    stopTime
    timestamp
    token {
      id
      decimals
      name
      symbol
    }
    txs {
      id
      block
      event
      from
      timestamp
      to
    }
    withdrawals {
      id
      amount
    }
  }
}

Query All Streams for a Particular User

You can do this with the where clause. Make sure that the user address is in lowercase:

{
  streams(where: { sender: "0xcafe...beef" }) {
    id
  }
}

Query All Transactions

{
  transactions {
    id
    block
    event
    from
    stream {
      id
    }
    timestamp
    to
  }
}