Skip to main content

SablierFactoryMerkleInstant

Git Source

Inherits: ISablierFactoryMerkleInstant, SablierFactoryMerkleBase

See the documentation in ISablierFactoryMerkleInstant.

Functions

constructor

constructor(address initialComptroller) SablierFactoryMerkleBase(initialComptroller);

Parameters

NameTypeDescription
initialComptrolleraddressThe address of the initial comptroller contract.

computeMerkleInstant

Computes the deterministic address where SablierMerkleInstant campaign will be deployed.

Reverts if the requirements from {createMerkleInstant} are not met.

function computeMerkleInstant(
address campaignCreator,
MerkleInstant.ConstructorParams calldata params
)
external
view
override
returns (address merkleInstant);

createMerkleInstant

Creates a new MerkleInstant campaign for instant distribution of tokens.

Emits a {CreateMerkleInstant} 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.
  • A value of zero for params.expiration means the campaign does not expire. Requirements:
  • params.token must not be the forbidden native token.
function createMerkleInstant(
MerkleInstant.ConstructorParams calldata params,
uint256 aggregateAmount,
uint256 recipientCount
)
external
override
returns (ISablierMerkleInstant merkleInstant);

Parameters

NameTypeDescription
paramsMerkleInstant.ConstructorParamsStruct encapsulating the input parameters, which are documented in {DataTypes}.
aggregateAmountuint256The total amount of ERC-20 tokens to be distributed to all recipients.
recipientCountuint256The total number of recipient addresses eligible for the airdrop.

Returns

NameTypeDescription
merkleInstantISablierMerkleInstantThe address of the newly created MerkleInstant contract.