Using the IbAlluo contract directly to create streams
1. Grant Permissions first!
/// @notice Formats permissios so users can approve the ibAlluo contract as an operator of streams
/// @dev This can be removed once the frontend hardcodes the function call / does it inside ethers.js.
function formatPermissions() public view returns (bytes memory) {
return abi.encodeCall(
cfaV1Lib.cfa.authorizeFlowOperatorWithFullControl,
(
ISuperfluidToken(superToken),
address(this),
new bytes(0)
)
);
}let encodeData = await ibAlluoCurrent.formatPermissions();
let superhost = await ethers.getContractAt("Superfluid", "0x3E14dC1b13c488a8d5D310918780c983bD5982E7");
await superhost.callAgreement(
"0x6EeE6060f715257b970700bc2656De21dEdF074C",
encodeData,
"0x"
)2. Once permissions are granted, now call the createFlow function
PreviousA closer look at the integration between IbAlluo and StIbAlluoNextLiquidity Handler and adapters
Last updated