Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sablier-labs/legacy-subgraph
Subgraph for the Sablier cryptoasset streaming 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: 3 months ago
JSON representation
Subgraph for the Sablier cryptoasset streaming 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 (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-11T16:52:07.000Z (about 1 year ago)
- Last Synced: 2024-11-30T13:16:34.662Z (3 months 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: 7
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Sablier V1 Subgraph
This is the subgraph of the Sablier V1 token streaming protocol, which is a legacy release. The most recent release is V2 and can be found [here](https://github.com/sablier-labs/v2-core). 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 V1 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
}
}
```