Skip to content

Commit 36af880

Browse files
committed
refactor: reorganize endpoints
feat: add missing deprecation warning fix: import Deployment snippet correctly refactor: dryify snippets refactor: export default function in snippet refactor: reorder Lockup Dynamic and Lockup Tranched refactor: various improvements and rewordings
1 parent ab6a0e0 commit 36af880

30 files changed

+156
-161
lines changed

docs/api/05-development.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import LinkPreview from "@site/src/components/LinkPreview";
1111
### Integrate
1212

1313
To integrate the Sablier subgraphs or indexers into your project, start from the official `@sablier/subgraphs`
14-
repository. We recommend using:
15-
16-
- [GraphQL Code Generator](https://the-guild.dev/graphql/codegen/docs/getting-started) to create types from your GraphQL
17-
fragments and queries.
18-
- [TanStack Query](https://tanstack.com/query) to fetch results from the exposed endpoints.
14+
repository.
1915

2016
<LinkPreview
2117
href="https://github.com/sablier-labs/subgraphs"
@@ -24,6 +20,12 @@ repository. We recommend using:
2420
title="Github - sablier-labs/subgraphs: Sablier Subgraphs"
2521
/>
2622

23+
We recommend using:
24+
25+
- [GraphQL Code Generator](https://the-guild.dev/graphql/codegen/docs/getting-started) to create types from your GraphQL
26+
fragments and queries.
27+
- [TanStack Query](https://tanstack.com/query) to fetch results from the exposed endpoints.
28+
2729
### Contribute
2830

2931
To contribute to the subgraphs or deploy your own, head over to the GitHub

docs/api/airdrops/01-overview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import LinkPreview from "@site/src/components/LinkPreview";
88

99
# Airdrops
1010

11-
Sablier's [Lockup](/concepts/lockup/overview) streams are used for the [Vesting](/apps/features/vesting) and (part of)
12-
the [Airdrops](/apps/features/airdrops) components of the Sablier Interfaces. The Airdrops component is supported by our
13-
[Merkle](/concepts/merkle-airdrops) utilities and focuses on the functionality of the Merkle Factory peripheries.
11+
Sablier's [Lockup](/concepts/lockup/overview) streams are used for the [Vesting](/apps/features/vesting) feature and
12+
some of the [Airdrops](/apps/features/airdrops) features of the Sablier Interface. The Airdrops component is supported
13+
by our [Merkle](/concepts/merkle-airdrops) utilities and focuses on the functionality of the Merkle Factory.
1414

1515
Airdrops-native functionality is powered by:
1616

docs/api/airdrops/02-endpoints.mdx

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,33 @@ sidebar_position: 2
44
title: "Endpoints"
55
---
66

7-
import DeprecatedWarning from "@site/docs/snippets/DeprecatedWarning.mdx";
7+
import DeprecatedSubgraphs from "@site/docs/snippets/DeprecatedSubgraphs.mdx";
8+
import EnvioTip from "@site/docs/snippets/EnvioTip.mdx";
89
import TheGraphSunset from "@site/docs/snippets/TheGraphSunset.mdx";
910
import LinkPreview from "@site/src/components/LinkPreview";
1011

11-
# Airdrops
12+
# Airdrops Endpoints
1213

1314
## The Graph
1415

15-
This subgraph tracks events emitted by the `@sablier/airdrops` contracts, specifically the ones in charge of merkle
16-
distributions. It deals with airdrops-specific actions like the factory creating an airstream campaign, admin clawbacks,
17-
or users claiming stream NFTs as defined in the attached Merkle tree.
16+
This subgraph tracks events emitted by the Sablier Airdrops contracts, specifically the ones in charge of Merkle
17+
distributions. It deals with airdrop-specific actions like the factory deploying an airdrop campaign, admin clawbacks,
18+
and users claiming airdrops.
1819

19-
Airdrops work in tandem with [vesting](/apps/features/vesting) as Merkle distributions will produce new
20-
[lockup](/api/lockup/overview) streams. Be sure to check out that part of the docs too.
20+
Airdrops work in tandem with our [Vesting](/apps/features/vesting) feature since some Merkle distributions will produce
21+
new [Lockup](/api/lockup/overview) streams.
2122

2223
<TheGraphSunset />
23-
<DeprecatedWarning />
24+
<DeprecatedSubgraphs protocol="airdrops" />
25+
26+
### Source Code
27+
28+
<LinkPreview
29+
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/merkle"
30+
icon="github"
31+
subtitle="@sablier-labs/subgraphs - apps/merkle"
32+
title="Sablier Subgraphs - Merkle - The Graph"
33+
/>
2434

2535
### Endpoints
2636

@@ -47,27 +57,22 @@ Airdrops work in tandem with [vesting](/apps/features/vesting) as Merkle distrib
4757
| Sepolia | [sablier-airdrops-sepolia][explorer-airdrops-sepolia] | [Studio][studio-airdrops-sepolia] | [De. Network][network-airdrops-sepolia] |
4858
| zkSync | [sablier-airdrops-zksync][explorer-airdrops-zksync] | [Studio][studio-airdrops-zksync] | [De. Network][network-airdrops-zksync] |
4959

50-
### Code
51-
52-
<LinkPreview
53-
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/merkle"
54-
icon="github"
55-
subtitle="@sablier-labs/subgraphs - apps/merkle"
56-
title="Sablier Subgraphs - Merkle - The Graph"
57-
/>
58-
5960
## Envio
6061

62+
<EnvioTip />
63+
6164
This indexers tracks the events emitted by the `@sablier/airdrops` contracts, specifically the ones in charge of merkle
6265
distributions. It deals with airdrops-specific actions like the factory creating an airstream campaign, admin clawbacks,
6366
or users claiming stream NFTs as defined in the attached Merkle tree.
6467

65-
:::tip Chains: Individual vs. Aggregated
66-
67-
While subgraphs are chain-tethered (one subgraph endpoint per chain), Envio indexes all chains within the same
68-
deployment. The data from all of chains that Sablier is deployed on can be queried from a single endpoint.
68+
### Source Code
6969

70-
:::
70+
<LinkPreview
71+
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/merkle-envio"
72+
icon="github"
73+
subtitle="@sablier-labs/subgraphs - apps/merkle-envio"
74+
title="Sablier Subgraphs - Merkle - Envio"
75+
/>
7176

7277
### Endpoints
7378

@@ -78,28 +83,13 @@ deployment. The data from all of chains that Sablier is deployed on can be queri
7883
The endpoint is meant to be plugged into a query client. Use
7984
[Hasura's online explorer](https://cloud.hasura.io/public/graphiql?) to view the entities and query API.
8085

81-
### Code
82-
83-
<LinkPreview
84-
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/merkle-envio"
85-
icon="github"
86-
subtitle="@sablier-labs/subgraphs - apps/merkle-envio"
87-
title="Sablier Subgraphs - Merkle - Envio"
88-
/>
89-
9086
## Sablier SDK: Merkle API
9187

9288
Sablier's Airdrops rely on pre-configured Merkle trees. This data structure contains the list of recipients as well as
9389
their individual claim details. We use the following service to create the Merkle tree, as well as proofs for the
9490
recipient's claims.
9591

96-
### Endpoints
97-
98-
| Host | Endpoint |
99-
| ------- | ------------------------------------- |
100-
| Sablier | https://sablier-merkle-api.vercel.app |
101-
102-
### Code
92+
### Source Code
10393

10494
<LinkPreview
10595
href="https://github.com/sablier-labs/merkle-api"
@@ -108,6 +98,12 @@ recipient's claims.
10898
title="Sablier SDK - Merkle API"
10999
/>
110100

101+
### Endpoints
102+
103+
| Host | Endpoint |
104+
| ------- | ------------------------------------- |
105+
| Sablier | https://sablier-merkle-api.vercel.app |
106+
111107
{/* --------------------------------------------------------------------------------------------------------------------------------- */}
112108
{/* --------------------------------------------------------------------------------------------------------------------------------- */}
113109
{/* --------------------------------------------------------------------------------------------------------------------------------- */}

docs/api/airdrops/deprecated/01-old-endpoints.mdx renamed to docs/api/airdrops/06-previous-endpoints.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
---
2-
id: "old_endpoints"
3-
sidebar_position: 1
4-
title: "Endpoints"
2+
id: "previous-endpoints"
3+
sidebar_position: 6
4+
title: "Previous Endpoints"
55
---
66

77
import DeprecatedEndpoints from "@site/docs/snippets/DeprecatedEndpoints.mdx";
88

9-
# Airdrops
10-
119
<DeprecatedEndpoints />
1210

13-
### Deprecated Endpoints
14-
1511
| Chain | Explorer | Studio[^2] | Decentralized Network[^1] |
1612
| ---------------- | ----------------------------------------------------------------- | --------------------------------------- | --------------------------------------------- |
1713
| Ethereum | [sablier-v2-ms][v2-explorer-ms-ethereum] | [Studio][v2-studio-ms-ethereum] | [De. Network][v2-network-ms-ethereum] |

docs/api/airdrops/deprecated/_category_.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"collapsed": true,
33
"label": "Envio",
4-
"position": 4
4+
"position": 5
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"collapsed": true,
33
"label": "Merkle API",
4-
"position": 5
4+
"position": 3
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"collapsed": true,
33
"label": "The Graph",
4-
"position": 3
4+
"position": 4
55
}

docs/api/flow/01-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import LinkPreview from "@site/src/components/LinkPreview";
88

99
# Sablier Flow
1010

11-
Sablier's [Flow](/concepts/flow/overview) streams enable the [payments](/apps/features/payments) functionality of the
11+
Sablier's [Flow](/concepts/flow/overview) streams enable the [Payments](/apps/features/payments) functionality of the
1212
Sablier Interface.
1313

1414
The Flow data is powered by:

docs/api/flow/02-endpoints.mdx

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,29 @@ sidebar_position: 2
44
title: "Endpoints"
55
---
66

7+
import DeprecatedSubgraphs from "@site/docs/snippets/DeprecatedSubgraphs.mdx";
8+
import EnvioTip from "@site/docs/snippets/EnvioTip.mdx";
79
import TheGraphSunset from "@site/docs/snippets/TheGraphSunset.mdx";
810
import LinkPreview from "@site/src/components/LinkPreview";
911

10-
# Flow
12+
# Flow Endpoints
1113

1214
## The Graph
1315

14-
This subgraph tracks events emitted by the `@sablier/flow` contracts, and deals with protocol actions like creating,
16+
This subgraph tracks events emitted by the Sablier Flow contracts, and deals with protocol actions like creating,
1517
depositing or voiding flow streams.
1618

1719
<TheGraphSunset />
20+
<DeprecatedSubgraphs protocol="flow" />
21+
22+
### Source Code
23+
24+
<LinkPreview
25+
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/flow"
26+
icon="github"
27+
subtitle="@sablier-labs/subgraphs - apps/flow"
28+
title="Sablier Subgraphs - Flow - The Graph"
29+
/>
1830

1931
### Endpoints
2032

@@ -40,27 +52,22 @@ depositing or voiding flow streams.
4052
| Sepolia | [sablier-flow-sepolia][explorer-flow-sepolia] | [Studio][studio-flow-sepolia] | [De. Network][network-flow-sepolia] |
4153
| zkSync | [sablier-flow-zksync][explorer-flow-zksync] | [Studio][studio-flow-zksync] | [De. Network][network-flow-zksync] |
4254

43-
### Code
44-
45-
<LinkPreview
46-
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/flow"
47-
icon="github"
48-
subtitle="@sablier-labs/subgraphs - apps/flow"
49-
title="Sablier Subgraphs - Flow - The Graph"
50-
/>
51-
5255
## Envio
5356

54-
:::tip Chains: Individual vs. Aggregated
55-
56-
While subgraphs are chain-tethered (one subgraph endpoint per chain), Envio indexes all chains within the same
57-
deployment. The data from all of chains that Sablier is deployed on can be queried from the same place.
58-
59-
:::
57+
<EnvioTip />
6058

6159
The `flow-envio` indexer tracks events emitted by the `@sablier/flow` contracts. It deals with core protocol actions
6260
like creating, depositing, or voiding flow streams.
6361

62+
### Source Code
63+
64+
<LinkPreview
65+
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/flow-envio"
66+
icon="github"
67+
subtitle="@sablier-labs/subgraphs - apps/flow-envio"
68+
title="Sablier Subgraphs - Flow - Envio"
69+
/>
70+
6471
### Endpoints
6572

6673
| Chain | Endpoint (Hosted Network) |
@@ -70,15 +77,6 @@ like creating, depositing, or voiding flow streams.
7077
The endpoint is meant to be plugged into a query client. Use
7178
[Hasura's online explorer](https://cloud.hasura.io/public/graphiql?) to view the entities and query API.
7279

73-
### Code
74-
75-
<LinkPreview
76-
href="https://github.com/sablier-labs/subgraphs/blob/main/apps/flow-envio"
77-
icon="github"
78-
subtitle="@sablier-labs/subgraphs - apps/flow-envio"
79-
title="Sablier Subgraphs - Flow - Envio"
80-
/>
81-
8280
{/* --------------------------------------------------------------------------------------------------------------------------------- */}
8381
{/* --------------------------------------------------------------------------------------------------------------------------------- */}
8482
{/* --------------------------------------------------------------------------------------------------------------------------------- */}

0 commit comments

Comments
 (0)