Skip to main content

Errors

Git Source

Title: Errors

Library containing all custom errors the protocol may revert with.

Errors​

SablierBatchLockup_BatchSizeZero​

error SablierBatchLockup_BatchSizeZero();

SablierLockupHelpers_CliffTimeNotLessThanEndTime​

Thrown when trying to create a linear stream with a cliff time not strictly less than the end time.

error SablierLockupHelpers_CliffTimeNotLessThanEndTime(uint40 cliffTime, uint40 endTime);

SablierLockupHelpers_CliffTimeZeroUnlockAmountNotZero​

Thrown when trying to create a stream with a non zero cliff unlock amount when the cliff time is zero.

error SablierLockupHelpers_CliffTimeZeroUnlockAmountNotZero(uint128 cliffUnlockAmount);

SablierLockupHelpers_CreateNativeToken​

Thrown when trying to create a stream with the native token.

error SablierLockupHelpers_CreateNativeToken(address nativeToken);

SablierLockupHelpers_DepositAmountNotEqualToSegmentAmountsSum​

Thrown when trying to create a dynamic stream with a deposit amount not equal to the sum of the segment amounts.

error SablierLockupHelpers_DepositAmountNotEqualToSegmentAmountsSum(
uint128 depositAmount,
uint128 segmentAmountsSum
);

SablierLockupHelpers_DepositAmountNotEqualToTrancheAmountsSum​

Thrown when trying to create a tranched stream with a deposit amount not equal to the sum of the tranche amounts.

error SablierLockupHelpers_DepositAmountNotEqualToTrancheAmountsSum(
uint128 depositAmount,
uint128 trancheAmountsSum
);

SablierLockupHelpers_DepositAmountZero​

Thrown when trying to create a stream with a zero deposit amount.

error SablierLockupHelpers_DepositAmountZero();

SablierLockupHelpers_EndTimeNotEqualToLastSegmentTimestamp​

Thrown when trying to create a dynamic stream with end time not equal to the last segment's timestamp.

error SablierLockupHelpers_EndTimeNotEqualToLastSegmentTimestamp(uint40 endTime, uint40 lastSegmentTimestamp);

SablierLockupHelpers_EndTimeNotEqualToLastTrancheTimestamp​

Thrown when trying to create a tranched stream with end time not equal to the last tranche's timestamp.

error SablierLockupHelpers_EndTimeNotEqualToLastTrancheTimestamp(uint40 endTime, uint40 lastTrancheTimestamp);

SablierLockupHelpers_GranularityTooHigh​

Thrown when trying to create a linear stream with granularity greater than the streamable range.

error SablierLockupHelpers_GranularityTooHigh(uint40 granularity, uint40 streamableRange);

SablierLockupHelpers_SegmentCountZero​

Thrown when trying to create a dynamic stream with no segments.

error SablierLockupHelpers_SegmentCountZero();

SablierLockupHelpers_SegmentTimestampsNotOrdered​

Thrown when trying to create a dynamic stream with unordered segment timestamps.

error SablierLockupHelpers_SegmentTimestampsNotOrdered(
uint256 index,
uint40 previousTimestamp,
uint40 currentTimestamp
);

SablierLockupHelpers_SenderZeroAddress​

Thrown when trying to create a stream with the sender as the zero address.

error SablierLockupHelpers_SenderZeroAddress();

SablierLockupHelpers_ShapeExceeds32Bytes​

Thrown when trying to create a stream with a shape string exceeding 32 bytes.

error SablierLockupHelpers_ShapeExceeds32Bytes(uint256 shapeLength);

SablierLockupHelpers_StartTimeNotLessThanCliffTime​

Thrown when trying to create a linear stream with a start time not strictly less than the cliff time, when the cliff time does not have a zero value.

error SablierLockupHelpers_StartTimeNotLessThanCliffTime(uint40 startTime, uint40 cliffTime);

SablierLockupHelpers_StartTimeNotLessThanEndTime​

Thrown when trying to create a linear stream with a start time not strictly less than the end time.

error SablierLockupHelpers_StartTimeNotLessThanEndTime(uint40 startTime, uint40 endTime);

SablierLockupHelpers_StartTimeNotLessThanFirstSegmentTimestamp​

Thrown when trying to create a dynamic stream with a start time not strictly less than the first segment timestamp.

error SablierLockupHelpers_StartTimeNotLessThanFirstSegmentTimestamp(
uint40 startTime,
uint40 firstSegmentTimestamp
);

SablierLockupHelpers_StartTimeNotLessThanFirstTrancheTimestamp​

Thrown when trying to create a tranched stream with a start time not strictly less than the first tranche timestamp.

error SablierLockupHelpers_StartTimeNotLessThanFirstTrancheTimestamp(
uint40 startTime,
uint40 firstTrancheTimestamp
);

SablierLockupHelpers_StartTimeZero​

Thrown when trying to create a stream with a zero start time.

error SablierLockupHelpers_StartTimeZero();

SablierLockupHelpers_TrancheCountZero​

Thrown when trying to create a tranched stream with no tranches.

error SablierLockupHelpers_TrancheCountZero();

SablierLockupHelpers_TrancheTimestampsNotOrdered​

Thrown when trying to create a tranched stream with unordered tranche timestamps.

error SablierLockupHelpers_TrancheTimestampsNotOrdered(
uint256 index,
uint40 previousTimestamp,
uint40 currentTimestamp
);

SablierLockupHelpers_UnlockAmountsSumTooHigh​

Thrown when trying to create a stream with the sum of the unlock amounts greater than the deposit amount.

error SablierLockupHelpers_UnlockAmountsSumTooHigh(
uint128 depositAmount,
uint128 startUnlockAmount,
uint128 cliffUnlockAmount
);

SablierLockup_AllowToHookUnsupportedInterface​

Thrown when trying to allow to hook a contract that doesn't implement the interface correctly.

error SablierLockup_AllowToHookUnsupportedInterface(address recipient);

SablierLockup_AllowToHookZeroCodeSize​

Thrown when trying to allow to hook an address with no code.

error SablierLockup_AllowToHookZeroCodeSize(address recipient);

SablierLockup_FeeTransferFailed​

Thrown when the fee transfer fails.

error SablierLockup_FeeTransferFailed(address comptroller, uint256 feeAmount);

SablierLockup_InsufficientFeePayment​

Thrown when trying to withdraw with a fee amount less than the minimum fee.

error SablierLockup_InsufficientFeePayment(uint256 feePaid, uint256 minFeeWei);

SablierLockup_InvalidHookSelector​

Thrown when the hook does not return the correct selector.

error SablierLockup_InvalidHookSelector(address recipient);

SablierLockup_NativeTokenAlreadySet​

Thrown when trying to set the native token address when it is already set.

error SablierLockup_NativeTokenAlreadySet(address nativeToken);

SablierLockup_NotTransferable​

Thrown when trying to transfer Stream NFT when transferability is disabled.

error SablierLockup_NotTransferable(uint256 tokenId);

SablierLockup_Overdraw​

Thrown when trying to withdraw an amount greater than the withdrawable amount.

error SablierLockup_Overdraw(uint256 streamId, uint128 amount, uint128 withdrawableAmount);

SablierLockup_WithdrawAmountNotEqualWithdrawableAmount​

Thrown when trying to withdraw a partial amount from a LPG stream.

error SablierLockup_WithdrawAmountNotEqualWithdrawableAmount(
uint256 streamId,
uint128 amount,
uint128 withdrawableAmount
);

SablierLockup_StreamCanceled​

Thrown when trying to cancel or renounce a canceled stream.

error SablierLockup_StreamCanceled(uint256 streamId);

SablierLockup_StreamDepleted​

Thrown when trying to cancel, renounce, or withdraw from a depleted stream.

error SablierLockup_StreamDepleted(uint256 streamId);

SablierLockup_StreamNotCancelable​

Thrown when trying to cancel or renounce a stream that is not cancelable.

error SablierLockup_StreamNotCancelable(uint256 streamId);

SablierLockup_StreamNotDepleted​

Thrown when trying to burn a stream that is not depleted.

error SablierLockup_StreamNotDepleted(uint256 streamId);

SablierLockup_StreamSettled​

Thrown when trying to cancel or renounce a settled stream.

error SablierLockup_StreamSettled(uint256 streamId);

SablierLockup_TargetPriceTooLow​

Thrown when trying to create a price-gated stream with a target price not greater than the current oracle price.

error SablierLockup_TargetPriceTooLow(uint128 targetPrice, uint128 latestPrice);

SablierLockup_Unauthorized​

Thrown when msg.sender lacks authorization to perform an action.

error SablierLockup_Unauthorized(uint256 streamId, address caller);

SablierLockup_WithdrawalAddressNotRecipient​

Thrown when trying to withdraw to an address other than the recipient's.

error SablierLockup_WithdrawalAddressNotRecipient(uint256 streamId, address caller, address to);

SablierLockup_WithdrawAmountZero​

Thrown when trying to withdraw zero tokens from a stream.

error SablierLockup_WithdrawAmountZero(uint256 streamId);

SablierLockup_WithdrawArrayCountsNotEqual​

Thrown when trying to withdraw from multiple streams and the number of stream IDs does not match the number of withdraw amounts.

error SablierLockup_WithdrawArrayCountsNotEqual(uint256 streamIdsCount, uint256 amountsCount);

SablierLockup_WithdrawToZeroAddress​

Thrown when trying to withdraw to the zero address.

error SablierLockup_WithdrawToZeroAddress(uint256 streamId);

SablierLockupState_NotExpectedModel​

Thrown when a function is called on a stream that does not use the expected Lockup model.

error SablierLockupState_NotExpectedModel(Lockup.Model actualLockupModel, Lockup.Model expectedLockupModel);

SablierLockupState_Null​

Thrown when the ID references a null stream.

error SablierLockupState_Null(uint256 streamId);