Skip to main content

ISablierV2BatchLockup

Git Source

Helper to batch create Sablier V2 Lockup streams.

Functions

createWithDurationsLL

Creates a batch of LockupLinear streams using createWithDurations.

Requirements:

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

Parameters

NameTypeDescription
lockupLinearISablierV2LockupLinearThe address of the SablierV2LockupLinear contract.
assetIERC20The contract address of the ERC-20 asset to be distributed.
batchBatchLockup.CreateWithDurationsLL[]An array of structs, each encapsulating a subset of the parameters of {SablierV2LockupLinear.createWithDurations}.

Returns

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

createWithTimestampsLL

Creates a batch of LockupLinear streams using createWithTimestamps.

Requirements:

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

Parameters

NameTypeDescription
lockupLinearISablierV2LockupLinearThe address of the SablierV2LockupLinear contract.
assetIERC20The contract address of the ERC-20 asset to be distributed.
batchBatchLockup.CreateWithTimestampsLL[]An array of structs, each encapsulating a subset of the parameters of {SablierV2LockupLinear.createWithTimestamps}.

Returns

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

createWithDurationsLD

Creates a batch of Lockup Dynamic streams using createWithDurations.

Requirements:

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

Parameters

NameTypeDescription
lockupDynamicISablierV2LockupDynamicThe address of the SablierV2LockupDynamic contract.
assetIERC20The contract address of the ERC-20 asset to be distributed.
batchBatchLockup.CreateWithDurationsLD[]An array of structs, each encapsulating a subset of the parameters of {SablierV2LockupDynamic.createWithDurations}.

Returns

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

createWithTimestampsLD

Creates a batch of Lockup Dynamic streams using createWithTimestamps.

Requirements:

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

Parameters

NameTypeDescription
lockupDynamicISablierV2LockupDynamicThe address of the SablierV2LockupDynamic contract.
assetIERC20The contract address of the ERC-20 asset to be distributed.
batchBatchLockup.CreateWithTimestampsLD[]An array of structs, each encapsulating a subset of the parameters of {SablierV2LockupDynamic.createWithTimestamps}.

Returns

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

createWithDurationsLT

Creates a batch of LockupTranched streams using createWithDurations.

Requirements:

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

Parameters

NameTypeDescription
lockupTranchedISablierV2LockupTranchedThe address of the SablierV2LockupTranched contract.
assetIERC20The contract address of the ERC-20 asset to be distributed.
batchBatchLockup.CreateWithDurationsLT[]An array of structs, each encapsulating a subset of the parameters of {SablierV2LockupTranched.createWithDurations}.

Returns

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

createWithTimestampsLT

Creates a batch of LockupTranched streams using createWithTimestamps.

Requirements:

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

Parameters

NameTypeDescription
lockupTranchedISablierV2LockupTranchedThe address of the SablierV2LockupTranched contract.
assetIERC20The contract address of the ERC-20 asset to be distributed.
batchBatchLockup.CreateWithTimestampsLT[]An array of structs, each encapsulating a subset of the parameters of {SablierV2LockupTranched.createWithTimestamps}.

Returns

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