What it offers
- withdrawFromStream: Withdraw accrued tokens from an active stream
- cancelStream: Cancel a stream and return remaining tokens to sender
- createWithDurations: Create a new linear stream with cliff and total duration
Notes
- Streams are ERC-721 NFTs - the stream recipient is the NFT owner
- cliff: no tokens vest until cliff duration passes, then cliff amount vests immediately
- Tokens accrue linearly between cliff and total duration
- Only cancelable streams can be cancelled; non-cancelable streams run to completion
- Approve the streaming asset to lockupLinear before createWithDurations
- amount in withdraw is uint128, not uint256
Its names in a program
On Ethereum,Sablier is a namespace: its contracts need no import.
Deployments
ABI
LockupLinearABI
import LockupLinearABI from "./protocols/sablier/LockupLinearABI.json"; Speaks for: lockupLinear.
createWithDurations((address sender, address recipient, uint128 totalAmount, address asset, bool cancelable, bool transferable, (uint40 cliff, uint40 total) durations, (address account, uint256 fee) broker) params) returns (uint256 streamId)withdraw(uint256 streamId, address to, uint128 amount)cancel(uint256 streamId)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
