v1-subgraph
v1-subgraph copied to clipboard
Subgraph for the Sablier cryptoasset streaming protocol
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. 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:
- sablier-labs/sablier
- sablier-labs/sablier-arbitrum
- sablier-labs/sablier-avalanche
- sablier-labs/sablier-bsc
- sablier-labs/sablier-matic
- 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
{
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
}
}