-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathMockFactory.sol
More file actions
45 lines (35 loc) · 1.05 KB
/
MockFactory.sol
File metadata and controls
45 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
pragma solidity ^0.4.24;
import "../modules/STO/DummySTOFactory.sol";
/**
* @title Mock Contract Not fit for production environment
*/
contract MockFactory is DummySTOFactory {
bool public switchTypes = false;
/**
* @notice Constructor
* @param _setupCost Setup cost of the module
* @param _usageCost Usage cost of the module
* @param _subscriptionCost Subscription cost of the module
*/
constructor (uint256 _setupCost, uint256 _usageCost, uint256 _subscriptionCost) public
DummySTOFactory(_setupCost, _usageCost, _subscriptionCost)
{
}
/**
* @notice Type of the Module factory
*/
function getTypes() external view returns(uint8[]) {
if (!switchTypes) {
uint8[] memory types = new uint8[](0);
return types;
} else {
uint8[] memory res = new uint8[](2);
res[0] = 1;
res[1] = 1;
return res;
}
}
function changeTypes() external onlyOwner {
switchTypes = !switchTypes;
}
}