Skip to content

Commit

Permalink
Fix stale comment (#1296)
Browse files Browse the repository at this point in the history
- Fix stale comment
- remove wrapper gen for the old mockRMN 
	- should no longer be used in offchain tests, use the real RMN instead
- Remove naming clash with RMN
  • Loading branch information
RensR authored Aug 15, 2024
1 parent 077f585 commit 2c58177
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
1 change: 0 additions & 1 deletion contracts/scripts/native_solc_compile_all_ccip
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ compileContract ccip/test/helpers/CCIPReaderTester.sol
compileContract ccip/test/helpers/ReportCodec.sol
compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol
compileContract ccip/test/helpers/MultiOCR3Helper.sol
compileContract ccip/test/mocks/MockRMN1_0.sol
compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol
compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol
compileContract ccip/test/WETH9.sol
Expand Down
5 changes: 2 additions & 3 deletions contracts/src/v0.8/ccip/offRamp/EVM2EVMMultiOffRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,8 @@ contract EVM2EVMMultiOffRamp is ITypeAndVersion, MultiOCR3Base {
// │ Tokens and pools │
// ================================================================

/// @notice Uses a pool to release or mint a token to a receiver address in two steps. First, the pool is called
/// to release the tokens to the offRamp, then the offRamp calls the token contract to transfer the tokens to the
/// receiver. This is done to ensure the exact number of tokens, the pool claims to release are actually transferred.
/// @notice Uses a pool to release or mint a token to a receiver address, with balance checks before and after the
/// transfer. This is done to ensure the exact number of tokens the pool claims to release are actually transferred.
/// @dev The local token address is validated through the TokenAdminRegistry. If, due to some misconfiguration, the
/// token is unknown to the registry, the offRamp will revert. The tx, and the tokens, can be retrieved by
/// registering the token on this chain, and re-trying the msg.
Expand Down
5 changes: 2 additions & 3 deletions contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,8 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio
// │ Tokens and pools │
// ================================================================

/// @notice Uses a pool to release or mint a token to a receiver address in two steps. First, the pool is called
/// to release the tokens to the offRamp, then the offRamp calls the token contract to transfer the tokens to the
/// receiver. This is done to ensure the exact number of tokens, the pool claims to release are actually transferred.
/// @notice Uses a pool to release or mint a token to a receiver address, with balance checks before and after the
/// transfer. This is done to ensure the exact number of tokens the pool claims to release are actually transferred.
/// @dev The local token address is validated through the TokenAdminRegistry. If, due to some misconfiguration, the
/// token is unknown to the registry, the offRamp will revert. The tx, and the tokens, can be retrieved by
/// registering the token on this chain, and re-trying the msg.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract ReentrancyAbuser is CCIPReceiver {

function _getGasLimitsFromMessages(Internal.EVM2EVMMessage[] memory messages)
internal
view
pure
returns (EVM2EVMOffRamp.GasLimitOverride[] memory)
{
EVM2EVMOffRamp.GasLimitOverride[] memory gasLimitOverrides = new EVM2EVMOffRamp.GasLimitOverride[](messages.length);
Expand Down
10 changes: 5 additions & 5 deletions contracts/src/v0.8/ccip/test/mocks/MockRMN1_0.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {OwnerIsCreator} from "./../../../shared/access/OwnerIsCreator.sol";

// Inlined from RMN 1.0 contract.
// solhint-disable gas-struct-packing
contract RMN {
contract OldRMN {
struct Voter {
address blessVoteAddr;
address curseVoteAddr;
Expand Down Expand Up @@ -44,7 +44,7 @@ contract MockRMN is IRMN, OwnerIsCreator {

bool private s_curse;
bytes private s_err;
RMN.VersionedConfig private s_versionedConfig;
OldRMN.VersionedConfig private s_versionedConfig;
mapping(bytes16 subject => bool cursed) private s_curseBySubject;

function isCursed() external view override returns (bool) {
Expand All @@ -69,11 +69,11 @@ contract MockRMN is IRMN, OwnerIsCreator {
s_curseBySubject[subject] = true;
}

function ownerUnvoteToCurse(RMN.UnvoteToCurseRecord[] memory) external {
function ownerUnvoteToCurse(OldRMN.UnvoteToCurseRecord[] memory) external {
s_curse = false;
}

function ownerUnvoteToCurse(RMN.UnvoteToCurseRecord[] memory, bytes16 subject) external {
function ownerUnvoteToCurse(OldRMN.UnvoteToCurseRecord[] memory, bytes16 subject) external {
s_curseBySubject[subject] = false;
}

Expand All @@ -85,7 +85,7 @@ contract MockRMN is IRMN, OwnerIsCreator {
return !s_curse;
}

function getConfigDetails() external view returns (uint32 version, uint32 blockNumber, RMN.Config memory config) {
function getConfigDetails() external view returns (uint32 version, uint32 blockNumber, OldRMN.Config memory config) {
return (s_versionedConfig.configVersion, s_versionedConfig.blockNumber, s_versionedConfig.config);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ contract EVM2EVMOffRampSetup is TokenSetup, PriceRegistrySetup, OCR2BaseSetup {

function _getGasLimitsFromMessages(Internal.EVM2EVMMessage[] memory messages)
internal
view
pure
returns (EVM2EVMOffRamp.GasLimitOverride[] memory)
{
EVM2EVMOffRamp.GasLimitOverride[] memory gasLimitOverrides = new EVM2EVMOffRamp.GasLimitOverride[](messages.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ lock_release_token_pool: ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/Lo
lock_release_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.bin 9afb4cf8621b5e60ac70c1b95fcc28d735119bdbc8c702bc9931d30e712e29f3
maybe_revert_message_receiver: ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.abi ../../../contracts/solc/v0.8.24/MaybeRevertMessageReceiver/MaybeRevertMessageReceiver.bin d73956c26232ebcc4a5444429fa99cbefed960e323be9b5a24925885c2e477d5
message_hasher: ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.abi ../../../contracts/solc/v0.8.24/MessageHasher/MessageHasher.bin 1d5146d43e1b99cd2d6f9f06475be19087e4349f7cee0fdbbf134ba65e967c93
mock_arm_contract: ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.abi ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.bin e7a3a6c3eda5fb882e16bcc2b4340f78523acb67907bcdcaf3c8ffc51488688e
mock_usdc_token_messenger: ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin d976651d36b33ac2196b32b9d2f4fa6690c6a18d41b621365659fce1c1d1e737
mock_usdc_token_transmitter: ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.bin be0dbc3e475741ea0b7a54ec2b935a321b428baa9f4ce18180a87fb38bb87de2
mock_v3_aggregator_contract: ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.abi ../../../contracts/solc/v0.8.24/MockV3Aggregator/MockV3Aggregator.bin 518e19efa2ff52b0fefd8e597b05765317ee7638189bfe34ca43de2f6599faf4
Expand Down
1 change: 0 additions & 1 deletion core/gethwrappers/ccip/go_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ package ccip
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin TokenPool token_pool
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/RMN/RMN.abi ../../../contracts/solc/v0.8.24/RMN/RMN.bin ARMContract arm_contract
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.abi ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.bin ARMProxyContract arm_proxy_contract
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.abi ../../../contracts/solc/v0.8.24/MockRMN1_0/MockRMN.bin MockARMContract mock_arm_contract
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.abi ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.bin TokenAdminRegistry token_admin_registry
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.abi ../../../contracts/solc/v0.8.24/RegistryModuleOwnerCustom/RegistryModuleOwnerCustom.bin RegistryModuleOwnerCustom registry_module_owner_custom
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin MockE2EUSDCTokenMessenger mock_usdc_token_messenger
Expand Down

0 comments on commit 2c58177

Please sign in to comment.