Skip to content

Commit

Permalink
rm offRamp &&
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR committed Jul 15, 2024
1 parent e24dd83 commit 205a074
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 42 deletions.
48 changes: 24 additions & 24 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ EVM2EVMMultiOffRamp_ccipReceive:test_Reverts() (gas: 15659)
EVM2EVMMultiOffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 67189)
EVM2EVMMultiOffRamp_commit:test_InvalidInterval_Revert() (gas: 59695)
EVM2EVMMultiOffRamp_commit:test_InvalidRootRevert() (gas: 58775)
EVM2EVMMultiOffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6532462)
EVM2EVMMultiOffRamp_commit:test_NoConfig_Revert() (gas: 6115692)
EVM2EVMMultiOffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6531262)
EVM2EVMMultiOffRamp_commit:test_NoConfig_Revert() (gas: 6114492)
EVM2EVMMultiOffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 108372)
EVM2EVMMultiOffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 118374)
EVM2EVMMultiOffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 108415)
Expand All @@ -156,9 +156,9 @@ EVM2EVMMultiOffRamp_commit:test_StaleReportWithRoot_Success() (gas: 227655)
EVM2EVMMultiOffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 119676)
EVM2EVMMultiOffRamp_commit:test_Unhealthy_Revert() (gas: 77602)
EVM2EVMMultiOffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 209115)
EVM2EVMMultiOffRamp_commit:test_WrongConfigWithoutSigners_Revert() (gas: 6526851)
EVM2EVMMultiOffRamp_commit:test_WrongConfigWithoutSigners_Revert() (gas: 6525651)
EVM2EVMMultiOffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 47782)
EVM2EVMMultiOffRamp_constructor:test_Constructor_Success() (gas: 6118738)
EVM2EVMMultiOffRamp_constructor:test_Constructor_Success() (gas: 6117538)
EVM2EVMMultiOffRamp_constructor:test_SourceChainSelector_Revert() (gas: 157533)
EVM2EVMMultiOffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 104021)
EVM2EVMMultiOffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101901)
Expand All @@ -169,12 +169,12 @@ EVM2EVMMultiOffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17277)
EVM2EVMMultiOffRamp_execute:test_LargeBatch_Success() (gas: 1559403)
EVM2EVMMultiOffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 343591)
EVM2EVMMultiOffRamp_execute:test_MultipleReports_Success() (gas: 260175)
EVM2EVMMultiOffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6582813)
EVM2EVMMultiOffRamp_execute:test_NoConfig_Revert() (gas: 6165762)
EVM2EVMMultiOffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6581613)
EVM2EVMMultiOffRamp_execute:test_NoConfig_Revert() (gas: 6164562)
EVM2EVMMultiOffRamp_execute:test_NonArray_Revert() (gas: 27678)
EVM2EVMMultiOffRamp_execute:test_SingleReport_Success() (gas: 165178)
EVM2EVMMultiOffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 149134)
EVM2EVMMultiOffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6944888)
EVM2EVMMultiOffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6943688)
EVM2EVMMultiOffRamp_execute:test_ZeroReports_Revert() (gas: 17151)
EVM2EVMMultiOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18413)
EVM2EVMMultiOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 249368)
Expand Down Expand Up @@ -205,7 +205,7 @@ EVM2EVMMultiOffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas()
EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 391710)
EVM2EVMMultiOffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 65899)
EVM2EVMMultiOffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 80955)
EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 535469)
EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 535423)
EVM2EVMMultiOffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 480334)
EVM2EVMMultiOffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 35763)
EVM2EVMMultiOffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 520344)
Expand All @@ -218,16 +218,16 @@ EVM2EVMMultiOffRamp_getExecutionState:test_GetDifferentChainExecutionState_Succe
EVM2EVMMultiOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 87407)
EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 75594)
EVM2EVMMultiOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 26461)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 163344)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 207890)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 163329)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 207875)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 26001)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 152861)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 507751)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2308185)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 209904)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 210481)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 669965)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 299748)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 507728)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails() (gas: 2308170)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 209881)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 210458)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 669850)
EVM2EVMMultiOffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 299725)
EVM2EVMMultiOffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 160598)
EVM2EVMMultiOffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 24128)
EVM2EVMMultiOffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 59102)
Expand Down Expand Up @@ -362,7 +362,7 @@ EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 335546
EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 314297)
EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17096)
EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153427)
EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5466075)
EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5464875)
EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 144183)
EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21345)
EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36442)
Expand All @@ -383,7 +383,7 @@ EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 4
EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54173)
EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132056)
EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52200)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 559932)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 559886)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 499132)
EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35442)
EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 546695)
Expand All @@ -406,15 +406,15 @@ EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 131682)
EVM2EVMOffRamp_getAllRateLimitTokens:test_GetAllRateLimitTokens_Success() (gas: 38408)
EVM2EVMOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3213556)
EVM2EVMOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 83091)
EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 483491)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 186568)
EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 483468)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 186553)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 25894)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 43519)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 25997)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 188681)
EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188128)
EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2027508)
EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 143958)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 188658)
EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 188105)
EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails() (gas: 2027493)
EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 143943)
EVM2EVMOffRamp_metadataHash:test_MetadataHash_Success() (gas: 8871)
EVM2EVMOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 40429)
EVM2EVMOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 38804)
Expand Down
13 changes: 6 additions & 7 deletions contracts/src/v0.8/ccip/offRamp/EVM2EVMMultiOffRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,12 @@ contract EVM2EVMMultiOffRamp is ITypeAndVersion, MultiOCR3Base {
// revert the entire transaction if it fails. This will show the user if
// their manual exec will fail before they submit it.
if (manualExecution) {
if (
newState == Internal.MessageExecutionState.FAILURE
&& originalState != Internal.MessageExecutionState.UNTOUCHED
) {
// If manual execution fails, we revert the entire transaction, unless the originalState is UNTOUCHED as we
// would still be making progress by changing the state from UNTOUCHED to FAILURE.
revert ExecutionError(message.header.messageId, returnData);
if (newState == Internal.MessageExecutionState.FAILURE) {
if (originalState != Internal.MessageExecutionState.UNTOUCHED) {
// If manual execution fails, we revert the entire transaction, unless the originalState is UNTOUCHED as we
// would still be making progress by changing the state from UNTOUCHED to FAILURE.
revert ExecutionError(message.header.messageId, returnData);
}
}
}

Expand Down
13 changes: 6 additions & 7 deletions contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,12 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio
// revert the entire transaction if it fails. This will show the user if
// their manual exec will fail before they submit it.
if (manualExecution) {
if (
newState == Internal.MessageExecutionState.FAILURE
&& originalState != Internal.MessageExecutionState.UNTOUCHED
) {
// If manual execution fails, we revert the entire transaction, unless the originalState is UNTOUCHED as we
// would still be making progress by changing the state from UNTOUCHED to FAILURE.
revert ExecutionError(returnData);
if (newState == Internal.MessageExecutionState.FAILURE) {
if (originalState != Internal.MessageExecutionState.UNTOUCHED) {
// If manual execution fails, we revert the entire transaction, unless the originalState is UNTOUCHED as we
// would still be making progress by changing the state from UNTOUCHED to FAILURE.
revert ExecutionError(returnData);
}
}
}

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ccip_config: ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../
commit_store: ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.abi ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.bin ddc26c10c2a52b59624faae9005827b09b98db4566887a736005e8cc37cf8a51
commit_store_helper: ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.abi ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.bin ebd8aac686fa28a71d4212bcd25a28f8f640d50dce5e50498b2f6b8534890b69
ether_sender_receiver: ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.abi ../../../contracts/solc/v0.8.24/EtherSenderReceiver/EtherSenderReceiver.bin 09510a3f773f108a3c231e8d202835c845ded862d071ec54c4f89c12d868b8de
evm_2_evm_multi_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.bin a1a46512bfe55243e993869d4ed557f21d88569870c539effe491676cdb4ccff
evm_2_evm_multi_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOffRamp/EVM2EVMMultiOffRamp.bin a9f1db6b9415c11b0467fe40eddc48075f8261f312d0a4b78aff05cfd78e7594
evm_2_evm_multi_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMMultiOnRamp/EVM2EVMMultiOnRamp.bin 918036eebe888df142047ebb3c93ddd9e3d47749bfa25e32dc89f96e1c5f43a4
evm_2_evm_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.bin 422d68e391c941656ec6d50ce31c76594f7d226d6b17b10631b256343d143987
evm_2_evm_offramp: ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOffRamp/EVM2EVMOffRamp.bin a8c23c9280a713544eae0a0b8841a9caf97e616338d31ebc62501d8b4ab0eed6
evm_2_evm_onramp: ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.abi ../../../contracts/solc/v0.8.24/EVM2EVMOnRamp/EVM2EVMOnRamp.bin 116d5cb8447a1af61664a8d1db2d76086c042a3228337bc5cd49b9abd3e815f7
lock_release_token_pool: ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPool/LockReleaseTokenPool.bin 95a93517b01f51c35d82711a0015995f4804820ed67f6b46b785c4c94815df93
lock_release_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/LockReleaseTokenPoolAndProxy/LockReleaseTokenPoolAndProxy.bin 05e308151b5adc9ba8d33385b8f82d55aad638652fe50e3ea8b09b1d0bbfd367
Expand Down

0 comments on commit 205a074

Please sign in to comment.