increaseFlowRateAllowanceWithPermissions

increaseFlowRateAllowanceWithPermissions

Function Header

/**
     * @dev msgSender from `ctx` increases flow rate allowance for the `flowOperator` by `addedFlowRateAllowance`
     * @dev if `addedFlowRateAllowance` is negative, we revert with CFA_ACL_NO_NEGATIVE_ALLOWANCE
     * @param token Super token address
     * @param flowOperator The permission grantee address
     * @param permissionsToAdd A bitmask representation of the granted permissions to add as a delta
     * @param addedFlowRateAllowance The flow rate allowance delta
     * @param ctx Context bytes (see ISuperfluid.sol for Context struct)
     * @return newCtx The new context bytes
*/
function increaseFlowRateAllowanceWithPermissions(
    ISuperfluidToken token,
    address flowOperator,
    uint8 permissionsToAdd,
    int96 addedFlowRateAllowance
) internal returns (bool)

permissionsToAdd

Using increaseFlowRateAllowanceWithPermissions requires understanding the permissionsToAdd parameter.

ACL Permission are designated with the ACL permissions bitmask. Basically, the permissions level you provide in permissionsToAdd is appended to the existing permissions as though you are saying this account now has its existing permissions OR the new permissions defined by permissionsToAdd. See the example below.

Example Usage

Last updated

Was this helpful?