SablierFactoryMerkleVCA
Inherits: ISablierFactoryMerkleVCA, SablierFactoryMerkleBase
Title: SablierFactoryMerkleVCA
See the documentation in ISablierFactoryMerkleVCA.
Functions
constructor
constructor(address initialComptroller) SablierFactoryMerkleBase(initialComptroller);
Parameters
| Name | Type | Description |
|---|---|---|
initialComptroller | address | The address of the initial comptroller contract. |
computeMerkleVCA
Computes the deterministic address where SablierMerkleVCA campaign will be deployed.
Reverts if the requirements from {createMerkleVCA} are not met.
function computeMerkleVCA(
address campaignCreator,
MerkleVCA.ConstructorParams calldata campaignParams
)
external
view
override
returns (address merkleVCA);
createMerkleVCA
Creates a new MerkleVCA campaign for variable distribution of tokens.
Emits a {CreateMerkleVCA} event. Notes:
- The contract is created with CREATE2.
- The campaign's fee will be set to the min USD fee unless a custom fee is set for
msg.sender. - Users interested into funding the campaign before its deployment must meet the below requirements, otherwise the campaign deployment will revert. Requirements:
campaignParams.tokenmust not be the forbidden native token.campaignParams.aggregateAmountmust be greater than 0.- Both
campaignParams.vestingStartTimeandcampaignParams.vestingEndTimemust be greater than 0. campaignParams.vestingEndTimemust be greater thancampaignParams.vestingStartTime.campaignParams.expirationmust be greater than 0.campaignParams.expirationmust be at least 1 week beyond the end time to ensure loyal recipients have enough time to claim.campaignParams.unlockPercentagemust not be greater than 1e18, equivalent to 100%.
function createMerkleVCA(
MerkleVCA.ConstructorParams calldata campaignParams,
uint256 recipientCount
)
external
returns (ISablierMerkleVCA merkleVCA);
Parameters
| Name | Type | Description |
|---|---|---|
campaignParams | MerkleVCA.ConstructorParams | Struct encapsulating the SablierMerkleVCA parameters. |
recipientCount | uint256 | The total number of recipient addresses eligible for the airdrop. |
Returns
| Name | Type | Description |
|---|---|---|
merkleVCA | ISablierMerkleVCA | The address of the newly created MerkleVCA campaign. |
_checkDeploymentParams
Validate the deployment parameters.
function _checkDeploymentParams(
uint256 aggregateAmount,
uint40 expiration,
address token,
UD60x18 unlockPercentage,
uint40 vestingEndTime,
uint40 vestingStartTime
)
private
view;