Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 3bf1170

Browse files
authored
Cherry pick chainlink PRs (#1549)
This brings three changes into the ccip repo - OZ AccessControl support for RegistryModule - MockRouter ExtraArgsV2 support - Adds Ownable2Step, a more efficient ownable contract - Bump foundry to be in line with `chainlink`
2 parents 75b1a6f + e86b273 commit 3bf1170

File tree

143 files changed

+2247
-815
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2247
-815
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@chainlink/contracts': patch
3+
---
4+
5+
#feature adds OZ AccessControl support to the registry module
6+
7+
8+
PR issue: CCIP-4105
9+
10+
Solidity Review issue: CCIP-3966
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@chainlink/contracts': patch
3+
---
4+
5+
Refactor MockCCIPRouter to support EVMExtraArgsV2
6+
7+
PR issue : CCIP-4288

contracts/GNUmakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mockery: $(mockery) ## Install mockery.
4343

4444
.PHONY: foundry
4545
foundry: ## Install foundry.
46-
foundryup --version nightly-515a4cc8aba1627a717a1057ff4f09c8cd3bf51f
46+
foundryup --version nightly-fb5f0e1c4d9b9b0861be3e3bd07963524c5ac08e
4747

4848
.PHONY: foundry-refresh
4949
foundry-refresh: foundry

contracts/foundry.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ test = 'src/v0.8/transmission/test'
9595
optimizer_runs = 1_000_000
9696
src = 'src/v0.8/shared'
9797
test = 'src/v0.8/shared/test'
98-
solc_version = '0.8.19'
98+
solc_version = '0.8.24'
9999

100100

101101
# See more config options https://github.com/foundry-rs/foundry/tree/master/config

contracts/gas-snapshots/ccip.gas-snapshot

+22-17
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ CommitStore_verify:test_Paused_Revert() (gas: 18568)
114114
CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36848)
115115
DefensiveExampleTest:test_HappyPath_Success() (gas: 200200)
116116
DefensiveExampleTest:test_Recovery() (gas: 424476)
117-
E2E:test_E2E_3MessagesSuccess_gas() (gas: 1108425)
117+
E2E:test_E2E_3MessagesSuccess_gas() (gas: 1141917)
118118
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38322)
119119
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 104438)
120-
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 86026)
120+
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 83526)
121121
EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 37365)
122122
EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 95013)
123-
EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 40341)
123+
EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 37841)
124124
EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 87189)
125125
EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 381594)
126126
EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 140568)
@@ -482,11 +482,14 @@ MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3585)
482482
MerkleMultiProofTest:test_MerkleRoot256() (gas: 394891)
483483
MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 3661)
484484
MerkleMultiProofTest:test_SpecSync_gas() (gas: 34129)
485+
MockRouterTest:test_ccipSendWithEVMExtraArgsV1_Success() (gas: 110073)
486+
MockRouterTest:test_ccipSendWithEVMExtraArgsV2_Success() (gas: 132614)
485487
MockRouterTest:test_ccipSendWithInsufficientNativeTokens_Revert() (gas: 34037)
486-
MockRouterTest:test_ccipSendWithInvalidMsgValue_Revert() (gas: 60842)
487-
MockRouterTest:test_ccipSendWithLinkFeeTokenAndValidMsgValue_Success() (gas: 126576)
488-
MockRouterTest:test_ccipSendWithLinkFeeTokenbutInsufficientAllowance_Revert() (gas: 63455)
489-
MockRouterTest:test_ccipSendWithSufficientNativeFeeTokens_Success() (gas: 44012)
488+
MockRouterTest:test_ccipSendWithInvalidEVMExtraArgs_Revert() (gas: 106684)
489+
MockRouterTest:test_ccipSendWithInvalidMsgValue_Revert() (gas: 60886)
490+
MockRouterTest:test_ccipSendWithLinkFeeTokenAndValidMsgValue_Success() (gas: 126640)
491+
MockRouterTest:test_ccipSendWithLinkFeeTokenButInsufficientAllowance_Revert() (gas: 63478)
492+
MockRouterTest:test_ccipSendWithSufficientNativeFeeTokens_Success() (gas: 44048)
490493
MultiAggregateRateLimiter_applyRateLimiterConfigUpdates:test_MultipleConfigsBothLanes_Success() (gas: 133528)
491494
MultiAggregateRateLimiter_applyRateLimiterConfigUpdates:test_MultipleConfigs_Success() (gas: 315630)
492495
MultiAggregateRateLimiter_applyRateLimiterConfigUpdates:test_OnlyCallableByOwner_Revert() (gas: 17864)
@@ -512,7 +515,7 @@ MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitExce
512515
MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithRateLimitReset_Success() (gas: 76561)
513516
MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokensOnDifferentChains_Success() (gas: 308233)
514517
MultiAggregateRateLimiter_onInboundMessage:test_ValidateMessageWithTokens_Success() (gas: 50558)
515-
MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 1073669578)
518+
MultiAggregateRateLimiter_onOutboundMessage:test_RateLimitValueDifferentLanes_Success() (gas: 51181)
516519
MultiAggregateRateLimiter_onOutboundMessage:test_ValidateMessageWithNoTokens_Success() (gas: 19302)
517520
MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageFromUnauthorizedCaller_Revert() (gas: 15913)
518521
MultiAggregateRateLimiter_onOutboundMessage:test_onOutboundMessage_ValidateMessageWithDifferentTokensOnDifferentChains_Success() (gas: 209885)
@@ -566,7 +569,7 @@ MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61275)
566569
MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39933)
567570
MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 33049)
568571
MultiOnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 233732)
569-
MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1501821)
572+
MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1518567)
570573
NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37934)
571574
NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706)
572575
NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778)
@@ -634,7 +637,7 @@ OffRamp_batchExecute:test_Unhealthy_Success() (gas: 554256)
634637
OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10622)
635638
OffRamp_ccipReceive:test_Reverts() (gas: 15407)
636639
OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 92905)
637-
OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 64099)
640+
OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 61599)
638641
OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 68173)
639642
OffRamp_commit:test_InvalidInterval_Revert() (gas: 64291)
640643
OffRamp_commit:test_InvalidRootRevert() (gas: 63356)
@@ -728,10 +731,10 @@ OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success(
728731
OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 347346)
729732
OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37656)
730733
OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 104404)
731-
OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 85342)
734+
OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 82842)
732735
OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36752)
733736
OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 94382)
734-
OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 39741)
737+
OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 37241)
735738
OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 86516)
736739
OffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 162381)
737740
OffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 23903)
@@ -917,11 +920,13 @@ RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 24886)
917920
RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 38944)
918921
RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46849)
919922
RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38506)
920-
RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36033)
921-
RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19739)
922-
RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130086)
923-
RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19559)
924-
RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129905)
923+
RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36107)
924+
RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 20206)
925+
RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 130628)
926+
RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19773)
927+
RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130108)
928+
RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19593)
929+
RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129927)
925930
Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89366)
926931
Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10662612)
927932
Router_applyRampUpdates:test_OnRampDisable() (gas: 56007)

contracts/gas-snapshots/functions.gas-snapshot

+9-9
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_RevertIfNotOwn
229229
FunctionsTermsOfServiceAllowList_UnblockSender:test_UnblockSender_Success() (gas: 96240)
230230
FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 13819)
231231
FunctionsTermsOfServiceAllowList_UpdateConfig:test_UpdateConfig_Success() (gas: 22824)
232-
Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 84725)
233-
Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79140)
232+
Gas_AcceptTermsOfService:test_AcceptTermsOfService_Gas() (gas: 81752)
233+
Gas_AddConsumer:test_AddConsumer_Gas() (gas: 76167)
234234
Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419)
235-
Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20562)
236-
Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20024)
237-
Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 501184)
238-
Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 202376)
239-
Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38518)
240-
Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 984338)
241-
Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 181561)
235+
Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 17589)
236+
Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 17051)
237+
Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 498189)
238+
Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 199381)
239+
Gas_FundSubscription:test_FundSubscription_Gas() (gas: 35545)
240+
Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 981365)
241+
Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 178588)

0 commit comments

Comments
 (0)