File tree 1 file changed +13
-11
lines changed
packages/hyperverse-evm-whitelist/contracts
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,6 @@ contract WhitelistFactory is CloneFactory {
65
65
_;
66
66
}
67
67
68
- modifier checkInstance (address _tenant ) {
69
- if (! instance[_tenant]) {
70
- revert InstanceDoesNotExist ();
71
- }
72
- _;
73
- }
74
-
75
-
76
68
constructor (address _masterContract , address _owner ) {
77
69
masterContract = _masterContract;
78
70
owner = _owner;
@@ -88,8 +80,15 @@ contract WhitelistFactory is CloneFactory {
88
80
address _ERC721 ,
89
81
address _ERC20 ,
90
82
bytes32 _merkleRoot
91
- ) external isAuthorized (_tenant) hasAnInstance (_tenant){
92
- if (_startTime == 0 && _endTime == 0 && _units == 0 && _ERC721 == address (0 ) && _ERC20 == address (0 ) && _merkleRoot == bytes32 (0 )) {
83
+ ) external isAuthorized (_tenant) hasAnInstance (_tenant) {
84
+ if (
85
+ _startTime == 0 &&
86
+ _endTime == 0 &&
87
+ _units == 0 &&
88
+ _ERC721 == address (0 ) &&
89
+ _ERC20 == address (0 ) &&
90
+ _merkleRoot == bytes32 (0 )
91
+ ) {
93
92
revert InvalidValuesToCreateInstance ();
94
93
}
95
94
@@ -128,8 +127,11 @@ contract WhitelistFactory is CloneFactory {
128
127
emit TenantCreated (_tenant, address (proxy));
129
128
}
130
129
131
-
132
130
function getProxy (address _tenant ) public view checkInstance (_tenant) returns (Whitelist) {
131
+ if (instance[_tenant]) {
132
+ revert InstanceAlreadyInitialized ();
133
+ }
134
+ _;
133
135
return tenants[_tenant].proxy;
134
136
}
135
137
}
You can’t perform that action at this time.
0 commit comments