https://github.com/sablier-labs/legacy-subgraph
Subgraph for the Sablier Legacy protocol
https://github.com/sablier-labs/legacy-subgraph
blockchain cryptoasset-streaming decentralized-finance defi ethereum graphql money-streaming real-time-finance subgraph the-graph
Last synced: 25 days ago
JSON representation
Subgraph for the Sablier Legacy protocol
- Host: GitHub
- URL: https://github.com/sablier-labs/legacy-subgraph
- Owner: sablier-labs
- License: gpl-3.0
- Created: 2019-05-06T14:34:25.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T12:49:21.000Z (6 months ago)
- Last Synced: 2025-05-08T07:52:55.370Z (25 days ago)
- Topics: blockchain, cryptoasset-streaming, decentralized-finance, defi, ethereum, graphql, money-streaming, real-time-finance, subgraph, the-graph
- Language: TypeScript
- Homepage: https://thegraph.com/hosted-service/subgraph/sablier-labs/sablier
- Size: 2.36 MB
- Stars: 29
- Watchers: 6
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](https://github.com/sablier-labs/lockup). For more details about how Sablier works, check out our docs at [docs.sablier.com](https://docs.sablier.com)/.
You can interact with the subgraph using The Graph's hosted service:
- [sablier-labs/sablier](https://thegraph.com/explorer/subgraph/sablier-labs/sablier)
- [sablier-labs/sablier-arbitrum](https://thegraph.com/explorer/subgraph/sablier-labs/sablier-arbitrum)
- [sablier-labs/sablier-avalanche](https://thegraph.com/explorer/subgraph/sablier-labs/sablier-avalanche)
- [sablier-labs/sablier-bsc](https://thegraph.com/explorer/subgraph/sablier-labs/sablier-bsc)
- [sablier-labs/sablier-matic](https://thegraph.com/explorer/subgraph/sablier-labs/sablier-matic)
- [sablier-labs/sablier-optimism](https://thegraph.com/explorer/subgraph/sablier-labs/sablier-optimism)## 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
```graphql
{
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`](https://thegraph.com/docs/en/querying/graphql-api/#example-using-where) clause. Make sure that the user address is in lowercase:
```graphql
{
streams(where: { sender: "0xcafe...beef" }) {
id
}
}
```### Query All Transactions
```graphql
{
transactions {
id
block
event
from
stream {
id
}
timestamp
to
}
}
```