Skip to content

Commit 247e538

Browse files
d10rhellwolf
andauthored
[ETHEREUM-CONTRACTS] remove PoolMemberNFT and remainders of FlowNFTs (#2087)
--------- Co-authored-by: Miao ZhiCheng <miao@superfluid.finance>
1 parent 1ca12f9 commit 247e538

28 files changed

+107
-719
lines changed

packages/ethereum-contracts/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
66
## [UNRELEASED]
77

88
### Changed
9-
- Refactored `GeneralDistributionAgreementV1`: extracted functionality which reads and writes agreement data to from/to the token contract into dedicated libraries:
9+
- Refactored `GeneralDistributionAgreementV1`: extracted functionality which reads/writes agreement data from/to the token contract into dedicated libraries:
1010
- `GDAv1StorageLib` contains data structures and related encoders/decoders.
1111
- `GDAv1StorageReader` contains getters reading agreement data from the token contract, allowing contracts to get this data without making a call to the GDA contract.
1212
- `GDAv1StorageWriter` contains functions for writing agreement data to the token contract. This can only be used by the GDA contract itself.
1313

14+
### Breaking
15+
- PoolMemberNFT pruning: `IPoolMemberNFT` and `PoolMemberNFT` removed, `POOL_MEMBER_NFT()` removed from `ISuperToken`.
16+
1417
## [v1.13.0]
1518

1619
### Added

packages/ethereum-contracts/contracts/agreements/gdav1/PoolAdminNFT.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ contract PoolAdminNFT is PoolNFTBase, IPoolAdminNFT {
3737
return _poolAdminDataByTokenId[tokenId];
3838
}
3939

40-
/// @notice Reverts - Transfer of pool member NFT is not allowed.
41-
/// @dev We revert when users attempt to transfer pool member NFTs.
40+
/// @notice Reverts - Transfer of NFT is not allowed.
41+
/// @dev We revert when users attempt to transfer NFTs.
4242
function _transfer(
4343
address, // from,
4444
address, // to,

packages/ethereum-contracts/contracts/agreements/gdav1/PoolMemberNFT.sol

Lines changed: 0 additions & 158 deletions
This file was deleted.

packages/ethereum-contracts/contracts/agreements/gdav1/PoolNFTBase.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ abstract contract PoolNFTBase is UUPSProxiable, IPoolNFTBase {
127127
}
128128

129129
/// @notice Returns the name of the NFT
130-
/// @dev Should follow the naming convention: (Pool Admin|Pool Member) NFT
130+
/// @dev Should follow the naming convention: Pool Admin NFT
131131
/// @return name of the NFT
132132
function name() external view virtual override returns (string memory) {
133133
return _name;
134134
}
135135

136136
/// @notice Returns the symbol of the NFT
137-
/// @dev Should follow the naming convention: PA|PM
137+
/// @dev Should follow the naming convention: PA
138138
/// @return symbol of the NFT
139139
function symbol() external view virtual override returns (string memory) {
140140
return _symbol;

packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/IPoolMemberNFT.sol

Lines changed: 0 additions & 41 deletions
This file was deleted.

packages/ethereum-contracts/contracts/interfaces/agreements/gdav1/IPoolNFTBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ interface IPoolNFTBase is IERC721Metadata {
2323
function triggerMetadataUpdate(uint256 tokenId) external;
2424

2525
/// @notice Gets the token id
26-
/// @dev For PoolAdminNFT, `account` is admin and for PoolMemberNFT, `account` is member
26+
/// @dev For PoolAdminNFT, `account` is admin
2727
function getTokenId(address pool, address account) external view returns (uint256 tokenId);
2828
}

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { IERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/IER
77
import { IERC5267 } from "@openzeppelin/contracts/interfaces/IERC5267.sol";
88
import { IERC777 } from "@openzeppelin/contracts/token/ERC777/IERC777.sol";
99
import { IPoolAdminNFT } from "../agreements/gdav1/IPoolAdminNFT.sol";
10-
import { IPoolMemberNFT } from "../agreements/gdav1/IPoolMemberNFT.sol";
1110

1211
/**
1312
* @title Super token (Superfluid Token + ERC20 + ERC777) interface
@@ -77,8 +76,6 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777, IERC20Permit
7776

7877
// solhint-disable-next-line func-name-mixedcase
7978
function POOL_ADMIN_NFT() external view returns (IPoolAdminNFT);
80-
// solhint-disable-next-line func-name-mixedcase
81-
function POOL_MEMBER_NFT() external view returns (IPoolMemberNFT);
8279

8380
/**************************************************************************
8481
* IERC20Metadata & ERC777
@@ -606,14 +603,6 @@ interface ISuperToken is ISuperfluidToken, IERC20Metadata, IERC777, IERC20Permit
606603
IPoolAdminNFT indexed poolAdminNFT
607604
);
608605

609-
/**
610-
* @dev Pool Member NFT proxy created event
611-
* @param poolMemberNFT pool member nft address
612-
*/
613-
event PoolMemberNFTCreated(
614-
IPoolMemberNFT indexed poolMemberNFT
615-
);
616-
617606
/**************************************************************************
618607
* Function modifiers for access control and parameter validations
619608
*

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { ISuperTokenFactory } from "./ISuperTokenFactory.sol";
2525
import { ISETH } from "../tokens/ISETH.sol";
2626
/// Superfluid/ERC20x NFTs
2727
import { IPoolAdminNFT } from "../agreements/gdav1/IPoolAdminNFT.sol";
28-
import { IPoolMemberNFT } from "../agreements/gdav1/IPoolMemberNFT.sol";
2928
/// Superfluid agreement interfaces:
3029
import { ISuperAgreement } from "./ISuperAgreement.sol";
3130
import { IConstantFlowAgreementV1 } from "../agreements/IConstantFlowAgreementV1.sol";

packages/ethereum-contracts/contracts/mocks/SuperTokenFactoryMock.t.sol

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,18 @@ pragma solidity ^0.8.23;
44
import {
55
ISuperfluid,
66
ISuperToken,
7-
IPoolAdminNFT,
8-
IPoolMemberNFT
7+
IPoolAdminNFT
98
} from "../interfaces/superfluid/ISuperfluid.sol";
10-
import { SuperTokenFactoryBase, IConstantOutflowNFT, IConstantInflowNFT } from "../superfluid/SuperTokenFactory.sol";
9+
import { SuperTokenFactoryBase, IPoolMemberNFT } from "../superfluid/SuperTokenFactory.sol";
1110

1211
contract SuperTokenFactoryStorageLayoutTester is SuperTokenFactoryBase {
1312
constructor(
1413
ISuperfluid host,
1514
ISuperToken superTokenLogic,
16-
IConstantOutflowNFT constantOutflowNFT,
17-
IConstantInflowNFT constantInflowNFT,
1815
IPoolAdminNFT poolAdminNFT,
1916
IPoolMemberNFT poolMemberNFT
2017
)
21-
SuperTokenFactoryBase(host, superTokenLogic, constantOutflowNFT, constantInflowNFT, poolAdminNFT, poolMemberNFT)
18+
SuperTokenFactoryBase(host, superTokenLogic, poolAdminNFT, poolMemberNFT)
2219
// solhint-disable-next-line no-empty-blocks
2320
{ }
2421

@@ -43,12 +40,10 @@ contract SuperTokenFactoryUpdateLogicContractsTester is SuperTokenFactoryBase {
4340
constructor(
4441
ISuperfluid host,
4542
ISuperToken superTokenLogic,
46-
IConstantOutflowNFT constantOutflowNFT,
47-
IConstantInflowNFT constantInflowNFT,
4843
IPoolAdminNFT poolAdminNFT,
4944
IPoolMemberNFT poolMemberNFT
5045
)
51-
SuperTokenFactoryBase(host, superTokenLogic, constantOutflowNFT, constantInflowNFT, poolAdminNFT, poolMemberNFT)
46+
SuperTokenFactoryBase(host, superTokenLogic, poolAdminNFT, poolMemberNFT)
5247
// solhint-disable-next-line no-empty-blocks
5348
{ }
5449
}
@@ -57,12 +52,10 @@ contract SuperTokenFactoryMock is SuperTokenFactoryBase {
5752
constructor(
5853
ISuperfluid host,
5954
ISuperToken superTokenLogic,
60-
IConstantOutflowNFT constantOutflowNFT,
61-
IConstantInflowNFT constantInflowNFT,
6255
IPoolAdminNFT poolAdminNFT,
6356
IPoolMemberNFT poolMemberNFT
6457
)
65-
SuperTokenFactoryBase(host, superTokenLogic, constantOutflowNFT, constantInflowNFT, poolAdminNFT, poolMemberNFT)
58+
SuperTokenFactoryBase(host, superTokenLogic, poolAdminNFT, poolMemberNFT)
6659
// solhint-disable-next-line no-empty-blocks
6760
{ }
6861
}
@@ -71,12 +64,10 @@ contract SuperTokenFactoryMock42 is SuperTokenFactoryBase {
7164
constructor(
7265
ISuperfluid host,
7366
ISuperToken superTokenLogic,
74-
IConstantOutflowNFT constantOutflowNFT,
75-
IConstantInflowNFT constantInflowNFT,
7667
IPoolAdminNFT poolAdminNFT,
7768
IPoolMemberNFT poolMemberNFT
7869
)
79-
SuperTokenFactoryBase(host, superTokenLogic, constantOutflowNFT, constantInflowNFT, poolAdminNFT, poolMemberNFT)
70+
SuperTokenFactoryBase(host, superTokenLogic, poolAdminNFT, poolMemberNFT)
8071
// solhint-disable-next-line no-empty-blocks
8172
{ }
8273
}

0 commit comments

Comments
 (0)