diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 15a592adc9..7a67cf7098 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -1,10 +1,10 @@ -ARMProxyStandaloneTest:test_ARMCallEmptyContractRevert() (gas: 19675) -ARMProxyStandaloneTest:test_Constructor() (gas: 310043) -ARMProxyStandaloneTest:test_SetARM() (gas: 16587) -ARMProxyStandaloneTest:test_SetARMzero() (gas: 11297) -ARMProxyTest:test_ARMCallRevertReasonForwarded() (gas: 47898) -ARMProxyTest:test_ARMIsBlessed_Success() (gas: 36363) -ARMProxyTest:test_ARMIsCursed_Success() (gas: 49851) +ARMProxyStandaloneTest:test_ARMCallEmptyContractRevert() (gas: 20673) +ARMProxyStandaloneTest:test_Constructor() (gas: 543485) +ARMProxyStandaloneTest:test_SetARM() (gas: 18216) +ARMProxyStandaloneTest:test_SetARMzero() (gas: 12144) +ARMProxyTest:test_ARMCallRevertReasonForwarded() (gas: 49764) +ARMProxyTest:test_ARMIsBlessed_Success() (gas: 39781) +ARMProxyTest:test_ARMIsCursed_Success() (gas: 51846) AggregateTokenLimiter_constructor:test_Constructor_Success() (gas: 27118) AggregateTokenLimiter_getTokenBucket:test_GetTokenBucket_Success() (gas: 19871) AggregateTokenLimiter_getTokenBucket:test_Refill_Success() (gas: 41586) @@ -306,27 +306,27 @@ EVM2EVMOnRamp_withdrawNonLinkFees:test_NonOwnerOrAdmin_Revert() (gas: 15353) 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) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17435) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 15728) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 99909) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 76138) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 99931) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 145010) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 80373) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 80560) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 96064) -EtherSenderReceiverTest_constructor:test_constructor() (gas: 17553) -EtherSenderReceiverTest_getFee:test_getFee() (gas: 27346) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 20375) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 16724) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 16657) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 25457) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 25307) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17925) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25329) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26370) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 103814) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 54732) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 21881) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 20674) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 116467) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 91360) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 116371) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 167929) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 98200) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 98574) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 117880) +EtherSenderReceiverTest_constructor:test_constructor() (gas: 19659) +EtherSenderReceiverTest_getFee:test_getFee() (gas: 41207) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 22872) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 18390) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 18420) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 34950) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 34697) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 23796) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 34674) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 36305) FeeQuoter_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16686) FeeQuoter_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16588) FeeQuoter_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16630) @@ -484,11 +484,11 @@ LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (ga LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) LockRelease_setRateLimitAdmin:test_SetRateLimitAdmin_Revert() (gas: 11054) LockRelease_setRateLimitAdmin:test_SetRateLimitAdmin_Success() (gas: 35060) -MerkleMultiProofTest:test_CVE_2023_34459() (gas: 5478) -MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3585) -MerkleMultiProofTest:test_MerkleRoot256() (gas: 394891) -MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 3661) -MerkleMultiProofTest:test_SpecSync_gas() (gas: 34129) +MerkleMultiProofTest:test_CVE_2023_34459() (gas: 6372) +MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 4019) +MerkleMultiProofTest:test_MerkleRoot256() (gas: 668330) +MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 4074) +MerkleMultiProofTest:test_SpecSync_gas() (gas: 49338) MockRouterTest:test_ccipSendWithInsufficientNativeTokens_Revert() (gas: 34037) MockRouterTest:test_ccipSendWithInvalidMsgValue_Revert() (gas: 60842) MockRouterTest:test_ccipSendWithLinkFeeTokenAndValidMsgValue_Success() (gas: 126576) @@ -596,31 +596,31 @@ NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySetOnRamp_Revert( NonceManager_applyPreviousRampsUpdates:test_SingleRampUpdate() (gas: 66666) NonceManager_applyPreviousRampsUpdates:test_ZeroInput() (gas: 12070) NonceManager_typeAndVersion:test_typeAndVersion() (gas: 9705) -OCR2BaseNoChecks_setOCR2Config:test_FMustBePositive_Revert() (gas: 12210) -OCR2BaseNoChecks_setOCR2Config:test_RepeatAddress_Revert() (gas: 42431) -OCR2BaseNoChecks_setOCR2Config:test_SetConfigSuccess_gas() (gas: 84597) -OCR2BaseNoChecks_setOCR2Config:test_TooManyTransmitter_Revert() (gas: 38177) -OCR2BaseNoChecks_setOCR2Config:test_TransmitterCannotBeZeroAddress_Revert() (gas: 24308) -OCR2BaseNoChecks_transmit:test_ConfigDigestMismatch_Revert() (gas: 17499) -OCR2BaseNoChecks_transmit:test_ForkedChain_Revert() (gas: 26798) -OCR2BaseNoChecks_transmit:test_TransmitSuccess_gas() (gas: 27499) -OCR2BaseNoChecks_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 21335) -OCR2Base_setOCR2Config:test_FMustBePositive_Revert() (gas: 12216) -OCR2Base_setOCR2Config:test_FTooHigh_Revert() (gas: 12372) -OCR2Base_setOCR2Config:test_OracleOutOfRegister_Revert() (gas: 14919) -OCR2Base_setOCR2Config:test_RepeatAddress_Revert() (gas: 45469) -OCR2Base_setOCR2Config:test_SetConfigSuccess_gas() (gas: 155220) -OCR2Base_setOCR2Config:test_SingerCannotBeZeroAddress_Revert() (gas: 24425) -OCR2Base_setOCR2Config:test_TooManySigners_Revert() (gas: 20535) -OCR2Base_setOCR2Config:test_TransmitterCannotBeZeroAddress_Revert() (gas: 47316) -OCR2Base_transmit:test_ConfigDigestMismatch_Revert() (gas: 19668) -OCR2Base_transmit:test_ForkedChain_Revert() (gas: 37749) -OCR2Base_transmit:test_NonUniqueSignature_Revert() (gas: 55360) -OCR2Base_transmit:test_SignatureOutOfRegistration_Revert() (gas: 20989) -OCR2Base_transmit:test_Transmit2SignersSuccess_gas() (gas: 51689) -OCR2Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 23511) -OCR2Base_transmit:test_UnauthorizedSigner_Revert() (gas: 39707) -OCR2Base_transmit:test_WrongNumberOfSignatures_Revert() (gas: 20584) +OCR2BaseNoChecks_setOCR2Config:test_FMustBePositive_Revert() (gas: 15443) +OCR2BaseNoChecks_setOCR2Config:test_RepeatAddress_Revert() (gas: 48841) +OCR2BaseNoChecks_setOCR2Config:test_SetConfigSuccess_gas() (gas: 97138) +OCR2BaseNoChecks_setOCR2Config:test_TooManyTransmitter_Revert() (gas: 75615) +OCR2BaseNoChecks_setOCR2Config:test_TransmitterCannotBeZeroAddress_Revert() (gas: 32515) +OCR2BaseNoChecks_transmit:test_ConfigDigestMismatch_Revert() (gas: 20081) +OCR2BaseNoChecks_transmit:test_ForkedChain_Revert() (gas: 29888) +OCR2BaseNoChecks_transmit:test_TransmitSuccess_gas() (gas: 30530) +OCR2BaseNoChecks_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 25249) +OCR2Base_setOCR2Config:test_FMustBePositive_Revert() (gas: 15449) +OCR2Base_setOCR2Config:test_FTooHigh_Revert() (gas: 15725) +OCR2Base_setOCR2Config:test_OracleOutOfRegister_Revert() (gas: 21647) +OCR2Base_setOCR2Config:test_RepeatAddress_Revert() (gas: 56234) +OCR2Base_setOCR2Config:test_SetConfigSuccess_gas() (gas: 169648) +OCR2Base_setOCR2Config:test_SingerCannotBeZeroAddress_Revert() (gas: 32751) +OCR2Base_setOCR2Config:test_TooManySigners_Revert() (gas: 34759) +OCR2Base_setOCR2Config:test_TransmitterCannotBeZeroAddress_Revert() (gas: 55992) +OCR2Base_transmit:test_ConfigDigestMismatch_Revert() (gas: 22520) +OCR2Base_transmit:test_ForkedChain_Revert() (gas: 42561) +OCR2Base_transmit:test_NonUniqueSignature_Revert() (gas: 62252) +OCR2Base_transmit:test_SignatureOutOfRegistration_Revert() (gas: 24538) +OCR2Base_transmit:test_Transmit2SignersSuccess_gas() (gas: 58490) +OCR2Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 27448) +OCR2Base_transmit:test_UnauthorizedSigner_Revert() (gas: 45597) +OCR2Base_transmit:test_WrongNumberOfSignatures_Revert() (gas: 23593) OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5656596) OffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 469391) OffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 99637) @@ -831,76 +831,76 @@ RMNRemote_verify_withConfigSet:test_verify_ThresholdNotMet_reverts() (gas: 15300 RMNRemote_verify_withConfigSet:test_verify_UnexpectedSigner_reverts() (gas: 387667) RMNRemote_verify_withConfigSet:test_verify_minSignersIsZero_success() (gas: 184524) RMNRemote_verify_withConfigSet:test_verify_success() (gas: 68207) -RMN_constructor:test_Constructor_Success() (gas: 48994) -RMN_getRecordedCurseRelatedOps:test_OpsPostDeployment() (gas: 19732) -RMN_lazyVoteToCurseUpdate_Benchmark:test_VoteToCurseLazilyRetain3VotersUponConfigChange_gas() (gas: 152296) -RMN_ownerUnbless:test_Unbless_Success() (gas: 74936) -RMN_ownerUnvoteToCurse:test_CanBlessAndCurseAfterGlobalCurseIsLifted() (gas: 471829) -RMN_ownerUnvoteToCurse:test_IsIdempotent() (gas: 398492) -RMN_ownerUnvoteToCurse:test_NonOwner_Revert() (gas: 18723) -RMN_ownerUnvoteToCurse:test_OwnerUnvoteToCurseSuccess_gas() (gas: 358084) -RMN_ownerUnvoteToCurse:test_UnknownVoter_Revert() (gas: 33190) -RMN_ownerUnvoteToCurse_Benchmark:test_OwnerUnvoteToCurse_1Voter_LiftsCurse_gas() (gas: 262408) -RMN_permaBlessing:test_PermaBlessing() (gas: 202777) -RMN_setConfig:test_BlessVoterIsZeroAddress_Revert() (gas: 15500) -RMN_setConfig:test_EitherThresholdIsZero_Revert() (gas: 21107) -RMN_setConfig:test_NonOwner_Revert() (gas: 14725) -RMN_setConfig:test_RepeatedAddress_Revert() (gas: 18219) -RMN_setConfig:test_SetConfigSuccess_gas() (gas: 104154) -RMN_setConfig:test_TotalWeightsSmallerThanEachThreshold_Revert() (gas: 30185) -RMN_setConfig:test_VoteToBlessByEjectedVoter_Revert() (gas: 130461) -RMN_setConfig:test_VotersLengthIsZero_Revert() (gas: 12149) -RMN_setConfig:test_WeightIsZeroAddress_Revert() (gas: 15740) -RMN_setConfig_Benchmark_1:test_SetConfig_7Voters_gas() (gas: 659600) -RMN_setConfig_Benchmark_2:test_ResetConfig_7Voters_gas() (gas: 212652) -RMN_unvoteToCurse:test_InvalidCursesHash() (gas: 26430) -RMN_unvoteToCurse:test_OwnerSkips() (gas: 33831) -RMN_unvoteToCurse:test_OwnerSucceeds() (gas: 64005) -RMN_unvoteToCurse:test_UnauthorizedVoter() (gas: 47715) -RMN_unvoteToCurse:test_ValidCursesHash() (gas: 61145) -RMN_unvoteToCurse:test_VotersCantLiftCurseButOwnerCan() (gas: 629190) -RMN_voteToBless:test_Curse_Revert() (gas: 473408) -RMN_voteToBless:test_IsAlreadyBlessed_Revert() (gas: 115435) -RMN_voteToBless:test_RootSuccess() (gas: 558661) -RMN_voteToBless:test_SenderAlreadyVoted_Revert() (gas: 97234) -RMN_voteToBless:test_UnauthorizedVoter_Revert() (gas: 17126) -RMN_voteToBless_Benchmark:test_1RootSuccess_gas() (gas: 44718) -RMN_voteToBless_Benchmark:test_3RootSuccess_gas() (gas: 98694) -RMN_voteToBless_Benchmark:test_5RootSuccess_gas() (gas: 152608) -RMN_voteToBless_Blessed_Benchmark:test_1RootSuccessBecameBlessed_gas() (gas: 29682) -RMN_voteToBless_Blessed_Benchmark:test_1RootSuccess_gas() (gas: 27628) -RMN_voteToBless_Blessed_Benchmark:test_3RootSuccess_gas() (gas: 81626) -RMN_voteToBless_Blessed_Benchmark:test_5RootSuccess_gas() (gas: 135518) -RMN_voteToCurse:test_CurseOnlyWhenThresholdReached_Success() (gas: 1651170) -RMN_voteToCurse:test_EmptySubjects_Revert() (gas: 14061) -RMN_voteToCurse:test_EvenIfAlreadyCursed_Success() (gas: 535124) -RMN_voteToCurse:test_OwnerCanCurseAndUncurse() (gas: 400060) -RMN_voteToCurse:test_RepeatedSubject_Revert() (gas: 144405) -RMN_voteToCurse:test_ReusedCurseId_Revert() (gas: 146972) -RMN_voteToCurse:test_UnauthorizedVoter_Revert() (gas: 12666) -RMN_voteToCurse:test_VoteToCurse_NoCurse_Success() (gas: 187556) -RMN_voteToCurse:test_VoteToCurse_YesCurse_Success() (gas: 473079) -RMN_voteToCurse_2:test_VotesAreDroppedIfSubjectIsNotCursedDuringConfigChange() (gas: 371083) -RMN_voteToCurse_2:test_VotesAreRetainedIfSubjectIsCursedDuringConfigChange() (gas: 1154362) -RMN_voteToCurse_Benchmark_1:test_VoteToCurse_NewSubject_NewVoter_NoCurse_gas() (gas: 141118) -RMN_voteToCurse_Benchmark_1:test_VoteToCurse_NewSubject_NewVoter_YesCurse_gas() (gas: 165258) -RMN_voteToCurse_Benchmark_2:test_VoteToCurse_OldSubject_NewVoter_NoCurse_gas() (gas: 121437) -RMN_voteToCurse_Benchmark_2:test_VoteToCurse_OldSubject_OldVoter_NoCurse_gas() (gas: 98373) -RMN_voteToCurse_Benchmark_3:test_VoteToCurse_OldSubject_NewVoter_YesCurse_gas() (gas: 145784) -RateLimiter_constructor:test_Constructor_Success() (gas: 19734) -RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 16042) -RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 22390) -RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 31518) -RateLimiter_consume:test_ConsumeTokens_Success() (gas: 20381) -RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 40687) -RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 15822) -RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 25798) -RateLimiter_consume:test_Refill_Success() (gas: 37444) -RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 18388) -RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 24886) -RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 38944) -RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46849) -RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38506) +RMN_constructor:test_Constructor_Success() (gas: 63037) +RMN_getRecordedCurseRelatedOps:test_OpsPostDeployment() (gas: 24609) +RMN_lazyVoteToCurseUpdate_Benchmark:test_VoteToCurseLazilyRetain3VotersUponConfigChange_gas() (gas: 159340) +RMN_ownerUnbless:test_Unbless_Success() (gas: 103665) +RMN_ownerUnvoteToCurse:test_CanBlessAndCurseAfterGlobalCurseIsLifted() (gas: 527240) +RMN_ownerUnvoteToCurse:test_IsIdempotent() (gas: 461028) +RMN_ownerUnvoteToCurse:test_NonOwner_Revert() (gas: 25696) +RMN_ownerUnvoteToCurse:test_OwnerUnvoteToCurseSuccess_gas() (gas: 402269) +RMN_ownerUnvoteToCurse:test_UnknownVoter_Revert() (gas: 37341) +RMN_ownerUnvoteToCurse_Benchmark:test_OwnerUnvoteToCurse_1Voter_LiftsCurse_gas() (gas: 310729) +RMN_permaBlessing:test_PermaBlessing() (gas: 234032) +RMN_setConfig:test_BlessVoterIsZeroAddress_Revert() (gas: 19944) +RMN_setConfig:test_EitherThresholdIsZero_Revert() (gas: 29093) +RMN_setConfig:test_NonOwner_Revert() (gas: 19180) +RMN_setConfig:test_RepeatedAddress_Revert() (gas: 24182) +RMN_setConfig:test_SetConfigSuccess_gas() (gas: 121383) +RMN_setConfig:test_TotalWeightsSmallerThanEachThreshold_Revert() (gas: 42230) +RMN_setConfig:test_VoteToBlessByEjectedVoter_Revert() (gas: 150092) +RMN_setConfig:test_VotersLengthIsZero_Revert() (gas: 13777) +RMN_setConfig:test_WeightIsZeroAddress_Revert() (gas: 20193) +RMN_setConfig_Benchmark_1:test_SetConfig_7Voters_gas() (gas: 699447) +RMN_setConfig_Benchmark_2:test_ResetConfig_7Voters_gas() (gas: 262912) +RMN_unvoteToCurse:test_InvalidCursesHash() (gas: 29467) +RMN_unvoteToCurse:test_OwnerSkips() (gas: 38039) +RMN_unvoteToCurse:test_OwnerSucceeds() (gas: 69773) +RMN_unvoteToCurse:test_UnauthorizedVoter() (gas: 59241) +RMN_unvoteToCurse:test_ValidCursesHash() (gas: 66142) +RMN_unvoteToCurse:test_VotersCantLiftCurseButOwnerCan() (gas: 729679) +RMN_voteToBless:test_Curse_Revert() (gas: 496801) +RMN_voteToBless:test_IsAlreadyBlessed_Revert() (gas: 147850) +RMN_voteToBless:test_RootSuccess() (gas: 745652) +RMN_voteToBless:test_SenderAlreadyVoted_Revert() (gas: 123496) +RMN_voteToBless:test_UnauthorizedVoter_Revert() (gas: 19508) +RMN_voteToBless_Benchmark:test_1RootSuccess_gas() (gas: 49435) +RMN_voteToBless_Benchmark:test_3RootSuccess_gas() (gas: 110271) +RMN_voteToBless_Benchmark:test_5RootSuccess_gas() (gas: 171045) +RMN_voteToBless_Blessed_Benchmark:test_1RootSuccessBecameBlessed_gas() (gas: 34790) +RMN_voteToBless_Blessed_Benchmark:test_1RootSuccess_gas() (gas: 32338) +RMN_voteToBless_Blessed_Benchmark:test_3RootSuccess_gas() (gas: 93196) +RMN_voteToBless_Blessed_Benchmark:test_5RootSuccess_gas() (gas: 153948) +RMN_voteToCurse:test_CurseOnlyWhenThresholdReached_Success() (gas: 1748779) +RMN_voteToCurse:test_EmptySubjects_Revert() (gas: 15996) +RMN_voteToCurse:test_EvenIfAlreadyCursed_Success() (gas: 564086) +RMN_voteToCurse:test_OwnerCanCurseAndUncurse() (gas: 471086) +RMN_voteToCurse:test_RepeatedSubject_Revert() (gas: 151480) +RMN_voteToCurse:test_ReusedCurseId_Revert() (gas: 155411) +RMN_voteToCurse:test_UnauthorizedVoter_Revert() (gas: 14537) +RMN_voteToCurse:test_VoteToCurse_NoCurse_Success() (gas: 203894) +RMN_voteToCurse:test_VoteToCurse_YesCurse_Success() (gas: 495649) +RMN_voteToCurse_2:test_VotesAreDroppedIfSubjectIsNotCursedDuringConfigChange() (gas: 417003) +RMN_voteToCurse_2:test_VotesAreRetainedIfSubjectIsCursedDuringConfigChange() (gas: 1339323) +RMN_voteToCurse_Benchmark_1:test_VoteToCurse_NewSubject_NewVoter_NoCurse_gas() (gas: 146898) +RMN_voteToCurse_Benchmark_1:test_VoteToCurse_NewSubject_NewVoter_YesCurse_gas() (gas: 171152) +RMN_voteToCurse_Benchmark_2:test_VoteToCurse_OldSubject_NewVoter_NoCurse_gas() (gas: 126446) +RMN_voteToCurse_Benchmark_2:test_VoteToCurse_OldSubject_OldVoter_NoCurse_gas() (gas: 102691) +RMN_voteToCurse_Benchmark_3:test_VoteToCurse_OldSubject_NewVoter_YesCurse_gas() (gas: 151187) +RateLimiter_constructor:test_Constructor_Success() (gas: 22964) +RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 19839) +RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 28311) +RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 39405) +RateLimiter_consume:test_ConsumeTokens_Success() (gas: 21919) +RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 57402) +RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 19531) +RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 33020) +RateLimiter_consume:test_Refill_Success() (gas: 48170) +RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 22450) +RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 31057) +RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 49681) +RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 63750) +RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 48188) RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36033) RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19739) RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130086) @@ -972,11 +972,11 @@ TokenPoolAndProxy:test_lockOrBurn_lockRelease_Success() (gas: 5793246) TokenPoolAndProxy:test_setPreviousPool_Success() (gas: 3070731) TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_2() (gas: 6434801) TokenPoolAndProxyMigration:test_tokenPoolMigration_Success_1_4() (gas: 6634934) -TokenPoolFactoryTests:test_TokenPoolFactory_Constructor_Revert() (gas: 4141230) -TokenPoolFactoryTests:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 15422302) -TokenPoolFactoryTests:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 15692550) -TokenPoolFactoryTests:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5740699) -TokenPoolFactoryTests:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5894838) +TokenPoolFactoryTests:test_TokenPoolFactory_Constructor_Revert() (gas: 4118758) +TokenPoolFactoryTests:test_createTokenPool_ExistingRemoteToken_AndPredictPool_Success() (gas: 15396183) +TokenPoolFactoryTests:test_createTokenPool_WithNoExistingRemoteContracts_predict_Success() (gas: 15665428) +TokenPoolFactoryTests:test_createTokenPool_WithNoExistingTokenOnRemoteChain_Success() (gas: 5740557) +TokenPoolFactoryTests:test_createTokenPool_WithRemoteTokenAndRemotePool_Success() (gas: 5894400) TokenPoolFactoryTests:test_updateRemoteChainConfig_Success() (gas: 86259) TokenPoolWithAllowList_applyAllowListUpdates:test_AllowListNotEnabled_Revert() (gas: 1979943) TokenPoolWithAllowList_applyAllowListUpdates:test_OnlyOwner_Revert() (gas: 12113) 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 f40af2d0a1..a309713d2d 100644 --- a/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol +++ b/contracts/src/v0.8/ccip/test/tokenAdminRegistry/TokenPoolFactory.t.sol @@ -144,11 +144,7 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // The only field that matters is DEST_CHAIN_SELECTOR because we dont want any existing token pool or token // on the remote chain remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( - DEST_CHAIN_SELECTOR, - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - s_tokenInitCode, - RateLimiter.Config(false, 0, 0) + DEST_CHAIN_SELECTOR, "", "", s_tokenInitCode, RateLimiter.Config(false, 0, 0) ); // Predict the address of the token and pool on the DESTINATION chain @@ -156,13 +152,8 @@ 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 poolAddress) = s_tokenPoolFactory.deployTokenAndTokenPool( - remoteTokenPools, - s_tokenInitCode, - s_poolInitCode, - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - FAKE_SALT - ); + (, address poolAddress) = + s_tokenPoolFactory.deployTokenAndTokenPool(remoteTokenPools, s_tokenInitCode, s_poolInitCode, "", FAKE_SALT); // Ensure that the remote Token was set to the one we predicted assertEq( @@ -196,11 +187,7 @@ 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, - s_poolInitCode, - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - FAKE_SALT + new TokenPoolFactory.RemoteTokenPoolInfo[](0), s_tokenInitCode, s_poolInitCode, "", FAKE_SALT ); assertEq( @@ -256,22 +243,13 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // The only field that matters is DEST_CHAIN_SELECTOR because we dont want any existing token pool or token // on the remote chain remoteTokenPools[0] = TokenPoolFactory.RemoteTokenPoolInfo( - DEST_CHAIN_SELECTOR, - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - abi.encode(address(newRemoteToken)), - s_tokenInitCode, - RateLimiter.Config(false, 0, 0) + DEST_CHAIN_SELECTOR, "", abi.encode(address(newRemoteToken)), s_tokenInitCode, RateLimiter.Config(false, 0, 0) ); // 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, - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - FAKE_SALT - ); + (address tokenAddress, address poolAddress) = + s_tokenPoolFactory.deployTokenAndTokenPool(remoteTokenPools, s_tokenInitCode, s_poolInitCode, "", FAKE_SALT); assertEq(address(TokenPool(poolAddress).getToken()), tokenAddress, "Token Address should have been set locally"); @@ -305,11 +283,7 @@ contract TokenPoolFactoryTests is TokenPoolFactorySetup { // On the new token pool factory, representing a destination chain, // deploy a new token and a new pool address newPoolAddress = newTokenPoolFactory.deployTokenPoolWithExistingToken( - address(newRemoteToken), - new TokenPoolFactory.RemoteTokenPoolInfo[](0), - s_poolInitCode, - abi.encode(s_tokenPoolFactory.EMPTY_PARAMETER_FLAG()), - FAKE_SALT + address(newRemoteToken), new TokenPoolFactory.RemoteTokenPoolInfo[](0), s_poolInitCode, "", FAKE_SALT ); assertEq( diff --git a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol index 8b6612a1a1..13bf738eb9 100644 --- a/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol +++ b/contracts/src/v0.8/ccip/tokenAdminRegistry/TokenPoolFactory.sol @@ -149,9 +149,9 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { RemoteTokenPoolInfo memory remoteTokenPool = remoteTokenPools[i]; RemoteChainConfig memory remoteChainConfig = s_remoteChainConfigs[remoteTokenPool.remoteChainSelector]; - // If the user provides the empty parameter flag, then the address of the token needs to be predicted - // otherwise the address provided is used. - if (bytes4(remoteTokenPool.remoteTokenAddress) == EMPTY_PARAMETER_FLAG) { + // 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. + if (remoteTokenPool.remoteTokenAddress.length == 0) { // The user must provide the initCode for the remote token, so its address can be predicted correctly. It's // provided in the remoteTokenInitCode field for the remoteTokenPool remoteTokenPool.remoteTokenAddress = abi.encode( @@ -159,8 +159,9 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { ); } - // If the user provides the empty parameter flag, the address of the pool should be predicted - if (bytes4(remoteTokenPool.remotePoolAddress) == EMPTY_PARAMETER_FLAG) { + // If the user provides an empty byte string parameter, indicating the pool has not been deployed yet, + // the address of the pool should be predicted. Otherwise use the provided address. + if (remoteTokenPool.remotePoolAddress.length == 0) { // Generate the initCode that will be used on the remote chain. It is assumed that tokenInitCode // will be the same on all chains, so it can be reused here. @@ -196,7 +197,7 @@ contract TokenPoolFactory is OwnerIsCreator, ITypeAndVersion { // If the user doesn't want to provide any special parameters which may be needed for a custom the token pool then // use the standard burn/mint token pool params. Since the user can provide custom token pool init code, // they must also provide custom constructor args. - if (bytes4(tokenPoolInitArgs) == EMPTY_PARAMETER_FLAG) { + if (tokenPoolInitArgs.length == 0) { tokenPoolInitArgs = abi.encode(token, new address[](0), i_rmnProxy, i_ccipRouter); }