SablierMerkleLT
Inherits: ISablierMerkleLT, SablierMerkleBase
See the documentation in ISablierMerkleLT.
State Variables
LOCKUP
The address of the SablierLockup contract.
ISablierLockup public immutable override LOCKUP;
STREAM_CANCELABLE
A flag indicating whether the streams can be canceled.
This is an immutable state variable.
bool public immutable override STREAM_CANCELABLE;
STREAM_START_TIME
The start time of the streams created through {SablierMerkleBase.claim} function.
A start time value of zero will be treated as block.timestamp
.
uint40 public immutable override STREAM_START_TIME;
STREAM_TRANSFERABLE
A flag indicating whether the stream NFTs are transferable.
This is an immutable state variable.
bool public immutable override STREAM_TRANSFERABLE;
TOTAL_PERCENTAGE
The total percentage of the tranches.
uint64 public immutable override TOTAL_PERCENTAGE;
_tranchesWithPercentages
The tranches with their respective unlock percentages and durations.
MerkleLT.TrancheWithPercentage[] internal _tranchesWithPercentages;
Functions
constructor
Constructs the contract by initializing the immutable state variables, and max approving the Lockup contract.
constructor(
MerkleBase.ConstructorParams memory baseParams,
address campaignCreator,
ISablierLockup lockup,
bool cancelable,
bool transferable,
uint40 streamStartTime,
MerkleLT.TrancheWithPercentage[] memory tranchesWithPercentages
)
SablierMerkleBase(baseParams, campaignCreator);
getTranchesWithPercentages
Retrieves the tranches with their respective unlock percentages and durations.
function getTranchesWithPercentages() external view override returns (MerkleLT.TrancheWithPercentage[] memory);
_claim
This function is implemented by child contracts, so the logic varies depending on the model.
function _claim(uint256 index, address recipient, uint128 amount) internal override;
_calculateStartTimeAndTranches
Calculates the start time, and the tranches based on the claim amount and the unlock percentages for each tranche.
function _calculateStartTimeAndTranches(uint128 claimAmount)
internal
view
returns (uint40 startTime, LockupTranched.Tranche[] memory tranches);