Sanity check on all important variables
Most of the functionalities have proper sanity checks when it comes to setting system-wide variables, such as whitelist addresses. However there are a few key setters that lack such sanity checks.\\nSanity check (!= address(0)) on all token contracts.\\n```\\nfunction setUTokensContract(address uAddress) public virtual override {\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LP9");\\n \\_uTokens = IUTokens(uAddress);\\n emit SetUTokensContract(uAddress);\\n}\\n\\n/\\*\\*\\n \\* @dev Set 'contract address', called from constructor\\n \\* @param sAddress: stoken contract address\\n \\*\\n \\* Emits a {SetSTokensContract} event with '\\_contract' set to the stoken contract address.\\n \\*\\n \\*/\\nfunction setSTokensContract(address sAddress) public virtual override {\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LP10");\\n \\_sTokens = ISTokens(sAddress);\\n emit SetSTokensContract(sAddress);\\n}\\n\\n/\\*\\*\\n \\* @dev Set 'contract address', called from constructor\\n \\* @param pstakeAddress: pStake contract address\\n \\*\\n \\* Emits a {SetPSTAKEContract} event with '\\_contract' set to the stoken contract address.\\n \\*\\n \\*/\\nfunction setPSTAKEContract(address pstakeAddress) public virtual override {\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LP11");\\n \\_pstakeTokens = IPSTAKE(pstakeAddress);\\n emit SetPSTAKEContract(pstakeAddress);\\n}\\n```\\n\\nSanity check on `unstakingLockTime` to be in the acceptable range (21 hours to 21 days)\\n```\\n/\\*\\*\\n \\* @dev Set 'unstake props', called from admin\\n \\* @param unstakingLockTime: varies from 21 hours to 21 days\\n \\*\\n \\* Emits a {SetUnstakeProps} event with 'fee' set to the stake and unstake.\\n \\*\\n \\*/\\nfunction setUnstakingLockTime(uint256 unstakingLockTime)\\n public\\n virtual\\n returns (bool success)\\n{\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LQ3");\\n \\_unstakingLockTime = unstakingLockTime;\\n emit SetUnstakingLockTime(unstakingLockTime);\\n return true;\\n}\\n```\\n
Resolution\\nComment from pSTAKE Finance team:\\nPost the implementation of new emission logic there have been a rearrangement of some variables, but the rest have been sanity tested and corrected
```\\nfunction setUTokensContract(address uAddress) public virtual override {\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LP9");\\n \\_uTokens = IUTokens(uAddress);\\n emit SetUTokensContract(uAddress);\\n}\\n\\n/\\*\\*\\n \\* @dev Set 'contract address', called from constructor\\n \\* @param sAddress: stoken contract address\\n \\*\\n \\* Emits a {SetSTokensContract} event with '\\_contract' set to the stoken contract address.\\n \\*\\n \\*/\\nfunction setSTokensContract(address sAddress) public virtual override {\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LP10");\\n \\_sTokens = ISTokens(sAddress);\\n emit SetSTokensContract(sAddress);\\n}\\n\\n/\\*\\*\\n \\* @dev Set 'contract address', called from constructor\\n \\* @param pstakeAddress: pStake contract address\\n \\*\\n \\* Emits a {SetPSTAKEContract} event with '\\_contract' set to the stoken contract address.\\n \\*\\n \\*/\\nfunction setPSTAKEContract(address pstakeAddress) public virtual override {\\n require(hasRole(DEFAULT\\_ADMIN\\_ROLE, \\_msgSender()), "LP11");\\n \\_pstakeTokens = IPSTAKE(pstakeAddress);\\n emit SetPSTAKEContract(pstakeAddress);\\n}\\n```\\n