Skip to main content

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.

Date and time Caveats

Dates: All the columns that use the "date" type should have the following format: "YYYY-MM-DD HH:mm".

Durations: All the columns that use the "duration" type should have the following format: "x years y days z hours". Note that each particle is optional, e.g., you can skip the days.

Timezones: The dates and times extracted from the CSV are processed using the same timezone as the locales of the client's device.

Amounts: All the amounts should be expressed in humanized notion. They will be padded with the selected token's number of decimals in the processing step.

Streams: Create Group

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.

In order to access this feature you will need to:

  1. Access the create streams gallery - make sure you're on the group tab (top right)
  2. Click on the the desired stream shape card
  3. At the top (top-right) of the page you will find a button guiding you towards the CSV feature
CSV Selector

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:

  1. By duration: e.g. streams end 30 days from now
  2. By range: e.g. streams being on start time and last until end time
General Details

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.

info

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.

File pickerFile picker

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.

Template
Modal

For convenience, here's a table with all the available templates:

URLDescription
Cliff exponential with durationCliff-Exponential streams with the duration timing.
Cliff exponential with rangeCliff-Exponential streams with the range timing.
Cliff with durationCliff streams with the duration timing.
Cliff with rangeCliff streams with the range timing.
Exponential with durationExponential streams with the duration timing.
Exponential with rangeExponential streams with the range timing.
Linear with durationLinear streams with the duration timing.
Linear with rangeLinear streams with the range timing.
Monthly with rangeUnlock Each Month streams with the range timing.
Stepper with durationUnlock In Steps streams with the duration timing.
Stepper with rangeUnlock In Steps streams with the duration timing.
Timelock with durationTimelock streams with the duration timing.
Timelock with rangeTimelock streams with the range timing.
Unlock cliff with durationUnlock-Cliff streams with the duration timing.
Unlock cliff with rangeUnlock-Cliff streams with the range timing.
Unlock linear with durationUnlock-Linear streams with the duration timing.
Unlock linear with rangeUnlock-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.

info

If editing the CSV in Google Spreadsheets or similar applications, make sure that these formats are not overridden by the app itself. We suggest double-checking in the Sablier app that the dates have been parsed as expected.

ColumnDescriptionExamples
addressString - recipient's address0x12...AB
amountNumber - the amount that will be streamed100, 2500, 42161 or any other valid amount.
durationDuration type - string that denotes the duration of the stream1 year 20 days, 3 years 20 days 4 hours
startDate type - string that denotes the start date of the stream2024-02-24 16:15, 2026-02-14 17:25
endDate type - string that denotes the end date of the stream2024-02-24 16:15, 2026-02-14 17:25
cliffDurationDuration type - string that denotes the cliff duration of the stream2 years 20 days, 3 years 20 days 4 hours
cliffEndDate type - string that denotes the cliff end date of the stream2024-02-24 16:15, 2026-02-14 17:25
monthsNumber - the number of months for the unlock monthly4, 5, 12 or any other valid integer.
stepsNumber - the number of steps for the unlock in steps4, 5, 12 or any other valid integer.
unlockDurationDuration type - string that denotes the cliff duration of the stream, for the unlock cliff2 years 20 days, 3 years 20 days 4 hours
unlockEndDate type - string that denotes the cliff end date of the stream, for the unlock cliff2024-02-24 16:15, 2026-02-14 17:25
unlockNumber - the amount that will be initially unlocked100, 2500, 42161 or any other valid amount.

Airstreams: Create

CreateCreate

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.

In order to access this feature you will need to:

  1. Access the create airstream page
  2. 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).

info

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:

URLDescription
Airstreams - LinearDuration based template with linear streams