Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@sablier/v2-periphery

sablier-labs1101.2.0

Peripheral smart contracts for interacting with Sablier V2

airdrops, airstreams, asset-distribution, asset-streaming, blockchain, cryptoasset-streaming, cryptoassets, ethereum, foundry, money-streaming, real-time-finance, sablier, sablier-v2, smart-contracts, solidity, token-distribution, token-streaming, token-vesting, vesting, web3

readme

Sablier V2 Periphery Github Actions Coverage Foundry Discord

This repository contains the peripheral smart contracts of the Sablier V2 Protocol. For lower-level logic, see the sablier-labs/v2-core repository.

In-depth documentation is available at docs.sablier.com.

Install

Node.js

This is the recommended approach.

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

bun add @sablier/v2-periphery

Then, if you are using Foundry, add these to your remappings.txt file:

@sablier/v2-core/=node_modules/@sablier/v2-core/
@sablier/v2-periphery/=node_modules/@sablier/v2-periphery/
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/

Git Submodules

This installation method is not recommended, but it is available for those who prefer it.

First, install the submodule using Forge:

forge install sablier-labs/v2-periphery

Second, you need to install the project's dependencies:

forge install --no-commit sablier-labs/v2-core@release OpenZeppelin/openzeppelin-contracts@v4.9.2

Finally, add these to your remappings.txt file:

@sablier/v2-core/=lib/v2-core/
@sablier/v2-periphery/=lib/v2-periphery/
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/

Security

The codebase has undergone rigorous audits by leading security experts from Cantina, as well as independent auditors. For a comprehensive list of all audits conducted, please click here.

For any security-related concerns, please refer to the SECURITY policy. This repository is subject to a bug bounty program per the terms outlined in the aforementioned policy.

Contributing

Feel free to dive in! Open an issue, start a discussion or submit a PR. For any informal concerns or feedback, please join our Discord server.

For guidance on how to create PRs, see the CONTRIBUTING guide.

License

Sablier V2 Periphery is licensed under GPL v3 or later, except for most of the files in test/, which remain unlicensed (as indicated in their SPDX headers).

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Common Changelog.

1.2.0 - 2024-07-04

Changed

  • Bump dependencies (#283, #351, #363)
  • Rename Batch to BatchLockup (#322)
  • Rename MerkleStreamer to MerkleLockup (#268)
  • Refactor Range to Timestamps (#335)
  • Switch to Bun (#249)
  • Use Solidity v0.8.26 (#351)

Added

  • And BatchLockup support for LockupTranched (#300)
  • Add grace period mechanism for clawback function (#340)
  • Add MerkleLockup support for LockupTranched (#297, #357)
  • Add precompiles in the NPM release (#302)

Removed

  • Breaking: Remove protocol fee check in MerkleLL (#257)

1.1.1 - 2023-12-20

Changed

  • Upgrade to V2 Core v1.1.2 (#244)
  • Use Solidity v0.8.23 (#244)

1.1.0 - 2023-12-17

Changed

  • Breaking Upgrade to V2 Core v1.1.1 (#191, #236)
  • Refactor import paths to use Node.js dependencies(#236)
  • Use Solidity v0.8.21 (#187)

Added

  • Add a contract that can batch create streams without a proxy (#177)
  • Add MerkleStreamer contract for the LockupLinear model (#174, #186 and #190)

Removed

  • Breaking: Remove proxy architecture (#213 and #226)
  • Remove @openzeppelin/contracts from Node.js peer dependencies (#194)

1.0.3 - 2023-08-17

Changed

  • Bump @sablier/v2-core to v1.0.2 (#164)
  • Update @prb/proxy and @sablier/v2-core import paths to use src (#164)

1.0.2 - 2023-07-13

No bytecode changes.

Changed

  • Bump @sablier/v2-core to v1.0.1

1.0.1 - 2023-07-11

No bytecode changes.

Changed

  • Change permit2 remapping to @uniswap/permit2
  • Improve wording in NatSpec comments
  • Bump prb-proxy to v4.0.1

1.0.0 - 2023-07-07

Added

  • Initial release