Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions docs/concepts/11-governance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import ComptrollersTable from "@site/src/components/organisms/ComptrollersTable"

## Comptroller

The Sablier Protocol uses a Comptroller smart contract architecture for governance. The Comptroller acts as an
intermediary that has exclusive access to specific protocol functions. This design provides a more flexible and
centralized accross all protocols access control model while maintaining security.
The Sablier Comptroller is a smart contract that acts as an intermediary between the protocols and the admin. It has
exclusive access to specific protocol functions. This design provides a more flexible approach to access control across
all protocols while maintaining security.

Admin addresses that control the Comptroller are listed in the [Admin Addresses](#admin-addresses) section.

<ComptrollersTable />

Expand All @@ -28,9 +30,9 @@ Comptroller has the following permissions on each chain where `Lockup` is deploy

TODO: Add links when reference pages are created

## MerkleFactory
## Merkle Factory

Comptroller has the following permission on each chain where the factories are deployed:
Comptroller has the following permission on each chain where the Merkle Factories are deployed:

| Permission | Function |
| ---------------- | ---------------- |
Expand All @@ -52,14 +54,13 @@ TODO: Add links when reference pages are created

## Admin Addresses

Before the introduction of the Comptroller architecture, we used a direct "Admin" role for
governance. These admin accounts had the same authority as the current Comptroller contract, with direct access to
specific protocol functions. More concretely, the Admin is a collection of multisig wallets and EOAs currently in control of Sablier Labs.
The Comptroller is introduced in Lockup v3.0, Airdrops v2.0 and Flow v2.0. For earlier versions, we use a direct "Admin"
role for governance. These admin accounts have the same authority as the current Comptroller contract, with direct
access to specific protocol functions. More concretely, the Admin is a collection of multisig wallets and EOAs currently
in control of Sablier Labs.

<AdminsTable />

**PR NOTE:** I didn't add functions for the previous versions, since we won't have contract references for them.

## Trustlessness

Despite having an admin, the Sablier Protocol remains trustless. Here's why:
Expand Down
14 changes: 4 additions & 10 deletions docs/guides/airdrops/02-deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ title: "Deployment Addresses"

import DeploymentsV2_0 from "../../../src/autogen/airdrops/_table-deployments-v2.0.mdx";
import ReleaseHistoryAirdrops from "../../../src/snippets/_release-history-airdrops.mdx";
import DeploymentNote from "../../../src/snippets/_deployment-note.mdx";

# Merkle Airdrops Deployments

This section contains the deployment addresses for the v2.0 release of
[@sablier/airdrops](https://npmjs.com/package/@sablier/airdrops).
[latest]: https://npmjs.com/package/@sablier/airdrops

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v2.0 release of [@sablier/airdrops][latest].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

## Versions

Expand All @@ -26,10 +24,6 @@ Came here looking for the previous deployments? Click below to see other version

<ReleaseHistoryAirdrops />

This repository is the successor of [Lockup Periphery](https://github.com/sablier-labs/v2-periphery), which has been
discontinued. For previous deployments, please refer to the
[Lockup v1.2 deployments](/guides/lockup/previous-deployments/v1.2) page.

:::info

Stay up to date with any new releases by [subscribing](https://x.com/Sablier/status/1821220784661995627) to the official
Expand Down
5 changes: 2 additions & 3 deletions docs/guides/airdrops/previous-deployments/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"collapsed": true,
"label": "Previous Deployments",
"position": 3,
"collapsible": true,
"collapsed": false
"position": 3
}
13 changes: 6 additions & 7 deletions docs/guides/airdrops/previous-deployments/v1.3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ title: "v1.3"
---

import DeploymentsV1_3 from "../../../../src/autogen/airdrops/_table-deployments-v1.3.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Merkle Airdrops v1.3

This section contains the deployment addresses for the v1.3 release of
[@sablier/airdrops](https://npmjs.com/package/@sablier/airdrops).
[v1.3.0]: https://npmjs.com/package/@sablier/airdrops/v/1.3.0

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v1.3 release of [@sablier/airdrops@1.3.0][v1.3.0].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

This is an outdated version of the Merkle Airdrops protocol. See the latest version [here](/guides/airdrops/deployments).
This is an outdated version of the Merkle Airdrops protocol. See the latest version
[here](/guides/airdrops/deployments).

:::

Expand Down
10 changes: 4 additions & 6 deletions docs/guides/flow/02-deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ title: "Deployment Addresses"

import DeploymentsV2_0 from "../../../src/autogen/flow/_table-deployments-v2.0.mdx";
import ReleaseHistoryFlow from "../../../src/snippets/_release-history-flow.mdx";
import DeploymentNote from "../../../src/snippets/_deployment-note.mdx";

# Flow Deployments

This section contains the deployment addresses for the v2.0 release of
[@sablier/flow](https://npmjs.com/package/@sablier/flow).
[latest]: https://npmjs.com/package/@sablier/flow

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v2.0 release of [@sablier/flow][latest].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

## Versions

Expand Down
10 changes: 4 additions & 6 deletions docs/guides/flow/previous-deployments/v1.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ title: "v1.0"
---

import DeploymentsV1_0 from "../../../../src/autogen/flow/_table-deployments-v1.0.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Flow v1.0

This section contains the deployment addresses for the v1.0 release of
[@sablier/flow@1.0.0](https://npmjs.com/package/@sablier/flow/v/1.0.0).
[v1.0.0]: https://npmjs.com/package/@sablier/flow/v/1.0.0

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v1.0 release of [@sablier/flow@1.0.0][v1.0.0].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

Expand Down
10 changes: 4 additions & 6 deletions docs/guides/flow/previous-deployments/v1.1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ title: "v1.1"
---

import DeploymentsV1_1 from "../../../../src/autogen/flow/_table-deployments-v1.1.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Flow v1.1

This section contains the deployment addresses for the v1.1 release of
[@sablier/flow](https://npmjs.com/package/@sablier/flow).
[v1.1.1]: https://npmjs.com/package/@sablier/flow/v/1.1.1

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v1.1 release of [@sablier/flow@1.1.1][v1.1.1].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

Expand Down
10 changes: 4 additions & 6 deletions docs/guides/lockup/02-deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ title: "Deployment Addresses"

import DeploymentsV3_0 from "../../../src/autogen/lockup/_table-deployments-v3.0.mdx";
import ReleaseHistoryLockup from "../../../src/snippets/_release-history-lockup.mdx";
import DeploymentNote from "../../../src/snippets/_deployment-note.mdx";

# Lockup Deployments

This section contains the deployment addresses for the v3.0 release of
[@sablier/lockup](https://npmjs.com/package/@sablier/lockup).
[latest]: https://npmjs.com/package/@sablier/lockup

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v3.0 release of [@sablier/lockup][latest].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info[important]

Expand Down
11 changes: 4 additions & 7 deletions docs/guides/lockup/previous-deployments/v1.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@ title: "v1.0"
---

import DeploymentsV1_0 from "../../../../src/autogen/lockup/_table-deployments-v1.0.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Lockup v1.0

This section contains the deployment addresses for the v1.0 release of [@sablier/v2-core@1.0.2][v2-core] and
[@sablier/v2-periphery@1.0.3][v2-periphery].

[v2-core]: https://npmjs.com/package/@sablier/v2-core/v/1.0.2
[v2-periphery]: https://npmjs.com/package/@sablier/v2-periphery/v/1.0.3

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v1.0 release of [@sablier/v2-core@1.0.2][v2-core] and
[@sablier/v2-periphery@1.0.3][v2-periphery].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

Expand Down
11 changes: 4 additions & 7 deletions docs/guides/lockup/previous-deployments/v1.1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@ title: "v1.1"
---

import DeploymentsV1_1 from "../../../../src/autogen/lockup/_table-deployments-v1.1.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Lockup v1.1

This section contains the deployment addresses for the v1.1 release of [@sablier/v2-core@1.1.2][v2-core] and
[@sablier/v2-periphery@1.1.1][v2-periphery].

[v2-core]: https://npmjs.com/package/@sablier/v2-core/v/1.1.2
[v2-periphery]: https://npmjs.com/package/@sablier/v2-periphery/v/1.1.1

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v1.1 release of [@sablier/v2-core@1.1.2][v2-core] and
[@sablier/v2-periphery@1.1.1][v2-periphery].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

Expand Down
11 changes: 4 additions & 7 deletions docs/guides/lockup/previous-deployments/v1.2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@ title: "v1.2"
---

import DeploymentsV1_2 from "../../../../src/autogen/lockup/_table-deployments-v1.2.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Lockup v1.2

This section contains the deployment addresses for the v1.2 release of [@sablier/v2-core@1.2.0][v2-core] and
[@sablier/v2-periphery@1.2.0][v2-periphery].

[v2-core]: https://npmjs.com/package/@sablier/v2-core/v/1.2.0
[v2-periphery]: https://npmjs.com/package/@sablier/v2-periphery/v/1.2.0

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v1.2 release of [@sablier/v2-core@1.2.0][v2-core] and
[@sablier/v2-periphery@1.2.0][v2-periphery].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

Expand Down
10 changes: 4 additions & 6 deletions docs/guides/lockup/previous-deployments/v2.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ title: "v2.0"
---

import DeploymentsV2_0 from "../../../../src/autogen/lockup/_table-deployments-v2.0.mdx";
import DeploymentNote from "../../../../src/snippets/_deployment-note.mdx";

# Lockup v2.0

This section contains the deployment addresses for the v2.0 release of
[@sablier/lockup](https://npmjs.com/package/@sablier/lockup).
[v2.0.1]: https://npmjs.com/package/@sablier/lockup/v/2.0.1

A few noteworthy details about the deployments:
This section contains the deployment addresses for the v2.0 release of [@sablier/lockup@2.0.1][v2.0.1].

- The addresses are final
- All contracts are non-upgradeable
- The source code is verified on Etherscan across all chains
<DeploymentNote />

:::info

Expand Down
42 changes: 15 additions & 27 deletions src/components/organisms/Chains.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,54 @@
import _ from "lodash";
import { useMemo } from "react";
import { sablier } from "sablier";
import { getLatestLockupChainIds } from "../../helpers";
import GFMContent from "../atoms/GFMContent";

export interface ChainProps {
kind: "mainnets" | "testnets";
}

// Cache for chain counts
const chainCounts: { mainnets?: number; testnets?: number } = {};

export function Chains({ kind }: ChainProps) {
const content = useMemo(() => {
// Get the v3.0 lockup release
const lockupV3Release = sablier.releases.get({
protocol: "lockup",
version: "v3.0",
});

// Get all chains that have v3.0 lockup contracts
const lockupV3Contracts = sablier.contracts.getAll({
release: lockupV3Release,
});

// Get unique chain IDs that support Lockup v3.0
const lockupV3ChainIds = new Set(_.uniq(lockupV3Contracts?.map((c) => c.chainId) || []));
const latestLockupChainIds = new Set(getLatestLockupChainIds());

let content: string = "";
content += `| Name | Chain ID | In UI? | Native Token | Explorer |\n`;
content += `| :--- | :------- | :----- | :----------- | :------- |\n`;

let count = 0;
const getter = kind === "mainnets" ? sablier.chains.getMainnets : sablier.chains.getTestnets;

// PR NOTE: I believe we should display only the latest chains we deployed on,
// instead of the entire list of chains where we have ever deployed a specific version.
for (const chain of getter()) {
// Only include chains that have Lockup v3.0 deployed
if (!lockupV3ChainIds.has(chain.id)) {
if (!latestLockupChainIds.has(chain.id)) {
continue;
}

count++;
const supportedCell = chain.isSupportedByUI ? "✅" : "❌";
const symbolCell = chain.nativeCurrency.symbol;
const explorerURL = chain.blockExplorers.default.url;
const explorerCell = `[${new URL(explorerURL).host}](${explorerURL})`;
content += `| ${chain.name} | ${chain.id} | ${supportedCell} | ${symbolCell} | ${explorerCell} |\n`;
}

// Store the count for use in MDX
chainCounts[kind] = count;

return content;
}, [kind]);

return <GFMContent content={content} />;
}

// Helper function to get the count - reads from cache populated by Chains component
// Helper function to get the count
export function getChainCount(kind: "mainnets" | "testnets"): number {
return chainCounts[kind] ?? 0;
const latestLockupChainIds = new Set(getLatestLockupChainIds());
const query = kind === "mainnets" ? sablier.chains.getMainnets : sablier.chains.getTestnets;

let count = 0;
for (const chain of query()) {
if (latestLockupChainIds.has(chain.id)) {
count++;
}
}

return count;
}

export default Chains;
Loading