CFAv1Library.sol)
makes working with the CFA much simpler. Instead of following the host.callAgreement(...)
pattern, you can make calls to the protocol in fewer lines of code. If you've already looked at the Superfluid core-sdk, then the syntax for creating, updating, and deleting flows will look similar to what you may have already seen. For a more advanced set of examples using the CFA Library, you can refer to this mock contract.receiver
- the address
of the receivertoken
- the ISuperToken
used in the flowflowRate
- an int96
variable which represents the total amount of the token
you'd like to send per second, denominated in wei
userData
- an optional bytes
value which represents additional data you'd like to pass along with your function call. You can learn more about user data here.ctx
will be the ctx
which is passed in to the Super App callback by the framework where these functions are being called. This ctx
value is of type bytes
. For example, in the afterAgreementCreated callback:ctx
, will be passed as the ctx
value to the withCtx functions within the library.