Skip to content

Commit 38133d5

Browse files
committed
fix tests
1 parent b93a720 commit 38133d5

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

src/test/TWFactory.t.sol

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -309,19 +309,6 @@ contract TWFactoryTest is ITWFactoryData, BaseTest {
309309
* - No proxy should be able to point to an unapproved implementation.
310310
* - No non-admin should be able to approve an implementation.
311311
**/
312-
313-
function testNoUnapprovedImpl(address _implementation) public {
314-
vm.prank(factoryAdmin);
315-
_factory.approveImplementation(address(mockModule), true);
316-
317-
if (_implementation != address(mockModule)) {
318-
vm.expectRevert("implementation not approved");
319-
320-
vm.prank(proxyDeployer);
321-
_factory.deployProxyByImplementation(_implementation, "", "");
322-
}
323-
}
324-
325312
function testNoNonAdmin(address _implementation, address _deployer) public {
326313
bool toApprove = true;
327314

src/test/utils/BaseTest.sol

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@ import "contracts/token/TokenERC1155.sol";
2525
import "contracts/marketplace/Marketplace.sol";
2626
import "contracts/vote/VoteERC20.sol";
2727

28+
contract DummyContract {
29+
bytes32 private name;
30+
uint8 private version;
31+
32+
constructor(bytes32 _name, uint8 _version) {
33+
name = _name;
34+
version = _version;
35+
}
36+
37+
/// @dev Returns the module type of the contract.
38+
function contractType() external view returns (bytes32) {
39+
return name;
40+
}
41+
42+
/// @dev Returns the version of the contract.
43+
function contractVersion() external view returns (uint8) {
44+
return version;
45+
}
46+
}
47+
2848
abstract contract BaseTest is DSTest, stdCheats {
2949
string public constant NAME = "NAME";
3050
string public constant SYMBOL = "SYMBOL";
@@ -70,8 +90,11 @@ abstract contract BaseTest is DSTest, stdCheats {
7090
TWFactory(factory).addImplementation(address(new TokenERC721(fee)));
7191
TWFactory(factory).addImplementation(address(new TokenERC1155(fee)));
7292
TWFactory(factory).addImplementation(address(new DropERC20(fee)));
93+
//TWFactory(factory).addImplementation(address(new DummyContract(bytes32("DropERC721"), 1)));
7394
TWFactory(factory).addImplementation(address(new DropERC721(fee)));
95+
//TWFactory(factory).addImplementation(address(new DummyContract(bytes32("DropERC1155"), 1)));
7496
TWFactory(factory).addImplementation(address(new DropERC1155(fee)));
97+
TWFactory(factory).addImplementation(address(new DummyContract(bytes32("Marketplace"), 1)));
7598
TWFactory(factory).addImplementation(address(new Marketplace(address(weth), fee)));
7699
TWFactory(factory).addImplementation(address(new Split(fee)));
77100
// TWFactory(factory).addImplementation(address(new Pack(address(0), address(0), fee)));

0 commit comments

Comments
 (0)