superfluid-finance/protocol-monorepo

[ETHEREUM-CONTRACTS] Complete the Superfluid batch operation set

Closed this issue · 2 comments

Why

We have not reviewed the completeness of the (Sueprfluid) batch operations. Since we are about to roll-out the macro forwarder feature, it is a good time to have it reviewed and completed.

What

  • Complete Set of Operation Types
    • SuperToken ERC20/ERC-777 Operations (1-99)
      • OPERATION_TYPE_ERC20_APPROVE
      • OPERATION_TYPE_ERC20_TRANSFER_FROM
      • OPERATION_TYPE_ERC777_SEND
      • OPERATION_TYPE_ERC20_INCREASE_ALLOWANCE
      • OPERATION_TYPE_ERC20_DECREASE_ALLOWANCE
    • SuperToken Upgrade/Downgrade Operations (101-199)
      • OPERATION_TYPE_SUPERTOKEN_UPGRADE
      • OPERATION_TYPE_SUPERTOKEN_DOWNGRADE
      • OPERATION_TYPE_SUPERTOKEN_UPGRADE_TO # equiv. ISuperToken.upgradeTo
      • OPERATION_TYPE_SUPERTOKEN_DOWNGRADE_TO # equiv. ISeperToken.downgradeTo
    • Superfluid Host Call Proxies (201-299)
      • OPERATION_TYPE_SUPERFLUID_CALL_AGREEMENT
      • OPERATION_TYPE_SUPERFLUID_CALL_APP_ACTION # deprecate #1038, by not doing it.
    • Generic Call Proxies (301-399) # overlapping with multicall3
      • OPERATION_TYPE_SIMPLE_FORWARD_CALL # Using DMZForwarder. Must also support payable.
      • OPERATION_TYPE_ERC2771_FORWARD_CALL # depreciates #478, by implementing it. Also using DMZForwarder. Must also support payable.

Out of Scope

  • New Feature of Batchcalls
    • Allow fail
     struct Operation2 {
         // Operation type. Defined in BatchOperation (Definitions.sol)
         uint32 operationType;
         // Operation target
         address target;
         // Allow the operation fail for unspecified reasons
         bool allowFail;
         // Data specific to the operation
         bytes data;
     }
    
    • batchCall2
    • forwardBatchCall2
  • Out-of-scope discussion(s)
    • a multicalls3 compatible generic call proxies portion of the batch call.

Total missed so far: add permit2 to the catchable:

Adding OPERATION_TYPE_PERMIT2.

d10r commented

permit2 becomes possible through the generic call proxies, so doesn't need explicit support.