diff --git a/contracts/src/v0.8/ccip/ARM.sol b/contracts/src/v0.8/ccip/ARM.sol index 6eecf824b8..ecdb72781d 100644 --- a/contracts/src/v0.8/ccip/ARM.sol +++ b/contracts/src/v0.8/ccip/ARM.sol @@ -6,7 +6,7 @@ import {IARM} from "./interfaces/IARM.sol"; import {OwnerIsCreator} from "./../shared/access/OwnerIsCreator.sol"; -/// @dev This contract is owned by RMN, if changes required, please notify RMN. +/// @dev This contract is owned by RMN, if changing, please notify RMN. contract ARM is IARM, OwnerIsCreator, ITypeAndVersion { // STATIC CONFIG // solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables diff --git a/contracts/src/v0.8/ccip/CommitStore.sol b/contracts/src/v0.8/ccip/CommitStore.sol index eb4406f02b..70106caa13 100644 --- a/contracts/src/v0.8/ccip/CommitStore.sol +++ b/contracts/src/v0.8/ccip/CommitStore.sol @@ -41,6 +41,7 @@ contract CommitStore is ICommitStore, ITypeAndVersion, OCR2Base { } /// @notice a sequenceNumber interval + /// @dev RMN depends on this struct, if changing, please notify RMN. struct Interval { uint64 min; // ───╮ Minimum sequence number, inclusive uint64 max; // ───╯ Maximum sequence number, inclusive diff --git a/contracts/src/v0.8/ccip/libraries/Client.sol b/contracts/src/v0.8/ccip/libraries/Client.sol index 30a832c885..c52f17b1ff 100644 --- a/contracts/src/v0.8/ccip/libraries/Client.sol +++ b/contracts/src/v0.8/ccip/libraries/Client.sol @@ -3,6 +3,7 @@ pragma solidity ^0.8.0; // End consumer library. library Client { + /// @dev RMN depends on this struct, if changing, please notify RMN. struct EVMTokenAmount { address token; // token address on the local chain. uint256 amount; // Amount of tokens. diff --git a/contracts/src/v0.8/ccip/libraries/Internal.sol b/contracts/src/v0.8/ccip/libraries/Internal.sol index 20c6775b9a..0148702d17 100644 --- a/contracts/src/v0.8/ccip/libraries/Internal.sol +++ b/contracts/src/v0.8/ccip/libraries/Internal.sol @@ -15,21 +15,28 @@ library Internal { // repeated out-of-gas scenarios. uint16 internal constant MAX_RET_BYTES = 4 + 4 * 32; + /// @notice A collection of token price and gas price updates. + /// @dev RMN depends on this struct, if changing, please notify RMN. struct PriceUpdates { TokenPriceUpdate[] tokenPriceUpdates; GasPriceUpdate[] gasPriceUpdates; } + /// @notice Token price in USD. + /// @dev RMN depends on this struct, if changing, please notify RMN. struct TokenPriceUpdate { address sourceToken; // Source token uint224 usdPerToken; // 1e18 USD per smallest unit of token } + /// @notice Gas price for a given chain in USD, its value may contain tightly packed fields. + /// @dev RMN depends on this struct, if changing, please notify RMN. struct GasPriceUpdate { uint64 destChainSelector; // Destination chain selector uint224 usdPerUnitGas; // 1e18 USD per smallest unit (e.g. wei) of destination chain gas } + /// @notice A timestamped uint224 value that can contain several tightly packed fields. struct TimestampedPackedUint224 { uint224 value; // ───────╮ Value in uint224, packed. uint32 timestamp; // ────╯ Timestamp of the most recent price update. @@ -37,7 +44,7 @@ library Internal { /// @dev Gas price is stored in 112-bit unsigned int. uint224 can pack 2 prices. /// When packing L1 and L2 gas prices, L1 gas price is left-shifted to the higher-order bits. - /// Using uint8, which is strictly lower than 1st shift operand, to avoid shift operand type warning. + /// Using uint8 type, which cannot be higher than other bit shift operands, to avoid shift operand type warning. uint8 public constant GAS_PRICE_BITS = 112; struct PoolUpdate {