Cancel Streams
This section assumes that you have already gone through the setup part.
See the Access Control guide for an overview of who is allowed to cancel streams.
Canceling streams involves stopping the flow of assets before the stream's end time and refunding the remaining funds to the sender. However, the portion that has already been streamed is not automatically transferred - the recipient will need to withdraw it themselves later.
There are two functions that can be used to cancel streams:
cancel
: cancels a single streamcancelMultiple
: cancels multiple streams at once
To call any of these functions, you need to have created a cancelable stream. If you don't have one yet, go back to the
previous guide and create a stream. Then, you can use the cancel
function like this:
loading...
In addition to the cancel
function, there is the cancelMultiple
function, which allows you to cancel several streams
at once:
loading...