You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick remark:
In TREXImplementationAuthority.sol#L323, the function getReferenceContract() does not check if _trexFactory is different from zero, which is a possible case. Therefore the function reverts if _trexFactory is not set.
It is not a big problem, but I think it would be better if the function returns the address zero instead of reverting.
Quick example:
function getReferenceContract() public view override returns (address) {
if(_trexFactory != address(0)){
return ITREXFactory(_trexFactory).getImplementationAuthority();
}
return address(0);
}
The text was updated successfully, but these errors were encountered:
Hi @rya-sge thanks! nice work on your side on CMTAT as well
That contract has been audited so i prefer to not modify it. In any case the getReferenceContract function will only be used with non-reference contracts and these can only be created by the IA factory if the parameters of TREX Factory and IA Factory are set properly. But i get your point, always avoid revert on view functions, i note that one for next update (TREXv4.2 that we are currently crafting and will be re-audited)
Hello,
Congratulations for all your work !
A quick remark:
In TREXImplementationAuthority.sol#L323, the function
getReferenceContract()
does not check if_trexFactory
is different from zero, which is a possible case. Therefore the function reverts if_trexFactory
is not set.It is not a big problem, but I think it would be better if the function returns the address zero instead of reverting.
Quick example:
The text was updated successfully, but these errors were encountered: