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 usingsetConnectPermission(), 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:GDAv1StorageLibcontains data structures and related encoders/decoders.GDAv1StorageReadercontains getters reading agreement data from the token contract, allowing contracts to get this data without making a call to the GDA contract.GDAv1StorageWritercontains 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
paristoshanghaibecause now all networks with supported Superfluid deployment support it. - Don't emit ERC20
Approvalevents ontransferFromoperations. This is consistent with the OpenZeppelin ERC20 implementation from v5 onwards. Change effective only for SuperTokens using the latest logic.
Fixed
ISuperfluidPool:getClaimableandgetClaimableNowcould previously return non-zero values for connected pools, which was inconsistent with whatclaimAllwould 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/contractsas a project dependency and a subtask in your hardhat config:
- Foundry: add this to remappings:
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:onFlowDeletedis replaced byonInFlowDeletedandonOutFlowDeleted.
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 justonInFlowDeleted.CFASuperAppBase: addedflowRateargument toonFlowCreatedandonFlowUpdated.- PoolMemberNFT pruning:
IPoolMemberNFTandPoolMemberNFTremoved,POOL_MEMBER_NFT()removed fromISuperToken.