Skip to main content

ISablierFactoryMerkleVCA

Git Source

Inherits: ISablierFactoryMerkleBase

Title: ISablierFactoryMerkleVCA

A factory that deploys MerkleVCA campaign contracts.

See the documentation in ISablierMerkleVCA.

Functions​

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
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.token must not be the forbidden native token.
  • campaignParams.aggregateAmount must be greater than 0.
  • Both campaignParams.vestingStartTime and campaignParams.vestingEndTime must be greater than 0.
  • campaignParams.vestingEndTime must be greater than campaignParams.vestingStartTime.
  • campaignParams.expiration must be greater than 0.
  • campaignParams.expiration must be at least 1 week beyond the end time to ensure loyal recipients have enough time to claim.
  • campaignParams.unlockPercentage must not be greater than 1e18, equivalent to 100%.
function createMerkleVCA(
MerkleVCA.ConstructorParams memory campaignParams,
uint256 recipientCount
)
external
returns (ISablierMerkleVCA merkleVCA);

Parameters

NameTypeDescription
campaignParamsMerkleVCA.ConstructorParamsStruct encapsulating the SablierMerkleVCA parameters.
recipientCountuint256The total number of recipient addresses eligible for the airdrop.

Returns

NameTypeDescription
merkleVCAISablierMerkleVCAThe address of the newly created MerkleVCA campaign.

Events​

CreateMerkleVCA​

Emitted when a SablierMerkleVCA campaign is created.

event CreateMerkleVCA(
ISablierMerkleVCA indexed merkleVCA,
MerkleVCA.ConstructorParams campaignParams,
uint256 recipientCount,
address comptroller,
uint256 minFeeUSD
);