ISablierFactoryMerkleInstant
Inherits: ISablierFactoryMerkleBase
Title: ISablierFactoryMerkleInstant
A factory that deploys MerkleInstant campaign contracts.
See the documentation in ISablierMerkleInstant.
Functions
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 campaignParams
)
external
view
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
campaignParams.expirationmeans the campaign does not expire. Requirements: campaignParams.tokenmust not be the forbidden native token.
function createMerkleInstant(
MerkleInstant.ConstructorParams calldata campaignParams,
uint256 aggregateAmount,
uint256 recipientCount
)
external
returns (ISablierMerkleInstant merkleInstant);
Parameters
| Name | Type | Description |
|---|---|---|
campaignParams | MerkleInstant.ConstructorParams | Struct encapsulating the SablierMerkleInstant parameters. |
aggregateAmount | uint256 | The total amount of ERC-20 tokens to be distributed to all recipients. |
recipientCount | uint256 | The total number of recipient addresses eligible for the airdrop. |
Returns
| Name | Type | Description |
|---|---|---|
merkleInstant | ISablierMerkleInstant | The address of the newly created MerkleInstant contract. |
Events
CreateMerkleInstant
Emitted when a SablierMerkleInstant campaign is created.
event CreateMerkleInstant(
ISablierMerkleInstant indexed merkleInstant,
MerkleInstant.ConstructorParams campaignParams,
uint256 aggregateAmount,
uint256 recipientCount,
address comptroller,
uint256 minFeeUSD
);