Skip to main content

ISablierMerkleExecute

Git Source

Inherits: ISablierMerkleBase

Title: ISablierMerkleExecute

MerkleExecute enables an airdrop distribution model where eligible users claim tokens and immediately execute a call on a target contract (useful for staking, lending pool deposits). This is achieved by approving the target contract to spend user's tokens, followed by a call using the stored function selector combined with user-provided arguments.

Functions

SELECTOR

The function selector to call on the target contract.

This is an immutable state variable.

function SELECTOR() external view returns (bytes4);

TARGET

The address of the target contract to call with the claim amount.

This is an immutable state variable.

function TARGET() external view returns (address);

claimAndExecute

Claim airdrop and execute the call to the target contract.

It emits a ClaimExecute event. Notes:

function claimAndExecute(
uint256 index,
uint128 amount,
bytes32[] calldata merkleProof,
bytes calldata selectorArguments
)
external
payable;

Parameters

NameTypeDescription
indexuint256The index of msg.sender in the Merkle tree.
amountuint128The amount of ERC-20 tokens allocated to msg.sender.
merkleProofbytes32[]The proof of inclusion in the Merkle tree.
selectorArgumentsbytesThe function ABI-encoded arguments for SELECTOR.

Events

ClaimExecute

Emitted when a claim is executed on behalf of an eligible recipient.

event ClaimExecute(uint256 index, address indexed recipient, uint128 amount, address indexed target);