sablier-withdraw-open-ended-stream
Sablier Flow Stream Withdrawal
Overview
Withdraw available tokens from one or more Sablier Flow open-ended payment streams on the user's behalf. The skill discovers the user's streams through the Sablier indexer, lets the user pick any subset (default: all eligible), and executes one batch(bytes[]) transaction per SablierFlow contract on the selected chain.
Sablier Flow exposes two per-stream withdraw entrypoints (flow/src/interfaces/ISablierFlow.sol:497-531):
withdraw(uint256 streamId, address to, uint128 amount)— explicit-amount withdrawal.withdrawMax(uint256 streamId, address to) returns (uint128)— drains the full currently-withdrawable balance.
Batching is provided by the inherited Batch.batch(bytes[]) payable (SablierFlow.sol:13,39; @sablier/evm-utils/src/Batch.sol). batch delegatecalls every entry against address(this), so msg.sender and msg.value are reused across all sub-calls. Each sub-call can target a different stream, amount, and to address. The batch is all-or-nothing: any sub-call revert bubbles up and reverts the whole transaction. There is no per-stream skip event analogous to Lockup's InvalidWithdrawalInWithdrawMultiple.
This skill charges no markup. The only fee paid is the on-chain protocol fee (calculateMinFeeWei) set by the comptroller; it may be 0. Because batch delegatecalls and reuses msg.value, the required msg.value is max(calculateMinFeeWei across the batch), not the sum.
This skill is a coordinator for Flow withdrawal and execution routing.