Skip to content

Commit 59a8e47

Browse files
authored
add VERSION (constant) to SuperToken and ISuperToken (#2137)
1 parent a7ee248 commit 59a8e47

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

packages/ethereum-contracts/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88
### Added
99

1010
- `SuperToken`: the contract admin can enable/disable a _Yield Backend_ in order to generate a yield on the underlying asset.
11+
- `SuperToken`: added `VERSION()` which returns the version string of the logic contract set for the SuperToken, and inline CHANGELOG.
1112

1213
### Changed
1314

packages/ethereum-contracts/contracts/interfaces/superfluid/ISuperToken.sol

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777, IERC20Permit
3434
error SUPER_TOKEN_PERMIT_EXPIRED_SIGNATURE(uint256 deadline); // 0x6e72b90f
3535
error SUPER_TOKEN_PERMIT_INVALID_SIGNER(address signer, address owner); // 0xb6422105
3636

37+
/**
38+
* @dev Return the version of the SuperToken logic
39+
*/
40+
function VERSION() external view returns (string memory);
41+
3742
/**
3843
* @dev Initialize the contract
3944
*/

packages/ethereum-contracts/contracts/superfluid/SuperToken.sol

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ interface IPoolMemberNFT {}
3030
* @title Superfluid's super token implementation
3131
*
3232
* @author Superfluid
33+
*
34+
* CHANGELOG:
35+
* [1.0.0]
36+
* Added:
37+
* - support for an optional yield backend
3338
*/
3439
contract SuperToken is
3540
UUPSProxiable,
@@ -40,6 +45,8 @@ contract SuperToken is
4045
using ERC777Helper for ERC777Helper.Operators;
4146
using SafeERC20 for IERC20;
4247

48+
string public constant override VERSION = "1.0.0";
49+
4350
// See: https://eips.ethereum.org/EIPS/eip-1967#admin-address
4451
bytes32 constant private _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
4552

0 commit comments

Comments
 (0)