Skip to content

Commit 22c3fd3

Browse files
committed
move MockContract for exports
1 parent 7f05520 commit 22c3fd3

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

contracts/mock/Mock.sol

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,23 @@ contract Mock {
1313
IERC721 public erc721;
1414
IERC1155 public erc1155;
1515
}
16+
17+
contract MockContract {
18+
bytes32 private name;
19+
uint8 private version;
20+
21+
constructor(bytes32 _name, uint8 _version) {
22+
name = _name;
23+
version = _version;
24+
}
25+
26+
/// @dev Returns the module type of the contract.
27+
function contractType() external view returns (bytes32) {
28+
return name;
29+
}
30+
31+
/// @dev Returns the version of the contract.
32+
function contractVersion() external view returns (uint8) {
33+
return version;
34+
}
35+
}

src/test/utils/BaseTest.sol

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,7 @@ import "contracts/token/TokenERC721.sol";
2424
import "contracts/token/TokenERC1155.sol";
2525
import "contracts/marketplace/Marketplace.sol";
2626
import "contracts/vote/VoteERC20.sol";
27-
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-
}
27+
import "contracts/mock/Mock.sol";
4728

4829
abstract contract BaseTest is DSTest, stdCheats {
4930
string public constant NAME = "NAME";
@@ -90,11 +71,11 @@ abstract contract BaseTest is DSTest, stdCheats {
9071
TWFactory(factory).addImplementation(address(new TokenERC721(fee)));
9172
TWFactory(factory).addImplementation(address(new TokenERC1155(fee)));
9273
TWFactory(factory).addImplementation(address(new DropERC20(fee)));
93-
TWFactory(factory).addImplementation(address(new DummyContract(bytes32("DropERC721"), 1)));
74+
TWFactory(factory).addImplementation(address(new MockContract(bytes32("DropERC721"), 1)));
9475
TWFactory(factory).addImplementation(address(new DropERC721(fee)));
95-
TWFactory(factory).addImplementation(address(new DummyContract(bytes32("DropERC1155"), 1)));
76+
TWFactory(factory).addImplementation(address(new MockContract(bytes32("DropERC1155"), 1)));
9677
TWFactory(factory).addImplementation(address(new DropERC1155(fee)));
97-
TWFactory(factory).addImplementation(address(new DummyContract(bytes32("Marketplace"), 1)));
78+
TWFactory(factory).addImplementation(address(new MockContract(bytes32("Marketplace"), 1)));
9879
TWFactory(factory).addImplementation(address(new Marketplace(address(weth), fee)));
9980
TWFactory(factory).addImplementation(address(new Split(fee)));
10081
// TWFactory(factory).addImplementation(address(new Pack(address(0), address(0), fee)));

0 commit comments

Comments
 (0)