File tree 1 file changed +9
-1
lines changed
packages/hyperverse-evm-whitelist/contracts
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ contract WhitelistFactory is CloneFactory {
42
42
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E R R O R S @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
43
43
error Unathorized ();
44
44
error InstanceAlreadyInitialized ();
45
+ error InstanceDoesNotExist ();
45
46
error InvalidTime ();
46
47
error InvalidValuesToCreateInstance ();
47
48
error InvalidMerkelRoot ();
@@ -64,6 +65,13 @@ contract WhitelistFactory is CloneFactory {
64
65
_;
65
66
}
66
67
68
+ modifier checkInstance (address _tenant ) {
69
+ if (! instance[_tenant]) {
70
+ revert InstanceDoesNotExist ();
71
+ }
72
+ _;
73
+ }
74
+
67
75
68
76
constructor (address _masterContract , address _owner ) {
69
77
masterContract = _masterContract;
@@ -121,7 +129,7 @@ contract WhitelistFactory is CloneFactory {
121
129
}
122
130
123
131
124
- function getProxy (address _tenant ) public view hasAnInstance (_tenant) returns (Whitelist) {
132
+ function getProxy (address _tenant ) public view checkInstance (_tenant) returns (Whitelist) {
125
133
return tenants[_tenant].proxy;
126
134
}
127
135
}
You can’t perform that action at this time.
0 commit comments