Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove V2 and obsolete references #994

Merged
merged 14 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feel free to dive in! [Open](https://github.com/sablier-labs/v2-core/issues/new)
[start](https://github.com/sablier-labs/v2-core/discussions/new) a discussion or submit a PR. For any informal concerns
or feedback, please join our [Discord server](https://discord.gg/bSwRCwWRsT).

Contributions to Sablier V2 Core are welcome by anyone interested in writing more tests, improving readability,
Contributions to Sablier Lockup are welcome by anyone interested in writing more tests, improving readability,
optimizing for gas efficiency, or extending the protocol via new features.

## Pre Requisites
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Parameters

Licensor: Sablier Labs Ltd

Licensed Work: Sablier V2 Core The Licensed Work is (C) 2024 Sablier Labs Ltd
Licensed Work: Sablier Lockup The Licensed Work is (C) 2024 Sablier Labs Ltd

Additional Use Grant: Any uses listed and defined at v2-core-license-grants.sablier.eth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PaulRBerg should we take the ens domain for lockup-license-grants.sablier.eth ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should.

For anything that requires submitting a multisig transaction, you can tag @maxdesalle. He initiates the multisig txs — I just execute them.


Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sablier V2 Core [![Github Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord]
# Sablier Lockup [![Github Actions][gha-badge]][gha] [![Coverage][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry] [![Discord][discord-badge]][discord]

[gha]: https://github.com/sablier-labs/v2-core/actions
[gha-badge]: https://github.com/sablier-labs/v2-core/actions/workflows/ci.yml/badge.svg
Expand All @@ -9,15 +9,15 @@
[foundry]: https://getfoundry.sh
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg

This repository contains the core smart contracts of the Sablier V2 Protocol. For higher-level logic, see the
This repository contains the core smart contracts of the Sablier Lockup Protocol. For higher-level logic, see the
[sablier-labs/v2-periphery](https://github.com/sablier-labs/v2-periphery) repository.

In-depth documentation is available at [docs.sablier.com](https://docs.sablier.com).

## Background

Sablier V2 is a token distribution protocol used by DAOs and businesses for vesting, payroll, airdrops, and more. Our
flagship model is the linear stream, which distributes assets on a continuous, by-the-second basis.
Sablier Lockup Protocol is a token distribution protocol used by DAOs and businesses for vesting, payroll, airdrops, and
more. Our flagship model is the linear stream, which distributes assets on a continuous, by-the-second basis.
smol-ninja marked this conversation as resolved.
Show resolved Hide resolved

The way it works is that the sender of a payment stream first deposits a specific amount of ERC-20 tokens in a contract.
Then, the contract progressively allocates the funds to the recipient, who can access them as they become available over
Expand All @@ -30,7 +30,7 @@ of tokens deposited.

This is the recommended approach.

Install Sablier V2 Core using your favorite package manager, e.g., with Bun:
Install Lockup using your favorite package manager, e.g., with Bun:

```shell
bun add @sablier/v2-core
Expand Down Expand Up @@ -70,14 +70,14 @@ Finally, add these to your `remappings.txt` file:

## Usage

This is just a glimpse of Sablier V2 Core. For more guides and examples, see the
This is just a glimpse of Sablier Lockup. For more guides and examples, see the
[documentation](https://docs.sablier.com).

```solidity
import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol";
import { ISablierLockupLinear } from "@sablier/v2-core/src/interfaces/ISablierLockupLinear.sol";

contract MyContract {
ISablierV2LockupLinear sablier;
ISablierLockupLinear lockup;

function buildSomethingWithSablier() external {
// ...
Expand All @@ -87,7 +87,7 @@ contract MyContract {

## Architecture

V2 Core uses a singleton-style architecture, where all streams are managed in the `LockupLinear`, `LockupDynamic` and
Lockup uses a singleton-style architecture, where all streams are managed in the `LockupLinear`, `LockupDynamic` and
`LockupTranched` contracts. That is, Sablier does not deploy a new contract for each stream. It bundles all streams into
a single contract, which is more gas-efficient and easier to maintain.

Expand Down Expand Up @@ -122,7 +122,7 @@ For guidance on how to create PRs, see the [CONTRIBUTING](./CONTRIBUTING.md) gui

## License

The primary license for Sablier V2 Core is the Business Source License 1.1 (`BUSL-1.1`), see
The primary license for Sablier Lockup is the Business Source License 1.1 (`BUSL-1.1`), see
[`LICENSE.md`](./LICENSE.md). However, there are exceptions:

- All files in `src/interfaces/` and `src/types` are licensed under `GPL-3.0-or-later`, see
Expand Down
14 changes: 7 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ report it to us.
### Overview

Starting on July 1, 2023, the [sablier-labs/v2-core](https://github.com/sablier-labs/v2-core) repository is subject to
the Sablier V2 Bug Bounty (the "Program") to incentivize responsible bug disclosure.
the Sablier Bug Bounty (the "Program") to incentivize responsible bug disclosure.

We are limiting the scope of the Program to critical and high severity bugs, and are offering a reward of up to
$100,000. Happy hunting!
Expand All @@ -25,8 +25,8 @@ The Program does NOT cover the following:
- External code in `node_modules`, except for code that is explicitly used by a deployed contract located in the
[src](./src) directory.
- Contract deployments on test networks, such as Sepolia.
- Bugs in third-party contracts or platforms interacting with Sablier V2 Core.
- Previously reported or discovered vulnerabilities in contracts built by third parties on Sablier V2 Core.
- Bugs in third-party contracts or platforms interacting with Sablier Lockup.
- Previously reported or discovered vulnerabilities in contracts built by third parties on Sablier Lockup.
- Bugs that have already been reported.

Vulnerabilities contingent upon the occurrence of any of the following also are outside the scope of this Program:
Expand All @@ -42,7 +42,7 @@ Vulnerabilities contingent upon the occurrence of any of the following also are

### Assumptions

Sablier V2 Core has been developed with a number of technical assumptions in mind. For a disclosure to qualify as a
Sablier Lockup has been developed with a number of technical assumptions in mind. For a disclosure to qualify as a
vulnerability, it must adhere to these assumptions as well:

- The immutable variables `MAX_SEGMENT_COUNT` and `MAX_TRANCHE_COUNT` have values that cannot lead to an overflow of the
Expand Down Expand Up @@ -89,8 +89,8 @@ publicly for their contribution if they so choose.
To qualify for a reward under this Program, you must adhere to the following criteria:

- Identify a previously unreported, non-public vulnerability that could result in the loss or freeze of any ERC-20 asset
in Sablier V2 (but not on any third-party platform interacting with Sablier V2) and that is within the scope of this
Program.
in Sablier Lockup (but not on any third-party platform interacting with Sablier Lockup) and that is within the scope
of this Program.
- The vulnerability must be distinct from the issues covered in the [Audits](https://github.com/sablier-labs/audits).
- Be the first to report the unique vulnerability to [security@sablier.com](mailto:security@sablier.com) in accordance
with the disclosure requirements specified above. If multiple similar vulnerabilities are reported within a 24-hour
Expand All @@ -101,7 +101,7 @@ To qualify for a reward under this Program, you must adhere to the following cri
- Avoid exploiting the vulnerability in any manner, such as making it public or profiting from it (aside from the reward
offered under this Program).
- Make a genuine effort to prevent privacy violations, data destruction, and any interruption or degradation of Sablier
V2.
Lockup.
- Submit only one vulnerability per submission, unless chaining vulnerabilities is necessary to demonstrate the impact
of any of them.
- Do not submit a vulnerability that stems from an underlying issue for which a reward has already been paid under this
Expand Down
2 changes: 1 addition & 1 deletion benchmark/BatchLockup.Gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract BatchLockup_Gas_Test is Benchmark_Test {

function testGas_Implementations() external {
// Set the file path.
benchmarkResultsFile = string.concat(benchmarkResults, "SablierV2BatchLockup.md");
benchmarkResultsFile = string.concat(benchmarkResults, "SablierBatchLockup.md");

// Create the file if it doesn't exist, otherwise overwrite it.
vm.writeFile({
Expand Down
4 changes: 2 additions & 2 deletions benchmark/Benchmark.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity >=0.8.22;

import { UD60x18, ud } from "@prb/math/src/UD60x18.sol";

import { ISablierV2Lockup } from "../src/core/interfaces/ISablierV2Lockup.sol";
import { ISablierLockup } from "../src/core/interfaces/ISablierLockup.sol";
import { Base_Test } from "../test/Base.t.sol";

/// @notice Benchmark contract with common logic needed by all tests.
Expand All @@ -24,7 +24,7 @@ abstract contract Benchmark_Test is Base_Test {
/// @dev A variable used to store the content to append to the results file.
string internal contentToAppend;

ISablierV2Lockup internal lockup;
ISablierLockup internal lockup;

uint256[7] internal streamIds = [50, 51, 52, 53, 54, 55, 56];

Expand Down
2 changes: 1 addition & 1 deletion benchmark/LockupDynamic.Gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ contract LockupDynamic_Gas_Test is Benchmark_Test {

function testGas_Implementations() external {
// Set the file path.
benchmarkResultsFile = string.concat(benchmarkResults, "SablierV2LockupDynamic.md");
benchmarkResultsFile = string.concat(benchmarkResults, "SablierLockupDynamic.md");

// Create the file if it doesn't exist, otherwise overwrite it.
vm.writeFile({
Expand Down
2 changes: 1 addition & 1 deletion benchmark/LockupLinear.Gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract LockupLinear_Gas_Test is Benchmark_Test {

function testGas_Implementations() external {
// Set the file path.
benchmarkResultsFile = string.concat(benchmarkResults, "SablierV2LockupLinear.md");
benchmarkResultsFile = string.concat(benchmarkResults, "SablierLockupLinear.md");

// Create the file if it doesn't exist, otherwise overwrite it.
vm.writeFile({
Expand Down
2 changes: 1 addition & 1 deletion benchmark/LockupTranched.Gas.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ contract LockupTranched_Gas_Test is Benchmark_Test {

function testGas_Implementations() external {
// Set the file path.
benchmarkResultsFile = string.concat(benchmarkResults, "SablierV2LockupTranched.md");
benchmarkResultsFile = string.concat(benchmarkResults, "SablierLockupTranched.md");

// Create the file if it doesn't exist, otherwise overwrite it.
vm.writeFile({
Expand Down
24 changes: 12 additions & 12 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
]
gas_limit = 9223372036854775807
gas_reports = [
"SablierV2BatchLockup",
"SablierV2LockupDynamic",
"SablierV2LockupLinear",
"SablierV2LockupTranched",
"SablierV2MerkleLL",
"SablierV2MerkleLockupFactory",
"SablierV2MerkleLT",
"SablierV2NFTDescriptor",
"SablierBatchLockup",
"SablierLockupDynamic",
"SablierLockupLinear",
"SablierLockupTranched",
"SablierMerkleLL",
"SablierMerkleLockupFactory",
"SablierMerkleLT",
"SablierNFTDescriptor",
]
optimizer = true
optimizer_runs = 1000
Expand Down Expand Up @@ -78,10 +78,10 @@
]

[profile.smt.model_checker.contracts]
"src/SablierV2LockupDynamic.sol" = ["SablierV2LockupDynamic"]
"src/SablierV2LockupLinear.sol" = ["SablierV2LockupLinear"]
"src/SablierV2LockupTranched.sol" = ["SablierV2LockupTranched"]
"src/SablierV2NFTDescriptor.sol" = ["SablierV2NFTDescriptor"]
"src/SablierLockupDynamic.sol" = ["SablierLockupDynamic"]
"src/SablierLockupLinear.sol" = ["SablierLockupLinear"]
"src/SablierLockupTranched.sol" = ["SablierLockupTranched"]
"src/SablierNFTDescriptor.sol" = ["SablierNFTDescriptor"]

# Test the optimized contracts without re-compiling them
[profile.test-optimized]
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sablier/v2-core",
"description": "Core smart contracts of the Sablier V2 token distribution protocol",
"description": "Core smart contracts of the Lockup token distribution protocol",
"license": "BUSL-1.1",
"version": "1.2.0",
"author": {
Expand Down Expand Up @@ -38,10 +38,12 @@
"cryptoassets",
"ethereum",
"foundry",
"lockup",
"money-streaming",
"real-time-finance",
"sablier",
"sablier-v2",
andreivladbrg marked this conversation as resolved.
Show resolved Hide resolved
"sablier-lockup",
"smart-contracts",
"solidity",
"token-distribution",
Expand Down
Loading
Loading