Skip to content

Commit

Permalink
fix : return disabled config
Browse files Browse the repository at this point in the history
Signed-off-by: 0xsuryansh <[email protected]>
  • Loading branch information
0xsuryansh committed Oct 1, 2024
1 parent 9d4c9d4 commit 8c2ef70
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
7 changes: 1 addition & 6 deletions contracts/src/v0.8/ccip/offRamp/OffRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {MultiOCR3Base} from "../ocr/MultiOCR3Base.sol";

import {IERC20} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/token/ERC20/IERC20.sol";
import {ERC165Checker} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/introspection/ERC165Checker.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/structs/EnumerableSet.sol";

/// @notice OffRamp enables OCR networks to execute multiple messages
/// in an OffRamp in a single transaction.
Expand Down Expand Up @@ -977,11 +977,6 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base {
currentConfig.onRamp = newOnRamp;
currentConfig.isEnabled = sourceConfigUpdate.isEnabled;
currentConfig.router = sourceConfigUpdate.router;
if (sourceConfigUpdate.isEnabled) {
s_supportedChainSelectors.add(sourceChainSelector);
} else {
s_supportedChainSelectors.remove(sourceChainSelector);
}

emit SourceChainConfigSet(sourceChainSelector, currentConfig);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/v0.8/ccip/test/helpers/OffRampHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Client} from "../../libraries/Client.sol";
import {Internal} from "../../libraries/Internal.sol";
import {OffRamp} from "../../offRamp/OffRamp.sol";
import {IgnoreContractSize} from "./IgnoreContractSize.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/structs/EnumerableSet.sol";

contract OffRampHelper is OffRamp, IgnoreContractSize {
using EnumerableSet for EnumerableSet.UintSet;
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/v0.8/ccip/test/offRamp/OffRamp.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3017,7 +3017,7 @@ contract OffRamp_applySourceChainConfigUpdates is OffRampSetup {
Vm.Log[] memory logEntries = vm.getRecordedLogs();
assertEq(logEntries.length, 0);

assertEq(s_offRamp.getSupportedChainSelectors().length, 0);
assertEq(s_offRamp.getSourceChainSelectors().length, 0);
}

function test_AddNewChain_Success() public {
Expand Down
28 changes: 26 additions & 2 deletions core/gethwrappers/ccip/generated/offramp/offramp.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mock_v3_aggregator_contract: ../../../contracts/solc/v0.8.24/MockV3Aggregator/Mo
multi_aggregate_rate_limiter: ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.abi ../../../contracts/solc/v0.8.24/MultiAggregateRateLimiter/MultiAggregateRateLimiter.bin 0b541232e49727e947dc164eadf35963c66e67576f21baa0ecaa06a8833148ed
multi_ocr3_helper: ../../../contracts/solc/v0.8.24/MultiOCR3Helper/MultiOCR3Helper.abi ../../../contracts/solc/v0.8.24/MultiOCR3Helper/MultiOCR3Helper.bin 04b6b261dd71925670bf4d904aaf7bf08543452009feefb88e07d4c49d12e969
nonce_manager: ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.abi ../../../contracts/solc/v0.8.24/NonceManager/NonceManager.bin 6f64e1083b356c06ee66b9138e398b9c97a4cd3e8c9ec38cf3010cebc79af536
offramp: ../../../contracts/solc/v0.8.24/OffRamp/OffRamp.abi ../../../contracts/solc/v0.8.24/OffRamp/OffRamp.bin 941b18b4e2aef977195fefba514e17c9475667e6f8513b18cabfb07ff90136ce
offramp: ../../../contracts/solc/v0.8.24/OffRamp/OffRamp.abi ../../../contracts/solc/v0.8.24/OffRamp/OffRamp.bin 0b8c19d3dc18bae2859e7c8c4b52b97f6de1a849400cb713662cd9cedb22fdd4
onramp: ../../../contracts/solc/v0.8.24/OnRamp/OnRamp.abi ../../../contracts/solc/v0.8.24/OnRamp/OnRamp.bin 4f29f05261bdaf9b99e675c1169c0d5cba841b6dd7ca3a8997cc0d3cae7ba850
ping_pong_demo: ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.abi ../../../contracts/solc/v0.8.24/PingPongDemo/PingPongDemo.bin c1c2f8a65c7ffd971899cae7fe62f2da57d09e936151e2b92163c4bebe699d6b
price_registry: ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.abi ../../../contracts/solc/v0.8.24/PriceRegistry/PriceRegistry.bin e7781d600c1bb7aa4620106af7f6e146a109b97f4cb6a7d06c9e15773340ecb2
Expand Down

0 comments on commit 8c2ef70

Please sign in to comment.