Skip to main content

SablierV2MerkleStreamerLL

Git Source

Inherits: ISablierV2MerkleStreamerLL SablierV2MerkleStreamer

See the documentation in ISablierV2MerkleStreamerLL.

State Variables

LOCKUP_LINEAR

The address of the {SablierV2LockupLinear} contract.

ISablierV2LockupLinear public immutable override LOCKUP_LINEAR;

streamDurations

The total streaming duration of each stream, after claim.

LockupLinear.Durations public override streamDurations;

User Facing Functions

constructor

Constructs the contract by initializing the immutable state variables, and max approving the Sablier contract.

constructor(
address initialAdmin,
ISablierV2LockupLinear lockupLinear,
IERC20 asset,
bytes32 merkleRoot,
uint40 expiration,
LockupLinear.Durations memory streamDurations_,
bool cancelable,
bool transferable
)
SablierV2MerkleStreamer(initialAdmin, asset, lockupLinear, merkleRoot, expiration, cancelable, transferable)
{}

claim

Makes the claim by creating a Lockup Linear stream to the recipient.

Emits a {Claim} event. Requirements:

  • The protocol fee must be zero.
  • The campaign must not have expired.
  • The stream must not have been claimed already.
  • The Merkle proof must be valid.
function claim(
uint256 index,
address recipient,
uint128 amount,
bytes32[] calldata merkleProof
)
external
returns (uint256 streamId);
NameTypeDescription
indexuint256The index of the recipient in the Merkle tree.
addressrecipientThe address of the stream holder.
amountuint128The amount of tokens to be streamed.
bytes32merkleProofThe Merkle proof of inclusion in the stream.