CSV Support
The Sablier Interface provides a number of advanced features using templated CSV files. Bellow you can find a list of all these features that help automate medium to large scale distributions.
Streams: Create Group
Using a pre-configured CSV, deploy up to 60+ streams, all onchain, all at once. Start from the suggested template, fill in rows with addresses, amounts and other details. Finally, create batches/groups of streams in a single transaction.
Navigation
In order to access this feature you will need to:
- Access the create streams gallery - make sure you're on the group tab (top right)
- Click on the the desired stream shape card
- At the top (top-right) of the page you will find a button guiding you towards the CSV feature
Form Layout
The Create Group From CSV form consists of two parts:
Part 1: General Details
In this part of the form you should fill in the general details that all streams have in common. This step is similar to the regular create group forms, with the addition of a "timing" field that toggles between time configurations:
- By duration: e.g. streams end 30 days from now
- By range: e.g. streams being on
start time
and last untilend time
Part 2: Streams
This area consists of a large file picker. As soon as a file is uploaded it displays a table containing every stream and its primary details.
To double-check all columns provided through the CSV, click on the table (or action button at the top) and open the expanded table view.
Working with the CSV template
For each stream shape and duration you can use a different CSV template. You can download this template directly from the form, pre-configured to the selected shape and timing option.
For convenience, here's a table with all the available templates:
URL | Description |
---|---|
Cliff with duration | Cliff streams with the duration timing. |
Cliff with range | Cliff streams with the range timing. |
Exponential with duration | Exponential streams with the duration timing. |
Exponential with range | Exponential streams with the range timing. |
Exponential cliff with duration | Cliff-Exponential streams with the duration timing. |
Exponential cliff with range | Cliff-Exponential streams with the range timing. |
Linear with duration | Linear streams with the duration timing. |
Linear with range | Linear streams with the range timing. |
Monthly with range | Unlock Each Month streams with the range timing. |
Stepper with duration | Unlock In Steps streams with the duration timing. |
Stepper with range | Unlock In Steps streams with the duration timing. |
Timelock with duration | Timelock streams with the duration timing. |
Timelock with range | Timelock streams with the range timing. |
Unlock cliff with duration | Unlock-Cliff streams with the duration timing. |
Unlock cliff with range | Unlock-Cliff streams with the range timing. |
Unlock linear with duration | Unlock-Linear streams with the duration timing. |
Unlock linear with range | Unlock-Liner streams with the duration timing. |
Columns and Caveats
In order to properly use the CSV create feature you will have to provide data in the proper format for each column. Bellow you can find a list with each possible column, a short description and an example value.
Dates: All the columns that use the "date" type should have the following format: "DD/MM/YYYY HH:mm".
Durations: All the columns that use the "duration" type should have the following format: "x years y days
z hours". (Each particle is optional)
Timezones: The dates and times extracted from the CSV are
processed using the same timezone as the locales of the client's device.
If editing the CSV in Google Spreadsheets or similar applications please make sure these formats are not overridden by the app itself. We suggest double-checking in the Sablier app that the dates have been interpreted as expected.
Column | Description | Example |
---|---|---|
address | String - recipient's address | 0x12...AB |
amount | Number - the amount that will be streamed | 100 , 2500 , 42161 or any other valid amount. |
duration | Duration type - string that expresses the duration of the stream (see format above) | 1 year 20 days , 3 years 20 days 4 hours |
start | Date type - string that expresses the start date of the stream (see format above) | 24/02/2024 16:15 , 14/02/2026 17:25 |
end | Date type - string that expresses the end date of the stream (see format above) | 24/02/2024 16:15 , 14/02/2026 17:25 |
cliffDuration | Duration type - string that expresses the cliff duration of the stream (see format above) | 2 years 20 days , 3 years 20 days 4 hours |
cliffEnd | Date type - string that expresses the cliff end date of the stream (see format above) | 24/02/2024 16:15 , 14/02/2026 17:25 |
months | Number - the number of months for the unlock monthly | 4 , 5 , 12 or any other valid integer. |
steps | Number - the number of steps for the unlock in steps | 4 , 5 , 12 or any other valid integer. |
unlockDuration | Duration type - string that expresses the cliff duration of the stream, for the unlock cliff (see format above) | 2 years 20 days , 3 years 20 days 4 hours |
unlockEnd | Date type - string that expresses the cliff end date of the stream, for the unlock cliff (see format above) | 24/02/2024 16:15 , 14/02/2026 17:25 |
unlock | Number - the amount that will be initially unlocked | 100 , 2500 , 42161 or any other valid amount. |
Airstreams: Create
Using a pre-configured CSV, deploy tens of thousands of streams, all onchain, all in one campaign. Start from the suggested template, fill in rows with addresses, amounts and other details. Finally, create the airstream campaign in a single transaction. Recipients will be able to start claiming their streams as soon as the campaign is deployed and funded.
Navigation
In order to access this feature you will need to:
- Access the create airstream page
- Continue to the second step to enable uploading the CSV
Working with the CSV template
Working with the CSV template is pretty straightforward and similar to what we discussed in the previous guide (creating stream groups).
For now, creating airstreams is only possible using Lockup Linear contracts, no cliff and a "duration"-driven timing. Therefore, you don't have to worry about multiple templates or different configurations.
For convenience, here's a table with the main template:
URL | Description |
---|---|
Airstreams - Linear | Duration based template with linear streams |