Skip to content

Choose a tag to compare

@github-actions github-actions released this 27 Nov 09:11
7cc9961

Changes in this stable release

Added

  • GDA autoconnect feature: now any account can connect pool members using tryConnectPoolFor() as long as they have less than 4 connection slots occupied for that Super Token. This allows for smoother onboarding of new users, allowing Apps to make sure tokens distributed via GDA immediately show up in user's wallets. Accounts can opt out of this by using setConnectPermission(), this is mainly supposed to be used by contracts.

Changed

  • Refactored GeneralDistributionAgreementV1: extracted functionality which reads/writes agreement data from/to the token contract into dedicated libraries:
    • GDAv1StorageLib contains data structures and related encoders/decoders.
    • GDAv1StorageReader contains getters reading agreement data from the token contract, allowing contracts to get this data without making a call to the GDA contract.
    • GDAv1StorageWriter contains functions for writing agreement data to the token contract. This can only be used by the GDA contract itself.
  • bump solc to "0.8.30".
  • Changed EVM target from paris to shanghai because now all networks with supported Superfluid deployment support it.
  • Don't emit ERC20 Approval events on transferFrom operations. This is consistent with the OpenZeppelin ERC20 implementation from v5 onwards. Change effective only for SuperTokens using the latest logic.

Fixed

  • ISuperfluidPool: getClaimable and getClaimableNow could previously return non-zero values for connected pools, which was inconsistent with what claimAll would actually do in this situation (claim nothing).

Breaking

  • Updated OpenZeppelin library from v.4.9.6 to v5.4.0.
    The import path now includes the major version, making it easier for contracts integrating with this protocol to use a different major version of OpenZeppelin.
    Projects using Superfluid contracts as a dependency need to configure a mapping:
    • Foundry: add this to remappings: '@openzeppelin-v5/=lib/openzeppelin-contracts/',
    • Hardhat (>=v2.17.2): add @openzeppelin/contracts as a project dependency and a subtask in your hardhat config:
import { TASK_COMPILE_GET_REMAPPINGS } from "hardhat/builtin-tasks/task-names";

subtask(TASK_COMPILE_GET_REMAPPINGS).setAction(
    async (_, __, runSuper) => {
        const remappings = await runSuper();
        return {
            ...remappings,
            "@openzeppelin-v5/contracts/": "@openzeppelin/contracts/",
        };
    }
);
  • CFASuperAppBase: onFlowDeleted is replaced by onInFlowDeleted and onOutFlowDeleted.
    This is safer because the latter hook handles a case (outgoing flow being deleted by its receiver) which is often not expected.
    In the past, apps creating outflows had to explicitly distinguish between the 2 possible triggers in order to avoid potentially invalid state changes or even jailing.
    Most apps will want to implement just onInFlowDeleted.
  • CFASuperAppBase: added flowRate argument to onFlowCreated and onFlowUpdated.
  • PoolMemberNFT pruning: IPoolMemberNFT and PoolMemberNFT removed, POOL_MEMBER_NFT() removed from ISuperToken.