From 2f557dd45750e8360779a7c6210f518d825c4e25 Mon Sep 17 00:00:00 2001 From: didi Date: Tue, 27 Jan 2026 11:05:19 +0100 Subject: [PATCH] add VERSION (constant) to SuperToken and ISuperToken --- packages/ethereum-contracts/CHANGELOG.md | 1 + .../contracts/interfaces/superfluid/ISuperToken.sol | 5 +++++ .../ethereum-contracts/contracts/superfluid/SuperToken.sol | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/packages/ethereum-contracts/CHANGELOG.md b/packages/ethereum-contracts/CHANGELOG.md index 9e7928fb33..50343da9d9 100644 --- a/packages/ethereum-contracts/CHANGELOG.md +++ b/packages/ethereum-contracts/CHANGELOG.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added - `SuperToken`: the contract admin can enable/disable a _Yield Backend_ in order to generate a yield on the underlying asset. +- `SuperToken`: added `VERSION()` which returns the version string of the logic contract set for the SuperToken, and inline CHANGELOG. ### Changed diff --git a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol index 7d82ec0f68..771114507e 100644 --- a/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol +++ b/packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol @@ -34,6 +34,11 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777, IERC20Permit error SUPER_TOKEN_PERMIT_EXPIRED_SIGNATURE(uint256 deadline); // 0x6e72b90f error SUPER_TOKEN_PERMIT_INVALID_SIGNER(address signer, address owner); // 0xb6422105 + /** + * @dev Return the version of the SuperToken logic + */ + function VERSION() external view returns (string memory); + /** * @dev Initialize the contract */ diff --git a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol index 7785fa1bc6..c0ab0e4ac1 100644 --- a/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol +++ b/packages/ethereum-contracts/contracts/superfluid/SuperToken.sol @@ -30,6 +30,11 @@ interface IPoolMemberNFT {} * @title Superfluid's super token implementation * * @author Superfluid + * + * CHANGELOG: + * [1.0.0] + * Added: + * - support for an optional yield backend */ contract SuperToken is UUPSProxiable, @@ -40,6 +45,8 @@ contract SuperToken is using ERC777Helper for ERC777Helper.Operators; using SafeERC20 for IERC20; + string public constant override VERSION = "1.0.0"; + // See: https://eips.ethereum.org/EIPS/eip-1967#admin-address bytes32 constant private _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;