Skip to content

Commit f3d042d

Browse files
committed
review comments
1 parent e1900a2 commit f3d042d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

chains/evm/contracts/interfaces/IRMN.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ interface IRMN {
77
/// @return subjects the list of cursed subjects.
88
function getCursedSubjects() external view returns (bytes16[] memory subjects);
99

10-
/// @notice If there is an active global or legacy curse, this function returns true.
10+
/// @notice Iff there is an active global or legacy curse, this function returns true.
1111
/// @return bool true if there is an active global curse.
1212
function isCursed() external view returns (bool);
1313

14-
/// @notice If there is an active global curse, or an active curse for `subject`, this function returns true.
14+
/// @notice Iff there is an active global curse, or an active curse for `subject`, this function returns true.
1515
/// @param subject To check whether a particular chain is cursed, set to bytes16(uint128(chainSelector)).
1616
/// @return bool true if the provided subject is cursed *or* if there is an active global curse.
1717
function isCursed(

chains/evm/contracts/rmn/RMN.sol

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ contract RMN is AuthorizedCallers, ITypeAndVersion, IRMN {
3636
// ================================================================
3737

3838
/// @notice Curse a single subject.
39-
/// @param subject the subject to curse.
39+
/// @param subject The subject to curse.
4040
function curse(
4141
bytes16 subject
4242
) external {
@@ -51,7 +51,11 @@ contract RMN is AuthorizedCallers, ITypeAndVersion, IRMN {
5151
function curse(
5252
bytes16[] memory subjects
5353
) public {
54-
if (msg.sender != owner()) _validateCaller();
54+
// Allow both the owner and authorized callers to curse subjects.
55+
// Skip validation for the owner; validate authorization for others.
56+
if (msg.sender != owner()) {
57+
_validateCaller();
58+
}
5559
for (uint256 i = 0; i < subjects.length; ++i) {
5660
if (!s_cursedSubjects.add(subjects[i])) {
5761
revert AlreadyCursed(subjects[i]);

0 commit comments

Comments
 (0)