LogoLogo
  • 🌊Superfluid
  • Protocol Overview
    • πŸ’‘What is Superfluid?
    • πŸ“„In-Depth Overview
      • Super Tokens
      • Super Agreements
        • 🚰Money Streaming (CFA)
        • ✳️Distributions (IDA)
        • 🌊Streaming Distributions
      • Super Apps
      • Superfluid Host
    • 🧠Use Cases
      • Recurring Payments
      • DeFi
      • Social & Community
      • Gaming
    • πŸ“”Glossary of Terms
  • Developers
    • πŸƒQuickstart
    • πŸͺ™Super Tokens
      • Super Tokens - Solidity
      • Super Tokens - SDK Core
      • Super Tokens - Frontend Examples
      • Types of Super Tokens
      • Deploy a Super Token
        • Deploying a Wrapper Super Token
        • Deploying a Self Governed Super Token
        • Deploying a Pure Super Token
      • In-Depth
        • Tracking Super Token Balances
        • ERC777 in Super Tokens
      • Test Super Token Faucet
    • 🌊Money Streaming (CFA)
      • Solidity
        • Read Methods
          • getFlowInfo
          • getFlowRate
          • getNetFlowRate
        • Write Methods
          • createFlow
          • updateFlow
          • deleteFlow
          • With User Data
          • With Context
      • SDK Core
        • Read Methods
          • getFlow
          • getNetFlow
          • getAccountFlowInfo
        • Write Methods
          • createFlow
          • updateFlow
          • deleteFlow
      • Access Control List (ACL)
        • Solidity
          • createFlowFrom
          • updateFlowFrom
          • deleteFlowFrom
          • setFlowPermissions
          • setMaxFlowPermissions
          • revokeFlowPermissions
          • increaseFlowRateAllowanceWithPermissions
          • decreaseFlowRateAllowanceWithPermissions
          • getFlowPermissions
        • SDK Core
          • createFlowByOperator
          • updateFlowByOperator
          • deleteFlowByOperator
          • updateFlowOperatorPermissions
          • revokeFlowOperatorPermissions
          • increaseFlowRateAllowanceWithPermissions
          • getFlowOperatorData
      • Frontend Examples
      • More...
        • Flow Rate Time Frames
        • Building Batched Streams in Safe
        • Flow NFTs
    • ✳️Distributions (IDA)
      • IDA - Solidity
      • IDA - SDK Core
      • IDA - Frontend Examples
    • πŸ€–Super Apps
      • Super Apps in Depth
      • Super App Callbacks
        • Calling Agreements In Super Apps
      • User Data
        • NFT Billboard Example
      • SuperAppBaseFlow
      • Super App Examples
      • Super App Deployment Guide
    • 🧺Batch Calls
      • Batch Calls - SDK Core
      • Batch Calls - Frontend Examples
    • βš™οΈAutomations
      • Auto-Wrap
        • Dev Guide
      • Stream Scheduler
        • Dev Guide
      • Vesting Scheduler
        • Dev Guide
      • Stream Accounting API
        • Dev Guide
      • Automation Subgraphs
        • Stream Scheduler Subgraph
        • Vesting Scheduler Subgraph
        • Auto Wrap Subgraph
    • πŸ—οΈIntegration Guides
      • For Your Integration: The Basics
        • Supporting Super Tokens
        • Supporting Money Streams
        • Supporting Instant Distributions
      • Gating with Superfluid Subscriptions & Guild.xyz
      • Displaying Token Balances
      • Useful Queries for Your Integration
        • Instant Distribution Events
        • Money Streaming Events
        • Super Token Events
        • Other Helpful Queries
      • Constructing Links to The Superfluid Dashboard
    • πŸ”Superfluid Subscriptions
      • Superfluid Checkout Widget
      • Implementing Subscriptions in your App
    • SDK Core General
      • Initialization
      • Functionality
      • Getting Data
      • Resolver
      • Reference Docs
    • Solidity General
      • Calling Super Agreements
      • Libraries
      • Resolver
    • Testing Guide
      • Hardhat Testing
      • Foundry Testing
      • In-Depth
        • Hardhat Mainnet Fork Testing
        • Super App Testing on Mainnet Forks
    • Subgraph
    • Reference
      • Deploying The Framework
      • EVM Contracts
      • SDK Redux
      • Superfluid Console
      • Superfluid Protocol Addresses
    • Contract Addresses
  • Sentinels
    • πŸ₯…Liquidations & TOGA
    • πŸ€–Running a Sentinel
    • πŸ—ΊοΈSolvency Dashboard
  • Resources
    • 🌊Superfluid Wave Pool
    • πŸ“œSuperfluid on Ethereum Mainnet
    • πŸ’°Bounty Program
    • πŸ›‘οΈSecurity & Bug Bounties
    • πŸ’‘Project Ideas
    • πŸ—³οΈToken Dashboard Submission
    • πŸŽ₯Videos
    • Superfluid Deployment Guide
    • Learn about Ethereum
    • Code of Conduct
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. Money Streaming (CFA)
  3. Access Control List (ACL)
  4. Solidity

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.

Example Usage

// Alice currently has permissions of 3 (Create or Update)
// We want to give her the ability to Delete as well and
// increasing her flow rate allowance by 100 wei/sec

someSuperToken.increaseFlowRateAllowanceWithPermissions(
    alice,
    4,        // Delete is represented by 4 on the ACL bitmask
    100
)

// Now Alice has 100 more wei/sec by which she can increase the senders stream
// and now has permissions to Create or Update OR Delete streams for the senders.
// That effectively gives Alice permissions of 7 (Create, Update, or Delete).
PreviousrevokeFlowPermissionsNextdecreaseFlowRateAllowanceWithPermissions

Last updated 1 year ago

Was this helpful?

ACL Permission are designated with the . 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.

🌊
ACL permissions bitmask