ISablierV2MerkleLockupFactory
Deploys MerkleLockup campaigns with CREATE2.
Functions
isPercentagesSum100
Verifies if the sum of percentages in tranches
equals 100% , i.e. 1e18.
Reverts if the sum of percentages overflows.
function isPercentagesSum100(MerkleLT.TrancheWithPercentage[] calldata tranches) external pure returns (bool result);
Parameters
Name | Type | Description |
---|---|---|
tranches | MerkleLT.TrancheWithPercentage[] | The tranches with their respective unlock percentages. |
Returns
Name | Type | Description |
---|---|---|
result | bool | True if the sum of percentages equals 100%, otherwise false. |
createMerkleLL
Creates a new MerkleLockup campaign with a LockupLinear distribution.
Emits a CreateMerkleLL event.
function createMerkleLL(
MerkleLockup.ConstructorParams memory baseParams,
ISablierV2LockupLinear lockupLinear,
LockupLinear.Durations memory streamDurations,
uint256 aggregateAmount,
uint256 recipientCount
)
external
returns (ISablierV2MerkleLL merkleLL);
Parameters
Name | Type | Description |
---|---|---|
baseParams | MerkleLockup.ConstructorParams | Struct encapsulating the SablierV2MerkleLockup parameters, which are documented in {DataTypes}. |
lockupLinear | ISablierV2LockupLinear | The address of the SablierV2LockupLinear contract. |
streamDurations | LockupLinear.Durations | The durations for each stream. |
aggregateAmount | uint256 | The total amount of ERC-20 assets to be distributed to all recipients. |
recipientCount | uint256 | The total number of recipients who are eligible to claim. |
Returns
Name | Type | Description |
---|---|---|
merkleLL | ISablierV2MerkleLL | The address of the newly created MerkleLockup contract. |
createMerkleLT
Creates a new MerkleLockup campaign with a LockupTranched distribution.
Emits a CreateMerkleLT event.
function createMerkleLT(
MerkleLockup.ConstructorParams memory baseParams,
ISablierV2LockupTranched lockupTranched,
MerkleLT.TrancheWithPercentage[] memory tranchesWithPercentages,
uint256 aggregateAmount,
uint256 recipientCount
)
external
returns (ISablierV2MerkleLT merkleLT);
Parameters
Name | Type | Description |
---|---|---|
baseParams | MerkleLockup.ConstructorParams | Struct encapsulating the SablierV2MerkleLockup parameters, which are documented in {DataTypes}. |
lockupTranched | ISablierV2LockupTranched | The address of the SablierV2LockupTranched contract. |
tranchesWithPercentages | MerkleLT.TrancheWithPercentage[] | The tranches with their respective unlock percentages. |
aggregateAmount | uint256 | The total amount of ERC-20 assets to be distributed to all recipients. |
recipientCount | uint256 | The total number of recipients who are eligible to claim. |
Returns
Name | Type | Description |
---|---|---|
merkleLT | ISablierV2MerkleLT | The address of the newly created MerkleLockup contract. |
Events
CreateMerkleLL
Emitted when a SablierV2MerkleLL campaign is created.
event CreateMerkleLL(
ISablierV2MerkleLL indexed merkleLL,
MerkleLockup.ConstructorParams baseParams,
ISablierV2LockupLinear lockupLinear,
LockupLinear.Durations streamDurations,
uint256 aggregateAmount,
uint256 recipientCount
);
CreateMerkleLT
Emitted when a SablierV2MerkleLT campaign is created.
event CreateMerkleLT(
ISablierV2MerkleLT indexed merkleLT,
MerkleLockup.ConstructorParams baseParams,
ISablierV2LockupTranched lockupTranched,
MerkleLT.TrancheWithPercentage[] tranchesWithPercentages,
uint256 totalDuration,
uint256 aggregateAmount,
uint256 recipientCount
);