CCIP v2.0.0 RMNProxy API Reference
Summary
RMNProxy is a lightweight forwarding proxy that provides a stable address for Risk Management Network (RMN, historically ARM) integrations.
Instead of storing an RMN implementation address in every dependent contract, integrations reference RMNProxy. The proxy forwards calls to the currently configured RMN implementation.
Key properties:
- Stable integration address
- Owner-controlled implementation updates
- Generic forwarding via
fallback - Uses
call(notdelegatecall) - No implementation storage collision risk
Contract
chains/evm/contracts/rmn/RMNProxy.sol
Import
import {RMNProxy} from "chainlink-ccip/chains/evm/contracts/rmn/RMNProxy.sol";
Target + upgrade model
- The proxied implementation address is stored in
s_arm. - The owner may update the implementation via
setARM. - All unknown calls are forwarded using
call. - No
delegatecallis used. - Storage remains in the implementation contract.
Inheritance
OwnerIsCreatorITypeAndVersion
typeAndVersion
string public constant override typeAndVersion =
"ARMProxy 1.0.0";
State
Constants
string public constant override typeAndVersion =
"ARMProxy 1.0.0";
Immutables
None declared.
Storage
address private s_arm;
Current RMN implementation address.
Constructor
constructor(address arm)
Behavior:
- Calls
setARM(arm).
Reverts:
error ZeroAddressNotAllowed();
If arm == address(0).
External API
setARM
function setARM(address arm)
public
onlyOwner
Behavior:
- Reverts
ZeroAddressNotAllowed()ifarm == address(0). - Sets
s_arm = arm. - Emits:
event ARMSet(address arm);
getARM
function getARM()
external
view
returns (address);
Returns s_arm.
Fallback
fallback() external payable;
Behavior:
- Loads
arm = s_arm. - Reverts if
armhas no code (extcodesize == 0). - Copies calldata.
- Executes:
call(gas(), arm, 0, calldataPtr, calldataSize, 0, 0)
-
If call fails:
- Reverts with returned data.
-
If call succeeds:
- Returns returned data.
Notes:
- Ether is not forwarded (
value = 0). - Proxy storage is not modified.
- No delegatecall.
Events
event ARMSet(address arm);
Errors
error ZeroAddressNotAllowed();
Security model
- Only owner may update the implementation.
- Zero implementation address is disallowed.
- Calls to non-contract addresses revert.
- No delegatecall: eliminates storage collision risk.
- All RMN state resides in the implementation contract.