diff --git a/contracts/multi-chains/RoninTrustedOrganization.sol b/contracts/multi-chains/RoninTrustedOrganization.sol index cbc4ea03e..f0f18c84d 100644 --- a/contracts/multi-chains/RoninTrustedOrganization.sol +++ b/contracts/multi-chains/RoninTrustedOrganization.sol @@ -243,7 +243,7 @@ contract RoninTrustedOrganization is IRoninTrustedOrganization, HasProxyAdmin, H /** * @inheritdoc IRoninTrustedOrganization */ - function getTrustedOrganization(TConsensus _consensusAddr) external view returns (TrustedOrganization memory) { + function getTrustedOrganization(TConsensus _consensusAddr) external view returns (TrustedOrganization memory trustedOrg) { for (uint i = 0; i < _consensusList.length; ++i) { if (_consensusList[i] == _consensusAddr) { return getTrustedOrganizationAt(i); diff --git a/contracts/ronin/profile/ProfileHandler.sol b/contracts/ronin/profile/ProfileHandler.sol index 5dc7a3e12..d7e49288b 100644 --- a/contracts/ronin/profile/ProfileHandler.sol +++ b/contracts/ronin/profile/ProfileHandler.sol @@ -24,22 +24,22 @@ abstract contract ProfileHandler is ProfileStorage { } function _requireNonDuplicated(RoleAccess addressType, address addr) internal view { - if (_checkNonDuplicatedAddr(addr)) { + if (_isRegisteredAddr(addr)) { revert ErrDuplicatedInfo(addressType, uint256(uint160(addr))); } } - function _checkNonDuplicatedAddr(address addr) internal view returns (bool) { + function _isRegisteredAddr(address addr) internal view returns (bool) { return _registry[uint256(uint160(addr))]; } function _requireNonDuplicatedPubkey(bytes memory pubkey) internal view { - if (_checkNonDuplicatedPubkey(pubkey)) { + if (_isRegisteredPubkey(pubkey)) { revert ErrDuplicatedPubkey(pubkey); } } - function _checkNonDuplicatedPubkey(bytes memory pubkey) internal view returns (bool) { + function _isRegisteredPubkey(bytes memory pubkey) internal view returns (bool) { return _registry[_hashPubkey(pubkey)]; } }