diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 036f453291..627f183dac 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -750,7 +750,7 @@ OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Revert() (gas: 67797) OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Success() (gas: 325198) OnRamp_applyDestChainConfigUpdates:test_ApplyDestChainConfigUpdates_Success() (gas: 65878) OnRamp_applyDestChainConfigUpdates:test_ApplyDestChainConfigUpdates_WithInvalidChainSelector_Revert() (gas: 13631) -OnRamp_constructor:test_Constructor_EnableAllowList_ForwardFromRouter_Reverts() (gas: 2714724) +OnRamp_constructor:test_Constructor_EnableAllowList_ForwardFromRouter_Reverts() (gas: 2673564) OnRamp_constructor:test_Constructor_InvalidConfigChainSelectorEqZero_Revert() (gas: 95249) OnRamp_constructor:test_Constructor_InvalidConfigNonceManagerEqAddressZero_Revert() (gas: 93191) OnRamp_constructor:test_Constructor_InvalidConfigRMNProxyEqAddressZero_Revert() (gas: 98224) diff --git a/contracts/src/v0.8/ccip/onRamp/OnRamp.sol b/contracts/src/v0.8/ccip/onRamp/OnRamp.sol index 1ecdf6f999..e053baf507 100644 --- a/contracts/src/v0.8/ccip/onRamp/OnRamp.sol +++ b/contracts/src/v0.8/ccip/onRamp/OnRamp.sol @@ -91,9 +91,9 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { /// can be passed in the constructor and the applyDestChainConfigUpdates function //solhint-disable gas-struct-packing struct DestChainConfigArgs { - uint64 destChainSelector; // ──────────╮Destination chain selector - IRouter router; // │Source router address - bool allowListEnabled; // ─────────────╯Boolean indicator to specify if allowList check is enabled + uint64 destChainSelector; // ─╮ Destination chain selector + IRouter router; // │ Source router address + bool allowListEnabled; //─────╯ Boolean indicator to specify if allowList check is enabled } /// @dev Struct used to apply AllowList Senders for multiple destChainSelectors diff --git a/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol b/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol index a14e4427a5..16889db39e 100644 --- a/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/onRamp/OnRamp.t.sol @@ -58,7 +58,7 @@ contract OnRamp_constructor is OnRampSetup { OnRamp.DynamicConfig memory dynamicConfig = _generateDynamicOnRampConfig(address(s_feeQuoter)); - //Creating a DestChainConfig and setting allowListEnabled : true + // Creating a DestChainConfig and setting allowListEnabled : true OnRamp.DestChainConfigArgs[] memory destChainConfigs = new OnRamp.DestChainConfigArgs[](1); destChainConfigs[0] = OnRamp.DestChainConfigArgs({ destChainSelector: DEST_CHAIN_SELECTOR, @@ -74,15 +74,11 @@ contract OnRamp_constructor is OnRampSetup { OnRampHelper tempOnRamp = new OnRampHelper(staticConfig, dynamicConfig, destChainConfigs); - //Sending a message and expecting revert as allowList is enabled with no address in allowlist + // Sending a message and expecting revert as allowList is enabled with no address in allowlist Client.EVM2AnyMessage memory message = _generateEmptyMessage(); - message.extraArgs = Client._argsToBytes(Client.EVMExtraArgsV1({gasLimit: GAS_LIMIT * 2})); - uint256 feeAmount = 1234567890; vm.startPrank(address(s_sourceRouter)); - IERC20(s_sourceFeeToken).transferFrom(OWNER, address(tempOnRamp), feeAmount); vm.expectRevert(abi.encodeWithSelector(OnRamp.SenderNotAllowed.selector, OWNER)); - tempOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, feeAmount, OWNER); - vm.stopPrank(); + tempOnRamp.forwardFromRouter(DEST_CHAIN_SELECTOR, message, 0, OWNER); } function test_Constructor_InvalidConfigChainSelectorEqZero_Revert() public {