Skip to main content

ISablierBatchLockup

Git Source

Helper to batch create Lockup streams.

Functions

createWithDurationsLD

Creates a batch of LD streams using createWithDurationsLD.

Requirements:

  • There must be at least one element in batch.
  • All requirements from {ISablierLockupDynamic.createWithDurationsLD} must be met for each stream.
function createWithDurationsLD(
ISablierLockup lockup,
IERC20 token,
BatchLockup.CreateWithDurationsLD[] calldata batch
)
external
returns (uint256[] memory streamIds);

Parameters

NameTypeDescription
lockupISablierLockupThe address of the SablierLockup contract.
tokenIERC20The contract address of the ERC-20 token to be distributed.
batchBatchLockup.CreateWithDurationsLD[]An array of structs, each encapsulating a subset of the parameters of {ISablierLockupDynamic.createWithDurationsLD}.

Returns

NameTypeDescription
streamIdsuint256[]The ids of the newly created streams.

createWithTimestampsLD

Creates a batch of LD streams using createWithTimestampsLD.

Requirements:

  • There must be at least one element in batch.
  • All requirements from {ISablierLockupDynamic.createWithTimestampsLD} must be met for each stream.
function createWithTimestampsLD(
ISablierLockup lockup,
IERC20 token,
BatchLockup.CreateWithTimestampsLD[] calldata batch
)
external
returns (uint256[] memory streamIds);

Parameters

NameTypeDescription
lockupISablierLockupThe address of the SablierLockup contract.
tokenIERC20The contract address of the ERC-20 token to be distributed.
batchBatchLockup.CreateWithTimestampsLD[]An array of structs, each encapsulating a subset of the parameters of {ISablierLockupDynamic.createWithTimestampsLD}.

Returns

NameTypeDescription
streamIdsuint256[]The ids of the newly created streams.

createWithDurationsLL

Creates a batch of LL streams using createWithDurationsLL.

Requirements:

  • There must be at least one element in batch.
  • All requirements from {ISablierLockupLinear.createWithDurationsLL} must be met for each stream.
function createWithDurationsLL(
ISablierLockup lockup,
IERC20 token,
BatchLockup.CreateWithDurationsLL[] calldata batch
)
external
returns (uint256[] memory streamIds);

Parameters

NameTypeDescription
lockupISablierLockupThe address of the SablierLockup contract.
tokenIERC20The contract address of the ERC-20 token to be distributed.
batchBatchLockup.CreateWithDurationsLL[]An array of structs, each encapsulating a subset of the parameters of {ISablierLockupLinear.createWithDurationsLL}.

Returns

NameTypeDescription
streamIdsuint256[]The ids of the newly created streams.

createWithTimestampsLL

Creates a batch of LL streams using createWithTimestampsLL.

Requirements:

  • There must be at least one element in batch.
  • All requirements from {ISablierLockupLinear.createWithTimestampsLL} must be met for each stream.
function createWithTimestampsLL(
ISablierLockup lockup,
IERC20 token,
BatchLockup.CreateWithTimestampsLL[] calldata batch
)
external
returns (uint256[] memory streamIds);

Parameters

NameTypeDescription
lockupISablierLockupThe address of the SablierLockup contract.
tokenIERC20The contract address of the ERC-20 token to be distributed.
batchBatchLockup.CreateWithTimestampsLL[]An array of structs, each encapsulating a subset of the parameters of {ISablierLockupLinear.createWithTimestampsLL}.

Returns

NameTypeDescription
streamIdsuint256[]The ids of the newly created streams.

createWithDurationsLT

Creates a batch of LT streams using createWithDurationsLT.

Requirements:

  • There must be at least one element in batch.
  • All requirements from {ISablierLockupTranched.createWithDurationsLT} must be met for each stream.
function createWithDurationsLT(
ISablierLockup lockup,
IERC20 token,
BatchLockup.CreateWithDurationsLT[] calldata batch
)
external
returns (uint256[] memory streamIds);

Parameters

NameTypeDescription
lockupISablierLockupThe address of the SablierLockup contract.
tokenIERC20The contract address of the ERC-20 token to be distributed.
batchBatchLockup.CreateWithDurationsLT[]An array of structs, each encapsulating a subset of the parameters of {ISablierLockupTranched.createWithDurationsLT}.

Returns

NameTypeDescription
streamIdsuint256[]The ids of the newly created streams.

createWithTimestampsLT

Creates a batch of LT streams using createWithTimestampsLT.

Requirements:

  • There must be at least one element in batch.
  • All requirements from {ISablierLockupTranched.createWithTimestampsLT} must be met for each stream.
function createWithTimestampsLT(
ISablierLockup lockup,
IERC20 token,
BatchLockup.CreateWithTimestampsLT[] calldata batch
)
external
returns (uint256[] memory streamIds);

Parameters

NameTypeDescription
lockupISablierLockupThe address of the SablierLockup contract.
tokenIERC20The contract address of the ERC-20 token to be distributed.
batchBatchLockup.CreateWithTimestampsLT[]An array of structs, each encapsulating a subset of the parameters of {ISablierLockupTranched.createWithTimestampsLT}.

Returns

NameTypeDescription
streamIdsuint256[]The ids of the newly created streams.

Events

CreateLockupBatch

Emitted when a batch of Lockup streams are created.

event CreateLockupBatch(address indexed funder, ISablierLockup indexed lockup, uint256[] streamIds);

Parameters

NameTypeDescription
funderaddressThe address funding the streams.
lockupISablierLockupThe address of the SablierLockup contract used to create the streams.
streamIdsuint256[]The ids of the newly created streams, the ones that were successfully created.