CCIP v2.0.0 RMN API Reference

Summary

RMN is the Risk Management Network contract. It maintains curse state for subjects, which CCIP contracts check to gate message and token flows.

It implements [IRMN](/ccip/evm/api-reference/v2.0.0/i-rmn). Pools and ramps call isCursed before processing; a live curse halts the affected flows until the subject is uncursed.


Contract

chains/evm/contracts/rmn/RMN.sol


Import

import {RMN} from "chainlink-ccip/chains/evm/contracts/rmn/RMN.sol";

Inheritance

  • AuthorizedCallers
  • ITypeAndVersion
  • IRMN

typeAndVersion

string public constant override typeAndVersion = "RMN 2.0.0";

Global curse subject

bytes16 constant GLOBAL_CURSE_SUBJECT = 0x01000000000000000000000000000001;

A curse on this subject makes both isCursed() and isCursed(bytes16) return true. Use it for issues affecting all CCIP chains or the chain this contract is deployed on, instead of the local chain selector.


Constructor

constructor(address[] memory curseAdmins)

Passes curseAdmins to AuthorizedCallers, initializing the set of addresses authorized to call curse (besides the owner).


External API

curse

function curse(bytes16 subject) external
function curse(bytes16[] memory subjects) public

Curses one subject or an array of subjects. Callable by the owner or an authorized caller.

Already-cursed subjects, including duplicates within the array, are silently skipped so a single redundant entry does not block the remaining subjects. Emits Cursed with only the newly cursed subjects, and emits nothing if every entry was already cursed.


uncurse

function uncurse(bytes16 subject) external
function uncurse(bytes16[] memory subjects) public onlyOwner

Uncurses one subject or an array of subjects. Owner-only.

Reverts NotCursed(subject) if any subject in the array is not cursed. Emits Uncursed with the subjects.


getCursedSubjects

function getCursedSubjects() external view returns (bytes16[] memory subjects)

Returns the current set of cursed subjects.


isCursed

function isCursed() external view returns (bool)
function isCursed(bytes16 subject) external view returns (bool)

The no-argument overload returns true only if the global curse subject is active.

The subject overload returns true if the given subject is cursed or the global curse subject is active. To check whether a particular chain is cursed, pass bytes16(uint128(chainSelector)).

Both overloads return false immediately when no subjects are cursed at all.


Events

event Cursed(bytes16[] subjects);
event Uncursed(bytes16[] subjects);

Errors

error NotCursed(bytes16 subject);

Inherited from AuthorizedCallers

See the AuthorizedCallers reference for the full surface: getAllAuthorizedCallers(), applyAuthorizedCallerUpdates(AuthorizedCallerArgs), and the UnauthorizedCaller / ZeroAddressNotAllowed errors.


Get the latest Chainlink content straight to your inbox.