sf.cfaV1.createFlow()and pass in the sender, receiver, flowRate, and superToken. There's also an optional field you can use called
userData- which you can learn more about in our guide on the topic.
flowRate(i.e. how much DAIx you want to send in in wei/second) to send yourself a stream of DAIx. Scroll down in the React App page (on the right side of the screen below) to see your flowRate converted into DAIx per month.
sf.cfaV1.updateFlow()- except this time you'll need to pass in a new
flowRate. If you attempt to use the same
flowRate, or if you try to edit a stream which does not currently exist, this function will revert. Give it a try:
sf.cfaV1.deleteFlow()function. If you attempt to delete a flow which does not exist, it will revert.
NOTE: you need to have DAIx on Kovan in your wallet for the below example to work. Sending yourself a stream using the above examples is a great way to get some 😁Also - be patient with Metamask when testing directly in line, some users have reported slightly longer than normal load times.
sf.cfaV1.createFlow()function within our SDK:
flowRate- the amount of tokens being streamed per second, denominated in wei (i.e. with 18 decimals)
receiver- the recipient of the money stream
superToken- the token being streamed
senderaccount has a balance > 0 of the
superTokenbeing used for the stream. If you let your balance hit zero, your deposit will be liquidated by the network, and your stream will be closed.
web3Provider(i.e. a metamask connection in the browser) instead of an RPC URL. You can see the SDK's README for an example of this.
sf.createSigner()method to create a signer with this address.
NOTE: In the above sections, you'll be able to send yourself test tokens. Please don't take egregious amounts of tokens from the example address used. It will never be used to hold real value. You'll just be making this tutorial worse for everyone else who comes here trying to learn (and you're 100% NGMI if you can't figure out how to get free test tokens from our dashboard).