diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 8ae9ad18e3..e026dd1642 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -20,21 +20,21 @@ AggregateTokenLimiter_setRateLimiterConfig:test_OnlyOnlyCallableByAdminOrOwner_R AggregateTokenLimiter_setRateLimiterConfig:test_Owner_Success() (gas: 30393) AggregateTokenLimiter_setRateLimiterConfig:test_TokenLimitAdmin_Success() (gas: 32407) BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28842) -BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55227) -BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243952) +BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55271) +BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244024) BurnFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24166) BurnMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27609) -BurnMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55227) -BurnMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 241788) +BurnMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55271) +BurnMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 241912) BurnMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 17851) BurnMintTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 28805) -BurnMintTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56209) -BurnMintTokenPool_releaseOrMint:test_PoolMint_Success() (gas: 112369) +BurnMintTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56253) +BurnMintTokenPool_releaseOrMint:test_PoolMint_Success() (gas: 112391) BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28842) -BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55227) -BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243927) +BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55271) +BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244050) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24170) -CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2052233) +CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2052431) CCIPConfigSetup:test_getCapabilityConfiguration_Success() (gas: 9508) CCIPConfig_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 87751) CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 359022) @@ -122,30 +122,30 @@ CommitStore_verify:test_Blessed_Success() (gas: 96581) CommitStore_verify:test_NotBlessed_Success() (gas: 61473) CommitStore_verify:test_Paused_Revert() (gas: 18568) CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36848) -DefensiveExampleTest:test_HappyPath_Success() (gas: 200130) -DefensiveExampleTest:test_Recovery() (gas: 424336) -E2E:test_E2E_3MessagesSuccess_gas() (gas: 1106787) +DefensiveExampleTest:test_HappyPath_Success() (gas: 200200) +DefensiveExampleTest:test_Recovery() (gas: 424476) +E2E:test_E2E_3MessagesSuccess_gas() (gas: 1106985) EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38322) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 104372) -EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 86004) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 104438) +EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_transfer_Revert() (gas: 86026) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 37365) -EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 95035) +EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 95013) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 40341) EVM2EVMOffRamp__releaseOrMintToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 87189) -EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 381462) -EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 140546) -EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 798613) -EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 178356) +EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 381594) +EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 140568) +EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 798833) +EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 178400) EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 29681) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 67124) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 67146) EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 43605) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 207958) -EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 219299) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 208068) +EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 219365) EVM2EVMOffRamp__report:test_Report_Success() (gas: 127774) -EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 237362) -EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 245951) -EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 329217) -EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 310056) +EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 237406) +EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 246039) +EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 329283) +EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 310166) EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17048) EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153120) EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5212732) @@ -153,7 +153,7 @@ EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 143845) EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21507) EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36936) EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 52324) -EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 473299) +EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 473387) EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 48346) EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 153019) EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 103946) @@ -164,25 +164,25 @@ EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 16011 EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175497) EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 237901) EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115048) -EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 406540) +EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 406606) EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54774) EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132556) EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52786) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 564339) -EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 494587) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 564471) +EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 494719) EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35887) -EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 546201) +EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 546333) EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 65298) EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 124107) EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 144365) EVM2EVMOffRamp_execute:test_execute_RouterYULCall_Success() (gas: 394187) EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18685) -EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 275191) +EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 275257) EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 18815) -EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 223138) +EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 223182) EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 48391) EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 47823) -EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 311488) +EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 311554) EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 70839) EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 232136) EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 281170) @@ -196,13 +196,13 @@ EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 188280) EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 27574) EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 46457) EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 27948) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithMultipleMessagesAndSourceTokens_Success() (gas: 531198) -EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithSourceTokens_Success() (gas: 344397) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithMultipleMessagesAndSourceTokens_Success() (gas: 531330) +EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithSourceTokens_Success() (gas: 344463) EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 189760) -EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails_Success() (gas: 2195062) -EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 361988) +EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails_Success() (gas: 2195128) +EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 362054) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 145457) -EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 365217) +EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 365283) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_LowGasLimitManualExec_Success() (gas: 450711) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 192223) EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_WithInvalidReceiverExecutionGasOverride_Revert() (gas: 155387) @@ -237,15 +237,15 @@ EVM2EVMOnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 25757) EVM2EVMOnRamp_forwardFromRouter:test_PriceNotFoundForToken_Revert() (gas: 57722) EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 182247) EVM2EVMOnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 180718) -EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 133214) -EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3573565) +EVM2EVMOnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 133236) +EVM2EVMOnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3573653) EVM2EVMOnRamp_forwardFromRouter:test_TooManyTokens_Revert() (gas: 30472) EVM2EVMOnRamp_forwardFromRouter:test_Unhealthy_Revert() (gas: 43480) EVM2EVMOnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 110111) EVM2EVMOnRamp_forwardFromRouter:test_ZeroAddressReceiver_Revert() (gas: 316020) -EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 113011) +EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_ShouldStoreLinkFees_Success() (gas: 113033) EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 72824) -EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_correctSourceTokenData_Success() (gas: 714506) +EVM2EVMOnRamp_forwardFromRouter:test_forwardFromRouter_correctSourceTokenData_Success() (gas: 714726) EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 148808) EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 192679) EVM2EVMOnRamp_forwardFromRouter_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 123243) @@ -274,14 +274,14 @@ EVM2EVMOnRamp_getTokenTransferCost:test_UnsupportedToken_Revert() (gas: 21353) EVM2EVMOnRamp_getTokenTransferCost:test_ZeroAmountTokenTransferChargesMinFeeAndGas_Success() (gas: 28382) EVM2EVMOnRamp_getTokenTransferCost:test_ZeroFeeConfigChargesMinFee_Success() (gas: 38899) EVM2EVMOnRamp_getTokenTransferCost:test__getTokenTransferCost_selfServeUsesDefaults_Success() (gas: 29674) -EVM2EVMOnRamp_linkAvailableForPayment:test_InsufficientLinkBalance_Success() (gas: 32734) -EVM2EVMOnRamp_linkAvailableForPayment:test_LinkAvailableForPayment_Success() (gas: 135225) -EVM2EVMOnRamp_payNops:test_AdminPayNops_Success() (gas: 143638) -EVM2EVMOnRamp_payNops:test_InsufficientBalance_Revert() (gas: 29174) -EVM2EVMOnRamp_payNops:test_NoFeesToPay_Revert() (gas: 127762) -EVM2EVMOnRamp_payNops:test_NoNopsToPay_Revert() (gas: 133615) -EVM2EVMOnRamp_payNops:test_NopPayNops_Success() (gas: 146925) -EVM2EVMOnRamp_payNops:test_OwnerPayNops_Success() (gas: 141500) +EVM2EVMOnRamp_linkAvailableForPayment:test_InsufficientLinkBalance_Success() (gas: 32756) +EVM2EVMOnRamp_linkAvailableForPayment:test_LinkAvailableForPayment_Success() (gas: 135247) +EVM2EVMOnRamp_payNops:test_AdminPayNops_Success() (gas: 143660) +EVM2EVMOnRamp_payNops:test_InsufficientBalance_Revert() (gas: 29196) +EVM2EVMOnRamp_payNops:test_NoFeesToPay_Revert() (gas: 127718) +EVM2EVMOnRamp_payNops:test_NoNopsToPay_Revert() (gas: 133580) +EVM2EVMOnRamp_payNops:test_NopPayNops_Success() (gas: 146947) +EVM2EVMOnRamp_payNops:test_OwnerPayNops_Success() (gas: 141522) EVM2EVMOnRamp_payNops:test_PayNopsSuccessAfterSetNops() (gas: 298719) EVM2EVMOnRamp_payNops:test_WrongPermissions_Revert() (gas: 15378) EVM2EVMOnRamp_setDynamicConfig:test_SetConfigInvalidConfig_Revert() (gas: 42524) @@ -291,10 +291,10 @@ EVM2EVMOnRamp_setFeeTokenConfig:test_OnlyCallableByOwnerOrAdmin_Revert() (gas: 1 EVM2EVMOnRamp_setFeeTokenConfig:test_SetFeeTokenConfigByAdmin_Success() (gas: 16497) EVM2EVMOnRamp_setFeeTokenConfig:test_SetFeeTokenConfig_Success() (gas: 14036) EVM2EVMOnRamp_setNops:test_AdminCanSetNops_Success() (gas: 61872) -EVM2EVMOnRamp_setNops:test_IncludesPayment_Success() (gas: 470769) +EVM2EVMOnRamp_setNops:test_IncludesPayment_Success() (gas: 470835) EVM2EVMOnRamp_setNops:test_LinkTokenCannotBeNop_Revert() (gas: 57370) EVM2EVMOnRamp_setNops:test_NonOwnerOrAdmin_Revert() (gas: 14779) -EVM2EVMOnRamp_setNops:test_NotEnoughFundsForPayout_Revert() (gas: 85178) +EVM2EVMOnRamp_setNops:test_NotEnoughFundsForPayout_Revert() (gas: 85200) EVM2EVMOnRamp_setNops:test_SetNopsRemovesOldNopsCompletely_Success() (gas: 60868) EVM2EVMOnRamp_setNops:test_SetNops_Success() (gas: 174097) EVM2EVMOnRamp_setNops:test_TooManyNops_Revert() (gas: 193503) @@ -303,10 +303,10 @@ EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_InvalidD EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_OnlyCallableByOwnerOrAdmin_Revert() (gas: 14427) EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_Success() (gas: 85487) EVM2EVMOnRamp_setTokenTransferFeeConfig:test__setTokenTransferFeeConfig_byAdmin_Success() (gas: 17468) -EVM2EVMOnRamp_withdrawNonLinkFees:test_LinkBalanceNotSettled_Revert() (gas: 83595) +EVM2EVMOnRamp_withdrawNonLinkFees:test_LinkBalanceNotSettled_Revert() (gas: 83617) EVM2EVMOnRamp_withdrawNonLinkFees:test_NonOwnerOrAdmin_Revert() (gas: 15353) -EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272728) -EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawNonLinkFees_Success() (gas: 53500) +EVM2EVMOnRamp_withdrawNonLinkFees:test_SettlingBalance_Success() (gas: 272851) +EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawNonLinkFees_Success() (gas: 53566) EVM2EVMOnRamp_withdrawNonLinkFees:test_WithdrawToZeroAddress_Revert() (gas: 12875) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96907) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49775) @@ -381,20 +381,20 @@ FeeQuoter_getValidatedFee:test_NotAFeeToken_Revert() (gas: 21172) FeeQuoter_getValidatedFee:test_SingleTokenMessage_Success() (gas: 113309) FeeQuoter_getValidatedFee:test_TooManyTokens_Revert() (gas: 22691) FeeQuoter_getValidatedFee:test_ZeroDataAvailabilityMultiplier_Success() (gas: 62714) -FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 2045042) -FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 2045000) -FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 2025119) -FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 2044774) -FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 2044978) -FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 2044790) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Above18Decimals_Success() (gas: 1973907) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedErc20Below18Decimals_Success() (gas: 1973865) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt0Decimals_Success() (gas: 1953984) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFeedAt18Decimals_Success() (gas: 1973639) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedFlippedDecimals_Success() (gas: 1973843) +FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedMaxInt224Value_Success() (gas: 1973655) FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeedOverStalenessPeriod_Success() (gas: 64610) FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPriceFromFeed_Success() (gas: 64490) FeeQuoter_getValidatedTokenPrice:test_GetValidatedTokenPrice_Success() (gas: 58894) -FeeQuoter_getValidatedTokenPrice:test_OverflowFeedPrice_Revert() (gas: 2044487) +FeeQuoter_getValidatedTokenPrice:test_OverflowFeedPrice_Revert() (gas: 1973352) FeeQuoter_getValidatedTokenPrice:test_StaleFeeToken_Success() (gas: 61764) FeeQuoter_getValidatedTokenPrice:test_TokenNotSupportedFeed_Revert() (gas: 116495) FeeQuoter_getValidatedTokenPrice:test_TokenNotSupported_Revert() (gas: 14037) -FeeQuoter_getValidatedTokenPrice:test_UnderflowFeedPrice_Revert() (gas: 2043164) +FeeQuoter_getValidatedTokenPrice:test_UnderflowFeedPrice_Revert() (gas: 1972029) FeeQuoter_onReport:test_OnReport_StaleUpdate_Revert() (gas: 43631) FeeQuoter_onReport:test_onReport_InvalidForwarder_Reverts() (gas: 23492) FeeQuoter_onReport:test_onReport_Success() (gas: 80094) @@ -433,13 +433,13 @@ FeeQuoter_validateDestFamilyAddress:test_InvalidEVMAddressPrecompiles_Revert() ( FeeQuoter_validateDestFamilyAddress:test_InvalidEVMAddress_Revert() (gas: 10839) FeeQuoter_validateDestFamilyAddress:test_ValidEVMAddress_Success() (gas: 6731) FeeQuoter_validateDestFamilyAddress:test_ValidNonEVMAddress_Success() (gas: 6511) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() (gas: 209283) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_PrimaryMechanism_Success() (gas: 135896) -HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_WhileMigrationPause_Revert() (gas: 107112) +HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() (gas: 209248) +HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_PrimaryMechanism_Success() (gas: 135879) +HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_WhileMigrationPause_Revert() (gas: 107090) HybridUSDCTokenPoolMigrationTests:test_LockOrBurn_onLockReleaseMechanism_Success() (gas: 144586) -HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_OnLockReleaseMechanism_Success() (gas: 214795) -HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() (gas: 423509) -HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_incomingMessageWithPrimaryMechanism() (gas: 268840) +HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_OnLockReleaseMechanism_Success() (gas: 214817) +HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() (gas: 423641) +HybridUSDCTokenPoolMigrationTests:test_MintOrRelease_incomingMessageWithPrimaryMechanism() (gas: 268928) HybridUSDCTokenPoolMigrationTests:test_ReleaseOrMint_WhileMigrationPause_Revert() (gas: 111484) HybridUSDCTokenPoolMigrationTests:test_burnLockedUSDC_invalidPermissions_Revert() (gas: 39362) HybridUSDCTokenPoolMigrationTests:test_cancelExistingCCTPMigrationProposal() (gas: 33189) @@ -447,19 +447,19 @@ HybridUSDCTokenPoolMigrationTests:test_cannotCancelANonExistentMigrationProposal HybridUSDCTokenPoolMigrationTests:test_cannotModifyLiquidityWithoutPermissions_Revert() (gas: 13329) HybridUSDCTokenPoolMigrationTests:test_cannotTransferLiquidityDuringPendingMigration_Revert() (gas: 160900) HybridUSDCTokenPoolMigrationTests:test_lockOrBurn_then_BurnInCCTPMigration_Success() (gas: 255982) -HybridUSDCTokenPoolMigrationTests:test_transferLiquidity_Success() (gas: 165904) -HybridUSDCTokenPoolMigrationTests:test_unstickManualTxAfterMigration_destChain_Success() (gas: 154220) -HybridUSDCTokenPoolMigrationTests:test_unstickManualTxAfterMigration_homeChain_Success() (gas: 463617) -HybridUSDCTokenPoolTests:test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() (gas: 209265) -HybridUSDCTokenPoolTests:test_LockOrBurn_PrimaryMechanism_Success() (gas: 135897) -HybridUSDCTokenPoolTests:test_LockOrBurn_WhileMigrationPause_Revert() (gas: 107157) +HybridUSDCTokenPoolMigrationTests:test_transferLiquidity_Success() (gas: 165921) +HybridUSDCTokenPoolMigrationTests:test_unstickManualTxAfterMigration_destChain_Success() (gas: 154242) +HybridUSDCTokenPoolMigrationTests:test_unstickManualTxAfterMigration_homeChain_Success() (gas: 463740) +HybridUSDCTokenPoolTests:test_LockOrBurn_LockReleaseMechanism_then_switchToPrimary_Success() (gas: 209230) +HybridUSDCTokenPoolTests:test_LockOrBurn_PrimaryMechanism_Success() (gas: 135880) +HybridUSDCTokenPoolTests:test_LockOrBurn_WhileMigrationPause_Revert() (gas: 107135) HybridUSDCTokenPoolTests:test_LockOrBurn_onLockReleaseMechanism_Success() (gas: 144607) -HybridUSDCTokenPoolTests:test_MintOrRelease_OnLockReleaseMechanism_Success() (gas: 214773) -HybridUSDCTokenPoolTests:test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() (gas: 423487) -HybridUSDCTokenPoolTests:test_MintOrRelease_incomingMessageWithPrimaryMechanism() (gas: 268822) +HybridUSDCTokenPoolTests:test_MintOrRelease_OnLockReleaseMechanism_Success() (gas: 214795) +HybridUSDCTokenPoolTests:test_MintOrRelease_OnLockReleaseMechanism_then_switchToPrimary_Success() (gas: 423619) +HybridUSDCTokenPoolTests:test_MintOrRelease_incomingMessageWithPrimaryMechanism() (gas: 268910) HybridUSDCTokenPoolTests:test_ReleaseOrMint_WhileMigrationPause_Revert() (gas: 111528) HybridUSDCTokenPoolTests:test_cannotTransferLiquidityDuringPendingMigration_Revert() (gas: 160845) -HybridUSDCTokenPoolTests:test_transferLiquidity_Success() (gas: 165886) +HybridUSDCTokenPoolTests:test_transferLiquidity_Success() (gas: 165904) LockReleaseTokenPoolAndProxy_setRebalancer:test_SetRebalancer_Revert() (gas: 10989) LockReleaseTokenPoolAndProxy_setRebalancer:test_SetRebalancer_Success() (gas: 18028) LockReleaseTokenPoolPoolAndProxy_canAcceptLiquidity:test_CanAcceptLiquidity_Success() (gas: 3051552) @@ -471,17 +471,17 @@ LockReleaseTokenPoolPoolAndProxy_withdrawalLiquidity:test_Unauthorized_Revert() LockReleaseTokenPool_canAcceptLiquidity:test_CanAcceptLiquidity_Success() (gas: 2836138) LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30062) LockReleaseTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Success() (gas: 79943) -LockReleaseTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 59576) +LockReleaseTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 59620) LockReleaseTokenPool_provideLiquidity:test_LiquidityNotAccepted_Revert() (gas: 2832618) LockReleaseTokenPool_provideLiquidity:test_Unauthorized_Revert() (gas: 11489) LockReleaseTokenPool_releaseOrMint:test_ChainNotAllowed_Revert() (gas: 72743) -LockReleaseTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56308) -LockReleaseTokenPool_releaseOrMint:test_ReleaseOrMint_Success() (gas: 225477) +LockReleaseTokenPool_releaseOrMint:test_PoolMintNotHealthy_Revert() (gas: 56352) +LockReleaseTokenPool_releaseOrMint:test_ReleaseOrMint_Success() (gas: 225548) LockReleaseTokenPool_setRebalancer:test_SetRebalancer_Revert() (gas: 11011) LockReleaseTokenPool_setRebalancer:test_SetRebalancer_Success() (gas: 18094) LockReleaseTokenPool_supportsInterface:test_SupportsInterface_Success() (gas: 10196) -LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83187) -LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 55887) +LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83231) +LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 55953) LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60187) LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) LockRelease_setRateLimitAdmin:test_SetRateLimitAdmin_Revert() (gas: 11054) @@ -575,7 +575,7 @@ MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61275) MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39933) MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 33049) MultiOnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 233701) -MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1500382) +MultiRampsE2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1500580) NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37934) NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) @@ -639,7 +639,7 @@ OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 278912) OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 169308) OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 189031) OffRamp_batchExecute:test_SingleReport_Success() (gas: 157132) -OffRamp_batchExecute:test_Unhealthy_Success() (gas: 554076) +OffRamp_batchExecute:test_Unhealthy_Success() (gas: 554208) OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10600) OffRamp_ccipReceive:test_Reverts() (gas: 15385) OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 92905) @@ -681,18 +681,18 @@ OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 148382) OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6672410) OffRamp_execute:test_ZeroReports_Revert() (gas: 17361) OffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18511) -OffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 243991) +OffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 244057) OffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20759) -OffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 205050) +OffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 205094) OffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 49316) OffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48760) OffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidationNoRouterCall_Revert() (gas: 218081) OffRamp_executeSingleMessage:test_executeSingleMessage_WithFailingValidation_Revert() (gas: 85349) -OffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 274128) +OffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 274194) OffRamp_executeSingleMessage:test_executeSingleMessage_WithVInterception_Success() (gas: 91809) OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 28260) OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 22062) -OffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 481660) +OffRamp_executeSingleReport:test_InvalidSourcePoolAddress_Success() (gas: 481748) OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48372) OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 33959) OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 28436) @@ -705,15 +705,15 @@ OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 213624) OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 249506) OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 142151) -OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409223) +OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 409289) OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58293) OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 73868) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 583269) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 531983) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 583401) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 532115) OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 33717) -OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 549606) -OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 549620) -OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 460363) +OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 549738) +OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 549752) +OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 460495) OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 135910) OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 165615) OffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3868658) @@ -729,34 +729,34 @@ OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Re OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55260) OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 498614) OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 316158) -OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2245294) +OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2245360) OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 165602) OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 227234) OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227774) OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 781510) OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 347431) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37634) -OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 104338) -OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 85320) +OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 104404) +OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_transfer_Revert() (gas: 85342) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36752) -OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 94404) +OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_ReleaseOrMintBalanceMismatch_Revert() (gas: 94382) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_TokenHandlingError_BalanceOf_Revert() (gas: 39741) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_skip_ReleaseOrMintBalanceMismatch_if_pool_Revert() (gas: 86516) -OffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 162337) +OffRamp_releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 162381) OffRamp_releaseOrMintTokens:test__releaseOrMintTokens_PoolIsNotAPool_Reverts() (gas: 23903) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 62729) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 79768) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 174402) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_WithGasOverride_Success() (gas: 176314) -OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 187657) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 62751) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_PoolDoesNotSupportDest_Reverts() (gas: 79790) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 174512) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_WithGasOverride_Success() (gas: 176424) +OffRamp_releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 187723) OffRamp_setDynamicConfig:test_FeeQuoterZeroAddress_Revert() (gas: 11269) OffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 13884) OffRamp_setDynamicConfig:test_SetDynamicConfigWithInterceptor_Success() (gas: 46421) OffRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 24463) -OffRamp_trialExecute:test_RateLimitError_Success() (gas: 219311) -OffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 227889) -OffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 295284) -OffRamp_trialExecute:test_trialExecute_Success() (gas: 277784) +OffRamp_trialExecute:test_RateLimitError_Success() (gas: 219355) +OffRamp_trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 227977) +OffRamp_trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 295350) +OffRamp_trialExecute:test_trialExecute_Success() (gas: 277894) OnRampTokenPoolReentrancy:test_OnRampTokenPoolReentrancy_Success() (gas: 390842) OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_InvalidAllowListRequestDisabledAllowListWithAdds() (gas: 18030) OnRamp_applyAllowListUpdates:test_applyAllowListUpdates_Revert() (gas: 67426) @@ -784,9 +784,9 @@ OnRamp_forwardFromRouter:test_Paused_Revert() (gas: 38431) OnRamp_forwardFromRouter:test_Permissions_Revert() (gas: 23640) OnRamp_forwardFromRouter:test_ShouldIncrementNonceOnlyOnOrdered_Success() (gas: 183954) OnRamp_forwardFromRouter:test_ShouldIncrementSeqNumAndNonce_Success() (gas: 210338) -OnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 146132) -OnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 160237) -OnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3613854) +OnRamp_forwardFromRouter:test_ShouldStoreLinkFees() (gas: 146154) +OnRamp_forwardFromRouter:test_ShouldStoreNonLinkFees() (gas: 160259) +OnRamp_forwardFromRouter:test_SourceTokenDataTooLarge_Revert() (gas: 3613942) OnRamp_forwardFromRouter:test_UnAllowedOriginalSender_Revert() (gas: 24010) OnRamp_forwardFromRouter:test_UnsupportedToken_Revert() (gas: 75866) OnRamp_forwardFromRouter:test_forwardFromRouter_UnsupportedToken_Revert() (gas: 38599) @@ -805,7 +805,7 @@ OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigInvalidConfig_Revert( OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigOnlyOwner_Revert() (gas: 16850) OnRamp_setDynamicConfig:test_setDynamicConfig_InvalidConfigReentrancyGuardEnteredEqTrue_Revert() (gas: 13265) OnRamp_setDynamicConfig:test_setDynamicConfig_Success() (gas: 56369) -OnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97258) +OnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97302) PingPong_ccipReceive:test_CcipReceive_Success() (gas: 151349) PingPong_plumbing:test_OutOfOrderExecution_Success() (gas: 20310) PingPong_plumbing:test_Pausing_Success() (gas: 17810) @@ -904,8 +904,8 @@ RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46849) RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38506) RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36033) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19663) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130010) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19739) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130086) RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19559) RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129905) Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89366) @@ -936,7 +936,7 @@ Router_recoverTokens:test_RecoverTokensInvalidRecipient_Revert() (gas: 11334) Router_recoverTokens:test_RecoverTokensNoFunds_Revert() (gas: 20267) Router_recoverTokens:test_RecoverTokensNonOwner_Revert() (gas: 11171) Router_recoverTokens:test_RecoverTokensValueReceiver_Revert() (gas: 358049) -Router_recoverTokens:test_RecoverTokens_Success() (gas: 52445) +Router_recoverTokens:test_RecoverTokens_Success() (gas: 52480) Router_routeMessage:test_AutoExec_Success() (gas: 42816) Router_routeMessage:test_ExecutionEvent_Success() (gas: 158520) Router_routeMessage:test_ManualExec_Success() (gas: 35546) @@ -968,18 +968,18 @@ TokenAdminRegistry_setPool:test_setPool_Success() (gas: 36135) TokenAdminRegistry_setPool:test_setPool_ZeroAddressRemovesPool_Success() (gas: 30842) TokenAdminRegistry_transferAdminRole:test_transferAdminRole_OnlyAdministrator_Revert() (gas: 18103) TokenAdminRegistry_transferAdminRole:test_transferAdminRole_Success() (gas: 49438) -TokenPoolAndProxy:test_lockOrBurn_burnMint_Success() (gas: 5586367) -TokenPoolAndProxy:test_lockOrBurn_burnWithFromMint_Success() (gas: 5617902) -TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 5793136) +TokenPoolAndProxy:test_lockOrBurn_burnMint_Success() (gas: 5586499) +TokenPoolAndProxy:test_lockOrBurn_burnWithFromMint_Success() (gas: 5617969) +TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 5793246) TokenPoolAndProxy:test_setPreviousPool_Success() (gas: 3070731) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6434669) -TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 6634802) -TokenPoolFactoryTests:test_TokenPoolFactory_Constructor_Revert() (gas: 4108300) -TokenPoolFactoryTests:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 15388758) -TokenPoolFactoryTests:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 15658396) -TokenPoolFactoryTests:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5743209) -TokenPoolFactoryTests:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5897047) -TokenPoolFactoryTests:test_updateRemoteChainConfig_Success() (gas: 86214) +TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6434801) +TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 6634934) +TokenPoolFactoryTests:test_TokenPoolFactory_Constructor_Revert() (gas: 1188046) +TokenPoolFactoryTests:test_createTokenPoolLockRelease_NoExistingToken_predict_Success() (gas: 12420072) +TokenPoolFactoryTests:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 12434881) +TokenPoolFactoryTests:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 12702418) +TokenPoolFactoryTests:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5740593) +TokenPoolFactoryTests:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5880940) TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 1979943) TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12113) TokenPoolWithAllowList_applyAllowListUpdates:test_SetAllowListSkipsZero_Success() (gas: 23476) @@ -1021,9 +1021,9 @@ TokenProxy_getFee:test_GetFee_Success() (gas: 85240) USDCTokenPool__validateMessage:test_ValidateInvalidMessage_Revert() (gas: 25704) USDCTokenPool_lockOrBurn:test_CallerIsNotARampOnRouter_Revert() (gas: 35481) USDCTokenPool_lockOrBurn:test_LockOrBurnWithAllowList_Revert() (gas: 30235) -USDCTokenPool_lockOrBurn:test_LockOrBurn_Success() (gas: 133525) -USDCTokenPool_lockOrBurn:test_UnknownDomain_Revert() (gas: 478072) -USDCTokenPool_releaseOrMint:test_ReleaseOrMintRealTx_Success() (gas: 268584) +USDCTokenPool_lockOrBurn:test_LockOrBurn_Success() (gas: 133508) +USDCTokenPool_lockOrBurn:test_UnknownDomain_Revert() (gas: 478182) +USDCTokenPool_releaseOrMint:test_ReleaseOrMintRealTx_Success() (gas: 268672) USDCTokenPool_releaseOrMint:test_TokenMaxCapacityExceeded_Revert() (gas: 50952) USDCTokenPool_releaseOrMint:test_UnlockingUSDCFailed_Revert() (gas: 98987) USDCTokenPool_setDomains:test_InvalidDomain_Revert() (gas: 66393) diff --git a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol index bf7e04dbe6..0a1f2a66f3 100644 --- a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol @@ -18,8 +18,6 @@ import {TokenAdminRegistrySetup} from "./TokenAdminRegistry.t.sol"; import {Create2} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol"; -import {console2 as console} from "forge-std/console2.sol"; - contract TokenPoolFactorySetup is TokenAdminRegistrySetup { using Create2 for bytes32; @@ -44,12 +42,8 @@ contract TokenPoolFactorySetup is TokenAdminRegistrySetup { s_registryModuleOwnerCustom = new RegistryModuleOwnerCustom(address(s_tokenAdminRegistry)); s_tokenAdminRegistry.addRegistryModule(address(s_registryModuleOwnerCustom)); - s_tokenPoolFactory = new TokenPoolFactory( - s_tokenAdminRegistry, - s_registryModuleOwnerCustom, - s_rmnProxy, - address(s_sourceRouter) - ); + s_tokenPoolFactory = + new TokenPoolFactory(s_tokenAdminRegistry, s_registryModuleOwnerCustom, s_rmnProxy, address(s_sourceRouter)); // Create Init Code for BurnMintERC20 TestToken with 18 decimals and supply cap of max uint256 value s_tokenCreationParams = abi.encode("TestToken", "TT", 18, type(uint256).max, PREMINT_AMOUNT, OWNER); @@ -71,12 +65,7 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { function test_TokenPoolFactory_Constructor_Revert() public { // Revert cause the tokenAdminRegistry is address(0) vm.expectRevert(TokenPoolFactory.InvalidZeroAddress.selector); - new TokenPoolFactory( - ITokenAdminRegistry(address(0)), - RegistryModuleOwnerCustom(address(0)), - address(0), - address(0) - ); + new TokenPoolFactory(ITokenAdminRegistry(address(0)), RegistryModuleOwnerCustom(address(0)), address(0), address(0)); new TokenPoolFactory( ITokenAdminRegistry(address(0xdeadbeef)), @@ -91,11 +80,8 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); - address predictedTokenAddress = Create2.computeAddress( - dynamicSalt, - keccak256(s_tokenInitCode), - address(s_tokenPoolFactory) - ); + address predictedTokenAddress = + Create2.computeAddress(dynamicSalt, keccak256(s_tokenInitCode), address(s_tokenPoolFactory)); // Create the constructor params for the predicted pool bytes memory poolCreationParams = abi.encode(predictedTokenAddress, new address[](0), s_rmnProxy, s_sourceRouter); @@ -103,16 +89,13 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // Predict the address of the pool before we make the tx by using the init code and the params bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, poolCreationParams); - address predictedPoolAddress = dynamicSalt.computeAddress( - keccak256(predictedPoolInitCode), - address(s_tokenPoolFactory) - ); + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(s_tokenPoolFactory)); (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( new TokenPoolFactory.RemoteTokenPoolInfo[](0), s_tokenInitCode, s_poolInitCode, - poolCreationParams, FAKE_SALT, TokenPoolFactory.PoolType.BURN_MINT ); @@ -141,20 +124,13 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); // We want to deploy a new factory and Owner Module. - TokenPoolFactory newTokenPoolFactory = new TokenPoolFactory( - newTokenAdminRegistry, - newRegistryModule, - s_rmnProxy, - address(s_destRouter) - ); + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); - TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( - address(newTokenPoolFactory), - address(s_destRouter), - address(s_rmnProxy) - ); + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = + TokenPoolFactory.RemoteChainConfig(address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy)); // Create an array of remote pools where nothing exists yet, but we want to predict the address for // the new pool and token on DEST_CHAIN_SELECTOR @@ -174,20 +150,16 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { ); // Predict the address of the token and pool on the DESTINATION chain - address predictedTokenAddress = dynamicSalt.computeAddress( - keccak256(s_tokenInitCode), - address(newTokenPoolFactory) - ); + address predictedTokenAddress = dynamicSalt.computeAddress(keccak256(s_tokenInitCode), address(newTokenPoolFactory)); // Since the remote chain information was provided, we should be able to get the information from the newly // deployed token pool using the available getter functions (, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( - remoteTokenPools, - s_tokenInitCode, - s_poolInitCode, - "", - FAKE_SALT, - TokenPoolFactory.PoolType.BURN_MINT + remoteTokenPools, // No existing remote pools + s_tokenInitCode, // Token Init Code + s_poolInitCode, // Pool Init Code + FAKE_SALT, // Salt + TokenPoolFactory.PoolType.BURN_MINT // Pool Type ); // Ensure that the remote Token was set to the one we predicted @@ -201,21 +173,15 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // Create the constructor params for the predicted pool // The predictedTokenAddress is NOT abi-encoded since the raw evm-address // is used in the constructor params - bytes memory predictedPoolCreationParams = abi.encode( - predictedTokenAddress, - new address[](0), - s_rmnProxy, - address(s_destRouter) - ); + bytes memory predictedPoolCreationParams = + abi.encode(predictedTokenAddress, new address[](0), s_rmnProxy, address(s_destRouter)); // Take the init code and concat the destination params to it, the initCode shouldn't change bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, predictedPoolCreationParams); // Predict the address of the pool on the DESTINATION chain - address predictedPoolAddress = dynamicSalt.computeAddress( - keccak256(predictedPoolInitCode), - address(newTokenPoolFactory) - ); + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(newTokenPoolFactory)); // Assert that the address set for the remote pool is the same as the predicted address assertEq( @@ -231,7 +197,6 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { new TokenPoolFactory.RemoteTokenPoolInfo[](0), s_tokenInitCode, s_poolInitCode, - "", FAKE_SALT, TokenPoolFactory.PoolType.BURN_MINT ); @@ -253,34 +218,21 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { vm.startPrank(OWNER); bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); - FactoryBurnMintERC20 newRemoteToken = new FactoryBurnMintERC20( - "TestToken", - "TT", - 18, - type(uint256).max, - PREMINT_AMOUNT, - OWNER - ); + FactoryBurnMintERC20 newRemoteToken = + new FactoryBurnMintERC20("TestToken", "TT", 18, type(uint256).max, PREMINT_AMOUNT, OWNER); // We have to create a new factory, registry module, and token admin registry to simulate the other chain TokenAdminRegistry newTokenAdminRegistry = new TokenAdminRegistry(); RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); // We want to deploy a new factory and Owner Module. - TokenPoolFactory newTokenPoolFactory = new TokenPoolFactory( - newTokenAdminRegistry, - newRegistryModule, - s_rmnProxy, - address(s_destRouter) - ); + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); - TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( - address(newTokenPoolFactory), - address(s_destRouter), - address(s_rmnProxy) - ); + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = + TokenPoolFactory.RemoteChainConfig(address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy)); // Create an array of remote pools where nothing exists yet, but we want to predict the address for // the new pool and token on DEST_CHAIN_SELECTOR @@ -302,12 +254,7 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // Since the remote chain information was provided, we should be able to get the information from the newly // deployed token pool using the available getter functions (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( - remoteTokenPools, - s_tokenInitCode, - s_poolInitCode, - "", - FAKE_SALT, - TokenPoolFactory.PoolType.BURN_MINT + remoteTokenPools, s_tokenInitCode, s_poolInitCode, FAKE_SALT, TokenPoolFactory.PoolType.BURN_MINT ); assertEq(address(TokenPool(poolAddress).getToken()), tokenAddress, "Token Address should have been set locally"); @@ -322,21 +269,15 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // Create the constructor params for the predicted pool // The predictedTokenAddress is NOT abi-encoded since the raw evm-address // is used in the constructor params - bytes memory predictedPoolCreationParams = abi.encode( - address(newRemoteToken), - new address[](0), - s_rmnProxy, - address(s_destRouter) - ); + bytes memory predictedPoolCreationParams = + abi.encode(address(newRemoteToken), new address[](0), s_rmnProxy, address(s_destRouter)); // Take the init code and concat the destination params to it, the initCode shouldn't change bytes memory predictedPoolInitCode = abi.encodePacked(s_poolInitCode, predictedPoolCreationParams); // Predict the address of the pool on the DESTINATION chain - address predictedPoolAddress = dynamicSalt.computeAddress( - keccak256(predictedPoolInitCode), - address(newTokenPoolFactory) - ); + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(newTokenPoolFactory)); // Assert that the address set for the remote pool is the same as the predicted address assertEq( @@ -351,7 +292,6 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { address(newRemoteToken), new TokenPoolFactory.RemoteTokenPoolInfo[](0), s_poolInitCode, - "", FAKE_SALT, TokenPoolFactory.PoolType.BURN_MINT ); @@ -372,16 +312,9 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { function test_createTokenPool_WithRemoteTokenAndRemotePool_Success() public { vm.startPrank(OWNER); - bytes32 dynamicSalt = keccak256(abi.encodePacked(FAKE_SALT, OWNER)); - bytes memory RANDOM_TOKEN_ADDRESS = abi.encode(makeAddr("RANDOM_TOKEN")); bytes memory RANDOM_POOL_ADDRESS = abi.encode(makeAddr("RANDOM_POOL")); - address predictedTokenAddress = dynamicSalt.computeAddress(keccak256(s_tokenInitCode), address(s_tokenPoolFactory)); - - // Create the constructor params for the predicted pool - bytes memory poolCreationParams = abi.encode(predictedTokenAddress, new address[](0), s_rmnProxy, s_sourceRouter); - // Create an array of remote pools with some fake addresses TokenPoolFactory.RemoteTokenPoolInfo[] memory remoteTokenPools = new TokenPoolFactory.RemoteTokenPoolInfo[](1); @@ -397,12 +330,7 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { ); (address tokenAddress, address poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( - remoteTokenPools, - s_tokenInitCode, - s_poolInitCode, - poolCreationParams, - FAKE_SALT, - TokenPoolFactory.PoolType.BURN_MINT + remoteTokenPools, s_tokenInitCode, s_poolInitCode, FAKE_SALT, TokenPoolFactory.PoolType.BURN_MINT ); assertNotEq(address(0), tokenAddress, "Token Address should not be 0"); @@ -440,20 +368,13 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { RegistryModuleOwnerCustom newRegistryModule = new RegistryModuleOwnerCustom(address(newTokenAdminRegistry)); // We want to deploy a new factory and Owner Module. - TokenPoolFactory newTokenPoolFactory = new TokenPoolFactory( - newTokenAdminRegistry, - newRegistryModule, - s_rmnProxy, - address(s_destRouter) - ); + TokenPoolFactory newTokenPoolFactory = + new TokenPoolFactory(newTokenAdminRegistry, newRegistryModule, s_rmnProxy, address(s_destRouter)); newTokenAdminRegistry.addRegistryModule(address(newRegistryModule)); - TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = TokenPoolFactory.RemoteChainConfig( - address(newTokenPoolFactory), - address(s_destRouter), - address(s_rmnProxy) - ); + TokenPoolFactory.RemoteChainConfig memory remoteChainConfig = + TokenPoolFactory.RemoteChainConfig(address(newTokenPoolFactory), address(s_destRouter), address(s_rmnProxy)); // Create an array of remote pools where nothing exists yet, but we want to predict the address for // the new pool and token on DEST_CHAIN_SELECTOR @@ -473,10 +394,7 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { ); // Predict the address of the token and pool on the DESTINATION chain - address predictedTokenAddress = dynamicSalt.computeAddress( - keccak256(s_tokenInitCode), - address(newTokenPoolFactory) - ); + address predictedTokenAddress = dynamicSalt.computeAddress(keccak256(s_tokenInitCode), address(newTokenPoolFactory)); // Since the remote chain information was provided, we should be able to get the information from the newly // deployed token pool using the available getter functions @@ -484,7 +402,6 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { remoteTokenPools, s_tokenInitCode, type(LockReleaseTokenPool).creationCode, - "", FAKE_SALT, TokenPoolFactory.PoolType.LOCK_RELEASE ); @@ -500,25 +417,16 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // Create the constructor params for the predicted pool // The predictedTokenAddress is NOT abi-encoded since the raw evm-address // is used in the constructor params - bytes memory predictedPoolCreationParams = abi.encode( - predictedTokenAddress, - new address[](0), - s_rmnProxy, - true, - address(s_destRouter) - ); + bytes memory predictedPoolCreationParams = + abi.encode(predictedTokenAddress, new address[](0), s_rmnProxy, true, address(s_destRouter)); // Take the init code and concat the destination params to it, the initCode shouldn't change - bytes memory predictedPoolInitCode = abi.encodePacked( - type(LockReleaseTokenPool).creationCode, - predictedPoolCreationParams - ); + bytes memory predictedPoolInitCode = + abi.encodePacked(type(LockReleaseTokenPool).creationCode, predictedPoolCreationParams); // Predict the address of the pool on the DESTINATION chain - address predictedPoolAddress = dynamicSalt.computeAddress( - keccak256(predictedPoolInitCode), - address(newTokenPoolFactory) - ); + address predictedPoolAddress = + dynamicSalt.computeAddress(keccak256(predictedPoolInitCode), address(newTokenPoolFactory)); // Assert that the address set for the remote pool is the same as the predicted address assertEq( @@ -531,12 +439,11 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // On the new token pool factory, representing a destination chain, // deploy a new token and a new pool (address newTokenAddress, address newPoolAddress) = newTokenPoolFactory.deployTokenAndTokenPool( - new TokenPoolFactory.RemoteTokenPoolInfo[](0), - s_tokenInitCode, - type(LockReleaseTokenPool).creationCode, - "", - FAKE_SALT, - TokenPoolFactory.PoolType.LOCK_RELEASE + new TokenPoolFactory.RemoteTokenPoolInfo[](0), // No existing remote pools + s_tokenInitCode, // Token Init Code + type(LockReleaseTokenPool).creationCode, // Pool Init Code + FAKE_SALT, // Salt + TokenPoolFactory.PoolType.LOCK_RELEASE // Pool Type ); assertEq( diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol index 334cc5ed59..c59be5775d 100644 --- a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/FactoryBurnMintERC20.sol @@ -1,19 +1,22 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; -import {IOwnable} from "../../../shared/interfaces/IOwnable.sol"; import {IGetCCIPAdmin} from "../../../ccip/interfaces/IGetCCIPAdmin.sol"; +import {IOwnable} from "../../../shared/interfaces/IOwnable.sol"; +import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol"; import {OwnerIsCreator} from "../../../shared/access/OwnerIsCreator.sol"; import {ERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/ERC20.sol"; -import {ERC20Burnable} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/ERC20Burnable.sol"; + import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; +import {ERC20Burnable} from + "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import {IERC165} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol"; import {EnumerableSet} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; /// @notice A basic ERC20 compatible token contract with burn and minting roles. +/// @dev The constructor has been modified to support the deployment pattern used by a factory contract. /// @dev The total supply can be limited during deployment. contract FactoryBurnMintERC20 is IBurnMintERC20, IGetCCIPAdmin, IERC165, ERC20Burnable, OwnerIsCreator { using EnumerableSet for EnumerableSet.AddressSet; @@ -68,11 +71,8 @@ contract FactoryBurnMintERC20 is IBurnMintERC20, IGetCCIPAdmin, IERC165, ERC20Bu } function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { - return - interfaceId == type(IERC20).interfaceId || - interfaceId == type(IBurnMintERC20).interfaceId || - interfaceId == type(IERC165).interfaceId || - interfaceId == type(IOwnable).interfaceId; + return interfaceId == type(IERC20).interfaceId || interfaceId == type(IBurnMintERC20).interfaceId + || interfaceId == type(IERC165).interfaceId || interfaceId == type(IOwnable).interfaceId; } // ================================================================ diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol index 9fadb4ffc5..ec4299df2f 100644 --- a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory/TokenPoolFactory.sol @@ -11,8 +11,6 @@ import {RegistryModuleOwnerCustom} from "../RegistryModuleOwnerCustom.sol"; import {Create2} from "../../../vendor/openzeppelin-solidity/v5.0.2/contracts/utils/Create2.sol"; -import {console2 as console} from "forge-std/console2.sol"; - /// @notice A contract for deploying new tokens and token pools, and configuring them with the token admin registry /// @dev At the end of the transaction, the ownership transfer process will begin, but the user must accept the /// ownership transfer in a separate transaction. @@ -23,10 +21,10 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { error InvalidZeroAddress(); + /// @notice The type of pool to deploy. Types may be expanded in future versions enum PoolType { BURN_MINT, - LOCK_RELEASE, - CUSTOM + LOCK_RELEASE } struct RemoteTokenPoolInfo { @@ -75,10 +73,8 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { address ccipRouter ) { if ( - address(tokenAdminRegistry) == address(0) || - address(tokenAdminModule) == address(0) || - rmnProxy == address(0) || - ccipRouter == address(0) + address(tokenAdminRegistry) == address(0) || address(tokenAdminModule) == address(0) || rmnProxy == address(0) + || ccipRouter == address(0) ) revert InvalidZeroAddress(); i_tokenAdminRegistry = ITokenAdminRegistry(tokenAdminRegistry); @@ -95,7 +91,6 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { RemoteTokenPoolInfo[] calldata remoteTokenPools, bytes memory tokenInitCode, bytes calldata tokenPoolInitCode, - bytes memory tokenPoolInitArgs, bytes32 salt, PoolType poolType ) external returns (address, address) { @@ -107,7 +102,7 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { address token = Create2.deploy(0, salt, tokenInitCode); // Deploy the token pool - address pool = _createTokenPool(token, remoteTokenPools, tokenPoolInitCode, tokenPoolInitArgs, salt, poolType); + address pool = _createTokenPool(token, remoteTokenPools, tokenPoolInitCode, salt, poolType); // Set the token pool for token in the token admin registry since this contract is the token and pool owner _setTokenPoolInTokenAdminRegistry(token, pool); @@ -125,15 +120,12 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { /// @param token The address of the existing token to be used in the token pool /// @param remoteTokenPools An array of remote token pools info to be used in the pool's applyChainUpdates function /// @param tokenPoolInitCode The creation code for the token pool - /// @param tokenPoolInitArgs The arguments to be passed to the token pool's constructor and concatenated with the - /// initCode to be passed into the deployer function /// @param salt The salt to be used in the create2 deployment of the token pool /// @return poolAddress The address of the token pool that was deployed function deployTokenPoolWithExistingToken( address token, RemoteTokenPoolInfo[] calldata remoteTokenPools, bytes calldata tokenPoolInitCode, - bytes memory tokenPoolInitArgs, bytes32 salt, PoolType poolType ) external returns (address poolAddress) { @@ -142,7 +134,7 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { salt = keccak256(abi.encodePacked(salt, msg.sender)); // create the token pool and return the address - return _createTokenPool(token, remoteTokenPools, tokenPoolInitCode, tokenPoolInitArgs, salt, poolType); + return _createTokenPool(token, remoteTokenPools, tokenPoolInitCode, salt, poolType); } // ================================================================ @@ -153,15 +145,12 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { /// @param token The token to be used in the token pool /// @param remoteTokenPools An array of remote token pools info to be used in the pool's applyChainUpdates function /// @param tokenPoolInitCode The creation code for the token pool - /// @param tokenPoolInitArgs The arguments to be passed to the token pool's constructor and concatenated with the - /// initCode to be passed into the deployer function /// @param salt The salt to be used in the create2 deployment of the token pool /// @return poolAddress The address of the token pool that was deployed function _createTokenPool( address token, RemoteTokenPoolInfo[] calldata remoteTokenPools, bytes calldata tokenPoolInitCode, - bytes memory tokenPoolInitArgs, bytes32 salt, PoolType poolType ) private returns (address) { @@ -171,7 +160,6 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { RemoteTokenPoolInfo memory remoteTokenPool; for (uint256 i = 0; i < remoteTokenPools.length; i++) { remoteTokenPool = remoteTokenPools[i]; - // RemoteChainConfig memory remoteChainConfig = s_remoteChainConfigs[remoteTokenPool.remoteChainSelector]; // If the user provides an empty byte string, indicated no token has already been deployed, // then the address of the token needs to be predicted. Otherwise the address provided will be used. @@ -180,8 +168,7 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { // provided in the remoteTokenInitCode field for the remoteTokenPool remoteTokenPool.remoteTokenAddress = abi.encode( salt.computeAddress( - keccak256(remoteTokenPool.remoteTokenInitCode), - remoteTokenPool.remoteChainConfig.remotePoolFactory + keccak256(remoteTokenPool.remoteTokenInitCode), remoteTokenPool.remoteChainConfig.remotePoolFactory ) ); } @@ -197,9 +184,8 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { ); // Abi encode the computed remote address so it can be used as bytes in the chain update - remoteTokenPool.remotePoolAddress = abi.encode( - salt.computeAddress(remotePoolInitcodeHash, remoteTokenPool.remoteChainConfig.remotePoolFactory) - ); + remoteTokenPool.remotePoolAddress = + abi.encode(salt.computeAddress(remotePoolInitcodeHash, remoteTokenPool.remoteChainConfig.remotePoolFactory)); } chainUpdates[i] = TokenPool.ChainUpdate({ @@ -212,12 +198,13 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { }); } - if (tokenPoolInitArgs.length == 0) { - if (poolType == PoolType.BURN_MINT) { - tokenPoolInitArgs = abi.encode(token, new address[](0), i_rmnProxy, i_ccipRouter); - } else if (poolType == PoolType.LOCK_RELEASE) - // Lock/Release pools have an additional constructor param that must be accounted for - tokenPoolInitArgs = abi.encode(token, new address[](0), i_rmnProxy, true, i_ccipRouter); + // Construct the initArgs for the token pool using the immutable contracts for CCIP on the local chain + bytes memory tokenPoolInitArgs; + if (poolType == PoolType.BURN_MINT) { + tokenPoolInitArgs = abi.encode(token, new address[](0), i_rmnProxy, i_ccipRouter); + } else if (poolType == PoolType.LOCK_RELEASE) { + // Lock/Release pools have an additional boolean constructor param that must be accounted for + tokenPoolInitArgs = abi.encode(token, new address[](0), i_rmnProxy, true, i_ccipRouter); } // Construct the deployment code from the initCode and the initArgs and then deploy @@ -232,6 +219,13 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { return poolAddress; } + /// @notice Generates the hash of the init code the pool will be deployed with + /// @dev The init code hash is used with Create2 to predict the address of the pool on the remote chain + /// @param initCode The init code of the pool + /// @param remoteChainConfig The remote chain config for the pool + /// @param remoteTokenAddress The address of the remote token + /// @param poolType The type of pool to deploy + /// @return The hash of the init code function _generatePoolInitcodeHash( bytes memory initCode, RemoteChainConfig memory remoteChainConfig, @@ -239,38 +233,28 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { PoolType poolType ) private pure returns (bytes32) { if (poolType == PoolType.BURN_MINT) { - return - keccak256( - abi.encodePacked( - initCode, - // constructor(address, address[], address, address) - abi.encode( - remoteTokenAddress, - new address[](0), - remoteChainConfig.remoteRMNProxy, - remoteChainConfig.remoteRouter - ) + return keccak256( + abi.encodePacked( + initCode, + // constructor(address, address[], address, address) + abi.encode( + remoteTokenAddress, new address[](0), remoteChainConfig.remoteRMNProxy, remoteChainConfig.remoteRouter ) - ); - } else if (poolType == PoolType.LOCK_RELEASE) { - return - keccak256( - abi.encodePacked( - initCode, - // constructor(address, address[], address, bool, address) - abi.encode( - remoteTokenAddress, - new address[](0), - remoteChainConfig.remoteRMNProxy, - true, - remoteChainConfig.remoteRouter - ) - ) - ); + ) + ); } else { - // TODO Figure out Custom - return bytes32(0); + // if poolType == PoolType.LOCK_RELEASE + return keccak256( + abi.encodePacked( + initCode, + // constructor(address, address[], address, bool, address) + abi.encode( + remoteTokenAddress, new address[](0), remoteChainConfig.remoteRMNProxy, true, remoteChainConfig.remoteRouter + ) + ) + ); } + // Note: Future factory versions may have additional pool types which will need to be added here } /// @notice Sets the token pool address in the token admin registry for a newly deployed token pool.