Skip to content

Commit 8cc4d9f

Browse files
committed
update
1 parent 38b6d4b commit 8cc4d9f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/hyperverse-evm-whitelist/contracts/WhitelistFactory.sol

+9-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ contract WhitelistFactory is CloneFactory {
4242
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E R R O R S @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
4343
error Unathorized();
4444
error InstanceAlreadyInitialized();
45+
error InstanceDoesNotExist();
4546
error InvalidTime();
4647
error InvalidValuesToCreateInstance();
4748
error InvalidMerkelRoot();
@@ -64,6 +65,13 @@ contract WhitelistFactory is CloneFactory {
6465
_;
6566
}
6667

68+
modifier checkInstance(address _tenant) {
69+
if (!instance[_tenant]) {
70+
revert InstanceDoesNotExist();
71+
}
72+
_;
73+
}
74+
6775

6876
constructor(address _masterContract, address _owner) {
6977
masterContract = _masterContract;
@@ -121,7 +129,7 @@ contract WhitelistFactory is CloneFactory {
121129
}
122130

123131

124-
function getProxy(address _tenant) public view hasAnInstance(_tenant) returns (Whitelist) {
132+
function getProxy(address _tenant) public view checkInstance(_tenant) returns (Whitelist) {
125133
return tenants[_tenant].proxy;
126134
}
127135
}

0 commit comments

Comments
 (0)