Skip to main content

Errors

Background​

The Sablier Protocol handles errors with the convenient and gas-efficient custom error syntax introduced in Solidity v0.8.4.

The error data encoding is identical to the ABI encoding used for functions, e.g.:

error SablierLockupBase_WithdrawAmountZero(uint256 streamId);

Yields the following 4-byte selector in the contract's ABI:

bytes4(keccak256(bytes("SablierLockupBase_WithdrawAmountZero(uint256)")))
// 0xf747ab7c

Naming Pattern​

With the exception of a few generics, all errors in Sablier Protocol adhere to the naming pattern <ContractName>_<ErrorName>.

Incorporating the contract name as a prefix offers context, making it easier for end users to pinpoint the contract responsible for a reverted transaction. This approach is particularly helpful for complex transactions involving multiple contracts.

Lockup Error List​

Click here to see the full error list in Lockup protocol.

Airdrops Error List​

Click here to see the full error list in Airdrops protocol.

Flow Error List​

Click here to see the full error list in Flow protocol.

Bob Error List​

Click here to see the full error list in Bob protocol.

Resources​