diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 6527ed56177..4473d43dd49 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -1,9 +1,9 @@ -ARMProxy_constructor:test_Constructor() (gas: 543485) -ARMProxy_isCursed:test_IsCursed_Success() (gas: 49195) -ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 20200) -ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 47022) -ARMProxy_setARM:test_SetARM() (gas: 18216) -ARMProxy_setARM:test_SetARMzero() (gas: 12144) +ARMProxy_constructor:test_Constructor() (gas: 302231) +ARMProxy_isCursed:test_IsCursed_Success() (gas: 47209) +ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 19412) +ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 45210) +ARMProxy_setARM:test_SetARM() (gas: 16599) +ARMProxy_setARM:test_SetARMzero() (gas: 11275) BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28951) BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55367) BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244182) @@ -21,104 +21,104 @@ BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244208) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24223) CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2076601) -CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 380773) -CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 558994) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 323319) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 323792) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 326840) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 322566) -CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 396028) -CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 325553) -CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 324473) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 354424) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1424879) -CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 322684) -CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 323067) -CCIPHome__validateConfig:test__validateConfig_Success() (gas: 340335) -CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1177201) -CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 328982) -CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 329095) -CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 199206) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 371830) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 23171) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 286616) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 16588) -CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 411194) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 53139) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 14017) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 12740) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 51199) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1553472) -CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 67022) -CCIPHome_constructor:test_constructor_success() (gas: 5322506) -CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2917876) -CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 10244) -CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2632384) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 10152) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27337) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 9924) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5320500) -CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 10097) -CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 21525) -CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 9666) -CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 39075) -CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 43957) -CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1489850) -CCIPHome_setCandidate:test_setCandidate_success() (gas: 1435475) -CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 11363) +CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 332619) +CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 458568) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 289191) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 289486) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 292216) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 288824) +CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 336363) +CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 290590) +CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 290055) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 308646) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1191231) +CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 288918) +CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 289112) +CCIPHome__validateConfig:test__validateConfig_Success() (gas: 299797) +CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 773105) +CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 293455) +CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 293503) +CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 187738) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 349623) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 18065) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 272742) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14952) +CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 372561) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 38098) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 11827) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 11015) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 37072) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455716) +CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63767) +CCIPHome_constructor:test_constructor_success() (gas: 3455841) +CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773000) +CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9138) +CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547397) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9087) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23005) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 8817) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5113570) +CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 9068) +CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19105) +CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 8817) +CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30674) +CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 29383) +CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1395154) +CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439) +CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 9885) DefensiveExampleTest:test_HappyPath_Success() (gas: 200473) DefensiveExampleTest:test_Recovery() (gas: 424876) E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1510203) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 103832) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 54732) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 21903) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 20674) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 116423) -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: 41273) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 22872) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 18368) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 18398) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 34950) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 34719) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 23796) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 34674) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 36217) -FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 60126) -FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 11582) -FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 185756) -FactoryBurnMintERC20_burn:test_BurnFromZeroAddress_Reverts() (gas: 49486) -FactoryBurnMintERC20_burn:test_ExceedsBalance_Reverts() (gas: 23525) -FactoryBurnMintERC20_burn:test_SenderNotBurner_Reverts() (gas: 14678) -FactoryBurnMintERC20_burnFrom:test_BurnFrom_Success() (gas: 61200) -FactoryBurnMintERC20_burnFrom:test_ExceedsBalance_Reverts() (gas: 38720) -FactoryBurnMintERC20_burnFrom:test_InsufficientAllowance_Reverts() (gas: 23765) -FactoryBurnMintERC20_burnFrom:test_SenderNotBurner_Reverts() (gas: 14656) -FactoryBurnMintERC20_burnFromAlias:test_BurnFrom_Success() (gas: 61174) -FactoryBurnMintERC20_burnFromAlias:test_ExceedsBalance_Reverts() (gas: 38684) -FactoryBurnMintERC20_burnFromAlias:test_InsufficientAllowance_Reverts() (gas: 23720) -FactoryBurnMintERC20_burnFromAlias:test_SenderNotBurner_Reverts() (gas: 14611) -FactoryBurnMintERC20_constructor:test_Constructor_Success() (gas: 2563860) -FactoryBurnMintERC20_decreaseApproval:test_DecreaseApproval_Success() (gas: 35139) -FactoryBurnMintERC20_getCCIPAdmin:test_getCCIPAdmin_Success() (gas: 13369) -FactoryBurnMintERC20_getCCIPAdmin:test_setCCIPAdmin_Success() (gas: 25748) -FactoryBurnMintERC20_grantMintAndBurnRoles:test_GrantMintAndBurnRoles_Success() (gas: 125778) -FactoryBurnMintERC20_grantRole:test_GrantBurnAccess_Success() (gas: 56797) -FactoryBurnMintERC20_grantRole:test_GrantMany_Success() (gas: 993503) -FactoryBurnMintERC20_grantRole:test_GrantMintAccess_Success() (gas: 97852) -FactoryBurnMintERC20_increaseApproval:test_IncreaseApproval_Success() (gas: 48877) -FactoryBurnMintERC20_mint:test_BasicMint_Success() (gas: 153780) -FactoryBurnMintERC20_mint:test_MaxSupplyExceeded_Reverts() (gas: 54585) -FactoryBurnMintERC20_mint:test_SenderNotMinter_Reverts() (gas: 12706) -FactoryBurnMintERC20_supportsInterface:test_SupportsInterface_Success() (gas: 13517) -FactoryBurnMintERC20_transfer:test_InvalidAddress_Reverts() (gas: 11580) -FactoryBurnMintERC20_transfer:test_Transfer_Success() (gas: 45409) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96980) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49812) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17479) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 15753) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 99953) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 76182) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 99974) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 145007) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 80439) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 80604) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 96107) +EtherSenderReceiverTest_constructor:test_constructor() (gas: 17575) +EtherSenderReceiverTest_getFee:test_getFee() (gas: 27456) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 20355) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 16682) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 16615) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 25456) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 25373) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17969) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25328) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26348) +FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 55819) +FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 10703) +FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 172464) +FactoryBurnMintERC20_burn:test_BurnFromZeroAddress_Reverts() (gas: 47338) +FactoryBurnMintERC20_burn:test_ExceedsBalance_Reverts() (gas: 22005) +FactoryBurnMintERC20_burn:test_SenderNotBurner_Reverts() (gas: 13520) +FactoryBurnMintERC20_burnFrom:test_BurnFrom_Success() (gas: 58274) +FactoryBurnMintERC20_burnFrom:test_ExceedsBalance_Reverts() (gas: 36191) +FactoryBurnMintERC20_burnFrom:test_InsufficientAllowance_Reverts() (gas: 22113) +FactoryBurnMintERC20_burnFrom:test_SenderNotBurner_Reverts() (gas: 13487) +FactoryBurnMintERC20_burnFromAlias:test_BurnFrom_Success() (gas: 58248) +FactoryBurnMintERC20_burnFromAlias:test_ExceedsBalance_Reverts() (gas: 36155) +FactoryBurnMintERC20_burnFromAlias:test_InsufficientAllowance_Reverts() (gas: 22068) +FactoryBurnMintERC20_burnFromAlias:test_SenderNotBurner_Reverts() (gas: 13442) +FactoryBurnMintERC20_constructor:test_Constructor_Success() (gas: 1450638) +FactoryBurnMintERC20_decreaseApproval:test_DecreaseApproval_Success() (gas: 31419) +FactoryBurnMintERC20_getCCIPAdmin:test_getCCIPAdmin_Success() (gas: 12717) +FactoryBurnMintERC20_getCCIPAdmin:test_setCCIPAdmin_Success() (gas: 23874) +FactoryBurnMintERC20_grantMintAndBurnRoles:test_GrantMintAndBurnRoles_Success() (gas: 121194) +FactoryBurnMintERC20_grantRole:test_GrantBurnAccess_Success() (gas: 53403) +FactoryBurnMintERC20_grantRole:test_GrantMany_Success() (gas: 961486) +FactoryBurnMintERC20_grantRole:test_GrantMintAccess_Success() (gas: 94165) +FactoryBurnMintERC20_increaseApproval:test_IncreaseApproval_Success() (gas: 44398) +FactoryBurnMintERC20_mint:test_BasicMint_Success() (gas: 149804) +FactoryBurnMintERC20_mint:test_MaxSupplyExceeded_Reverts() (gas: 50679) +FactoryBurnMintERC20_mint:test_SenderNotMinter_Reverts() (gas: 11405) +FactoryBurnMintERC20_supportsInterface:test_SupportsInterface_Success() (gas: 11538) +FactoryBurnMintERC20_transfer:test_InvalidAddress_Reverts() (gas: 10701) +FactoryBurnMintERC20_transfer:test_Transfer_Success() (gas: 42482) FeeQuoter_applyDestChainConfigUpdates:test_InvalidChainFamilySelector_Revert() (gas: 16824) FeeQuoter_applyDestChainConfigUpdates:test_InvalidDestChainConfigDestChainSelectorEqZero_Revert() (gas: 16737) FeeQuoter_applyDestChainConfigUpdates:test_applyDestChainConfigUpdatesDefaultTxGasLimitEqZero_Revert() (gas: 16791) @@ -252,11 +252,11 @@ LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83 LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 56035) LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60182) LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) -MerkleMultiProofTest:test_CVE_2023_34459() (gas: 6328) -MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3975) -MerkleMultiProofTest:test_MerkleRoot256() (gas: 668330) -MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 4074) -MerkleMultiProofTest:test_SpecSync_gas() (gas: 49316) +MerkleMultiProofTest:test_CVE_2023_34459() (gas: 5456) +MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3563) +MerkleMultiProofTest:test_MerkleRoot256() (gas: 394891) +MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 3661) +MerkleMultiProofTest:test_SpecSync_gas() (gas: 34152) MockRouterTest:test_ccipSendWithInsufficientNativeTokens_Revert() (gas: 34081) MockRouterTest:test_ccipSendWithInvalidMsgValue_Revert() (gas: 60886) MockRouterTest:test_ccipSendWithLinkFeeTokenAndValidMsgValue_Success() (gas: 126575) @@ -312,39 +312,39 @@ MultiAggregateRateLimiter_updateRateLimitTokens:test_UpdateRateLimitTokens_Remov MultiAggregateRateLimiter_updateRateLimitTokens:test_ZeroDestToken_AbiEncoded_Revert() (gas: 14001) MultiAggregateRateLimiter_updateRateLimitTokens:test_ZeroDestToken_Revert() (gas: 18365) MultiAggregateRateLimiter_updateRateLimitTokens:test_ZeroSourceToken_Revert() (gas: 18294) -MultiOCR3Base_setOCR3Configs:test_FMustBePositive_Revert() (gas: 72030) -MultiOCR3Base_setOCR3Configs:test_FTooHigh_Revert() (gas: 49210) -MultiOCR3Base_setOCR3Configs:test_MoreTransmittersThanSigners_Revert() (gas: 115906) -MultiOCR3Base_setOCR3Configs:test_NoTransmitters_Revert() (gas: 23222) -MultiOCR3Base_setOCR3Configs:test_RepeatSignerAddress_Revert() (gas: 296834) -MultiOCR3Base_setOCR3Configs:test_RepeatTransmitterAddress_Revert() (gas: 437371) -MultiOCR3Base_setOCR3Configs:test_SetConfigIgnoreSigners_Success() (gas: 557004) -MultiOCR3Base_setOCR3Configs:test_SetConfigWithSignersMismatchingTransmitters_Success() (gas: 719712) -MultiOCR3Base_setOCR3Configs:test_SetConfigWithSigners_Success() (gas: 874850) -MultiOCR3Base_setOCR3Configs:test_SetConfigWithoutSigners_Success() (gas: 486337) -MultiOCR3Base_setOCR3Configs:test_SetConfigsZeroInput_Success() (gas: 13309) -MultiOCR3Base_setOCR3Configs:test_SetMultipleConfigs_Success() (gas: 2266813) -MultiOCR3Base_setOCR3Configs:test_SignerCannotBeZeroAddress_Revert() (gas: 152947) -MultiOCR3Base_setOCR3Configs:test_StaticConfigChange_Revert() (gas: 841182) -MultiOCR3Base_setOCR3Configs:test_TooManySigners_Revert() (gas: 312066) -MultiOCR3Base_setOCR3Configs:test_TooManyTransmitters_Revert() (gas: 261350) -MultiOCR3Base_setOCR3Configs:test_TransmitterCannotBeZeroAddress_Revert() (gas: 266606) -MultiOCR3Base_setOCR3Configs:test_UpdateConfigSigners_Success() (gas: 930580) -MultiOCR3Base_setOCR3Configs:test_UpdateConfigTransmittersWithoutSigners_Success() (gas: 516817) -MultiOCR3Base_transmit:test_ConfigDigestMismatch_Revert() (gas: 49749) -MultiOCR3Base_transmit:test_ForkedChain_Revert() (gas: 56466) -MultiOCR3Base_transmit:test_InsufficientSignatures_Revert() (gas: 87043) -MultiOCR3Base_transmit:test_NonUniqueSignature_Revert() (gas: 75489) -MultiOCR3Base_transmit:test_SignatureOutOfRegistration_Revert() (gas: 38476) -MultiOCR3Base_transmit:test_TooManySignatures_Revert() (gas: 92099) -MultiOCR3Base_transmit:test_TransmitSigners_gas_Success() (gas: 39865) -MultiOCR3Base_transmit:test_TransmitWithExtraCalldataArgs_Revert() (gas: 52712) -MultiOCR3Base_transmit:test_TransmitWithLessCalldataArgs_Revert() (gas: 30083) -MultiOCR3Base_transmit:test_TransmitWithoutSignatureVerification_gas_Success() (gas: 21035) -MultiOCR3Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 29171) -MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 69940) -MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 42602) -MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 37456) +MultiOCR3Base_setOCR3Configs:test_FMustBePositive_Revert() (gas: 59441) +MultiOCR3Base_setOCR3Configs:test_FTooHigh_Revert() (gas: 44190) +MultiOCR3Base_setOCR3Configs:test_MoreTransmittersThanSigners_Revert() (gas: 104844) +MultiOCR3Base_setOCR3Configs:test_NoTransmitters_Revert() (gas: 18908) +MultiOCR3Base_setOCR3Configs:test_RepeatSignerAddress_Revert() (gas: 283842) +MultiOCR3Base_setOCR3Configs:test_RepeatTransmitterAddress_Revert() (gas: 422489) +MultiOCR3Base_setOCR3Configs:test_SetConfigIgnoreSigners_Success() (gas: 512288) +MultiOCR3Base_setOCR3Configs:test_SetConfigWithSignersMismatchingTransmitters_Success() (gas: 680609) +MultiOCR3Base_setOCR3Configs:test_SetConfigWithSigners_Success() (gas: 829200) +MultiOCR3Base_setOCR3Configs:test_SetConfigWithoutSigners_Success() (gas: 457530) +MultiOCR3Base_setOCR3Configs:test_SetConfigsZeroInput_Success() (gas: 12436) +MultiOCR3Base_setOCR3Configs:test_SetMultipleConfigs_Success() (gas: 2142528) +MultiOCR3Base_setOCR3Configs:test_SignerCannotBeZeroAddress_Revert() (gas: 141905) +MultiOCR3Base_setOCR3Configs:test_StaticConfigChange_Revert() (gas: 807791) +MultiOCR3Base_setOCR3Configs:test_TooManySigners_Revert() (gas: 158911) +MultiOCR3Base_setOCR3Configs:test_TooManyTransmitters_Revert() (gas: 112357) +MultiOCR3Base_setOCR3Configs:test_TransmitterCannotBeZeroAddress_Revert() (gas: 254293) +MultiOCR3Base_setOCR3Configs:test_UpdateConfigSigners_Success() (gas: 861787) +MultiOCR3Base_setOCR3Configs:test_UpdateConfigTransmittersWithoutSigners_Success() (gas: 476186) +MultiOCR3Base_transmit:test_ConfigDigestMismatch_Revert() (gas: 42957) +MultiOCR3Base_transmit:test_ForkedChain_Revert() (gas: 48640) +MultiOCR3Base_transmit:test_InsufficientSignatures_Revert() (gas: 77185) +MultiOCR3Base_transmit:test_NonUniqueSignature_Revert() (gas: 65925) +MultiOCR3Base_transmit:test_SignatureOutOfRegistration_Revert() (gas: 33494) +MultiOCR3Base_transmit:test_TooManySignatures_Revert() (gas: 79889) +MultiOCR3Base_transmit:test_TransmitSigners_gas_Success() (gas: 33686) +MultiOCR3Base_transmit:test_TransmitWithExtraCalldataArgs_Revert() (gas: 47188) +MultiOCR3Base_transmit:test_TransmitWithLessCalldataArgs_Revert() (gas: 25711) +MultiOCR3Base_transmit:test_TransmitWithoutSignatureVerification_gas_Success() (gas: 18722) +MultiOCR3Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 24299) +MultiOCR3Base_transmit:test_UnauthorizedSigner_Revert() (gas: 61298) +MultiOCR3Base_transmit:test_UnconfiguredPlugin_Revert() (gas: 39952) +MultiOCR3Base_transmit:test_ZeroSignatures_Revert() (gas: 33026) NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas: 37956) NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) @@ -557,74 +557,74 @@ PingPong_setOutOfOrderExecution:test_OutOfOrderExecution_Success() (gas: 20283) PingPong_setPaused:test_Pausing_Success() (gas: 17738) PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 151954) PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 177569) -RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1141201) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27408) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 11404) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 11832) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1155666) -RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 20941) -RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 11645) -RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 11193) -RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 34858) -RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 663743) -RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 19206) -RMNHome_setCandidate:test_setCandidate_success() (gas: 634730) -RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 35645) -RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 21662) -RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 16620) -RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 130187) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 27054) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 26920) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 29055) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 31068) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 370126) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 29313) -RMNRemote_constructor:test_constructor_success() (gas: 8853) -RMNRemote_constructor:test_constructor_zeroChainSelector_reverts() (gas: 61027) -RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 156804) -RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 20212) -RMNRemote_curse:test_curse_success() (gas: 157259) -RMNRemote_global_and_legacy_curses:test_global_and_legacy_curses_success() (gas: 141502) -RMNRemote_setConfig:test_setConfig_ZeroValueNotAllowed_revert() (gas: 44318) -RMNRemote_setConfig:test_setConfig_addSigner_removeSigner_success() (gas: 1114504) -RMNRemote_setConfig:test_setConfig_duplicateOnChainPublicKey_reverts() (gas: 339630) -RMNRemote_setConfig:test_setConfig_invalidSignerOrder_reverts() (gas: 91847) -RMNRemote_setConfig:test_setConfig_notEnoughSigners_reverts() (gas: 65053) -RMNRemote_uncurse:test_uncurse_NotCursed_duplicatedUncurseSubject_reverts() (gas: 54015) -RMNRemote_uncurse:test_uncurse_calledByNonOwner_reverts() (gas: 20193) -RMNRemote_uncurse:test_uncurse_success() (gas: 44267) -RMNRemote_verify_withConfigNotSet:test_verify_reverts() (gas: 14532) -RMNRemote_verify_withConfigSet:test_verify_InvalidSignature_reverts() (gas: 108313) -RMNRemote_verify_withConfigSet:test_verify_OutOfOrderSignatures_duplicateSignature_reverts() (gas: 105886) -RMNRemote_verify_withConfigSet:test_verify_OutOfOrderSignatures_not_sorted_reverts() (gas: 113116) -RMNRemote_verify_withConfigSet:test_verify_ThresholdNotMet_reverts() (gas: 383941) -RMNRemote_verify_withConfigSet:test_verify_UnexpectedSigner_reverts() (gas: 499524) -RMNRemote_verify_withConfigSet:test_verify_success() (gas: 97486) -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: 31168) -RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 49681) -RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 63750) -RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 48144) -RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36866) -RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 24071) -RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 139023) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 22539) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 137363) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 22381) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 137204) -Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 93496) -Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 12348667) -Router_applyRampUpdates:test_OnRampDisable() (gas: 65150) -Router_applyRampUpdates:test_OnlyOwner_Revert() (gas: 13275) +RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1079685) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23879) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 10597) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 10843) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1085033) +RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19041) +RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 10889) +RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 10628) +RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 28147) +RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 597564) +RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 15071) +RMNHome_setCandidate:test_setCandidate_success() (gas: 589330) +RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 30186) +RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 18854) +RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 14009) +RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 104862) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18850) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18710) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20387) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 21405) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 137318) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 20522) +RMNRemote_constructor:test_constructor_success() (gas: 8334) +RMNRemote_constructor:test_constructor_zeroChainSelector_reverts() (gas: 59184) +RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154479) +RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18712) +RMNRemote_curse:test_curse_success() (gas: 149431) +RMNRemote_global_and_legacy_curses:test_global_and_legacy_curses_success() (gas: 133512) +RMNRemote_setConfig:test_setConfig_ZeroValueNotAllowed_revert() (gas: 37971) +RMNRemote_setConfig:test_setConfig_addSigner_removeSigner_success() (gas: 993448) +RMNRemote_setConfig:test_setConfig_duplicateOnChainPublicKey_reverts() (gas: 323540) +RMNRemote_setConfig:test_setConfig_invalidSignerOrder_reverts() (gas: 80201) +RMNRemote_setConfig:test_setConfig_notEnoughSigners_reverts() (gas: 54232) +RMNRemote_uncurse:test_uncurse_NotCursed_duplicatedUncurseSubject_reverts() (gas: 51993) +RMNRemote_uncurse:test_uncurse_calledByNonOwner_reverts() (gas: 18682) +RMNRemote_uncurse:test_uncurse_success() (gas: 40171) +RMNRemote_verify_withConfigNotSet:test_verify_reverts() (gas: 13578) +RMNRemote_verify_withConfigSet:test_verify_InvalidSignature_reverts() (gas: 96449) +RMNRemote_verify_withConfigSet:test_verify_OutOfOrderSignatures_duplicateSignature_reverts() (gas: 94267) +RMNRemote_verify_withConfigSet:test_verify_OutOfOrderSignatures_not_sorted_reverts() (gas: 101330) +RMNRemote_verify_withConfigSet:test_verify_ThresholdNotMet_reverts() (gas: 304634) +RMNRemote_verify_withConfigSet:test_verify_UnexpectedSigner_reverts() (gas: 428126) +RMNRemote_verify_withConfigSet:test_verify_success() (gas: 86159) +RateLimiter_constructor:test_Constructor_Success() (gas: 19806) +RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 16042) +RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 22435) +RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 31495) +RateLimiter_consume:test_ConsumeTokens_Success() (gas: 20403) +RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 40693) +RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 15800) +RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 25781) +RateLimiter_consume:test_Refill_Success() (gas: 37447) +RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 18388) +RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 24930) +RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 38947) +RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46852) +RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38509) +RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36107) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 20200) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 130631) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19797) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130126) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19602) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129930) +Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89591) +Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10750087) +Router_applyRampUpdates:test_OnRampDisable() (gas: 56445) +Router_applyRampUpdates:test_OnlyOwner_Revert() (gas: 12414) Router_ccipSend:test_CCIPSendLinkFeeNoTokenSuccess_gas() (gas: 131413) Router_ccipSend:test_CCIPSendLinkFeeOneTokenSuccess_gas() (gas: 221277) Router_ccipSend:test_FeeTokenAmountTooLow_Revert() (gas: 71841) @@ -640,7 +640,7 @@ Router_ccipSend:test_WrappedNativeFeeToken_Success() (gas: 194209) Router_ccipSend:test_ccipSend_nativeFeeNoTokenSuccess_gas() (gas: 140674) Router_ccipSend:test_ccipSend_nativeFeeOneTokenSuccess_gas() (gas: 230473) Router_constructor:test_Constructor_Success() (gas: 13222) -Router_getArmProxy:test_getArmProxy() (gas: 11284) +Router_getArmProxy:test_getArmProxy() (gas: 10573) Router_getFee:test_GetFeeSupportedChain_Success() (gas: 51934) Router_getFee:test_UnsupportedDestinationChain_Revert() (gas: 17385) Router_getSupportedTokens:test_GetSupportedTokens_Revert() (gas: 10565) @@ -692,29 +692,31 @@ TokenPoolWithAllowList_getAllowList:test_GetAllowList_Success() (gas: 23929) TokenPoolWithAllowList_getAllowListEnabled:test_GetAllowListEnabled_Success() (gas: 8408) TokenPoolWithAllowList_setRouter:test_SetRouter_Success() (gas: 24983) TokenPoolWithAllowList_setRouter:test_ZeroAddressNotAllowed_Revert() (gas: 10663) -TokenPool_addRemotePool:test_NonExistentChain_Revert() (gas: 14127) -TokenPool_addRemotePool:test_PoolAlreadyAdded_Revert() (gas: 462610) -TokenPool_addRemotePool:test_ZeroAddressNotAllowed_Revert() (gas: 362048) -TokenPool_addRemotePool:test_ZeroLengthAddressNotAllowed_Revert() (gas: 361966) -TokenPool_addRemotePool:test_addRemotePool_Success() (gas: 466160) -TokenPool_applyChainUpdates:test_applyChainUpdates_InvalidRateLimitRate_Revert() (gas: 703933) +TokenPool_addRemotePool:test_NonExistentChain_Revert() (gas: 14186) +TokenPool_addRemotePool:test_PoolAlreadyAdded_Revert() (gas: 124357) +TokenPool_addRemotePool:test_ZeroAddressNotAllowed_Revert() (gas: 14201) +TokenPool_addRemotePool:test_ZeroLengthAddressNotAllowed_Revert() (gas: 14097) +TokenPool_addRemotePool:test_addRemotePool_MultipleActive() (gas: 166) +TokenPool_addRemotePool:test_addRemotePool_Success() (gas: 160757) +TokenPool_applyChainUpdates:test_applyChainUpdates_InvalidRateLimitRate_Revert() (gas: 704092) TokenPool_applyChainUpdates:test_applyChainUpdates_NonExistentChain_Revert() (gas: 14999) TokenPool_applyChainUpdates:test_applyChainUpdates_OnlyCallableByOwner_Revert() (gas: 11841) -TokenPool_applyChainUpdates:test_applyChainUpdates_Success() (gas: 606417) -TokenPool_applyChainUpdates:test_applyChainUpdates_ZeroAddressNotAllowed_Revert() (gas: 158360) +TokenPool_applyChainUpdates:test_applyChainUpdates_Success() (gas: 607944) +TokenPool_applyChainUpdates:test_applyChainUpdates_ZeroAddressNotAllowed_Revert() (gas: 158309) TokenPool_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 70879) TokenPool_constructor:test_immutableFields_Success() (gas: 20718) -TokenPool_onlyOffRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 368000) -TokenPool_onlyOffRamp:test_ChainNotAllowed_Revert() (gas: 363080) -TokenPool_onlyOffRamp:test_onlyOffRamp_Success() (gas: 440802) -TokenPool_onlyOnRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 367630) -TokenPool_onlyOnRamp:test_ChainNotAllowed_Revert() (gas: 326987) -TokenPool_onlyOnRamp:test_onlyOnRamp_Success() (gas: 395727) -TokenPool_removeRemotePool:test_InvalidRemotePoolForChain_Revert() (gas: 365698) -TokenPool_removeRemotePool:test_NonExistentChain_Revert() (gas: 14126) -TokenPool_removeRemotePool:test_removeRemotePool_Success() (gas: 400365) +TokenPool_getRemotePool:test_getRemotePools() (gas: 332248) +TokenPool_onlyOffRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 21504) +TokenPool_onlyOffRamp:test_ChainNotAllowed_Revert() (gas: 335794) +TokenPool_onlyOffRamp:test_onlyOffRamp_Success() (gas: 94291) +TokenPool_onlyOnRamp:test_CallerIsNotARampOnRouter_Revert() (gas: 21134) +TokenPool_onlyOnRamp:test_ChainNotAllowed_Revert() (gas: 299700) +TokenPool_onlyOnRamp:test_onlyOnRamp_Success() (gas: 49216) +TokenPool_removeRemotePool:test_InvalidRemotePoolForChain_Revert() (gas: 17860) +TokenPool_removeRemotePool:test_NonExistentChain_Revert() (gas: 14277) +TokenPool_removeRemotePool:test_removeRemotePool_Success() (gas: 136446) TokenPool_setChainRateLimiterConfig:test_NonExistentChain_Revert() (gas: 17169) -TokenPool_setChainRateLimiterConfig:test_OnlyOwnerOrRateLimitAdmin_Revert() (gas: 15285) +TokenPool_setChainRateLimiterConfig:test_OnlyOwnerOrRateLimitAdmin_Revert() (gas: 15262) TokenPool_setRateLimitAdmin:test_SetRateLimitAdmin_Revert() (gas: 11002) TokenPool_setRateLimitAdmin:test_SetRateLimitAdmin_Success() (gas: 37562) USDCBridgeMigrator_BurnLockedUSDC:test_PrimaryMechanism_Success() (gas: 135933) diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol index 206a103d3da..deaf9993bd5 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.addRemotePool.t.sol @@ -6,42 +6,31 @@ import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; contract TokenPool_addRemotePool is TokenPoolSetup { function test_addRemotePool_Success() public { - uint64 chainSelector = DEST_CHAIN_SELECTOR; + // Use a longer data type to ensure it also works for non-evm + bytes memory remotePool = abi.encode(makeAddr("non-evm-1"), makeAddr("non-evm-2")); - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); - bytes memory remotePool = abi.encode(type(uint256).max); + bytes32 remotePairHash = keccak256(abi.encode(DEST_CHAIN_SELECTOR, remotePool)); - bytes32 remotePairHash = keccak256(abi.encode(chainSelector, remotePool)); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + vm.startPrank(OWNER); vm.expectEmit(); - emit TokenPool.RemotePoolSet(chainSelector, remotePool, remotePairHash); - - vm.startPrank(OWNER); + emit TokenPool.RemotePoolSet(DEST_CHAIN_SELECTOR, remotePool, remotePairHash); - s_tokenPool.addRemotePool(chainSelector, remotePool); + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePool); - bytes[] memory remotePools = s_tokenPool.getRemotePools(chainSelector); + bytes[] memory remotePools = s_tokenPool.getRemotePools(DEST_CHAIN_SELECTOR); assertEq(remotePools.length, 2); - assertEq(remotePools[0], abi.encode(initialPool)); + assertEq(remotePools[0], abi.encode(s_initialRemotePool)); assertEq(remotePools[1], remotePool); } + function test_addRemotePool_MultipleActive() public {} + // Reverts function test_NonExistentChain_Revert() public { - uint64 chainSelector = DEST_CHAIN_SELECTOR; + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; bytes memory remotePool = abi.encode(type(uint256).max); vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainSelector)); @@ -50,67 +39,28 @@ contract TokenPool_addRemotePool is TokenPoolSetup { } function test_ZeroAddressNotAllowed_Revert() public { - uint64 chainSelector = DEST_CHAIN_SELECTOR; bytes memory remotePool = abi.encode(address(0)); - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); - vm.expectRevert(abi.encodeWithSelector(TokenPool.ZeroAddressNotAllowed.selector)); - s_tokenPool.addRemotePool(chainSelector, remotePool); + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePool); } function test_ZeroLengthAddressNotAllowed_Revert() public { - uint64 chainSelector = DEST_CHAIN_SELECTOR; bytes memory remotePool = ""; - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); - - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); vm.expectRevert(abi.encodeWithSelector(TokenPool.ZeroAddressNotAllowed.selector)); - s_tokenPool.addRemotePool(chainSelector, remotePool); + s_tokenPool.addRemotePool(DEST_CHAIN_SELECTOR, remotePool); } function test_PoolAlreadyAdded_Revert() public { uint64 chainSelector = DEST_CHAIN_SELECTOR; - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); bytes memory remotePool = abi.encode(type(uint256).max); bytes32 remotePairHash = keccak256(abi.encode(chainSelector, remotePool)); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); - vm.expectEmit(); emit TokenPool.RemotePoolSet(chainSelector, remotePool, remotePairHash); diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol index 4d787dc1c3e..c15e4f804e3 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.applyChainUpdates.t.sol @@ -2,17 +2,33 @@ pragma solidity 0.8.24; import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; +import {BurnMintERC677} from "../../../../shared/token/ERC677/BurnMintERC677.sol"; import {RateLimiter} from "../../../libraries/RateLimiter.sol"; import {TokenPool} from "../../../pools/TokenPool.sol"; -import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; -contract TokenPool_applyChainUpdates is TokenPoolSetup { +import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; +import {RouterSetup} from "../../router/Router/RouterSetup.t.sol"; + +import {IERC20} from "../../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; + +contract TokenPool_applyChainUpdates is RouterSetup { + IERC20 internal s_token; + TokenPoolHelper internal s_tokenPool; + + function setUp() public virtual override { + RouterSetup.setUp(); + s_token = new BurnMintERC677("LINK", "LNK", 18, 0); + deal(address(s_token), OWNER, type(uint256).max); + + s_tokenPool = new TokenPoolHelper(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + } + function assertState( TokenPool.ChainUpdate[] memory chainUpdates ) public view { uint64[] memory chainSelectors = s_tokenPool.getSupportedChains(); - for (uint256 i = 0; i < chainUpdates.length; i++) { - assertEq(chainUpdates[i].remoteChainSelector, chainSelectors[i]); + for (uint256 i = 0; i < chainUpdates.length; ++i) { + assertEq(chainUpdates[i].remoteChainSelector, chainSelectors[i], "Chain selector mismatch"); } for (uint256 i = 0; i < chainUpdates.length; ++i) { @@ -37,7 +53,7 @@ contract TokenPool_applyChainUpdates is TokenPoolSetup { RateLimiter.Config memory inboundRateLimit2 = RateLimiter.Config({isEnabled: true, capacity: 100e27, rate: 1e17}); // EVM chain, which uses the 160 bit evm address space - uint64 evmChainSelector = 1; + uint64 evmChainSelector = 1789142; bytes memory evmRemotePool = abi.encode(makeAddr("evm_remote_pool")); bytes memory evmRemoteToken = abi.encode(makeAddr("evm_remote_token")); @@ -155,9 +171,11 @@ contract TokenPool_applyChainUpdates is TokenPoolSetup { } function test_applyChainUpdates_InvalidRateLimitRate_Revert() public { + uint64 unusedChainSelector = 2 ** 64 - 1; + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: 1, + remoteChainSelector: unusedChainSelector, remotePoolAddress: abi.encode(address(1)), remoteTokenAddress: abi.encode(address(2)), outboundRateLimiterConfig: RateLimiter.Config({isEnabled: true, capacity: 0, rate: 0}), @@ -190,7 +208,7 @@ contract TokenPool_applyChainUpdates is TokenPoolSetup { s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); // Change the chain selector as adding the same one would revert - chainUpdates[0].remoteChainSelector = 2; + chainUpdates[0].remoteChainSelector = unusedChainSelector - 1; // Inbound diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol index 21b38c02a25..5711ac12f55 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.getRemotePool.t.sol @@ -5,25 +5,26 @@ import {TokenPool} from "../../../pools/TokenPool.sol"; import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; contract TokenPool_getRemotePool is TokenPoolSetup { -// function test_getRemotePool_Success() public { -// uint64 chainSelector = 123124; -// address remotePool = makeAddr("remotePool"); -// address remoteToken = makeAddr("remoteToken"); -// -// // Zero indicates nothing is set -// assertEq(0, s_tokenPool.getRemotePool(chainSelector).length); -// -// TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); -// chainUpdates[0] = TokenPool.ChainUpdate({ -// remoteChainSelector: chainSelector, -// remotePoolAddress: abi.encode(remotePool), -// remoteTokenAddress: abi.encode(remoteToken), -// allowed: true, -// outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), -// inboundRateLimiterConfig: _getInboundRateLimiterConfig() -// }); -// s_tokenPool.applyChainUpdates(chainUpdates); -// -// assertEq(remotePool, abi.decode(s_tokenPool.getRemotePool(chainSelector), (address))); -// } + function test_getRemotePools() public { + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; + bytes memory remotePool = abi.encode(makeAddr("remotePool")); + bytes memory remoteToken = abi.encode(makeAddr("remoteToken")); + + // Zero indicates nothing is set + assertEq(0, s_tokenPool.getRemotePools(chainSelector).length); + + TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); + chainUpdates[0] = TokenPool.ChainUpdate({ + remoteChainSelector: chainSelector, + remotePoolAddress: remotePool, + remoteTokenAddress: remoteToken, + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); + + bytes[] memory remotePools = s_tokenPool.getRemotePools(chainSelector); + assertEq(1, remotePools.length); + assertEq(remotePool, remotePools[0]); + } } diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol index 7dd58893339..bd521d1c6a9 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOffRamp.t.sol @@ -2,25 +2,14 @@ pragma solidity 0.8.24; import {Router} from "../../../Router.sol"; -import {RateLimiter} from "../../../libraries/RateLimiter.sol"; import {TokenPool} from "../../../pools/TokenPool.sol"; import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; contract TokenPool_onlyOffRamp is TokenPoolSetup { function test_onlyOffRamp_Success() public { - uint64 chainSelector = 13377; + uint64 chainSelector = DEST_CHAIN_SELECTOR; address offRamp = makeAddr("onRamp"); - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); - Router.OffRamp[] memory offRampUpdates = new Router.OffRamp[](1); offRampUpdates[0] = Router.OffRamp({sourceChainSelector: chainSelector, offRamp: offRamp}); s_sourceRouter.applyRampUpdates(new Router.OnRamp[](0), new Router.OffRamp[](0), offRampUpdates); @@ -31,7 +20,7 @@ contract TokenPool_onlyOffRamp is TokenPoolSetup { } function test_ChainNotAllowed_Revert() public { - uint64 chainSelector = 13377; + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; address offRamp = makeAddr("onRamp"); vm.startPrank(offRamp); @@ -72,19 +61,9 @@ contract TokenPool_onlyOffRamp is TokenPoolSetup { } function test_CallerIsNotARampOnRouter_Revert() public { - uint64 chainSelector = 13377; + uint64 chainSelector = DEST_CHAIN_SELECTOR; address offRamp = makeAddr("offRamp"); - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); - vm.startPrank(offRamp); vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, offRamp)); diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol index d4406f6c955..9f43981d802 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.onlyOnRamp.t.sol @@ -2,25 +2,14 @@ pragma solidity 0.8.24; import {Router} from "../../../Router.sol"; -import {RateLimiter} from "../../../libraries/RateLimiter.sol"; import {TokenPool} from "../../../pools/TokenPool.sol"; import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; contract TokenPool_onlyOnRamp is TokenPoolSetup { function test_onlyOnRamp_Success() public { - uint64 chainSelector = 13377; + uint64 chainSelector = DEST_CHAIN_SELECTOR; address onRamp = makeAddr("onRamp"); - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); - Router.OnRamp[] memory onRampUpdates = new Router.OnRamp[](1); onRampUpdates[0] = Router.OnRamp({destChainSelector: chainSelector, onRamp: onRamp}); s_sourceRouter.applyRampUpdates(onRampUpdates, new Router.OffRamp[](0), new Router.OffRamp[](0)); @@ -31,7 +20,7 @@ contract TokenPool_onlyOnRamp is TokenPoolSetup { } function test_ChainNotAllowed_Revert() public { - uint64 chainSelector = 13377; + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; address onRamp = makeAddr("onRamp"); vm.startPrank(onRamp); @@ -72,19 +61,9 @@ contract TokenPool_onlyOnRamp is TokenPoolSetup { } function test_CallerIsNotARampOnRouter_Revert() public { - uint64 chainSelector = 13377; + uint64 chainSelector = DEST_CHAIN_SELECTOR; address onRamp = makeAddr("onRamp"); - TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); - chainUpdate[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(address(1)), - remoteTokenAddress: abi.encode(address(2)), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); - vm.startPrank(onRamp); vm.expectRevert(abi.encodeWithSelector(TokenPool.CallerIsNotARampOnRouter.selector, onRamp)); diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol index 65043c95919..fbed1043867 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.removeRemotePool.t.sol @@ -7,23 +7,11 @@ import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; contract TokenPool_removeRemotePool is TokenPoolSetup { function test_removeRemotePool_Success() public { uint64 chainSelector = DEST_CHAIN_SELECTOR; - - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); - bytes memory remotePool = abi.encode(type(uint256).max); + // Use a longer data type to ensure it also works for non-evm + bytes memory remotePool = abi.encode(makeAddr("non-evm-1"), makeAddr("non-evm-2")); bytes32 remotePairHash = keccak256(abi.encode(chainSelector, remotePool)); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); - vm.expectEmit(); emit TokenPool.RemotePoolSet(chainSelector, remotePool, remotePairHash); @@ -32,7 +20,7 @@ contract TokenPool_removeRemotePool is TokenPoolSetup { bytes[] memory remotePools = s_tokenPool.getRemotePools(chainSelector); assertEq(remotePools.length, 2); - assertEq(remotePools[0], abi.encode(initialPool)); + assertEq(remotePools[0], abi.encode(s_initialRemotePool)); assertEq(remotePools[1], remotePool); vm.expectEmit(); @@ -44,8 +32,7 @@ contract TokenPool_removeRemotePool is TokenPoolSetup { // Reverts function test_NonExistentChain_Revert() public { - uint64 chainSelector = DEST_CHAIN_SELECTOR; - + uint64 chainSelector = DEST_CHAIN_SELECTOR + 1; bytes memory remotePool = abi.encode(type(uint256).max); vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainSelector)); @@ -55,21 +42,8 @@ contract TokenPool_removeRemotePool is TokenPoolSetup { function test_InvalidRemotePoolForChain_Revert() public { uint64 chainSelector = DEST_CHAIN_SELECTOR; - - address initialPool = makeAddr("remotePool"); - address remoteToken = makeAddr("remoteToken"); bytes memory remotePool = abi.encode(type(uint256).max); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: chainSelector, - remotePoolAddress: abi.encode(initialPool), - remoteTokenAddress: abi.encode(remoteToken), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); - vm.expectRevert(abi.encodeWithSelector(TokenPool.InvalidRemotePoolForChain.selector, chainSelector, remotePool)); s_tokenPool.removeRemotePool(chainSelector, remotePool); diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol index 9d079933713..4dea9bf4032 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setChainRateLimiterConfig.t.sol @@ -6,22 +6,6 @@ import {TokenPool} from "../../../pools/TokenPool.sol"; import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { - uint64 internal s_remoteChainSelector; - - function setUp() public virtual override { - TokenPoolSetup.setUp(); - TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); - s_remoteChainSelector = 123124; - chainUpdates[0] = TokenPool.ChainUpdate({ - remoteChainSelector: s_remoteChainSelector, - remotePoolAddress: abi.encode(address(2)), - remoteTokenAddress: abi.encode(address(3)), - outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), - inboundRateLimiterConfig: _getInboundRateLimiterConfig() - }); - s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdates); - } - function testFuzz_SetChainRateLimiterConfig_Success(uint128 capacity, uint128 rate, uint32 newTime) public { // Cap the lower bound to 4 so 4/2 is still >= 2 vm.assume(capacity >= 4); @@ -31,8 +15,8 @@ contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { newTime = uint32(bound(newTime, block.timestamp + 1, type(uint32).max)); vm.warp(newTime); - uint256 oldOutboundTokens = s_tokenPool.getCurrentOutboundRateLimiterState(s_remoteChainSelector).tokens; - uint256 oldInboundTokens = s_tokenPool.getCurrentInboundRateLimiterState(s_remoteChainSelector).tokens; + uint256 oldOutboundTokens = s_tokenPool.getCurrentOutboundRateLimiterState(DEST_CHAIN_SELECTOR).tokens; + uint256 oldInboundTokens = s_tokenPool.getCurrentInboundRateLimiterState(DEST_CHAIN_SELECTOR).tokens; RateLimiter.Config memory newOutboundConfig = RateLimiter.Config({isEnabled: true, capacity: capacity, rate: rate}); RateLimiter.Config memory newInboundConfig = @@ -43,13 +27,13 @@ contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { vm.expectEmit(); emit RateLimiter.ConfigChanged(newInboundConfig); vm.expectEmit(); - emit TokenPool.ChainConfigured(s_remoteChainSelector, newOutboundConfig, newInboundConfig); + emit TokenPool.ChainConfigured(DEST_CHAIN_SELECTOR, newOutboundConfig, newInboundConfig); - s_tokenPool.setChainRateLimiterConfig(s_remoteChainSelector, newOutboundConfig, newInboundConfig); + s_tokenPool.setChainRateLimiterConfig(DEST_CHAIN_SELECTOR, newOutboundConfig, newInboundConfig); uint256 expectedTokens = RateLimiter._min(newOutboundConfig.capacity, oldOutboundTokens); - RateLimiter.TokenBucket memory bucket = s_tokenPool.getCurrentOutboundRateLimiterState(s_remoteChainSelector); + RateLimiter.TokenBucket memory bucket = s_tokenPool.getCurrentOutboundRateLimiterState(DEST_CHAIN_SELECTOR); assertEq(bucket.capacity, newOutboundConfig.capacity); assertEq(bucket.rate, newOutboundConfig.rate); assertEq(bucket.tokens, expectedTokens); @@ -57,7 +41,7 @@ contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { expectedTokens = RateLimiter._min(newInboundConfig.capacity, oldInboundTokens); - bucket = s_tokenPool.getCurrentInboundRateLimiterState(s_remoteChainSelector); + bucket = s_tokenPool.getCurrentInboundRateLimiterState(DEST_CHAIN_SELECTOR); assertEq(bucket.capacity, newInboundConfig.capacity); assertEq(bucket.rate, newInboundConfig.rate); assertEq(bucket.tokens, expectedTokens); @@ -71,7 +55,7 @@ contract TokenPool_setChainRateLimiterConfig is TokenPoolSetup { vm.expectRevert(abi.encodeWithSelector(TokenPool.Unauthorized.selector, STRANGER)); s_tokenPool.setChainRateLimiterConfig( - s_remoteChainSelector, _getOutboundRateLimiterConfig(), _getInboundRateLimiterConfig() + DEST_CHAIN_SELECTOR, _getOutboundRateLimiterConfig(), _getInboundRateLimiterConfig() ); } diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRemotePool.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRemotePool.t.sol deleted file mode 100644 index b23e88014dd..00000000000 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPool.setRemotePool.t.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity 0.8.24; - -import {Ownable2Step} from "../../../../shared/access/Ownable2Step.sol"; -import {TokenPool} from "../../../pools/TokenPool.sol"; -import {TokenPoolSetup} from "./TokenPoolSetup.t.sol"; - -contract TokenPool_setRemotePool is TokenPoolSetup { -// function test_setRemotePool_Success() public { -// uint64 chainSelector = DEST_CHAIN_SELECTOR; -// address initialPool = makeAddr("remotePool"); -// address remoteToken = makeAddr("remoteToken"); -// // The new pool is a non-evm pool, as it doesn't fit in the normal 160 bits -// bytes memory newPool = abi.encode(type(uint256).max); -// -// TokenPool.ChainUpdate[] memory chainUpdates = new TokenPool.ChainUpdate[](1); -// chainUpdates[0] = TokenPool.ChainUpdate({ -// remoteChainSelector: chainSelector, -// remotePoolAddress: abi.encode(initialPool), -// remoteTokenAddress: abi.encode(remoteToken), -// allowed: true, -// outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), -// inboundRateLimiterConfig: _getInboundRateLimiterConfig() -// }); -// s_tokenPool.applyChainUpdates(chainUpdates); -// -// vm.expectEmit(); -// emit TokenPool.RemotePoolSet(chainSelector, abi.encode(initialPool), newPool); -// -// s_tokenPool.setRemotePool(chainSelector, newPool); -// -// assertEq(keccak256(newPool), keccak256(s_tokenPool.getRemotePool(chainSelector))); -// } -// -// // Reverts -// -// function test_setRemotePool_NonExistentChain_Reverts() public { -// uint64 chainSelector = 123124; -// bytes memory remotePool = abi.encode(makeAddr("remotePool")); -// -// vm.expectRevert(abi.encodeWithSelector(TokenPool.NonExistentChain.selector, chainSelector)); -// s_tokenPool.setRemotePool(chainSelector, remotePool); -// } -// -// function test_setRemotePool_OnlyOwner_Reverts() public { -// vm.startPrank(STRANGER); -// -// vm.expectRevert(Ownable2Step.OnlyCallableByOwner.selector); -// s_tokenPool.setRemotePool(123124, abi.encode(makeAddr("remotePool"))); -// } -} diff --git a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol index 3d97f0c17c3..b8d2e3ea19b 100644 --- a/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/TokenPool/TokenPoolSetup.t.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.24; import {BurnMintERC677} from "../../../../shared/token/ERC677/BurnMintERC677.sol"; +import {TokenPool} from "../../../pools/TokenPool.sol"; import {TokenPoolHelper} from "../../helpers/TokenPoolHelper.sol"; import {RouterSetup} from "../../router/Router/RouterSetup.t.sol"; @@ -11,11 +12,24 @@ contract TokenPoolSetup is RouterSetup { IERC20 internal s_token; TokenPoolHelper internal s_tokenPool; + address internal s_initialRemotePool = makeAddr("initialRemotePool"); + address internal s_initialRemoteToken = makeAddr("initialRemoteToken"); + function setUp() public virtual override { RouterSetup.setUp(); s_token = new BurnMintERC677("LINK", "LNK", 18, 0); deal(address(s_token), OWNER, type(uint256).max); s_tokenPool = new TokenPoolHelper(s_token, new address[](0), address(s_mockRMN), address(s_sourceRouter)); + + TokenPool.ChainUpdate[] memory chainUpdate = new TokenPool.ChainUpdate[](1); + chainUpdate[0] = TokenPool.ChainUpdate({ + remoteChainSelector: DEST_CHAIN_SELECTOR, + remotePoolAddress: abi.encode(s_initialRemotePool), + remoteTokenAddress: abi.encode(s_initialRemoteToken), + outboundRateLimiterConfig: _getOutboundRateLimiterConfig(), + inboundRateLimiterConfig: _getInboundRateLimiterConfig() + }); + s_tokenPool.applyChainUpdates(new uint64[](0), chainUpdate); } } diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol index b1052752c97..8ec63e0b627 100644 --- a/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/USDC/HybridLockReleaseUSDCTokenPool/HybridLockReleaseUSDCTokenPoolSetup.t.sol @@ -2,13 +2,9 @@ pragma solidity 0.8.24; import {IBurnMintERC20} from "../../../../../shared/token/ERC20/IBurnMintERC20.sol"; -import {ITokenMessenger} from "../../../../pools/USDC/ITokenMessenger.sol"; import {BurnMintERC677} from "../../../../../shared/token/ERC677/BurnMintERC677.sol"; import {Router} from "../../../../Router.sol"; -import {Pool} from "../../../../libraries/Pool.sol"; -import {RateLimiter} from "../../../../libraries/RateLimiter.sol"; - import {TokenPool} from "../../../../pools/TokenPool.sol"; import {HybridLockReleaseUSDCTokenPool} from "../../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; import {USDCTokenPool} from "../../../../pools/USDC/USDCTokenPool.sol"; diff --git a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPoolSetup.t.sol b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPoolSetup.t.sol index 1209218d77d..33528cd483e 100644 --- a/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPoolSetup.t.sol +++ b/contracts/src/v0.8/ccip/test/pools/USDC/USDCTokenPoolSetup.t.sol @@ -2,13 +2,9 @@ pragma solidity 0.8.24; import {IBurnMintERC20} from "../../../../shared/token/ERC20/IBurnMintERC20.sol"; -import {ITokenMessenger} from "../../../pools/USDC/ITokenMessenger.sol"; import {BurnMintERC677} from "../../../../shared/token/ERC677/BurnMintERC677.sol"; import {Router} from "../../../Router.sol"; -import {Pool} from "../../../libraries/Pool.sol"; -import {RateLimiter} from "../../../libraries/RateLimiter.sol"; - import {TokenPool} from "../../../pools/TokenPool.sol"; import {HybridLockReleaseUSDCTokenPool} from "../../../pools/USDC/HybridLockReleaseUSDCTokenPool.sol"; import {USDCTokenPool} from "../../../pools/USDC/USDCTokenPool.sol"; @@ -20,7 +16,7 @@ contract HybridLockReleaseUSDCTokenPoolSetup is BaseTest { IBurnMintERC20 internal s_token; MockUSDCTokenMessenger internal s_mockUSDC; MockE2EUSDCTransmitter internal s_mockUSDCTransmitter; - uint32 internal constant USDC_DEST_TOKEN_GAS = 150_000; + uint32 internal constant USDC_DEST_TOKEN_GAS = 180_000; struct USDCMessage { uint32 version;