Calling Super Agreements
Using Superfluid at the Smart Contract Level
Working With Superfluid Using Solidity
pragma solidity ^0.8.0
import { ISuperfluid }from "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol"; //"@superfluid-finance/ethereum-monorepo/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluid.sol";
import { IConstantFlowAgreementV1 } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol";
import { IInstantDistributionAgreementV1 } from "@superfluid-finance/ethereum-contracts/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol";//creating a flow in pure solidity
host.callAgreement(
cfa,
abi.encodeWithSelector(
cfa.createFlow.selector,
token,
receiver,
flowRate,
new bytes(0) // placeholder - always pass in bytes(0)
),
"0x" //userData
);Common Mistakes
Last updated