Note: the ACL features are only available on testnets only as of May 2, 2022.
Note: If you set a flow rate allowance equal to the maximum flow rate then this value is never deducted. In solidity, the maximum flow rate could be represented by
updateFlowOperatorPermissionsallows you to set granular permissions for operators over streams.
authorizeFlowOperatorWithFullControlallows you to grant full access over streams to an operator. Also note that, if an operator is granted full access via this function, their flow allowance will not be deducted after increasing flowRates of the sender or creating flows on behalf of the sender
revokeFlowOperatorWithFullControlallows you to remove all access to stream operation from your operator
flowOperatorparameters are straightforward, but the
flowRateAllowanceparameters require more explanation.
permissionsvalue is a bit mask which represents a specific level of access over streams. This may be a single permission (i.e. create, update, or delete) or some combination of permissions (i.e. create and update, update and delete, create and delete, or create, update and delete). When passing in a value, you will use a decimal value which represents a level of access. . The below table shows the binary representation of the permission value, and its associated decimal value. When calling the
updateFlowOperatorPermissionsfunction, you will pass in the decimal value associated with each permission level:
NOTE: passing in any number other than one of the numbers below will cause the transaction to revert
flowRateAllowanceparameter allows you to define the total increase in flow rates your operator is allowed to make. Your operator’s
flowRateAllowanceis not impacted by deleting streams or updating streams with a new flow rate which is less than the previous flow rate (i.e. by reducing stream flow rates).
flowRateAllowancewill decrease by the amount equal to the
flowRateof the newly created stream. In the case of flow updates, the operator’s
flowRateAllowancewill be decreased by an amount equal to the delta between the new higher flow rate and previous flow rate.
385802469135802tokens per second). If our operator creates a stream on our behalf with a
flowRateof 500 tokens per month, then the operator’s remaining
flowRateAllowancebecomes 500 tokens per month (
1000/month - 500/month). Then, if our operator updates another one of our streams that is already outstanding by increasing our
flowRateby 250 tokens per month, then our operator’s
flowRateAllowancewill decrease by another 250 tokens per month, leaving the remaining flowRateAllowance at 250 tokens per month (
500/month - 250/month).
flowRatesdo not impact a flowOperator’s allowance at all. If, in the previous example, our operator were to delete flow #1 and update flow #2 by reducing the
flowRateby 100 tokens per month, these actions would each not impact the
flowRateAllowance. The operator would still have a flow rate allowance of 250 tokens per month remaining. But, if they were to increase it by 50 tokens per month after decreasing, their new flow rate allowance would now be 200 tokens per month.
ByOperatorsuffix to perform these operations: