Skip to content

Smart contracts for Merkle-based airdrop distributions

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE.md
GPL-3.0
LICENSE-GPL.md
Notifications You must be signed in to change notification settings

sablier-labs/airdrops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sablier Airdrops Github Actions Coverage Foundry Discord

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

Introduction

Sablier Airdrops is a collection of smart contracts that allows airdrops of ERC-20 tokens using Merkle trees. It offers multiple distributions options, including:

  1. Instant airdrops: The simplest way to distribute tokens to a list of addresses. Eligible users can claim and receive their allocation instantly via a single claim transaction.
  2. Vesting airdrops: This is the way to go if you want your users to receive tokens over time through vesting. Upon claiming, eligible users will have their tokens streamed through Sablier over a period specified by the campaign owner. This distribution option has been referred to as Airstreams in the past.

Sablier Airdrops also offer flexibility in configuring the Airdrop campaigns. For example, you can choose between whether you want to have vesting to begin at the same time for all user (absolute) or at the time of each claim (relative).

Documentation

For guides and technical details, check out the Sablier documentation.

Getting started

Install

You can install this repo using either Node.js or Git Submodules.

Node.js

This is the recommended approach.

Install this repo using your favorite package manager, e.g., with Bun:

bun add @sablier/airdrops

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

@sablier/airdrops/=node_modules/@sablier/airdrops/
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/
@prb/math/=node_modules/@prb/math/

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 --no-commit sablier-labs/airdrops

Second, install the project's dependencies:

forge install --no-commit OpenZeppelin/[email protected] PaulRBerg/[email protected] sablier-labs/[email protected]

Finally, add these to your remappings.txt file:

@sablier/airdrops/=lib/airdrops/
@sablier/lockup/=lib/lockup/src/
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
@prb/math/=lib/prb-math/

Branching Tree Technique

You may notice that some test files are accompanied by .tree files. This is called the Branching Tree Technique, and it is explained in depth here.

Deployments

The list of all deployment addresses can be found here.

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

The primary license for Sablier Airdrops is the Business Source License 1.1 (BUSL-1.1), see LICENSE.md. However, there are exceptions:

  • All files in src/interfaces/ and src/types are licensed under GPL-3.0-or-later, see LICENSE-GPL.md.
  • Several files in src, script, and tests are licensed under GPL-3.0-or-later, see LICENSE-GPL.md.
  • Many files in tests/ remain unlicensed (as indicated in their SPDX headers).

About

Smart contracts for Merkle-based airdrop distributions

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE.md
GPL-3.0
LICENSE-GPL.md

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published